From 9a07941f4854a585e91b7bb1ca43bd6895ec29d9 Mon Sep 17 00:00:00 2001 From: wendongchao Date: Thu, 15 Aug 2019 17:52:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=B8=8B=E8=BD=BD=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=9A=E5=8A=A1=E7=94=B3=E8=AF=B7=E6=97=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=98=E9=87=8F=E5=AE=A2=E6=88=B7=E7=9A=84?= =?UTF-8?q?=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Tenwa/Comm/DocList/PayDocList.jsp | 3 +- .../com/tenwa/doc/action/DocListAction.java | 11 ++++- .../LBCustomerRelaTempToFormalBusiness.java | 27 +++++++++--- .../UpdateLbUnionLesseeCustomerName.java | 41 +++++++++++++++++++ 4 files changed, 74 insertions(+), 8 deletions(-) create mode 100644 src_tenwa/com/tenwa/lease/flow/project/commbusiness/UpdateLbUnionLesseeCustomerName.java diff --git a/WebContent/Tenwa/Comm/DocList/PayDocList.jsp b/WebContent/Tenwa/Comm/DocList/PayDocList.jsp index d72778d6a..34dcdadc7 100644 --- a/WebContent/Tenwa/Comm/DocList/PayDocList.jsp +++ b/WebContent/Tenwa/Comm/DocList/PayDocList.jsp @@ -237,9 +237,10 @@ function deleteFile(id){ heping(); } function downloadZipFile(){ + var objectType="<%=sObjectType%>"; var projectId="<%=projectId%>"; var classItemnos="<%=classItemno%>"; - var sParams="projectId="+projectId+",classItemnos="+classItemnos; + var sParams="projectId="+projectId+",classItemnos="+classItemnos+",objectType="+objectType; var ids = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","getLibraryIds",sParams); var filePath="<%=CurConfig.getConfigure("FileSavePath")%>"; var param="&flowunid=<%=flowunid%>&type=<%=type%>&ids="+ids; diff --git a/src_core/com/tenwa/doc/action/DocListAction.java b/src_core/com/tenwa/doc/action/DocListAction.java index df2b32c20..9b3173088 100644 --- a/src_core/com/tenwa/doc/action/DocListAction.java +++ b/src_core/com/tenwa/doc/action/DocListAction.java @@ -44,6 +44,8 @@ public class DocListAction { public String projectId; + public String objectType; + public String deleteFile(JBOTransaction tx) throws Exception{ if(attId==null||attId==""){ @@ -198,7 +200,7 @@ public class DocListAction { String itemnos = classItemnos.replace("@", ","); String sql = "SELECT O.ID from O " + " left join jbo.app.tenwa.doc.LB_DOCRELATIVE rela on rela.id=O.relative_Id" - + " where rela.proj_id='"+projectId+"' and rela.objecttype='BusinessApplyFlow'" + + " where rela.proj_id='"+projectId+"' and rela.objecttype='"+objectType+"'" + " and O.doc_Class_Itemno in ("+itemnos+")" + " ORDER BY DOC_CLASS_ITEMNO,Serial_Num"; BizObjectManager relaBm = JBOFactory @@ -223,6 +225,13 @@ public class DocListAction { } + public String getObjectType() { + return objectType; + } + + public void setObjectType(String objectType) { + this.objectType = objectType; + } public String getClassItemnos() { return classItemnos; diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaTempToFormalBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaTempToFormalBusiness.java index 7e4525ef6..79e85bbbc 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaTempToFormalBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaTempToFormalBusiness.java @@ -47,7 +47,7 @@ public class LBCustomerRelaTempToFormalBusiness extends BaseBussiness { //String certType = this.getAttribute("certType").toString(); String certType = this.getAttribute("certtype").toString(); //String certId = this.getAttribute("certNo").toString(); - String certId = this.getAttribute("certid").toString(); + String certId = this.getAttribute("certid").toString(); BizObjectManager bomCT1 = JBOFactory.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME,Sqlca); BizObjectManager bomCTT1 = JBOFactory.getBizObjectManager(CUSTOMER_TYPE.CLASS_NAME,Sqlca); //客户类型临时表 List boCT1 = bomCT1.createQuery("certtype='"+certType+"' and certid='"+certId+"'").getResultList(false); @@ -85,17 +85,32 @@ public class LBCustomerRelaTempToFormalBusiness extends BaseBussiness { fromCondtion.put("flowunid",flowunid); BizObject cibo = DataOperatorUtil.getJBOBySQL("flowunid=:flowunid", LB_UNION_LESSEE_TEMP.CLASS_NAME, fromCondtion, Sqlca); String custid2 = cibo.getAttribute("customer_id").toString(); + String custName = cibo.getAttribute("customer_name").toString(); fromCondtion.put("customerid", custid2);//区别担保人和承租人 otherProperty.clear(); - otherProperty.put("customerid", CustId1); - DataOperatorUtil.copySingleJBO(CUSTOMER_INFO_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_INFO.CLASS_NAME, otherProperty, otherProperty, Sqlca); + otherProperty.put("customerid", CustId1); + + //修改CUSTOMER_INFO、CUSTOMER_CERT + MapinfoProperty=new HashMap(); + infoProperty.put("customerid", CustId1); + infoProperty.put("customername", custName); + //修改CUSTOMER_PERSON + MappersonProperty=new HashMap(); + personProperty.put("customerid", CustId1); + personProperty.put("FULLNAME", custName); + //更新CUSTOMER_COMPANY + MapcompanyProperty=new HashMap(); + companyProperty.put("customerid", CustId1); + companyProperty.put("enterprisename", custName); + + DataOperatorUtil.copySingleJBO(CUSTOMER_INFO_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_INFO.CLASS_NAME, otherProperty, infoProperty, Sqlca); if("03".equals(this.getAttribute("CustomerType"))){ // 自然人 - DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, otherProperty, otherProperty, Sqlca); + DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, otherProperty, personProperty, Sqlca); }else{ - DataOperatorUtil.copySingleJBO(CUSTOMER_COMPANY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_COMPANY.CLASS_NAME, otherProperty, otherProperty, Sqlca); + DataOperatorUtil.copySingleJBO(CUSTOMER_COMPANY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_COMPANY.CLASS_NAME, otherProperty, companyProperty, Sqlca); } DataOperatorUtil.copySingleJBO(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, otherProperty, otherProperty, Sqlca); - DataOperatorUtil.copySingleJBO(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, otherProperty, otherProperty, Sqlca); + DataOperatorUtil.copySingleJBO(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, otherProperty, infoProperty, Sqlca); // DataOperatorUtil.copySingleJBO(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY.CLASS_NAME, otherProperty, otherProperty, Sqlca); DataOperatorUtil.copySingleJBO(CUSTOMER_TYPE_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_TYPE.CLASS_NAME, otherProperty, otherProperty, Sqlca); /* CustomerCompare cc= new CustomerCompare(); diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/UpdateLbUnionLesseeCustomerName.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/UpdateLbUnionLesseeCustomerName.java new file mode 100644 index 000000000..5b34dd59e --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/UpdateLbUnionLesseeCustomerName.java @@ -0,0 +1,41 @@ +package com.tenwa.lease.flow.project.commbusiness; + +import java.util.HashMap; +import java.util.Map; + +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; + +import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE; +import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP; + +/** + * 业务申请结束更新承租人表客户名称 + * @author dong + * + */ +public class UpdateLbUnionLesseeCustomerName extends BaseBussiness { + + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + LeaseFlowBaseService service=new LeaseFlowBaseServiceImp(); + MapfromCondtion=new HashMap(); + String flowunid = this.getAttribute("FlowUnid").toString(); + fromCondtion.put("flowunid",flowunid); + BizObject cibo = DataOperatorUtil.getJBOBySQL("flowunid=:flowunid", LB_UNION_LESSEE_TEMP.CLASS_NAME, fromCondtion, Sqlca); + String customerid = cibo.getAttribute("customer_id").toString(); + String customername = cibo.getAttribute("customer_name").toString(); + BizObjectManager bm=JBOFactory.getBizObjectManager(LB_UNION_LESSEE.CLASS_NAME,Sqlca); + bm.createQuery("update O set customer_name='"+customername+"' where customer_id='"+customerid+"'").executeUpdate(); + String sMessage="true"; + return sMessage; + } +} \ No newline at end of file