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