流程发布,文件编号生成规则代码提交
This commit is contained in:
parent
1ba1ae4846
commit
5ec2bd9f77
@ -82,23 +82,32 @@ public class ProcesNumberUtil {
|
||||
String number = getProcessNum(levelnum, orgCode);
|
||||
String publishfileid=nowData.getString("PUBLISHFILEID");
|
||||
|
||||
RowMap rowMap=DBSql.getMap("SELECT PLCATEGORY FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID='"+publishfileid+"' ");
|
||||
RowMap rowMap=DBSql.getMap("SELECT PLVER,PLMETHODID FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID='"+publishfileid+"' AND"
|
||||
+ " ISUSE = 1 ");
|
||||
String name = "00R00";
|
||||
String fileName = "file_number";
|
||||
String plver= "1.0";
|
||||
if(rowMap!=null){
|
||||
String plcategory=rowMap.getString("PLCATEGORY");
|
||||
System.out.println("plcategory"+plcategory);
|
||||
if(plcategory.equals("process")){
|
||||
String plcategory=rowMap.getString("PLMETHODID");
|
||||
String plvers=rowMap.getString("PLVER");
|
||||
if(plcategory.contains("process")){
|
||||
name = number + "/P"+number;
|
||||
}else if(plcategory.equals("control")){
|
||||
}else if(plcategory.contains("control")){
|
||||
name = "00/R00";
|
||||
}else if(plcategory.equals("data")){
|
||||
}else if(plcategory.contains("form")){
|
||||
fileName = "form_number";
|
||||
name = "00/T00";
|
||||
}
|
||||
if(!"".equals(plvers)) {
|
||||
if(plvers.length()>1) {
|
||||
plver = plvers.substring(0,1)+"."+plvers.substring(plvers.length()-1,plvers.length());
|
||||
}else {
|
||||
plver = plvers.substring(0,1)+".0";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String processNum = levelnum + "." + name +"V1.0"+orgCode + regionCode + productCode;
|
||||
String processNum = levelnum + "." + name +"V"+plver+orgCode + regionCode + productCode;
|
||||
String s = nowData.getId();
|
||||
int update = DBSql.update(String.format(updateSql, processNum, s.toLowerCase()));
|
||||
System.out.println("表单文件编号回填:"+update+"--->"+processNum);
|
||||
|
||||
@ -16,6 +16,7 @@ public class ApplyTasAfterkComplete extends ExecuteListener implements ExecuteLi
|
||||
|
||||
@Override
|
||||
public void execute(ProcessExecutionContext ctx) throws Exception {
|
||||
System.err.println("---------生成编号------------");
|
||||
String processInstId = ctx.getProcessInstance().getId();
|
||||
//by bzp 文件编号生成
|
||||
new ProcesNumberUtil().getNumber(processInstId);
|
||||
|
||||
@ -1,20 +1,9 @@
|
||||
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.manage.publish.dao.PublishHistory;
|
||||
import com.actionsoft.apps.coe.pal.pal.manage.publish.dao.PublishListHistory;
|
||||
import com.actionsoft.apps.coe.pal.pal.manage.publish.model.PublishHistoryModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.manage.publish.model.PublishListHistoryModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||
import com.actionsoft.apps.coe.pal.publisher.client.util.ProcesNumberUtil;
|
||||
import com.actionsoft.bpms.bo.engine.BO;
|
||||
import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
|
||||
import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener;
|
||||
import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListenerInterface;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
|
||||
public class PublishExecuteListenerInterfaceCreateNo extends ExecuteListener implements ExecuteListenerInterface {
|
||||
|
||||
|
||||
@ -21,9 +21,11 @@ public class PublishLoadBefore extends ExecuteListener {
|
||||
//BO表记录,注意:该记录的数据如果被修改,将会体现到表单上,修改后不会直接持久化到数据库中
|
||||
BO boData = (BO) ctx.getParameter(ListenerConst.FORM_EVENT_PARAM_BODATA);
|
||||
//如果有值就不再去计算了
|
||||
if(null!=boData) {
|
||||
if(boData.getString("DEPARTMENT_PROOFREADER") != null && !boData.getString("DEPARTMENT_PROOFREADER").isEmpty()){
|
||||
return;
|
||||
}
|
||||
}
|
||||
//根据部门名称 和单位 计算出 内部校对人 和流程经理
|
||||
UserContext me = ctx.getUserContext();
|
||||
String departmentId = me.getUserModel().getDepartmentId();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user