Commit 244a79dd72888166d6fefceb5d1f98786cd81395
Merge remote-tracking branch 'origin/dev' into dev
Showing
21 changed files
with
268 additions
and
6 deletions
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/controller/admin/task/vo/instance/BpmApprovalDetailRespVO.java
| ... | ... | @@ -107,6 +107,10 @@ public class BpmApprovalDetailRespVO { |
| 107 | 107 | @Schema(description = "签名", example = "https://www.iocoder.cn/sign.png") |
| 108 | 108 | private String signPicUrl; |
| 109 | 109 | |
| 110 | + // add by yanhuiqing 扩展审批图片 | |
| 111 | + @Schema(description = "审批附件url", example = "https://www.iocoder.cn/sign.png") | |
| 112 | + private List<String> attattmentUrls; | |
| 113 | + | |
| 110 | 114 | } |
| 111 | 115 | |
| 112 | 116 | } | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java
| ... | ... | @@ -21,6 +21,10 @@ public class BpmTaskApproveReqVO { |
| 21 | 21 | @Schema(description = "签名", example = "https://www.iocoder.cn/sign.png") |
| 22 | 22 | private String signPicUrl; |
| 23 | 23 | |
| 24 | + // add by yanhuiqing 扩展审批图片 | |
| 25 | + @Schema(description = "审批附件url", example = "https://www.iocoder.cn/sign.png") | |
| 26 | + private List<String> attattmentUrls; | |
| 27 | + | |
| 24 | 28 | @Schema(description = "变量实例(动态表单)", requiredMode = Schema.RequiredMode.REQUIRED) |
| 25 | 29 | private Map<String, Object> variables; |
| 26 | 30 | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/controller/admin/task/vo/task/BpmTaskRespVO.java
| ... | ... | @@ -35,6 +35,10 @@ public class BpmTaskRespVO { |
| 35 | 35 | @Schema(description = "审批理由", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
| 36 | 36 | private String reason; |
| 37 | 37 | |
| 38 | + // add by yanhuiqing 扩展审批图片 | |
| 39 | + @Schema(description = "审批附件url", example = "https://www.iocoder.cn/sign.png") | |
| 40 | + private List<String> attattmentUrls; | |
| 41 | + | |
| 38 | 42 | @Schema(description = "任务负责人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048") |
| 39 | 43 | @JsonIgnore // 不返回,只是方便后续读取,赋值给 ownerUser |
| 40 | 44 | private Long owner; | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/controller/admin/task/vo/task/BpmTaskReturnReqVO.java
| ... | ... | @@ -5,6 +5,8 @@ import lombok.Data; |
| 5 | 5 | |
| 6 | 6 | import jakarta.validation.constraints.NotEmpty; |
| 7 | 7 | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 8 | 10 | @Schema(description = "管理后台 - 退回流程任务的 Request VO") |
| 9 | 11 | @Data |
| 10 | 12 | public class BpmTaskReturnReqVO { |
| ... | ... | @@ -21,4 +23,8 @@ public class BpmTaskReturnReqVO { |
| 21 | 23 | @NotEmpty(message = "退回意见不能为空") |
| 22 | 24 | private String reason; |
| 23 | 25 | |
| 26 | + // add by yanhuiqing 扩展审批图片 | |
| 27 | + @Schema(description = "审批附件url", example = "https://www.iocoder.cn/sign.png") | |
| 28 | + private List<String> attattmentUrls; | |
| 29 | + | |
| 24 | 30 | } | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/convert/task/BpmProcessInstanceConvert.java
| ... | ... | @@ -206,7 +206,8 @@ public interface BpmProcessInstanceConvert { |
| 206 | 206 | } |
| 207 | 207 | return BeanUtils.toBean(task, BpmApprovalDetailRespVO.ActivityNodeTask.class) |
| 208 | 208 | .setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task)) |
| 209 | - .setSignPicUrl(FlowableUtils.getTaskSignPicUrl(task)); | |
| 209 | + .setSignPicUrl(FlowableUtils.getTaskSignPicUrl(task)) | |
| 210 | + .setAttattmentUrls(FlowableUtils.getTaskAttachPicUrl(task)); | |
| 210 | 211 | } |
| 211 | 212 | |
| 212 | 213 | default Set<Long> parseUserIds(HistoricProcessInstance processInstance, | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/framework/flowable/core/enums/BpmnVariableConstants.java
| ... | ... | @@ -105,4 +105,9 @@ public class BpmnVariableConstants { |
| 105 | 105 | */ |
| 106 | 106 | public static final String TASK_SIGN_PIC_URL = "TASK_SIGN_PIC_URL"; |
| 107 | 107 | |
| 108 | + /** | |
| 109 | + * 审批附件 - 图片 URL | |
| 110 | + */ | |
| 111 | + public static final String TASK_APPROVE_PIC_URL = "TASK_APPROVE_PIC_URL"; | |
| 112 | + | |
| 108 | 113 | } | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/framework/flowable/core/util/FlowableUtils.java
| ... | ... | @@ -24,6 +24,7 @@ import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; |
| 24 | 24 | import org.flowable.engine.impl.util.CommandContextUtil; |
| 25 | 25 | import org.flowable.engine.runtime.ProcessInstance; |
| 26 | 26 | import org.flowable.task.api.TaskInfo; |
| 27 | +import org.flowable.task.api.history.HistoricTaskInstance; | |
| 27 | 28 | |
| 28 | 29 | import java.util.HashMap; |
| 29 | 30 | import java.util.List; |
| ... | ... | @@ -359,4 +360,12 @@ public class FlowableUtils { |
| 359 | 360 | return getExpressionValue(variableContainer, expressionString); |
| 360 | 361 | } |
| 361 | 362 | |
| 363 | + /** | |
| 364 | + * add by yanhuiqing 新增获取审批任务附件图片 | |
| 365 | + * @param task | |
| 366 | + * @return | |
| 367 | + */ | |
| 368 | + public static List<String> getTaskAttachPicUrl(TaskInfo task) { | |
| 369 | + return (List<String>) task.getTaskLocalVariables().get(BpmnVariableConstants.TASK_APPROVE_PIC_URL); | |
| 370 | + } | |
| 362 | 371 | } | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| ... | ... | @@ -212,6 +212,54 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 212 | 212 | historicProcessInstance, processInstanceStatus, activities, tasks); |
| 213 | 213 | runActivityNodes = getRunApproveNodeList(startUserId, bpmnModel, processDefinition, processVariables, |
| 214 | 214 | activities, tasks); |
| 215 | + /** | |
| 216 | + * // ========== 新增:处理附件URL列表 add by yanhuiqing========== | |
| 217 | + */ | |
| 218 | + | |
| 219 | + // 步骤1:获取流程实例ID(转为字符串,适配Flowable的String类型ID) | |
| 220 | + String processInstanceId = reqVO.getProcessInstanceId() != null ? reqVO.getProcessInstanceId().toString() : null; | |
| 221 | + | |
| 222 | + // 步骤2:处理已结束节点的tasks附件URL | |
| 223 | + if (CollUtil.isNotEmpty(runActivityNodes)) { | |
| 224 | + runActivityNodes.forEach(activityNode -> { | |
| 225 | + if (CollUtil.isNotEmpty(activityNode.getTasks())) { | |
| 226 | + activityNode.getTasks().forEach(task -> { | |
| 227 | + // 传入流程实例ID和任务ID,查询附件URL | |
| 228 | + List<String> urlList = taskService.getAttachmentUrlList(processInstanceId, task.getId()); | |
| 229 | + task.setAttattmentUrls(urlList); // 为task设置附件URL列表 | |
| 230 | + }); | |
| 231 | + } | |
| 232 | + }); | |
| 233 | + } | |
| 234 | + if (CollUtil.isNotEmpty(endActivityNodes)) { | |
| 235 | + endActivityNodes.forEach(activityNode -> { | |
| 236 | + if (CollUtil.isNotEmpty(activityNode.getTasks())) { | |
| 237 | + activityNode.getTasks().forEach(task -> { | |
| 238 | + // 传入流程实例ID和任务ID,查询附件URL | |
| 239 | + List<String> urlList = taskService.getAttachmentUrlList(processInstanceId, task.getId()); | |
| 240 | + task.setAttattmentUrls(urlList); // 为task设置附件URL列表 | |
| 241 | + }); | |
| 242 | + } | |
| 243 | + }); | |
| 244 | + } | |
| 245 | + | |
| 246 | + // 步骤3:处理运行中节点的tasks附件URL | |
| 247 | + if (CollUtil.isNotEmpty(runActivityNodes)) { | |
| 248 | + runActivityNodes.forEach(activityNode -> { | |
| 249 | + if (CollUtil.isNotEmpty(activityNode.getTasks())) { | |
| 250 | + activityNode.getTasks().forEach(task -> { | |
| 251 | + List<String> urlList = taskService.getAttachmentUrlList(processInstanceId, task.getId()); | |
| 252 | + task.setAttattmentUrls(urlList); | |
| 253 | + }); | |
| 254 | + } | |
| 255 | + }); | |
| 256 | + } | |
| 257 | + | |
| 258 | + /** | |
| 259 | + * // ========== end 新增:处理附件URL列表 add by yanhuiqing========== | |
| 260 | + */ | |
| 261 | + | |
| 262 | + | |
| 215 | 263 | } |
| 216 | 264 | |
| 217 | 265 | // 2.2 流程已经结束,直接 return,无需预测 |
| ... | ... | @@ -242,6 +290,69 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 242 | 290 | List<ActivityNode> simulateActivityNodes = getSimulateApproveNodeList(startUserId, bpmnModel, |
| 243 | 291 | processDefinitionInfo, |
| 244 | 292 | processVariables, activities, needSimulateTaskDefKeysByReturn); |
| 293 | + /** | |
| 294 | + * // ========== 新增:处理附件URL列表 add by yanhuiqing========== | |
| 295 | + */ | |
| 296 | + | |
| 297 | + // 步骤1:获取流程实例ID(转为字符串,适配Flowable的String类型ID) | |
| 298 | + String processInstanceId = reqVO.getProcessInstanceId() != null ? reqVO.getProcessInstanceId().toString() : null; | |
| 299 | + | |
| 300 | + // 步骤2:处理已结束节点的tasks附件URL | |
| 301 | + if (CollUtil.isNotEmpty(runActivityNodes)) { | |
| 302 | + runActivityNodes.forEach(activityNode -> { | |
| 303 | + if (CollUtil.isNotEmpty(activityNode.getTasks())) { | |
| 304 | + activityNode.getTasks().forEach(task -> { | |
| 305 | + // 传入流程实例ID和任务ID,查询附件URL | |
| 306 | + List<String> urlList = taskService.getAttachmentUrlList(processInstanceId, task.getId()); | |
| 307 | + task.setAttattmentUrls(urlList); // 为task设置附件URL列表 | |
| 308 | + }); | |
| 309 | + } | |
| 310 | + }); | |
| 311 | + } | |
| 312 | + if (CollUtil.isNotEmpty(endActivityNodes)) { | |
| 313 | + endActivityNodes.forEach(activityNode -> { | |
| 314 | + if (CollUtil.isNotEmpty(activityNode.getTasks())) { | |
| 315 | + activityNode.getTasks().forEach(task -> { | |
| 316 | + // 传入流程实例ID和任务ID,查询附件URL | |
| 317 | + List<String> urlList = taskService.getAttachmentUrlList(processInstanceId, task.getId()); | |
| 318 | + task.setAttattmentUrls(urlList); // 为task设置附件URL列表 | |
| 319 | + }); | |
| 320 | + } | |
| 321 | + }); | |
| 322 | + } | |
| 323 | + | |
| 324 | + // 步骤3:处理运行中节点的tasks附件URL | |
| 325 | + if (CollUtil.isNotEmpty(runActivityNodes)) { | |
| 326 | + runActivityNodes.forEach(activityNode -> { | |
| 327 | + if (CollUtil.isNotEmpty(activityNode.getTasks())) { | |
| 328 | + activityNode.getTasks().forEach(task -> { | |
| 329 | + List<String> urlList = taskService.getAttachmentUrlList(processInstanceId, task.getId()); | |
| 330 | + task.setAttattmentUrls(urlList); | |
| 331 | + }); | |
| 332 | + } | |
| 333 | + }); | |
| 334 | + } | |
| 335 | + | |
| 336 | + // 步骤4:处理模拟节点的tasks附件URL(如果有) | |
| 337 | + if (CollUtil.isNotEmpty(simulateActivityNodes)) { | |
| 338 | + simulateActivityNodes.forEach(activityNode -> { | |
| 339 | + if (CollUtil.isNotEmpty(activityNode.getTasks())) { | |
| 340 | + activityNode.getTasks().forEach(task -> { | |
| 341 | + List<String> urlList = taskService.getAttachmentUrlList(processInstanceId, task.getId()); | |
| 342 | + task.setAttattmentUrls(urlList); | |
| 343 | + }); | |
| 344 | + } | |
| 345 | + }); | |
| 346 | + } | |
| 347 | + | |
| 348 | + // 步骤5:处理待办任务的附件URL | |
| 349 | + if (todoTask != null) { | |
| 350 | + List<String> urlList = taskService.getAttachmentUrlList(processInstanceId, todoTask.getId()); | |
| 351 | + todoTask.setAttattmentUrls(urlList);; | |
| 352 | + } | |
| 353 | + /** | |
| 354 | + * // ========== end 新增:处理附件URL列表 add by yanhuiqing========== | |
| 355 | + */ | |
| 245 | 356 | |
| 246 | 357 | // 4. 拼接最终数据 |
| 247 | 358 | return buildApprovalDetail(reqVO, bpmnModel, processDefinition, processDefinitionInfo, historicProcessInstance, | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/service/task/BpmTaskService.java
| ... | ... | @@ -7,6 +7,7 @@ import com.zteits.urbanops.module.bpm.enums.definition.BpmUserTaskTimeoutHandler |
| 7 | 7 | import jakarta.validation.Valid; |
| 8 | 8 | import org.flowable.bpmn.model.UserTask; |
| 9 | 9 | import org.flowable.engine.history.HistoricActivityInstance; |
| 10 | +import org.flowable.engine.task.Attachment; | |
| 10 | 11 | import org.flowable.task.api.Task; |
| 11 | 12 | import org.flowable.task.api.TaskInfo; |
| 12 | 13 | import org.flowable.task.api.history.HistoricTaskInstance; |
| ... | ... | @@ -329,4 +330,16 @@ public interface BpmTaskService { |
| 329 | 330 | */ |
| 330 | 331 | void triggerTask(String processInstanceId, String taskDefineKey); |
| 331 | 332 | |
| 333 | + | |
| 334 | + | |
| 335 | + //--------------------------------------------------------------- | |
| 336 | + //扩展芋道 bpm不支持,审批时上传的附件问题 add by yanhuiqing | |
| 337 | + | |
| 338 | + /** | |
| 339 | + * 扩展 功能支持 审批人上传的附件类型 | |
| 340 | + * @param taskId | |
| 341 | + * @param processInstanceId | |
| 342 | + * @return | |
| 343 | + */ | |
| 344 | + List<String> getAttachmentUrlList(String processInstanceId, String taskId); | |
| 332 | 345 | } | ... | ... |
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/service/task/BpmTaskServiceImpl.java
| ... | ... | @@ -49,6 +49,7 @@ import org.flowable.engine.history.HistoricActivityInstance; |
| 49 | 49 | import org.flowable.engine.runtime.ActivityInstance; |
| 50 | 50 | import org.flowable.engine.runtime.Execution; |
| 51 | 51 | import org.flowable.engine.runtime.ProcessInstance; |
| 52 | +import org.flowable.engine.task.Attachment; | |
| 52 | 53 | import org.flowable.task.api.DelegationState; |
| 53 | 54 | import org.flowable.task.api.Task; |
| 54 | 55 | import org.flowable.task.api.TaskInfo; |
| ... | ... | @@ -63,6 +64,7 @@ import org.springframework.transaction.support.TransactionSynchronization; |
| 63 | 64 | import org.springframework.transaction.support.TransactionSynchronizationManager; |
| 64 | 65 | |
| 65 | 66 | import java.util.*; |
| 67 | +import java.util.stream.Collectors; | |
| 66 | 68 | import java.util.stream.Stream; |
| 67 | 69 | |
| 68 | 70 | import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; |
| ... | ... | @@ -586,6 +588,27 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 586 | 588 | // 2.2 添加评论 |
| 587 | 589 | taskService.addComment(task.getId(), task.getProcessInstanceId(), BpmCommentTypeEnum.APPROVE.getType(), |
| 588 | 590 | BpmCommentTypeEnum.APPROVE.formatComment(reqVO.getReason())); |
| 591 | + /** | |
| 592 | + * add by yanhuiqing 审批附件 begin | |
| 593 | + */ | |
| 594 | + | |
| 595 | + List<String> urlList = reqVO.getAttattmentUrls(); | |
| 596 | + if(ObjectUtil.isNotEmpty(urlList)){ | |
| 597 | + String targetUrls = CollUtil.isEmpty(urlList)?StrUtil.EMPTY:urlList.stream() | |
| 598 | + .filter(StrUtil::isNotEmpty) | |
| 599 | + .distinct() | |
| 600 | + .collect(Collectors.joining(",")); | |
| 601 | + String attachmentName = "审批附件-" + BpmCommentTypeEnum.APPROVE.getType(); | |
| 602 | + String attachmentType = "URL"; // 附件类型标记为URL(可自定义) | |
| 603 | + String description = BpmCommentTypeEnum.APPROVE.getName()+"的附件"; | |
| 604 | + taskService.createAttachment(attachmentType,task.getId(),task.getProcessInstanceId(),attachmentName,description,targetUrls); | |
| 605 | + taskService.setVariableLocal(task.getId(), BpmnVariableConstants.TASK_APPROVE_PIC_URL, reqVO.getAttattmentUrls()); | |
| 606 | + | |
| 607 | + } | |
| 608 | + /** | |
| 609 | + * add by yanhuiqing 审批附件 end | |
| 610 | + */ | |
| 611 | + | |
| 589 | 612 | |
| 590 | 613 | // 3. 设置流程变量。如果流程变量前端传空,需要从历史实例中获取,原因:前端表单如果在当前节点无可编辑的字段时 variables 一定会为空 |
| 591 | 614 | // 场景一:A 节点发起,B 节点表单无可编辑字段,审批通过时,C 节点需要流程变量获取下一个执行节点,但因为 B 节点无可编辑的字段,variables 为空,流程可能出现问题。 |
| ... | ... | @@ -904,6 +927,25 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 904 | 927 | * @param reqVO 前端参数封装 |
| 905 | 928 | */ |
| 906 | 929 | public void returnTask(Long userId, BpmnModel bpmnModel, Task currentTask, FlowElement targetElement, BpmTaskReturnReqVO reqVO) { |
| 930 | + | |
| 931 | + /** | |
| 932 | + * add by yanhuiqing 审批附件 begin | |
| 933 | + */ | |
| 934 | + List<String> urlList = reqVO.getAttattmentUrls(); | |
| 935 | + if(CollUtil.isNotEmpty(urlList)){ | |
| 936 | + String targetUrls = CollUtil.isEmpty(urlList)?StrUtil.EMPTY:urlList.stream() | |
| 937 | + .filter(StrUtil::isNotEmpty) | |
| 938 | + .distinct() | |
| 939 | + .collect(Collectors.joining(",")); | |
| 940 | + String attachmentName = "审批附件-" + BpmCommentTypeEnum.RETURN.getType(); | |
| 941 | + String attachmentType = "URL"; // 附件类型标记为URL(可自定义) | |
| 942 | + String description = BpmCommentTypeEnum.RETURN.getName()+"的附件"; | |
| 943 | + taskService.createAttachment(attachmentType,currentTask.getId(),currentTask.getProcessInstanceId(),attachmentName,description,targetUrls); | |
| 944 | + } | |
| 945 | + /** | |
| 946 | + * add by yanhuiqing 审批附件 end | |
| 947 | + */ | |
| 948 | + | |
| 907 | 949 | // 1. 获得所有需要回撤的任务 taskDefinitionKey,用于稍后的 moveActivityIdsToSingleActivityId 回撤 |
| 908 | 950 | // 1.1 获取所有正常进行的任务节点 Key |
| 909 | 951 | List<Task> taskList = taskService.createTaskQuery().processInstanceId(currentTask.getProcessInstanceId()).list(); |
| ... | ... | @@ -1643,6 +1685,28 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 1643 | 1685 | FlowableUtils.execute(execution.getTenantId(), |
| 1644 | 1686 | () -> runtimeService.trigger(execution.getId())); |
| 1645 | 1687 | } |
| 1688 | + //扩展 add by yanhuiqing | |
| 1689 | + @Override | |
| 1690 | + public List<String> getAttachmentUrlList(String processInstanceId, String taskId) { | |
| 1691 | + | |
| 1692 | + List<Attachment> attachmentList = taskService.getProcessInstanceAttachments(processInstanceId); | |
| 1693 | + // 空列表直接返回空集合(避免null) | |
| 1694 | + if (CollUtil.isEmpty(attachmentList)) { | |
| 1695 | + return new ArrayList<>(); | |
| 1696 | + } | |
| 1697 | + | |
| 1698 | + List<String> targetList = new ArrayList<>(); | |
| 1699 | + for(Attachment a : attachmentList){ | |
| 1700 | + if(taskId.equals(a.getTaskId())){ | |
| 1701 | + String urls = a.getUrl(); | |
| 1702 | + String[] array = urls.split(","); | |
| 1703 | + targetList.addAll(Arrays.asList(array)); | |
| 1704 | + } | |
| 1705 | + } | |
| 1706 | + return targetList.stream() | |
| 1707 | + .distinct() // 核心:去重 | |
| 1708 | + .collect(Collectors.toList()); | |
| 1709 | + } | |
| 1646 | 1710 | |
| 1647 | 1711 | /** |
| 1648 | 1712 | * 获得自身的代理对象,解决 AOP 生效问题 | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/inspectionplan/vo/AppInspectionPlanCommitSaveReqVO.java
| ... | ... | @@ -36,6 +36,9 @@ public class AppInspectionPlanCommitSaveReqVO { |
| 36 | 36 | @NotNull(message = "转交状态: 1:未转交;2:已转交不能为空") |
| 37 | 37 | private Integer transState; |
| 38 | 38 | |
| 39 | + @Schema(description = "紧急程度" ) | |
| 40 | + private Integer pressingType; | |
| 41 | + | |
| 39 | 42 | @Schema(description = "转交问题单编码", requiredMode = Schema.RequiredMode.REQUIRED) |
| 40 | 43 | private String transWorkNo; |
| 41 | 44 | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/inspectionplan/vo/AppInspectionPlanRespVO.java
| ... | ... | @@ -6,6 +6,7 @@ import lombok.Data; |
| 6 | 6 | import org.springframework.format.annotation.DateTimeFormat; |
| 7 | 7 | |
| 8 | 8 | import java.time.LocalDate; |
| 9 | +import java.time.LocalDateTime; | |
| 9 | 10 | |
| 10 | 11 | import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; |
| 11 | 12 | |
| ... | ... | @@ -37,11 +38,11 @@ public class AppInspectionPlanRespVO { |
| 37 | 38 | |
| 38 | 39 | @Schema(description = "执行开始时间") |
| 39 | 40 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) |
| 40 | - private LocalDate beginTime; | |
| 41 | + private LocalDateTime beginTime; | |
| 41 | 42 | |
| 42 | 43 | @Schema(description = "执行时间") |
| 43 | 44 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) |
| 44 | - private LocalDate endTime; | |
| 45 | + private LocalDateTime endTime; | |
| 45 | 46 | |
| 46 | 47 | @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) |
| 47 | 48 | private Integer finishState; | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanPageRoadRespVO.java
| ... | ... | @@ -50,9 +50,9 @@ public class AppMaintainPlanPageRoadRespVO{ |
| 50 | 50 | private Integer planFinishNum; |
| 51 | 51 | |
| 52 | 52 | @Schema(description = "执行开始时间") |
| 53 | - private LocalDate beginTime; | |
| 53 | + private LocalDateTime beginTime; | |
| 54 | 54 | |
| 55 | 55 | @Schema(description = "执行时间") |
| 56 | - private LocalDate endTime; | |
| 56 | + private LocalDateTime endTime; | |
| 57 | 57 | |
| 58 | 58 | } |
| 59 | 59 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/convert/AppGardenWorkOrderConvert.java
| ... | ... | @@ -27,6 +27,7 @@ public interface AppGardenWorkOrderConvert { |
| 27 | 27 | orderReqVO.setSourceName("园林巡查上报"); |
| 28 | 28 | orderReqVO.setThirdWorkNo(planNo); |
| 29 | 29 | orderReqVO.setOrderType("C"); |
| 30 | + orderReqVO.setPressingType(createReqVO.getPressingType()); | |
| 30 | 31 | orderReqVO.setFinishDate(LocalDateTime.now()); |
| 31 | 32 | orderReqVO.setBusiLine(inspectionPlanDO.getBusiLine()); |
| 32 | 33 | orderReqVO.setLatLonType(3); | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanCommitServiceImpl.java
| ... | ... | @@ -169,7 +169,7 @@ public class InspectionPlanCommitServiceImpl implements InspectionPlanCommitServ |
| 169 | 169 | .inspectionState(createReqVO.getInspectionState()).transState(createReqVO.getTransState()) |
| 170 | 170 | .transWorkNo(createReqVO.getTransWorkNo()) |
| 171 | 171 | .userId(userId).userName(userName) |
| 172 | - .finishTime(now).creatorName(userName).updaterName(userName) | |
| 172 | + .creatorName(userName).updaterName(userName) | |
| 173 | 173 | .remark(createReqVO.getRemark()).imgHost(createReqVO.getImgHost()).build(); |
| 174 | 174 | inspectionPlanCommit.setCreator(userId+""); |
| 175 | 175 | inspectionPlanCommit.setUpdater(userId+""); | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoHasTaskPageReqVO.java
| ... | ... | @@ -39,6 +39,8 @@ public class MainInfoHasTaskPageReqVO extends PageParam { |
| 39 | 39 | private String busiLine; |
| 40 | 40 | @Schema(description = "工单号") |
| 41 | 41 | private String orderNo; |
| 42 | + @Schema(description = "工单类型 Q:快速工单,C:普通工单,O:其他工单") | |
| 43 | + private String orderType; | |
| 42 | 44 | @Schema(description = "工单名称", example = "张三") |
| 43 | 45 | private String orderName; |
| 44 | 46 | @Schema(description = "工单描述", example = "你说的对") | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/AppGardenWorkOrderController.java
| ... | ... | @@ -303,6 +303,8 @@ public class AppGardenWorkOrderController { |
| 303 | 303 | rejReqVO.setCurTaskKey(reqVO.getTaskKey()); |
| 304 | 304 | rejReqVO.setReason(reqVO.getReason()); |
| 305 | 305 | rejReqVO.setWorkerDataId(reqVO.getWorkerDataId()); |
| 306 | + List<String> returnImgs = reqVO.getReturnImgs(); | |
| 307 | + rejReqVO.setReturnImgs(returnImgs); | |
| 306 | 308 | this.returnPreviousNode(rejReqVO); |
| 307 | 309 | log.info("当前操作:"+OperateTypeEnum.YL_TEAM_LEADER_CONFIRM_REJECT.getDesc()+"<--结束"); |
| 308 | 310 | return success(true); |
| ... | ... | @@ -335,6 +337,7 @@ public class AppGardenWorkOrderController { |
| 335 | 337 | returnApproveReqVO.setAgree(approveStatus); |
| 336 | 338 | returnApproveReqVO.setReason(reqVO.getReason()); |
| 337 | 339 | returnApproveReqVO.setId(reqVO.getTaskId()); |
| 340 | + returnApproveReqVO.setReturnImgs(reqVO.getReturnImgs()); | |
| 338 | 341 | this.approveTask(returnApproveReqVO); |
| 339 | 342 | log.info("当前操作:"+OperateTypeEnum.YL_TEAM_LEADER_RETURN.getDesc()+"<--结束"); |
| 340 | 343 | return success(true); |
| ... | ... | @@ -348,6 +351,7 @@ public class AppGardenWorkOrderController { |
| 348 | 351 | inspectStartReqVO.setAgree(revokeStatus); |
| 349 | 352 | inspectStartReqVO.setReason(reqVO.getReason()); |
| 350 | 353 | inspectStartReqVO.setId(reqVO.getTaskId()); |
| 354 | + inspectStartReqVO.setReturnImgs(reqVO.getReturnImgs()); | |
| 351 | 355 | this.approveTask(inspectStartReqVO); |
| 352 | 356 | log.info("当前操作:"+OperateTypeEnum.YL_INSPECTOR_START_FINISH.getDesc()+"<--结束"); |
| 353 | 357 | return success(true); |
| ... | ... | @@ -379,6 +383,7 @@ public class AppGardenWorkOrderController { |
| 379 | 383 | inspectReqVO.setAgree(verifyStatus); |
| 380 | 384 | inspectReqVO.setReason(reqVO.getReason()); |
| 381 | 385 | inspectReqVO.setId(reqVO.getTaskId()); |
| 386 | + inspectReqVO.setReturnImgs(reqVO.getReturnImgs()); | |
| 382 | 387 | this.approveTask(inspectReqVO); |
| 383 | 388 | log.info("当前操作:"+OperateTypeEnum.YL_INSPECTOR_START_FINISH.getDesc()+"<--结束"); |
| 384 | 389 | return success(true); | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/process/AppGardenApprovalDetailRespVO.java
| ... | ... | @@ -111,6 +111,9 @@ public class AppGardenApprovalDetailRespVO { |
| 111 | 111 | |
| 112 | 112 | @Schema(description = "签名", example = "https://www.iocoder.cn/sign.png") |
| 113 | 113 | private String signPicUrl; |
| 114 | + // add by yanhuiqing 扩展审批图片 | |
| 115 | + @Schema(description = "审批附件url", example = "https://www.iocoder.cn/sign.png") | |
| 116 | + private List<String> attattmentUrls; | |
| 114 | 117 | |
| 115 | 118 | } |
| 116 | 119 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/task/AppGardenTaskApproveReqVO.java
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/maininfo/MainInfoExtMapper.java
| ... | ... | @@ -92,6 +92,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { |
| 92 | 92 | " <if test='query.curingLevelId != null'>", |
| 93 | 93 | " AND m.curing_level_id = #{query.curingLevelId}", |
| 94 | 94 | " </if>", |
| 95 | + " <if test='query.orderType != null'>", | |
| 96 | + " AND m.order_type = #{query.orderType}", | |
| 97 | + " </if>", | |
| 95 | 98 | " <if test='query.taskId != null'>", |
| 96 | 99 | " AND t.ID_ = #{query.taskId}", |
| 97 | 100 | " </if>", |
| ... | ... | @@ -208,6 +211,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { |
| 208 | 211 | " <if test='query.curingLevelId != null'>", |
| 209 | 212 | " AND m.curing_level_id = #{query.curingLevelId}", |
| 210 | 213 | " </if>", |
| 214 | + " <if test='query.orderType != null'>", | |
| 215 | + " AND m.order_type = #{query.orderType}", | |
| 216 | + " </if>", | |
| 211 | 217 | " <if test='query.taskId != null'>", |
| 212 | 218 | " AND t.ID_ = #{query.taskId}", |
| 213 | 219 | " </if>", |
| ... | ... | @@ -316,6 +322,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { |
| 316 | 322 | " <if test='query.curingLevelId != null'>", |
| 317 | 323 | " AND m.curing_level_id = #{query.curingLevelId}", |
| 318 | 324 | " </if>", |
| 325 | + " <if test='query.orderType != null'>", | |
| 326 | + " AND m.order_type = #{query.orderType}", | |
| 327 | + " </if>", | |
| 319 | 328 | " <if test='query.taskId != null'>", |
| 320 | 329 | " AND t.ID_ = #{query.taskId}", |
| 321 | 330 | " </if>", |
| ... | ... | @@ -433,6 +442,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { |
| 433 | 442 | " <if test='query.curingLevelId != null'>", |
| 434 | 443 | " AND m.curing_level_id = #{query.curingLevelId}", |
| 435 | 444 | " </if>", |
| 445 | + " <if test='query.orderType != null'>", | |
| 446 | + " AND m.order_type = #{query.orderType}", | |
| 447 | + " </if>", | |
| 436 | 448 | " <if test='query.taskId != null'>", |
| 437 | 449 | " AND t.ID_ = #{query.taskId}", |
| 438 | 450 | " </if>", |
| ... | ... | @@ -544,6 +556,9 @@ public interface MainInfoExtMapper extends BaseMapperX<MainInfoDO> { |
| 544 | 556 | " <if test='query.curingLevelId != null'>", |
| 545 | 557 | " AND m.curing_level_id = #{query.curingLevelId}", |
| 546 | 558 | " </if>", |
| 559 | + " <if test='query.orderType != null'>", | |
| 560 | + " AND m.order_type = #{query.orderType}", | |
| 561 | + " </if>", | |
| 547 | 562 | " <if test='query.taskId != null'>", |
| 548 | 563 | " AND t.ID_ = #{query.taskId}", |
| 549 | 564 | " </if>", | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
| ... | ... | @@ -229,6 +229,7 @@ public class BpmGardenServiceImpl implements BpmGardenService{ |
| 229 | 229 | //TODO 审批候选人需要赋值 |
| 230 | 230 | Map<String, List<Long>> nextAssignees = new HashMap<>(); |
| 231 | 231 | targetVO.setNextAssignees(nextAssignees); |
| 232 | + targetVO.setAttattmentUrls(reqVO.getReturnImgs()); | |
| 232 | 233 | taskService.approveTask(SecurityFrameworkUtils.getLoginUserId(),targetVO); |
| 233 | 234 | } |
| 234 | 235 | |
| ... | ... | @@ -314,6 +315,7 @@ public class BpmGardenServiceImpl implements BpmGardenService{ |
| 314 | 315 | String currentTaskey = reqVO.getCurTaskKey(); |
| 315 | 316 | targetVO.setTargetTaskDefinitionKey(TaskNodeUtils.getPreviousNodeName(currentTaskey)); |
| 316 | 317 | Long userId = SecurityFrameworkUtils.getLoginUserId(); |
| 318 | + targetVO.setAttattmentUrls(reqVO.getReturnImgs()); | |
| 317 | 319 | taskService.returnTask(userId, targetVO); |
| 318 | 320 | |
| 319 | 321 | } |
| ... | ... | @@ -431,6 +433,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ |
| 431 | 433 | taskBuzReqVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 432 | 434 | //TODO 先写死 |
| 433 | 435 | //taskBuzReqVO.setKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO); |
| 436 | + //需求是APP端 只查普通工单 | |
| 437 | + taskBuzReqVO.setOrderType(BpmCommonConstant.ORDER_TYPE_C); | |
| 434 | 438 | //selectWorkOrderUniqueMyPage 个性化 去重 按工单唯一处理 |
| 435 | 439 | PageResult<MainInfoExtDO> pageResult = workOrderExtMapper.selectWorkOrderUniqueMyPage(pageVO,taskBuzReqVO); |
| 436 | 440 | return AppGardenTaskConvert.INSTANCE.buildBuziTaskPage(pageResult,attachmentMapper, adminUserApi); |
| ... | ... | @@ -465,6 +469,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ |
| 465 | 469 | taskBuzReqVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 466 | 470 | //TODO 先写死 |
| 467 | 471 | //taskBuzReqVO.setKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO); |
| 472 | + //需求是APP端 只查普通工单 | |
| 473 | + taskBuzReqVO.setOrderType(BpmCommonConstant.ORDER_TYPE_C); | |
| 468 | 474 | //已办改为获取最新一条数据 |
| 469 | 475 | PageResult<MainInfoExtDO> pageResult = workOrderExtMapper.selectWorkOrderDoneUniquePage(pageVO,taskBuzReqVO); |
| 470 | 476 | return AppGardenTaskConvert.INSTANCE.buildBuziTaskPage(pageResult,attachmentMapper, adminUserApi); |
| ... | ... | @@ -500,6 +506,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ |
| 500 | 506 | taskBuzReqVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 501 | 507 | //TODO 先写死 |
| 502 | 508 | //taskBuzReqVO.setKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO); |
| 509 | + //需求是APP端 只查普通工单 | |
| 510 | + taskBuzReqVO.setOrderType(BpmCommonConstant.ORDER_TYPE_C); | |
| 503 | 511 | PageResult<MainInfoExtDO> pageResult = workOrderExtMapper.selectWorkOrderTodoPage(pageVO,taskBuzReqVO); |
| 504 | 512 | return AppGardenTaskConvert.INSTANCE.buildBuziTaskPage(pageResult,attachmentMapper,adminUserApi); |
| 505 | 513 | } | ... | ... |