编号生成

This commit is contained in:
zhal 2022-07-26 01:51:49 +08:00
parent 62187b10b7
commit 7b8563cc99
3 changed files with 8 additions and 3 deletions

View File

@ -95,16 +95,17 @@ public class ProcesNumberUtil {
String name = "00R00";
if(rowMap!=null){
String plcategory=rowMap.getString("PLCATEGORY");
System.out.println("plcategory"+plcategory);
if(plcategory.equals("process")){
name = number + "/P"+number;
}else if(plcategory.equals("control")){
name = "00/R00";
}else if(plcategory.equals("data")){
name = "00/R00";
name = "00/T00";
}
}
String processNum = levelnum + "." + name + orgCode + regionCode + productCode;
String processNum = levelnum + "." + name +"V1.0"+orgCode + regionCode + productCode;
DBSql.update(String.format(updateSql, processNum, nowData.getId()));
String publishFileId = nowData.getString("PUBLISHFILEID");
String updateAttrsql = "update APP_ACT_COE_PAL_PROP set PROPERTYVALUE='%s' where PROPERTYID='%s' AND PLID='%s'";

View File

@ -1,5 +1,6 @@
package com.actionsoft.apps.coe.pal.publisher.event;
import com.actionsoft.apps.coe.pal.publisher.client.util.ProcesNumberUtil;
import com.actionsoft.apps.coe.pal.publisher.client.util.ProcessStatusAPIManager;
import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener;
@ -15,6 +16,9 @@ public class ApplyTasAfterkComplete extends ExecuteListener implements ExecuteLi
@Override
public void execute(ProcessExecutionContext ctx) throws Exception {
String processInstId = ctx.getProcessInstance().getId();
//by bzp 文件编号生成
new ProcesNumberUtil().getNumber(processInstId);
SDK.getLogAPI().consoleInfo("[任务事件]任务结束,涉及流程状态变为审批中-->" + ctx.getTaskInstance().getTitle());
ProcessStatusAPIManager.getInstance().batchUpdateApprovalStatus(ctx.getTaskInstance().getProcessInstId(), true);
}

View File

@ -36,7 +36,7 @@ public class PublishExecuteListenerInterfaceCreateNo extends ExecuteListener imp
@Override
public void execute(ProcessExecutionContext param) throws Exception {
PublishHistoryModel model = new PublishHistoryModel();
System.out.println("任务完成后生成文件编号===============");
String processInstId = param.getProcessInstance().getId();
//by bzp 测试编号生成
new ProcesNumberUtil().getNumber(processInstId);