相关/支持文件查询修改|发布流程去掉默认标题

This commit is contained in:
zhaol 2024-12-03 20:57:26 +08:00
parent c4bb76fe69
commit c6baf0e75d
6 changed files with 34 additions and 17 deletions

View File

@ -13,6 +13,7 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
import com.actionsoft.apps.coe.pal.publisher.constant.FilePermConstant;
import com.actionsoft.bpms.commons.login.constant.LoginConst;
import com.actionsoft.bpms.server.SSOUtil;
@ -2565,9 +2566,9 @@ 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()) && !"process.scheme".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);
throw new AWSException("文件不支持创建流程手册:" + uuid);*/
if (model.getMethodId().contains("process.") && !"process.scheme".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
@ -2990,7 +2991,7 @@ public class ProcessPublishWeb extends ActionWeb {
if(relatedRowMap.size()>0){
for(int j=0;j<relatedRowMap.size();j++){
JSONObject jb = new JSONObject();
PALRepositoryModel pModel=PALRepositoryCache.getCache().get(relatedRowMap.get(i).getString("RELATIONFILEID"));
PALRepositoryModel pModel=PALRepositoryCache.getCache().get(relatedRowMap.get(j).getString("RELATIONFILEID"));
if(pModel!=null){
String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ pModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+_uc.getSessionId();
jb.put("relatedName",pModel.getName());
@ -5129,7 +5130,7 @@ public class ProcessPublishWeb extends ActionWeb {
BO subBO =new BO();
bo.set("OPTIONTYPE",optionType);//发布类型不同的发布类型显示不同的子表数据
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\">&nbsp;</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>");// 流程实例状态
"<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;\"><br></p><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:14px\">&nbsp;</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>");// 流程实例状态
String departmentId = _uc.getUserModel().getDepartmentId();
String allpath = SDK.getORGAPI().getDepartmentById(departmentId).getPathNameOfCache();
@ -5203,7 +5204,7 @@ public class ProcessPublishWeb extends ActionWeb {
BO subBO =new BO();
bo.set("OPTIONTYPE",optionType);//发布类型不同的发布类型显示不同的子表数据
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\">&nbsp;</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>");// 流程实例状态
"<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;\"><br></p><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:14px\">&nbsp;</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>");// 流程实例状态
//获取流程L1-L4等级名称
getProcessLevel(bo,palUUID);
subBO.set("STOPTYPE","S");

View File

@ -390,17 +390,18 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
}
if ("relation".equals(attributeModel.getType()) || "awsorg".equals(attributeModel.getType())) {
List<DesignerShapeRelationModel> list = DesignerShapeRelationCache.getListByAttrId(uuid, "", attributeModel.getKey());
if (list == null || list.isEmpty()) {
String sql = "SELECT ID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID=? and ATTRID=?";
RowMap orgrowMap= DBSql.getMap(sql, new Object[]{uuid, property.getPropertyId()});
if(orgrowMap==null){
flag1 = false;
}
} else {
flag1 = UtilString.isNotEmpty(property.getPropertyValue());
}
if (!flag1) {// 校验不通过
sb1.append("''"+attributeModel.getTitle()+"''").append(",");
flag1 = false;
sb1.append("''" + attributeModel.getTitle() + "''").append(",");
}
}

View File

@ -55,7 +55,7 @@ public class PublishLoadBefore extends ExecuteListener {
sb.append("'").append(str).append("'").append(",");
}
String substring = sb.substring(0, sb.length() - 1);
// 可以为boData中的字段进行赋值
// 可以为boData中的字段进行赋值`
RowMap data = DBSql.getMap("select DEAPRTMNUM,PROCESSMNUMBER from BO_ACT_PROCESSMANAGER where ORGDEPART in (" + substring
+ ")");
if (null == data) {
@ -69,7 +69,7 @@ public class PublishLoadBefore extends ExecuteListener {
boData.set("DEPARTMENT_PROOFREADER", data.getString("DEAPRTMNUM"));
boData.set("PROCESS_MANAGER", data.getString("PROCESSMNUMBER"));
boData.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\">&nbsp;</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>");// 流程实例状态
"<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;\"><br></p><p style=\"margin: 0px; text-align: center; line-height: 1.5em; display: block;\"><strong><span style=\";font-family:宋体;font-size:14px\">&nbsp;</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>");// 流程实例状态
// 如果需要展示在表单上需要调用如下代码注意此操作不会更新数据库中的数据
ctx.setParameter(ListenerConst.FORM_EVENT_PARAM_BODATA, boData);
}

View File

@ -79,6 +79,7 @@ public class SubFormAfterSave extends ExecuteListener {
}
}
}
System.out.println(boList);
SDK.getBOAPI().create(boName, boList, bindId, uid);
// 该记录是否新建的状态由于机制调整BO对象中的ID是不为空的不能通过ID判断记录是否处于新建状态还是修改状态
boolean isCreate = param.getParameterOfBoolean(ListenerConst.FORM_EVENT_PARAM_ISCREATE);

