批处理创建模型形状部分增加校验类型是否匹配
This commit is contained in:
parent
1dc1b986ab
commit
a991288c31
Binary file not shown.
@ -412,6 +412,36 @@ public class ValidShapeExcel {
|
||||
}
|
||||
}
|
||||
|
||||
// 模型类型与节点类型不匹配的
|
||||
List<RepositoryShapeInfoModel> repositoryTypeNoMatchShapeTypeList = new ArrayList<>();
|
||||
iterator = excelShapeModels.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
ExcelShapeModel row = iterator.next();
|
||||
String repositoryName = row.getRepositoryName();
|
||||
String repositoryType = row.getRepositoryType();
|
||||
String shapeName = row.getShapeName();
|
||||
String shapeType = row.getShapeType();
|
||||
String key = repositoryName + "|||" + repositoryType;
|
||||
String palId = repositoryMap.get(key);
|
||||
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(palId);
|
||||
List<String> shapeList = ShapeUtil.getProcessShapeTypeList(plModel.getMethodId());
|
||||
if (!shapeList.contains(shapeType)) {
|
||||
RepositoryShapeInfoModel noMatchModel = new RepositoryShapeInfoModel();
|
||||
noMatchModel.setRepositoryId(palId);
|
||||
noMatchModel.setRepositoryName(repositoryName);
|
||||
noMatchModel.setMethodName(repositoryType);
|
||||
noMatchModel.setMethodId(plModel.getMethodId());
|
||||
noMatchModel.setShapeName(shapeName);
|
||||
noMatchModel.setShapeType(shapeType);
|
||||
noMatchModel.setExcelShapeModel(row);
|
||||
noMatchModel.setResult("noMatchType");
|
||||
noMatchModel.setRowOk(false);
|
||||
noMatchModel.setRowMsg(repositoryType + "中不包含" + shapeType + "类型的节点");
|
||||
repositoryTypeNoMatchShapeTypeList.add(noMatchModel);
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// 查询一些形状定义
|
||||
Map<String, List<JSONObject>> shapeObjMap = new HashMap<>();// 形状定义信息
|
||||
Map<String, Map<String, String>> shapeMap = new HashMap<>();// 形状名称类型与id的映射关系
|
||||
@ -613,6 +643,7 @@ public class ValidShapeExcel {
|
||||
allDataList.addAll(noPermList);
|
||||
allDataList.addAll(moreMatchList);
|
||||
allDataList.addAll(readonlyList);
|
||||
allDataList.addAll(repositoryTypeNoMatchShapeTypeList);
|
||||
allDataList.addAll(matchShapeList);
|
||||
// 整体按照Excel表中顺序排序
|
||||
allDataList.sort((a1, a2)-> {return a1.getExcelShapeModel().getRow() - a2.getExcelShapeModel().getRow();});
|
||||
@ -625,6 +656,7 @@ public class ValidShapeExcel {
|
||||
int noPermCount = noPermList.size();
|
||||
int moreMatchCount = moreMatchList.size();
|
||||
int readonlyCount = readonlyList.size();
|
||||
int noMatchTypeCount = repositoryTypeNoMatchShapeTypeList.size();
|
||||
int okCount = 0;
|
||||
int errCount = 0;
|
||||
for (RepositoryShapeInfoModel model : matchShapeList) {
|
||||
@ -650,7 +682,8 @@ public class ValidShapeExcel {
|
||||
"noMatch".equals(model.getResult()) ||
|
||||
"noPerm".equals(model.getResult()) ||
|
||||
"moreMatch".equals(model.getResult()) ||
|
||||
"readonly".equals(model.getResult())) {
|
||||
"readonly".equals(model.getResult()) ||
|
||||
"noMatchType".equals(model.getResult())) {
|
||||
JSONArray row = new JSONArray();
|
||||
List<String> list = model.getExcelShapeModel().getRowData();
|
||||
for (int j = 0; j < list.size(); j++) {
|
||||
@ -694,6 +727,7 @@ public class ValidShapeExcel {
|
||||
ro.put("noPermCount", noPermCount);
|
||||
ro.put("moreMatchCount", moreMatchCount);
|
||||
ro.put("readonlyCount", readonlyCount);
|
||||
ro.put("noMatchTypeCount", noMatchTypeCount);
|
||||
ro.put("noMatchCount", noMatchCount);
|
||||
ro.put("okCount", okCount);
|
||||
ro.put("errCount", errCount);
|
||||
@ -975,6 +1009,36 @@ public class ValidShapeExcel {
|
||||
}
|
||||
}
|
||||
|
||||
// 模型类型与节点类型不匹配的
|
||||
List<RepositoryShapeInfoModel> repositoryTypeNoMatchShapeTypeList = new ArrayList<>();
|
||||
iterator = excelShapeModels.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
ExcelShapeModel row = iterator.next();
|
||||
String repositoryName = row.getRepositoryName();
|
||||
String repositoryType = row.getRepositoryType();
|
||||
String shapeName = row.getShapeName();
|
||||
String shapeType = row.getShapeType();
|
||||
String key = repositoryName + "|||" + repositoryType;
|
||||
String palId = repositoryMap.get(key);
|
||||
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(palId);
|
||||
List<String> shapeList = ShapeUtil.getProcessShapeTypeList(plModel.getMethodId());
|
||||
if (!shapeList.contains(shapeType)) {
|
||||
RepositoryShapeInfoModel noMatchModel = new RepositoryShapeInfoModel();
|
||||
noMatchModel.setRepositoryId(palId);
|
||||
noMatchModel.setRepositoryName(repositoryName);
|
||||
noMatchModel.setMethodName(repositoryType);
|
||||
noMatchModel.setMethodId(plModel.getMethodId());
|
||||
noMatchModel.setShapeName(shapeName);
|
||||
noMatchModel.setShapeType(shapeType);
|
||||
noMatchModel.setExcelShapeModel(row);
|
||||
noMatchModel.setResult("noMatchType");
|
||||
noMatchModel.setRowOk(false);
|
||||
noMatchModel.setRowMsg(repositoryType + "中不包含" + shapeType + "类型的节点");
|
||||
repositoryTypeNoMatchShapeTypeList.add(noMatchModel);
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// 剩下的都是基本信息校验通过的
|
||||
List<RepositoryShapeInfoModel> matchShapeList = new ArrayList<>();
|
||||
iterator = excelShapeModels.iterator();
|
||||
@ -1118,6 +1182,7 @@ public class ValidShapeExcel {
|
||||
allDataList.addAll(noPermList);
|
||||
allDataList.addAll(moreMatchList);
|
||||
allDataList.addAll(readonlyList);
|
||||
allDataList.addAll(repositoryTypeNoMatchShapeTypeList);
|
||||
allDataList.addAll(matchShapeList);
|
||||
// 整体按照Excel表中顺序排序
|
||||
allDataList.sort((a1, a2)-> {return a1.getExcelShapeModel().getRow() - a2.getExcelShapeModel().getRow();});
|
||||
@ -1130,6 +1195,7 @@ public class ValidShapeExcel {
|
||||
int noPermCount = noPermList.size();
|
||||
int moreMatchCount = moreMatchList.size();
|
||||
int readonlyCount = readonlyList.size();
|
||||
int noMatchTypeCount = repositoryTypeNoMatchShapeTypeList.size();
|
||||
int okCount = 0;
|
||||
int errCount = 0;
|
||||
for (RepositoryShapeInfoModel model : matchShapeList) {
|
||||
@ -1155,7 +1221,8 @@ public class ValidShapeExcel {
|
||||
"noMatch".equals(model.getResult()) ||
|
||||
"noPerm".equals(model.getResult()) ||
|
||||
"moreMatch".equals(model.getResult()) ||
|
||||
"readonly".equals(model.getResult())) {
|
||||
"readonly".equals(model.getResult()) ||
|
||||
"noMatchType".equals(model.getResult())) {
|
||||
JSONArray row = new JSONArray();
|
||||
List<String> list = model.getExcelShapeModel().getRowData();
|
||||
for (int j = 0; j < list.size(); j++) {
|
||||
@ -1199,6 +1266,7 @@ public class ValidShapeExcel {
|
||||
ro.put("noPermCount", noPermCount);
|
||||
ro.put("moreMatchCount", moreMatchCount);
|
||||
ro.put("readonlyCount", readonlyCount);
|
||||
ro.put("noMatchTypeCount", noMatchTypeCount);
|
||||
ro.put("noMatchCount", noMatchCount);
|
||||
ro.put("okCount", okCount);
|
||||
ro.put("errCount", errCount);
|
||||
|
||||
@ -11,4 +11,4 @@
|
||||
var shapeFileValue = '<#shapeFileValue>';
|
||||
var palId = '<#palId>';// 流程id,不为空则为设计器内单只流程形状属性替换
|
||||
var wHref = "./w";
|
||||
var jdHref = "./jd";</script><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-71ad93f4.88655c5d.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-d674f310.832a3f23.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-e2e1fe08.2aef31d9.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-2d224ef1.72ef0fa8.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-3a9b7577.a1c1d3f9.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-71ad93f4.7eee428d.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-d674f310.89c934c7.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-e2e1fe08.cb098f41.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/app.f3fd84ae.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-vendors.53f73f21.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/app.2ecbeb68.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-vendors.e5375faa.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-vendors.53f73f21.css rel=stylesheet><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/app.f3fd84ae.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-vendors.e5375faa.js></script><script src=../apps/com.actionsoft.apps.coe.pal.batch/main/js/app.2ecbeb68.js></script></body></html>
|
||||
var jdHref = "./jd";</script><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-0896b577.2aef31d9.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-71ad93f4.88655c5d.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-d674f310.832a3f23.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-0896b577.93b0818d.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-2d224ef1.9043bb4b.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-3a9b7577.a1c1d3f9.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-71ad93f4.b9b3b13c.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-d674f310.2dd90041.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/app.f3fd84ae.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-vendors.53f73f21.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/app.4629d835.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-vendors.edec05de.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/chunk-vendors.53f73f21.css rel=stylesheet><link href=../apps/com.actionsoft.apps.coe.pal.batch/main/css/app.f3fd84ae.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.batch/main/js/chunk-vendors.edec05de.js></script><script src=../apps/com.actionsoft.apps.coe.pal.batch/main/js/app.4629d835.js></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user