更新检测相关功能
This commit is contained in:
parent
aeb9e032e2
commit
a2fbf98de6
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检测流程表 Mapper 接口
|
||||
@ -15,4 +17,10 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface InspectionWorkNodeMapper extends BaseMapper<InspectionWorkNode> {
|
||||
|
||||
/**
|
||||
* 根据检测id获取检测流程
|
||||
* @param inspectionId
|
||||
* @return
|
||||
*/
|
||||
List<InspectionWorkNode> getWeorkNodesById(Integer inspectionId);
|
||||
}
|
||||
|
@ -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<InspectionInfo>
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, Integer workNodeId);
|
||||
DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, String workNodeId);
|
||||
|
||||
/**
|
||||
* 根据工单id获取工单流程
|
||||
* @param inspectionId
|
||||
* @return
|
||||
*/
|
||||
List<InspectionWorkNode> getWeorkNodesById(Integer inspectionId);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检测流程表 服务类
|
||||
@ -25,4 +27,10 @@ public interface IInspectionWorkNodeService extends IService<InspectionWorkNode>
|
||||
*/
|
||||
void updateImageAndStep(InspectionWorkNode inspectionWorkNode);
|
||||
|
||||
/**
|
||||
* 根据检测id获取流程信息
|
||||
* @param inspectionId
|
||||
* @return
|
||||
*/
|
||||
List<InspectionWorkNode> getWeorkNodesById(Integer inspectionId);
|
||||
}
|
||||
|
@ -397,12 +397,11 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, Integer workNodeId) {
|
||||
public DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, String workNodeId) {
|
||||
//查询工单
|
||||
InspectionInfo inspectionInfo = this.getById(inspectionId);
|
||||
//根据工单id查询流程节点
|
||||
InspectionWorkNode inspectionWorkNode = workNodeService.getById(new LambdaQueryWrapper<InspectionWorkNode>()
|
||||
.eq(InspectionWorkNode::getInspectionInfoId, workNodeId));
|
||||
InspectionWorkNode inspectionWorkNode = workNodeService.getById(workNodeId);
|
||||
//根据工单id查询步骤
|
||||
List<InspectionStepInfo> inspectionStepInfos = inspectionStepInfoService.list(new LambdaQueryWrapper<InspectionStepInfo>()
|
||||
.eq(InspectionStepInfo::getInspectionInfoId, inspectionId));
|
||||
@ -413,4 +412,15 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
||||
dlInspectionWorkNodeVo.setSteps(inspectionStepInfos);
|
||||
return dlInspectionWorkNodeVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据工单id获取工单流程
|
||||
*
|
||||
* @param inspectionId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<InspectionWorkNode> getWeorkNodesById(Integer inspectionId) {
|
||||
return workNodeService.getWeorkNodesById(inspectionId);
|
||||
}
|
||||
}
|
||||
|
@ -155,6 +155,17 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
||||
inspectionInfoService.updateById(inspectionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据检测id获取流程信息
|
||||
*
|
||||
* @param inspectionId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<InspectionWorkNode> getWeorkNodesById(Integer inspectionId) {
|
||||
return baseMapper.getWeorkNodesById(inspectionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目
|
||||
*
|
||||
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.inspection.mapper.InspectionWorkNodeMapper">
|
||||
|
||||
<select id="getWeorkNodesById" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode"
|
||||
parameterType="java.lang.Integer">
|
||||
SELECT wn.*,ip.project_name AS projectName
|
||||
FROM inspection_work_node wn
|
||||
LEFT JOIN inspection_project ip ON ip.id = wn.project_id
|
||||
WHERE wn.inspection_info_id = #{inspectionId}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user