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