|
@@ -1,90 +1,128 @@
|
|
|
<?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.TCheckRepairpointsMapper">
|
|
|
|
|
|
<resultMap type="TCheckRepairpoints" id="TCheckRepairpointsResult">
|
|
|
- <result property="checkId" column="check_id" />
|
|
|
- <result property="pointId" column="point_id" />
|
|
|
- <result property="repairId" column="repair_id" />
|
|
|
- <result property="netTestValue" column="net_test_value" />
|
|
|
- <result property="repairFunc" column="repair_func" />
|
|
|
- <result property="repairType" column="repair_type" />
|
|
|
- <result property="repairCount" column="repair_count" />
|
|
|
- <result property="plantName" column="plant_name" />
|
|
|
- <result property="regionName" column="region_name" />
|
|
|
- <result property="layer" column="layer" />
|
|
|
- <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="repairer" column="repairer" />
|
|
|
- <result property="repairDate" column="repair_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="plantId" column="plant_id" />
|
|
|
- <result property="regionId" column="region_id" />
|
|
|
- <result property="devId" column="dev_id" />
|
|
|
- <result property="instrumentId" column="instrument_id" />
|
|
|
- <result property="plantType" column="plant_type" />
|
|
|
- <result property="mediumType" column="medium_type" />
|
|
|
+ <result property="checkId" column="check_id"/>
|
|
|
+ <result property="pointId" column="point_id"/>
|
|
|
+ <result property="repairId" column="repair_id"/>
|
|
|
+ <result property="netTestValue" column="net_test_value"/>
|
|
|
+ <result property="repairFunc" column="repair_func"/>
|
|
|
+ <result property="repairType" column="repair_type"/>
|
|
|
+ <result property="repairCount" column="repair_count"/>
|
|
|
+ <result property="plantName" column="plant_name"/>
|
|
|
+ <result property="regionName" column="region_name"/>
|
|
|
+ <result property="layer" column="layer"/>
|
|
|
+ <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="repairer" column="repairer"/>
|
|
|
+ <result property="repairDate" column="repair_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="plantId" column="plant_id"/>
|
|
|
+ <result property="regionId" column="region_id"/>
|
|
|
+ <result property="devId" column="dev_id"/>
|
|
|
+ <result property="instrumentId" column="instrument_id"/>
|
|
|
+ <result property="plantType" column="plant_type"/>
|
|
|
+ <result property="mediumType" column="medium_type"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTCheckRepairpointsVo">
|
|
|
- select check_id, point_id, repair_id, net_test_value, repair_func, repair_type, repair_count, plant_name, region_name, layer, dev_name, dev_code, group_code, extend_code, point_type, instrument_code, leakage_position, repairer, repair_date, leakage_degree, remarks, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate, plant_id, region_id, dev_id, instrument_id, plant_type, medium_type from t_check_repairpoints
|
|
|
+ select d.check_id,
|
|
|
+ d.point_id,
|
|
|
+ d.repair_id,
|
|
|
+ d.net_test_value,
|
|
|
+ d.repair_func,
|
|
|
+ d.repair_type,
|
|
|
+ d.repair_count,
|
|
|
+ d.plant_name,
|
|
|
+ d.region_name,
|
|
|
+ d.layer,
|
|
|
+ d.dev_name,
|
|
|
+ d.dev_code,
|
|
|
+ d.group_code,
|
|
|
+ d.extend_code,
|
|
|
+ d.point_type,
|
|
|
+ d.instrument_code,
|
|
|
+ d.leakage_position,
|
|
|
+ d.repairer,
|
|
|
+ d.repair_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,
|
|
|
+ d.plant_id,
|
|
|
+ d.region_id,
|
|
|
+ d.dev_id,
|
|
|
+ d.instrument_id,
|
|
|
+ d.plant_type,
|
|
|
+ d.medium_type
|
|
|
+ from t_check_repairpoints d
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTCheckRepairpointsList" parameterType="TCheckRepairpoints" resultMap="TCheckRepairpointsResult">
|
|
|
<include refid="selectTCheckRepairpointsVo"/>
|
|
|
<where>
|
|
|
- <if test="pointId != null "> and point_id = #{pointId}</if>
|
|
|
- <if test="repairId != null "> and repair_id = #{repairId}</if>
|
|
|
- <if test="netTestValue != null and netTestValue != ''"> and net_test_value = #{netTestValue}</if>
|
|
|
- <if test="repairFunc != null and repairFunc != ''"> and repair_func = #{repairFunc}</if>
|
|
|
- <if test="repairType != null and repairType != ''"> and repair_type = #{repairType}</if>
|
|
|
- <if test="repairCount != null and repairCount != ''"> and repair_count = #{repairCount}</if>
|
|
|
- <if test="plantName != null and plantName != ''"> and plant_name like concat('%', #{plantName}, '%')</if>
|
|
|
- <if test="regionName != null and regionName != ''"> and region_name like concat('%', #{regionName}, '%')</if>
|
|
|
- <if test="layer != null and layer != ''"> and layer = #{layer}</if>
|
|
|
- <if test="devName != null and devName != ''"> and dev_name like concat('%', #{devName}, '%')</if>
|
|
|
- <if test="devCode != null and devCode != ''"> and dev_code = #{devCode}</if>
|
|
|
- <if test="groupCode != null and groupCode != ''"> and group_code = #{groupCode}</if>
|
|
|
- <if test="extendCode != null and extendCode != ''"> and extend_code = #{extendCode}</if>
|
|
|
- <if test="pointType != null and pointType != ''"> and point_type = #{pointType}</if>
|
|
|
- <if test="instrumentCode != null and instrumentCode != ''"> and instrument_code = #{instrumentCode}</if>
|
|
|
- <if test="leakagePosition != null and leakagePosition != ''"> and leakage_position = #{leakagePosition}</if>
|
|
|
- <if test="repairer != null and repairer != ''"> and repairer = #{repairer}</if>
|
|
|
- <if test="repairDate != null "> and repair_date = #{repairDate}</if>
|
|
|
- <if test="leakageDegree != null and leakageDegree != ''"> and leakage_degree = #{leakageDegree}</if>
|
|
|
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
|
- <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
|
|
|
- <if test="approveTime != null "> and approve_time = #{approveTime}</if>
|
|
|
- <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
- <if test="createrCode != null "> and creater_code = #{createrCode}</if>
|
|
|
- <if test="createdate != null "> and createdate = #{createdate}</if>
|
|
|
- <if test="updaterCode != null "> and updater_code = #{updaterCode}</if>
|
|
|
- <if test="updatedate != null "> and updatedate = #{updatedate}</if>
|
|
|
- <if test="plantId != null "> and plant_id = #{plantId}</if>
|
|
|
- <if test="regionId != null "> and region_id = #{regionId}</if>
|
|
|
- <if test="devId != null "> and dev_id = #{devId}</if>
|
|
|
- <if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
|
|
- <if test="plantType != null and plantType != ''"> and plant_type = #{plantType}</if>
|
|
|
- <if test="mediumType != null and mediumType != ''"> and medium_type = #{mediumType}</if>
|
|
|
- <if test="choose != null "> and repair_id is null</if>
|
|
|
- and del_flag = 0
|
|
|
+ <if test="pointId != null ">and d.point_id = #{pointId}</if>
|
|
|
+ <if test="repairId != null ">and d.repair_id = #{repairId}</if>
|
|
|
+ <if test="netTestValue != null and netTestValue != ''">and d.net_test_value = #{netTestValue}</if>
|
|
|
+ <if test="repairFunc != null and repairFunc != ''">and d.repair_func = #{repairFunc}</if>
|
|
|
+ <if test="repairType != null and repairType != ''">and d.repair_type = #{repairType}</if>
|
|
|
+ <if test="repairCount != null and repairCount != ''">and d.repair_count = #{repairCount}</if>
|
|
|
+ <if test="plantName != null and plantName != ''">and d.plant_name like concat('%', #{plantName}, '%')</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="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="repairer != null and repairer != ''">and d.repairer = #{repairer}</if>
|
|
|
+ <if test="repairDate != null ">and d.repair_date = #{repairDate}</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="plantId != null ">and d.plant_id = #{plantId}</if>
|
|
|
+ <if test="regionId != null ">and rd.egion_id = #{regionId}</if>
|
|
|
+ <if test="devId != null ">and d.dev_id = #{devId}</if>
|
|
|
+ <if test="instrumentId != null ">and d.instrument_id = #{instrumentId}</if>
|
|
|
+ <if test="plantType != null and plantType != ''">and d.plant_type = #{plantType}</if>
|
|
|
+ <if test="mediumType != null and mediumType != ''">and d.medium_type = #{mediumType}</if>
|
|
|
+ <if test="choose != null ">and d.repair_id is null</if>
|
|
|
+ and d.del_flag = 0
|
|
|
</where>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScopePlant}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTCheckRepairpointsByCheckId" parameterType="Long" resultMap="TCheckRepairpointsResult">
|
|
@@ -98,14 +136,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTCheckRepairpointsByIds" parameterType="Long" resultMap="TCheckRepairpointsResult">
|
|
|
- <include refid="selectTCheckRepairpointsVo"/> where check_id in
|
|
|
+ <include refid="selectTCheckRepairpointsVo"/>
|
|
|
+ where check_id in
|
|
|
<foreach item="checkId" collection="array" open="(" separator="," close=")">
|
|
|
#{checkId}
|
|
|
</foreach>
|
|
|
and approve_status=2
|
|
|
</select>
|
|
|
|
|
|
- <insert id="insertTCheckRepairpoints" parameterType="TCheckRepairpoints" useGeneratedKeys="true" keyProperty="checkId">
|
|
|
+ <insert id="insertTCheckRepairpoints" parameterType="TCheckRepairpoints" useGeneratedKeys="true"
|
|
|
+ keyProperty="checkId">
|
|
|
insert into t_check_repairpoints
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="pointId != null">point_id,</if>
|
|
@@ -142,7 +182,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="instrumentId != null">instrument_id,</if>
|
|
|
<if test="plantType != null">plant_type,</if>
|
|
|
<if test="mediumType != null">medium_type,</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="pointId != null">#{pointId},</if>
|
|
|
<if test="repairId != null">#{repairId},</if>
|
|
@@ -178,7 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="instrumentId != null">#{instrumentId},</if>
|
|
|
<if test="plantType != null">#{plantType},</if>
|
|
|
<if test="mediumType != null">#{mediumType},</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertTCheckRepairpointsByList" parameterType="TCheckRepairpoints">
|
|
@@ -208,7 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
instrument_id,
|
|
|
plant_type,
|
|
|
medium_type,
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
values
|
|
|
<foreach collection="list" index="index" separator="," item="item">
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -292,7 +332,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="approveStatus != null">approve_status = #{approveStatus},</if>
|
|
|
<if test="remarks != null">remarks = #{remarks},</if>
|
|
|
</trim>
|
|
|
- where plant_name=#{plantName} and group_code=#{groupCode} and extend_code=#{extendCode} and repair_id=#{repairId} and (approve_status is null or approve_status=0)
|
|
|
+ where plant_name=#{plantName} and group_code=#{groupCode} and extend_code=#{extendCode} and
|
|
|
+ repair_id=#{repairId} and (approve_status is null or approve_status=0)
|
|
|
</update>
|
|
|
|
|
|
<update id="updateApproveStatusByIds" parameterType="TCheckCheckpoints">
|
|
@@ -318,7 +359,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
<delete id="deleteTCheckRepairpointsByCheckId" parameterType="Long">
|
|
|
- update t_check_repairpoints set del_flag=1 where check_id = #{checkId}
|
|
|
+ update t_check_repairpoints
|
|
|
+ set del_flag=1
|
|
|
+ where check_id = #{checkId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteTCheckRepairpointsByCheckIds" parameterType="String">
|