|
|
@ -53,7 +53,6 @@ import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysstaffpost.SysStaffPostFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.UserRoleQuery; |
|
|
|
import com.yxt.anrui.portal.api.sysuserrole.SysUserRoleFeign; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.PagerUtil; |
|
|
@ -264,7 +263,14 @@ public class FinCostapplyService extends MybatisBaseService<FinCostapplyMapper, |
|
|
|
return rb.setMsg(staffOrgResultBean.getMsg()); |
|
|
|
} |
|
|
|
//用户的组织全路径
|
|
|
|
String orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); |
|
|
|
String orgSidPath = ""; |
|
|
|
String orgPath = dto.getOrgPath(); |
|
|
|
if(StringUtils.isNotBlank(orgPath)){ |
|
|
|
orgSidPath = orgPath; |
|
|
|
}else{ |
|
|
|
orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); |
|
|
|
} |
|
|
|
// String orgSidPath = staffOrgResultBean.getData().getOrgSidPath();
|
|
|
|
FinCostapply finCostapply = fetchBySid(dto.getSid()); |
|
|
|
int r = submitBusinessData(dto, finCostapply); |
|
|
|
if (r == 3) { |
|
|
@ -295,23 +301,8 @@ public class FinCostapplyService extends MybatisBaseService<FinCostapplyMapper, |
|
|
|
bv.setFormVariables(variables); |
|
|
|
//流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.FINCOSTAPPLY.getProDefId()); |
|
|
|
//根据员工sid查询员工的上级岗位
|
|
|
|
/* ResultBean<String> sysPostVoResultBean = sysStaffPostFeign.selectPost(userVoResultBean.getData().getStaffSid()); |
|
|
|
if (!sysPostVoResultBean.getSuccess()) { |
|
|
|
return rb.setMsg(sysPostVoResultBean.getMsg()); |
|
|
|
} |
|
|
|
String roleSid = sysPostVoResultBean.getData(); |
|
|
|
//根据组织架构、角色两个参数取相关符合条件的用户信息
|
|
|
|
UserQuery userQuery = new UserQuery(); |
|
|
|
userQuery.setRoleSid(roleSid); |
|
|
|
userQuery.setOrgSidPath(orgSidPath); |
|
|
|
List<SysUserVo> sysUserVos = sysUserFeign.getUserByRole(userQuery).getData(); |
|
|
|
sysUserVos.removeAll(Collections.singleton(null)); |
|
|
|
if (sysUserVos.isEmpty()) { |
|
|
|
return rb.setMsg("下一环节没有用户"); |
|
|
|
}*/ |
|
|
|
//根据员工的sid查询员工的角色
|
|
|
|
String userSid = dto.getCreateBySid(); |
|
|
|
/*String userSid = dto.getCreateBySid(); |
|
|
|
ResultBean<List<String>> userRoleList = sysUserRoleFeign.getUserRoleSidByUserSid(userSid); |
|
|
|
UserRoleQuery userRoleQuery = new UserRoleQuery(); |
|
|
|
if (userRoleList.getData().size() > 0) { |
|
|
@ -333,6 +324,16 @@ public class FinCostapplyService extends MybatisBaseService<FinCostapplyMapper, |
|
|
|
} |
|
|
|
//符合条件的用户的sid,拼接的字符串
|
|
|
|
String nextNodeUserSids_ = nextNodeUserSids.toString(); |
|
|
|
bv.setNextNodeUserSids(nextNodeUserSids_);*/ |
|
|
|
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) { |
|
|
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv); |
|
|
|