From b531bbf03393a077ae7941951aeb1bd1add71095 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Sat, 7 Dec 2019 19:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E4=B8=BB=E4=BD=93=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E5=90=88=E5=90=8C=E6=A8=A1=E6=9D=BF=E5=B9=B6=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E7=9B=96=E7=AB=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Comm/LBContract/LBContractPrintList.jsp | 10 +- .../LBContractTemplate/contract_template.jsp | 6 +- .../handle/FileTemplateUtil.java | 73 ++++++-- .../action/ContractSignAction.java | 173 ++++++++++++++---- src_core/com/tenwa/util/SerialNumberUtil.java | 2 +- .../ContractApprovalStartAction.java | 8 +- 6 files changed, 212 insertions(+), 60 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp index 026ed65ba..385090537 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp @@ -13,6 +13,8 @@ String productId = CurPage.getParameter("ProductId"); String flowunid = CurPage.getParameter("FlowUnid"); String action = CurPage.getParameter("action"); + String SubjectId=CurPage.getParameter("SubjectId");//获取主体ID + ASObjectModel doTemp = new ASObjectModel("LBContractPrintList"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--设置为Grid风格-- @@ -121,7 +123,7 @@ } //自然人电子签约 - var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","signIng","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>,FlowUnid=<%=flowunid%>"); + var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","signIng","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>,FlowUnid=<%=flowunid%>,,SubjectId=<%=SubjectId%>"); var sReturns = sReturn.split("@"); if("success"==sReturns[0]){ AsDebug.showMessage("提示","电子签约发起成功!","","",true,"","","",function(){ @@ -165,7 +167,7 @@ AsDebug.showMessage("提示","没有发起电子签约,无法获取签约状态!","","",true); return; } - var sParams="ProjectId=<%=projectId%>,customerType=<%=custtype%>,FlowUnid=<%=flowunid%>,CurUserID=<%=CurUser.getUserID()%>"; + var sParams="ProjectId=<%=projectId%>,customerType=<%=custtype%>,FlowUnid=<%=flowunid%>,CurUserID=<%=CurUser.getUserID()%>,SubjectId=<%=SubjectId%>"; var sReturn=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","contractSignStatus",sParams); AsDebug.showMessage("提示",sReturn,"","",true,'','','',function(){ <%-- var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>"); --%> @@ -299,7 +301,7 @@ //重新发送短信 function sendMessageAgain(){ - var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>"); + var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>,FlowUnid=<%=flowunid%>"); var result=results.split("@"); if(eval(result[0])<3){ AsDebug.showMessage("提示","请先制作合同!","","",true); @@ -313,7 +315,7 @@ AsDebug.showMessage("提示","没有发起电子签约,无法发送短信!","","",true); return; } - var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sendMessageAgain","ProjectId=<%=projectId%>"); + var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sendMessageAgain","ProjectId=<%=projectId%>,SubjectId=<%=SubjectId%>"); if("success"==sReturn){ AsDebug.showMessage("提示","短信发送成功!","","",true); }else{ diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp index 670b18bdf..e07fcea22 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp @@ -26,6 +26,8 @@ String flowName=CurPage.getParameter("FlowName");//获取合同名称 String contractid=CurPage.getParameter("ContractId");//获取合同id String isnetcar=CurPage.getParameter("isNetCar");//获取是否是网约车 + String SubjectId=CurPage.getParameter("SubjectId");//获取主体ID + if(null==contractNo ||"null".equals(contractNo) ){ contractNo=FlowKey; } @@ -172,7 +174,7 @@ $('#A_Group_0010').css('display','none'); $('#A_Group_0020').css('display','none'); } - var sReturn = RunJavaMethodSqlca("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","getContractClass","leasform="+"<%=leasform%>"+",isNetCar="+"<%=CurPage.getParameter("isNetCar")%>"+",operationType="+operationType); + var sReturn = RunJavaMethodSqlca("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","getContractClass","leasform="+"<%=leasform%>"+",isNetCar="+"<%=CurPage.getParameter("isNetCar")%>"+",operationType="+operationType+",SubjectId=<%=SubjectId%>"); var jsonData=eval("("+sReturn+")"); initFileTemplate(eval("("+jsonData[0].fileTemplate+")")); // initOneClass(); @@ -351,7 +353,7 @@ return; } if(("01"=="<%=customertype%>"&&"Auto" == "<%=sealType%>" )||("Auto" == "<%=sealType%>" && "Hand" == "<%=signType%>" )){ - var falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","compnySignIng","FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>"); + var falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","compnySignIng","FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>,SubjectId=<%=SubjectId%>"); if("success"!= falg ){ RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","companyUpdateDocContractStatus","FlowUnid=<%=flowunid%>"+",ProjectId=<%=projectId%>"); alert("生成失败!!!"); diff --git a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java index 522d743a3..a69e2642e 100644 --- a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java +++ b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java @@ -42,6 +42,7 @@ public class FileTemplateUtil { public String contractNo; public String isNetCar;//用于判断是否是网约车 public String operationType;//用于判断是否是北汽产品 + public String SubjectId; public String getTemplateCalss() {return templateCalss;} public void setTemplateCalss(String templateCalss) {this.templateCalss = templateCalss;} @@ -99,6 +100,12 @@ public class FileTemplateUtil { public void setOperationType(String operationType) { this.operationType = operationType; } + public String getSubjectId() { + return SubjectId; + } + public void setSubjectId(String subjectId) { + SubjectId = subjectId; + } public String getTemplateClass(Transaction Sqlca) throws Exception{ String fileClass=templateCalss.replaceAll("@", ","); @@ -137,29 +144,57 @@ public class FileTemplateUtil { } public String getContractClass(Transaction Sqlca){ - if("BAIC_MOTOR".equals(operationType)){//北汽财务 - if("01".equals(leasform)){ - return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'b20b919c6144480b9466e4ea9b0da142'}]"+"\"}]"; + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){//天津合同模板 + if("BAIC_MOTOR".equals(operationType)){//北汽财务 + if("01".equals(leasform)){ + return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'22244a8b74c54ed5b9f09de7e0ef1aad'}]"+"\"}]"; + }else{ + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'99ddc65b2cfc493eb19d30778d012165'}]"+"\"}]"; + } + }else if ("DYCD".equals(operationType)){//第一车贷 + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'12ef786b7e2c45d892e7b8588972b4f1'}]"+"\"}]"; + }else if ("ZYC".equals(operationType)){//专用车产品 + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'5433d6bb0ead4f3abc3dbad6aefa1d90'}]"+"\"}]"; + }else if ("KJZL".equals(operationType)){//凯捷租赁 + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)_凯捷','value':'3a95f3e7e1c54e53b203bfb04d35ff32'}]"+"\"}]"; + }else if ("BZZL".equals(operationType)){//保值租赁 + return "[{'fileTemplate':\""+"[{'text':'保值租赁','value':'32b77942767c410c922a429ea5d8902e'}]"+"\"}]"; + }else if ("WYC".equals(operationType)){//网约车 + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)和抵押合同','value':'1e225320f6214bb08c87c88a3653b542'}]"+"\"}]"; + }else if ("DT".equals(operationType)){//大通 + return "[{'fileTemplate':\""+"[{'text':'大通售后回租模板','value':'25b9e9440c574f89bccfdf148b12128d'}]"+"\"}]"; }else{ - return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'115905186577406ea5414dd14e592e7d'}]"+"\"}]"; + if("01".equals(leasform)){ + return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'333cd5b36cd846938e618516ba9c8cbb'}]"+"\"}]"; + }else{ + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'5c494617683548a49cfc050f60067ea2'}]"+"\"}]"; + } } - }else if ("DYCD".equals(operationType)){//第一车贷 - return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'8d4232a5423e491ca905e77c54105a85'}]"+"\"}]"; - }else if ("ZYC".equals(operationType)){//专用车产品 - return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'35aab6dbac5f4ba292cd67a0914eae2e'}]"+"\"}]"; - }else if ("KJZL".equals(operationType)){//凯捷租赁 - return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)_凯捷','value':'a4fcbd2990d1479a9ba8ce440155f2f0'}]"+"\"}]"; - }else if ("BZZL".equals(operationType)){//保值租赁 - return "[{'fileTemplate':\""+"[{'text':'保值租赁','value':'91c7718aa925428ca312e343d1f5149f'}]"+"\"}]"; - }else if ("WYC".equals(operationType)){//网约车 - return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)和抵押合同','value':'c8d5b729a0954482877c26a1293b766b'}]"+"\"}]"; - }else if ("DT".equals(operationType)){//大通 - return "[{'fileTemplate':\""+"[{'text':'大通售后回租模板','value':'51a5f03ebe3b45cc8ae2b32fdaeceeae'}]"+"\"}]"; }else{ - if("01".equals(leasform)){ - return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'24aba365e2794a018814ae81341486bf'}]"+"\"}]"; + if("BAIC_MOTOR".equals(operationType)){//北汽财务 + if("01".equals(leasform)){ + return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'b20b919c6144480b9466e4ea9b0da142'}]"+"\"}]"; + }else{ + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'115905186577406ea5414dd14e592e7d'}]"+"\"}]"; + } + }else if ("DYCD".equals(operationType)){//第一车贷 + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'8d4232a5423e491ca905e77c54105a85'}]"+"\"}]"; + }else if ("ZYC".equals(operationType)){//专用车产品 + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'35aab6dbac5f4ba292cd67a0914eae2e'}]"+"\"}]"; + }else if ("KJZL".equals(operationType)){//凯捷租赁 + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)_凯捷','value':'a4fcbd2990d1479a9ba8ce440155f2f0'}]"+"\"}]"; + }else if ("BZZL".equals(operationType)){//保值租赁 + return "[{'fileTemplate':\""+"[{'text':'保值租赁','value':'91c7718aa925428ca312e343d1f5149f'}]"+"\"}]"; + }else if ("WYC".equals(operationType)){//网约车 + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)和抵押合同','value':'c8d5b729a0954482877c26a1293b766b'}]"+"\"}]"; + }else if ("DT".equals(operationType)){//大通 + return "[{'fileTemplate':\""+"[{'text':'大通售后回租模板','value':'51a5f03ebe3b45cc8ae2b32fdaeceeae'}]"+"\"}]"; }else{ - return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'641c55a1168f4a488a5028ee68870156'}]"+"\"}]"; + if("01".equals(leasform)){ + return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'24aba365e2794a018814ae81341486bf'}]"+"\"}]"; + }else{ + return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'641c55a1168f4a488a5028ee68870156'}]"+"\"}]"; + } } } } diff --git a/src/com/tenwa/channelportal/action/ContractSignAction.java b/src/com/tenwa/channelportal/action/ContractSignAction.java index d8d424af9..ba463e804 100644 --- a/src/com/tenwa/channelportal/action/ContractSignAction.java +++ b/src/com/tenwa/channelportal/action/ContractSignAction.java @@ -79,11 +79,18 @@ public class ContractSignAction{ public String Ttype; public String contractNo; public String leasform; + public String SubjectId; private static Logger logger=Logger.getLogger(ContractSignAction.class); @SuppressWarnings("deprecation") public static String getConfigRequestUrl() throws Exception{ return Configure.getInstance().getConfigure("RequestHessionUrl"); } + + @SuppressWarnings("deprecation") + public static String getConfigRequestUrlTj() throws Exception{ + return Configure.getInstance().getConfigure("RequestHessionUrlTj"); + } + @SuppressWarnings("deprecation") public static String getFileSavePath() throws Exception{ return Configure.getInstance().getConfigure("FileSavePath"); @@ -221,6 +228,12 @@ public class ContractSignAction{ public void setLeasform(String leasform) { this.leasform = leasform; } + public String getSubjectId() { + return SubjectId; + } + public void setSubjectId(String subjectId) { + SubjectId = subjectId; + } /** * 自然人电子签约 * @@ -231,7 +244,11 @@ public class ContractSignAction{ */ @SuppressWarnings("unchecked") public String signIng(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } //BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx); BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, tx); BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); @@ -270,6 +287,7 @@ public class ContractSignAction{ con.setInputfile(BASE64.encodeImgageToBase64(file)); list.add(con); } + Map fromCondtion = new HashMap(); Map otherProperty = new HashMap(); Map resultMap = requestService.createContractSign(map); @@ -371,7 +389,11 @@ public class ContractSignAction{ @SuppressWarnings("unchecked") public String compnySignIng(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } //BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx); BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, tx); BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); @@ -520,7 +542,11 @@ public class ContractSignAction{ */ @SuppressWarnings("unchecked") public String companySignIng(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx); BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); Map> map = new HashMap>(); @@ -654,7 +680,11 @@ public class ContractSignAction{ * @throws Exception */ public String PersonDeductSignIng(JBOTransaction tx) throws Exception{ - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); Map> map = new HashMap>(); ContractSignInfo con = null; @@ -783,8 +813,12 @@ public class ContractSignAction{ * @throws Exception */ public String AdjustFordSignIng(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); - BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } + BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); Map> map = new HashMap>(); ContractSignInfo con = null; List bo = null; @@ -900,8 +934,12 @@ public class ContractSignAction{ * @throws Exception */ public String getAdjustFordSignStatus(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); - BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } + BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx); List ldclBoList = ldclBom.createQuery("flow_unid='" + FlowUnid + "' and file_flag='yes' and " + "sendprocess='1'").getResultList(true); @@ -953,8 +991,11 @@ public class ContractSignAction{ * @throws Exception */ public String contractSignStatusForContract(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); - BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx); List ldclBoList = ldclBom.createQuery("flow_unid='" + FlowUnid + "' and file_flag='yes' and " + "sendprocess='1'").getResultList(true); @@ -1006,8 +1047,11 @@ public class ContractSignAction{ * @throws Exception */ public String contractSignStatus(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); - //BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } //BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx); BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, tx); BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx); BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); @@ -1114,8 +1158,12 @@ public class ContractSignAction{ * @throws Exception */ public String changeCarSignStatus(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); - BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } + BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx); BizObjectManager ldlMange = JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME, tx); BizObjectManager ldMange = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME, tx); BizObjectManager lulMange = JBOFactory.getBizObjectManager(LB_UNION_LESSEE.CLASS_NAME, tx); @@ -1195,8 +1243,12 @@ public class ContractSignAction{ * @throws Exception */ public String contractSignStatusList(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); - BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } + BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx); BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx); BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); BizObjectManager ldBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME, tx); @@ -1233,7 +1285,11 @@ public class ContractSignAction{ * @throws Exception */ public String sign(JBOTransaction tx) throws MalformedURLException, Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); @SuppressWarnings("unchecked") List bo = contBom.createQuery("project_id=:projectId and file_flag='yes'") @@ -1248,6 +1304,7 @@ public class ContractSignAction{ list.add(keys.getAttribute("DOCUMENT_ID").toString()+"@"+keys.getAttribute("doc_name").toString()); map.put(keys.getAttribute("singcontract_id").toString(), list); } + Map resultMap = requestService.Sign(map); String statu = resultMap.get("error"); if (statu == null) { @@ -1267,7 +1324,11 @@ public class ContractSignAction{ * @throws MalformedURLException */ public String downloadDoc(JBOTransaction tx) throws MalformedURLException, Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); String sql = ""; if ("01".equals(customerType)) { @@ -1327,8 +1388,12 @@ public class ContractSignAction{ * @throws MalformedURLException */ public String changedownloadDoc(JBOTransaction tx) throws MalformedURLException, Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); - BizObjectManager ldMange = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME, tx); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } + BizObjectManager ldMange = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME, tx); String sql = "OBJECTTYPE='ChangeCar' and FLOW_UNID=:flowunid and CONTRACT_ID=:contractid "; @SuppressWarnings("unchecked") BizObject ldb = ldMange.createQuery(sql).setParameter("flowunid",FlowUnid).setParameter("contractid",contract_id).getSingleResult(true); @@ -1376,7 +1441,11 @@ public class ContractSignAction{ //扣款卡变更下载合同 public String downloadDocContract(JBOTransaction tx) throws MalformedURLException, Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); String sql = ""; sql = "flow_unid=:flow_unid and file_flag='yes'"; @@ -1436,8 +1505,11 @@ public class ContractSignAction{ * @throws MalformedURLException */ public String downloadZipContract(JBOTransaction tx) throws MalformedURLException, Exception{ - requestService = (HttpRequestAppService) factory.create( - HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager contBom=JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); try{ String path=null; @@ -1475,8 +1547,11 @@ public String downloadZipContract(JBOTransaction tx) throws MalformedURLExceptio * @throws MalformedURLException */ public String download(JBOTransaction tx) throws MalformedURLException, Exception{ - requestService = (HttpRequestAppService) factory.create( - HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager contBom=JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); try{ String path=null; @@ -1852,7 +1927,11 @@ public String AccountAccreditSign(JBOTransaction tx){ } } public String accountSign(JBOTransaction tx,String flowunid,String orgid) throws Exception{ - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME,tx); BizObjectManager attrBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME,tx); Map map=new HashMap(); @@ -1958,7 +2037,11 @@ public String getFlowUnid(JBOTransaction tx) throws JBOException{ * */ public String sendMessageAgain(JBOTransaction tx) { try{ - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); List bo = null; String file = new String(); @@ -2002,7 +2085,11 @@ public String sendMessageAgain(JBOTransaction tx) { * */ public String ChangesendMessageAgain(JBOTransaction tx) { try{ - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } List bo = null; String file = new String(); Map contractmap = new HashMap(); @@ -2059,7 +2146,11 @@ public String getProcess(JBOTransaction tx){ } public String claimSign(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); ContractSignInfo con = null; BizObject bo = null; @@ -2151,7 +2242,11 @@ public String claimSign(JBOTransaction tx) throws Exception { * @throws Exception */ public String claimSignA(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } String libraryid=""; PLAN_LIST=PLAN_LIST.split("\\.")[0]; BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME); @@ -2264,7 +2359,11 @@ public String claimSign(JBOTransaction tx) throws Exception { * @throws Exception */ public String changeCarSignA(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } String libraryid=""; BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME,tx); BizObjectManager bom1=null; @@ -2349,7 +2448,11 @@ public String claimSign(JBOTransaction tx) throws Exception { * @throws Exception */ public String collectionSignA(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } String libraryid=""; BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME); BizObject DOCRELATIVE = null; @@ -2498,7 +2601,11 @@ public String claimSign(JBOTransaction tx) throws Exception { */ public String TcollectionSignA(JBOTransaction tx) throws Exception { - requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj()); + }else{ + requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl()); + } String libraryid=""; BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME); BizObject DOCRELATIVE = null; diff --git a/src_core/com/tenwa/util/SerialNumberUtil.java b/src_core/com/tenwa/util/SerialNumberUtil.java index 7b38f2e51..aada520a6 100644 --- a/src_core/com/tenwa/util/SerialNumberUtil.java +++ b/src_core/com/tenwa/util/SerialNumberUtil.java @@ -167,7 +167,7 @@ public class SerialNumberUtil { int year = Integer.parseInt(currentYear); int month = Integer.parseInt(currentMonth); int day = Integer.parseInt(currentDay); - return SerialNumberUtil.getSerialNumberByDay("BQAP("+dept+"){year}{month}{day}{maxOrderNumber}",4,null, "合同编号", year,month,day, tx); + return SerialNumberUtil.getSerialNumberByDay(dept+"{year}{month}{day}{maxOrderNumber}",4,null, "合同编号", year,month,day, tx); } /*public static String getContractSerialNaumber(String sSerialType,JBOTransaction tx) throws Exception { diff --git a/src_tenwa/com/tenwa/lease/flow/contract/contractapproval/ContractApprovalStartAction.java b/src_tenwa/com/tenwa/lease/flow/contract/contractapproval/ContractApprovalStartAction.java index 8b9e1db2b..e975b5edd 100644 --- a/src_tenwa/com/tenwa/lease/flow/contract/contractapproval/ContractApprovalStartAction.java +++ b/src_tenwa/com/tenwa/lease/flow/contract/contractapproval/ContractApprovalStartAction.java @@ -34,8 +34,9 @@ public class ContractApprovalStartAction extends BaseFlowStartAction{ String productid=bo.getAttribute("PRODUCT_ID").getString(); String deptid=bo.getAttribute("PROJECT_DEPT").getString(); String area_code=bo.getAttribute("AREA_CODE").getString(); + String subjectid=bo.getAttribute("subjectid").getString(); String contractno=""; - String dept=""; + String dept="BQAP("; /* if(deptid.equals("8000900020001")){//cx dept+="cx"; @@ -63,6 +64,11 @@ public class ContractApprovalStartAction extends BaseFlowStartAction{ }else{//回租 dept+="H"; } + if("d989246c11c111eaaa0000163e0e11e6".equals(subjectid)){ + dept+=")TJ"; + }else{ + dept+=")SZ"; + } contractno=SerialNumberUtil.getContractSerialNaumber(dept,area_code, tx); // } this.FlowParam.put("ContractNo", contractno);