文件移动controller代码修改,增加L4流程架构移动

增加个人有权发起流程的代码修改
This commit is contained in:
Mr-wang 2023-06-29 20:55:52 +08:00
parent 70357a2ee3
commit 99edb3460c
3 changed files with 91 additions and 55 deletions

View File

@ -9344,6 +9344,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
StringBuffer sb3 = new StringBuffer();
StringBuffer sb4 = new StringBuffer();
;
StringBuffer sb6= new StringBuffer();
sb.append("<span>质量校验<span><br/>");
/***************************************************文件属性校验*************************************************/
@ -9382,7 +9383,6 @@ public class CoeProcessLevelWeb extends ActionWeb {
List<String> list_linker = new LinkedList<>();
List<JSONObject> resultLists = new ArrayList<>();
List<JSONObject> elements_fei = ShapeUtil.getShapeJsonToJsonObject2(obj);
int ms=0;
for (JSONObject o : elements_fei) {
String shapeId = o.getString("id");
@ -9391,11 +9391,12 @@ public class CoeProcessLevelWeb extends ActionWeb {
list_linker.add(shapeId);
}
}
for (JSONObject o : elements_fei) {
String shapeId = o.getString("id");
String shapeName = o.getString("name");
System.out.println("这个名字是什么>>>>>>>" + shapeName);
//System.out.println("这个名字是什么>>>>>>>" + shapeName);
if (shapeName.equals("linker")) {
JSONObject from = o.getJSONObject("from");
JSONObject to = o.getJSONObject("to");
@ -9403,31 +9404,41 @@ public class CoeProcessLevelWeb extends ActionWeb {
String to_id = to.getString("id");
if (UtilString.isNotEmpty(from_id)) {
list_linker.remove(from_id);
}else {
JSONObject definition = JSONObject.parseObject(obj);
JSONObject elements = definition.getJSONObject("elements");
JSONObject string = elements.getJSONObject(to_id);
String title = string.getString("title");
sb6.append("\""+title+"\"").append("连线没有入线");
list_linker.add("\""+title+"\""+"连线没有入线");
}
if (UtilString.isNotEmpty(to_id)) {
list_linker.remove(to_id);
}else {
JSONObject definition = JSONObject.parseObject(obj);
JSONObject elements = definition.getJSONObject("elements");
JSONObject string = elements.getJSONObject(from_id);
String title = string.getString("title");
sb6.append("\""+title+"\"").append("连线没有出线");
list_linker.add("\""+title+"\""+"连线没有出线");
}
ms++;
continue;
}
System.out.println("m的值>>>>>>>>>>>" + ms);
System.out.println("所有的数据的值>>>>>>>>>>>" + elements_fei.size());
if (ms == elements_fei.size() - 1) {
System.out.println("linker>>>>>>>>>>>>" + list_linker.size());
if (list_linker.size() > 0) {
ResponseObject ros = ResponseObject.newOkResponse();
for (String d :
list_linker) {
JSONObject tmp = new JSONObject();
tmp.put("shapeId", d);
}
sb.append("校验未通过,模型中含有未被连线的,请检查模型是否都已连线!");
}
}
ms++;
//System.out.println("m的值>>>>>>>>>>>" + ms);
}
//System.out.println("linker>>>>>>>>>>>>" + list_linker.size());
if (list_linker.size() > 0) {
sb.append("<span>连线校验<span><br/>");
ResponseObject ros = ResponseObject.newOkResponse();
for (String d :
list_linker) {
JSONObject tmp = new JSONObject();
tmp.put("shapeId", d);
}
sb.append(sb6);
sb6.append("校验未通过,请检查模型是否都已连线!");
}
/***************************************************数据属性校验*************************************************/
@ -9480,7 +9491,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
}
if(sb2.length()>0){
sb.append("<span>数据属性:<span><br/>");
sb.append("<br/><span>数据属性:<span><br/>");
sb.append(sb2.substring(0, sb2.length()-1));
sb.append("未填写,请检查!");
}

View File

@ -114,8 +114,6 @@ public class CreateProcessController {
String prName = DBSql.getString(sqlT);
String prName3 = DBSql.getString(sqlT);
String substring = right.substring(right.lastIndexOf(".") + 2);
// 判断是否是导入表的错误架构
//
System.err.println("当前文件架构名=======>" + prName);
if (error.trim().equals(prName.trim())) {
@ -126,47 +124,71 @@ public class CreateProcessController {
String name1 = right.substring(right.lastIndexOf(".") + 2).trim();
if(UtilString.isNotEmpty(name1)) {
//设置四级架构名称
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L4", name1);
// 设置三级架构名称
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", name1);
// 设置二级架构名称
String sql2 = "SELECT PLPARENTID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + maprightId
String sql3 = "SELECT PLPARENTID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + maprightId
+ "'";
String prd2 = DBSql.getString(sql2);
String sqlp2 = "SELECT PLNAME,ID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + prd2 + "'";
RowMap map2 = DBSql.getMap(sqlp2);
if (map2 != null) {
String uuid2 = map2.getString("ID");
String plName2 = map2.getString("PLNAME");
String name2 = plName2.substring(plName2.lastIndexOf(".") + 2).trim();
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", name2);
// 设置一级架构名称
String sql1 = "SELECT PLPARENTID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + uuid2 + "'";
String prd1 = DBSql.getString(sql1);
String sqlp1 = "SELECT PLNAME,ID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + prd1 + "'";
RowMap map1 = DBSql.getMap(sqlp1);
if (map1 != null) {
String uuid1 = map1.getString("ID");
String plName1 = map1.getString("PLNAME");
String name3 = plName1.substring(plName1.lastIndexOf(".") + 2).trim();
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name3);
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '4'");
String prd3 = DBSql.getString(sql3);
String sqlp3 = "SELECT PLNAME,ID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + prd3 + "'";
RowMap map3 = DBSql.getMap(sqlp3);
if (map3!=null) {
String uuid3 = map3.getString("ID");
String plName3 = map3.getString("PLNAME");
String name4 = plName3.substring(plName3.lastIndexOf(".") + 2).trim();
// 设置三级架构名称
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", name4);
// 设置二级架构名称
String sql2 = "SELECT PLPARENTID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + uuid3
+ "'";
String prd2 = DBSql.getString(sql2);
String sqlp2 = "SELECT PLNAME,ID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + prd2 + "'";
RowMap map2 = DBSql.getMap(sqlp2);
if (map2 != null) {
String uuid2 = map2.getString("ID");
String plName2 = map2.getString("PLNAME");
String name2 = plName2.substring(plName2.lastIndexOf(".") + 2).trim();
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", name2);
// 设置一级架构名称
String sql1 = "SELECT PLPARENTID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + uuid2 + "'";
String prd1 = DBSql.getString(sql1);
String sqlp1 = "SELECT PLNAME,ID FROM App_Act_Coe_Pal_Repository WHERE ID ='" + prd1 + "'";
RowMap map1 = DBSql.getMap(sqlp1);
if (map1 != null) {
String uuid1 = map1.getString("ID");
String plName1 = map1.getString("PLNAME");
String name3 = plName1.substring(plName1.lastIndexOf(".") + 2).trim();
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name3);
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '5' WHERE ID = '"+uuid1+"'");
} else {
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L4", "/");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", "/");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name2);
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", name1);
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '4' WHERE ID = '"+uuid2+"'");
}
} else {
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L4", "/");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", "/");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", "/");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name2);
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", name1);
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '3'");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name1);
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '3' WHERE ID = '"+uuid3+"'");
}
} else {
}else {
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L4", "/");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", "/");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", "/");
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name1);
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '2'");
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '2' WHERE ID = '"+uuid+"'");
}
}

View File

@ -152,6 +152,7 @@ public class DataViewService extends ActionWeb {
String pathIdOfCache = uc.getDepartmentModel().getPathIdOfCache();
String[] split = pathIdOfCache.split("/");
ro.put("departId",split[0]);
ro.put("departName",SDK.getORGAPI().getDepartmentById(split[0]).getName());
ro.put("pathId",pathIdOfCache);
}else {
String pathIdOfCache = uc.getDepartmentModel().getPathIdOfCache();
@ -159,9 +160,11 @@ public class DataViewService extends ActionWeb {
System.out.println("split>>>>>>"+split.toString());
if (split.length>=2){
ro.put("departId",split[1]);
ro.put("departName",SDK.getORGAPI().getDepartmentById(split[1]).getName());
ro.put("pathId",pathIdOfCache);
}else {
ro.put("departId",split[0]);
ro.put("departName",SDK.getORGAPI().getDepartmentById(split[0]).getName());
ro.put("pathId",pathIdOfCache);
}
}