|
@@ -1,6 +1,8 @@
|
|
|
package com.zjugis.business.flow.officialSeal.event;
|
|
|
|
|
|
|
|
|
+import com.zjugis.business.constants.OfficialSealNameConstants;
|
|
|
+import com.zjugis.business.constants.PostConstants;
|
|
|
import com.zjugis.business.converter.officialSeal.OfficialSealConvert;
|
|
|
import com.zjugis.business.flow.officialSeal.entity.OfficialSealUseDO;
|
|
|
import com.zjugis.business.flow.officialSeal.service.OfficialSealUseService;
|
|
@@ -31,7 +33,6 @@ import java.util.*;
|
|
|
import static com.zjugis.business.constants.FlowStatusConstants.*;
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
* @author zjq
|
|
|
* @since 2024-03-15
|
|
|
*/
|
|
@@ -192,6 +193,7 @@ public class OfficialSealUseEvent extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 部门经理
|
|
|
+ *
|
|
|
* @param flowInstanceId
|
|
|
* @return
|
|
|
*/
|
|
@@ -202,15 +204,15 @@ public class OfficialSealUseEvent extends BaseController {
|
|
|
OfficialSealUseDO entity = officialSealUseService.findByInstanceId(flowInstanceId);
|
|
|
DeptRespDTO deptRespDTO = deptApi.getDept(entity.getDeptId()).getCheckedData();
|
|
|
List<Map<String, String>> userMaps = new ArrayList<>();
|
|
|
- HashMap<String,String> map = new HashMap<>();
|
|
|
- map.put("id",deptRespDTO.getLeaderUserId());
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("id", deptRespDTO.getLeaderUserId());
|
|
|
userMaps.add(map);
|
|
|
return ok(userMaps);
|
|
|
} else {
|
|
|
throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
}
|
|
|
}
|
|
@@ -230,16 +232,54 @@ public class OfficialSealUseEvent extends BaseController {
|
|
|
|
|
|
List<Map<String, String>> userMaps = new ArrayList<>();
|
|
|
AdminUserRespDTO userLeader = adminUserApi.getUserLeader(deptRespDTO.getLeaderUserId()).getCheckedData();
|
|
|
- HashMap<String,String> map = new HashMap<>();
|
|
|
- map.put("id",userLeader.getId());
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("id", userLeader.getId());
|
|
|
userMaps.add(map);
|
|
|
return ok(userMaps);
|
|
|
} else {
|
|
|
throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 用章参与人
|
|
|
+ *
|
|
|
+ * @param flowInstanceId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/use-people")
|
|
|
+ public String userOfficialSealFlow1(String flowInstanceId) {
|
|
|
+ try {
|
|
|
+ if (StringUtils.isNotBlank(flowInstanceId)) {
|
|
|
+ OfficialSealUseDO entity = officialSealUseService.findByInstanceId(flowInstanceId);
|
|
|
+ List<Map<String, String>> userMaps = new ArrayList<>();
|
|
|
+ if (entity.getOfficialSealName().equals(OfficialSealNameConstants.WW) || entity.getOfficialSealName().equals(OfficialSealNameConstants.WW_JS)) {
|
|
|
+ int pId = entity.getOfficialSealName().equals(OfficialSealNameConstants.WW) ? PostConstants.OFFICIAL_SEAL_MANAGER : PostConstants.JIANGSU_OFFICIAL_SEAL_MANAGER;
|
|
|
+ Collection<Long> collection = new ArrayList<>();
|
|
|
+ collection.add(Long.valueOf(pId));
|
|
|
+ List<AdminUserRespDTO> userList = adminUserApi.getUserListByPostIds(collection).getCheckedData();
|
|
|
+ for (AdminUserRespDTO adminUserRespDTO : userList) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("id", adminUserRespDTO.getId());
|
|
|
+ userMaps.add(map);
|
|
|
+ }
|
|
|
+ return ok(userMaps);
|
|
|
+ } else {
|
|
|
+ throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|