发布流程重新生成手册代码
This commit is contained in:
parent
5f76df9680
commit
2ffcd1f860
Binary file not shown.
@ -2563,7 +2563,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
if (model == null)
|
||||
throw new AWSException("没有找到文件:" + uuid);
|
||||
String taskId = "";
|
||||
if (("control.policy".equals(model.getMethodId()) || "data.form".equals(model.getMethodId()) || model.getMethodId().contains("process.")) && !"default".equals(model.getMethodId())) {
|
||||
if (("control.policy".equals(model.getMethodId()) || "data.form".equals(model.getMethodId()) || model.getMethodId().contains("process.")) && !"default".equals(model.getMethodId()) && !"process.scheme".equals(model.getMethodId())) {
|
||||
} else
|
||||
throw new AWSException("文件不支持创建流程手册:" + uuid);
|
||||
if (model.getMethodId().contains("process.")) {
|
||||
@ -2999,7 +2999,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
for (UpfileModel upfileModel : fileList) {
|
||||
String type = upfileModel.getType();
|
||||
|
||||
if(!methodId.equals("control.policy") || methodId.contains("process")){
|
||||
if(!methodId.equals("control.policy") && methodId.contains("process") && !methodId.equals("engineering.standard")){
|
||||
|
||||
if ("s".equals(upfileModel.getType())) {
|
||||
JSONObject jb = new JSONObject();
|
||||
@ -3255,7 +3255,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
if (fileList != null && fileList.size() > 0)
|
||||
for (UpfileModel upfileModel : fileList){
|
||||
String type = upfileModel.getType();
|
||||
if(!methodId.equals("control.policy") || methodId.contains("process")){
|
||||
if(!methodId.equals("control.policy") && methodId.contains("process") && !methodId.equals("engineering.standard")){
|
||||
if ("s".equals(upfileModel.getType())) {
|
||||
JSONObject jb = new JSONObject();
|
||||
//按照附件编号排序
|
||||
@ -3748,7 +3748,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
taskId = object.getJSONObject("data").getString("taskId");
|
||||
else
|
||||
throw new AWSException("创建表单手册失败:" + uuid);
|
||||
} else if ("control.policy".equals(model.getMethodId())) {
|
||||
} else if ("control.policy".equals(model.getMethodId())|| "engineering.standard".equals(model.getMethodId()) || "process.scheme".equals(model.getMethodId())) {
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, _uc.getUID(), teamId, uuid);
|
||||
JSONObject object = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object.getString("result")))
|
||||
@ -3946,7 +3946,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, model2.getId());
|
||||
else if ("data.form".equals(model.getMethodId()))
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, model2.getId());
|
||||
else if ("control.policy".equals(model.getMethodId()))
|
||||
else if ("control.policy".equals(model.getMethodId()) || "engineering.standard".equals(model.getMethodId()) || "process.scheme".equals(model.getMethodId()))
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, _uc.getUID(), teamId, model2.getId());
|
||||
JSONObject object2 = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object2.getString("result")))
|
||||
@ -4371,7 +4371,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
JSONObject object = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object.getString("result")))
|
||||
taskId = object.getJSONObject("data").getString("taskId");
|
||||
} else if ("control.policy".equals(model.getMethodId())) {
|
||||
} else if ("control.policy".equals(model.getMethodId()) || "engineering.standard".equals(model.getMethodId()) || "process.scheme".equals(model.getMethodId())) {
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, userId, teamId, uuid);
|
||||
JSONObject object = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object.getString("result")))
|
||||
|
||||
@ -280,7 +280,7 @@ public class ApplyTasAfterkComplete extends ExecuteListener implements ExecuteLi
|
||||
if ("ok".equals(object.getString("result"))) {
|
||||
taskId = object.getJSONObject("data").getString("taskId");
|
||||
}
|
||||
} else if ("control.policy".equals(model.getMethodId())) {
|
||||
} else if ("control.policy".equals(model.getMethodId()) || "engineering.standard".equals(model.getMethodId()) || "process.scheme".equals(model.getMethodId())) {
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, userId, teamId, uuid);
|
||||
JSONObject object = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object.getString("result"))) {
|
||||
|
||||
@ -12,6 +12,7 @@ import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListenerInterface;
|
||||
import com.actionsoft.bpms.bpmn.engine.listener.ListenerConst;
|
||||
import com.actionsoft.bpms.bpmn.engine.model.run.delegate.TaskInstance;
|
||||
import com.actionsoft.bpms.commons.database.RowMap;
|
||||
import com.actionsoft.bpms.server.Quota;
|
||||
import com.actionsoft.bpms.server.UserContext;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
@ -95,8 +96,8 @@ public class ApplyTaskAfterCreated extends ExecuteListener implements ExecuteLis
|
||||
}else {
|
||||
bo.set("DEPARTMENT_PROOFREADER", data.getString("DEAPRTMNUM"));
|
||||
bo.set("PROCESS_MANAGER", data.getString("PROCESSMNUMBER"));
|
||||
bo.set("WSID", "7d3ca852-a0bd-42e6-80b1-3dcea6f55083");
|
||||
bo.set("RELEASE_INSTRUCTIONS", "<div id=\"RELEASE_INSTRUCTIONS_htmlRead\" class=\"readonly-html-div\" style=\"width: 100%;\"><style style=\"display: none;\">#RELEASE_INSTRUCTIONS_htmlRead img{vertical-align:bottom}li{list-style: inherit;}</style><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:24px\"><br></span></strong></p><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:24px\">关于发布《XXXXXXXXXXXX》的通知</span></strong><br></p><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:14px\"> </span></strong></p><p style=\"margin: 0px; text-align: justify; line-height: 1.5em; display: block;\"><span style=\";font-family:仿宋_GB2312;font-size:21px\">各事业部、分(子)公司、总部各部(室):</span></p><p style=\"margin: 0px; text-indent: 43px; text-align: justify; line-height: 1.5em; display: block;\"><span style=\";font-family:仿宋_GB2312;font-size:21px\">为</span><span style=\";font-family:宋体;font-size:21px\">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span><span style=\";font-family:仿宋_GB2312;font-size:21px\">,现下发《</span><span style=\";font-family:宋体;font-size:21px\">xxxxxxxxxxxxxxx</span><span style=\";font-family:仿宋_GB2312;font-size:21px\">》,请各单位遵照执行。</span></p><p style=\"margin: 5px 0px; text-indent: 43px; text-align: justify; line-height: 1.5em; display: block;\"><span style=\";font-family:仿宋_GB2312;font-size:21px\">特此通知。</span></p><p style=\"margin: 5px 0px; text-indent: 43px; text-align: right; line-height: 1.5em; display: block;\"><span style=\"text-indent: 299px; font-family: 仿宋_GB2312; font-size: 21px;\">(xxxxxxxxx)单位名称</span></p><p style=\"margin: 5px 0px; text-indent: 43px; text-align: right; line-height: 1.5em; display: block;\"><span style=\"font-family: 仿宋_GB2312; font-size: 21px;\">2022年7月27日</span></p></div>");//流程实例状态
|
||||
bo.set("WSID", "7d3ca852-a0bd-42e6-80b1-3dcea6f55083");
|
||||
bo.set("RELEASE_INSTRUCTIONS", "<div id=\"RELEASE_INSTRUCTIONS_htmlRead\" class=\"readonly-html-div\" style=\"width: 100%;\"><style style=\"display: none;\">#RELEASE_INSTRUCTIONS_htmlRead img{vertical-align:bottom}li{list-style: inherit;}</style><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:24px\"><br></span></strong></p><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:24px\">关于发布《XXXXXXXXXXXX》的通知</span></strong><br></p><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:14px\"> </span></strong></p><p style=\"margin: 0px; text-align: justify; line-height: 1.5em; display: block;\"><span style=\";font-family:仿宋_GB2312;font-size:21px\">各事业部、分(子)公司、总部各部(室):</span></p><p style=\"margin: 0px; text-indent: 43px; text-align: justify; line-height: 1.5em; display: block;\"><span style=\";font-family:仿宋_GB2312;font-size:21px\">为</span><span style=\";font-family:宋体;font-size:21px\">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span><span style=\";font-family:仿宋_GB2312;font-size:21px\">,现下发《</span><span style=\";font-family:宋体;font-size:21px\">xxxxxxxxxxxxxxx</span><span style=\";font-family:仿宋_GB2312;font-size:21px\">》,请各单位遵照执行。</span></p><p style=\"margin: 5px 0px; text-indent: 43px; text-align: justify; line-height: 1.5em; display: block;\"><span style=\";font-family:仿宋_GB2312;font-size:21px\">特此通知。</span></p><p style=\"margin: 5px 0px; text-indent: 43px; text-align: right; line-height: 1.5em; display: block;\"><span style=\"text-indent: 299px; font-family: 仿宋_GB2312; font-size: 21px;\">(xxxxxxxxx)单位名称</span></p><p style=\"margin: 5px 0px; text-indent: 43px; text-align: right; line-height: 1.5em; display: block;\"><span style=\"font-family: 仿宋_GB2312; font-size: 21px;\">2022年7月27日</span></p></div>");//流程实例状态
|
||||
SDK.getBOAPI().create(PublisherConstant.BOTABLENAME, bo, ctx.getProcessInstance(), userContext);
|
||||
//如果需要展示在表单上,需要调用如下代码。注意:此操作不会更新数据库中的数据
|
||||
ctx.setParameter(ListenerConst.FORM_EVENT_PARAM_BODATA, bo);
|
||||
|
||||
@ -546,7 +546,7 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
||||
if ("ok".equals(object.getString("result"))) {
|
||||
taskId = object.getJSONObject("data").getString("taskId");
|
||||
}
|
||||
} else if ("control.policy".equals(model.getMethodId())) {
|
||||
} else if ("control.policy".equals(model.getMethodId()) || "engineering.standard".equals(model.getMethodId()) || "process.scheme".equals(model.getMethodId())) {
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, userId, teamId, uuid);
|
||||
JSONObject object = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object.getString("result"))) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
||||
import com.actionsoft.apps.coe.pal.system.util.StringUtil;
|
||||
import com.actionsoft.exception.AWSDataAccessException;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@ -503,7 +504,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
for (BO bo : bo_act_coe_publish_n) {
|
||||
try {
|
||||
String fileId = bo.getString("PUBLISHFILEID");
|
||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '1' WHERE ID = '"+fileId+"'");
|
||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='"+fileId+"'");
|
||||
|
||||
|
||||
/**
|
||||
@ -633,6 +634,17 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
try {
|
||||
String fileId = bo.getString("STOPFILEID");
|
||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '0' WHERE ID = '"+fileId+"'");
|
||||
|
||||
|
||||
//更新作废人
|
||||
PALRepositoryPropertyDao propertyDao = new PALRepositoryPropertyDao();
|
||||
propertyDao.updatePropertyByPropertyId(fileId, "nullifier", processExecutionContext.getUserContext().getUID());
|
||||
|
||||
//作废时间
|
||||
Date date=new Date();
|
||||
SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd");
|
||||
propertyDao.updatePropertyByPropertyId(fileId, "obsolescence_time", sdfs.format(date));
|
||||
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@ -847,9 +859,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
if (StringUtils.isNotEmpty(cardId)) {
|
||||
String sql_ext4 = "select * from APP_ACT_COE_PAL_REPOSITORY where EXT4 = '" + cardId + "'";
|
||||
RowMap map = DBSql.getMap(sql_ext4);
|
||||
System.out.println("maps======>>>>>>>" + map);
|
||||
System.out.println("fileid==》》》》" + fileid);
|
||||
System.out.println("id==》》》》" + map.getString("ID"));
|
||||
RowMap rowMap = DBSql
|
||||
.getMap("SELECT * FROM " + bo_name + " where " + fileid + " '" + map.getString("ID") + "'");
|
||||
// BO bos =
|
||||
@ -1029,7 +1038,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
// 发布知识
|
||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||
|
||||
System.out.println("知识发布============" + ro);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user