From bf951854a67576ebbc527519b5102c2c6f3f52f6 Mon Sep 17 00:00:00 2001 From: user Date: Wed, 18 Jul 2018 16:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=94=B3=E8=AF=B7=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=81=E7=A8=8B=E5=BC=80=E5=A7=8B=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E6=A0=B9=E6=8D=AE=E4=B8=9A=E5=8A=A1=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E7=94=9F=E6=88=90=E7=9B=B8=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BC=96=E5=8F=B7=E3=80=821=E6=98=AF?= =?UTF-8?q?=E6=B1=BD=E8=BD=A6=E4=B8=9A=E5=8A=A1=EF=BC=8C2=E6=98=AF?= =?UTF-8?q?=E4=BC=A0=E7=BB=9F=E4=B8=9A=E5=8A=A1=EF=BC=8C3=E6=98=AF?= =?UTF-8?q?=E6=B1=BD=E8=BD=A6=E4=BC=A0=E7=BB=9F=E4=B8=9A=E5=8A=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectApprovalCreationInfo.jsp | 39 +++++++-------- src_core/com/tenwa/util/SerialNumberUtil.java | 4 +- .../BusinessApprovalStartAction.java | 50 +++++++++++-------- 3 files changed, 49 insertions(+), 44 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp index ad2bce222..790151371 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp @@ -94,25 +94,24 @@ { //从页面上获取客户编号,产品编号 - var carAttributes = getItemValue(0,getRow(),"carAttributes"); - var leasehold = getItemValue(0,getRow(),"leasehold"); - var productModel =getItemValue(0,getRow(),"productModel"); - var carSeries = getItemValue(0,getRow(),"carSeries"); - var carSystem = getItemValue(0,getRow(),"carSystem"); - var productId = getItemValue(0,getRow(),"productId"); - var productname = getItemValue(0,getRow(),"productName"); - var custid = getItemValue(0,getRow(),"CustomerID"); - var custname = getItemValue(0,getRow(),"CustomerName"); - var customerType = getItemValue(0,getRow(),"Customer_type"); - var certtype = getItemValue(0,getRow(),"certtype"); - var certid = getItemValue(0,getRow(),"certid"); - var versionid = getItemValue(0,getRow(),"versionid"); - var modelid = getItemValue(0,getRow(),"modelid"); - var certid = getItemValue(0,getRow(),"certid"); - var businessType = "1"; - var price = getItemValue(0,getRow(),"price"); - var liter = getItemValue(0,getRow(),"liter"); - var geartype = getItemValue(0,getRow(),"geartype"); + var carAttributes = getItemValue(0,getRow(),"carAttributes");//车辆属性 + var leasehold = getItemValue(0,getRow(),"leasehold");//租赁方式 + var productModel =getItemValue(0,getRow(),"productModel");//品牌 + var carSeries = getItemValue(0,getRow(),"carSeries");//车系 + var carSystem = getItemValue(0,getRow(),"carSystem");//车型 + var productId = getItemValue(0,getRow(),"productId");//产品ID + var productname = getItemValue(0,getRow(),"productName");//产品名称 + var custid = getItemValue(0,getRow(),"CustomerID");//客户ID + var custname = getItemValue(0,getRow(),"CustomerName");//客户名称 + var customerType = getItemValue(0,getRow(),"Customer_type");//客户类型 + var certtype = getItemValue(0,getRow(),"certtype");//证件类型 + var certid = getItemValue(0,getRow(),"certid");//证件号 + var versionid = getItemValue(0,getRow(),"versionid");//版本ID + var modelid = getItemValue(0,getRow(),"modelid");//车型ID + var businessType = "1";//业务类型,1是汽车业务,2是传统业务,3是汽车传统业务 + var price = getItemValue(0,getRow(),"price");//车辆指导价 + var liter = getItemValue(0,getRow(),"liter");//排量 + var geartype = getItemValue(0,getRow(),"geartype");//档位 if(carAttributes==""){ alert("请选择车辆属性"); @@ -154,7 +153,7 @@ var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>"; sParams =sParams+",ProductId="+productId+",ProductName="+productname+",CustomerType="+customerType+",carAttributes="+carAttributes+",leasehold="+leasehold+",carSystem="+carSystem+",custname="+custname+",certtype="+certtype+",certid="+certid+",productModel="+productModel+",carSeries="+carSeries+",versionid="+versionid+",modelid="+modelid+",businessType="+businessType+",price="+price+",liter="+liter+",geartype="+geartype; - var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.projectapproval.BusinessApprovalStartAction","initFLow",sParams); + var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.projectapproval.BusinessApprovalStartAction","initFLow",sParams);//定义流程中需要的参数 if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_" ) { doCancel(); diff --git a/src_core/com/tenwa/util/SerialNumberUtil.java b/src_core/com/tenwa/util/SerialNumberUtil.java index 06a8c6852..3996a22f3 100644 --- a/src_core/com/tenwa/util/SerialNumberUtil.java +++ b/src_core/com/tenwa/util/SerialNumberUtil.java @@ -123,8 +123,8 @@ public class SerialNumberUtil { return SerialNumberUtil.getSerialNumber("A{year}{maxOrderNumber}",7,null, "项目编号"+orgId, null, tx); } - public static synchronized String getProjectSerialNumber2(JBOTransaction tx) throws Exception{ - return SerialNumberUtil.getSerialNumber("P{year}{maxOrderNumber}",7,null, "项目编号", null, tx); + public static synchronized String getProjectSerialNumber2(String orgId,JBOTransaction tx) throws Exception{ + return SerialNumberUtil.getSerialNumber("T{year}{maxOrderNumber}",7,null, "项目编号"+orgId, null, tx); } public static String getContractSerialNaumber(String dept,String area_code,JBOTransaction tx) throws Exception { diff --git a/src_tenwa/com/tenwa/lease/flow/project/projectapproval/BusinessApprovalStartAction.java b/src_tenwa/com/tenwa/lease/flow/project/projectapproval/BusinessApprovalStartAction.java index e7e7b2393..bc497950d 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/projectapproval/BusinessApprovalStartAction.java +++ b/src_tenwa/com/tenwa/lease/flow/project/projectapproval/BusinessApprovalStartAction.java @@ -54,29 +54,35 @@ public class BusinessApprovalStartAction extends BaseFlowStartAction{ @Override public void customOperation(JBOTransaction tx,BizObject flowBussiness) throws Exception { String uuid = UUID.randomUUID().toString(); - this.FlowParam.put("ProjectId", UUID.randomUUID().toString().replaceAll("-", "")); - String projectNO=SerialNumberUtil.getProjectSerialNumber1(this.getAsUser().getOrgID(), tx); + this.FlowParam.put("ProjectId",uuid.replaceAll("-", ""));//项目ID + String projectNO = ""; + //根据业务类型,生成不同的项目编号 + if(businessType.equals("1")){//1是汽车业务 + projectNO=SerialNumberUtil.getProjectSerialNumber1(this.getAsUser().getOrgID(), tx);//生成A开头编号 + }else if(businessType.equals("2")){//2是传统业务 + projectNO=SerialNumberUtil.getProjectSerialNumber2(this.getAsUser().getOrgID(), tx);//生成T开头编号 + } //String projectName=projectNO+"_"+this.FlowParam.get("CustName")+this.FlowParam.get("ProductName")+"项目"; - this.FlowParam.put("ProjectNo", projectNO); - this.FlowParam.put("FlowKey", projectNO); - this.FlowParam.put("ProjectName", projectNO); - this.FlowParam.put("CustomerType", this.getCustomerType()); - this.FlowParam.put("carAttributes", this.getCarAttributes()); - this.FlowParam.put("leasehold", this.getLeasehold()); - this.FlowParam.put("carSystem", this.getCarSystem()); - this.FlowParam.put("custname", this.getCustname()); - this.FlowParam.put("certtype", this.getCerttype()); - this.FlowParam.put("certid", this.getCertid()); - this.FlowParam.put("productModel", this.getProductModel()); - this.FlowParam.put("carSeries", this.getCarSeries()); - this.FlowParam.put("versionid", this.getVersionid()); - this.FlowParam.put("modelid", this.getModelid()); - this.FlowParam.put("businessType", this.getBusinessType()); - this.FlowParam.put("price", this.getPrice()); - this.FlowParam.put("liter", this.getLiter()); - this.FlowParam.put("geartype", this.getGeartype()); - this.FlowParam.put("ProductName", this.getProductName()); - this.FlowParam.put("ProductId", this.getProductId()); + this.FlowParam.put("ProjectNo", projectNO);//项目编号 + this.FlowParam.put("FlowKey", projectNO);//流程互斥 + this.FlowParam.put("ProjectName", projectNO);//项目名称 + this.FlowParam.put("carAttributes", this.getCarAttributes());//车辆属性 + this.FlowParam.put("leasehold", this.getLeasehold());//租赁方式 + this.FlowParam.put("productModel", this.getProductModel());//品牌 + this.FlowParam.put("carSeries", this.getCarSeries());//车系 + this.FlowParam.put("carSystem", this.getCarSystem());//车型 + this.FlowParam.put("CustomerType", this.getCustomerType());//客户类型 + this.FlowParam.put("custname", this.getCustname());//客户名称 + this.FlowParam.put("certtype", this.getCerttype());//证件类型 + this.FlowParam.put("certid", this.getCertid());//证件号 + this.FlowParam.put("versionid", this.getVersionid());//版本ID + this.FlowParam.put("modelid", this.getModelid());//车型ID + this.FlowParam.put("businessType", this.getBusinessType());//业务类型,1汽车业务,2传统业务,3汽车传统业务 + this.FlowParam.put("price", this.getPrice());//指导价 + this.FlowParam.put("liter", this.getLiter());//排量 + this.FlowParam.put("geartype", this.getGeartype());//档位 + this.FlowParam.put("ProductName", this.getProductName());//产品名称 + this.FlowParam.put("ProductId", this.getProductId());//产品ID }