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 }