diff --git a/WebContent/ProductManage/ProductConfig/ProductInfo.jsp b/WebContent/ProductManage/ProductConfig/ProductInfo.jsp index a943a71c0..e58e262e8 100644 --- a/WebContent/ProductManage/ProductConfig/ProductInfo.jsp +++ b/WebContent/ProductManage/ProductConfig/ProductInfo.jsp @@ -47,6 +47,10 @@ include file="/Frame/resources/include/ui/include_info.jspf"%> } function specificInfo(){ + var typeNo = getItemValue(0,getRow(),"TypeNo"); + var typeName = getItemValue(0,getRow(),"TypeName"); + AsControl.RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","updateProductName","productID="+typeNo+",productName="+typeName); + document.getElementById("sys_sub_page_frame_GGDY").parentNode.parentNode.style.display = "none"; var typeNo = getItemValue(0,getRow(),"TypeNo"); var productType1 = getItemValue(0,getRow(),"Attribute1");//产品类型 diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp index cbac1c636..a782902b8 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp @@ -184,6 +184,11 @@ setItemRequired(0,"CAR_COLOUR",true); setItemRequired(0,"ENGINE_NUMBER",true); setItemReadOnly(0,0,"MEMO",false); + + document.getElementById('BRAND').nextSibling.remove(); + document.getElementById('CAR_SERIES').nextSibling.remove(); + document.getElementById('MODEL').nextSibling.remove(); + //第一车贷产品其他配置说明为必填 <%-- if("DYCD"=="<%=operationType%>"){ setItemRequired(0,"MEMO",true); @@ -193,6 +198,12 @@ $("#FRAME_NUMBER").css("color","red"); } */ } + var carAttribute = getItemValue(0,0,"car_attribute"); + if("head" != carAttribute){ + //setItemRequired(0,"FRAME_NUMBER",false); + setItemRequired(0,"CAR_COLOUR",false); + setItemRequired(0,"ENGINE_NUMBER",false); + } <%--hideFrame("<%=vehiclelevel%>");--%> }); @@ -281,6 +292,12 @@ if(framNum != "0" && checkFrameNumber()==false){ return; } + var id = getItemValue(0,0,"ID"); + var projectId = "<%=projectId%>"; + if(typeof(id) == "undefined" || id.length == 0){ + setItemValue(0,0,"car_attribute","tail");//设置车辆属性 + setItemValue(0,0,"project_id",projectId);//设置项目id + } var ApplyType = "<%=ApplyType%>"; if(plate_number!=null&&plate_number!=""){ @@ -310,7 +327,7 @@ var sParam = "FlowUnid="+"<%=sFlowUnid%>"+"&TempletNo="+"<%=sListTempletNo%>"; var righttype="<%=RightType%>"; if(righttype=="ReadOnly"){sParam=sParam+"&RightType=<%=RightType%>";} - sParam=sParam+"&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&TaskNo=<%=taskno%>&InfoTempletNo=<%=sInfoTempletNo%>&EquipType=<%=sEquipType%>&carAttributes=<%=carAttributes%>"; + sParam=sParam+"&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&TaskNo=<%=taskno%>&InfoTempletNo=<%=sInfoTempletNo%>&EquipType=<%=sEquipType%>&carAttributes=<%=carAttributes%>&FlowName=<%=flowName%>"; AsControl.OpenView(sUrl,sParam,"_self",""); } diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentList.jsp index 4a46ee890..2384c9280 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentList.jsp @@ -37,6 +37,7 @@ String contractid = CurPage.getParameter("ContractId"); String showtype = CurPage.getParameter("ShowType"); String operationType = CurPage.getParameter("operationType"); + String flowNo = CurPage.getParameter("FlowNo"); String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 if(sFlowUnid == null)sFlowUnid = ""; @@ -69,6 +70,10 @@ <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List03;Describe=定义数据对象;]~*/%> <% + if(flowNo==null){ + sTempletNo="LBEquipmentListT4CarContract"; + sFlowUnid=contractid; + } ASObjectModel doTemp = new ASObjectModel(sTempletNo); /* if(null!=ishistory&&ishistory.equals("true")){ doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory"); @@ -87,22 +92,27 @@ <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%> <% + + String falg = "true"; + if("BContractApproveFlow".equals(flowNo)||"BContractChangeFlow".equals(flowNo)){ + falg = "false"; + } String sButtons[][] =null; if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ RightType="ReadOnly"; sButtons=new String[][] { {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""} }; -}else if("ContractOnhireFlow".equals(CurPage.getParameter("FlowNo"))){ +}else if("ContractOnhireFlow".equals(flowNo)){ sButtons=new String[][] { {"true","","Button","修改","修改租赁物信息","viewAndEdit()","","","","btn_icon_edit"}, }; }else{ sButtons=new String[][]{ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 - {"true","","Button","新增","新增租赁物信息","newRecord()","","","","btn_icon_add",""}, + {falg,"","Button","新增","新增租赁物信息","newRecord()","","","","btn_icon_add",""}, {"true","","Button","修改","修改租赁物信息","viewAndEdit()","","","","btn_icon_edit"}, - {"true","","Button","删除","删除租赁物信息","deleteRecord()","","","","btn_icon_delete",""}, + {falg,"","Button","删除","删除租赁物信息","deleteRecord()","","","","btn_icon_delete",""}, //{"true","","Button","导入Excel","导入租赁物信息Excel","inExcel()","","","","",""}, //{"true","","Button","导出Excel","导出租赁物信息Excel","exportPage('"+sWebRootPath+"',0,'excel','"+dwTemp.getArgsValue()+"')","","","","",""}, //{"true","","Button","下载模板","下载租赁物信息模板","downLoad()","","","","",""} @@ -176,12 +186,12 @@ if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory. /*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/ function newRecord(){ var countNumber = getRowCount(0); - if(Number(countNumber)<2){ +// if(Number(countNumber)<2){ //判断是否承租人租赁车辆数量 - var res0=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","checkGuaranteeCarByCertid",'certid=<%=certid%>'+',flowunid=<%=sFlowUnid%>'); - if(res0 != "0"){ - alert(res0); - } + //var res0=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","checkGuaranteeCarByCertid",'certid=<%=certid%>'+',flowunid=<%=sFlowUnid%>'); + //if(res0 != "0"){ + // alert(res0); + //} var sUrl = "/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp"; var sParam = 'FlowUnid='+'<%=sFlowUnid%>'+"&ListTempletNo="+"<%=sTempletNo%>"; var righttype="<%=RightType%>"; @@ -191,9 +201,9 @@ if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory. sParam=sParam+"&ProjectNo=<%=ProjectNo%>&ProjectId=<%=projectId%>&ApplyType=<%=ApplyType%>&FlowName=<%=flowName%>&ContractId=<%=contractid%>&ShowType=<%=showtype%>&operationType=<%=operationType%>&carAttributes=<%=carAttributes%>"; AsControl.OpenView(sUrl,sParam,"_self",""); - } else { + /* } else { alert("租赁物信息最多只能有两个!"); - } + } */ } @@ -217,6 +227,11 @@ if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory. /*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/ function deleteRecord(){ + var carAttribute = getItemValue(0,getRow(),"car_attribute"); + if(carAttribute=="head"){ + alert("头车不允许删除!"); + return ; + } var ID = getItemValue(0,getRow(),"ID"); if(typeof(ID) == "undefined" || ID.length == 0 ) { diff --git a/WebContent/Tenwa/Lease/Flow/Project/LbBeforeAppLication/LbBeforeAppLicationList.jsp b/WebContent/Tenwa/Lease/Flow/Project/LbBeforeAppLication/LbBeforeAppLicationList.jsp index ec8c7249b..16c4026e7 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/LbBeforeAppLication/LbBeforeAppLicationList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/LbBeforeAppLication/LbBeforeAppLicationList.jsp @@ -6,12 +6,16 @@ History Log: */ String userid = CurUser.getUserID(); + String orgID = CurUser.getOrgID(); ASObjectModel doTemp = new ASObjectModel("LbBeforeAppLicationList"); + if(!"8009011005".equals(orgID)){ + doTemp.appendJboWhere(" inputuserid='"+userid+"'"); + } ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--设置为Grid风格-- dwTemp.ReadOnly = "1"; //只读模式 dwTemp.setPageSize(10); - dwTemp.genHTMLObjectWindow(userid); + //dwTemp.genHTMLObjectWindow(userid); //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 String sButtons[][] = { diff --git a/WebContent/Tenwa/Lease/Flow/RentNotify/LetterApprovalList.jsp b/WebContent/Tenwa/Lease/Flow/RentNotify/LetterApprovalList.jsp index c6d7b97ef..e71700861 100644 --- a/WebContent/Tenwa/Lease/Flow/RentNotify/LetterApprovalList.jsp +++ b/WebContent/Tenwa/Lease/Flow/RentNotify/LetterApprovalList.jsp @@ -95,6 +95,7 @@ } function generateQuotation(){ var projectId=getItemValueArray(0,"ID"); + var subjectids=getItemValueArray(0,"subjectid"); var number = 0; if(typeof(projectId)=="undefined"||projectId==null||projectId==""){alert("请选择数据");return;} for(var i=0;i - + @@ -4628,6 +4628,7 @@ + diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 058128651..fe1f7758b 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4420,6 +4420,7 @@ + diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml index 2dd83b7d6..c5f8e4a9e 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml @@ -1489,6 +1489,7 @@ + @@ -2064,6 +2065,7 @@ + @@ -3615,6 +3617,7 @@ + diff --git a/WebContent/fileTemplate/鎵瑰噯鍑 .docx b/WebContent/fileTemplate/鎵瑰噯鍑 .docx new file mode 100644 index 000000000..25cee5995 Binary files /dev/null and b/WebContent/fileTemplate/鎵瑰噯鍑 .docx differ diff --git a/WebContent/fileTemplate/鑱斿悎绉熻祦鈥斺旇瀺璧勭璧佸悎鍚-淇鐗-20200806.docx b/WebContent/fileTemplate/鑱斿悎绉熻祦鈥斺旇瀺璧勭璧佸悎鍚-淇鐗-20200806.docx index 33dcf4b4f..6983e5d74 100644 Binary files a/WebContent/fileTemplate/鑱斿悎绉熻祦鈥斺旇瀺璧勭璧佸悎鍚-淇鐗-20200806.docx and b/WebContent/fileTemplate/鑱斿悎绉熻祦鈥斺旇瀺璧勭璧佸悎鍚-淇鐗-20200806.docx differ diff --git a/config/interfacePlatform.properties b/config/interfacePlatform.properties index 6201fbbb4..76a211a26 100644 --- a/config/interfacePlatform.properties +++ b/config/interfacePlatform.properties @@ -3,4 +3,5 @@ FileToPush=pushToBatchDealAllTimer AtTheEndOfContractPush=ContractFinishPushTimer ContractLoanPush=loanPushTimer PushApprovalOpinions=publicPushApproveTimer -channel_kjflc=KJFLC \ No newline at end of file +channel_kjflc=KJFLC +channel_shiqiao=SHIQIAO \ No newline at end of file diff --git a/src/com/amarsoft/dict/als/manage/DataConversionManage.java b/src/com/amarsoft/dict/als/manage/DataConversionManage.java new file mode 100644 index 000000000..d74917587 --- /dev/null +++ b/src/com/amarsoft/dict/als/manage/DataConversionManage.java @@ -0,0 +1,18 @@ +package com.amarsoft.dict.als.manage; + +import java.text.SimpleDateFormat; +import java.util.Date; + + +public class DataConversionManage { + + public static String getTime(String seconds) throws Exception { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String time = ""; + if(seconds!=null && seconds.matches("[0-9]+")){ + time = sdf.format(new Date(Long.valueOf(seconds))); + } + return time; + } + +} diff --git a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java index 37064429c..7ad42f7ea 100644 --- a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java +++ b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java @@ -265,7 +265,7 @@ public class FileTemplateUtil { public String CheckCar(JBOTransaction tx) throws Exception{ String message = ""; BizObjectManager lrct = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME); - BizObject lrc = lrct.createQuery("FLOWUNID=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + BizObject lrc = lrct.createQuery("FLOWUNID=:flowunid and car_attribute='head' ").setParameter("flowunid", flowunid).getSingleResult(false); if(lrc!= null){ int length = lrc.getAttribute("FRAME_NUMBER").toString().length(); if(lrc.getAttribute("FRAME_NUMBER").toString().length()==0){ @@ -284,6 +284,10 @@ public class FileTemplateUtil { if(message.length()>0){ return "请先填写:"+message.substring(0,message.length() - 1)+"!"; } + BizObject carTail = lrct.createQuery("FLOWUNID=:flowunid and car_attribute='tail' and ( FRAME_NUMBER is null or FRAME_NUMBER='' )").setParameter("flowunid", flowunid).getSingleResult(false); + if(carTail!=null){ + return "请先填写:租赁物对应的车架号!"; + } String docName=""; String[] bfids = templateIds.split("&"); BizObjectManager btManager = JBOFactory.getBizObjectManager(BF_TEMPLATE.CLASS_NAME); diff --git a/src/com/tenwa/app/manage/util/ContractSignActionTwoUtil.java b/src/com/tenwa/app/manage/util/ContractSignActionTwoUtil.java index 0dc479bf0..9e3150827 100644 --- a/src/com/tenwa/app/manage/util/ContractSignActionTwoUtil.java +++ b/src/com/tenwa/app/manage/util/ContractSignActionTwoUtil.java @@ -217,6 +217,16 @@ public class ContractSignActionTwoUtil { personalStamper3.setOffsetX(-0.01); personalStamper3.setOffsetY(-0.006); stampers.add(personalStamper3); + //添加一个签署时间 + Stamper personalStamper4 = new Stamper(); + personalStamper4.setPage(0); + personalStamper4.setType("TIMESTAMP"); + personalStamper4.setSignatoryId(personalSignatoryId); + personalStamper4.setDocumentId(documentId); + personalStamper4.setKeyword("租赁物已于"); + personalStamper4.setOffsetX(0.025); + personalStamper4.setOffsetY(-0.006); + stampers.add(personalStamper4); }else{ personalStamper.setKeyword("承租人(签字/盖章):"); //personalStamper.setOffsetX(0.6); @@ -227,7 +237,7 @@ public class ContractSignActionTwoUtil { if(contractName.indexOf("狮桥") > -1){ personalStamper.setKeyword("乙方(承租人):"); personalStamper.setOffsetX(-0.05); - personalStamper.setOffsetY(-0.065); + personalStamper.setOffsetY(-0.075); //共同申请人添加第二个签字位置 Stamper personalStamper2 = new Stamper(); personalStamper2.setPage(0); @@ -316,10 +326,34 @@ public class ContractSignActionTwoUtil { sealStamper2.setOffsetX(-0.13); sealStamper2.setOffsetY(-0.04); stampers.add(sealStamper2); + + //添加一个公司盖章时间 + Stamper sealStamper3 = new Stamper(); + sealStamper3.setPage(0); + sealStamper3.setType("TIMESTAMP"); + sealStamper3.setActionId(companySealActionId); + sealStamper3.setSignatoryId(platformSignatoryId); + sealStamper3.setDocumentId(documentId); + sealStamper3.setKeyword("签署日期:"); + //sealStamper3.setOffsetX(-0.13); + sealStamper3.setOffsetY(-0.006); + stampers.add(sealStamper3); }else{ sealStamper.setKeyword("出租人2(盖章)"); sealStamper.setOffsetX(-0.08); sealStamper.setOffsetY(-0.06); + + //添加第二个盖章位置 + Stamper sealStamper2 = new Stamper(); + sealStamper2.setPage(0); + sealStamper2.setType("COMPANY"); + sealStamper2.setActionId(companySealActionId); + sealStamper2.setSignatoryId(platformSignatoryId); + sealStamper2.setDocumentId(documentId); + sealStamper2.setKeyword("本合同一式三份,交抵押登记机关一份"); + sealStamper2.setOffsetX(-0.18); + sealStamper2.setOffsetY(-0.10); + stampers.add(sealStamper2); } stampers.add(sealStamper); } else { diff --git a/src_core/com/tenwa/voucher/serviceImp/VoucherToNCforAssistContract.java b/src_core/com/tenwa/voucher/serviceImp/VoucherToNCforAssistContract.java index e79ca7e84..9a19c8a2b 100644 --- a/src_core/com/tenwa/voucher/serviceImp/VoucherToNCforAssistContract.java +++ b/src_core/com/tenwa/voucher/serviceImp/VoucherToNCforAssistContract.java @@ -344,7 +344,7 @@ public class VoucherToNCforAssistContract implements Job{ List batchList= new ArrayList(); // 获取未传输及之前传输失败的数据 - String sql="SELECT id,CONTRACT_NUMBER FROM LB_CONTRACT_INFO WHERE CONTRACT_STATUS='31' AND CONTRACT_NUMBER NOT IN(SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE='"+type+"')"; + String sql="SELECT id,CONTRACT_NUMBER FROM LB_CONTRACT_INFO WHERE (CONTRACT_STATUS = '31' OR CONTRACT_STATUS = '21') AND CONTRACT_NUMBER NOT IN(SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE='"+type+"')"; List> rs = DataOperatorUtil.getDataBySql(Sqlca,sql,null); if(rs!=null && rs.size()>0) { diff --git a/src_core/com/tenwa/voucher/serviceImp/VoucherToNCforCustomer.java b/src_core/com/tenwa/voucher/serviceImp/VoucherToNCforCustomer.java index e6d3b21f4..c65512bbe 100644 --- a/src_core/com/tenwa/voucher/serviceImp/VoucherToNCforCustomer.java +++ b/src_core/com/tenwa/voucher/serviceImp/VoucherToNCforCustomer.java @@ -424,7 +424,7 @@ public class VoucherToNCforCustomer implements Job{ // 查询为传输或之前传输失败的数据 // String sql="SELECT max(cif.customerid) id,cif.customer_num,MAX(cif.customername)customername,MAX(cif.customertype)customertype,MAX(cif.customerid) customerid,MAX(cif.certid) as certid FROM CUSTOMER_INFO cif LEFT JOIN lb_union_lessee lul ON lul.customer_id=cif.customerid LEFT JOIN lb_contract_info lci ON lci.id=lul.contract_id WHERE lci.contract_status >='31' AND cif.customer_num NOT IN (SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE = '"+type+"') GROUP BY CIF.CUSTOMER_NUM "; - String sql="SELECT MAX(cif.customerid) id,cif.customer_num,MAX(cif.customername) customername,MAX(cif.customertype) customertype,MAX(cif.customerid) customerid, MAX(cif.certid) AS certid FROM CUSTOMER_INFO cif LEFT JOIN lb_union_lessee lul ON lul.customer_id = cif.customerid LEFT JOIN lb_contract_info lci ON lci.id = lul.contract_id WHERE lci.contract_status >= '31' AND cif.customer_num NOT IN (SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE = 'customer') AND cif.customer_num NOT IN (SELECT cust_id FROM CUSTOMER_LIST WHERE CUST_STATUS = '2' ) GROUP BY CIF.CUSTOMER_NUM "; + String sql="SELECT MAX(cif.customerid) id,cif.customer_num,MAX(cif.customername) customername,MAX(cif.customertype) customertype,MAX(cif.customerid) customerid, MAX(cif.certid) AS certid FROM CUSTOMER_INFO cif LEFT JOIN lb_union_lessee lul ON lul.customer_id = cif.customerid LEFT JOIN lb_contract_info lci ON lci.id = lul.contract_id WHERE (lci.contract_status = '31' OR lci.contract_status = '21') AND cif.customer_num NOT IN (SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE = 'customer') AND cif.customer_num NOT IN (SELECT cust_id FROM CUSTOMER_LIST WHERE CUST_STATUS = '2' ) GROUP BY CIF.CUSTOMER_NUM "; List> rs = DataOperatorUtil.getDataBySql(Sqlca,sql,null); if(rs != null && rs.size()>0) { // 记录历史批次号 diff --git a/src_jbo/jbo/app/LB_EQUIPMENT_CAR.java b/src_jbo/jbo/app/LB_EQUIPMENT_CAR.java index 887d5b436..9abebd2b4 100644 --- a/src_jbo/jbo/app/LB_EQUIPMENT_CAR.java +++ b/src_jbo/jbo/app/LB_EQUIPMENT_CAR.java @@ -445,4 +445,8 @@ public interface LB_EQUIPMENT_CAR{ * 狮桥车辆标识 STRING(50)
*/ public static final String identify_code = "identify_code"; + /** + * 车辆属性 STRING(30)
+ */ + public static final String car_attribute = "car_attribute"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/LB_EQUIPMENT_CAR_TEMP.java b/src_jbo/jbo/app/LB_EQUIPMENT_CAR_TEMP.java index 087ee8730..794de5680 100644 --- a/src_jbo/jbo/app/LB_EQUIPMENT_CAR_TEMP.java +++ b/src_jbo/jbo/app/LB_EQUIPMENT_CAR_TEMP.java @@ -433,4 +433,8 @@ public interface LB_EQUIPMENT_CAR_TEMP{ * 狮桥车辆标识 STRING(50)
*/ public static final String identify_code = "identify_code"; + /** + * 车辆属性 STRING(30)
+ */ + public static final String car_attribute = "car_attribute"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/VI_SPLITTING_PAY.java b/src_jbo/jbo/app/tenwa/calc/VI_SPLITTING_PAY.java index ce88732fc..b88c26476 100644 --- a/src_jbo/jbo/app/tenwa/calc/VI_SPLITTING_PAY.java +++ b/src_jbo/jbo/app/tenwa/calc/VI_SPLITTING_PAY.java @@ -18,6 +18,10 @@ public interface VI_SPLITTING_PAY{ */ public static final String distributor_id = "distributor_id"; /** + * distributor_name STRING(20)
+ */ + public static final String distributor_name = "distributor_name"; + /** * contract_id STRING(20)
*/ public static final String contract_id = "contract_id"; diff --git a/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR.java b/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR.java index a45ddde4e..c93676b09 100644 --- a/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR.java +++ b/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR.java @@ -301,4 +301,8 @@ public interface LB_EQUIPMENT_CAR{ * 狮桥车辆标识 STRING(50)
*/ public static final String identify_code = "identify_code"; + /** + * 车辆属性 STRING(30)
+ */ + public static final String car_attribute = "car_attribute"; } \ No newline at end of file diff --git a/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_HIS.java b/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_HIS.java index 71a736453..fb504eed3 100644 --- a/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_HIS.java +++ b/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_HIS.java @@ -297,4 +297,8 @@ public interface LB_EQUIPMENT_CAR_HIS{ * 狮桥车辆标识 STRING(50)
*/ public static final String identify_code = "identify_code"; + /** + * 车辆属性 STRING(30)
+ */ + public static final String car_attribute = "car_attribute"; } \ No newline at end of file diff --git a/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_TEMP.java b/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_TEMP.java index aa209850b..cce7b6751 100644 --- a/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_TEMP.java +++ b/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_TEMP.java @@ -433,4 +433,8 @@ public interface LB_EQUIPMENT_CAR_TEMP{ * 狮桥车辆标识 STRING(50)
*/ public static final String identify_code = "identify_code"; + /** + * 车辆属性 STRING(30)
+ */ + public static final String car_attribute = "car_attribute"; } \ No newline at end of file diff --git a/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java b/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java index 1c7934f4c..86ec4db7d 100644 --- a/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java +++ b/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java @@ -596,4 +596,13 @@ public class ProductManager{ return "SUCCESS"; } + + public void updateProductName(JBOTransaction tx) throws Exception { + BizObjectManager pslManager = JBOFactory.getFactory().getManager(PRD_SPECIFIC_LIBRARY.CLASS_NAME,tx); + BizObject psl = pslManager.createQuery(" productid=:productid ").setParameter("productid", productID).getSingleResult(true); + if(psl!=null && (!psl.getAttribute("SPECIFICNAME").getString().equals(productName))){ + psl.setAttributeValue("SPECIFICNAME", productName); + pslManager.saveObject(psl); + } + } } diff --git a/src_sql/view/vi_business_info.sql b/src_sql/view/vi_business_info.sql index 24c9248f9..142bd1300 100644 --- a/src_sql/view/vi_business_info.sql +++ b/src_sql/view/vi_business_info.sql @@ -1,10 +1,50 @@ -CREATE VIEW apzl.vi_business_info AS -(SELECT lci.id id,lci.project_id project_id,lci.PRODUCT_ID PRODUCT_ID,lci.flowunid flowunid,cs.business_status CONTRACT_STAT,lci.contract_no contract_no,lul.CUSTOMER_NAME CUSTOMER_NAME,lpi.project_no PROJECT_NO,lec.FRAME_NUMBER FRAME_NUMBER,lec.VNDR_NAME VNDR_NAME,lfi.APPLYPAY_DATE APPLYPAY_DATE,lci.PROJECT_DATE PROJECT_DATE -FROM lb_contract_info lci -LEFT JOIN (SELECT bs.contract_number,c.itemname business_status FROM business_status bs LEFT JOIN code_library c ON c.itemno = bs.business_status AND c.codeno = 'BusinessStatus' WHERE EXISTS(SELECT 1 FROM (SELECT contract_number,MAX(inputtime) AS inputtime FROM business_status GROUP BY contract_number) t WHERE t.contract_number = bs.contract_number AND inputtime = bs.inputtime)) cs ON cs.contract_number=lci.contract_no -LEFT JOIN lb_union_lessee lul ON lci.PROJECT_ID = lul.PROJECT_ID -LEFT JOIN lb_project_info lpi ON lpi.id=lci.project_id -LEFT JOIN lb_equipment_car lec ON lec.contract_id=lci.id -LEFT JOIN (SELECT flow_bussiness_object.contract_id AS contract_id,LEFT(flow_bussiness_object.InputTime,10) AS APPLYPAY_DATE FROM flow_bussiness_object WHERE (flow_bussiness_object.flow_name = '付款申请(汽车)') GROUP BY flow_bussiness_object.contract_id) lfi ON lci.ID = lfi.contract_id - WHERE lci.BUSINESSTYPE = '1' -); +DELIMITER $$ + +ALTER ALGORITHM=UNDEFINED DEFINER=`apzl`@`%` SQL SECURITY DEFINER VIEW `vi_business_info` AS ( +SELECT + `lci`.`ID` AS `id`, + `lci`.`PROJECT_ID` AS `project_id`, + `lci`.`PRODUCT_ID` AS `PRODUCT_ID`, + `lci`.`FLOWUNID` AS `flowunid`, + `cs`.`business_status` AS `CONTRACT_STAT`, + `lci`.`CONTRACT_NO` AS `contract_no`, + `lul`.`CUSTOMER_NAME` AS `CUSTOMER_NAME`, + `lpi`.`PROJECT_NO` AS `PROJECT_NO`, + `lec`.`FRAME_NUMBER` AS `FRAME_NUMBER`, + `lec`.`VNDR_NAME` AS `VNDR_NAME`, + `lfi`.`APPLYPAY_DATE` AS `APPLYPAY_DATE`, + `lci`.`PROJECT_DATE` AS `PROJECT_DATE` +FROM (((((`apzl`.`lb_contract_info` `lci` + LEFT JOIN (SELECT + `bs`.`contract_number` AS `contract_number`, + `c`.`itemname` AS `business_status` + FROM (`apzl`.`business_status` `bs` + LEFT JOIN `apzl`.`code_library` `c` + ON (((`c`.`itemno` = `bs`.`business_status`) + AND (`c`.`codeno` = 'BusinessStatus')))) + WHERE EXISTS(SELECT + 1 + FROM (SELECT + `apzl`.`business_status`.`contract_number` AS `contract_number`, + MAX(`apzl`.`business_status`.`inputtime`) AS `inputtime` + FROM `apzl`.`business_status` + GROUP BY `apzl`.`business_status`.`contract_number`) `t` + WHERE ((`t`.`contract_number` = `bs`.`contract_number`) + AND (`t`.`inputtime` = `bs`.`inputtime`)))) `cs` + ON ((`cs`.`contract_number` = `lci`.`CONTRACT_NO`))) + LEFT JOIN `apzl`.`lb_union_lessee` `lul` + ON ((`lci`.`PROJECT_ID` = `lul`.`PROJECT_ID`))) + LEFT JOIN `apzl`.`lb_project_info` `lpi` + ON ((`lpi`.`ID` = `lci`.`PROJECT_ID`))) + LEFT JOIN `apzl`.`lb_equipment_car` `lec` + ON ((`lec`.`CONTRACT_ID` = `lci`.`ID`))) + LEFT JOIN (SELECT + `apzl`.`flow_bussiness_object`.`contract_id` AS `contract_id`, + LEFT(`apzl`.`flow_bussiness_object`.`InputTime`,10) AS `APPLYPAY_DATE` + FROM `apzl`.`flow_bussiness_object` + WHERE (`apzl`.`flow_bussiness_object`.`flow_name` = '付款申请(汽车)') + GROUP BY `apzl`.`flow_bussiness_object`.`contract_id`) `lfi` + ON ((`lci`.`ID` = `lfi`.`contract_id`))) +WHERE (`lci`.`BUSINESSTYPE` = '1' AND lec.car_attribute='head'))$$ + +DELIMITER ; \ No newline at end of file diff --git a/src_sql/鎶曚骇SQL/v20200915/tft_20200915.sql b/src_sql/鎶曚骇SQL/v20200915/tft_20200915.sql index 9ac90860b..1c4b67f9b 100644 --- a/src_sql/鎶曚骇SQL/v20200915/tft_20200915.sql +++ b/src_sql/鎶曚骇SQL/v20200915/tft_20200915.sql @@ -118,7 +118,7 @@ INSERT INTO CODE_LIBRARY (CODENO, ITEMNO, ITEMNAME, BANKNO, SORTNO, ISINUSE, ITE INSERT INTO CODE_LIBRARY (CODENO, ITEMNO, ITEMNAME, BANKNO, SORTNO, ISINUSE, ITEMDESCRIBE, ITEMATTRIBUTE, RELATIVECODE,ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE5, ATTRIBUTE6, ATTRIBUTE7,ATTRIBUTE8, INPUTUSER, INPUTORG, INPUTTIME, UPDATEUSER, UPDATETIME, REMARK, HELPTEXT)VALUES ('sign_status', 'sign_status4', '签约失效', NULL, '0040', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, 'SYS_Designer', NULL, '2019/01/07 19:14:10', 'SYS_Designer', '2019/01/07 19:14:10', NULL, NULL); INSERT INTO CODE_LIBRARY (CODENO, ITEMNO, ITEMNAME, BANKNO, SORTNO, ISINUSE, ITEMDESCRIBE, ITEMATTRIBUTE, RELATIVECODE, ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE5, ATTRIBUTE6, ATTRIBUTE7, ATTRIBUTE8, INPUTUSER, INPUTORG, INPUTTIME, UPDATEUSER, UPDATETIME, REMARK, HELPTEXT) VALUES ('sign_status', 'sign_status5','正在签约', NULL, '0050', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'SYS_Designer', NULL, '2019/01/07 19:14:10', 'SYS_Designer', '2019/01/07 19:14:10', NULL, NULL); --- ==============================v2====================================== +-- ==============================二期二次更新 v2====================================== delete from PRD_NODEINFO where nodeid='11291' and nodename='租赁车辆基本信息'; insert into `PRD_NODEINFO` (`nodeid`, `nodename`, `sortno`, `isinuse`, `itemdescribe`, `inputuserid`, `inputorgid`, `inputtime`, `updateuserid`, `updatetime`, `initscript`, `exportscript`, `phasescript`, `deletescript`, `remark`, `formalClass`, `querycondition`) values('11291','租赁车辆基本信息','11291','1','/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentList.jsp','admin','80009000200010001','2018/01/31','administrator','2020/08/31',NULL,NULL,NULL,NULL,NULL,NULL,NULL); @@ -176,7 +176,6 @@ Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualn Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LBEquipmentInfoTemp_Cars','1480','1480','1','O','modelId','modelId','String','','车型ID','','1','Text','1','1','','','','32','0','0','0','1','0',0,'','','','SYS_Designer','2020/01/06 10:40:56','SYS_Designer','2020/08/31 21:44:48','0','','1','','','',''); - -- 修改历史数据车辆类型名称 UPDATE LB_EQUIPMENT_CAR_TEMP SET DEVICE_TYPE='轿车' WHERE DEVICE_TYPE='1'; UPDATE LB_EQUIPMENT_CAR_TEMP SET DEVICE_TYPE='越野车' WHERE DEVICE_TYPE='2'; @@ -312,6 +311,9 @@ Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualn Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LbEquipmentCarList','1590','1590','1','lclpit','is_delay','is_delay','String','','是否提交延迟申请','','1','Select','1','1','Code','YesNo','','32','1','0','0','1','0',0,'','','','SYS_Designer','2020/09/11 15:11:59','SYS_Designer','2020/09/11 15:16:22','0','','1','','','',''); Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LbEquipmentCarList','1630','1630','1','lclpit','delay_date','delay_date','String','','延迟申请日期','','1','Text','1','1','','','','32','1','0','0','1','0',0,'','','','SYS_Designer','2020/09/11 15:11:59','SYS_Designer','2020/09/11 15:11:59','','','1','','','',''); +-- 修改拍照管理页面路径 +delete from Code_Library where codeno='MortgageFileFlow0010' and itemno='0040'; +Insert Into Code_Library (codeno,itemno,itemname,bankno,sortno,isinuse,itemdescribe,itemattribute,relativecode,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,inputuser,inputorg,inputtime,updateuser,updatetime,remark,helptext) Values ('MortgageFileFlow0010','0040','牌照管理','','0040','1','/Tenwa/Lease/Flow/Comm/LBEquipment_Car/PayLBEquipmentList.jsp','','','','','','','','','','','SYS_Designer',null,'2018/09/27 11:20:48','SYS_Designer','2020/09/11 10:51:45','',''); -- 牌照管理模板修改查询条件 delete from AWE_DO_CATALOG where dono='LbCarLicensePlateInfoTemp'; Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('LbCarLicensePlateInfoTemp','牌照管理临时模板',null,'30',null,'1','2','default','jbo.com.tenwa.lease.comm.LB_CAR_LICENSE_PLATE_INFO_TEMP','O','O.flowunid=:FlowUnid and O.frame_number=:frameNumber','','','com.amarsoft.awe.dw.handler.impl.CommonHandler',null,'SYS_Designer','2018/08/09 19:23:31','SYS_Designer','2020/09/11 13:34:24','','1',''); @@ -334,14 +336,137 @@ delete from BF_LABLECONFIG where id='975294b526544d83b806e3fc2f99cd16'; insert into `BF_LABLECONFIG` (`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) values('975294b526544d83b806e3fc2f99cd16','00010','customer_info','C端回租','tag_type2','value_type3','CONTRACT_NO,BRAND,MODEL,VNDR_NAME,CAR_COLOUR,FRAME_NUMBER,ENGINE_NUMBER,FULLNAME,CERTID,mobile,fulladdress','SELECT \r\n lcit.CONTRACT_NO CONTRACT_NO,\r\n lect.BRAND BRAND,\r\n lect.MODEL MODEL,\r\n lect.VNDR_NAME VNDR_NAME,\r\n lect.CAR_COLOUR CAR_COLOUR,\r\n lect.FRAME_NUMBER FRAME_NUMBER,\r\n lect.ENGINE_NUMBER ENGINE_NUMBER,\r\n lult.CUSTOMER_NAME FULLNAME,\r\n :{certid} CERTID,\r\n :{mobile} mobile,\r\n :{address} fulladdress\r\nFROM\r\n LB_CONTRACT_INFO_TEMP lcit \r\n LEFT JOIN lb_union_lessee_temp lult \r\n ON lcit.FlowUnid = lult.flowunid \r\n LEFT JOIN LB_EQUIPMENT_CAR_TEMP lect \r\n ON lcit.flowunid = lect.FLOWUNID \r\nWHERE lcit.FlowUnid =:{FLOW_UNID} order by lect.inputtime limit 0,1',NULL,'N',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'word_default_class'); -- 添加导出配置 -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('03bfe750baf44391bd5db998456e4739','42223908127047f8ab57142dbb8d97a0','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('05d78a6c3dca4bf29e87f3eb18e5b09b','3eca9a300ba543eea8b6092a59d32e76','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('17ceb1904ad2440ab22004be904d3fee','bbe36e81f17542078489f223239e658a','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('20c694a539774d94b9ab692052185625','484815c4a7a14cf6bdbf69939e5b060e','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('62370924fef541259d7f10d8f9c3c322','975294b526544d83b806e3fc2f99cd16','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('752b439202894cf49aa73f2db293439e','9ba1a7844e4447fe9cb115323a37736f','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('f43c4d48ca2343f093900af881ba9a90','87e832695708478ead2acd3bcdb7a9a9','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('f5d8d2ba671e4e42a2f5e3937a3c8080','755698c1c27a43efa6c23310757c6163','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('f91300589f994439be7b8bee05906540','ced1455267d64183ba1b270a9eda6089','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('13221d9b6ffd4c30a1bfe5b584895955','ced1455267d64183ba1b270a9eda6089','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('2ae855da5125446b864aec4f6e9b2282','755698c1c27a43efa6c23310757c6163','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('4ec82fb5b3114be6bd816f279d5c2885','42223908127047f8ab57142dbb8d97a0','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('5eae21169a0443c7993126ab9879b936','3eca9a300ba543eea8b6092a59d32e76','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('922cba95cac94feb8c45db6346c0bb57','975294b526544d83b806e3fc2f99cd16','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('9c7629433dd04378a53de67a86bc2d78','87e832695708478ead2acd3bcdb7a9a9','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('ae48ae0866124ddfb6dfc3c2185c4c9d','9ba1a7844e4447fe9cb115323a37736f','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('bf075115bcd44016b6b4decafa6c789b','cee12914b9cf49bfaf5abf838ccdb56f','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('c427a92c76144ceba43f57b1d3807969','484815c4a7a14cf6bdbf69939e5b060e','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('f69932f70fe64332b4f4439761bf5055','bbe36e81f17542078489f223239e658a','93e4194efb604c71b394d902b2060da8',NULL,NULL,NULL,NULL,NULL,NULL); + +-- 修改批准函标签 +delete from BF_LABLECONFIG where ID='fd46596832164f39afc5b47e6711d1bd'; +insert into `BF_LABLECONFIG` (`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) values('fd46596832164f39afc5b47e6711d1bd','5000','LetterApproval','批准函标签','tag_type2','value_type3','customer_name,fullname,certid,MODEL,EQUIP_AMT,FIRST_PAYMENT,CLEAN_LEASE_MONEY,CAUTION_MONEY,GPS_FEE,INCOME_NUMBER,rent,DISTRIBUTOR_NAME,inputName,datetim,subjectnameone,subjectnametwo','SELECT lul.customer_name,vpci.fullname,vpci.certid,lec.MODEL,lpc.EQUIP_AMT,lpc.FIRST_PAYMENT,lpc.CLEAN_LEASE_MONEY,lpc.CAUTION_MONEY,lpc.GPS_FEE,lpc.INCOME_NUMBER,lrp.rent,di.DISTRIBUTOR_NAME,lpi.inputName,DATE_FORMAT(lpi.end_date,\'%Y年%m月%d日\') datetim,:{subjectnameone} subjectnameone,:{subjectnametwo} subjectnametwo FROM lb_union_lessee lul LEFT JOIN vi_personandcompany_info vpci ON lul.project_id=vpci.projectId LEFT JOIN LB_EQUIPMENT_CAR lec ON lec.project_id=lul.project_id LEFT JOIN lc_proj_condition lpc ON lpc.project_id=lul.project_id LEFT JOIN lc_proj_rent_plan lrp ON lrp.project_id=lul.project_id AND lrp.contract_id IS NULL AND lrp.plan_list=\'2\' LEFT JOIN lb_project_info lpi ON lpi.id=lul.project_id LEFT JOIN DISTRIBUTOR_INFO di ON di.distributor_no=lpi.distributor_id WHERE lul.project_id=:{PROJECTID}',NULL,'N',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +-- 租赁列表页面添加主体字段(生产已执行) +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LetterApprovaList','1260','1260','1','O','subjectid','subjectid','String','','主体id','','1','Text','1','1','','','','32','0','0','0','1','0',0,'','','','SYS_Designer','2020/09/18 15:38:46','SYS_Designer','2020/09/18 15:38:46','0','','1','','','',''); + +-- 将商务条件中的“还款日期”改为“预计还款日期” +delete from awe_do_library where dono='LoanSimulationBasicInfo' and colindex='01440'; +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LoanSimulationBasicInfo','01440','01440','1','O','DefaultDueDay','DefaultDueDay','String','','预计还款日期','','1','Select','1','1','Code','fixed_rent_day','',null,'1','0','1','1','0',0,'','cal_info','','SYS_Designer','2018/07/01 18:29:14','SYS_Designer','2020/09/21 13:32:44','0','','1','','','',''); + +-- 添加狮桥付款申请将合同文件带到资料清单中 +insert into `class_method` (`classname`, `methodname`, `methodtype`, `methoddescribe`, `returntype`, `methodargs`, `methodcode`, `inputuser`, `inputorg`, `inputtime`, `updateuser`, `updatetime`, `remark`) values('审批流程','狮桥付款申请将合同传入资料清单','Bizlet','狮桥付款申请将合同传入资料清单','String','String ObjectNo','com.tenwa.lease.flow.project.commbusiness.PaymentContractFileShiQiao','','','','','',''); +-- 付款申请添加初审脚本 +delete from FLOW_MODEL where FlowNo='FundPaymentCarFlow' and PhaseNo='0020'; +insert into `FLOW_MODEL` (`flowno`, `phaseno`, `phasetype`, `phasename`, `phasedescribe`, `phaseattribute`, `prescript`, `initscript`, `choicedescribe`, `choicescript`, `actiondescribe`, `actionscript`, `postscript`, `attribute1`, `attribute2`, `attribute3`, `attribute4`, `attribute5`, `attribute6`, `attribute7`, `attribute8`, `attribute9`, `attribute10`, `aaenabled`, `aapointinitscript`, `aapointcomp`, `aapointcompurl`, `standardtime1`, `standardtime2`, `costlob`, `strips`, `checklist`, `decisionscript`, `riskscanrule`, `buttonset2`, `inputuser`, `inputtime`, `updateuser`, `updatetime`, `distributerule`, `id`, `type`, `name`, `xcoordinate`, `ycoordinate`, `width`, `height`, `version`, `swimlane`, `nodetype`, `flowphasecontext`, `OPINIONSREQUIRED`, `isreadonly`, `flowpageconfig`, `flowprocessclass`, `flowpagecheck`, `backstepnexttype`, `backsteps`, `backscript`, `deletescript`, `phasescript`, `loadproductcheck`, `nextsteps`, `flowtiptype`, `remindnoticttype`, `flowoverdate`, `overnoticetype`, `overnoticeUser`) values('FundPaymentCarFlow','0020','1020','订单初审',NULL,NULL,'!审批流程.付款申请提交时自动删除GPS状态(#ObjectNo)+!审批流程.付款申请退回在提交标记(#ObjectNo)+!审批流程.狮桥付款申请将合同传入资料清单(#ObjectNo)','toStringArray(\"#PhaseAction\",\",\",\" \",1)',NULL,'commroute',NULL,'[{usertype:\"选择指定任务池角色\",userinfo:\"800R00000016,订单初审\"}]','#PhaseOpinion1','closePage,doSubmit,backStep,signOpinion',NULL,'all_except',NULL,NULL,NULL,'01',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'368','250','100','50','1',NULL,'TASK',NULL,'N','N','FundPaymentCarFlow010','Map paramMap=new HashMap();\r\nparamMap.put(\"TempletNo\", \"FlowPayDocList\");\r\nparamMap.put(\"isReview\", \"true\");\r\nTreeView.AddNodeUrlParam(\"投放资料清单\", paramMap);\r\nTreeView.updateNodeSetReadOnly(\"商务条件\",\"ReadOnly\");\r\nTreeView.addLastNodeByCode(\"11268\");\r\nTreeView.addBeforeNodeByCode(\"合同列表\",\"11532\");\r\nTreeView.deleteNode(\"扣款卡信息详情\");','','backnextperson',NULL,'!基础操作.接口平台业务退回审批意见推送入表(#ObjectNo)',NULL,NULL,'N','订单复审(0030)',NULL,NULL,NULL,NULL,NULL); + +-- 预审批功能信审、复审看全部数据 +delete from AWE_DO_CATALOG where dono='LbBeforeAppLicationList'; +Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('LbBeforeAppLicationList','预审批列表',null,'30',null,'1','1','default','jbo.com.tenwa.entity.comm.serialutil.LB_BEFORE_APPLICATION','O','1=1','','inputtime desc','','','SYS_Designer','2020/08/17 09:45:32','SYS_Designer','2020/09/22 10:10:19','','1',''); + +-- =========================== 3 +-- 修改短信模板调用时间展示格式 +delete from awe_do_library where dono='MsgTempletList' and colindex='1022'; +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('MsgTempletList','1022','1022','1','O','PREVIOUS_FIRE_TIME','PREVIOUS_FIRE_TIME','String','','调度上次执行时间','','1','Date','3','2','','','','255','0','0','0','1','0',1,'0','','','SYS_DESIGNER','2017/08/09 10:28:24','SYS_Designer','2020/09/23 16:01:31','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('MsgTempletList','1023','1023','1','','DataConversionManage.getTime(PREVIOUS_FIRE_TIME)','PREVIOUSTIME','String','','调度上次执行时间','','1','Date','3','2','','','','255','1','0','0','1','0',1,'0','','','SYS_Designer','2020/09/23 15:43:22','SYS_Designer','2020/09/23 15:50:46','0','','1','','','',''); +delete from awe_do_library where dono='MsgTempletList' and colindex='1024'; +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('MsgTempletList','1024','1024','1','O','NEXT_FIRE_TIME','NEXT_FIRE_TIME','String','','调度下次执行时间','','1','Date','3','2','','','','255','0','0','0','1','0',1,'0','','','SYS_DESIGNER','2017/08/09 10:28:24','SYS_Designer','2020/09/23 16:01:31','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('MsgTempletList','1025','1025','1','','DataConversionManage.getTime(NEXT_FIRE_TIME)','NEXTTIME','String','','调度下次执行时间','','1','Date','3','2','','','','255','1','0','0','1','0',1,'0','','','SYS_Designer','2020/09/23 15:56:29','SYS_Designer','2020/09/23 15:56:45','0','','1','','','',''); + +-- 租赁物中添加车辆属性字段 ;head 头. tail 尾 +Alter table lb_equipment_car add column car_attribute varchar(30) NULL COMMENT '车辆属性' after identify_code; +Alter table lb_equipment_car_his add column car_attribute varchar(30) NULL COMMENT '车辆属性' after identify_code; +Alter table lb_equipment_car_temp add column car_attribute varchar(30) NULL COMMENT '车辆属性' after identify_code; + +-- 修改历史数据 +update LB_EQUIPMENT_CAR_TEMP set car_attribute='head'; +update LB_EQUIPMENT_CAR set car_attribute='head'; +-- 租赁物列表添加车辆属性字段 +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LBEquipmentListTemp_Cars','0640','0640','1','O','car_attribute','car_attribute','String','','车辆属性','','1','Text','1','1','','','','30','0','0','0','1','0',0,'','','','SYS_Designer','2020/09/24 17:21:10','SYS_Designer','2020/09/24 17:21:10','0','','1','','','',''); + +-- 租赁详情页面添加车辆属性字段 +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LBEquipmentInfoTemp_Cars','1560','1560','1','O','car_attribute','car_attribute','String','','车辆属性','','1','Text','1','1','','','','30','0','0','0','1','0',0,'','','','SYS_Designer','2020/09/24 17:31:44','SYS_Designer','2020/09/24 17:31:44','0','','1','','','',''); + +-- 修改合同制作校验车架号风险预警 +delete from SCENARIO_MODEL where scenarioid='合同制作流程' and modelid='030003'; +Insert Into SCENARIO_MODEL (scenarioid,modelid,sortno,modelname,modeldescribe,modeltype,subtypeno,runcondition,status,nopassdeal,passdeal,passmessage,nopassmessage,executescript,remark,inputuser,inputorg,inputtime,updateuser,updatetime,groupid,modelkind,bizviewer) Values ('合同制作流程','030003','030003','租赁物信息','测试租赁物中的车架号','20','0300','','1','10','10','车架号已添加','请填写租赁物中的车架号','SELECT CASE WHEN FRAME_NUMBER IS NOT NULL THEN ''true'' ELSE ''false'' END FROM LB_EQUIPMENT_CAR_TEMP WHERE car_attribute=''head'' and flowunid=''#{ObjectNo}''','','administrator','8009001','2018/07/02 16:16:21','administrator','2018/07/02 16:20:16',null,null,null); + +-- 添加租金总额标签 +insert into `BF_LABLECONFIG` (`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) values('cee12914b9cf49bfaf5abf838ccdb56f','0030','rentData','租金总和','tag_type2','value_type3','sumrent,upsumrentrent,uprent,rent','select SUM(rent) sumrent,FUNC_CHANGETOCHINESEMONEY(SUM(rent)) upsumrentrent,FUNC_CHANGETOCHINESEMONEY(rent) uprent,rent rent from lc_rent_plan_temp where flowunid=:{FLOW_UNID}','','N','','','','','','','','word_default_class'); + +-- 修改联合租赁模板导出配置 +delete from bf_templatelable where TEMPLATEID='7ae245ef8b644b62a4658069adab6c32'; +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('1b022512c624434b944f47563e8a48a5','be101123ef74413eb0d8acad8b6b22b9','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('2d163b7bc7b042da83151c53d65f6676','9fd06315c45842699cabed15ed2ed7f9','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('68ee3251d36b4e6bb2a25115cb9638eb','755698c1c27a43efa6c23310757c6163','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('782861c28a53460e8babbc192308a216','9ba1a7844e4447fe9cb115323a37736f','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('87b11c0967a748808c4ea956f73f61ce','975294b526544d83b806e3fc2f99cd16','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('9687523ef1e04bbc809259d1bbc9fe68','bbe36e81f17542078489f223239e658a','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('981505dc548446c9acfdc99078048079','c901f36d5d4e48a89b66dd3bc736afac','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('c67f3d77ca5c41a3a7b2f4ab57f09fcc','ced1455267d64183ba1b270a9eda6089','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('cb87bf20fd7041a3be12a49635620457','484815c4a7a14cf6bdbf69939e5b060e','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); +insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('edf4b19d90694fd0a3290a8737342e5d','87e832695708478ead2acd3bcdb7a9a9','7ae245ef8b644b62a4658069adab6c32',NULL,NULL,NULL,NULL,NULL,NULL); + +-- 处理挂车历史数据(临时) +CREATE PROCEDURE proc_insert_car_temp() +begin + declare s_project_id varchar(255); + declare s_contract_id varchar(255); + declare s_FRAME_BRAND varchar(255); + declare s_FRAME_NUMBER2 varchar(255); + declare s_FRAME_COLOR varchar(255); + declare s_flowunid varchar(255); + declare s_frame_plateno varchar(255); + declare s_frame_regdate varchar(255); + declare s_frame_guided_price varchar(255); + + declare done int default 0; + declare cur cursor for select project_id,contract_id,FRAME_BRAND,FRAME_NUMBER2,FRAME_COLOR,flowunid,frame_plateno,frame_regdate,frame_guided_price from LB_EQUIPMENT_CAR_TEMP where FRAME_NUMBER2 is not null or FRAME_BRAND is not null or FRAME_COLOR is not null; + DECLARE EXIT HANDLER FOR NOT FOUND SET done = 1; + open cur; + repeat + fetch cur into s_project_id,s_contract_id,s_FRAME_BRAND,s_FRAME_NUMBER2,s_FRAME_COLOR,s_flowunid,s_frame_plateno,s_frame_regdate,s_frame_guided_price; + insert into LB_EQUIPMENT_CAR_TEMP(id,project_id,contract_id,BRAND,FRAME_NUMBER,CAR_COLOUR,flowunid,LICENSE_PLATE_NUMBER,regDate,NOW_TOTAL,INPUTTIME,car_attribute) + values (REPLACE(UUID(),'-',''),s_project_id,s_contract_id,s_FRAME_BRAND,s_FRAME_NUMBER2,s_FRAME_COLOR,s_flowunid,s_frame_plateno,s_frame_regdate,s_frame_guided_price,DATE_FORMAT (SYSDATE(),'%Y/%m/%d %H:%i:%s'),'tail'); + until done = 1 + end repeat; + close cur; +end + +call proc_insert_car_temp(); + +drop PROCEDURE proc_insert_car_temp; + +-- 处理挂车历史数据(正式) +CREATE PROCEDURE proc_insert_car_formal() +begin + declare s_project_id varchar(255); + declare s_contract_id varchar(255); + declare s_FRAME_BRAND varchar(255); + declare s_FRAME_NUMBER2 varchar(255); + declare s_FRAME_COLOR varchar(255); + declare s_frame_plateno varchar(255); + declare s_frame_regdate varchar(255); + declare s_frame_guided_price varchar(255); + + declare done int default 0; + declare cur cursor for select project_id,contract_id,FRAME_BRAND,FRAME_NUMBER2,FRAME_COLOR,frame_plateno,frame_regdate,frame_guided_price from LB_EQUIPMENT_CAR where FRAME_NUMBER2 is not null or FRAME_BRAND is not null or FRAME_COLOR is not null; + DECLARE EXIT HANDLER FOR NOT FOUND SET done = 1; + open cur; + repeat + fetch cur into s_project_id,s_contract_id,s_FRAME_BRAND,s_FRAME_NUMBER2,s_FRAME_COLOR,s_frame_plateno,s_frame_regdate,s_frame_guided_price; + insert into LB_EQUIPMENT_CAR(id,project_id,contract_id,BRAND,FRAME_NUMBER,CAR_COLOUR,LICENSE_PLATE_NUMBER,regDate,NOW_TOTAL,INPUTTIME,car_attribute) + values (REPLACE(UUID(),'-',''),s_project_id,s_contract_id,s_FRAME_BRAND,s_FRAME_NUMBER2,s_FRAME_COLOR,s_frame_plateno,s_frame_regdate,s_frame_guided_price,DATE_FORMAT (SYSDATE(),'%Y/%m/%d %H:%i:%s'),'tail'); + until done = 1 + end repeat; + close cur; +end + +call proc_insert_car_formal(); + +drop PROCEDURE proc_insert_car_formal; \ No newline at end of file diff --git a/src_sql/鎶曚骇SQL/v20200915/zhangbb0915-2.sql b/src_sql/鎶曚骇SQL/v20200915/zhangbb0915-2.sql index 00b0f3633..92e8e5701 100644 --- a/src_sql/鎶曚骇SQL/v20200915/zhangbb0915-2.sql +++ b/src_sql/鎶曚骇SQL/v20200915/zhangbb0915-2.sql @@ -109,10 +109,10 @@ create table `lc_split_occupy_process` ( -- 创建模板 delete from AWE_DO_CATALOG where dono='ViSplittingList'; delete from awe_do_library where dono='ViSplittingList'; -Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('ViSplittingList','分润支付计划表',null,'30',null,'1','1','default','jbo.app.tenwa.calc.VI_SPLITTING_PAY','O ','','','','',null,'SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','','0',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1010','1010','1','','com.amarsoft.dict.als.manage.NameManager.getDistributorNameById(distributor_id)','distributor_name','String','','渠道商','','1','Text','1','1','','','','20','1','0','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','0','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1020','1020','1','O','contract_no','contract_no','String','','合同编号','','1','Text','1','1','','','','32','1','0','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','0','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1030','1030','1','O','customer_name','customer_name','String','','客户名称','','1','Text','1','1','','','','20','1','0','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','0','','1','','','',''); +INSERT INTO AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) VALUES ('ViSplittingList','分润支付计划表',NULL,'30',NULL,'1','1','default','jbo.app.tenwa.calc.VI_SPLITTING_PAY','O ','','','','',NULL,'SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','','0',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1010','1010','1','O','distributor_name','distributor_name','String','','渠道商','','1','Text','1','1','','','','20','1','0','0','1','1',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/21 19:33:49','0','','1','','','','Like'); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1020','1020','1','O','contract_no','contract_no','String','','合同编号','','1','Text','1','1','','','','32','1','0','0','1','1',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/21 15:11:31','0','','1','','','','Like'); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1030','1030','1','O','customer_name','customer_name','String','','客户名称','','1','Text','1','1','','','','20','1','0','0','1','1',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','0','','1','','','','Like'); Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1050','1050','1','O','distributor_id','distributor_id','String','','经销商id','','1','Text','1','1','','','','20','0','0','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','0','','1','','','',''); Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1060','1060','1','O','plan_list','plan_list','String','','期次','','1','Text','1','1','','','','20','0','0','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','0','','1','','','',''); Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('ViSplittingList','1070','1070','1','O','sum_sp','sum_sp','String','','分润总金额','','1','Text','2','1','','','','20','1','0','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/10 14:19:04','','','1','','','',''); @@ -127,15 +127,15 @@ Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualn delete from AWE_DO_CATALOG where dono='SplittingChargeTempList'; delete from awe_do_library where dono='SplittingChargeTempList'; -Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('SplittingChargeTempList','分润支付临时表',null,'30',null,'1','1','default','jbo.com.tenwa.entity.comm.flow.LC_SPLITTING_PAY_TEMP','O left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lci on lci.id=O.contract_id LEFT JOIN jbo.app.tenwa.customer.DISTRIBUTOR_INFO di ON di.distributor_no = lci.distributor_id LEFT JOIN jbo.com.tenwa.lease.comm.LB_UNION_LESSEE lul ON lul.contract_id = lci.id and lul.is_main=''Y''','O.flowunid=:flowunid and O.plan_id is null','','','',null,'SYS_Designer','2020/09/07 21:05:13','SYS_Designer','2020/09/18 17:59:47','','1',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('SplittingChargeTempList','1010','1010','1','di','distributor_name','distributor_name','String','','渠道商','','1','Text','1','1','','','','20','1','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/09 09:53:45','0','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('SplittingChargeTempList','1020','1020','1','lci','contract_no','contract_no','String','','合同编号','','1','Text','1','1','','','','32','1','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/09 09:53:00','0','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('SplittingChargeTempList','1030','1030','1','lul','customer_name','customer_name','String','','客户名称','','1','Text','1','1','','','','20','1','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/09 09:53:00','0','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('SplittingChargeTempList','1050','1050','1','O','distributor_id','distributor_id','String','','经销商id','','1','Text','1','1','','','','20','0','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/09 09:53:00','0','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('SplittingChargeTempList','1060','1060','1','O','pay_list','pay_list','String','','支付期次','','1','Text','1','1','','','','20','1','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/09 09:59:17','0','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('SplittingChargeTempList','1080','1080','1','O','splitting_money','splitting_money','String','','支付金额','','1','Text','2','1','','','','20','1','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/09 09:53:00','','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('SplittingChargeTempList','1130','1055','1','O','pay_times','pay_times','String','','支付次数','','1','Text','1','1','','','',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/09/08 11:16:03','SYS_Designer','2020/09/09 09:53:00','','','1','','','',''); -Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('SplittingChargeTempList','1170','1170','1','O','contract_id','contract_id','String','','合同id','','1','Text','1','1','','','',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/09/08 13:56:58','SYS_Designer','2020/09/09 09:53:00','','','1','','','',''); +INSERT INTO AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) VALUES ('SplittingChargeTempList','分润支付临时表',NULL,'30',NULL,'1','1','default','jbo.com.tenwa.entity.comm.flow.LC_SPLITTING_PAY_TEMP','O left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lci on lci.id=O.contract_id LEFT JOIN jbo.app.tenwa.customer.DISTRIBUTOR_INFO di ON di.distributor_no = lci.distributor_id LEFT JOIN jbo.com.tenwa.lease.comm.LB_UNION_LESSEE lul ON lul.contract_id = lci.id and lul.is_main=''Y''','O.flowunid=:flowunid and O.plan_id is null','','','',NULL,'SYS_Designer','2020/09/07 21:05:13','SYS_Designer','2020/09/18 17:59:47','','1',''); +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('SplittingChargeTempList','1010','1010','1','di','distributor_name','distributor_name','String','','渠道商','','1','Text','1','1','','','','20','1','1','0','1','1',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/21 15:12:51','0','','1','','','','Like'); +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('SplittingChargeTempList','1020','1020','1','lci','contract_no','contract_no','String','','合同编号','','1','Text','1','1','','','','32','1','1','0','1','1',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/21 15:12:51','0','','1','','','','Like'); +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('SplittingChargeTempList','1030','1030','1','lul','customer_name','customer_name','String','','客户名称','','1','Text','1','1','','','','20','1','1','0','1','1',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/18 17:59:47','0','','1','','','','Like'); +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('SplittingChargeTempList','1050','1050','1','O','distributor_id','distributor_id','String','','经销商id','','1','Text','1','1','','','','20','0','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/18 17:59:47','0','','1','','','',''); +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('SplittingChargeTempList','1060','1060','1','O','pay_list','pay_list','String','','支付期次','','1','Text','1','1','','','','20','1','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/18 17:59:47','0','','1','','','',''); +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('SplittingChargeTempList','1080','1080','1','O','splitting_money','splitting_money','String','','支付金额','','1','Text','2','1','','','','20','1','1','0','1','0',1,'0','','','SYS_Designer','2020/09/07 20:59:59','SYS_Designer','2020/09/18 17:59:47','','','1','','','',''); +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('SplittingChargeTempList','1130','1055','1','O','pay_times','pay_times','String','','支付次数','','1','Text','1','1','','','',NULL,'1','1','0','1','0',0,'','','','SYS_Designer','2020/09/08 11:16:03','SYS_Designer','2020/09/18 17:59:47','','','1','','','',''); +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('SplittingChargeTempList','1170','1170','1','O','contract_id','contract_id','String','','合同id','','1','Text','1','1','','','',NULL,'0','1','0','1','0',0,'','','','SYS_Designer','2020/09/08 13:56:58','SYS_Designer','2020/09/18 17:59:47','','','1','','','',''); -- 菜单 Insert Into AWE_MENU_INFO (menuid,menuname,displayname,sortno,url,urlparam,target,style,isinuse,remark,inputorgid,inputuserid,inputtime,updateorgid,updateuserid,updatetime,accesstype,icon,appicon) Values ('980130','渠道商返佣配置','渠道商返佣配置','980130','/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/CommissionChargeConfigList.jsp','isCache=false','_self','','1','','','','','','SYS_Designer','2020/09/01 14:33:55','10','',''); @@ -164,4 +164,8 @@ ALTER TABLE lc_calc_condition ADD INDEX idx_contract_id(CONTRACT_ID); delete from AWE_DO_CATALOG where dono='LCSplittingPayTempList'; Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('LCSplittingPayTempList','分润支付临时表',null,'30',null,'1','1','default','jbo.com.tenwa.entity.comm.flow.LC_SPLITTING_PAY_TEMP','O left join jbo.app.tenwa.calc.LC_RENT_PLAN lrp ON lrp.id=O.plan_id left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lci on lci.id=lrp.contract_id LEFT JOIN jbo.app.tenwa.customer.DISTRIBUTOR_INFO di ON di.distributor_no = lci.distributor_id LEFT JOIN jbo.com.tenwa.lease.comm.LB_UNION_LESSEE lul ON lul.contract_id = lci.id LEFT JOIN jbo.app.tenwa.customer.CUSTOMER_INFO ci ON lul.CUSTOMER_ID = ci.customerid ','O.flowunid=:flowunid and O.plan_id is not null','','lrp.contract_id,lrp.plan_list','',null,'SYS_Designer','2019/12/07 11:38:51','SYS_Designer','2020/09/18 17:58:50','','1',''); --- +-- 修改分润配置页面bug + +delete from AWE_DO_CATALOG where dono='SplittingRatioInfo'; +Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('SplittingRatioInfo','产品分润配置',null,'30',null,'1','1','default','jbo.prd.LB_SPLITTING_RATIO','O','ID=:ID','','','',null,'SYS_Designer','2019/08/24 10:17:38','SYS_Designer','2020/09/23 11:33:10','','1',''); + diff --git a/src_tenwa/com/tenwa/flow/rent/copyrent/InsertRentPlanStatus.java b/src_tenwa/com/tenwa/flow/rent/copyrent/InsertRentPlanStatus.java index cbfc8b99b..4ff7512bf 100644 --- a/src_tenwa/com/tenwa/flow/rent/copyrent/InsertRentPlanStatus.java +++ b/src_tenwa/com/tenwa/flow/rent/copyrent/InsertRentPlanStatus.java @@ -1,52 +1,53 @@ -package com.tenwa.flow.rent.copyrent; -import java.math.BigDecimal; -import java.util.List; - -import jbo.app.tenwa.calc.LC_RENT_INCOME; -import jbo.app.tenwa.calc.LC_RENT_INCOME_TEMP; -import jbo.app.tenwa.calc.LC_RENT_PLAN; -import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO; -import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.awe.util.Transaction; -import com.tenwa.collectaudit.cache.CollectAuditInfoCache; -import com.tenwa.flow.baseBussion.BaseBussiness; - -public class InsertRentPlanStatus extends BaseBussiness{ - public Object run(Transaction Sqlca) throws Exception{ - this.initBussinessParam(Sqlca.getTransaction()); - String flowunid = (String)this.getAttribute("ObjectNo"); - - List boLRITs=JBOFactory.createBizObjectQuery(LC_RENT_INCOME_TEMP.CLASS_NAME,"flowunid=:flowunid").setParameter("flowunid", flowunid).getResultList(false); - BizObjectManager bomLRP = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME, Sqlca.getTransaction()); - - CollectAuditInfoCache calc = new CollectAuditInfoCache(); - for(int i=0;i boLRITs=JBOFactory.createBizObjectQuery(LC_RENT_INCOME_TEMP.CLASS_NAME,"flowunid=:flowunid").setParameter("flowunid", flowunid).getResultList(false); + BizObjectManager bomLRP = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME, Sqlca.getTransaction()); + CollectAuditInfoCache calc = new CollectAuditInfoCache(); + for(int i=0;i'代偿' or collect_status is null)") + .setParameter("CONTRACT_ID", contractId).setParameter("PLAN_LIST", planList).executeUpdate(); + }else{ + bomLRP.createQuery("update O set COLLECT_STATUS='网银收款',COLLECT_MSG='网银收款' where CONTRACT_ID=:CONTRACT_ID and PLAN_LIST=:PLAN_LIST") + .setParameter("CONTRACT_ID", contractId).setParameter("PLAN_LIST", planList).executeUpdate(); + } + } + String sMessage="true"; + return sMessage; + } +} diff --git a/src_tenwa/com/tenwa/httpclient/pypafhtml/PyHtmlContent.java b/src_tenwa/com/tenwa/httpclient/pypafhtml/PyHtmlContent.java index 46b22629c..06af616aa 100644 --- a/src_tenwa/com/tenwa/httpclient/pypafhtml/PyHtmlContent.java +++ b/src_tenwa/com/tenwa/httpclient/pypafhtml/PyHtmlContent.java @@ -1,1203 +1,1203 @@ -package com.tenwa.httpclient.pypafhtml; - import com.alibaba.fastjson.JSONArray; - import com.alibaba.fastjson.JSONObject; - import com.google.common.collect.Lists; - - import java.text.ParseException; - import java.text.SimpleDateFormat; - import java.util.ArrayList; - import java.util.Date; - import java.util.List; - -public class PyHtmlContent { - /** - * 统计时间段:1-近1年、2-近2年、3-近5年、4-历史 - * 数据库表名和列字段对应关系 - */ - public enum JudicialXZCountTypeEnums{ - taxPunishCount("taxPunishCount","税务处罚事件数量"), - marketPunishCount("marketPunishCount","市场监管处罚事件数量"), - customsPunishCount("customsPunishCount","海关处罚事件数量"), - environmentPunishCount("environmentPunishCount","环保处罚事件数量"), - otherPunishCount("otherPunishCount","其他行政处罚事件数量"), - punishTotalCount("punishTotalCount","(行政处罚事件)合计"); - - private String code; //类型 - private String desc; //描述 - - private JudicialXZCountTypeEnums(String code, String desc){ - this.code=code; - this.desc=desc; - } - public String getDesc() { - return desc; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(JudicialXZCountTypeEnums data : JudicialXZCountTypeEnums.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getDesc(); - } - } - return null; - } - } - - /** - * 统计时间段:1-近1年、2-近2年、3-近5年、4-历史 - * 数据库表名和列字段对应关系 - */ - public enum JudicialSFCountTypeEnums{ - civilCaseCount("civilCaseCount","民事案件被告风险事件数量"), - criminalCaseCount("criminalCaseCount","刑事案件被告风险事件数量"), - judicialCount("judicialCount","司法被执行人风险事件数量"), - endCaseCount("endCaseCount","终本案件风险事件数量"), - breakFaithCount("breakFaithCount","失信被执行人风险事件数量"), - judicialTotalCount("judicialTotalCount","(司法涉诉风险事件)合计"); - - private String code; //类型 - private String desc; //描述 - - private JudicialSFCountTypeEnums(String code, String desc){ - this.code=code; - this.desc=desc; - } - public String getDesc() { - return desc; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(JudicialSFCountTypeEnums data : JudicialSFCountTypeEnums.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getDesc(); - } - } - return null; - } - } - - /** - * 统计时间段:1-近1年、2-近2年、3-近5年、4-历史 - * 数据库表名和列字段对应关系 - */ - public enum JudicialRiskTimeLengthEnums{ - Length_1("1","oneYearCount"), - Length_2("2","twoYearCount"), - Length_3("3","fiveYearCount"), - Length_4("4","historyYearCount"); - - private String code; //类型 - private String desc; //描述 - - private JudicialRiskTimeLengthEnums(String code, String desc){ - this.code=code; - this.desc=desc; - } - public String getDesc() { - return desc; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(JudicialRiskTimeLengthEnums data : JudicialRiskTimeLengthEnums.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getDesc(); - } - } - return null; - } - } - - /** - * 1:正常在用 2: 停机 3:未启用 4:已销号 6:预销号该值可能为空 - * 数据库表名和列字段对应关系 - */ - public enum MobileStsEnums{ - Sts_1("1","正常在用"), - Sts_2("2","停机"), - Sts_3("3","未启用"), - Sts_4("4","已销号"), - Sts_6("6","预销号该值可能为空"); - - private String code; //类型 - private String desc; //描述 - - private MobileStsEnums(String code, String desc){ - this.code=code; - this.desc=desc; - } - public String getDesc() { - return desc; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(MobileStsEnums data : MobileStsEnums.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getDesc(); - } - } - return null; - } - } - //1:不足3个月 2:3-6个月 3:6-12个月 4:12-24个月 5:24个月 - /** - * 数据库表名和列字段对应关系 - */ - public enum MobileTimeLengthEnums{ - Length_1("1","不足3个月"), - Length_2("2","3-6个月"), - Length_3("3","6-12个月"), - Length_4("4","12-24个月"), - Length_5("5","24个月"); - - private String code; //类型 - private String desc; //描述 - - private MobileTimeLengthEnums(String code, String desc){ - this.code=code; - this.desc=desc; - } - public String getDesc() { - return desc; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(MobileTimeLengthEnums data : MobileTimeLengthEnums.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getDesc(); - } - } - return null; - } - } - - /** - * 数据库表名和列字段对应关系 - */ - public enum MobileOperatorEnums{ - DX("1","中国电信"), - YD("2","中国移动"), - LT("3","中国联通"); - - private String code; //类型 - private String desc; //描述 - - private MobileOperatorEnums(String code, String desc){ - this.code=code; - this.desc=desc; - } - public String getDesc() { - return desc; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(MobileOperatorEnums data : MobileOperatorEnums.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getDesc(); - } - } - return null; - } - } - - /** - * 数据库表名和列字段对应关系 - */ - public enum PafEnums{ - personAntiFraudDescInfo("personAntiFraudDescInfo","欺诈风险汇总", PyHtmlContent.personAntiFraudDescInfo), - personAntiFraudScoreInfo("personAntiFraudScoreInfo","欺诈风险指数", PyHtmlContent.personAntiFraudScoreInfo), - personBaseInfo("personBaseInfo","身份信息校验", PyHtmlContent.personBaseInfo), - policeCheckInfo("policeCheckInfo","身份认证结果", PyHtmlContent.policeCheckInfo), - mobileCheckInfo("mobileCheckInfo","手机号信息校验", PyHtmlContent.mobileCheckInfo), - mobileStatusInfo("mobileStatusInfo","手机号码时长", PyHtmlContent.mobileStatusInfo), - personRiskRosterInfo("personRiskRosterInfo","命中名单", PyHtmlContent.personRiskRosterInfo), - personJudicialSFRiskInfo("personJudicialSFRiskInfo","司法查询", PyHtmlContent.personJudicialSFRiskInfo), - personJudicialXZRiskInfo("personJudicialXZRiskInfo","行政查询", PyHtmlContent.personJudicialXZRiskInfo); - - private String code; //类型 - private String htmlContent; //类型 - private String desc; //描述 - - private PafEnums(String code, String desc, String htmlContent){ - this.code=code; - this.desc=desc; - this.htmlContent=htmlContent; - } - public String getDesc() { - return desc; - } - public String getHtmlContent() { - return htmlContent; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(PafEnums data : PafEnums.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getHtmlContent(); - } - } - return null; - } - } - - /** - * 数据库表名和列字段对应关系 - */ - public enum PersonAntiFraudDescInfoEnums{ - antiFraudScore("antiFraudScore","欺诈风险指数"), - antiFraudScoreRiskLevel("antiFraudScoreRiskLevel","欺诈风险指数风险等级"), - policeCheckRiskLevel("policeCheckRiskLevel","身份认证结果风险等级"), - policeCheckDesc("policeCheckDesc","身份认证结果"), - mobileCheckRiskLevel("mobileCheckRiskLevel","手机号码核查结果风险等级"), - mobileCheckDesc("mobileCheckDesc","手机号码核查结果"), - mobileStatusRiskLevel("mobileStatusRiskLevel","手机号码状态及在网时长结果风险等级"), - mobileStatusDesc("mobileStatusDesc","手机号码状态及在网时长结果"), - riskRosterRiskLevel("riskRosterRiskLevel","风险名单结果风险等级"), - riskRosterDesc("riskRosterDesc","风险名单结果"), - judicialRiskLevel("judicialRiskLevel","司法风险结果风险等级"), - judicialRiskDesc("judicialRiskDesc","司法风险结果"); - - private String code; //类型 - private String desc; //描述 - - private PersonAntiFraudDescInfoEnums(String code, String desc){ - this.code=code; - this.desc=desc; - } - public String getDesc() { - return desc; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(PersonAntiFraudDescInfoEnums data : PersonAntiFraudDescInfoEnums.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getDesc(); - } - } - return null; - } - } - - /** - * 数据库表名和列字段对应关系 - */ - public enum RiskType{ - risk_000("000","未命中风险名单"), - risk_101("101","疑似欺诈风险"), - risk_102("102","疑似营销套利"), - risk_201("201","疑似身份造假"), - risk_202("202","疑似资料造假"), - risk_203("203","疑似盗号风险"), - risk_301("301","刑事被告"), - risk_302("302","民事被告"), - risk_303("303","司法被执行人"), - risk_304("304","终本案件人员"), - risk_305("305","司法失信人员"), - risk_306("306","行政处罚人员"), - risk_999("999","其他风险"); - - private String code; //类型 - private String desc; //描述 - - private RiskType(String code, String desc){ - this.code=code; - this.desc=desc; - } - public String getDesc() { - return desc; - } - - public String getCode() { - return this.code; - } - - /** - * 根据code 数据库表名的列字段 - * @param code - * @return - */ - public static String getValueData(String code){ - for(RiskType data : RiskType.values()){ - if(data.getCode().toLowerCase().equals(code.toLowerCase())){ - return data.getDesc(); - } - } - return "未命中风险名单"; - } - } - - /** - * 内容开始部分 - * @param obj - * @return - */ - public static String createBodyHead(JSONObject obj) throws ParseException { - StringBuilder sb = new StringBuilder(); - String bodyTitle = title; - bodyTitle = bodyTitle.replace("reportID", obj.getString("reportID")); - sb.append(bodyTitle); - String bodyQueryConditions = queryConditions; - JSONObject queryConditionsObj = obj.getJSONObject("queryConditionsObj"); - bodyQueryConditions = bodyQueryConditions.replace("name", queryConditionsObj.getString("name")); - bodyQueryConditions = bodyQueryConditions.replace("documentNo", queryConditionsObj.getString("documentNo")); - bodyQueryConditions = bodyQueryConditions.replace("unitName", obj.getString("unitName")); - bodyQueryConditions = bodyQueryConditions.replace("queryUserID", obj.getString("queryUserID")); - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); - Date birDate = sdf.parse(obj.getString("receiveTime").substring(0, 8)); - SimpleDateFormat sdfRes = new SimpleDateFormat("yyyy年MM月dd日"); - String birStr = sdfRes.format(birDate); - bodyQueryConditions = bodyQueryConditions.replace("receiveTime", birStr); - sb.append(bodyQueryConditions); - String bodyBContentPafQuery = bodyContentPafQuery; - bodyBContentPafQuery = bodyBContentPafQuery.replace("phone", queryConditionsObj.getString("phone")); - sb.append(bodyBContentPafQuery); - return sb.toString(); - } - - public static String title = " reportID" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" ; - - public static String queryConditions = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + -// " \n" + - " \n" + - " \n" + -// " \n" + - " \n" + - " \n" + - " \n" + - " \n" + -// " \n" + - " \n" + - " \n" + -// " \n" + - " \n" + - " \n" + - " \n" + - " \n" + -// " \n" + - " \n" + - " \n" + - "
姓名name熊海查询时间receiveTime2020年07月28日
证件号码documentNo360123*********978操作员queryUserIDapwsqueryn
查询机构unitName安鹏融资租赁(天津)有限公司
\n" + - " \n" ; - - //反欺诈附件条件 - public static String bodyContentPafQuery = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
反欺诈分析附加条件
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
手机号码phone
\n" + - " \n" ; - - - public static String contentError = "errorMessage "; - public static String contentEmpty = " errorMessage "; - - - /** - * 反欺诈信息汇总 - * @param obj - * @return - */ - private static String createBaseContent(String key, String content, JSONObject obj) throws ParseException { - String bodyContentError = contentError; - String bodyContentEmpty = contentEmpty; - String bodyContent = content; - String subContent = ""; - String jsonKey = key; - if("personJudicialSFRiskInfo".equals(key) || "personJudicialXZRiskInfo".equals(key)){ - jsonKey = "personJudicialRiskInfo"; - } - JSONObject keyObj = obj.getJSONObject(jsonKey); - String errorMessage = ""; - if(keyObj.containsKey("errorMessage")){ - errorMessage = keyObj.getString("errorMessage"); - } - if("3".equals(keyObj.getString("treatResult"))){//系统错误,默认包含细节 - if(null == errorMessage || "".equals(errorMessage)){ - errorMessage = "系统错误。"; - } - bodyContentError = bodyContentError.replace("errorMessage", errorMessage); - subContent = bodyContentError; - }else{//如果包含细节 - subContent = createBodyContentDes(key, obj); - } - if(null == subContent || "".equals(subContent.toString())){ - subContent = bodyContentEmpty.replace("errorMessage", "根据已提供的查询条件,未能在系统中查得相关信息。"); - } - bodyContent = bodyContent.replace("subContent", subContent); - return bodyContent; - } - - - - /** - * - * @param obj - * @return - */ - public static String createBodyContent(JSONObject obj) throws ParseException { - StringBuilder sb = new StringBuilder(); - for(PafEnums pe : PafEnums.values()){ - String jsonKey = pe.getCode(); - if("personJudicialSFRiskInfo".equals(pe.getCode()) || "personJudicialXZRiskInfo".equals(pe.getCode())){ - jsonKey = "personJudicialRiskInfo"; - } - JSONObject keyObj = obj.getJSONObject(jsonKey); - String treatResult = keyObj.getString("treatResult"); - //是否包含细节内容 - boolean addContentB = false; - List resKeyArr = - Lists.newArrayList("subReportType", "subReportTypeCost", "treatResult", "treatErrorCode", "errorMessage"); - for(String keyRes : keyObj.keySet()){ - if(!resKeyArr.contains(keyRes) || "3".equals(treatResult)){ - addContentB = true; - } - } - if(addContentB){ - String content = createBaseContent(pe.getCode(), pe.getHtmlContent(), obj); - sb.append(content); - } - } - return sb.toString(); - } - - /** - * 反欺诈信息汇总 - * @param obj - * @return - */ - private static String createPafDescContent(String key, JSONObject obj){ - String bodyPersonAntiFraudDescInfoContent = personAntiFraudDescInfoContent; - JSONObject subObj = obj.getJSONObject(key); - // TODO: 2020/7/29 增加判断空 antiFraudScore - String antiFraudScore = subObj.getString("antiFraudScore"); - bodyPersonAntiFraudDescInfoContent = bodyPersonAntiFraudDescInfoContent.replace("antiFraudScore", subObj.getString("antiFraudScore")); - StringBuilder sbContent = new StringBuilder(); - for(PersonAntiFraudDescInfoEnums pe : PersonAntiFraudDescInfoEnums.values()){ - if(null != subObj.getString(pe.getCode()) - && !"".equals(subObj.getString(pe.getCode()))){ - String subContent = personAntiFraudDescInfoContentItem; - String imgStatus = "image_success"; - // TODO: 2020/7/29 如果包含 不正常 高风险 则改为 imgage_error - String result = subObj.getString(pe.getCode()); - if("antiFraudScore".equals(pe.getCode())) { - if(Integer.parseInt(result) > 500){ - imgStatus = "image_error"; - } - }else if("policeCheckDesc".equals(pe.getCode())){ - String resPre = subObj.getString("policeCheckRiskLevel"); - if(resPre.contains("高风险")){ - imgStatus = "image_error"; - }else if(resPre.contains("中风险")){ - imgStatus = "image_warn"; - } - }else if("mobileCheckDesc".equals(pe.getCode())){ - String resPre = subObj.getString("mobileCheckRiskLevel"); - if(resPre.contains("高风险")){ - imgStatus = "image_error"; - }else if(resPre.contains("中风险")){ - imgStatus = "image_warn"; - } - }else if("mobileStatusDesc".equals(pe.getCode())){ - String resPre = subObj.getString("mobileStatusRiskLevel"); - if(resPre.contains("高风险")){ - imgStatus = "image_error"; - }else if(resPre.contains("中风险")){ - imgStatus = "image_warn"; - } - }else if("judicialRiskDesc".equals(pe.getCode())){ - String resPre = subObj.getString("judicialRiskLevel"); - if(resPre.contains("高风险")){ - imgStatus = "image_error"; - }else if(resPre.contains("中风险")){ - imgStatus = "image_warn"; - } - }else if("riskRosterDesc".equals(pe.getCode())){ - if(!"未命中风险名单".equals(result)){ - imgStatus = "image_error"; - } - } - if(result.contains("高风险")){ - imgStatus = "image_error"; - } - String pafDesc = pe.getDesc() + ":" + subObj.getString(pe.getCode()); - subContent = subContent.replace("image_status", imgStatus); - subContent = subContent.replace("pafDesc", pafDesc); - sbContent.append(subContent); - } - } - bodyPersonAntiFraudDescInfoContent = bodyPersonAntiFraudDescInfoContent.replace("contentItem", sbContent.toString()); - return bodyPersonAntiFraudDescInfoContent; - } - - //反欺诈分析综述 - public static String personAntiFraudDescInfoContentItem = - "
pafDesc
"; - - //反欺诈分析综述 - public static String personAntiFraudDescInfoContent = - " \n" + - " 欺诈风险指数为 antiFraudScore 分 \n" + - " \n" + - " \n" + - " contentItem \n" + - " \n" ; - //反欺诈分析综述 - public static String personAntiFraudDescInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
反欺诈分析综述
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " subContent \n" + - "
\n" + - " \n" ; - - /** - * 反欺诈指数 - * @param obj - * @return - */ - private static String createPersonAntiFraudScoreInfoContent(String key, JSONObject obj){ - String bodyPersonAntiFraudScoreInfoContent = personAntiFraudScoreInfoContent; - JSONObject subObj = obj.getJSONObject(key); - bodyPersonAntiFraudScoreInfoContent = bodyPersonAntiFraudScoreInfoContent.replace("riskScore", subObj.getString("riskScore")); - bodyPersonAntiFraudScoreInfoContent = bodyPersonAntiFraudScoreInfoContent.replace("riskLevel", subObj.getString("riskLevel")); - bodyPersonAntiFraudScoreInfoContent = bodyPersonAntiFraudScoreInfoContent.replace("hitTypes", subObj.getString("hitTypes")); - return bodyPersonAntiFraudScoreInfoContent; - } - - //反欺诈分析指数 - public static String personAntiFraudScoreInfoContent = - " 欺诈风险指数为 riskScore 分 \n" + - "欺诈风险等级为 riskLevel \n" + - " 欺诈风险标签为 hitTypes \n" ; - - //反欺诈分析指数【图片删掉】 - public static String personAntiFraudScoreInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
欺诈风险指数
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " subContent \n" + - "
\n" + - " \n" ; - - /** - * 证件号码校验信息 - * @param obj - * @return - */ - private static String createPersonBaseInfoContent(String key, JSONObject obj) throws ParseException { - String bodyPersonBaseInfoContent = personBaseInfoContent; - JSONObject subObj = obj.getJSONObject(key); - bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("docNo", subObj.getString("docNo")); - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); - Date birDate = sdf.parse(subObj.getString("birthday")); - SimpleDateFormat sdfRes = new SimpleDateFormat("yyyy年MM月dd日"); - String birStr = sdfRes.format(birDate); - bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("birthday", birStr); - String genderId = subObj.getString("genderID"); - if("1".equals(genderId)){ - genderId = "男"; - }else if("2".equals(genderId)){ - genderId = "女"; - }else if("3".equals(genderId)){ - genderId = "不详"; - } - bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("genderID", genderId); - bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("age", subObj.getString("age")); - bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("originalAddress", subObj.getString("originalAddress")); - bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("verifyResult", "1".equals(subObj.getString("verifyResult")) ? "通过" : "未通过"); - return bodyPersonBaseInfoContent; - } - - //证件号码校验信息 - public static String personBaseInfoContent = - " \n" + - " 证件号码 \n" + - " docNo \n" + - " 出生日期 \n" + - " birthday \n" + - " \n" + - " \n" + - " 性别 \n" + - " genderID \n" + - " 年龄 \n" + - " age \n" + - " \n" + - " \n" + - " 原始发证地区 \n" + - " originalAddress \n" + - " \n" + - " \n" + - " 证件校验结果 \n" + - " verifyResult \n" + - " \n" ; - - //证件号码校验信息 - public static String personBaseInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
证件号码校验信息
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " subContent \n" + - "
\n" + - " \n"; - - - /** - * 证件号码校验信息 - * @param obj - * @return - */ - private static String createPoliceCheckInfoContent(String key, JSONObject obj){ - StringBuilder sb = new StringBuilder(); - JSONObject arrObj = obj.getJSONObject(key); - JSONArray subArr = arrObj.getJSONArray("item"); - for(int i = 0; i < subArr.size(); i++){ - JSONObject subObj = subArr.getJSONObject(i); - String bodyPoliceCheckInfoContent = policeCheckInfoContent; - bodyPoliceCheckInfoContent = bodyPoliceCheckInfoContent.replace("result", - "1".equals(subObj.getString("result")) ? "一致" : "不一致"); - sb.append(bodyPoliceCheckInfoContent); - } - return sb.toString(); - } - - //证件号码认证结果 - public static String policeCheckInfoContent = - " \n" + - " 身份认证结果 \n" + - " result \n" + - " \n" ; - - //证件号码认证结果 - public static String policeCheckInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
身份认证
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " subContent \n" + - "
\n" + - " \n"; - - /** - * 手机号码校验信息结果 - * @param obj - * @return - */ - private static String createMobileCheckInfoContent(String key, JSONObject obj){ - StringBuilder sb = new StringBuilder(); - JSONObject arrObj = obj.getJSONObject(key); - JSONArray subArr = arrObj.getJSONArray("item"); - for(int i = 0; i < subArr.size(); i++){ - JSONObject subObj = subArr.getJSONObject(i); - String bodyMobileCheckInfoContent = mobileCheckInfoContent; - bodyMobileCheckInfoContent = bodyMobileCheckInfoContent.replace("checkResult", subObj.getString("checkResult")); - bodyMobileCheckInfoContent = bodyMobileCheckInfoContent.replace("areaInfo", subObj.getString("areaInfo")); - bodyMobileCheckInfoContent = bodyMobileCheckInfoContent.replace("operator", MobileOperatorEnums.getValueData(subObj.getString("operator"))); - sb.append(bodyMobileCheckInfoContent); - } - return sb.toString(); - } - - - //手机号码校验信息结果 - public static String mobileCheckInfoContent = - " \n" + - " 运营商名称 \n" + - " operator \n" + - " \n" + - " \n" + - " 手机号码归属地 \n" + - " areaInfo \n" + - " \n" + - " \n" + - " 手机认证结果 \n" + - " checkResult \n" + - " \n" ; - //手机号码校验信息结果 - public static String mobileCheckInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
手机认证
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " subContent \n" + - "
\n" + - " \n"; - - /** - * 手机号码在线时长 - * @param obj - * @return - */ - private static String createMobileStatusInfoContent(String key, JSONObject obj){ - StringBuilder sb = new StringBuilder(); - JSONObject arrObj = obj.getJSONObject(key); - JSONArray subArr = arrObj.getJSONArray("item"); - for(int i = 0; i < subArr.size(); i++){ - JSONObject subObj = subArr.getJSONObject(i); - String bodyMobileStatusInfoContent = mobileStatusInfoContent; - bodyMobileStatusInfoContent = bodyMobileStatusInfoContent.replace("timeLength", MobileTimeLengthEnums.getValueData(subObj.getString("timeLength"))); - bodyMobileStatusInfoContent = bodyMobileStatusInfoContent.replace("phoneStatus", MobileStsEnums.getValueData(subObj.getString("phoneStatus"))); - sb.append(bodyMobileStatusInfoContent); - } - return sb.toString(); - } - - - //手机号码在线时长 - public static String mobileStatusInfoContent = - " \n" + - " 手机号码状态 \n" + - " phoneStatus \n" + - " \n" + - " \n" + - " 手机号码在网时长 \n" + - " timeLength \n" + - " \n" ; - - //手机号码在线时长 - public static String mobileStatusInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
手机号码状态时长
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - - " subContent \n" + - "
\n" + - " \n"; - - - /** - * 风险名单命中结果 - * @param obj - * @return - */ - private static String createPersonRiskRosterInfoContent(String key, JSONObject obj){ - String bodyPersonRiskRosterInfoContent = personRiskRosterInfoContent; - JSONObject subObj = obj.getJSONObject(key); - StringBuilder sb = new StringBuilder(); - // TODO: 2020/7/29 判断为空 - String[] riskTypes = subObj.getString("riskTypes").split(","); - for(String riskType : riskTypes){ - sb.append(RiskType.getValueData(riskType) + ", "); - } - String risk = sb.toString(); - risk = risk.substring(0, risk.length() - 2); - bodyPersonRiskRosterInfoContent = bodyPersonRiskRosterInfoContent.replace("riskTypes", risk); - return bodyPersonRiskRosterInfoContent; - } - - //风险名单命中结果 - public static String personRiskRosterInfoContent = - " \n" + - " 命中风险类型 \n" + - " riskTypes \n" + - " \n" ; - - //风险名单命中结果 - public static String personRiskRosterInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
风险名单
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " subContent \n" + - "
\n" + - " \n"; - - - /** - * 风险名单命中结果 - * @param obj - * @return - */ - private static String createPersonJudicialSFRiskInfoContent(String key, JSONObject obj){ - String bodyPersonJudicialRiskInfoContentSFItem = personJudicialRiskInfoContent; - String tail = ""; - //obj转换 - JSONObject resObj = new JSONObject(); - JSONObject civilCaseCount = new JSONObject(); - JSONObject criminalCaseCount = new JSONObject(); - JSONObject judicialCount = new JSONObject(); - JSONObject endCaseCount = new JSONObject(); - JSONObject breakFaithCount = new JSONObject(); - JSONObject judicialTotalCount = new JSONObject(); - resObj.put("civilCaseCount", civilCaseCount); - resObj.put("criminalCaseCount", criminalCaseCount); - resObj.put("judicialCount", judicialCount); - resObj.put("endCaseCount", endCaseCount); - resObj.put("breakFaithCount", breakFaithCount); - resObj.put("judicialTotalCount", judicialTotalCount); - JSONObject subObj = obj.getJSONObject("personJudicialRiskInfo"); - JSONArray subArr = subObj.getJSONArray("item"); - for(int i = 0; i < subArr.size(); i++){ - JSONObject subJson = subArr.getJSONObject(i); - String resKey = JudicialRiskTimeLengthEnums.getValueData(subJson.getString("timePeriod")); - for(String subKey : subJson.keySet()){ - for(String resSubKey : resObj.keySet()){ - if(subKey.equals(resSubKey)){ - JSONObject resSubObj = resObj.getJSONObject(resSubKey); - resSubObj.put(resKey, subJson.getString(subKey)); - } - } - } - } - StringBuilder sb = new StringBuilder(); - //循环 - for(String resKey : resObj.keySet()){ - JSONObject resJson = resObj.getJSONObject(resKey); - String content = personJudicialRiskInfoContentSFItem; - content = content.replace("judicialSFType", JudicialSFCountTypeEnums.getValueData(resKey)); - for(JudicialRiskTimeLengthEnums je : JudicialRiskTimeLengthEnums.values()){ - content = content.replace(je.getDesc(), resJson.getString(je.getDesc())); - } - if("judicialTotalCount".equals(resKey)){//合计放在末尾 - tail = content; - }else { - sb.append(content); - } - } - return bodyPersonJudicialRiskInfoContentSFItem + sb.toString() + tail; - } - /** - * 风险名单命中结果 - * @param obj - * @return - */ - private static String createPersonJudicialXZRiskInfoContent(String key, JSONObject obj){ - String bodyPersonJudicialRiskInfoContentXZItem = personJudicialRiskInfoContent; - String tail = ""; - //obj转换 - JSONObject resObj = new JSONObject(); - JSONObject taxPunishCount = new JSONObject(); - JSONObject marketPunishCount = new JSONObject(); - JSONObject customsPunishCount = new JSONObject(); - JSONObject environmentPunishCount = new JSONObject(); - JSONObject otherPunishCount = new JSONObject(); - JSONObject punishTotalCount = new JSONObject(); - resObj.put("taxPunishCount", taxPunishCount); - resObj.put("marketPunishCount", marketPunishCount); - resObj.put("customsPunishCount", customsPunishCount); - resObj.put("environmentPunishCount", environmentPunishCount); - resObj.put("otherPunishCount", otherPunishCount); - resObj.put("punishTotalCount", punishTotalCount); - JSONObject subObj = obj.getJSONObject("personJudicialRiskInfo"); - JSONArray subArr = subObj.getJSONArray("item"); - for(int i = 0; i < subArr.size(); i++){ - JSONObject subJson = subArr.getJSONObject(i); - String resKey = JudicialRiskTimeLengthEnums.getValueData(subJson.getString("timePeriod")); - for(String subKey : subJson.keySet()){ - for(String resSubKey : resObj.keySet()){ - if(subKey.equals(resSubKey)){ - JSONObject resSubObj = resObj.getJSONObject(resSubKey); - resSubObj.put(resKey, subJson.getString(subKey)); - } - } - } - } - - StringBuilder sb = new StringBuilder(); - System.out.println("resObj="+resObj.toJSONString()); - //循环 - for(String resKey : resObj.keySet()){ - JSONObject resJson = resObj.getJSONObject(resKey); - String content = personJudicialRiskInfoContentXZItem; - content = content.replace("judicialXZType", JudicialXZCountTypeEnums.getValueData(resKey)); - for(JudicialRiskTimeLengthEnums je : JudicialRiskTimeLengthEnums.values()){ - content = content.replace(je.getDesc(), resJson.getString(je.getDesc())); - } - if("punishTotalCount".equals(resKey)){//合计放在末尾 - tail = content; - }else { - sb.append(content); - } - } - return bodyPersonJudicialRiskInfoContentXZItem + sb.toString() + tail; - } - - /** - * 内容生成 - * @param key - * @param obj - * @return - */ - private static String createBodyContentDes(String key, JSONObject obj) throws ParseException { - if("personAntiFraudDescInfo".equals(key)){ - return createPafDescContent(key, obj); - }else if("personAntiFraudScoreInfo".equals(key)){ - return createPersonAntiFraudScoreInfoContent(key, obj); - }else if("personBaseInfo".equals(key)){//证件号码校验信息 - return createPersonBaseInfoContent(key, obj); - }else if("policeCheckInfo".equals(key)){ - return createPoliceCheckInfoContent(key, obj); - }else if("mobileCheckInfo".equals(key)){ - return createMobileCheckInfoContent(key, obj); - }else if("mobileStatusInfo".equals(key)){ - return createMobileStatusInfoContent(key, obj); - }else if("personRiskRosterInfo".equals(key)){ - return createPersonRiskRosterInfoContent(key, obj); - }else if("personJudicialSFRiskInfo".equals(key)){ - return createPersonJudicialSFRiskInfoContent(key, obj); - }else if("personJudicialXZRiskInfo".equals(key)){ - return createPersonJudicialXZRiskInfoContent(key, obj); - } - return null; - } - - - public static String personJudicialRiskInfoContentSFItem = - " \n" + - " judicialSFType \n" + - " oneYearCount \n" + - " twoYearCount \n" + - " fiveYearCount \n" + - " historyYearCount \n" + - " \n"; - - public static String personJudicialRiskInfoContentXZItem = - " \n" + - " judicialXZType \n" + - " oneYearCount \n" + - " twoYearCount \n" + - " fiveYearCount \n" + - " historyYearCount \n" + - " \n"; - - public static String personJudicialRiskInfoContent = - " \n" + - " 风险类型 \n" + - " 近1年 \n" + - " 近2年 \n" + - " 近5年 \n" + - " 历史 \n" + - " \n" ; - - public static String personJudicialSFRiskInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
司法风险汇总
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
司法涉诉
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " subContent \n" + - "
\n" + - " \n" ; - - public static String personJudicialXZRiskInfo = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
行政处罚
\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " subContent \n" + - "
\n" + - " "; - - -} +package com.tenwa.httpclient.pypafhtml; + import com.alibaba.fastjson.JSONArray; + import com.alibaba.fastjson.JSONObject; + import com.google.common.collect.Lists; + + import java.text.ParseException; + import java.text.SimpleDateFormat; + import java.util.ArrayList; + import java.util.Date; + import java.util.List; + +public class PyHtmlContent { + /** + * 统计时间段:1-近1年、2-近2年、3-近5年、4-历史 + * 数据库表名和列字段对应关系 + */ + public enum JudicialXZCountTypeEnums{ + taxPunishCount("taxPunishCount","税务处罚事件数量"), + marketPunishCount("marketPunishCount","市场监管处罚事件数量"), + customsPunishCount("customsPunishCount","海关处罚事件数量"), + environmentPunishCount("environmentPunishCount","环保处罚事件数量"), + otherPunishCount("otherPunishCount","其他行政处罚事件数量"), + punishTotalCount("punishTotalCount","(行政处罚事件)合计"); + + private String code; //类型 + private String desc; //描述 + + private JudicialXZCountTypeEnums(String code, String desc){ + this.code=code; + this.desc=desc; + } + public String getDesc() { + return desc; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(JudicialXZCountTypeEnums data : JudicialXZCountTypeEnums.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getDesc(); + } + } + return "无"; + } + } + + /** + * 统计时间段:1-近1年、2-近2年、3-近5年、4-历史 + * 数据库表名和列字段对应关系 + */ + public enum JudicialSFCountTypeEnums{ + civilCaseCount("civilCaseCount","民事案件被告风险事件数量"), + criminalCaseCount("criminalCaseCount","刑事案件被告风险事件数量"), + judicialCount("judicialCount","司法被执行人风险事件数量"), + endCaseCount("endCaseCount","终本案件风险事件数量"), + breakFaithCount("breakFaithCount","失信被执行人风险事件数量"), + judicialTotalCount("judicialTotalCount","(司法涉诉风险事件)合计"); + + private String code; //类型 + private String desc; //描述 + + private JudicialSFCountTypeEnums(String code, String desc){ + this.code=code; + this.desc=desc; + } + public String getDesc() { + return desc; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(JudicialSFCountTypeEnums data : JudicialSFCountTypeEnums.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getDesc(); + } + } + return "无"; + } + } + + /** + * 统计时间段:1-近1年、2-近2年、3-近5年、4-历史 + * 数据库表名和列字段对应关系 + */ + public enum JudicialRiskTimeLengthEnums{ + Length_1("1","oneYearCount"), + Length_2("2","twoYearCount"), + Length_3("3","fiveYearCount"), + Length_4("4","historyYearCount"); + + private String code; //类型 + private String desc; //描述 + + private JudicialRiskTimeLengthEnums(String code, String desc){ + this.code=code; + this.desc=desc; + } + public String getDesc() { + return desc; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(JudicialRiskTimeLengthEnums data : JudicialRiskTimeLengthEnums.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getDesc(); + } + } + return "无"; + } + } + + /** + * 1:正常在用 2: 停机 3:未启用 4:已销号 6:预销号该值可能为空 + * 数据库表名和列字段对应关系 + */ + public enum MobileStsEnums{ + Sts_1("1","正常在用"), + Sts_2("2","停机"), + Sts_3("3","未启用"), + Sts_4("4","已销号"), + Sts_6("6","预销号该值可能为空"); + + private String code; //类型 + private String desc; //描述 + + private MobileStsEnums(String code, String desc){ + this.code=code; + this.desc=desc; + } + public String getDesc() { + return desc; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(MobileStsEnums data : MobileStsEnums.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getDesc(); + } + } + return "无"; + } + } + //1:不足3个月 2:3-6个月 3:6-12个月 4:12-24个月 5:24个月 + /** + * 数据库表名和列字段对应关系 + */ + public enum MobileTimeLengthEnums{ + Length_1("1","不足3个月"), + Length_2("2","3-6个月"), + Length_3("3","6-12个月"), + Length_4("4","12-24个月"), + Length_5("5","24个月"); + + private String code; //类型 + private String desc; //描述 + + private MobileTimeLengthEnums(String code, String desc){ + this.code=code; + this.desc=desc; + } + public String getDesc() { + return desc; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(MobileTimeLengthEnums data : MobileTimeLengthEnums.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getDesc(); + } + } + return "无"; + } + } + + /** + * 数据库表名和列字段对应关系 + */ + public enum MobileOperatorEnums{ + DX("1","中国电信"), + YD("2","中国移动"), + LT("3","中国联通"); + + private String code; //类型 + private String desc; //描述 + + private MobileOperatorEnums(String code, String desc){ + this.code=code; + this.desc=desc; + } + public String getDesc() { + return desc; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(MobileOperatorEnums data : MobileOperatorEnums.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getDesc(); + } + } + return "无"; + } + } + + /** + * 数据库表名和列字段对应关系 + */ + public enum PafEnums{ + personAntiFraudDescInfo("personAntiFraudDescInfo","欺诈风险汇总", PyHtmlContent.personAntiFraudDescInfo), + personAntiFraudScoreInfo("personAntiFraudScoreInfo","欺诈风险指数", PyHtmlContent.personAntiFraudScoreInfo), + personBaseInfo("personBaseInfo","身份信息校验", PyHtmlContent.personBaseInfo), + policeCheckInfo("policeCheckInfo","身份认证结果", PyHtmlContent.policeCheckInfo), + mobileCheckInfo("mobileCheckInfo","手机号信息校验", PyHtmlContent.mobileCheckInfo), + mobileStatusInfo("mobileStatusInfo","手机号码时长", PyHtmlContent.mobileStatusInfo), + personRiskRosterInfo("personRiskRosterInfo","命中名单", PyHtmlContent.personRiskRosterInfo), + personJudicialSFRiskInfo("personJudicialSFRiskInfo","司法查询", PyHtmlContent.personJudicialSFRiskInfo), + personJudicialXZRiskInfo("personJudicialXZRiskInfo","行政查询", PyHtmlContent.personJudicialXZRiskInfo); + + private String code; //类型 + private String htmlContent; //类型 + private String desc; //描述 + + private PafEnums(String code, String desc, String htmlContent){ + this.code=code; + this.desc=desc; + this.htmlContent=htmlContent; + } + public String getDesc() { + return desc; + } + public String getHtmlContent() { + return htmlContent; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(PafEnums data : PafEnums.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getHtmlContent(); + } + } + return "无"; + } + } + + /** + * 数据库表名和列字段对应关系 + */ + public enum PersonAntiFraudDescInfoEnums{ + antiFraudScore("antiFraudScore","欺诈风险指数"), + antiFraudScoreRiskLevel("antiFraudScoreRiskLevel","欺诈风险指数风险等级"), + policeCheckRiskLevel("policeCheckRiskLevel","身份认证结果风险等级"), + policeCheckDesc("policeCheckDesc","身份认证结果"), + mobileCheckRiskLevel("mobileCheckRiskLevel","手机号码核查结果风险等级"), + mobileCheckDesc("mobileCheckDesc","手机号码核查结果"), + mobileStatusRiskLevel("mobileStatusRiskLevel","手机号码状态及在网时长结果风险等级"), + mobileStatusDesc("mobileStatusDesc","手机号码状态及在网时长结果"), + riskRosterRiskLevel("riskRosterRiskLevel","风险名单结果风险等级"), + riskRosterDesc("riskRosterDesc","风险名单结果"), + judicialRiskLevel("judicialRiskLevel","司法风险结果风险等级"), + judicialRiskDesc("judicialRiskDesc","司法风险结果"); + + private String code; //类型 + private String desc; //描述 + + private PersonAntiFraudDescInfoEnums(String code, String desc){ + this.code=code; + this.desc=desc; + } + public String getDesc() { + return desc; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(PersonAntiFraudDescInfoEnums data : PersonAntiFraudDescInfoEnums.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getDesc(); + } + } + return "无"; + } + } + + /** + * 数据库表名和列字段对应关系 + */ + public enum RiskType{ + risk_000("000","未命中风险名单"), + risk_101("101","疑似欺诈风险"), + risk_102("102","疑似营销套利"), + risk_201("201","疑似身份造假"), + risk_202("202","疑似资料造假"), + risk_203("203","疑似盗号风险"), + risk_301("301","刑事被告"), + risk_302("302","民事被告"), + risk_303("303","司法被执行人"), + risk_304("304","终本案件人员"), + risk_305("305","司法失信人员"), + risk_306("306","行政处罚人员"), + risk_999("999","其他风险"); + + private String code; //类型 + private String desc; //描述 + + private RiskType(String code, String desc){ + this.code=code; + this.desc=desc; + } + public String getDesc() { + return desc; + } + + public String getCode() { + return this.code; + } + + /** + * 根据code 数据库表名的列字段 + * @param code + * @return + */ + public static String getValueData(String code){ + for(RiskType data : RiskType.values()){ + if(data.getCode().toLowerCase().equals(code.toLowerCase())){ + return data.getDesc(); + } + } + return "未命中风险名单"; + } + } + + /** + * 内容开始部分 + * @param obj + * @return + */ + public static String createBodyHead(JSONObject obj) throws ParseException { + StringBuilder sb = new StringBuilder(); + String bodyTitle = title; + bodyTitle = bodyTitle.replace("reportID", obj.getString("reportID")); + sb.append(bodyTitle); + String bodyQueryConditions = queryConditions; + JSONObject queryConditionsObj = obj.getJSONObject("queryConditionsObj"); + bodyQueryConditions = bodyQueryConditions.replace("name", queryConditionsObj.getString("name")); + bodyQueryConditions = bodyQueryConditions.replace("documentNo", queryConditionsObj.getString("documentNo")); + bodyQueryConditions = bodyQueryConditions.replace("unitName", obj.getString("unitName")); + bodyQueryConditions = bodyQueryConditions.replace("queryUserID", obj.getString("queryUserID")); + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + Date birDate = sdf.parse(obj.getString("receiveTime").substring(0, 8)); + SimpleDateFormat sdfRes = new SimpleDateFormat("yyyy年MM月dd日"); + String birStr = sdfRes.format(birDate); + bodyQueryConditions = bodyQueryConditions.replace("receiveTime", birStr); + sb.append(bodyQueryConditions); + String bodyBContentPafQuery = bodyContentPafQuery; + bodyBContentPafQuery = bodyBContentPafQuery.replace("phone", queryConditionsObj.getString("phone")); + sb.append(bodyBContentPafQuery); + return sb.toString(); + } + + public static String title = " reportID" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" ; + + public static String queryConditions = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + +// " \n" + + " \n" + + " \n" + +// " \n" + + " \n" + + " \n" + + " \n" + + " \n" + +// " \n" + + " \n" + + " \n" + +// " \n" + + " \n" + + " \n" + + " \n" + + " \n" + +// " \n" + + " \n" + + " \n" + + "
姓名name熊海查询时间receiveTime2020年07月28日
证件号码documentNo360123*********978操作员queryUserIDapwsqueryn
查询机构unitName安鹏融资租赁(天津)有限公司
\n" + + " \n" ; + + //反欺诈附件条件 + public static String bodyContentPafQuery = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
反欺诈分析附加条件
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
手机号码phone
\n" + + " \n" ; + + + public static String contentError = "errorMessage "; + public static String contentEmpty = " errorMessage "; + + + /** + * 反欺诈信息汇总 + * @param obj + * @return + */ + private static String createBaseContent(String key, String content, JSONObject obj) throws ParseException { + String bodyContentError = contentError; + String bodyContentEmpty = contentEmpty; + String bodyContent = content; + String subContent = ""; + String jsonKey = key; + if("personJudicialSFRiskInfo".equals(key) || "personJudicialXZRiskInfo".equals(key)){ + jsonKey = "personJudicialRiskInfo"; + } + JSONObject keyObj = obj.getJSONObject(jsonKey); + String errorMessage = ""; + if(keyObj.containsKey("errorMessage")){ + errorMessage = keyObj.getString("errorMessage"); + } + if("3".equals(keyObj.getString("treatResult"))){//系统错误,默认包含细节 + if(null == errorMessage || "".equals(errorMessage)){ + errorMessage = "系统错误。"; + } + bodyContentError = bodyContentError.replace("errorMessage", errorMessage); + subContent = bodyContentError; + }else{//如果包含细节 + subContent = createBodyContentDes(key, obj); + } + if(null == subContent || "".equals(subContent.toString())){ + subContent = bodyContentEmpty.replace("errorMessage", "根据已提供的查询条件,未能在系统中查得相关信息。"); + } + bodyContent = bodyContent.replace("subContent", subContent); + return bodyContent; + } + + + + /** + * + * @param obj + * @return + */ + public static String createBodyContent(JSONObject obj) throws ParseException { + StringBuilder sb = new StringBuilder(); + for(PafEnums pe : PafEnums.values()){ + String jsonKey = pe.getCode(); + if("personJudicialSFRiskInfo".equals(pe.getCode()) || "personJudicialXZRiskInfo".equals(pe.getCode())){ + jsonKey = "personJudicialRiskInfo"; + } + JSONObject keyObj = obj.getJSONObject(jsonKey); + String treatResult = keyObj.getString("treatResult"); + //是否包含细节内容 + boolean addContentB = false; + List resKeyArr = + Lists.newArrayList("subReportType", "subReportTypeCost", "treatResult", "treatErrorCode", "errorMessage"); + for(String keyRes : keyObj.keySet()){ + if(!resKeyArr.contains(keyRes) || "3".equals(treatResult)){ + addContentB = true; + } + } + if(addContentB){ + String content = createBaseContent(pe.getCode(), pe.getHtmlContent(), obj); + sb.append(content); + } + } + return sb.toString(); + } + + /** + * 反欺诈信息汇总 + * @param obj + * @return + */ + private static String createPafDescContent(String key, JSONObject obj){ + String bodyPersonAntiFraudDescInfoContent = personAntiFraudDescInfoContent; + JSONObject subObj = obj.getJSONObject(key); + // TODO: 2020/7/29 增加判断空 antiFraudScore + String antiFraudScore = subObj.getString("antiFraudScore"); + bodyPersonAntiFraudDescInfoContent = bodyPersonAntiFraudDescInfoContent.replace("antiFraudScore", subObj.getString("antiFraudScore")); + StringBuilder sbContent = new StringBuilder(); + for(PersonAntiFraudDescInfoEnums pe : PersonAntiFraudDescInfoEnums.values()){ + if(null != subObj.getString(pe.getCode()) + && !"".equals(subObj.getString(pe.getCode()))){ + String subContent = personAntiFraudDescInfoContentItem; + String imgStatus = "image_success"; + // TODO: 2020/7/29 如果包含 不正常 高风险 则改为 imgage_error + String result = subObj.getString(pe.getCode()); + if("antiFraudScore".equals(pe.getCode())) { + if(Integer.parseInt(result) > 500){ + imgStatus = "image_error"; + } + }else if("policeCheckDesc".equals(pe.getCode())){ + String resPre = subObj.getString("policeCheckRiskLevel"); + if(resPre.contains("高风险")){ + imgStatus = "image_error"; + }else if(resPre.contains("中风险")){ + imgStatus = "image_warn"; + } + }else if("mobileCheckDesc".equals(pe.getCode())){ + String resPre = subObj.getString("mobileCheckRiskLevel"); + if(resPre.contains("高风险")){ + imgStatus = "image_error"; + }else if(resPre.contains("中风险")){ + imgStatus = "image_warn"; + } + }else if("mobileStatusDesc".equals(pe.getCode())){ + String resPre = subObj.getString("mobileStatusRiskLevel"); + if(resPre.contains("高风险")){ + imgStatus = "image_error"; + }else if(resPre.contains("中风险")){ + imgStatus = "image_warn"; + } + }else if("judicialRiskDesc".equals(pe.getCode())){ + String resPre = subObj.getString("judicialRiskLevel"); + if(resPre.contains("高风险")){ + imgStatus = "image_error"; + }else if(resPre.contains("中风险")){ + imgStatus = "image_warn"; + } + }else if("riskRosterDesc".equals(pe.getCode())){ + if(!"未命中风险名单".equals(result)){ + imgStatus = "image_error"; + } + } + if(result.contains("高风险")){ + imgStatus = "image_error"; + } + String pafDesc = pe.getDesc() + ":" + subObj.getString(pe.getCode()); + subContent = subContent.replace("image_status", imgStatus); + subContent = subContent.replace("pafDesc", pafDesc); + sbContent.append(subContent); + } + } + bodyPersonAntiFraudDescInfoContent = bodyPersonAntiFraudDescInfoContent.replace("contentItem", sbContent.toString()); + return bodyPersonAntiFraudDescInfoContent; + } + + //反欺诈分析综述 + public static String personAntiFraudDescInfoContentItem = + "
pafDesc
"; + + //反欺诈分析综述 + public static String personAntiFraudDescInfoContent = + " \n" + + " 欺诈风险指数为 antiFraudScore 分 \n" + + " \n" + + " \n" + + " contentItem \n" + + " \n" ; + //反欺诈分析综述 + public static String personAntiFraudDescInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
反欺诈分析综述
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " subContent \n" + + "
\n" + + " \n" ; + + /** + * 反欺诈指数 + * @param obj + * @return + */ + private static String createPersonAntiFraudScoreInfoContent(String key, JSONObject obj){ + String bodyPersonAntiFraudScoreInfoContent = personAntiFraudScoreInfoContent; + JSONObject subObj = obj.getJSONObject(key); + bodyPersonAntiFraudScoreInfoContent = bodyPersonAntiFraudScoreInfoContent.replace("riskScore", subObj.getString("riskScore")); + bodyPersonAntiFraudScoreInfoContent = bodyPersonAntiFraudScoreInfoContent.replace("riskLevel", subObj.getString("riskLevel")); + bodyPersonAntiFraudScoreInfoContent = bodyPersonAntiFraudScoreInfoContent.replace("hitTypes", subObj.getString("hitTypes")); + return bodyPersonAntiFraudScoreInfoContent; + } + + //反欺诈分析指数 + public static String personAntiFraudScoreInfoContent = + " 欺诈风险指数为 riskScore 分 \n" + + "欺诈风险等级为 riskLevel \n" + + " 欺诈风险标签为 hitTypes \n" ; + + //反欺诈分析指数【图片删掉】 + public static String personAntiFraudScoreInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
欺诈风险指数
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " subContent \n" + + "
\n" + + " \n" ; + + /** + * 证件号码校验信息 + * @param obj + * @return + */ + private static String createPersonBaseInfoContent(String key, JSONObject obj) throws ParseException { + String bodyPersonBaseInfoContent = personBaseInfoContent; + JSONObject subObj = obj.getJSONObject(key); + bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("docNo", subObj.getString("docNo")); + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + Date birDate = sdf.parse(subObj.getString("birthday")); + SimpleDateFormat sdfRes = new SimpleDateFormat("yyyy年MM月dd日"); + String birStr = sdfRes.format(birDate); + bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("birthday", birStr); + String genderId = subObj.getString("genderID"); + if("1".equals(genderId)){ + genderId = "男"; + }else if("2".equals(genderId)){ + genderId = "女"; + }else if("3".equals(genderId)){ + genderId = "不详"; + } + bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("genderID", genderId); + bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("age", subObj.getString("age")); + bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("originalAddress", subObj.getString("originalAddress")); + bodyPersonBaseInfoContent = bodyPersonBaseInfoContent.replace("verifyResult", "1".equals(subObj.getString("verifyResult")) ? "通过" : "未通过"); + return bodyPersonBaseInfoContent; + } + + //证件号码校验信息 + public static String personBaseInfoContent = + " \n" + + " 证件号码 \n" + + " docNo \n" + + " 出生日期 \n" + + " birthday \n" + + " \n" + + " \n" + + " 性别 \n" + + " genderID \n" + + " 年龄 \n" + + " age \n" + + " \n" + + " \n" + + " 原始发证地区 \n" + + " originalAddress \n" + + " \n" + + " \n" + + " 证件校验结果 \n" + + " verifyResult \n" + + " \n" ; + + //证件号码校验信息 + public static String personBaseInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
证件号码校验信息
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " subContent \n" + + "
\n" + + " \n"; + + + /** + * 证件号码校验信息 + * @param obj + * @return + */ + private static String createPoliceCheckInfoContent(String key, JSONObject obj){ + StringBuilder sb = new StringBuilder(); + JSONObject arrObj = obj.getJSONObject(key); + JSONArray subArr = arrObj.getJSONArray("item"); + for(int i = 0; i < subArr.size(); i++){ + JSONObject subObj = subArr.getJSONObject(i); + String bodyPoliceCheckInfoContent = policeCheckInfoContent; + bodyPoliceCheckInfoContent = bodyPoliceCheckInfoContent.replace("result", + "1".equals(subObj.getString("result")) ? "一致" : "不一致"); + sb.append(bodyPoliceCheckInfoContent); + } + return sb.toString(); + } + + //证件号码认证结果 + public static String policeCheckInfoContent = + " \n" + + " 身份认证结果 \n" + + " result \n" + + " \n" ; + + //证件号码认证结果 + public static String policeCheckInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
身份认证
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " subContent \n" + + "
\n" + + " \n"; + + /** + * 手机号码校验信息结果 + * @param obj + * @return + */ + private static String createMobileCheckInfoContent(String key, JSONObject obj){ + StringBuilder sb = new StringBuilder(); + JSONObject arrObj = obj.getJSONObject(key); + JSONArray subArr = arrObj.getJSONArray("item"); + for(int i = 0; i < subArr.size(); i++){ + JSONObject subObj = subArr.getJSONObject(i); + String bodyMobileCheckInfoContent = mobileCheckInfoContent; + bodyMobileCheckInfoContent = bodyMobileCheckInfoContent.replace("checkResult", subObj.getString("checkResult")); + bodyMobileCheckInfoContent = bodyMobileCheckInfoContent.replace("areaInfo", subObj.getString("areaInfo")); + bodyMobileCheckInfoContent = bodyMobileCheckInfoContent.replace("operator", MobileOperatorEnums.getValueData(subObj.getString("operator"))); + sb.append(bodyMobileCheckInfoContent); + } + return sb.toString(); + } + + + //手机号码校验信息结果 + public static String mobileCheckInfoContent = + " \n" + + " 运营商名称 \n" + + " operator \n" + + " \n" + + " \n" + + " 手机号码归属地 \n" + + " areaInfo \n" + + " \n" + + " \n" + + " 手机认证结果 \n" + + " checkResult \n" + + " \n" ; + //手机号码校验信息结果 + public static String mobileCheckInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
手机认证
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " subContent \n" + + "
\n" + + " \n"; + + /** + * 手机号码在线时长 + * @param obj + * @return + */ + private static String createMobileStatusInfoContent(String key, JSONObject obj){ + StringBuilder sb = new StringBuilder(); + JSONObject arrObj = obj.getJSONObject(key); + JSONArray subArr = arrObj.getJSONArray("item"); + for(int i = 0; i < subArr.size(); i++){ + JSONObject subObj = subArr.getJSONObject(i); + String bodyMobileStatusInfoContent = mobileStatusInfoContent; + bodyMobileStatusInfoContent = bodyMobileStatusInfoContent.replace("timeLength", MobileTimeLengthEnums.getValueData(subObj.getString("timeLength"))); + bodyMobileStatusInfoContent = bodyMobileStatusInfoContent.replace("phoneStatus", MobileStsEnums.getValueData(subObj.getString("phoneStatus"))); + sb.append(bodyMobileStatusInfoContent); + } + return sb.toString(); + } + + + //手机号码在线时长 + public static String mobileStatusInfoContent = + " \n" + + " 手机号码状态 \n" + + " phoneStatus \n" + + " \n" + + " \n" + + " 手机号码在网时长 \n" + + " timeLength \n" + + " \n" ; + + //手机号码在线时长 + public static String mobileStatusInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
手机号码状态时长
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + + " subContent \n" + + "
\n" + + " \n"; + + + /** + * 风险名单命中结果 + * @param obj + * @return + */ + private static String createPersonRiskRosterInfoContent(String key, JSONObject obj){ + String bodyPersonRiskRosterInfoContent = personRiskRosterInfoContent; + JSONObject subObj = obj.getJSONObject(key); + StringBuilder sb = new StringBuilder(); + // TODO: 2020/7/29 判断为空 + String[] riskTypes = subObj.getString("riskTypes").split(","); + for(String riskType : riskTypes){ + sb.append(RiskType.getValueData(riskType) + ", "); + } + String risk = sb.toString(); + risk = risk.substring(0, risk.length() - 2); + bodyPersonRiskRosterInfoContent = bodyPersonRiskRosterInfoContent.replace("riskTypes", risk); + return bodyPersonRiskRosterInfoContent; + } + + //风险名单命中结果 + public static String personRiskRosterInfoContent = + " \n" + + " 命中风险类型 \n" + + " riskTypes \n" + + " \n" ; + + //风险名单命中结果 + public static String personRiskRosterInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
风险名单
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " subContent \n" + + "
\n" + + " \n"; + + + /** + * 风险名单命中结果 + * @param obj + * @return + */ + private static String createPersonJudicialSFRiskInfoContent(String key, JSONObject obj){ + String bodyPersonJudicialRiskInfoContentSFItem = personJudicialRiskInfoContent; + String tail = ""; + //obj转换 + JSONObject resObj = new JSONObject(); + JSONObject civilCaseCount = new JSONObject(); + JSONObject criminalCaseCount = new JSONObject(); + JSONObject judicialCount = new JSONObject(); + JSONObject endCaseCount = new JSONObject(); + JSONObject breakFaithCount = new JSONObject(); + JSONObject judicialTotalCount = new JSONObject(); + resObj.put("civilCaseCount", civilCaseCount); + resObj.put("criminalCaseCount", criminalCaseCount); + resObj.put("judicialCount", judicialCount); + resObj.put("endCaseCount", endCaseCount); + resObj.put("breakFaithCount", breakFaithCount); + resObj.put("judicialTotalCount", judicialTotalCount); + JSONObject subObj = obj.getJSONObject("personJudicialRiskInfo"); + JSONArray subArr = subObj.getJSONArray("item"); + for(int i = 0; i < subArr.size(); i++){ + JSONObject subJson = subArr.getJSONObject(i); + String resKey = JudicialRiskTimeLengthEnums.getValueData(subJson.getString("timePeriod")); + for(String subKey : subJson.keySet()){ + for(String resSubKey : resObj.keySet()){ + if(subKey.equals(resSubKey)){ + JSONObject resSubObj = resObj.getJSONObject(resSubKey); + resSubObj.put(resKey, subJson.getString(subKey)); + } + } + } + } + StringBuilder sb = new StringBuilder(); + //循环 + for(String resKey : resObj.keySet()){ + JSONObject resJson = resObj.getJSONObject(resKey); + String content = personJudicialRiskInfoContentSFItem; + content = content.replace("judicialSFType", JudicialSFCountTypeEnums.getValueData(resKey)); + for(JudicialRiskTimeLengthEnums je : JudicialRiskTimeLengthEnums.values()){ + content = content.replace(je.getDesc(), resJson.getString(je.getDesc())); + } + if("judicialTotalCount".equals(resKey)){//合计放在末尾 + tail = content; + }else { + sb.append(content); + } + } + return bodyPersonJudicialRiskInfoContentSFItem + sb.toString() + tail; + } + /** + * 风险名单命中结果 + * @param obj + * @return + */ + private static String createPersonJudicialXZRiskInfoContent(String key, JSONObject obj){ + String bodyPersonJudicialRiskInfoContentXZItem = personJudicialRiskInfoContent; + String tail = ""; + //obj转换 + JSONObject resObj = new JSONObject(); + JSONObject taxPunishCount = new JSONObject(); + JSONObject marketPunishCount = new JSONObject(); + JSONObject customsPunishCount = new JSONObject(); + JSONObject environmentPunishCount = new JSONObject(); + JSONObject otherPunishCount = new JSONObject(); + JSONObject punishTotalCount = new JSONObject(); + resObj.put("taxPunishCount", taxPunishCount); + resObj.put("marketPunishCount", marketPunishCount); + resObj.put("customsPunishCount", customsPunishCount); + resObj.put("environmentPunishCount", environmentPunishCount); + resObj.put("otherPunishCount", otherPunishCount); + resObj.put("punishTotalCount", punishTotalCount); + JSONObject subObj = obj.getJSONObject("personJudicialRiskInfo"); + JSONArray subArr = subObj.getJSONArray("item"); + for(int i = 0; i < subArr.size(); i++){ + JSONObject subJson = subArr.getJSONObject(i); + String resKey = JudicialRiskTimeLengthEnums.getValueData(subJson.getString("timePeriod")); + for(String subKey : subJson.keySet()){ + for(String resSubKey : resObj.keySet()){ + if(subKey.equals(resSubKey)){ + JSONObject resSubObj = resObj.getJSONObject(resSubKey); + resSubObj.put(resKey, subJson.getString(subKey)); + } + } + } + } + + StringBuilder sb = new StringBuilder(); + System.out.println("resObj="+resObj.toJSONString()); + //循环 + for(String resKey : resObj.keySet()){ + JSONObject resJson = resObj.getJSONObject(resKey); + String content = personJudicialRiskInfoContentXZItem; + content = content.replace("judicialXZType", JudicialXZCountTypeEnums.getValueData(resKey)); + for(JudicialRiskTimeLengthEnums je : JudicialRiskTimeLengthEnums.values()){ + content = content.replace(je.getDesc(), resJson.getString(je.getDesc())); + } + if("punishTotalCount".equals(resKey)){//合计放在末尾 + tail = content; + }else { + sb.append(content); + } + } + return bodyPersonJudicialRiskInfoContentXZItem + sb.toString() + tail; + } + + /** + * 内容生成 + * @param key + * @param obj + * @return + */ + private static String createBodyContentDes(String key, JSONObject obj) throws ParseException { + if("personAntiFraudDescInfo".equals(key)){ + return createPafDescContent(key, obj); + }else if("personAntiFraudScoreInfo".equals(key)){ + return createPersonAntiFraudScoreInfoContent(key, obj); + }else if("personBaseInfo".equals(key)){//证件号码校验信息 + return createPersonBaseInfoContent(key, obj); + }else if("policeCheckInfo".equals(key)){ + return createPoliceCheckInfoContent(key, obj); + }else if("mobileCheckInfo".equals(key)){ + return createMobileCheckInfoContent(key, obj); + }else if("mobileStatusInfo".equals(key)){ + return createMobileStatusInfoContent(key, obj); + }else if("personRiskRosterInfo".equals(key)){ + return createPersonRiskRosterInfoContent(key, obj); + }else if("personJudicialSFRiskInfo".equals(key)){ + return createPersonJudicialSFRiskInfoContent(key, obj); + }else if("personJudicialXZRiskInfo".equals(key)){ + return createPersonJudicialXZRiskInfoContent(key, obj); + } + return null; + } + + + public static String personJudicialRiskInfoContentSFItem = + " \n" + + " judicialSFType \n" + + " oneYearCount \n" + + " twoYearCount \n" + + " fiveYearCount \n" + + " historyYearCount \n" + + " \n"; + + public static String personJudicialRiskInfoContentXZItem = + " \n" + + " judicialXZType \n" + + " oneYearCount \n" + + " twoYearCount \n" + + " fiveYearCount \n" + + " historyYearCount \n" + + " \n"; + + public static String personJudicialRiskInfoContent = + " \n" + + " 风险类型 \n" + + " 近1年 \n" + + " 近2年 \n" + + " 近5年 \n" + + " 历史 \n" + + " \n" ; + + public static String personJudicialSFRiskInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
司法风险汇总
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
司法涉诉
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " subContent \n" + + "
\n" + + " \n" ; + + public static String personJudicialXZRiskInfo = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
行政处罚
\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " subContent \n" + + "
\n" + + " "; + + +} diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java index 17192e3b0..fd43c4c1c 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java @@ -318,6 +318,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { bmLEC.setAttributeValue("cartype",this.getAttribute("cartype")); bmLEC.setAttributeValue("vehicletype",this.getAttribute("vehicletype")); bmLEC.setAttributeValue("vehiclelevel",this.getAttribute("vehiclelevel")); + bmLEC.setAttributeValue("car_attribute","head"); if(lbat!=null){ bmLEC.setAttributeValue("FRAME_NUMBER", lbat.getAttribute("frame_number")+"");//车架号 bmLEC.setAttributeValue("mile", lbat.getAttribute("mile")+"");//公里数 diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/PaymentContractFileShiQiao.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/PaymentContractFileShiQiao.java new file mode 100644 index 000000000..c2b0e033b --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/PaymentContractFileShiQiao.java @@ -0,0 +1,78 @@ +package com.tenwa.lease.flow.project.commbusiness; + +import java.util.Map; + +import jbo.app.LB_DOCLIBRARY; +import jbo.app.tenwa.doc.LB_DOCATTRIBUTE; +import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST; +import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; + +import com.alibaba.fastjson.JSON; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.util.Transaction; +import com.amarsoft.context.ASUser; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.httpclient.resources.InterfacePlatformConfigure; +import com.tenwa.reckon.util.DateUtil; + +/** + * 付款申请业务申请将合同制作文件带到资料清单中(狮桥) + */ +public class PaymentContractFileShiQiao extends BaseBussiness { + + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + if (this.getAttribute("serial") == null) return "true"; + String channel_shiqiao = InterfacePlatformConfigure.get("channel_shiqiao"); + if (this.getAttribute("channel") != null && this.getAttribute("channel").toString().equals(channel_shiqiao)){ + String projectId = this.getAttribute("ProjectId").toString(); + BizObjectManager ldlm = JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME, Sqlca); + BizObject ldl = ldlm.createQuery("select * from O left join jbo.app.tenwa.doc.LB_DOCRELATIVE ldr on O.relative_id=ldr.id where ldr.proj_id=:projectId and ldr.objecttype='FundPaymentCarFlow' and O.DOC_CLASS_ITEMNO='037001' and O.Serial_Num='1' ").setParameter("projectId", projectId).getSingleResult(true); + if(ldl != null ){ + String libraryId = ldl.getAttribute("id").getString(); + if( libraryId!=null && libraryId.length()>0){ + BizObjectManager ldclm = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, Sqlca); + BizObject ldcl = ldclm.createQuery(" project_id=:project_id and file_flag='yes' ").setParameter("project_id", projectId).getSingleResult(false); + String attributeId = ldcl == null?"":ldcl.getAttribute("ATTRIBUTE_ID").getString(); + String contractFlowUnid = ldcl == null?"":ldcl.getAttribute("FLOW_UNID").getString(); + BizObjectManager fboMange = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME); + BizObject fbo = fboMange.createQuery("flow_unid=:flow_unid").setParameter("flow_unid", contractFlowUnid).getSingleResult(false); + Map flowParms = JSON.parseObject(fbo.getAttribute("FixedFlowParam").getString(),Map.class); + String signType = flowParms.get("signType"); + if("Electronic".equals(signType)){ + BizObjectManager ldam = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME, Sqlca); + BizObject lda = ldam.createQuery(" library_id=:library_id ").setParameter("library_id", libraryId).getSingleResult(true); + BizObject ldaMeta = ldam.createQuery(" id=:id ").setParameter("id", attributeId).getSingleResult(false); + if(lda!=null && ldaMeta!=null ){ + lda.setAttributeValue("FILEPATH", ldaMeta.getAttribute("FILEPATH").getString()); + lda.setAttributeValue("FULLPATH", ldaMeta.getAttribute("FULLPATH").getString()); + lda.setAttributeValue("FILENAME", ldaMeta.getAttribute("FILENAME").getString()); + lda.setAttributeValue("FILESIZE", ldaMeta.getAttribute("FILESIZE").getString()); + }else if(lda ==null && ldaMeta!=null ){ + String userId = this.getAttribute("CurUserID").toString(); + ASUser asUser = new ASUser(userId); + lda = ldam.newObject(); + lda.setAttributeValue("LIBRARY_ID", libraryId); + lda.setAttributeValue("FILEPATH", ldaMeta.getAttribute("FILEPATH").getString()); + lda.setAttributeValue("FULLPATH", ldaMeta.getAttribute("FULLPATH").getString()); + lda.setAttributeValue("FILENAME", ldaMeta.getAttribute("FILENAME").getString()); + lda.setAttributeValue("FILESIZE", ldaMeta.getAttribute("FILESIZE").getString()); + lda.setAttributeValue("INPUTUSERID", userId); + lda.setAttributeValue("INPUTORGID", asUser.getOrgID()); + lda.setAttributeValue("INPUTTIME", DateUtil.getSystemTimeByFormat("yyyy/MM/dd HH:mm:ss:sss")); + lda.setAttributeValue("CONTENT_TYPE", "application/pdf"); + lda.setAttributeValue("OBJECTTYPE", "FundPaymentCarFlow"); + } + ldam.saveObject(lda); + } + } + ldl.setAttributeValue("BUSINESS_CHECK", "DocCheck_0"); + ldlm.saveObject(ldl); + } + } + return "true"; + } +} diff --git a/src_tenwa/com/tenwa/lease/flow/rent/rentreback/LCRentIncomeTempToFormalBusiness.java b/src_tenwa/com/tenwa/lease/flow/rent/rentreback/LCRentIncomeTempToFormalBusiness.java index e54ec7364..fbcd4e640 100644 --- a/src_tenwa/com/tenwa/lease/flow/rent/rentreback/LCRentIncomeTempToFormalBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/rent/rentreback/LCRentIncomeTempToFormalBusiness.java @@ -1,77 +1,78 @@ -package com.tenwa.lease.flow.rent.rentreback; - -import java.math.BigDecimal; -import java.util.List; -import java.util.Map; - -import jbo.app.tenwa.calc.LC_FUND_INCOME; -import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; -import jbo.app.tenwa.calc.LC_RENT_INCOME; -import jbo.app.tenwa.calc.LC_RENT_INCOME_TEMP; -import jbo.app.tenwa.calc.LC_RENT_PLAN; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.awe.util.Transaction; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.flow.baseBussion.BaseBussiness; -import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService; -import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum; -import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp; - -public class LCRentIncomeTempToFormalBusiness extends BaseBussiness{ - public Object run(Transaction Sqlca) throws Exception{ - this.initBussinessParam(Sqlca); - LeaseFlowBaseService service=new LeaseFlowBaseServiceImp(); - MapfromCondtion=this.getDefaultTempToFormalFromCondtion(); - //将正式表中状态改为红冲状态 - BizObjectManager fiFormal = JBOFactory.getBizObjectManager(LC_FUND_INCOME.CLASS_NAME); - BizObjectManager fiTemp = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); - BizObjectManager riFormal = JBOFactory.getBizObjectManager(LC_RENT_INCOME.CLASS_NAME); - BizObjectManager riTemp = JBOFactory.getBizObjectManager(LC_RENT_INCOME_TEMP.CLASS_NAME); - BizObjectManager bom_lrp = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME); - Sqlca.join(fiFormal); - Sqlca.join(fiTemp); - Sqlca.join(riFormal); - Sqlca.join(riTemp); - Sqlca.join(bom_lrp); - List fits = DataOperatorUtil.getSetJBO(LC_FUND_INCOME_TEMP.CLASS_NAME, fromCondtion, Sqlca); - List rits = DataOperatorUtil.getSetJBO(LC_RENT_INCOME_TEMP.CLASS_NAME, fromCondtion, Sqlca); - String fsql="update O set ROLL_BACK=1 where ID=:ID "; - String tsql="update O set IS_FLOWING=1 where ID=:ID "; - String lsql = "update O set collect_status=:collect_status,collect_msg='租金红冲' where ID=:ID"; - MapotherProperty=this.getDefaultOtherProperty(); - if(fits.size()>0){ - for(BizObject fit:fits){ - fiFormal.createQuery(fsql).setParameter("ID", fit.getAttribute("INCOME_ID").getString()).executeUpdate(); - fiTemp.createQuery(tsql).setParameter("ID", fit.getAttribute("ID").getString()).executeUpdate(); - } - service.copyFundIncomeInfo(Sqlca, fromCondtion, null, otherProperty, ServiceOperatorEnum.TempToFormal,null); - } - if(rits.size()>0){ - for(BizObject rit:rits){ - riFormal.createQuery(fsql).setParameter("ID", rit.getAttribute("INCOME_ID").getString()).executeUpdate(); - riTemp.createQuery(tsql).setParameter("ID", rit.getAttribute("ID").getString()).executeUpdate(); - } - service.copyRentIncomeInfo(Sqlca, fromCondtion, null, otherProperty, ServiceOperatorEnum.TempToFormal,null); - } - List lrits = riTemp.createQuery("select plan_id from O where flowunid=:flowunid group by plan_id").setParameter("flowunid", this.getAttribute("flowunid").toString()).getResultList(false); - if(lrits.size()>0){ - for(BizObject lrit:lrits){ - String status = ""; - String planId = lrit.getAttribute("plan_id").toString(); - BizObject bo_lrp = bom_lrp.createQuery("select rent from O where id=:id").setParameter("id", planId).getSingleResult(false); - BizObject bo_lri = riFormal.createQuery("select sum(rent) as rent from O where plan_id=:plan_id group by plan_id").setParameter("plan_id", planId).getSingleResult(false); - String lriRent = bo_lri.getAttribute("rent").toString(); - if(new BigDecimal(lriRent).compareTo(new BigDecimal("0"))==1&&new BigDecimal(lriRent).compareTo(new BigDecimal(bo_lrp.getAttribute("rent").toString()))==-1){ - status = "部分收款"; - } - bom_lrp.createQuery(lsql).setParameter("collect_status", status).setParameter("ID", planId).executeUpdate(); - } - } - String sMessage="true"; - return sMessage; - } -} - +package com.tenwa.lease.flow.rent.rentreback; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +import jbo.app.tenwa.calc.LC_FUND_INCOME; +import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; +import jbo.app.tenwa.calc.LC_RENT_INCOME; +import jbo.app.tenwa.calc.LC_RENT_INCOME_TEMP; +import jbo.app.tenwa.calc.LC_RENT_PLAN; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService; +import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum; +import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp; + +public class LCRentIncomeTempToFormalBusiness extends BaseBussiness{ + public Object run(Transaction Sqlca) throws Exception{ + this.initBussinessParam(Sqlca); + LeaseFlowBaseService service=new LeaseFlowBaseServiceImp(); + MapfromCondtion=this.getDefaultTempToFormalFromCondtion(); + //将正式表中状态改为红冲状态 + BizObjectManager fiFormal = JBOFactory.getBizObjectManager(LC_FUND_INCOME.CLASS_NAME); + BizObjectManager fiTemp = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); + BizObjectManager riFormal = JBOFactory.getBizObjectManager(LC_RENT_INCOME.CLASS_NAME); + BizObjectManager riTemp = JBOFactory.getBizObjectManager(LC_RENT_INCOME_TEMP.CLASS_NAME); + BizObjectManager bom_lrp = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME); + Sqlca.join(fiFormal); + Sqlca.join(fiTemp); + Sqlca.join(riFormal); + Sqlca.join(riTemp); + Sqlca.join(bom_lrp); + List fits = DataOperatorUtil.getSetJBO(LC_FUND_INCOME_TEMP.CLASS_NAME, fromCondtion, Sqlca); + List rits = DataOperatorUtil.getSetJBO(LC_RENT_INCOME_TEMP.CLASS_NAME, fromCondtion, Sqlca); + String fsql="update O set ROLL_BACK=1 where ID=:ID "; + String tsql="update O set IS_FLOWING=1 where ID=:ID "; + String lsql = "update O set collect_status=:collect_status,collect_msg='租金红冲' where ID=:ID"; + MapotherProperty=this.getDefaultOtherProperty(); + if(fits.size()>0){ + for(BizObject fit:fits){ + fiFormal.createQuery(fsql).setParameter("ID", fit.getAttribute("INCOME_ID").getString()).executeUpdate(); + fiTemp.createQuery(tsql).setParameter("ID", fit.getAttribute("ID").getString()).executeUpdate(); + } + service.copyFundIncomeInfo(Sqlca, fromCondtion, null, otherProperty, ServiceOperatorEnum.TempToFormal,null); + } + if(rits.size()>0){ + for(BizObject rit:rits){ + riFormal.createQuery(fsql).setParameter("ID", rit.getAttribute("INCOME_ID").getString()).executeUpdate(); + riTemp.createQuery(tsql).setParameter("ID", rit.getAttribute("ID").getString()).executeUpdate(); + } + service.copyRentIncomeInfo(Sqlca, fromCondtion, null, otherProperty, ServiceOperatorEnum.TempToFormal,null); + } + String flowunid= this.getAttribute("FlowUnid").toString(); + List lrits = riTemp.createQuery("select plan_id from O where flowunid=:flowunid group by plan_id").setParameter("flowunid", flowunid).getResultList(false); + if(lrits.size()>0){ + for(BizObject lrit:lrits){ + String status = ""; + String planId = lrit.getAttribute("plan_id").toString(); + BizObject bo_lrp = bom_lrp.createQuery("select rent from O where id=:id").setParameter("id", planId).getSingleResult(false); + BizObject bo_lri = riFormal.createQuery("select sum(rent) as v.rent from O where plan_id=:plan_id group by plan_id").setParameter("plan_id", planId).getSingleResult(false); + String lriRent = bo_lri.getAttribute("rent").toString(); + if(new BigDecimal(lriRent).compareTo(new BigDecimal("0"))==1&&new BigDecimal(lriRent).compareTo(new BigDecimal(bo_lrp.getAttribute("rent").toString()))==-1){ + status = "部分收款"; + } + bom_lrp.createQuery(lsql).setParameter("collect_status", status).setParameter("ID", planId).executeUpdate(); + } + } + String sMessage="true"; + return sMessage; + } +} + diff --git a/src_tenwa/com/tenwa/makeContract/util/MakeOneCodeAndContractModel.java b/src_tenwa/com/tenwa/makeContract/util/MakeOneCodeAndContractModel.java index dbe26378a..bb5d4176b 100644 --- a/src_tenwa/com/tenwa/makeContract/util/MakeOneCodeAndContractModel.java +++ b/src_tenwa/com/tenwa/makeContract/util/MakeOneCodeAndContractModel.java @@ -288,16 +288,24 @@ public class MakeOneCodeAndContractModel { if(filename.indexOf("联合")>=0){ //设置图片宽度和高度 img.scaleAbsolute(160, 18); - //设置图片水印的位置。 + //设置图片水印的位置。第一个参:左右移动,小靠左。第二个参数上线移动:小的靠下 img.setAbsolutePosition(410, 815); + }else if(filename.indexOf("狮桥")>=0){ + //设置图片宽度和高度 + img.scaleAbsolute(160, 18); + //设置图片水印的位置。 + img.setAbsolutePosition(380, 750); }else{ img.scaleAbsolute(160, 22); img.setAbsolutePosition(400, 785); } PdfContentByte under = stamp.getUnderContent(1); under.addImage(img); - if(pages>2&&"02".equals(leasform)&&filename.indexOf("BJ90形式售后回租")<0 && filename.indexOf("联合")<0 && filename.indexOf("狮桥")<0){ + if(pages>2&&"02".equals(leasform)&&filename.indexOf("BJ90形式售后回租")<0 && filename.indexOf("狮桥")<0){ PdfContentByte under2 = stamp.getUnderContent(3); + if(filename.indexOf("联合")>=0){ + img.setAbsolutePosition(400, 785); + } under2.addImage(img); }