|
@@ -261,10 +261,11 @@ public class ContractRenewEvent extends BaseController {
|
|
|
ContractRenewDO entity = contractRenewService.findByInstanceId(flowInstanceId);
|
|
|
List<Map<String, String>> userMaps = new ArrayList<>();
|
|
|
if (StringUtils.isNotBlank(entity.getDeptId())) {
|
|
|
- AdminUserRespDTO dept = adminUserApi.getNextLeader(entity.getUserId()).getCheckedData();
|
|
|
- if (dept != null && StringUtils.isNotBlank(dept.getId())) {
|
|
|
+ CommonResult<DeptRespDTO> result = deptApi.getDept(entity.getDeptId());
|
|
|
+ DeptRespDTO dept = result.getCheckedData();
|
|
|
+ if (dept != null && StringUtils.isNotBlank(dept.getLeaderUserId())) {
|
|
|
HashMap<String, String> map = new HashMap<>();
|
|
|
- map.put("id", dept.getId());
|
|
|
+ map.put("id", dept.getLeaderUserId());
|
|
|
userMaps.add(map);
|
|
|
}
|
|
|
}
|
|
@@ -279,6 +280,39 @@ public class ContractRenewEvent extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询分管领导和板块领导
|
|
|
+ */
|
|
|
+ @PostMapping("/to-dept-manager-leader")
|
|
|
+ public String toLeader(String flowInstanceId) {
|
|
|
+ if (StringUtils.isNotBlank(flowInstanceId)) {
|
|
|
+ ContractRenewDO entity = contractRenewService.findByInstanceId(flowInstanceId);
|
|
|
+ List<Map<String, String>> userMaps = new ArrayList<>();
|
|
|
+ if (StringUtils.isNotBlank(entity.getDeptId())) {
|
|
|
+
|
|
|
+ CommonResult<DeptRespDTO> result = deptApi.getDept(entity.getDeptId());
|
|
|
+ DeptRespDTO dept = result.getCheckedData();
|
|
|
+ if (dept != null && StringUtils.isNotBlank(dept.getLeaderUserId())) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("id", dept.getLeaderUserId());
|
|
|
+ userMaps.add(map);
|
|
|
+ CommonResult<AdminUserRespDTO> userRes = adminUserApi.getUserLeader(dept.getLeaderUserId());
|
|
|
+ AdminUserRespDTO userLeader = userRes.getCheckedData();
|
|
|
+ if (userLeader != null) {
|
|
|
+ HashMap<String, String> leaderMap = new HashMap<>();
|
|
|
+ leaderMap.put("id", userLeader.getId());
|
|
|
+ userMaps.add(leaderMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return ok(userMaps);
|
|
|
+ } else {
|
|
|
+ throw new BusinessException("找不到流程id");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 根据所在地查询hr
|
|
|
*/
|