From aa5743fae86bff9295428f58dbf56a70aef8f44e Mon Sep 17 00:00:00 2001 From: user Date: Thu, 21 Jun 2018 19:32:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=9A=E5=8A=A1=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=B5=81=E7=A8=8B=E5=8F=91=E8=B5=B7=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectApprovalCreationInfo.jsp | 2 - .../LBProjectIntoTempInitCarBusiness.java | 50 +++++++++++++------ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp index 4abd47d64..343afb2eb 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp @@ -246,14 +246,12 @@ var lease = false; var carAttributes = getItemValue(0,getRow(),"carAttributes"); if(!carAttributes){ - carAttr = false; }else{ carAttr = true; } var leasehold = getItemValue(0,getRow(),"leasehold"); if(!leasehold){ - lease = false; }else{ lease = true; 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 4cb7dc96c..22ca4521a 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java @@ -33,7 +33,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { BizObjectManager bmLCIT = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO_TEMP.CLASS_NAME,Sqlca); Sqlca.join(bm); - String customerid = UUIDUtil.getUUID(); + String customerId = UUIDUtil.getUUID(); BizObject bo = bm.newObject(); BizObject boCRT = bmCPT.newObject(); @@ -49,19 +49,38 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { bmLCI.setAttributeValue("VERSIONID", this.getAttribute("versionid")); boCRT.setAttributeValue("flowunid", this.getAttribute("FlowUnid")); - boCRT.setAttributeValue("customerid", customerid); - boCRT.setAttributeValue("InputOrgID", asUser.getOrgID()); - boCRT.setAttributeValue("InputUserID", asUser.getUserID()); - boCRT.setAttributeValue("InputTime", StringFunction.getToday()); - boCRT.setAttributeValue("CERTTYPE", this.getAttribute("certtype")); - boCRT.setAttributeValue("CERTID", this.getAttribute("certid")); - boCRT.setAttributeValue("FULLNAME", this.getAttribute("custname")); - - bmLP.setAttributeValue("flowunid", this.getAttribute("FlowUnid")); - bmLP.setAttributeValue("customerid", customerid); - bmLP.setAttributeValue("enterprisename", this.getAttribute("custname")); - bmLP.setAttributeValue("certtype", this.getAttribute("certtype")); - bmLP.setAttributeValue("certid", this.getAttribute("certid")); + //根据身份证号判断是否存在该客户,如果有,则带出客户编号 + String certId = this.getAttribute("certid").toString(); + BizObject bmbo = bmCPT.createQuery("certid=:certid").setParameter("certid", certId).getSingleResult(false); + if(bmbo != null){ + customerId = bmbo.getAttribute("CUSTOMERID").toString(); + String customerName = bmbo.getAttribute("FULLNAME").toString(); + boCRT.setAttributeValue("customerid", customerId); + boCRT.setAttributeValue("InputOrgID", asUser.getOrgID()); + boCRT.setAttributeValue("InputUserID", asUser.getUserID()); + boCRT.setAttributeValue("InputTime", StringFunction.getToday()); + boCRT.setAttributeValue("CERTTYPE", this.getAttribute("certtype")); + boCRT.setAttributeValue("CERTID", certId); + boCRT.setAttributeValue("FULLNAME", customerName); + }else{ + boCRT.setAttributeValue("customerid", customerId); + boCRT.setAttributeValue("InputOrgID", asUser.getOrgID()); + boCRT.setAttributeValue("InputUserID", asUser.getUserID()); + boCRT.setAttributeValue("InputTime", StringFunction.getToday()); + boCRT.setAttributeValue("CERTTYPE", this.getAttribute("certtype")); + boCRT.setAttributeValue("CERTID", this.getAttribute("certid")); + boCRT.setAttributeValue("FULLNAME", this.getAttribute("custname")); + } + + //根据客户类型设置参数 + String certType = this.getAttribute("certtype").toString(); + if(certType.equals("Ent01")){ + bmLP.setAttributeValue("flowunid", this.getAttribute("FlowUnid")); + bmLP.setAttributeValue("customerid", customerId); + bmLP.setAttributeValue("enterprisename", this.getAttribute("custname")); + bmLP.setAttributeValue("certtype", this.getAttribute("certtype")); + bmLP.setAttributeValue("certid", this.getAttribute("certid")); + } bmLEC.setAttributeValue("FLOWUNID", this.getAttribute("FlowUnid")); bmLEC.setAttributeValue("MODEL", this.getAttribute("carSystem")); @@ -71,7 +90,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { boLULT.setAttributeValue("project_id", this.getAttribute("ProjectId")); - boLULT.setAttributeValue("customer_id", customerid); + boLULT.setAttributeValue("customer_id", customerId); boLULT.setAttributeValue("flowunid", this.getAttribute("FlowUnid")); boLULT.setAttributeValue("InputOrgID", asUser.getOrgID()); boLULT.setAttributeValue("InputUserID", asUser.getUserID()); @@ -86,6 +105,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { bo.setAttributeValue("project_name",this.getAttribute("ProjectNo")); bo.setAttributeValue("project_manage",this.getAttribute("CurUserID")); bo.setAttributeValue("project_dept",asUser.getOrgID()); + String versionid = this.getAttribute("versionid").toString(); String bustype = this.getAttribute("businessType").toString();