业务申请,修改流程开始方法,根据业务类型,生成相应的项目编号。1是汽车业务,2是传统业务,3是汽车传统业务。

This commit is contained in:
user 2018-07-18 16:11:05 +08:00
parent 1ecc0c4d46
commit bf951854a6
3 changed files with 49 additions and 44 deletions

View File

@ -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();

View File

@ -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 {

View File

@ -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
}