diff --git a/WebContent/Tenwa/insurance/insuranceInfo.jsp b/WebContent/Tenwa/insurance/insuranceInfo.jsp
new file mode 100644
index 000000000..ad4fb8705
--- /dev/null
+++ b/WebContent/Tenwa/insurance/insuranceInfo.jsp
@@ -0,0 +1,120 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
+ /*
+ Author: undefined 2016-06-07
+ Content: 示例详情页面
+ History Log:
+ */
+ String sPrevUrl = CurPage.getParameter("PrevUrl");
+ if(sPrevUrl == null) sPrevUrl = "";
+
+ String sTempletNo = "InsuranceInfo";//--模板号--
+ ASObjectModel doTemp = new ASObjectModel(sTempletNo);
+ String inputuserid=CurUser.getUserID();
+ String inputorgid=CurUser.getOrgID();
+ doTemp.setDefaultValue("InputUserID",inputuserid);
+ doTemp.setDefaultValue("InputOrgID",inputorgid);
+// doTemp.setColTips("", "");
+// doTemp.setDefaultValue("invalid", "N");
+// doTemp.setHtmlEvent("had_money","onchange","adjustMayOpemoney");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
+ dwTemp.Style = "2";//freeform
+ //dwTemp.ReadOnly = "-2";//只读模式
+ dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
+
+ String sButtons[][] = {
+ {"true","All","Button","保存","保存所有修改","saveRecord()","","","",""},
+ {"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return",""},
+ {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
+ };
+ String orgCompany=CurUser.getOrgID();
+ if(orgCompany.length()>13){
+ orgCompany=orgCompany.substring(0,13);
+ }
+ orgCompany=orgCompany.substring(0,orgCompany.length()-4);
+%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/insurance/insuranceList.jsp b/WebContent/Tenwa/insurance/insuranceList.jsp
new file mode 100644
index 000000000..a1443ba05
--- /dev/null
+++ b/WebContent/Tenwa/insurance/insuranceList.jsp
@@ -0,0 +1,223 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
+<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
+<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
+<%@ page import="com.amarsoft.app.util.*" %>
+
+
+<%
+ String userId = CurUser.getUserID();
+ String orgId =CurUser.getOrgID();
+ System.out.print(orgId);
+ String falg = "true";
+
+ String compClientID = request.getParameter("CompClientID");
+// ASObjectModel doTemp = new ASObjectModel("RentNotify");
+ ASObjectModel doTemp = new ASObjectModel("ContractInsuranceList");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="1"; //--设置为Grid风格--
+ dwTemp.ReadOnly = "1";
+ dwTemp.setPageSize(15);
+ dwTemp.MultiSelect = true;
+ dwTemp.genHTMLObjectWindow("");
+
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] =null;
+ sButtons=new String[][]{
+ {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
+ {falg,"All","Button","生成保险理赔委托书","生成保险理赔委托书","generateQuotation()","","","","btn_icon_generate"},
+ {"true","All","Button","批量下载","批量下载","lotdown()","","","","btn_icon_down"},
+ {falg,"All","Button","公司盖章","公司盖章","stamp()","","","",""},
+ };
+%>
+
+
+
+
+
+<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
+<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+<%/*~END~*/%>
+
+
+
+<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=定义按钮事件;]~*/%>
+
+<%/*~END~*/%>
+
+
+
+
+<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%>
+
+<%/*~END~*/%>
+
+
+
+
+<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
+
+<%/*~END~*/%>
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/insurance/insuranceMain.jsp b/WebContent/Tenwa/insurance/insuranceMain.jsp
new file mode 100644
index 000000000..f341d63bc
--- /dev/null
+++ b/WebContent/Tenwa/insurance/insuranceMain.jsp
@@ -0,0 +1,11 @@
+<%@ page contentType="text/html; charset=GBK"%><%@
+ include file="/IncludeBegin.jsp"%><%
+ String PG_TITLE = "隐藏左侧区域的Main页面"; // 浏览器窗口标题 PG_TITLE
+ String PG_CONTENT_TITLE = "本方信息"; //默认的内容区标题
+ String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
+ String PG_LEFT_WIDTH = "1";//默认的treeview宽度
+%><%@include file="/Resources/CodeParts/Main04.jsp"%>
+
+<%@ include file="/IncludeEnd.jsp"%>
\ No newline at end of file
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_comm.xml b/WebContent/WEB-INF/etc/jbo/jbo_comm.xml
index 0a79b3736..fad8fb651 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_comm.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_comm.xml
@@ -1,135 +1,135 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
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tenwa/channelportal/action/ContractInsuranceSignAction.java b/src/com/tenwa/channelportal/action/ContractInsuranceSignAction.java
index 2224ebe74..cecc2c0ff 100644
--- a/src/com/tenwa/channelportal/action/ContractInsuranceSignAction.java
+++ b/src/com/tenwa/channelportal/action/ContractInsuranceSignAction.java
@@ -123,7 +123,7 @@ public class ContractInsuranceSignAction {
* @throws Exception
*/
public String claimSignInsuranceTwo(JBOTransaction tx) throws Exception {
- logger.info("claimSignInsuranceTwo 保险委托申请书盖章:对接契约锁2.0 开始 1224 1935");
+ logger.info("claimSignInsuranceTwo 保险委托申请书盖章:对接契约锁2.0 开始 0107 1013");
String libraryid="";
BizObjectManager bom=JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME);
BizObject DOCRELATIVE=bom.createQuery("OBJECTTYPE='contractInsurance' and CONTRACT_ID=:contractid ").setParameter("contractid", contractId).getSingleResult(false);
diff --git a/src_core/com/tenwa/officetempalte/controller/RentNotinyDeleteAction.java b/src_core/com/tenwa/officetempalte/controller/RentNotinyDeleteAction.java
index bb74f8ba6..fc75ad983 100644
--- a/src_core/com/tenwa/officetempalte/controller/RentNotinyDeleteAction.java
+++ b/src_core/com/tenwa/officetempalte/controller/RentNotinyDeleteAction.java
@@ -76,7 +76,9 @@ public class RentNotinyDeleteAction {
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='LetterApprova'").setParameter("projectId",projectId).getSingleResult(false);
}else if("LoanNotice".equals(objecttype)){
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='LoanNotice'").setParameter("projectId",projectId).getSingleResult(false);
- }
+ }else if("contractInsurance".equals(objecttype)){
+ DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='contractInsurance'").setParameter("projectId",projectId).getSingleResult(false);
+ }
else{
DOCRELATIVE=bom.createQuery("plan_number=:plan_number and plan_list=:plan_list").setParameter("plan_number",plan_number).setParameter("plan_list", plan_list).getSingleResult(false);
}
diff --git a/src_tenwa/com/tenwa/insurance/InsuranceInfo.java b/src_tenwa/com/tenwa/insurance/InsuranceInfo.java
new file mode 100644
index 000000000..c846457bf
--- /dev/null
+++ b/src_tenwa/com/tenwa/insurance/InsuranceInfo.java
@@ -0,0 +1,67 @@
+package com.tenwa.insurance;
+
+import com.alibaba.fastjson.JSONObject;
+import com.amarsoft.are.jbo.*;
+import com.amarsoft.awe.util.ASResultSet;
+import com.amarsoft.awe.util.SqlObject;
+import com.amarsoft.awe.util.Transaction;
+
+public class InsuranceInfo {
+
+ private String contractNo;
+
+ public String getContractNo() {
+ return contractNo;
+ }
+
+ public void setContractNo(String contractNo) {
+ this.contractNo = contractNo;
+ }
+
+ public String checkInsuranceInfo(JBOTransaction tx) throws JBOException{//校验姓名是否存在
+ System.out.println("合同id="+ contractNo);
+ Transaction Sqlca=null;
+ JSONObject resJson = new JSONObject();
+ try {
+ Sqlca=Transaction.createTransaction(tx);
+ String sql = "SELECT lec.id as equipmentId,lec.FRAME_NUMBER,lec.LICENSE_PLATE_NUMBER,lcp.plate_number, " +
+ " ci.customerid,ci.customername,ci.certid, " +
+ " di.distributor_no,di.DISTRIBUTOR_NAME, " +
+ " lci.PRODUCT_ID,lci.PRODUCT_NAME,lci.SUBJECTID,lci.SUBJECTNAME,lci.PROJECT_ID,lci.PROJECT_NAME,lci.ID as contractId, lci.CONTRACT_NUMBER " +
+ " FROM lb_contract_info lci " +
+ " left join distributor_info di on di.distributor_no=lci.distributor_id " +
+ " left join lb_union_lessee lul on lul.CONTRACT_ID=lci.id " +
+ " left join customer_info ci on ci.customerid=lul.CUSTOMER_ID " +
+ " left join lb_equipment_car lec on lec.CONTRACT_ID=lci.id " +
+ " left join LB_CAR_LICENSE_PLATE_INFO lcp on lcp.CONTRACT_ID=lci.id " +
+ " WHERE lci.CONTRACT_NUMBER='" + contractNo + "'";
+ ASResultSet res = Sqlca.getASResultSet(new SqlObject(sql));
+ while (res.next()) {
+ resJson.put("equipmentId", res.getString("equipmentId"));
+ resJson.put("FRAME_NUMBER", res.getString("FRAME_NUMBER"));
+ resJson.put("LICENSE_PLATE_NUMBER", res.getString("LICENSE_PLATE_NUMBER"));
+ resJson.put("plate_number", res.getString("plate_number"));
+ resJson.put("customerid", res.getString("customerid"));
+ resJson.put("PRODUCT_ID", res.getString("PRODUCT_ID"));
+ resJson.put("PRODUCT_NAME", res.getString("PRODUCT_NAME"));
+ resJson.put("SUBJECTID", res.getString("SUBJECTID"));
+ resJson.put("SUBJECTNAME", res.getString("SUBJECTNAME"));
+ resJson.put("PROJECT_ID", res.getString("PROJECT_ID"));
+ resJson.put("PROJECT_NAME", res.getString("PROJECT_NAME"));
+ resJson.put("contractId", res.getString("contractId"));
+ resJson.put("distributor_no", res.getString("distributor_no"));
+ resJson.put("DISTRIBUTOR_NAME", res.getString("DISTRIBUTOR_NAME"));
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ return "ERROR";
+ }finally{
+ if(Sqlca !=null){
+ Sqlca.commit();
+ }
+ }
+ return resJson.toJSONString();
+ }
+
+
+}
diff --git a/src_tenwa/com/tenwa/insurance/InsuranceInfoHandler.java b/src_tenwa/com/tenwa/insurance/InsuranceInfoHandler.java
new file mode 100644
index 000000000..7c13312d4
--- /dev/null
+++ b/src_tenwa/com/tenwa/insurance/InsuranceInfoHandler.java
@@ -0,0 +1,56 @@
+package com.tenwa.insurance;
+
+import com.amarsoft.are.jbo.BizObject;
+import com.amarsoft.are.jbo.JBOFactory;
+import com.amarsoft.are.jbo.JBOTransaction;
+import com.amarsoft.awe.dw.handler.impl.CommonHandler;
+import jbo.com.tenwa.entity.comm.credit.ST_CREDIT_AUDIT_HOLIDAY;
+
+public class InsuranceInfoHandler extends CommonHandler {
+
+ @Override
+ protected void beforeInsert(JBOTransaction tx, BizObject bo)
+ throws Exception {
+ // TODO Auto-generated method stub
+ String contractNo = bo.getAttribute("contract_no").getString();
+ System.out.println("beforeInsert -- contractNo=" + contractNo);
+// bo.setAttributeValue("c_year", vDate[0]);
+// bo.setAttributeValue("c_month", vDate[1]);
+// bo.setAttributeValue("c_day", vDate[2]);
+ super.beforeInsert(tx, bo);
+ }
+
+ @Override
+ protected void beforeUpdate(JBOTransaction tx, BizObject bo) throws Exception {
+ String contractNo = bo.getAttribute("contract_no").getString();
+ System.out.println("beforeUpdate -- contractNo=" + contractNo);
+// bo.setAttributeValue("c_year", vDate[0]);
+// bo.setAttributeValue("c_month", vDate[1]);
+// bo.setAttributeValue("c_day", vDate[2]);
+ super.beforeUpdate(tx, bo);
+ }
+
+ @Override
+ protected boolean validityCheck(BizObject bo, boolean isInsert) {
+ try {
+ if (isInsert) {
+ BizObject bx = JBOFactory.createBizObjectQuery(LB_CONTRACT_INSURANCE_INFO.CLASS_NAME, "insurance_no=:insurance_no").setParameter("insurance_no", bo.getAttribute("insurance_no").getString()).getSingleResult(false);
+ if (bx != null) {
+ this.errors = "保险单号重复";
+ return false;
+ }
+ } else {
+ BizObject bx = JBOFactory.createBizObjectQuery(LB_CONTRACT_INSURANCE_INFO.CLASS_NAME, "insurance_no=:insurance_no and id<>'" + bo.getAttribute("id").getString() + "'").setParameter("insurance_no", bo.getAttribute("insurance_no").getString()).getSingleResult(false);
+ if (bx != null) {
+ this.errors = "保险单号重复";
+ return false;
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+
+ return super.validityCheck(bo, isInsert);
+ }
+}
diff --git a/src_tenwa/com/tenwa/insurance/LB_CONTRACT_INSURANCE_INFO.java b/src_tenwa/com/tenwa/insurance/LB_CONTRACT_INSURANCE_INFO.java
new file mode 100644
index 000000000..902793833
--- /dev/null
+++ b/src_tenwa/com/tenwa/insurance/LB_CONTRACT_INSURANCE_INFO.java
@@ -0,0 +1,64 @@
+package com.tenwa.insurance;
+
+/**
+* 保险理赔授权- JBO命名常量类
+* Note: This file is generated by ADE tools, dont modify it.
+
+*/
+public interface LB_CONTRACT_INSURANCE_INFO {
+ /**
+ * 保险理赔授权
+ * 代表本类映射的BizObjectClass
+ */
+ public static final String CLASS_NAME = "com.tenwa.insurance.LB_CONTRACT_INSURANCE_INFO";
+ /**
+ * 编号 STRING(32)
+ */
+ public static final String id = "id";
+ public static final String insurance_no = "insurance_no"; //保险单号
+ public static final String contract_id = "contract_id";//合同id
+ public static final String project_id = "project_id";//项目id
+ public static final String customer_id = "customer_id";//客户id
+ public static final String equipment_id = "equipment_id";//租赁物id
+ public static final String contract_no = "contract_no";//合同编号
+ public static final String project_name = "project_name";//订单编号
+ public static final String FRAME_NUMBER = "FRAME_NUMBER";//车架号
+ public static final String PLATE_NUMBER = "PLATE_NUMBER";//车牌号
+ public static final String product_id = "product_id";//产品id
+ public static final String product_name = "product_name";//产品名称
+ public static final String distributor_no = "distributor_no";//经销商id
+ public static final String distributor_name = "distributor_name";//经销商名称
+ public static final String subject_id = "subject_id";//主体id
+ public static final String subject_name = "subject_name";//主体名称
+ public static final String username = "username";//客户名称
+ public static final String cert_id = "cert_id";//身份证号
+ public static final String insurance_company = "insurance_company";//保险公司名称
+ public static final String insurance_amount_number = "insurance_amount_number";//赔偿金额
+ public static final String insurance_account = "insurance_account";//户名
+ public static final String bank_name = "bank_name";//银行名称
+ public static final String bank_card = "bank_card";//银行账户
+ /**
+ * 登记人 STRING(32)
+ */
+ public static final String INPUTUSERID = "INPUTUSERID";
+ /**
+ * 登记部门 STRING(32)
+ */
+ public static final String INPUTORGID = "INPUTORGID";
+ /**
+ * 登记时间 STRING(32)
+ */
+ public static final String INPUTTIME = "INPUTTIME";
+ /**
+ * 更新人 STRING(32)
+ */
+ public static final String UPDATEUSERID = "UPDATEUSERID";
+ /**
+ * 更新部门 STRING(32)
+ */
+ public static final String UPDATEORGID = "UPDATEORGID";
+ /**
+ * 更新时间 STRING(32)
+ */
+ public static final String UPDATETIME = "UPDATETIME";
+}
\ No newline at end of file