流程发布提交生成手册时去掉回填生效日期

This commit is contained in:
lihongyu 2023-04-27 22:50:13 +08:00
parent cd5f61e630
commit 81ad660ce8

View File

@ -55,15 +55,15 @@ public class ApplyTasAfterkComplete extends ExecuteListener implements ExecuteLi
//List<BO> bolistS = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_S).bindId(processInstId).list();
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
BO bo = SDK.getBOAPI().query(PublisherConstant.BOTABLENAME).detailByBindId(processInstId);
updateEffectiveDateProperty(processInstId, bo, nowTime, bolistN, bolistC);
updateEffectiveDateProperty(processInstId, bo, bolistN, bolistC);
}
private void updateEffectiveDateProperty(String processInstId, BO bo, Timestamp publishDate, List<BO> bolistN, List<BO> bolistC) {
private void updateEffectiveDateProperty(String processInstId, BO bo, List<BO> bolistN, List<BO> bolistC) {
// 对epc表单制度图进行生效日期更新和手册重新生成
// epc:process.epc effective_date
// 表单:data.form form_effective_date
// 制度:control.policy effective_date
String applyUser = bo.getString("APPLYUSERID");// 以申请人身份创建流程手册
String date = UtilDate.datetimeFormat(publishDate);
//String date = UtilDate.datetimeFormat(publishDate);
PALRepositoryPropertyDao propertyDao = new PALRepositoryPropertyDao();
// 创建线程池进行流程手册的处理
ExecutorService service = Executors.newFixedThreadPool(4);
@ -96,17 +96,18 @@ public class ApplyTasAfterkComplete extends ExecuteListener implements ExecuteLi
SDK.getLogAPI().consoleErr("[发起人提交后创建手册]更新失败,模型不存在,模型[" + palId + "]");
continue;
}
// 新增模型时间
if (updatePropertyEffectiveDate(model, date, propertyDao)) {
// 重新创建手册
service.execute(new Runnable() {
@Override
public void run() {
updateProcessReport(model.getId(), processInstId, "C", applyUser);
}
});
}
// 重新创建手册
service.execute(new Runnable() {
@Override
public void run() {
updateProcessReport(model.getId(), processInstId, "C", applyUser);
}
});
}
// 新增模型时间
/*
* if (updatePropertyEffectiveDate(model, date, propertyDao)) { }
*/
}
}
/**
@ -138,7 +139,7 @@ public class ApplyTasAfterkComplete extends ExecuteListener implements ExecuteLi
List<PALRepositoryPropertyModel> list = propertyDao.getPropertysByPlid(model.getId(), attrId);
for (PALRepositoryPropertyModel propertyModel : list) {
if (attrId.equals(propertyModel.getPropertyId())) {
propertyDao.updatePropertyByPropertyId(model.getId(), attrId, date);
//propertyDao.updatePropertyByPropertyId(model.getId(), attrId, date);
SDK.getLogAPI().consoleInfo("[更新模型生效时间]成功,模型[" + model.getName() + "][" + model.getId() + "],生效时间[" + date + "]");
existProp = true;
}