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,16 +14,34 @@ public class BpmCommonConstant { | ||
| 14 | 14 | ||
| 15 | public static final String COMMON_QUICK_PROCESS_INITIATOR = "initiator"; | 15 | public static final String COMMON_QUICK_PROCESS_INITIATOR = "initiator"; |
| 16 | 16 | ||
| 17 | + | ||
| 17 | /** | 18 | /** |
| 18 | * 园林巡检工单 流程业务key | 19 | * 园林巡检工单 流程业务key |
| 19 | */ | 20 | */ |
| 20 | @Deprecated | 21 | @Deprecated |
| 21 | public static final String BPM_GARDEN_INSPECT_WO = "garden_inspect_wo"; | 22 | public static final String BPM_GARDEN_INSPECT_WO = "garden_inspect_wo"; |
| 22 | 23 | ||
| 24 | + | ||
| 25 | + | ||
| 23 | /** | 26 | /** |
| 24 | * 园林巡检工单 通用版本 | 27 | * 园林巡检工单 通用版本 |
| 25 | */ | 28 | */ |
| 26 | public static final String BPM_WORKORDER_COMMON_PROD = "workorder_common_prod"; | 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 | //----------------------------------------工单初始化流程变量key---------------------- | 45 | //----------------------------------------工单初始化流程变量key---------------------- |
| 28 | public static final String BPM_COMMON_PROD_ROADID = "roadId"; | 46 | public static final String BPM_COMMON_PROD_ROADID = "roadId"; |
| 29 | public static final String BPM_COMMON_PROD_APPLYUSERID = "applyUserId"; | 47 | public static final String BPM_COMMON_PROD_APPLYUSERID = "applyUserId"; |
| @@ -88,6 +106,18 @@ public class BpmCommonConstant { | @@ -88,6 +106,18 @@ public class BpmCommonConstant { | ||
| 88 | * 快速工单编号前缀 | 106 | * 快速工单编号前缀 |
| 89 | */ | 107 | */ |
| 90 | public static final String WORK_ORDER_PREFFIX_QUICK = "QWO"; | 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 | public static final String ORDER_STATUS_INIT = "000"; | 121 | public static final String ORDER_STATUS_INIT = "000"; |
| 92 | 122 | ||
| 93 | public static final String ORDER_TYPE_Q = "Q"; | 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,6 +16,7 @@ import com.zteits.urbanops.module.workorder.enums.OperateTypeEnum; | ||
| 16 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; | 16 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; |
| 17 | import com.zteits.urbanops.module.workorder.service.maininfo.MainInfoService; | 17 | import com.zteits.urbanops.module.workorder.service.maininfo.MainInfoService; |
| 18 | import jakarta.annotation.Resource; | 18 | import jakarta.annotation.Resource; |
| 19 | +import jodd.util.StringUtil; | ||
| 19 | import lombok.RequiredArgsConstructor; | 20 | import lombok.RequiredArgsConstructor; |
| 20 | import org.aspectj.lang.ProceedingJoinPoint; | 21 | import org.aspectj.lang.ProceedingJoinPoint; |
| 21 | import org.aspectj.lang.annotation.Around; | 22 | import org.aspectj.lang.annotation.Around; |
| @@ -97,6 +98,7 @@ public class BuzStatusUpdateAspect { | @@ -97,6 +98,7 @@ public class BuzStatusUpdateAspect { | ||
| 97 | RoadStreetRespDTO roadStreetRespDTO = roadApi.getRoadInfoById(reqVO.getRoadId()); | 98 | RoadStreetRespDTO roadStreetRespDTO = roadApi.getRoadInfoById(reqVO.getRoadId()); |
| 98 | targeVO = BeanUtils.toBean(reqVO,MainInfoDO.class); | 99 | targeVO = BeanUtils.toBean(reqVO,MainInfoDO.class); |
| 99 | targeVO.setId(reqVO.getWorkerDataId()); | 100 | targeVO.setId(reqVO.getWorkerDataId()); |
| 101 | + targeVO.setOrderNo(dbData.getOrderNo()); | ||
| 100 | targeVO.setStreetId(roadStreetRespDTO.getStreetId()); | 102 | targeVO.setStreetId(roadStreetRespDTO.getStreetId()); |
| 101 | targeVO.setStreetName(roadStreetRespDTO.getStreetName()); | 103 | targeVO.setStreetName(roadStreetRespDTO.getStreetName()); |
| 102 | DictDataRespDTO dictData = dictDataCommonApi.getDictData(CONSERVE_LEVEL, roadStreetRespDTO.getLevelId().toString()); | 104 | DictDataRespDTO dictData = dictDataCommonApi.getDictData(CONSERVE_LEVEL, roadStreetRespDTO.getLevelId().toString()); |
| @@ -106,11 +108,21 @@ public class BuzStatusUpdateAspect { | @@ -106,11 +108,21 @@ public class BuzStatusUpdateAspect { | ||
| 106 | targeVO.setCuringLevelId(Integer.valueOf(dictData.getValue())); | 108 | targeVO.setCuringLevelId(Integer.valueOf(dictData.getValue())); |
| 107 | targeVO.setCuringLevelName(dictData.getLabel()); | 109 | targeVO.setCuringLevelName(dictData.getLabel()); |
| 108 | targeVO.setCommitDate(LocalDateTime.now()); | 110 | targeVO.setCommitDate(LocalDateTime.now()); |
| 111 | + if(reqVO.getExpectedFinishDate() != null){ | ||
| 112 | + targeVO.setExpectedFinishDate(reqVO.getExpectedFinishDate());//重新发起的期望时间 | ||
| 113 | + } | ||
| 109 | targeVO.setCompanyId(SecurityFrameworkUtils.getCompanyId()); | 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 | targeVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); | 120 | targeVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 112 | targeVO.setUserName(SecurityFrameworkUtils.getLoginUserNickname()); | 121 | targeVO.setUserName(SecurityFrameworkUtils.getLoginUserNickname()); |
| 113 | - targeVO.setFinishDate(reqVO.getFinishDate()); | 122 | + if(reqVO.getFinishDate() != null){ |
| 123 | + targeVO.setFinishDate(reqVO.getFinishDate()); | ||
| 124 | + } | ||
| 125 | + | ||
| 114 | List<String> problemsImgs = reqVO.getProblemsImgs(); | 126 | List<String> problemsImgs = reqVO.getProblemsImgs(); |
| 115 | if(ObjectUtils.isNotAllEmpty(problemsImgs) && problemsImgs.size()>0){ | 127 | if(ObjectUtils.isNotAllEmpty(problemsImgs) && problemsImgs.size()>0){ |
| 116 | gardenService.attachmentInsertOrUpdate(problemsImgs,BpmCommonConstant.PROBLEM_IMG_GROUP,targeVO); | 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,6 +134,9 @@ public class AppUniversalApprovalReqVO { | ||
| 134 | @Schema(description = "三方工单ID") | 134 | @Schema(description = "三方工单ID") |
| 135 | private String thirdWorkNo; | 135 | private String thirdWorkNo; |
| 136 | 136 | ||
| 137 | + @Schema(description = "希望完成时间", example = "1766505427000") // Swagger文档示例 | ||
| 138 | + private LocalDateTime expectedFinishDate; | ||
| 139 | + | ||
| 137 | @Schema(description = "完成时间") | 140 | @Schema(description = "完成时间") |
| 138 | private LocalDateTime finishDate; | 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,4 +32,6 @@ public interface ErrorCodeConstants { | ||
| 32 | ErrorCode APP_USER_ROLE_NOT_EXISTS = new ErrorCode(1-900-002-001, "该人员未分配角色 !"); | 32 | ErrorCode APP_USER_ROLE_NOT_EXISTS = new ErrorCode(1-900-002-001, "该人员未分配角色 !"); |
| 33 | 33 | ||
| 34 | ErrorCode APP_WORK_ORADER_ERROR = new ErrorCode(1-900-002-002, "工单类型错误,快速工单无法走此流程 !"); | 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,6 +650,9 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 650 | AttachmentDO saveDO = new AttachmentDO(); | 650 | AttachmentDO saveDO = new AttachmentDO(); |
| 651 | saveDO.setBusiLine(workOrder.getBusiLine()); | 651 | saveDO.setBusiLine(workOrder.getBusiLine()); |
| 652 | saveDO.setBusiType(type); | 652 | saveDO.setBusiType(type); |
| 653 | + if(StringUtil.isEmpty(workOrder.getOrderNo())){ | ||
| 654 | + throw exception(APP_WORK_ORADER_NO_NOT_EXISTS); | ||
| 655 | + } | ||
| 653 | saveDO.setOrderNo(workOrder.getOrderNo()); | 656 | saveDO.setOrderNo(workOrder.getOrderNo()); |
| 654 | String filePaths = String.join(",",imgList); | 657 | String filePaths = String.join(",",imgList); |
| 655 | saveDO.setFileNames(filePaths); | 658 | saveDO.setFileNames(filePaths); |