|
@@ -190,21 +190,6 @@ public class ProjectEvent extends BaseController {
|
|
|
map.put("id",entity.getXmjlId());
|
|
|
userMaps.add(map);
|
|
|
}
|
|
|
- return ok(userMaps);
|
|
|
- } else {
|
|
|
- throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
- throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
- }
|
|
|
- }
|
|
|
- @PostMapping("/to-sale-person")
|
|
|
- public String toSalePerson(String flowInstanceId) {
|
|
|
- try {
|
|
|
- if (StringUtils.isNotBlank(flowInstanceId)) {
|
|
|
- Project entity = projectService.selectByInstanceId(flowInstanceId);
|
|
|
- List<Map<String, String>> userMaps = new ArrayList<>();
|
|
|
if(StringUtils.isNotBlank(entity.getXsryId())) {
|
|
|
HashMap<String,String> map = new HashMap<>();
|
|
|
map.put("id",entity.getXsryId());
|
|
@@ -233,32 +218,9 @@ public class ProjectEvent extends BaseController {
|
|
|
HashMap<String,String> map = new HashMap<>();
|
|
|
map.put("id",deptLeader.getId());
|
|
|
userMaps.add(map);
|
|
|
- }
|
|
|
- }
|
|
|
- return ok(userMaps);
|
|
|
- } else {
|
|
|
- throw new BusinessException("找不到流程id");
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
- throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("/to-dept-manager-leader")
|
|
|
- public String toDeptManagerLeader(String flowInstanceId) {
|
|
|
- try {
|
|
|
- if (StringUtils.isNotBlank(flowInstanceId)) {
|
|
|
- Project entity = projectService.selectByInstanceId(flowInstanceId);
|
|
|
- List<Map<String, String>> userMaps = new ArrayList<>();
|
|
|
- if(StringUtils.isNotBlank(entity.getZrbmId())){
|
|
|
- CommonResult<AdminUserRespDTO> result = deptApi.getDeptLeader(entity.getZrbmId());
|
|
|
- AdminUserRespDTO deptLeader = result.getCheckedData();
|
|
|
- if(deptLeader != null){
|
|
|
CommonResult<AdminUserRespDTO> userRes = adminUserApi.getUserLeader(deptLeader.getId());
|
|
|
AdminUserRespDTO userLeader = userRes.getCheckedData();
|
|
|
if(userLeader != null){
|
|
|
- HashMap<String,String> map = new HashMap<>();
|
|
|
map.put("id",userLeader.getId());
|
|
|
userMaps.add(map);
|
|
|
}
|