diff --git a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/aop/BuzStatusUpdateAspect.java b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/aop/BuzStatusUpdateAspect.java index 9591b1b..e23e210 100644 --- a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/aop/BuzStatusUpdateAspect.java +++ b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/aop/BuzStatusUpdateAspect.java @@ -26,8 +26,10 @@ import org.springframework.stereotype.Component; import java.time.LocalDateTime; import java.util.List; +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant.CONSERVE_LEVEL; import static com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant.ORDER_STATUS_INIT; +import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.APP_WORKER_LEVEL_ID_NOT_EXISTS; /** * 类描述:切面更新工单表业务状态 @@ -94,7 +96,10 @@ public class BuzStatusUpdateAspect { targeVO.setStreetId(roadStreetRespDTO.getStreetId()); targeVO.setStreetName(roadStreetRespDTO.getStreetName()); - DictDataRespDTO dictData = dictDataCommonApi.getDictData(CONSERVE_LEVEL, reqVO.getPressingType().toString()); + DictDataRespDTO dictData = dictDataCommonApi.getDictData(CONSERVE_LEVEL, roadStreetRespDTO.getLevelId().toString()); + if(null == dictData){ + throw exception(APP_WORKER_LEVEL_ID_NOT_EXISTS); + } targeVO.setCuringLevelId(Integer.valueOf(dictData.getValue())); targeVO.setCuringLevelName(dictData.getLabel()); targeVO.setCommitDate(LocalDateTime.now()); @@ -102,6 +107,7 @@ public class BuzStatusUpdateAspect { targeVO.setBusiLine(SecurityFrameworkUtils.getBusiLine()); targeVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); targeVO.setUserName(SecurityFrameworkUtils.getLoginUserNickname()); + targeVO.setFinishDate(reqVO.getFinishDate()); List problemsImgs = reqVO.getProblemsImgs(); if(ObjectUtils.isNotAllEmpty(problemsImgs) && problemsImgs.size()>0){ gardenService.attachmentInsertOrUpdate(problemsImgs,BpmCommonConstant.PROBLEM_IMG_GROUP,targeVO);