Commit 016789ca646075371f10106185d6662672cb4245
1 parent
63a3b3de
重新发起 业务线导致 附件 和 时间的问题修复
Showing
5 changed files
with
52 additions
and
2 deletions
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/api/constant/BpmCommonConstant.java
| ... | ... | @@ -14,16 +14,34 @@ public class BpmCommonConstant { |
| 14 | 14 | |
| 15 | 15 | public static final String COMMON_QUICK_PROCESS_INITIATOR = "initiator"; |
| 16 | 16 | |
| 17 | + | |
| 17 | 18 | /** |
| 18 | 19 | * 园林巡检工单 流程业务key |
| 19 | 20 | */ |
| 20 | 21 | @Deprecated |
| 21 | 22 | public static final String BPM_GARDEN_INSPECT_WO = "garden_inspect_wo"; |
| 22 | 23 | |
| 24 | + | |
| 25 | + | |
| 23 | 26 | /** |
| 24 | 27 | * 园林巡检工单 通用版本 |
| 25 | 28 | */ |
| 26 | 29 | public static final String BPM_WORKORDER_COMMON_PROD = "workorder_common_prod"; |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 全域工单 流程业务key | |
| 33 | + */ | |
| 34 | + public static final String BPM_UNIVERSE_WO = "universe_workorder_prod"; | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 全域工单 督察员 流程业务key | |
| 38 | + */ | |
| 39 | + public static final String BPM_UNIVERSE_INSPECTOR_WO = "universe_inspector_prod"; | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * AI工单流程业务key | |
| 43 | + */ | |
| 44 | + public static final String BPM_AI_WO = "ai_workorder_prod"; | |
| 27 | 45 | //----------------------------------------工单初始化流程变量key---------------------- |
| 28 | 46 | public static final String BPM_COMMON_PROD_ROADID = "roadId"; |
| 29 | 47 | public static final String BPM_COMMON_PROD_APPLYUSERID = "applyUserId"; |
| ... | ... | @@ -88,6 +106,18 @@ public class BpmCommonConstant { |
| 88 | 106 | * 快速工单编号前缀 |
| 89 | 107 | */ |
| 90 | 108 | public static final String WORK_ORDER_PREFFIX_QUICK = "QWO"; |
| 109 | + /** | |
| 110 | + * 全域工单流程前缀 | |
| 111 | + */ | |
| 112 | + public static final String WORK_ORDER_PREFFIX_UNIVERSE = "UWO"; | |
| 113 | + /** | |
| 114 | + * 全域督察员工单流程前缀 | |
| 115 | + */ | |
| 116 | + public static final String WORK_ORDER_PREFFIX_INSPECTOR = "IWO"; | |
| 117 | + /** | |
| 118 | + * AI工单流程前缀 | |
| 119 | + */ | |
| 120 | + public static final String WORK_ORDER_PREFFIX_AI = "AWO"; | |
| 91 | 121 | public static final String ORDER_STATUS_INIT = "000"; |
| 92 | 122 | |
| 93 | 123 | public static final String ORDER_TYPE_Q = "Q"; | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/aop/BuzStatusUpdateAspect.java
| ... | ... | @@ -16,6 +16,7 @@ import com.zteits.urbanops.module.workorder.enums.OperateTypeEnum; |
| 16 | 16 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; |
| 17 | 17 | import com.zteits.urbanops.module.workorder.service.maininfo.MainInfoService; |
| 18 | 18 | import jakarta.annotation.Resource; |
| 19 | +import jodd.util.StringUtil; | |
| 19 | 20 | import lombok.RequiredArgsConstructor; |
| 20 | 21 | import org.aspectj.lang.ProceedingJoinPoint; |
| 21 | 22 | import org.aspectj.lang.annotation.Around; |
| ... | ... | @@ -97,6 +98,7 @@ public class BuzStatusUpdateAspect { |
| 97 | 98 | RoadStreetRespDTO roadStreetRespDTO = roadApi.getRoadInfoById(reqVO.getRoadId()); |
| 98 | 99 | targeVO = BeanUtils.toBean(reqVO,MainInfoDO.class); |
| 99 | 100 | targeVO.setId(reqVO.getWorkerDataId()); |
| 101 | + targeVO.setOrderNo(dbData.getOrderNo()); | |
| 100 | 102 | targeVO.setStreetId(roadStreetRespDTO.getStreetId()); |
| 101 | 103 | targeVO.setStreetName(roadStreetRespDTO.getStreetName()); |
| 102 | 104 | DictDataRespDTO dictData = dictDataCommonApi.getDictData(CONSERVE_LEVEL, roadStreetRespDTO.getLevelId().toString()); |
| ... | ... | @@ -106,11 +108,21 @@ public class BuzStatusUpdateAspect { |
| 106 | 108 | targeVO.setCuringLevelId(Integer.valueOf(dictData.getValue())); |
| 107 | 109 | targeVO.setCuringLevelName(dictData.getLabel()); |
| 108 | 110 | targeVO.setCommitDate(LocalDateTime.now()); |
| 111 | + if(reqVO.getExpectedFinishDate() != null){ | |
| 112 | + targeVO.setExpectedFinishDate(reqVO.getExpectedFinishDate());//重新发起的期望时间 | |
| 113 | + } | |
| 109 | 114 | targeVO.setCompanyId(SecurityFrameworkUtils.getCompanyId()); |
| 110 | - targeVO.setBusiLine(SecurityFrameworkUtils.getBusiLine()); | |
| 115 | + if(StringUtil.isNotEmpty(reqVO.getBusiLine())){//防止业务线重新修改 | |
| 116 | + targeVO.setBusiLine(reqVO.getBusiLine()); | |
| 117 | + }else { | |
| 118 | + targeVO.setBusiLine(SecurityFrameworkUtils.getBusiLine()); | |
| 119 | + } | |
| 111 | 120 | targeVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 112 | 121 | targeVO.setUserName(SecurityFrameworkUtils.getLoginUserNickname()); |
| 113 | - targeVO.setFinishDate(reqVO.getFinishDate()); | |
| 122 | + if(reqVO.getFinishDate() != null){ | |
| 123 | + targeVO.setFinishDate(reqVO.getFinishDate()); | |
| 124 | + } | |
| 125 | + | |
| 114 | 126 | List<String> problemsImgs = reqVO.getProblemsImgs(); |
| 115 | 127 | if(ObjectUtils.isNotAllEmpty(problemsImgs) && problemsImgs.size()>0){ |
| 116 | 128 | gardenService.attachmentInsertOrUpdate(problemsImgs,BpmCommonConstant.PROBLEM_IMG_GROUP,targeVO); | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/common/AppUniversalApprovalReqVO.java
| ... | ... | @@ -134,6 +134,9 @@ public class AppUniversalApprovalReqVO { |
| 134 | 134 | @Schema(description = "三方工单ID") |
| 135 | 135 | private String thirdWorkNo; |
| 136 | 136 | |
| 137 | + @Schema(description = "希望完成时间", example = "1766505427000") // Swagger文档示例 | |
| 138 | + private LocalDateTime expectedFinishDate; | |
| 139 | + | |
| 137 | 140 | @Schema(description = "完成时间") |
| 138 | 141 | private LocalDateTime finishDate; |
| 139 | 142 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/enums/ErrorCodeConstants.java
| ... | ... | @@ -32,4 +32,6 @@ public interface ErrorCodeConstants { |
| 32 | 32 | ErrorCode APP_USER_ROLE_NOT_EXISTS = new ErrorCode(1-900-002-001, "该人员未分配角色 !"); |
| 33 | 33 | |
| 34 | 34 | ErrorCode APP_WORK_ORADER_ERROR = new ErrorCode(1-900-002-002, "工单类型错误,快速工单无法走此流程 !"); |
| 35 | + | |
| 36 | + ErrorCode APP_WORK_ORADER_NO_NOT_EXISTS = new ErrorCode(1-900-002-003, "工单编号不能为空!"); | |
| 35 | 37 | } | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
| ... | ... | @@ -650,6 +650,9 @@ public class BpmGardenServiceImpl implements BpmGardenService{ |
| 650 | 650 | AttachmentDO saveDO = new AttachmentDO(); |
| 651 | 651 | saveDO.setBusiLine(workOrder.getBusiLine()); |
| 652 | 652 | saveDO.setBusiType(type); |
| 653 | + if(StringUtil.isEmpty(workOrder.getOrderNo())){ | |
| 654 | + throw exception(APP_WORK_ORADER_NO_NOT_EXISTS); | |
| 655 | + } | |
| 653 | 656 | saveDO.setOrderNo(workOrder.getOrderNo()); |
| 654 | 657 | String filePaths = String.join(",",imgList); |
| 655 | 658 | saveDO.setFileNames(filePaths); | ... | ... |