Merge remote-tracking branch 'origin/apps_dev' into apps_dev

This commit is contained in:
3120626891@qq.com 2022-07-15 14:23:38 +08:00
commit fb5d615feb
3 changed files with 11 additions and 20 deletions

View File

@ -88,11 +88,10 @@ public class SynchronousOrgJob implements IJob {
String id1 = UUIDGener.getUUID(); String id1 = UUIDGener.getUUID();
Timestamp nowTime = new Timestamp(System.currentTimeMillis()); Timestamp nowTime = new Timestamp(System.currentTimeMillis());
Connection open = DBSql.open();
if (org.getString("PARENTDEPARTMENTID").equals("0")) { if (org.getString("PARENTDEPARTMENTID").equals("0")) {
String sql1 = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("ID") + "'"; String sql1 = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("ID") + "'";
String parentPalOrgId1 = DBSql.getString(open,sql1); String parentPalOrgId1 = DBSql.getString(sql1);
if(StringUtil.isEmpty(parentPalOrgId1)){ if(StringUtil.isEmpty(parentPalOrgId1)){
PALRepositoryModelImpl model1 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", org.getString("DEPARTMENTNAME"), PALRepositoryModelImpl model1 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", org.getString("DEPARTMENTNAME"),
"", 1, parentModelId, "org", true, 1, "", 1, parentModelId, "org", true, 1,
@ -104,8 +103,6 @@ public class SynchronousOrgJob implements IJob {
return modelId=model1.getId(); return modelId=model1.getId();
} }
DBSql.close(open);
} else { } else {
String parentPalOrgId = getParentPalOrgId(org); String parentPalOrgId = getParentPalOrgId(org);
@ -134,33 +131,28 @@ public class SynchronousOrgJob implements IJob {
public String getParentPalOrgId(RowMap org) { public String getParentPalOrgId(RowMap org) {
Connection open = DBSql.open();
String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'"; String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'";
String parentPalOrgId = DBSql.getString(open,sql); String parentPalOrgId = DBSql.getString(sql);
if (parentPalOrgId.equals("0") || parentPalOrgId.equals("") || parentPalOrgId == null) { if (parentPalOrgId.equals("0") || parentPalOrgId.equals("") || parentPalOrgId == null) {
RowMap parentOrg = DBSql.getMap("select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT where id = '" + org.getString("PARENTDEPARTMENTID") + "'"); RowMap parentOrg = DBSql.getMap("select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT where id = '" + org.getString("PARENTDEPARTMENTID") + "'");
creatNode(parentOrg); creatNode(parentOrg);
} }
DBSql.close(open);
return parentPalOrgId; return parentPalOrgId;
} }
public String getParentPallevel(RowMap org) { public String getParentPallevel(RowMap org) {
Connection open = DBSql.open();
String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'"; String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'";
String parentPalOrgId = DBSql.getString(open,sql); String parentPalOrgId = DBSql.getString(sql);
if (parentPalOrgId.equals("0") || parentPalOrgId.equals("") || parentPalOrgId == null) { if (parentPalOrgId.equals("0") || parentPalOrgId.equals("") || parentPalOrgId == null) {
RowMap parentOrg = DBSql.getMap(open,"select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID from ORGDEPARTMENT where id = '" + org.getString("PARENTDEPARTMENTID") + "'"); RowMap parentOrg = DBSql.getMap("select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID from ORGDEPARTMENT where id = '" + org.getString("PARENTDEPARTMENTID") + "'");
creatNode(parentOrg); creatNode(parentOrg);
} }
DBSql.close(open);
return parentPalOrgId; return parentPalOrgId;
} }
@ -172,8 +164,6 @@ public class SynchronousOrgJob implements IJob {
*/ */
public void createPostData(String uuid,String departmentId,PALRepositoryModelImpl model){ public void createPostData(String uuid,String departmentId,PALRepositoryModelImpl model){
Connection open = DBSql.open();
Map<String, String> idRelationMap = new HashMap<>(); Map<String, String> idRelationMap = new HashMap<>();
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(model.getId(), 0); BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(model.getId(), 0);
@ -196,8 +186,7 @@ public class SynchronousOrgJob implements IJob {
} }
List<RowMap> orgdepartmentList=DBSql.getMaps("select POSITION_NO,POSITION_NAME from ORGUSER WHERE DEPARTMENTID=?",departmentId);
List<RowMap> orgdepartmentList=DBSql.getMaps(open,"select POSITION_NO,POSITION_NAME from ORGUSER WHERE DEPARTMENTID=?",departmentId);
int zindex = 1; int zindex = 1;
@ -238,7 +227,6 @@ public class SynchronousOrgJob implements IJob {
// 保存文件 // 保存文件
CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作 CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作
DBSql.close(open);
} }
} }

View File

@ -7785,7 +7785,8 @@ public class CoeProcessLevelWeb extends ActionWeb {
} }
return flag; return flag;
}) })
.filter(item -> methodIdList.contains(((JSONObject)item).getString("plMethodId")) || "default".equals(((JSONObject)item).getString("plMethodId"))) .filter(item -> methodIdList.contains(((JSONObject)item).getString("plMethodId"))
|| "default".equals(((JSONObject)item).getString("plMethodId")) || "process.framework".equals(((JSONObject)item).getString("plMethodId")))
.collect(Collectors.toCollection(JSONArray::new)); .collect(Collectors.toCollection(JSONArray::new));
} }
// 根据创建人过滤 // 根据创建人过滤
@ -8918,7 +8919,8 @@ public String deleteReply(String replyid, String messageid) {
List<PALRepositoryModel> recentList = CoeProcessLevelUtil.getRecentUpdateRepositoryList(wsId, teamId, _uc.getUID(), null, null, 30); List<PALRepositoryModel> recentList = CoeProcessLevelUtil.getRecentUpdateRepositoryList(wsId, teamId, _uc.getUID(), null, null, 30);
// 伊利需求--所选用户创建作为创建人的流程当前用户所拥有流程权限的交集 // 伊利需求--所选用户创建作为创建人的流程当前用户所拥有流程权限的交集
if (methodIdList.size() > 0) { if (methodIdList.size() > 0) {
recentList = recentList.stream().filter(model -> methodIdList.contains(model.getMethodId())).collect(Collectors.toList()); recentList = recentList.stream()
.filter(model -> methodIdList.contains(model.getMethodId()) || "process.framework".equals(model.getMethodId())).collect(Collectors.toList());
} }
if (createUserList.size() > 0) { if (createUserList.size() > 0) {
recentList = recentList.stream().filter(model -> createUserList.contains(model.getCreateUser())).collect(Collectors.toList()); recentList = recentList.stream().filter(model -> createUserList.contains(model.getCreateUser())).collect(Collectors.toList());
@ -9306,7 +9308,8 @@ public String deleteReply(String replyid, String messageid) {
} }
return flag; return flag;
}) })
.filter(item -> methodIdList.contains(((JSONObject)item).getString("methodId")) || "default".equals(((JSONObject)item).getString("methodId"))) .filter(item -> methodIdList.contains(((JSONObject)item).getString("methodId"))
|| "default".equals(((JSONObject)item).getString("methodId")) || "process.framework".equals(((JSONObject)item).getString("methodId")))
.collect(Collectors.toCollection(JSONArray::new)); .collect(Collectors.toCollection(JSONArray::new));
} }
// 根据创建人过滤 // 根据创建人过滤