加入校验支持文件判空异常处理
This commit is contained in:
parent
9d2c27142f
commit
5acbf4963a
Binary file not shown.
@ -101,11 +101,17 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
|
||||
if (oldPropertyList != null && oldPropertyList.size() > 0) {
|
||||
for (PALRepositoryPropertyModel propertyModel : oldPropertyList) {
|
||||
|
||||
|
||||
//获取文件属性中支持文件
|
||||
if(propertyModel.getPropertyId().equals("support_files")){
|
||||
//获取关联模型id
|
||||
String relationFileId=JSONObject.parseObject(propertyModel.getPropertyValue()).getString("relationFileId");
|
||||
String relationFileId= null;
|
||||
try {
|
||||
relationFileId = JSONObject.parseObject(propertyModel.getPropertyValue()).getString("relationFileId");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new BPMNError("0313", sb.append("模型名称:").append(model.getName()).append("关联支持文件异常,请联系管理员!!!").append("</br>").toString());
|
||||
}
|
||||
|
||||
//获取关联表单模型id
|
||||
List<Map<String, Object>> fileElements ;
|
||||
if(UtilString.isNotEmpty(relationFileId)){
|
||||
@ -121,8 +127,6 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
|
||||
|
||||
PALRepositoryModel onemodel = PALRepositoryCache.getCache().get(splitRelationFileId[i]);
|
||||
|
||||
|
||||
|
||||
if(onemodel!=null) {
|
||||
boolean isUse = onemodel.isUse();
|
||||
boolean publish = onemodel.isPublish();
|
||||
@ -229,6 +233,8 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
throw new BPMNError("0313", sb.append("模型名称:").append(model.getName()).append("未关联支持文件,请添加!!!").append("</br>").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user