|
|
@ -3095,6 +3095,14 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
//用户的组织全路径
|
|
|
|
orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); |
|
|
|
} |
|
|
|
List<String> orgPathList = Arrays.asList(orgSidPath.split("/")); |
|
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size()-1)).getData(); |
|
|
|
if(sysOrganization == null){ |
|
|
|
return rb.setMsg("当前所在的组织机构不存在"); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(sysOrganization.getManagerSid())){ |
|
|
|
return rb.setMsg("当前所在的组织机构未设置主管人员"); |
|
|
|
} |
|
|
|
|
|
|
|
int r = submitBusinessData(dto, busSalesOrder.get()); |
|
|
|
if (r == 0) { |
|
|
@ -3140,38 +3148,14 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
|
bv.setFormVariables(variables); |
|
|
|
//流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.SALESORDER.getProDefId()); |
|
|
|
//根据员工的sid查询员工的角色
|
|
|
|
/*String userSid = busSalesOrderOne.getCreateBySid(); |
|
|
|
ResultBean<List<String>> userRoleList = sysUserRoleFeign.getUserRoleSidByUserSid(userSid); |
|
|
|
UserRoleQuery userRoleQuery = new UserRoleQuery(); |
|
|
|
if (userRoleList.getData().size() > 0) { |
|
|
|
userRoleQuery.setRoleSid(userRoleList.getData().get(0)); |
|
|
|
} |
|
|
|
userRoleQuery.setOrgSid(staffOrgResultBean.getData().getOrgSid()); |
|
|
|
ResultBean<List<SysUserVo>> listResultBean = sysUserFeign.getUserByOrgRole(userRoleQuery); |
|
|
|
if (!listResultBean.getSuccess()) { |
|
|
|
return rb.setMsg(listResultBean.getMsg()); |
|
|
|
} |
|
|
|
List<SysUserVo> sysUserVos = listResultBean.getData(); |
|
|
|
sysUserVos.removeAll(Collections.singleton(null)); |
|
|
|
if (sysUserVos.isEmpty()) { |
|
|
|
return rb.setMsg("下一环节没有用户"); |
|
|
|
} |
|
|
|
StringBuilder nextNodeUserSids = new StringBuilder(); |
|
|
|
for (SysUserVo su : sysUserVos) { |
|
|
|
nextNodeUserSids.append(su.getSid()).append(","); |
|
|
|
} |
|
|
|
//符合条件的用户的sid,拼接的字符串
|
|
|
|
String nextNodeUserSids_ = nextNodeUserSids.toString(); |
|
|
|
bv.setNextNodeUserSids(nextNodeUserSids_);*/ |
|
|
|
List<String> orgPathList = Arrays.asList(orgSidPath.split("/")); |
|
|
|
/*List<String> orgPathList = Arrays.asList(orgSidPath.split("/")); |
|
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size()-1)).getData(); |
|
|
|
if(sysOrganization == null){ |
|
|
|
return rb.setMsg("当前所在的组织机构不存在"); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(sysOrganization.getManagerSid())){ |
|
|
|
return rb.setMsg("当前所在的组织机构未设置主管人员"); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
String nextNodeUserSids_ = sysOrganization.getManagerSid(); |
|
|
|
bv.setNextNodeUserSids(nextNodeUserSids_); |
|
|
|
if (r == 1) { |
|
|
|