Commit 4018829fb12cf4df8775a692b720619a670de92d
1 parent
d586265e
工单来源修改,重新发起时业务线不一致时删除旧的附件
Showing
7 changed files
with
81 additions
and
4 deletions
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/aop/InspectorBuzStatusUpdateAspect.java
| @@ -117,6 +117,14 @@ public class InspectorBuzStatusUpdateAspect { | @@ -117,6 +117,14 @@ public class InspectorBuzStatusUpdateAspect { | ||
| 117 | targeVO.setRoadId(reqVO.getRoadId()); | 117 | targeVO.setRoadId(reqVO.getRoadId()); |
| 118 | targeVO.setPressingType(reqVO.getPressingType()); | 118 | targeVO.setPressingType(reqVO.getPressingType()); |
| 119 | targeVO.setExpectedFinishDate(reqVO.getExpectedFinishDate()); | 119 | targeVO.setExpectedFinishDate(reqVO.getExpectedFinishDate()); |
| 120 | + if(!dbData.getBusiLine().equals(reqVO.getBusiLine())){//如果前端业务线和数据库不一致 | ||
| 121 | + //删除原来的 | ||
| 122 | + gardenService.deleteAttachement(BpmCommonConstant.PROBLEM_IMG_GROUP,targeVO.getOrderNo(),dbData.getBusiLine()); | ||
| 123 | + } | ||
| 124 | + List<String> problemsImgs = reqVO.getProblemsImgs(); | ||
| 125 | + if(ObjectUtils.isNotAllEmpty(problemsImgs) && problemsImgs.size()>0){ | ||
| 126 | + gardenService.attachmentInsertOrUpdate(problemsImgs,BpmCommonConstant.PROBLEM_IMG_GROUP,targeVO); | ||
| 127 | + } | ||
| 120 | } | 128 | } |
| 121 | 129 | ||
| 122 | //大区经理退回 | 130 | //大区经理退回 |
| @@ -152,7 +160,7 @@ public class InspectorBuzStatusUpdateAspect { | @@ -152,7 +160,7 @@ public class InspectorBuzStatusUpdateAspect { | ||
| 152 | targeVO.setWoSourceName(roleList.get(0).getName()); | 160 | targeVO.setWoSourceName(roleList.get(0).getName()); |
| 153 | String busiLine = reqVO.getBusiLine(); | 161 | String busiLine = reqVO.getBusiLine(); |
| 154 | if(StringUtil.isEmpty(busiLine)){ | 162 | if(StringUtil.isEmpty(busiLine)){ |
| 155 | - busiLine = SecurityFrameworkUtils.getBusiLine(); | 163 | + busiLine = dbData.getBusiLine(); |
| 156 | } | 164 | } |
| 157 | targeVO.setBusiLine(busiLine); | 165 | targeVO.setBusiLine(busiLine); |
| 158 | targeVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); | 166 | targeVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmAIServiceImpl.java
| @@ -147,8 +147,17 @@ public class BpmAIServiceImpl implements BpmAIService{ | @@ -147,8 +147,17 @@ public class BpmAIServiceImpl implements BpmAIService{ | ||
| 147 | workOrder.setCompanyId(SecurityFrameworkUtils.getCompanyId()); | 147 | workOrder.setCompanyId(SecurityFrameworkUtils.getCompanyId()); |
| 148 | 148 | ||
| 149 | workOrder.setDeptId(SecurityFrameworkUtils.getDeptId()); | 149 | workOrder.setDeptId(SecurityFrameworkUtils.getDeptId()); |
| 150 | - workOrder.setSourceId(EventSourceEnum.AI.getCode()); | ||
| 151 | - workOrder.setSourceName(EventSourceEnum.AI.getDesc()); | 150 | + |
| 151 | + Integer sourceId = createRequestVo.getSourceId(); | ||
| 152 | + String sourceName = createRequestVo.getSourceName(); | ||
| 153 | + if(!ObjectUtils.isNotAllEmpty(sourceId)){ | ||
| 154 | + sourceId = EventSourceEnum.AI.getCode(); | ||
| 155 | + } | ||
| 156 | + if(StringUtil.isEmpty(sourceName)){ | ||
| 157 | + sourceName = EventSourceEnum.AI.getDesc(); | ||
| 158 | + } | ||
| 159 | + workOrder.setSourceId(sourceId); | ||
| 160 | + workOrder.setSourceName(sourceName); | ||
| 152 | String wsourceId = createRequestVo.getWoSourceId(); | 161 | String wsourceId = createRequestVo.getWoSourceId(); |
| 153 | String wsourceName = createRequestVo.getWoSourceName(); | 162 | String wsourceName = createRequestVo.getWoSourceName(); |
| 154 | if(StringUtil.isEmpty(wsourceId)){ | 163 | if(StringUtil.isEmpty(wsourceId)){ |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenService.java
| @@ -218,4 +218,11 @@ public interface BpmGardenService { | @@ -218,4 +218,11 @@ public interface BpmGardenService { | ||
| 218 | */ | 218 | */ |
| 219 | public void attachmentInsertOrUpdate(List<String> imgList, String type, MainInfoDO workOrder); | 219 | public void attachmentInsertOrUpdate(List<String> imgList, String type, MainInfoDO workOrder); |
| 220 | 220 | ||
| 221 | + /** | ||
| 222 | + * 删除附件表 | ||
| 223 | + * @param type | ||
| 224 | + * @param orderNo | ||
| 225 | + * @param busiLine | ||
| 226 | + */ | ||
| 227 | + public void deleteAttachement(String type,String orderNo,String busiLine); | ||
| 221 | } | 228 | } |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
| @@ -52,6 +52,7 @@ import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | @@ -52,6 +52,7 @@ import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | ||
| 52 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; | 52 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; |
| 53 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; | 53 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; |
| 54 | import com.zteits.urbanops.module.workorder.enums.BusiLineWorkerRoleCodeEnum; | 54 | import com.zteits.urbanops.module.workorder.enums.BusiLineWorkerRoleCodeEnum; |
| 55 | +import com.zteits.urbanops.module.workorder.enums.EventSourceEnum; | ||
| 55 | import com.zteits.urbanops.module.workorder.util.TaskNodeUtils; | 56 | import com.zteits.urbanops.module.workorder.util.TaskNodeUtils; |
| 56 | import jakarta.annotation.Resource; | 57 | import jakarta.annotation.Resource; |
| 57 | import jodd.util.StringUtil; | 58 | import jodd.util.StringUtil; |
| @@ -596,6 +597,16 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -596,6 +597,16 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 596 | if(null == roleList || roleList.size()==0){ | 597 | if(null == roleList || roleList.size()==0){ |
| 597 | throw exception(APP_USER_ROLE_NOT_EXISTS); | 598 | throw exception(APP_USER_ROLE_NOT_EXISTS); |
| 598 | } | 599 | } |
| 600 | + Integer sourceId = createRequestVo.getSourceId(); | ||
| 601 | + String sourceName = createRequestVo.getSourceName(); | ||
| 602 | + if(!ObjectUtils.isNotAllEmpty(sourceId)){ | ||
| 603 | + sourceId = EventSourceEnum.PATROL.getCode(); | ||
| 604 | + } | ||
| 605 | + if(StringUtil.isEmpty(sourceName)){ | ||
| 606 | + sourceName = EventSourceEnum.PATROL.getDesc(); | ||
| 607 | + } | ||
| 608 | + workOrder.setSourceId(sourceId); | ||
| 609 | + workOrder.setSourceName(sourceName); | ||
| 599 | workOrder.setWoSourceId(roleList.get(0).getCode()); | 610 | workOrder.setWoSourceId(roleList.get(0).getCode()); |
| 600 | workOrder.setWoSourceName(roleList.get(0).getName()); | 611 | workOrder.setWoSourceName(roleList.get(0).getName()); |
| 601 | String busiLine = createRequestVo.getBusiLine(); | 612 | String busiLine = createRequestVo.getBusiLine(); |
| @@ -678,6 +689,16 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -678,6 +689,16 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 678 | } | 689 | } |
| 679 | } | 690 | } |
| 680 | 691 | ||
| 692 | + public void deleteAttachement(String type,String orderNo,String busiLine){ | ||
| 693 | + LambdaQueryWrapper<AttachmentDO> deleteWrapper = new LambdaQueryWrapper<AttachmentDO>() | ||
| 694 | + .eq(AttachmentDO::getBusiType, type) | ||
| 695 | + .eq(AttachmentDO::getOrderNo, orderNo); | ||
| 696 | + if(StringUtil.isNotEmpty(busiLine)){// 全域巡查员 发起的工单 业务线有可能为空 | ||
| 697 | + deleteWrapper.eq(AttachmentDO::getBusiLine, busiLine); | ||
| 698 | + } | ||
| 699 | + attachmentMapper.delete(deleteWrapper); | ||
| 700 | + } | ||
| 701 | + | ||
| 681 | 702 | ||
| 682 | @Override | 703 | @Override |
| 683 | public void updateWorkOrderStatus(Long id, Integer status) { | 704 | public void updateWorkOrderStatus(Long id, Integer status) { |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmInspectorServiceImpl.java
| @@ -31,6 +31,7 @@ import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; | @@ -31,6 +31,7 @@ import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; | ||
| 31 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderInspectorReqVO; | 31 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderInspectorReqVO; |
| 32 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderUniversalReqVO; | 32 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderUniversalReqVO; |
| 33 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; | 33 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; |
| 34 | +import com.zteits.urbanops.module.workorder.enums.EventSourceEnum; | ||
| 34 | import com.zteits.urbanops.module.workorder.util.RoleListUtils; | 35 | import com.zteits.urbanops.module.workorder.util.RoleListUtils; |
| 35 | import jakarta.annotation.Resource; | 36 | import jakarta.annotation.Resource; |
| 36 | import jodd.util.StringUtil; | 37 | import jodd.util.StringUtil; |
| @@ -147,6 +148,16 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{ | @@ -147,6 +148,16 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{ | ||
| 147 | workOrder.setCompanyId(SecurityFrameworkUtils.getCompanyId()); | 148 | workOrder.setCompanyId(SecurityFrameworkUtils.getCompanyId()); |
| 148 | 149 | ||
| 149 | workOrder.setDeptId(SecurityFrameworkUtils.getDeptId()); | 150 | workOrder.setDeptId(SecurityFrameworkUtils.getDeptId()); |
| 151 | + Integer sourceId = createRequestVo.getSourceId(); | ||
| 152 | + String sourceName = createRequestVo.getSourceName(); | ||
| 153 | + if(!ObjectUtils.isNotAllEmpty(sourceId)){ | ||
| 154 | + sourceId = EventSourceEnum.PATROL.getCode(); | ||
| 155 | + } | ||
| 156 | + if(StringUtil.isEmpty(sourceName)){ | ||
| 157 | + sourceName = EventSourceEnum.PATROL.getDesc(); | ||
| 158 | + } | ||
| 159 | + workOrder.setSourceId(sourceId); | ||
| 160 | + workOrder.setSourceName(sourceName); | ||
| 150 | workOrder.setWoSourceId(roleList.get(0).getCode()); | 161 | workOrder.setWoSourceId(roleList.get(0).getCode()); |
| 151 | workOrder.setWoSourceName(roleList.get(0).getName()); | 162 | workOrder.setWoSourceName(roleList.get(0).getName()); |
| 152 | String busiLine = createRequestVo.getBusiLine(); | 163 | String busiLine = createRequestVo.getBusiLine(); |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmRegionMgrServiceImpl.java
| @@ -25,6 +25,7 @@ import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoExtMapper | @@ -25,6 +25,7 @@ import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoExtMapper | ||
| 25 | import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; | 25 | import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; |
| 26 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | 26 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; |
| 27 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; | 27 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; |
| 28 | +import com.zteits.urbanops.module.workorder.enums.EventSourceEnum; | ||
| 28 | import com.zteits.urbanops.module.workorder.util.RoleListUtils; | 29 | import com.zteits.urbanops.module.workorder.util.RoleListUtils; |
| 29 | import jakarta.annotation.Resource; | 30 | import jakarta.annotation.Resource; |
| 30 | import jodd.util.StringUtil; | 31 | import jodd.util.StringUtil; |
| @@ -137,6 +138,16 @@ public class BpmRegionMgrServiceImpl implements BpmRegionMgrService{ | @@ -137,6 +138,16 @@ public class BpmRegionMgrServiceImpl implements BpmRegionMgrService{ | ||
| 137 | if(!RoleListUtils.containsCode(roleList,REGIONAL_MANAGER)){ | 138 | if(!RoleListUtils.containsCode(roleList,REGIONAL_MANAGER)){ |
| 138 | throw exception(APP_REGIONMGR_USER_ROLE_ERROR); | 139 | throw exception(APP_REGIONMGR_USER_ROLE_ERROR); |
| 139 | } | 140 | } |
| 141 | + Integer sourceId = createRequestVo.getSourceId(); | ||
| 142 | + String sourceName = createRequestVo.getSourceName(); | ||
| 143 | + if(!ObjectUtils.isNotAllEmpty(sourceId)){ | ||
| 144 | + sourceId = EventSourceEnum.REGION.getCode(); | ||
| 145 | + } | ||
| 146 | + if(StringUtil.isEmpty(sourceName)){ | ||
| 147 | + sourceName = EventSourceEnum.REGION.getDesc(); | ||
| 148 | + } | ||
| 149 | + workOrder.setSourceId(sourceId); | ||
| 150 | + workOrder.setSourceName(sourceName); | ||
| 140 | workOrder.setWoSourceId(roleList.get(0).getCode()); | 151 | workOrder.setWoSourceId(roleList.get(0).getCode()); |
| 141 | workOrder.setWoSourceName(roleList.get(0).getName()); | 152 | workOrder.setWoSourceName(roleList.get(0).getName()); |
| 142 | String busiLine = createRequestVo.getBusiLine(); | 153 | String busiLine = createRequestVo.getBusiLine(); |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmUniversalServiceImpl.java
| @@ -31,6 +31,7 @@ import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; | @@ -31,6 +31,7 @@ import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; | ||
| 31 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | 31 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; |
| 32 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderUniversalReqVO; | 32 | import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderUniversalReqVO; |
| 33 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; | 33 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; |
| 34 | +import com.zteits.urbanops.module.workorder.enums.EventSourceEnum; | ||
| 34 | import com.zteits.urbanops.module.workorder.util.RoleListUtils; | 35 | import com.zteits.urbanops.module.workorder.util.RoleListUtils; |
| 35 | import jakarta.annotation.Resource; | 36 | import jakarta.annotation.Resource; |
| 36 | import jodd.util.StringUtil; | 37 | import jodd.util.StringUtil; |
| @@ -135,7 +136,16 @@ public class BpmUniversalServiceImpl implements BpmUniversalService{ | @@ -135,7 +136,16 @@ public class BpmUniversalServiceImpl implements BpmUniversalService{ | ||
| 135 | if(RoleListUtils.containsBothCodes(roleList, REGIONAL_MANAGER, PARTROL_GLOBAL)){ | 136 | if(RoleListUtils.containsBothCodes(roleList, REGIONAL_MANAGER, PARTROL_GLOBAL)){ |
| 136 | throw exception(APP_WORK_ORADER_ROLE_ILLEGLE); | 137 | throw exception(APP_WORK_ORADER_ROLE_ILLEGLE); |
| 137 | } | 138 | } |
| 138 | - | 139 | + Integer sourceId = createRequestVo.getSourceId(); |
| 140 | + String sourceName = createRequestVo.getSourceName(); | ||
| 141 | + if(!ObjectUtils.isNotAllEmpty(sourceId)){ | ||
| 142 | + sourceId = EventSourceEnum.PATROL.getCode(); | ||
| 143 | + } | ||
| 144 | + if(StringUtil.isEmpty(sourceName)){ | ||
| 145 | + sourceName = EventSourceEnum.PATROL.getDesc(); | ||
| 146 | + } | ||
| 147 | + workOrder.setSourceId(sourceId); | ||
| 148 | + workOrder.setSourceName(sourceName); | ||
| 139 | workOrder.setWoSourceId(roleList.get(0).getCode()); | 149 | workOrder.setWoSourceId(roleList.get(0).getCode()); |
| 140 | workOrder.setWoSourceName(roleList.get(0).getName()); | 150 | workOrder.setWoSourceName(roleList.get(0).getName()); |
| 141 | workOrder.setUserId(SecurityFrameworkUtils.getLoginUserId()); | 151 | workOrder.setUserId(SecurityFrameworkUtils.getLoginUserId()); |