发布校验代码提交
This commit is contained in:
parent
117e10145c
commit
6f1f5ac5d0
Binary file not shown.
@ -41,7 +41,7 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return "发布表单保存前附件校验";
|
return "发布表单办理结束前通用校验";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -59,6 +59,8 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
|
|||||||
@Override
|
@Override
|
||||||
public boolean execute(ProcessExecutionContext param) throws Exception {
|
public boolean execute(ProcessExecutionContext param) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<BO> gridNData=SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(param.getProcessInstance().getId()).list();
|
List<BO> gridNData=SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(param.getProcessInstance().getId()).list();
|
||||||
String bindid=param.getProcessInstance().getId();
|
String bindid=param.getProcessInstance().getId();
|
||||||
StringBuffer sb=new StringBuffer();
|
StringBuffer sb=new StringBuffer();
|
||||||
@ -116,9 +118,6 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
|
|||||||
if(splitRelationFileId.length>0){
|
if(splitRelationFileId.length>0){
|
||||||
|
|
||||||
for(int i=0;i<splitRelationFileId.length;i++) {
|
for(int i=0;i<splitRelationFileId.length;i++) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fileElements = CoeDesignerUtil.getShapeMessageJson4(splitRelationFileId[i]);
|
fileElements = CoeDesignerUtil.getShapeMessageJson4(splitRelationFileId[i]);
|
||||||
|
|
||||||
PALRepositoryModel onemodel = PALRepositoryCache.getCache().get(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();
|
for (Map<String, Object> shape : fileElements) {
|
||||||
// 文件:根据relationFileId 和 文件类型 查询
|
String tempShapeId = shape.get("id").toString();
|
||||||
List<UpfileModel> list2;
|
|
||||||
if(relationFileId.contains(",")){
|
|
||||||
list2= dao.search(splitRelationFileId[0], tempShapeId, "s");
|
|
||||||
}else{
|
|
||||||
list2= dao.search(relationFileId, tempShapeId, "s");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(list2.size()==0){
|
UpFileDao dao = new UpFileDao();
|
||||||
String name="";
|
// 文件:根据relationFileId 和 文件类型 查询
|
||||||
if (type == "1") {
|
List<UpfileModel> list2;
|
||||||
name=rowData.getString("PUBLISHFILENAME");
|
|
||||||
} else {
|
list2= dao.search(splitRelationFileId[i], tempShapeId, "s");
|
||||||
name=rowData.getString("CHANGEFILENAME");
|
|
||||||
|
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 sb2=new StringBuffer();
|
||||||
StringBuffer sb3=new StringBuffer();
|
StringBuffer sb3=new StringBuffer();
|
||||||
StringBuffer sb4 = 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){
|
if(sb1.length()>0){
|
||||||
|
sb.append("<span style='font-weight:bold'>模型名称:【"+model.getName()+"】<span><br/>");
|
||||||
sb.append("<span>文件属性:<span><br/>");
|
sb.append("<span>文件属性:<span><br/>");
|
||||||
sb.append(sb1.substring(0, sb1.length()-1));
|
sb.append(sb1.substring(0, sb1.length()-1));
|
||||||
sb.append("未填写,请检查!").append("</br>");
|
sb.append("未填写,请检查!").append("</br>");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user