|
|
@ -239,6 +239,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "1"); |
|
|
|
variables.put("app", appMap); |
|
|
|
//判断发起人是否为配件主管
|
|
|
|
String createBySid = wmsInventoryAllocateBill.getCreateBySid(); |
|
|
@ -260,7 +261,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(nextNodeUserSids)) { |
|
|
|
bv.setNextNodeUserSids(""); |
|
|
|
return rb.setMsg("下一环节暂无审批人员,请联系管理员"); |
|
|
|
} else { |
|
|
|
String substring = nextNodeUserSids.substring(0, nextNodeUserSids.lastIndexOf(",")); |
|
|
|
bv.setNextNodeUserSids(substring); |
|
|
@ -361,43 +362,33 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "1"); |
|
|
|
variables.put("app", appMap); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getDeptSid()).getData(); |
|
|
|
if (sysOrganization != null) { |
|
|
|
bv.setOrgSidPath(sysOrganization.getOrgSidPath()); |
|
|
|
} |
|
|
|
bv.setModelId(wmsInventoryAllocateBill.getProcDefId()); |
|
|
|
if (bv.getTaskDefKey().equals("Activity_1jchfap")) {//调出方站长审批
|
|
|
|
//特殊处理
|
|
|
|
//获取调出方组织信息
|
|
|
|
SysOrganizationVo dcOrg = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getOutPlatSid()).getData(); |
|
|
|
//获取调入方组织信息
|
|
|
|
SysOrganizationVo drOrg = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getInPlatSid()).getData(); |
|
|
|
//流程预演
|
|
|
|
ResultBean<List<Map<String, Object>>> resultBean1 = flowTaskFeign.getNextNodesForSubmit(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
|
List<GetNodeVo> voList = Optional.ofNullable(resultBean1.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
|
|
|
//获取下一环节审批角色
|
|
|
|
List<String> candidateGroups = voList.get(0).getCandidateGroups(); |
|
|
|
UserRoleQuery userRoleQuery = new UserRoleQuery(); |
|
|
|
userRoleQuery.setRoleSid(candidateGroups.get(0)); |
|
|
|
if (bv.getTaskDefKey().equals("Activity_09chr0i")) {//调入方配件主管审批
|
|
|
|
userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); |
|
|
|
bv.setOrgSidPath(drOrg.getOrgSidPath()); |
|
|
|
} else if (bv.getTaskDefKey().equals("Activity_1jchfap")) {//调出方站长审批
|
|
|
|
userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getOutPlatSid()); |
|
|
|
List<SysUserVo> sysUserVos = sysUserFeign.getOtherOrgRoleUser(userRoleQuery).getData(); |
|
|
|
StringBuilder nextNodeUserSids = new StringBuilder(); |
|
|
|
if (sysUserVos.size() > 0) { |
|
|
|
for (SysUserVo sysUserVo : sysUserVos) { |
|
|
|
String sid = sysUserVo.getSid(); |
|
|
|
nextNodeUserSids.append(sid).append(","); |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(nextNodeUserSids)) { |
|
|
|
bv.setNextNodeUserSids(""); |
|
|
|
} else { |
|
|
|
String substring = nextNodeUserSids.substring(0, nextNodeUserSids.lastIndexOf(",")); |
|
|
|
bv.setNextNodeUserSids(substring); |
|
|
|
} |
|
|
|
bv.setOrgSidPath(dcOrg.getOrgSidPath()); |
|
|
|
} else if (bv.getTaskDefKey().equals("Activity_0kn4sub")) {//调入方站长审批
|
|
|
|
ResultBean<List<Map<String, Object>>> resultBean1 = flowTaskFeign.getNextNodesForSubmit(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
|
List<GetNodeVo> voList = Optional.ofNullable(resultBean1.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
|
|
|
List<String> candidateGroups = voList.get(0).getCandidateGroups(); |
|
|
|
UserRoleQuery userRoleQuery = new UserRoleQuery(); |
|
|
|
userRoleQuery.setRoleSid(candidateGroups.get(0)); |
|
|
|
userRoleQuery.setOrgSid(wmsInventoryAllocateBill.getInPlatSid()); |
|
|
|
bv.setOrgSidPath(drOrg.getOrgSidPath()); |
|
|
|
} |
|
|
|
List<SysUserVo> sysUserVos = sysUserFeign.getOtherOrgRoleUser(userRoleQuery).getData(); |
|
|
|
StringBuilder nextNodeUserSids = new StringBuilder(); |
|
|
|
if (sysUserVos.size() > 0) { |
|
|
@ -407,12 +398,11 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(nextNodeUserSids)) { |
|
|
|
bv.setNextNodeUserSids(""); |
|
|
|
return rb.setMsg("下一环节暂无审批人员,请联系管理员"); |
|
|
|
} else { |
|
|
|
String substring = nextNodeUserSids.substring(0, nextNodeUserSids.lastIndexOf(",")); |
|
|
|
bv.setNextNodeUserSids(substring); |
|
|
|
} |
|
|
|
} |
|
|
|
if (bv.getTaskId().equals(wmsInventoryAllocateBill.getTaskId())) { |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
@ -503,6 +493,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "1"); |
|
|
|
variables.put("app", appMap); |
|
|
|
//判断发起人是否为配件主管
|
|
|
|
String createBySid = wmsInventoryAllocateBill.getCreateBySid(); |
|
|
@ -645,6 +636,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "2"); |
|
|
|
variables.put("app", appMap); |
|
|
|
//判断发起人是否为配件主管
|
|
|
|
String createBySid = wmsInventoryAllocateBill.getCreateBySid(); |
|
|
@ -802,6 +794,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
variables.put("isrdy", f1); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "2"); |
|
|
|
variables.put("app", appMap); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getDeptSid()).getData(); |
|
|
@ -978,6 +971,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "2"); |
|
|
|
variables.put("app", appMap); |
|
|
|
//判断发起人是否为配件主管
|
|
|
|
String createBySid = wmsInventoryAllocateBill.getCreateBySid(); |
|
|
@ -1069,6 +1063,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "3"); |
|
|
|
variables.put("app", appMap); |
|
|
|
//判断发起人是否为配件主管
|
|
|
|
String createBySid = wmsInventoryAllocateBill.getCreateBySid(); |
|
|
@ -1182,6 +1177,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
variables.put("iscc", f0); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "3"); |
|
|
|
variables.put("app", appMap); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getDeptSid()).getData(); |
|
|
@ -1317,6 +1313,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService<WmsInven |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("type", "3"); |
|
|
|
variables.put("app", appMap); |
|
|
|
//判断发起人是否为配件主管
|
|
|
|
String createBySid = wmsInventoryAllocateBill.getCreateBySid(); |
|
|
|