From b6c5d5515b5b4b8f3c079ed1a5513d04e4d6b9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Thu, 7 Nov 2024 18:03:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A3=80=E6=B5=8B=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AD=A5=E4=B8=8E=E6=9C=80=E5=90=8E=E4=B8=80=E6=AD=A5?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 11 ++++ .../service/IInspectionWorkNodeService.java | 2 + .../impl/AppInspectionPartnerServiceImpl.java | 5 +- .../impl/InspectionInfoServiceImpl.java | 1 - .../impl/InspectionWorkNodeServiceImpl.java | 58 +++++++++++++++---- 5 files changed, 65 insertions(+), 12 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java index c847a265..2da08cc9 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java @@ -154,4 +154,15 @@ public class InspectionInfoController extends BaseController { public CommonResult getWeorkNodesById(Integer inspectionId) { return success(inspectionInfoService.getWeorkNodesById(inspectionId)); } + + /** + * 判断是否需要上传图片 + * @param inspectionId + * @param workNodeId + * @return + */ + @GetMapping("orImages") + public CommonResult orImages(Integer inspectionId, String workNodeId){ + return success(inspectionWorkNodeService.orImages(inspectionId,workNodeId)); + } } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java index 6d7e2682..225e7148 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java @@ -33,4 +33,6 @@ public interface IInspectionWorkNodeService extends IService * @return */ List getWeorkNodesById(Integer inspectionId); + + boolean orImages(Integer inspectionId, String workNodeId); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 4d370b62..314ac9b3 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -117,6 +117,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl partnerList(Page page, PartnerListQuery partnerListQuery) { @@ -1479,6 +1481,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(InspectionStepInfo::getInspectionInfoId,inspectionInfoId).orderByAsc(InspectionStepInfo::getStepNum); + queryWrapper.orderBy(true, false, InspectionStepInfo::getId); List list = stepInfoService.list(queryWrapper); if (CollectionUtil.isNotEmpty(list)){ res.setStepInfos(list); @@ -1731,7 +1734,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl() .eq(DlInspectionProject::getId, workNode.getProjectId())); - String stepTitle = project.getProjectName() + "项目检测完成"; - inspectionStepInfo.setTitle(stepTitle); - inspectionStepInfo.setContent(stepTitle); + String stepTitle = ""; + if(ObjectUtil.isNotNull(project)) { + inspectionStepInfo.setTitle(project.getProjectName() + "项目检测完成"); + }else { + inspectionStepInfo.setTitle("项目检测完成"); + } + if (ObjectUtil.isNotEmpty(inspectionWorkNode.getRemark())) { + inspectionStepInfo.setContent(inspectionWorkNode.getRemark()); + } + if (ObjectUtil.isNotEmpty(inspectionWorkNode.getDealImages())) { + inspectionStepInfo.setImages(inspectionWorkNode.getDealImages()); + } inspectionStepInfo.setCreateTime(DateUtil.date()); inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId()))); inspectionStepService.save(inspectionStepInfo); @@ -162,7 +175,6 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl workNodes = getWeorkNodesById(inspectionId); + if (!hasNextNode(workNodes, workNode)) { + return true; + } + return false; + } + /** * 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目 * @@ -211,9 +238,10 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl