From a2fbf98de6c49be213a616034ca50d29253460ac 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 15:07:18 +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 | 12 +++++++++++-
.../inspection/entity/InspectionWorkNode.java | 5 +++++
.../mapper/InspectionWorkNodeMapper.java | 8 ++++++++
.../service/IInspectionInfoService.java | 10 +++++++++-
.../service/IInspectionWorkNodeService.java | 8 ++++++++
.../service/impl/InspectionInfoServiceImpl.java | 16 +++++++++++++---
.../impl/InspectionWorkNodeServiceImpl.java | 11 +++++++++++
.../mapper/InspectionWorkNodeMapper.xml | 12 ++++++++++++
8 files changed, 77 insertions(+), 5 deletions(-)
create mode 100644 dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml
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 06349c58..9e5dc24f 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
@@ -118,7 +118,7 @@ public class InspectionInfoController extends BaseController {
* @return
*/
@GetMapping("getInspectionInfo")
- public CommonResult getInspectionInfo(Integer inspectionId, Integer workNodeId) {
+ public CommonResult getInspectionInfo(Integer inspectionId, String workNodeId) {
return success(inspectionInfoService.getWorkNode(inspectionId, workNodeId));
}
@@ -143,4 +143,14 @@ public class InspectionInfoController extends BaseController {
public void controls(InspectionWorkNode inspectionWorkNode){
inspectionWorkNodeService.updateImageAndStep(inspectionWorkNode);
}
+
+ /**
+ * 通过工单id获取工单流程
+ * @param inspectionId
+ * @return
+ */
+ @GetMapping("getWeorkNodesById")
+ public CommonResult getWeorkNodesById(Integer inspectionId) {
+ return success(inspectionInfoService.getWeorkNodesById(inspectionId));
+ }
}
diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java
index 7b81c558..6015811f 100644
--- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java
+++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java
@@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.inspection.entity;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
@@ -86,7 +87,11 @@ public class InspectionWorkNode extends TenantBaseDO {
/**
* 1-退办理 2-选择重审 3-项目完成
*/
+ @TableField(exist = false)
private Integer selectType;
+ @TableField(exist = false)
+ private String projectName;
+
}
diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java
index 088f2325..5be98f40 100644
--- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java
+++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java
@@ -4,6 +4,8 @@ import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
*
* 检测流程表 Mapper 接口
@@ -15,4 +17,10 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface InspectionWorkNodeMapper extends BaseMapper {
+ /**
+ * 根据检测id获取检测流程
+ * @param inspectionId
+ * @return
+ */
+ List getWeorkNodesById(Integer inspectionId);
}
diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java
index d2b323aa..ef2fb65e 100644
--- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java
+++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java
@@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.inspection.service;
+import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode;
import cn.iocoder.yudao.module.inspection.vo.DlInspectionWorkNodeVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -87,5 +88,12 @@ public interface IInspectionInfoService extends IService
* @param id
* @return
*/
- DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, Integer workNodeId);
+ DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, String workNodeId);
+
+ /**
+ * 根据工单id获取工单流程
+ * @param inspectionId
+ * @return
+ */
+ List getWeorkNodesById(Integer inspectionId);
}
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 009b09af..b98c2071 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
@@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.inspection.service;
import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode;
import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
/**
*
* 检测流程表 服务类
@@ -25,4 +27,10 @@ public interface IInspectionWorkNodeService extends IService
*/
void updateImageAndStep(InspectionWorkNode inspectionWorkNode);
+ /**
+ * 根据检测id获取流程信息
+ * @param inspectionId
+ * @return
+ */
+ List getWeorkNodesById(Integer inspectionId);
}
diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java
index 7459f02b..c60bfa32 100644
--- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java
+++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java
@@ -397,12 +397,11 @@ public class InspectionInfoServiceImpl extends ServiceImpl()
- .eq(InspectionWorkNode::getInspectionInfoId, workNodeId));
+ InspectionWorkNode inspectionWorkNode = workNodeService.getById(workNodeId);
//根据工单id查询步骤
List inspectionStepInfos = inspectionStepInfoService.list(new LambdaQueryWrapper()
.eq(InspectionStepInfo::getInspectionInfoId, inspectionId));
@@ -413,4 +412,15 @@ public class InspectionInfoServiceImpl extends ServiceImpl getWeorkNodesById(Integer inspectionId) {
+ return workNodeService.getWeorkNodesById(inspectionId);
+ }
}
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 7c5ab8c8..4aede4b5 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
@@ -155,6 +155,17 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl getWeorkNodesById(Integer inspectionId) {
+ return baseMapper.getWeorkNodesById(inspectionId);
+ }
+
/**
* 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目
*
diff --git a/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml
new file mode 100644
index 00000000..4bbd95d4
--- /dev/null
+++ b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+