View File

@ -574,13 +574,17 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
JSONObject result=JSONObject.parseObject(UploadGptFileUtils.uploadGptFile(uploadGptUrl,appkey,requestCode,dcContext.getFilePath()));
if(result.getString("meg").equals("success")){
if(result.getString("msg").equals("success")){
String data=result.getString("data");
//插入模型ID与DOCID对应表中
BO gptBO=new BO();
gptBO.set("plid",fileId);
gptBO.set("docid",data);
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, processExecutionContext.getProcessInstance().getId(), processExecutionContext.getProcessInstance().getCreateUser());
ProcessInstance boProcessInstance = SDK.getProcessAPI()
.createBOProcessInstance("obj_08d91b102a514d49b5b42ed439de94c4", processExecutionContext.getUserContext().getUID(), "GPT文件");
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, boProcessInstance.getId(), processExecutionContext.getProcessInstance().getCreateUser());
}
}
@ -655,14 +659,16 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
//先查找旧文件
BO docfile= SDK.getBOAPI().query("BO_EU_GPT_DOCFILE").addQuery("PLID=", changefileId).detail();
if(docfile!=null){
String docid=docfile.getString("DOCID");
String docid=docfile.getString("DOCID");
JSONObject jsonRequest=new JSONObject();
jsonRequest.put("requestCode",requestCode);
jsonRequest.put("docId",docid);
DeleteGptFilesUtils.deleteGptFiles(deleteGptUrl,jsonRequest.toJSONString(),appkey);
String deleteResult=DeleteGptFilesUtils.deleteGptFiles(deleteGptUrl,jsonRequest.toJSONString(),appkey);
SDK.getBOAPI().remove("BO_EU_GPT_DOCFILE",docfile.getId());
RowMap rowMap = DBSql
@ -700,13 +706,18 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
JSONObject result=JSONObject.parseObject(UploadGptFileUtils.uploadGptFile(uploadGptUrl,appkey,requestCode,dcContext.getFilePath()));
if(result.getString("meg").equals("success")){
if(result.getString("msg").equals("success")){
String data=result.getString("data");
//插入模型ID与DOCID对应表中
BO gptBO=new BO();
gptBO.set("plid",changefileIdNew);
gptBO.set("docid",data);
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, processExecutionContext.getProcessInstance().getId(), processExecutionContext.getProcessInstance().getCreateUser());
ProcessInstance boProcessInstance = SDK.getProcessAPI()
.createBOProcessInstance("obj_08d91b102a514d49b5b42ed439de94c4", processExecutionContext.getUserContext().getUID(), "GPT文件");
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, boProcessInstance.getId(), processExecutionContext.getProcessInstance().getCreateUser());
}
}
@ -764,9 +775,12 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
jsonRequest.put("requestCode",requestCode);
jsonRequest.put("docId",docid);
DeleteGptFilesUtils.deleteGptFiles(deleteGptUrl,jsonRequest.toJSONString(),appkey);
SDK.getBOAPI().remove("BO_EU_GPT_DOCFILE",docfile.getId());
}
} catch (Exception e) {
}
}