Commit da5f3ae0e9d77444e28ddaf6f30c37d0a49700fe
1 parent
3db8d6b6
APP端工作流 候选人 el表达式表单编写
Showing
8 changed files
with
123 additions
and
8 deletions
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoHasTaskPageReqVO.java
| @@ -49,4 +49,7 @@ public class MainInfoHasTaskPageReqVO extends PageParam { | @@ -49,4 +49,7 @@ public class MainInfoHasTaskPageReqVO extends PageParam { | ||
| 49 | private String streetName; | 49 | private String streetName; |
| 50 | @Schema(description = "养护级别ID", example = "1") | 50 | @Schema(description = "养护级别ID", example = "1") |
| 51 | private Integer curingLevelId; | 51 | private Integer curingLevelId; |
| 52 | + | ||
| 53 | + @Schema(description = "任务编号", example = "1") | ||
| 54 | + private String taskId; | ||
| 52 | } | 55 | } |
| 53 | \ No newline at end of file | 56 | \ No newline at end of file |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/AppGardenWorkOrderRespVO.java
| @@ -29,6 +29,9 @@ public class AppGardenWorkOrderRespVO extends MainInfoRespVO { | @@ -29,6 +29,9 @@ public class AppGardenWorkOrderRespVO extends MainInfoRespVO { | ||
| 29 | @Schema(description = "任务名称") | 29 | @Schema(description = "任务名称") |
| 30 | private String taskName; | 30 | private String taskName; |
| 31 | 31 | ||
| 32 | + @Schema(description = "任务key") | ||
| 33 | + private String taskKey; | ||
| 34 | + | ||
| 32 | @Schema(description = "流程定义名称") | 35 | @Schema(description = "流程定义名称") |
| 33 | private String processDefinitionName; | 36 | private String processDefinitionName; |
| 34 | 37 |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/task/AppGardenTaskApproveReqVO.java
| @@ -29,4 +29,7 @@ public class AppGardenTaskApproveReqVO { | @@ -29,4 +29,7 @@ public class AppGardenTaskApproveReqVO { | ||
| 29 | @Schema(description = "审批意见", example = "通过!") | 29 | @Schema(description = "审批意见", example = "通过!") |
| 30 | private String reason; | 30 | private String reason; |
| 31 | 31 | ||
| 32 | + @Schema(description = "下一个审批人", example = "通过!") | ||
| 33 | + private Long nextAssignee; | ||
| 34 | + | ||
| 32 | } | 35 | } |
| 33 | \ No newline at end of file | 36 | \ No newline at end of file |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/task/AppGardenTaskReturnReqVO.java
| @@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema; | @@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | import jakarta.validation.constraints.NotEmpty; | 4 | import jakarta.validation.constraints.NotEmpty; |
| 5 | import lombok.Data; | 5 | import lombok.Data; |
| 6 | 6 | ||
| 7 | +import java.util.List; | ||
| 8 | + | ||
| 7 | /** | 9 | /** |
| 8 | * 类描述:园林APP端退回 reqVO | 10 | * 类描述:园林APP端退回 reqVO |
| 9 | * 创建人:yanhuiqing | 11 | * 创建人:yanhuiqing |
| @@ -24,11 +26,22 @@ public class AppGardenTaskReturnReqVO { | @@ -24,11 +26,22 @@ public class AppGardenTaskReturnReqVO { | ||
| 24 | @NotEmpty(message = "任务编号不能为空") | 26 | @NotEmpty(message = "任务编号不能为空") |
| 25 | private String id; | 27 | private String id; |
| 26 | 28 | ||
| 27 | - @Schema(description = "退回到的任务 Key", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 29 | + /*@Schema(description = "退回到的任务 Key", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 28 | @NotEmpty(message = "退回到的任务 Key 不能为空") | 30 | @NotEmpty(message = "退回到的任务 Key 不能为空") |
| 29 | - private String targetTaskDefinitionKey; | 31 | + private String targetTaskDefinitionKey;*/ |
| 30 | 32 | ||
| 31 | @Schema(description = "退回意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "我就是想驳回") | 33 | @Schema(description = "退回意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "我就是想驳回") |
| 32 | @NotEmpty(message = "退回意见不能为空") | 34 | @NotEmpty(message = "退回意见不能为空") |
| 33 | private String reason; | 35 | private String reason; |
| 36 | + | ||
| 37 | + @Schema(description = "当前任务的taksKey", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 38 | + @NotEmpty(message = "当前任务的taksKey不能为空") | ||
| 39 | + private String curTaskKey; | ||
| 40 | + | ||
| 41 | + @Schema(description = "工单的数据id", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 42 | + @NotEmpty(message = "工单的数据id不能为空") | ||
| 43 | + private Long workerDataId; | ||
| 44 | + | ||
| 45 | + @Schema(description = "退回时的拍照图片") | ||
| 46 | + private List<String> returnImgs; | ||
| 34 | } | 47 | } |
| 35 | \ No newline at end of file | 48 | \ No newline at end of file |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/maininfo/MainInfoExtDO.java
| @@ -154,6 +154,10 @@ public class MainInfoExtDO extends BaseDO { | @@ -154,6 +154,10 @@ public class MainInfoExtDO extends BaseDO { | ||
| 154 | */ | 154 | */ |
| 155 | private String taskName; | 155 | private String taskName; |
| 156 | /** | 156 | /** |
| 157 | + * 任务key | ||
| 158 | + */ | ||
| 159 | + private String taskKey; | ||
| 160 | + /** | ||
| 157 | * 流程定义名称 | 161 | * 流程定义名称 |
| 158 | */ | 162 | */ |
| 159 | private String processDefinitionName; | 163 | private String processDefinitionName; |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/maininfo/MainInfoExtMapper.java
| @@ -37,6 +37,7 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | @@ -37,6 +37,7 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | ||
| 37 | " m.*,", | 37 | " m.*,", |
| 38 | " t.ID_ AS task_id,", | 38 | " t.ID_ AS task_id,", |
| 39 | " t.NAME_ AS task_name,", | 39 | " t.NAME_ AS task_name,", |
| 40 | + " t.task_def_key_ as task_key,", | ||
| 40 | " pd.NAME_ AS process_definition_name,", | 41 | " pd.NAME_ AS process_definition_name,", |
| 41 | " t.START_TIME_,", | 42 | " t.START_TIME_,", |
| 42 | " t.END_TIME_,", | 43 | " t.END_TIME_,", |
| @@ -80,6 +81,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | @@ -80,6 +81,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | ||
| 80 | " <if test='query.curingLevelId != null'>", | 81 | " <if test='query.curingLevelId != null'>", |
| 81 | " AND m.curing_level_id = #{query.curingLevelId}", | 82 | " AND m.curing_level_id = #{query.curingLevelId}", |
| 82 | " </if>", | 83 | " </if>", |
| 84 | + " <if test='query.taskId != null'>", | ||
| 85 | + " AND t.id = #{query.taskId}", | ||
| 86 | + " </if>", | ||
| 83 | "ORDER BY t.END_TIME_ DESC", | 87 | "ORDER BY t.END_TIME_ DESC", |
| 84 | "</script>" | 88 | "</script>" |
| 85 | }) | 89 | }) |
| @@ -121,6 +125,7 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | @@ -121,6 +125,7 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | ||
| 121 | 125 | ||
| 122 | @Result(column = "task_id", property = "taskId"), | 126 | @Result(column = "task_id", property = "taskId"), |
| 123 | @Result(column = "task_name", property = "taskName"), | 127 | @Result(column = "task_name", property = "taskName"), |
| 128 | + @Result(column = "task_key", property = "taskKey"), | ||
| 124 | @Result(column = "process_definition_name", property = "processDefinitionName"), | 129 | @Result(column = "process_definition_name", property = "processDefinitionName"), |
| 125 | @Result(column = "START_TIME_", property = "startTime"), | 130 | @Result(column = "START_TIME_", property = "startTime"), |
| 126 | @Result(column = "END_TIME_", property = "endTime"), | 131 | @Result(column = "END_TIME_", property = "endTime"), |
| @@ -140,6 +145,7 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | @@ -140,6 +145,7 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | ||
| 140 | " m.*,", | 145 | " m.*,", |
| 141 | " t.ID_ AS task_id,", | 146 | " t.ID_ AS task_id,", |
| 142 | " t.NAME_ AS task_name,", | 147 | " t.NAME_ AS task_name,", |
| 148 | + " t.task_def_key_ as task_key,", | ||
| 143 | " pd.NAME_ AS process_definition_name,", | 149 | " pd.NAME_ AS process_definition_name,", |
| 144 | " t.CREATE_TIME_ AS START_TIME_,", | 150 | " t.CREATE_TIME_ AS START_TIME_,", |
| 145 | " t.DUE_DATE_ AS END_TIME_,", | 151 | " t.DUE_DATE_ AS END_TIME_,", |
| @@ -180,6 +186,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | @@ -180,6 +186,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | ||
| 180 | " <if test='query.curingLevelId != null'>", | 186 | " <if test='query.curingLevelId != null'>", |
| 181 | " AND m.curing_level_id = #{query.curingLevelId}", | 187 | " AND m.curing_level_id = #{query.curingLevelId}", |
| 182 | " </if>", | 188 | " </if>", |
| 189 | + " <if test='query.taskId != null'>", | ||
| 190 | + " AND t.id = #{query.taskId}", | ||
| 191 | + " </if>", | ||
| 183 | "ORDER BY t.CREATE_TIME_ DESC", | 192 | "ORDER BY t.CREATE_TIME_ DESC", |
| 184 | "</script>" | 193 | "</script>" |
| 185 | }) | 194 | }) |
| @@ -221,6 +230,7 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | @@ -221,6 +230,7 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | ||
| 221 | 230 | ||
| 222 | @Result(column = "task_id", property = "taskId"), | 231 | @Result(column = "task_id", property = "taskId"), |
| 223 | @Result(column = "task_name", property = "taskName"), | 232 | @Result(column = "task_name", property = "taskName"), |
| 233 | + @Result(column = "task_key", property = "taskKey"), | ||
| 224 | @Result(column = "process_definition_name", property = "processDefinitionName"), | 234 | @Result(column = "process_definition_name", property = "processDefinitionName"), |
| 225 | @Result(column = "START_TIME_", property = "startTime"), | 235 | @Result(column = "START_TIME_", property = "startTime"), |
| 226 | @Result(column = "END_TIME_", property = "endTime"), | 236 | @Result(column = "END_TIME_", property = "endTime"), |
| @@ -271,6 +281,10 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | @@ -271,6 +281,10 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | ||
| 271 | " <if test='notHas'>", | 281 | " <if test='notHas'>", |
| 272 | " AND su.id <> #{loginUserId}", | 282 | " AND su.id <> #{loginUserId}", |
| 273 | " </if>", | 283 | " </if>", |
| 284 | + " and sr.deleted='0'", | ||
| 285 | + " and su.deleted='0'", | ||
| 286 | + " and sur.deleted='0'", | ||
| 287 | + " and sr.deleted='0'", | ||
| 274 | "</script>" | 288 | "</script>" |
| 275 | }) | 289 | }) |
| 276 | @Results({ | 290 | @Results({ |
| @@ -311,6 +325,11 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | @@ -311,6 +325,11 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { | ||
| 311 | " FIND_IN_SET(#{busiLine}, REPLACE(su.busi_line, ' ', '')) > 0", | 325 | " FIND_IN_SET(#{busiLine}, REPLACE(su.busi_line, ' ', '')) > 0", |
| 312 | " AND gr.id = #{roadId}", | 326 | " AND gr.id = #{roadId}", |
| 313 | " AND sr.code = #{roleCode}", | 327 | " AND sr.code = #{roleCode}", |
| 328 | + " and gr.deleted='0'", | ||
| 329 | + " and sd.deleted='0'", | ||
| 330 | + " and su.deleted='0'", | ||
| 331 | + " and sur.deleted='0'", | ||
| 332 | + " and sr.deleted='0'", | ||
| 314 | "</script>" | 333 | "</script>" |
| 315 | }) | 334 | }) |
| 316 | @Results({ | 335 | @Results({ |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
| @@ -177,6 +177,9 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -177,6 +177,9 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 177 | Map<String, Object> variables = new HashMap<>(); | 177 | Map<String, Object> variables = new HashMap<>(); |
| 178 | //审批通过 | 178 | //审批通过 |
| 179 | variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_STATUS,BpmTaskStatusEnum.APPROVE.getStatus()); | 179 | variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_STATUS,BpmTaskStatusEnum.APPROVE.getStatus()); |
| 180 | + if(ObjectUtils.isNotAllEmpty(reqVO.getNextAssignee())){ | ||
| 181 | + variables.put("ylWorkerId",reqVO.getNextAssignee()); | ||
| 182 | + } | ||
| 180 | targetVO.setVariables(variables); | 183 | targetVO.setVariables(variables); |
| 181 | //TODO 审批候选人需要赋值 | 184 | //TODO 审批候选人需要赋值 |
| 182 | Map<String, List<Long>> nextAssignees = new HashMap<>(); | 185 | Map<String, List<Long>> nextAssignees = new HashMap<>(); |
| @@ -245,6 +248,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -245,6 +248,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 245 | } | 248 | } |
| 246 | } | 249 | } |
| 247 | taskBuzReqVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); | 250 | taskBuzReqVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 251 | + //TODO 先写死 | ||
| 252 | + taskBuzReqVO.setKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO); | ||
| 248 | PageResult<MainInfoExtDO> pageResult = workOrderExtMapper.selectWorkOrderDonePage(pageVO,taskBuzReqVO); | 253 | PageResult<MainInfoExtDO> pageResult = workOrderExtMapper.selectWorkOrderDonePage(pageVO,taskBuzReqVO); |
| 249 | return AppGardenTaskConvert.INSTANCE.buildBuziTaskPage(pageResult,attachmentMapper); | 254 | return AppGardenTaskConvert.INSTANCE.buildBuziTaskPage(pageResult,attachmentMapper); |
| 250 | } | 255 | } |
| @@ -277,6 +282,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -277,6 +282,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 277 | } | 282 | } |
| 278 | } | 283 | } |
| 279 | taskBuzReqVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); | 284 | taskBuzReqVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 285 | + //TODO 先写死 | ||
| 286 | + taskBuzReqVO.setKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO); | ||
| 280 | PageResult<MainInfoExtDO> pageResult = workOrderExtMapper.selectWorkOrderTodoPage(pageVO,taskBuzReqVO); | 287 | PageResult<MainInfoExtDO> pageResult = workOrderExtMapper.selectWorkOrderTodoPage(pageVO,taskBuzReqVO); |
| 281 | 288 | ||
| 282 | return AppGardenTaskConvert.INSTANCE.buildBuziTaskPage(pageResult,attachmentMapper); | 289 | return AppGardenTaskConvert.INSTANCE.buildBuziTaskPage(pageResult,attachmentMapper); |
| @@ -335,7 +342,7 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -335,7 +342,7 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 335 | List<String> longRangeImgList = createRequestVo.getLongRangeImgList(); | 342 | List<String> longRangeImgList = createRequestVo.getLongRangeImgList(); |
| 336 | 343 | ||
| 337 | MainInfoDO workOrder = BeanUtils.toBean(createRequestVo, MainInfoDO.class) | 344 | MainInfoDO workOrder = BeanUtils.toBean(createRequestVo, MainInfoDO.class) |
| 338 | - .setStatus(BpmTaskStatusEnum.NOT_START.getStatus()); | 345 | + .setStatus(BpmTaskStatusEnum.RUNNING.getStatus()); |
| 339 | RoadStreetRespDTO roadStreetRespDTO = roadApi.getRoadInfoById(createRequestVo.getRoadId()); | 346 | RoadStreetRespDTO roadStreetRespDTO = roadApi.getRoadInfoById(createRequestVo.getRoadId()); |
| 340 | workOrder.setStreetId(roadStreetRespDTO.getStreetId()); | 347 | workOrder.setStreetId(roadStreetRespDTO.getStreetId()); |
| 341 | workOrder.setStreetName(roadStreetRespDTO.getStreetName()); | 348 | workOrder.setStreetName(roadStreetRespDTO.getStreetName()); |
| @@ -355,10 +362,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -355,10 +362,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 355 | // 发起 BPM 流程 | 362 | // 发起 BPM 流程 |
| 356 | Long userId = SecurityFrameworkUtils.getLoginUserId(); | 363 | Long userId = SecurityFrameworkUtils.getLoginUserId(); |
| 357 | Map<String, Object> processInstanceVariables = new HashMap<>(); | 364 | Map<String, Object> processInstanceVariables = new HashMap<>(); |
| 358 | - processInstanceVariables.put("workOrder", workOrder); | ||
| 359 | - processInstanceVariables.put("imgList", imgList); | ||
| 360 | - processInstanceVariables.put("longRangeImgList", longRangeImgList); | ||
| 361 | - processInstanceVariables.put("initiator", userId); | 365 | + processInstanceVariables.put("roadId", workOrder.getRoadId()); |
| 366 | + processInstanceVariables.put("applyUserId", userId); | ||
| 362 | Map<String, List<Long>> startUserSelectAssignees = new HashMap<>(); | 367 | Map<String, List<Long>> startUserSelectAssignees = new HashMap<>(); |
| 363 | List<AdminUserRespDTO> userList = workOrderExtMapper.getUserByRoadIdAndRoleCode(workOrder.getRoadId(),BpmCommonConstant.TEAM_LEADER_YL,createRequestVo.getBusiLine()); | 368 | List<AdminUserRespDTO> userList = workOrderExtMapper.getUserByRoadIdAndRoleCode(workOrder.getRoadId(),BpmCommonConstant.TEAM_LEADER_YL,createRequestVo.getBusiLine()); |
| 364 | if(org.springframework.util.ObjectUtils.isEmpty(userList)){ | 369 | if(org.springframework.util.ObjectUtils.isEmpty(userList)){ |
| @@ -370,7 +375,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -370,7 +375,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 370 | .map(AdminUserRespDTO::getId) | 375 | .map(AdminUserRespDTO::getId) |
| 371 | // 收集结果到List | 376 | // 收集结果到List |
| 372 | .collect(Collectors.toList()); | 377 | .collect(Collectors.toList()); |
| 373 | - startUserSelectAssignees.put("",idList); | 378 | + //startUserSelectAssignees.put("",idList); |
| 379 | + processInstanceVariables.put("ylTeamLeaderId", idList.get(0)); | ||
| 374 | String processInstanceId = processInstanceApi.createProcessInstance(userId, | 380 | String processInstanceId = processInstanceApi.createProcessInstance(userId, |
| 375 | new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO) | 381 | new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO) |
| 376 | .setVariables(processInstanceVariables).setBusinessKey(String.valueOf(workOrder.getId())) | 382 | .setVariables(processInstanceVariables).setBusinessKey(String.valueOf(workOrder.getId())) |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/el/YlTaskAssignService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.garden.el; | ||
| 2 | + | ||
| 3 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | ||
| 4 | +import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; | ||
| 5 | +import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoExtMapper; | ||
| 6 | +import jakarta.annotation.Resource; | ||
| 7 | +import org.apache.ibatis.annotations.Param; | ||
| 8 | +import org.springframework.lang.NonNull; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 13 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 14 | +import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.TEAM_LEADER_YL_NOT_EXISTS; | ||
| 15 | + | ||
| 16 | +/** | ||
| 17 | + * 类描述:园林流程用户任务表单数据service | ||
| 18 | + * 创建人:yanhuiqing | ||
| 19 | + * 创建时间:2025/12/17 15:41 | ||
| 20 | + * 修改人:yanhuiqing | ||
| 21 | + * 修改时间:2025/12/17 15:41 | ||
| 22 | + * 修改备注: | ||
| 23 | + * | ||
| 24 | + * @author yanhuiqing | ||
| 25 | + * @version 1.0 | ||
| 26 | + */ | ||
| 27 | +@Component("ylTaskAssignService") // Bean名称,需与表达式中一致 | ||
| 28 | +public class YlTaskAssignService { | ||
| 29 | + | ||
| 30 | + @Resource | ||
| 31 | + private MainInfoExtMapper workOrderExtMapper; | ||
| 32 | + public Long getInitiatorApproverByBusiness(Long roadId,String roleCode,String busiLine) { | ||
| 33 | + List<AdminUserRespDTO> userList = workOrderExtMapper.getUserByRoadIdAndRoleCode(roadId,roleCode,busiLine); | ||
| 34 | + if(null != userList && userList.size() > 0){ | ||
| 35 | + return userList.get(0).getId(); | ||
| 36 | + } | ||
| 37 | + throw exception(TEAM_LEADER_YL_NOT_EXISTS); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public List<String> getYlWorkerIdsByTeamLeader(String roleCode,String busiLine) { | ||
| 41 | + Long userId = SecurityFrameworkUtils.getLoginUserId(); | ||
| 42 | + // 业务逻辑:查养护组长下属的养护员,或根据业务类型查共同处理人 | ||
| 43 | + List<AdminUserRespDTO> userList = workOrderExtMapper.getUserByLoginIdAndRoleCode(userId,roleCode,busiLine,true); | ||
| 44 | + return null; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 场景3:复用养护组长ID(供验收节点使用) | ||
| 49 | + * @param ylTeamLeaderId 养护组长ID | ||
| 50 | + * @return 养护组长ID(直接返回,或查其上级) | ||
| 51 | + */ | ||
| 52 | + public String getTeamLeaderConfirmId(String ylTeamLeaderId) { | ||
| 53 | + return ylTeamLeaderId; // 验收节点直接用之前指定的养护组长ID | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 场景4:复用巡查员ID(供验收节点使用) | ||
| 58 | + * @param applyUserId 巡查员ID | ||
| 59 | + * @return 巡查员ID | ||
| 60 | + */ | ||
| 61 | + public String getInspectorConfirmId(String applyUserId) { | ||
| 62 | + return applyUserId; // 验收节点用发起的巡查员ID | ||
| 63 | + } | ||
| 64 | +} | ||
| 0 | \ No newline at end of file | 65 | \ No newline at end of file |