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 @@ + + + + + +