|
@@ -1,85 +1,121 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.project.check.mapper.TCheckCheckpointsMapper">
|
|
|
|
|
|
<resultMap type="TCheckCheckpoints" id="TCheckCheckpointsResult">
|
|
|
- <result property="checkId" column="check_id" />
|
|
|
- <result property="pointId" column="point_id" />
|
|
|
- <result property="inspectionId" column="inspection_id" />
|
|
|
- <result property="instrumentId" column="instrument_id" />
|
|
|
- <result property="testValue" column="test_value" />
|
|
|
- <result property="netTestValue" column="net_test_value" />
|
|
|
- <result property="plantId" column="plant_id" />
|
|
|
- <result property="plantName" column="plant_name" />
|
|
|
- <result property="regionId" column="region_id" />
|
|
|
- <result property="regionName" column="region_name" />
|
|
|
- <result property="layer" column="layer" />
|
|
|
- <result property="devId" column="dev_id" />
|
|
|
- <result property="devName" column="dev_name" />
|
|
|
- <result property="devCode" column="dev_code" />
|
|
|
- <result property="groupCode" column="group_code" />
|
|
|
- <result property="extendCode" column="extend_code" />
|
|
|
- <result property="pointType" column="point_type" />
|
|
|
- <result property="instrumentCode" column="instrument_code" />
|
|
|
- <result property="leakagePosition" column="leakage_position" />
|
|
|
- <result property="checker" column="checker" />
|
|
|
- <result property="checkDate" column="check_date" />
|
|
|
- <result property="leakageDegree" column="leakage_degree" />
|
|
|
- <result property="remarks" column="remarks" />
|
|
|
- <result property="approveStatus" column="approve_status" />
|
|
|
- <result property="approveTime" column="approve_time" />
|
|
|
- <result property="deptId" column="dept_id" />
|
|
|
- <result property="delFlag" column="del_flag" />
|
|
|
- <result property="createrCode" column="creater_code" />
|
|
|
- <result property="createdate" column="createdate" />
|
|
|
- <result property="updaterCode" column="updater_code" />
|
|
|
- <result property="updatedate" column="updatedate" />
|
|
|
- <result property="repairId" column="repair_id" />
|
|
|
+ <result property="checkId" column="check_id"/>
|
|
|
+ <result property="pointId" column="point_id"/>
|
|
|
+ <result property="inspectionId" column="inspection_id"/>
|
|
|
+ <result property="instrumentId" column="instrument_id"/>
|
|
|
+ <result property="testValue" column="test_value"/>
|
|
|
+ <result property="netTestValue" column="net_test_value"/>
|
|
|
+ <result property="plantId" column="plant_id"/>
|
|
|
+ <result property="plantName" column="plant_name"/>
|
|
|
+ <result property="regionId" column="region_id"/>
|
|
|
+ <result property="regionName" column="region_name"/>
|
|
|
+ <result property="layer" column="layer"/>
|
|
|
+ <result property="devId" column="dev_id"/>
|
|
|
+ <result property="devName" column="dev_name"/>
|
|
|
+ <result property="devCode" column="dev_code"/>
|
|
|
+ <result property="groupCode" column="group_code"/>
|
|
|
+ <result property="extendCode" column="extend_code"/>
|
|
|
+ <result property="pointType" column="point_type"/>
|
|
|
+ <result property="instrumentCode" column="instrument_code"/>
|
|
|
+ <result property="leakagePosition" column="leakage_position"/>
|
|
|
+ <result property="checker" column="checker"/>
|
|
|
+ <result property="checkDate" column="check_date"/>
|
|
|
+ <result property="leakageDegree" column="leakage_degree"/>
|
|
|
+ <result property="remarks" column="remarks"/>
|
|
|
+ <result property="approveStatus" column="approve_status"/>
|
|
|
+ <result property="approveTime" column="approve_time"/>
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
+ <result property="createrCode" column="creater_code"/>
|
|
|
+ <result property="createdate" column="createdate"/>
|
|
|
+ <result property="updaterCode" column="updater_code"/>
|
|
|
+ <result property="updatedate" column="updatedate"/>
|
|
|
+ <result property="repairId" column="repair_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTCheckCheckpointsVo">
|
|
|
- select check_id, point_id, instrument_id, inspection_id, test_value, net_test_value, plant_id,plant_name, region_id,region_name, layer, dev_id,dev_name, dev_code, group_code, extend_code, point_type, instrument_code, leakage_position, checker, check_date, leakage_degree, remarks, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_check_checkpoints
|
|
|
+ select check_id,
|
|
|
+ point_id,
|
|
|
+ instrument_id,
|
|
|
+ inspection_id,
|
|
|
+ test_value,
|
|
|
+ net_test_value,
|
|
|
+ plant_id,
|
|
|
+ plant_name,
|
|
|
+ region_id,
|
|
|
+ region_name,
|
|
|
+ layer,
|
|
|
+ dev_id,
|
|
|
+ dev_name,
|
|
|
+ dev_code,
|
|
|
+ group_code,
|
|
|
+ extend_code,
|
|
|
+ point_type,
|
|
|
+ instrument_code,
|
|
|
+ leakage_position,
|
|
|
+ checker,
|
|
|
+ check_date,
|
|
|
+ leakage_degree,
|
|
|
+ remarks,
|
|
|
+ approve_status,
|
|
|
+ approve_time,
|
|
|
+ dept_id,
|
|
|
+ del_flag,
|
|
|
+ creater_code,
|
|
|
+ createdate,
|
|
|
+ updater_code,
|
|
|
+ updatedate
|
|
|
+ from t_check_checkpoints
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTCheckCheckpointsList" parameterType="TCheckCheckpoints" resultMap="TCheckCheckpointsResult">
|
|
|
- select d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value, d.net_test_value, d.plant_id,d.plant_name,
|
|
|
+ select d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value,
|
|
|
+ d.net_test_value, d.plant_id,d.plant_name,
|
|
|
d.region_id, d.layer, d.dev_id, d.group_code, d.extend_code, d.point_type, d.instrument_code,
|
|
|
- leakage_position, d.checker, d.check_date, d.leakage_degree, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag,
|
|
|
- d.creater_code, d.createdate, d.updater_code, d.updatedate,br.region_name,bd.dev_code,bd.dev_describe as dev_name from t_check_checkpoints d
|
|
|
+ leakage_position, d.checker, d.check_date, d.leakage_degree, d.remarks, d.approve_status, d.approve_time,
|
|
|
+ d.dept_id, d.del_flag,
|
|
|
+ d.creater_code, d.createdate, d.updater_code, d.updatedate,br.region_name,bd.dev_code,bd.dev_describe as
|
|
|
+ dev_name from t_check_checkpoints d
|
|
|
left join t_base_region br on d.region_id = br.region_id
|
|
|
left join t_base_device bd on d.dev_id = bd.dev_id
|
|
|
<where>
|
|
|
- <if test="pointId != null "> and d.point_id = #{pointId}</if>
|
|
|
- <if test="instrumentId != null "> and d.instrument_id = #{instrumentId}</if>
|
|
|
- <if test="inspectionId != null "> and d.inspection_id = #{inspectionId}</if>
|
|
|
- <if test="testValue != null and testValue != ''"> and d.test_value = #{testValue}</if>
|
|
|
- <if test="netTestValue != null and netTestValue != ''"> and d.net_test_value = #{netTestValue}</if>
|
|
|
- <if test="plantId != null and plantId != ''"> and d.plant_id = #{plantId}</if>
|
|
|
- <if test="plantName != null and plantName != ''"> and d.plant_name like concat('%', #{plantName}, '%')</if>
|
|
|
- <if test="regionId != null and regionId != ''"> and d.region_id= #{regionId}</if>
|
|
|
- <if test="regionName != null and regionName != ''"> and d.region_name like concat('%', #{regionName}, '%')</if>
|
|
|
- <if test="layer != null and layer != ''"> and d.layer = #{layer}</if>
|
|
|
- <if test="devId != null and devId != ''"> and d.dev_id = #{devId}</if>
|
|
|
- <if test="devName != null and devName != ''"> and d.dev_name like concat('%', #{devName}, '%')</if>
|
|
|
- <if test="devCode != null and devCode != ''"> and d.dev_code = #{devCode}</if>
|
|
|
- <if test="groupCode != null and groupCode != ''"> and d.group_code = #{groupCode}</if>
|
|
|
- <if test="extendCode != null and extendCode != ''"> and d.extend_code = #{extendCode}</if>
|
|
|
- <if test="pointType != null and pointType != ''"> and d.point_type = #{pointType}</if>
|
|
|
- <if test="instrumentCode != null and instrumentCode != ''"> and d.instrument_code = #{instrumentCode}</if>
|
|
|
- <if test="leakagePosition != null and leakagePosition != ''"> and d.leakage_position = #{leakagePosition}</if>
|
|
|
- <if test="checker != null and checker != ''"> and d.checker = #{checker}</if>
|
|
|
- <if test="checkDate != null "> and d.check_date = #{checkDate}</if>
|
|
|
- <if test="leakageDegree != null and leakageDegree != ''"> and d.leakage_degree = #{leakageDegree}</if>
|
|
|
- <if test="remarks != null and remarks != ''"> and d.remarks = #{remarks}</if>
|
|
|
- <if test="approveStatus != null "> and d.approve_status = #{approveStatus}</if>
|
|
|
- <if test="approveTime != null "> and d.approve_time = #{approveTime}</if>
|
|
|
- <if test="deptId != null "> and d.dept_id = #{deptId}</if>
|
|
|
- <if test="choose != null "> and d.inspection_id is null</if>
|
|
|
- <if test="repairId == null "> and d.repair_id is null</if>
|
|
|
- <if test="repairId != null "> and d.repair_id is not null</if>
|
|
|
- and d.del_flag = 0
|
|
|
+ <if test="pointId != null ">and d.point_id = #{pointId}</if>
|
|
|
+ <if test="instrumentId != null ">and d.instrument_id = #{instrumentId}</if>
|
|
|
+ <if test="inspectionId != null ">and d.inspection_id = #{inspectionId}</if>
|
|
|
+ <if test="testValue != null and testValue != ''">and d.test_value = #{testValue}</if>
|
|
|
+ <if test="netTestValue != null and netTestValue != ''">and d.net_test_value = #{netTestValue}</if>
|
|
|
+ <if test="plantId != null and plantId != ''">and d.plant_id = #{plantId}</if>
|
|
|
+ <if test="plantName != null and plantName != ''">and d.plant_name like concat('%', #{plantName}, '%')</if>
|
|
|
+ <if test="regionId != null and regionId != ''">and d.region_id= #{regionId}</if>
|
|
|
+ <if test="regionName != null and regionName != ''">and d.region_name like concat('%', #{regionName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="layer != null and layer != ''">and d.layer = #{layer}</if>
|
|
|
+ <if test="devId != null and devId != ''">and d.dev_id = #{devId}</if>
|
|
|
+ <if test="devName != null and devName != ''">and d.dev_name like concat('%', #{devName}, '%')</if>
|
|
|
+ <if test="devCode != null and devCode != ''">and d.dev_code = #{devCode}</if>
|
|
|
+ <if test="groupCode != null and groupCode != ''">and d.group_code = #{groupCode}</if>
|
|
|
+ <if test="extendCode != null and extendCode != ''">and d.extend_code = #{extendCode}</if>
|
|
|
+ <if test="pointType != null and pointType != ''">and d.point_type = #{pointType}</if>
|
|
|
+ <if test="instrumentCode != null and instrumentCode != ''">and d.instrument_code = #{instrumentCode}</if>
|
|
|
+ <if test="leakagePosition != null and leakagePosition != ''">and d.leakage_position = #{leakagePosition}
|
|
|
+ </if>
|
|
|
+ <if test="checker != null and checker != ''">and d.checker = #{checker}</if>
|
|
|
+ <if test="checkDate != null ">and d.check_date = #{checkDate}</if>
|
|
|
+ <if test="leakageDegree != null and leakageDegree != ''">and d.leakage_degree = #{leakageDegree}</if>
|
|
|
+ <if test="remarks != null and remarks != ''">and d.remarks = #{remarks}</if>
|
|
|
+ <if test="approveStatus != null ">and d.approve_status = #{approveStatus}</if>
|
|
|
+ <if test="approveTime != null ">and d.approve_time = #{approveTime}</if>
|
|
|
+ <if test="deptId != null ">and d.dept_id = #{deptId}</if>
|
|
|
+ <if test="choose != null ">and d.inspection_id is null</if>
|
|
|
+ <if test="repairId == null and repairId !=1">and d.repair_id is null</if>
|
|
|
+ <if test="repairId != null and repairId !=1">and d.repair_id is not null</if>
|
|
|
+ and d.del_flag = 0
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -87,81 +123,90 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectTCheckCheckpointByEntity" parameterType="TCheckCheckpoints" resultMap="TCheckCheckpointsResult">
|
|
|
select d.* from t_check_checkpoints d
|
|
|
<where>
|
|
|
- <if test="pointId != null "> and d.point_id = #{pointId}</if>
|
|
|
- <if test="instrumentId != null "> and d.instrument_id = #{instrumentId}</if>
|
|
|
- <if test="inspectionId != null "> and d.inspection_id = #{inspectionId}</if>
|
|
|
- <if test="testValue != null and testValue != ''"> and d.test_value = #{testValue}</if>
|
|
|
- <if test="netTestValue != null and netTestValue != ''"> and d.net_test_value = #{netTestValue}</if>
|
|
|
- <if test="plantId != null and plantId != ''"> and d.plant_id = #{plantId}</if>
|
|
|
- <if test="plantName != null and plantName != ''"> and d.plant_name like concat('%', #{plantName}, '%')</if>
|
|
|
- <if test="regionId != null and regionId != ''"> and d.region_id= #{regionId}</if>
|
|
|
- <if test="regionName != null and regionName != ''"> and d.region_name like concat('%', #{regionName}, '%')</if>
|
|
|
- <if test="layer != null and layer != ''"> and d.layer = #{layer}</if>
|
|
|
- <if test="devId != null and devId != ''"> and d.dev_id = #{devId}</if>
|
|
|
- <if test="devName != null and devName != ''"> and d.dev_name like concat('%', #{devName}, '%')</if>
|
|
|
- <if test="devCode != null and devCode != ''"> and d.dev_code = #{devCode}</if>
|
|
|
- <if test="groupCode != null and groupCode != ''"> and d.group_code = #{groupCode}</if>
|
|
|
- <if test="extendCode != null and extendCode != ''"> and d.extend_code = #{extendCode}</if>
|
|
|
- <if test="pointType != null and pointType != ''"> and d.point_type = #{pointType}</if>
|
|
|
- <if test="instrumentCode != null and instrumentCode != ''"> and d.instrument_code = #{instrumentCode}</if>
|
|
|
- <if test="leakagePosition != null and leakagePosition != ''"> and d.leakage_position = #{leakagePosition}</if>
|
|
|
- <if test="checker != null and checker != ''"> and d.checker = #{checker}</if>
|
|
|
- <if test="checkDate != null "> and d.check_date = #{checkDate}</if>
|
|
|
- <if test="leakageDegree != null and leakageDegree != ''"> and d.leakage_degree = #{leakageDegree}</if>
|
|
|
- <if test="remarks != null and remarks != ''"> and d.remarks = #{remarks}</if>
|
|
|
- <if test="approveStatus != null "> and d.approve_status = #{approveStatus}</if>
|
|
|
- <if test="approveTime != null "> and d.approve_time = #{approveTime}</if>
|
|
|
- <if test="deptId != null "> and d.dept_id = #{deptId}</if>
|
|
|
- <if test="choose != null "> and d.inspection_id is null</if>
|
|
|
- and d.del_flag = 0
|
|
|
+ <if test="pointId != null ">and d.point_id = #{pointId}</if>
|
|
|
+ <if test="instrumentId != null ">and d.instrument_id = #{instrumentId}</if>
|
|
|
+ <if test="inspectionId != null ">and d.inspection_id = #{inspectionId}</if>
|
|
|
+ <if test="testValue != null and testValue != ''">and d.test_value = #{testValue}</if>
|
|
|
+ <if test="netTestValue != null and netTestValue != ''">and d.net_test_value = #{netTestValue}</if>
|
|
|
+ <if test="plantId != null and plantId != ''">and d.plant_id = #{plantId}</if>
|
|
|
+ <if test="plantName != null and plantName != ''">and d.plant_name like concat('%', #{plantName}, '%')</if>
|
|
|
+ <if test="regionId != null and regionId != ''">and d.region_id= #{regionId}</if>
|
|
|
+ <if test="regionName != null and regionName != ''">and d.region_name like concat('%', #{regionName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="layer != null and layer != ''">and d.layer = #{layer}</if>
|
|
|
+ <if test="devId != null and devId != ''">and d.dev_id = #{devId}</if>
|
|
|
+ <if test="devName != null and devName != ''">and d.dev_name like concat('%', #{devName}, '%')</if>
|
|
|
+ <if test="devCode != null and devCode != ''">and d.dev_code = #{devCode}</if>
|
|
|
+ <if test="groupCode != null and groupCode != ''">and d.group_code = #{groupCode}</if>
|
|
|
+ <if test="extendCode != null and extendCode != ''">and d.extend_code = #{extendCode}</if>
|
|
|
+ <if test="pointType != null and pointType != ''">and d.point_type = #{pointType}</if>
|
|
|
+ <if test="instrumentCode != null and instrumentCode != ''">and d.instrument_code = #{instrumentCode}</if>
|
|
|
+ <if test="leakagePosition != null and leakagePosition != ''">and d.leakage_position = #{leakagePosition}
|
|
|
+ </if>
|
|
|
+ <if test="checker != null and checker != ''">and d.checker = #{checker}</if>
|
|
|
+ <if test="checkDate != null ">and d.check_date = #{checkDate}</if>
|
|
|
+ <if test="leakageDegree != null and leakageDegree != ''">and d.leakage_degree = #{leakageDegree}</if>
|
|
|
+ <if test="remarks != null and remarks != ''">and d.remarks = #{remarks}</if>
|
|
|
+ <if test="approveStatus != null ">and d.approve_status = #{approveStatus}</if>
|
|
|
+ <if test="approveTime != null ">and d.approve_time = #{approveTime}</if>
|
|
|
+ <if test="deptId != null ">and d.dept_id = #{deptId}</if>
|
|
|
+ <if test="choose != null ">and d.inspection_id is null</if>
|
|
|
+ and d.del_flag = 0
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectPointsByIds" parameterType="String" resultMap="TCheckCheckpointsResult">
|
|
|
- select d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value, d.net_test_value, d.plant_id,d.plant_name,
|
|
|
+ select d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value,
|
|
|
+ d.net_test_value, d.plant_id,d.plant_name,
|
|
|
d.region_id, d.layer, d.dev_id, d.group_code, d.extend_code, d.point_type, d.instrument_code,
|
|
|
- leakage_position, d.checker, d.check_date, d.leakage_degree, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag,
|
|
|
- d.creater_code, d.createdate, d.updater_code, d.updatedate,br.region_name,bd.dev_code,bd.dev_describe as dev_name from t_check_checkpoints d
|
|
|
+ leakage_position, d.checker, d.check_date, d.leakage_degree, d.remarks, d.approve_status, d.approve_time,
|
|
|
+ d.dept_id, d.del_flag,
|
|
|
+ d.creater_code, d.createdate, d.updater_code, d.updatedate,br.region_name,bd.dev_code,bd.dev_describe as
|
|
|
+ dev_name from t_check_checkpoints d
|
|
|
left join t_base_region br on d.region_id = br.region_id
|
|
|
left join t_base_device bd on d.dev_id = bd.dev_id where d.check_id in
|
|
|
<foreach item="checkId" collection="array" open="(" separator="," close=")">
|
|
|
#{checkId}
|
|
|
</foreach>
|
|
|
+ and d.approve_status=2
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectPointsByPlantNameGroupCodeAndExtendCode" parameterType="TCheckCheckpoints" resultMap="TCheckCheckpointsResult">
|
|
|
+ <select id="selectPointsByPlantNameGroupCodeAndExtendCode" parameterType="TCheckCheckpoints"
|
|
|
+ resultMap="TCheckCheckpointsResult">
|
|
|
select *from t_check_checkpoints d
|
|
|
<where>
|
|
|
- <if test="instrumentId != null "> and d.instrument_id = #{instrumentId}</if>
|
|
|
- <if test="inspectionId != null "> and d.inspection_id = #{inspectionId}</if>
|
|
|
- <if test="testValue != null and testValue != ''"> and d.test_value = #{testValue}</if>
|
|
|
- <if test="netTestValue != null and netTestValue != ''"> and d.net_test_value = #{netTestValue}</if>
|
|
|
- <if test="plantId != null and plantId != ''"> and d.plant_id = #{plantId}</if>
|
|
|
- <if test="plantName != null and plantName != ''"> and d.plant_name like concat('%', #{plantName}, '%')</if>
|
|
|
- <if test="regionId != null and regionId != ''"> and d.region_id= #{regionId}</if>
|
|
|
- <if test="regionName != null and regionName != ''"> and d.region_name like concat('%', #{regionName}, '%')</if>
|
|
|
- <if test="layer != null and layer != ''"> and d.layer = #{layer}</if>
|
|
|
- <if test="devId != null and devId != ''"> and d.dev_id = #{devId}</if>
|
|
|
- <if test="devName != null and devName != ''"> and d.dev_name like concat('%', #{devName}, '%')</if>
|
|
|
- <if test="devCode != null and devCode != ''"> and d.dev_code = #{devCode}</if>
|
|
|
- <if test="groupCode != null and groupCode != ''"> and d.group_code = #{groupCode}</if>
|
|
|
- <if test="extendCode != null and extendCode != ''"> and d.extend_code = #{extendCode}</if>
|
|
|
- <if test="pointType != null and pointType != ''"> and d.point_type = #{pointType}</if>
|
|
|
- <if test="instrumentCode != null and instrumentCode != ''"> and d.instrument_code = #{instrumentCode}</if>
|
|
|
- <if test="leakagePosition != null and leakagePosition != ''"> and d.leakage_position = #{leakagePosition}</if>
|
|
|
- <if test="checker != null and checker != ''"> and d.checker = #{checker}</if>
|
|
|
- <if test="checkDate != null and checkDate != ''"> and d.check_date = #{checkDate}</if>
|
|
|
- <if test="leakageDegree != null and leakageDegree != ''"> and d.leakage_degree = #{leakageDegree}</if>
|
|
|
- <if test="remarks != null and remarks != ''"> and d.remarks = #{remarks}</if>
|
|
|
- <if test="approveStatus != null "> and d.approve_status = #{approveStatus}</if>
|
|
|
- <if test="approveTime != null "> and d.approve_time = #{approveTime}</if>
|
|
|
- <if test="deptId != null "> and d.dept_id = #{deptId}</if>
|
|
|
- <if test="createrCode != null "> and d.creater_code = #{createrCode}</if>
|
|
|
- <if test="createdate != null "> and d.createdate = #{createdate}</if>
|
|
|
- <if test="updaterCode != null "> and d.updater_code = #{updaterCode}</if>
|
|
|
- <if test="updatedate != null "> and d.updatedate = #{updatedate}</if>
|
|
|
- <if test="choose != null "> and d.inspection_id is null</if>
|
|
|
- and d.del_flag = 0
|
|
|
+ <if test="instrumentId != null ">and d.instrument_id = #{instrumentId}</if>
|
|
|
+ <if test="inspectionId != null ">and d.inspection_id = #{inspectionId}</if>
|
|
|
+ <if test="testValue != null and testValue != ''">and d.test_value = #{testValue}</if>
|
|
|
+ <if test="netTestValue != null and netTestValue != ''">and d.net_test_value = #{netTestValue}</if>
|
|
|
+ <if test="plantId != null and plantId != ''">and d.plant_id = #{plantId}</if>
|
|
|
+ <if test="plantName != null and plantName != ''">and d.plant_name like concat('%', #{plantName}, '%')</if>
|
|
|
+ <if test="regionId != null and regionId != ''">and d.region_id= #{regionId}</if>
|
|
|
+ <if test="regionName != null and regionName != ''">and d.region_name like concat('%', #{regionName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="layer != null and layer != ''">and d.layer = #{layer}</if>
|
|
|
+ <if test="devId != null and devId != ''">and d.dev_id = #{devId}</if>
|
|
|
+ <if test="devName != null and devName != ''">and d.dev_name like concat('%', #{devName}, '%')</if>
|
|
|
+ <if test="devCode != null and devCode != ''">and d.dev_code = #{devCode}</if>
|
|
|
+ <if test="groupCode != null and groupCode != ''">and d.group_code = #{groupCode}</if>
|
|
|
+ <if test="extendCode != null and extendCode != ''">and d.extend_code = #{extendCode}</if>
|
|
|
+ <if test="pointType != null and pointType != ''">and d.point_type = #{pointType}</if>
|
|
|
+ <if test="instrumentCode != null and instrumentCode != ''">and d.instrument_code = #{instrumentCode}</if>
|
|
|
+ <if test="leakagePosition != null and leakagePosition != ''">and d.leakage_position = #{leakagePosition}
|
|
|
+ </if>
|
|
|
+ <if test="checker != null and checker != ''">and d.checker = #{checker}</if>
|
|
|
+ <if test="checkDate != null and checkDate != ''">and d.check_date = #{checkDate}</if>
|
|
|
+ <if test="leakageDegree != null and leakageDegree != ''">and d.leakage_degree = #{leakageDegree}</if>
|
|
|
+ <if test="remarks != null and remarks != ''">and d.remarks = #{remarks}</if>
|
|
|
+ <if test="approveStatus != null ">and d.approve_status = #{approveStatus}</if>
|
|
|
+ <if test="approveTime != null ">and d.approve_time = #{approveTime}</if>
|
|
|
+ <if test="deptId != null ">and d.dept_id = #{deptId}</if>
|
|
|
+ <if test="createrCode != null ">and d.creater_code = #{createrCode}</if>
|
|
|
+ <if test="createdate != null ">and d.createdate = #{createdate}</if>
|
|
|
+ <if test="updaterCode != null ">and d.updater_code = #{updaterCode}</if>
|
|
|
+ <if test="updatedate != null ">and d.updatedate = #{updatedate}</if>
|
|
|
+ <if test="choose != null ">and d.inspection_id is null</if>
|
|
|
+ and d.del_flag = 0
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -170,7 +215,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where check_id = #{checkId}
|
|
|
</select>
|
|
|
|
|
|
- <insert id="insertTCheckCheckpoints" parameterType="TCheckCheckpoints" useGeneratedKeys="true" keyProperty="checkId">
|
|
|
+ <insert id="insertTCheckCheckpoints" parameterType="TCheckCheckpoints" useGeneratedKeys="true"
|
|
|
+ keyProperty="checkId">
|
|
|
insert into t_check_checkpoints
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="pointId != null">point_id,</if>
|
|
@@ -204,7 +250,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updaterCode != null">updater_code,</if>
|
|
|
<if test="updatedate != null">updatedate,</if>
|
|
|
<if test="plantType != null">plant_type,</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="pointId != null">#{pointId},</if>
|
|
|
<if test="instrumentId != null">#{instrumentId},</if>
|
|
@@ -237,10 +283,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updaterCode != null">#{updaterCode},</if>
|
|
|
<if test="updatedate != null">#{updatedate},</if>
|
|
|
<if test="plantType != null">#{plantType},</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
- <insert id="insertTCheckCheckpointsByList" parameterType="TCheckCheckpoints" useGeneratedKeys="true" keyProperty="checkId">
|
|
|
+ <insert id="insertTCheckCheckpointsByList" parameterType="TCheckCheckpoints" useGeneratedKeys="true"
|
|
|
+ keyProperty="checkId">
|
|
|
insert into t_check_checkpoints
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
point_id,
|
|
@@ -334,7 +381,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updatedate != null">updatedate = #{updatedate},</if>
|
|
|
<if test="approveStatus != null">approve_status = #{approveStatus},</if>
|
|
|
</trim>
|
|
|
- where plant_name=#{plantName} and group_code=#{groupCode} and extend_code=#{extendCode} and inspection_id=#{inspectionId} and (approve_status is null or approve_status=0)
|
|
|
+ where plant_name=#{plantName} and group_code=#{groupCode} and extend_code=#{extendCode} and
|
|
|
+ inspection_id=#{inspectionId} and (approve_status is null or approve_status=0)
|
|
|
</update>
|
|
|
|
|
|
<update id="updateApproveStatusByIds" parameterType="TCheckCheckpoints">
|
|
@@ -358,9 +406,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
|
|
|
-
|
|
|
<delete id="deleteTCheckCheckpointsByCheckId" parameterType="Long">
|
|
|
- update t_check_checkpoints set del_flag=1 where check_id = #{checkId}
|
|
|
+ update t_check_checkpoints
|
|
|
+ set del_flag=1
|
|
|
+ where check_id = #{checkId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteTCheckCheckpointsByCheckIds" parameterType="String">
|
|
@@ -390,7 +439,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="plantId != null and plantId != ''">and d.plant_id = #{plantId}</if>
|
|
|
<if test="regionId != null and regionId != ''">and d.region_id= #{regionId}</if>
|
|
|
<if test="devId != null and devId != ''">and d.dev_id = #{devId}</if>
|
|
|
- and d.inspection_id is null
|
|
|
+ and d.inspection_id is null
|
|
|
+ <if test="repairId == null">and repair_id is null</if>
|
|
|
+ <if test="repairId != null">and repair_id is not null</if>
|
|
|
</where>
|
|
|
) t)
|
|
|
</if>
|