发布校验代码提交

This commit is contained in:
zhal 2022-10-16 18:05:05 +08:00
parent 117e10145c
commit 6f1f5ac5d0
2 changed files with 23 additions and 23 deletions

View File

@ -41,7 +41,7 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
@Override
public String getDescription() {
return "发布表单保存前附件校验";
return "发布表单办理结束前通用校验";
}
@Override
@ -59,6 +59,8 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
@Override
public boolean execute(ProcessExecutionContext param) throws Exception {
List<BO> gridNData=SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(param.getProcessInstance().getId()).list();
String bindid=param.getProcessInstance().getId();
StringBuffer sb=new StringBuffer();
@ -116,9 +118,6 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
if(splitRelationFileId.length>0){
for(int i=0;i<splitRelationFileId.length;i++) {
fileElements = CoeDesignerUtil.getShapeMessageJson4(splitRelationFileId[i]);
PALRepositoryModel onemodel = PALRepositoryCache.getCache().get(splitRelationFileId[i]);
@ -189,29 +188,28 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
}
for (Map<String, Object> shape : fileElements) {
String tempShapeId = shape.get("id").toString();
UpFileDao dao = new UpFileDao();
// 文件根据relationFileId 文件类型 查询
List<UpfileModel> list2;
if(relationFileId.contains(",")){
list2= dao.search(splitRelationFileId[0], tempShapeId, "s");
}else{
list2= dao.search(relationFileId, tempShapeId, "s");
}
for (Map<String, Object> shape : fileElements) {
String tempShapeId = shape.get("id").toString();
if(list2.size()==0){
String name="";
if (type == "1") {
name=rowData.getString("PUBLISHFILENAME");
} else {
name=rowData.getString("CHANGEFILENAME");
UpFileDao dao = new UpFileDao();
// 文件根据relationFileId 文件类型 查询
List<UpfileModel> list2;
list2= dao.search(splitRelationFileId[i], tempShapeId, "s");
if(list2.size()==0){
String name="";
if (type == "1") {
name=rowData.getString("PUBLISHFILENAME");
} else {
name=rowData.getString("CHANGEFILENAME");
}
sb.append(name).append("关联模型名称:").append("</br>").append("").append(shape.get("plName")).append("").append("节点名称:").append(""+shape.get("name")+"").append("未上传附件,请检查!!!").append("</br>").append(",");
}
sb.append(name).append("关联模型名称:").append("</br>").append("").append(shape.get("plName")).append("").append("节点名称:").append(""+shape.get("name")+"").append("未上传附件,请检查!!!").append("</br>").append(",");
}
}
}
@ -269,7 +267,8 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
StringBuffer sb2=new StringBuffer();
StringBuffer sb3=new StringBuffer();
StringBuffer sb4 = new StringBuffer();;
sb.append("<span>质量校验<span><br/>");
sb.append("<span style='font-weight:bold'>质量校验<span><br/>");
/***************************************************文件属性校验*************************************************/
@ -300,6 +299,7 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
if(sb1.length()>0){
sb.append("<span style='font-weight:bold'>模型名称:【"+model.getName()+"】<span><br/>");
sb.append("<span>文件属性:<span><br/>");
sb.append(sb1.substring(0, sb1.length()-1));
sb.append("未填写,请检查!").append("</br>");