From 538067d7e0c9e8b10e7de614d4a7eaefcffdc989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 4 Nov 2024 18:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 4 +-- .../inspection/entity/InspectionInfo.java | 2 ++ .../service/IInspectionWorkNodeService.java | 2 +- .../impl/InspectionWorkNodeServiceImpl.java | 34 ++++++++++++++++--- .../inspection/InspectionInfoMapper.xml | 3 +- 5 files changed, 37 insertions(+), 8 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 9e5dc24f..27e18686 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 @@ -130,7 +130,7 @@ public class InspectionInfoController extends BaseController { * @return */ @PostMapping("orderTaking") - public CommonResult orderTaking(Integer inspectionId, Integer workNodeId) { + public CommonResult orderTaking(Integer inspectionId,String workNodeId) { inspectionWorkNodeService.updateInspectionWorkNode(inspectionId, workNodeId); return success("接单成功"); } @@ -140,7 +140,7 @@ public class InspectionInfoController extends BaseController { * @param inspectionWorkNode */ @PostMapping("controls") - public void controls(InspectionWorkNode inspectionWorkNode){ + public void controls(@RequestBody InspectionWorkNode inspectionWorkNode){ inspectionWorkNodeService.updateImageAndStep(inspectionWorkNode); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java index 1bc3ad12..cce9aa5d 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java @@ -155,4 +155,6 @@ public class InspectionInfo extends TenantBaseDO private String workNodeId; @TableField(exist = false) private Long dealUserId; + @TableField(exist = false) + private String workNodeStatus; } 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 b98c2071..6d7e2682 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 @@ -19,7 +19,7 @@ public interface IInspectionWorkNodeService extends IService * @param inspectionId * @param workNodeId */ - void updateInspectionWorkNode(Integer inspectionId, Integer workNodeId); + void updateInspectionWorkNode(Integer inspectionId, String workNodeId); /** * 更新流程图片 步骤信息 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java index 4aede4b5..145debf1 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java @@ -49,7 +49,8 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl() + .eq(DlInspectionProject::getId, workNode.getProjectId())); + + InspectionStepInfo inspectionStepInfo = new InspectionStepInfo(); + inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionInfo.getId()))); + inspectionStepInfo.setTitle(project.getProjectName() + "项目开始检测"); + inspectionStepInfo.setContent(project.getProjectName() + "项目开始检测"); + inspectionStepInfo.setCreateTime(DateUtil.date()); + inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(workerUser.getId()))); + inspectionStepService.save(inspectionStepInfo); } /** @@ -91,6 +105,8 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl() - .eq(DlInspectionProject::getId, inspectionWorkNode.getProjectId())); + .eq(DlInspectionProject::getId, workNode.getProjectId())); String stepTitle = project.getProjectName() + "项目检测完成"; inspectionStepInfo.setTitle(stepTitle); - inspectionStepInfo.setContent(inspectionWorkNode.getDealImages()); + inspectionStepInfo.setContent(stepTitle); + inspectionStepInfo.setCreateTime(DateUtil.date()); + inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId()))); inspectionStepService.save(inspectionStepInfo); if (!flag) { stepTitle = "检测结束"; @@ -137,10 +155,15 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl SELECT ii.*, - iwn.id AS workNodeId + iwn.id AS workNodeId, + iwn.status AS workNodeStatus FROM inspection_info ii JOIN