|
@@ -0,0 +1,243 @@
|
|
|
+<?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="com.ruoyi.project.base.mapper.TBasePointMapper">
|
|
|
+
|
|
|
+ <resultMap type="TBasePoint" id="TBasePointResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="ppm" column="ppm" />
|
|
|
+ <result property="leakageDegree" column="leakage_degree" />
|
|
|
+ <result property="plantId" column="plant_id" />
|
|
|
+ <result property="plantType" column="plant_type" />
|
|
|
+ <result property="plantName" column="plant_name" />
|
|
|
+ <result property="plantCode" column="plant_code" />
|
|
|
+ <result property="regionId" column="region_id" />
|
|
|
+ <result property="devId" column="dev_id" />
|
|
|
+ <result property="devName" column="dev_name" />
|
|
|
+ <result property="devNum" column="dev_num" />
|
|
|
+ <result property="medium" column="medium" />
|
|
|
+ <result property="mediumType" column="medium_type" />
|
|
|
+ <result property="pointType" column="point_type" />
|
|
|
+ <result property="layer" column="layer" />
|
|
|
+ <result property="groupPosition" column="group_position" />
|
|
|
+ <result property="pointPosition" column="point_position" />
|
|
|
+ <result property="groupCode" column="group_code" />
|
|
|
+ <result property="extendCoude" column="extend_coude" />
|
|
|
+ <result property="subPointType" column="sub_point_type" />
|
|
|
+ <result property="dia" column="dia" />
|
|
|
+ <result property="unarrive" column="unarrive" />
|
|
|
+ <result property="unarriveReason" column="unarrive_reason" />
|
|
|
+ <result property="keepWarm" column="keep_warm" />
|
|
|
+ <result property="temperature" column="temperature" />
|
|
|
+ <result property="pressure" column="pressure" />
|
|
|
+ <result property="runTime" column="run_time" />
|
|
|
+ <result property="pidNo" column="pid_no" />
|
|
|
+ <result property="pidUrl" column="pid_url" />
|
|
|
+ <result property="picNo" column="pic_no" />
|
|
|
+ <result property="picUrl" column="pic_url" />
|
|
|
+ <result property="tocMark" column="toc_mark" />
|
|
|
+ <result property="methaneMark" column="methane_mark" />
|
|
|
+ <result property="vocsMark" column="vocs_mark" />
|
|
|
+ <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="updater" column="updater" />
|
|
|
+ <result property="updatedate" column="updatedate" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTBasePointVo">
|
|
|
+ select id, ppm, leakage_degree, plant_id, region_id, dev_id, medium, medium_type, point_type, layer, group_position, point_position, group_code, extend_coude, sub_point_type, dia, unarrive, unarrive_reason, keep_warm, temperature, pressure, run_time, pid_no, pid_url, pic_no, pic_url, toc_mark, methane_mark, vocs_mark, remarks, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_base_point
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTBasePointList" parameterType="TBasePoint" resultMap="TBasePointResult">
|
|
|
+ select d.id, d.ppm, d.leakage_degree, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code, d.region_id, d.dev_id,d.medium, d.medium_type, d.point_type, d.layer, d.group_position, d.point_position, d.group_code, d.extend_coude, d.sub_point_type, d.dia, d.unarrive, d.unarrive_reason, d.keep_warm, d.temperature, d.pressure, d.run_time, d.pid_no, d.pid_url, d.pic_no, d.pic_url, d.toc_mark, d.methane_mark, d.vocs_mark, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate from t_base_point d
|
|
|
+ left join sys_user su on su.user_id = d.updater_code
|
|
|
+ left join t_base_plant bp on bp.id = d.plant_id
|
|
|
+ <where>
|
|
|
+ <if test="ppm != null "> and ppm = #{ppm}</if>
|
|
|
+ <if test="leakageDegree != null and leakageDegree != ''"> and leakage_degree = #{leakageDegree}</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="medium != null and medium != ''"> and medium = #{medium}</if>
|
|
|
+ <if test="mediumType != null and mediumType != ''"> and medium_type = #{mediumType}</if>
|
|
|
+ <if test="pointType != null and pointType != ''"> and point_type = #{pointType}</if>
|
|
|
+ <if test="layer != null and layer != ''"> and layer = #{layer}</if>
|
|
|
+ <if test="groupPosition != null and groupPosition != ''"> and group_position = #{groupPosition}</if>
|
|
|
+ <if test="pointPosition != null and pointPosition != ''"> and point_position = #{pointPosition}</if>
|
|
|
+ <if test="groupCode != null and groupCode != ''"> and group_code = #{groupCode}</if>
|
|
|
+ <if test="extendCoude != null and extendCoude != ''"> and extend_coude = #{extendCoude}</if>
|
|
|
+ <if test="subPointType != null and subPointType != ''"> and sub_point_type = #{subPointType}</if>
|
|
|
+ <if test="dia != null and dia != ''"> and dia = #{dia}</if>
|
|
|
+ <if test="unarrive != null and unarrive != ''"> and unarrive = #{unarrive}</if>
|
|
|
+ <if test="unarriveReason != null and unarriveReason != ''"> and unarrive_reason = #{unarriveReason}</if>
|
|
|
+ <if test="keepWarm != null and keepWarm != ''"> and keep_warm = #{keepWarm}</if>
|
|
|
+ <if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
|
|
|
+ <if test="pressure != null and pressure != ''"> and pressure = #{pressure}</if>
|
|
|
+ <if test="runTime != null "> and run_time = #{runTime}</if>
|
|
|
+ <if test="pidNo != null and pidNo != ''"> and pid_no = #{pidNo}</if>
|
|
|
+ <if test="pidUrl != null and pidUrl != ''"> and pid_url = #{pidUrl}</if>
|
|
|
+ <if test="picNo != null and picNo != ''"> and pic_no = #{picNo}</if>
|
|
|
+ <if test="picUrl != null and picUrl != ''"> and pic_url = #{picUrl}</if>
|
|
|
+ <if test="tocMark != null and tocMark != ''"> and toc_mark = #{tocMark}</if>
|
|
|
+ <if test="methaneMark != null and methaneMark != ''"> and methane_mark = #{methaneMark}</if>
|
|
|
+ <if test="vocsMark != null and vocsMark != ''"> and vocs_mark = #{vocsMark}</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>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTBasePointById" parameterType="Long" resultMap="TBasePointResult">
|
|
|
+ <include refid="selectTBasePointVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTBasePoint" parameterType="TBasePoint" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into t_base_point
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="ppm != null">ppm,</if>
|
|
|
+ <if test="leakageDegree != null">leakage_degree,</if>
|
|
|
+ <if test="plantId != null">plant_id,</if>
|
|
|
+ <if test="regionId != null">region_id,</if>
|
|
|
+ <if test="devId != null">dev_id,</if>
|
|
|
+ <if test="medium != null">medium,</if>
|
|
|
+ <if test="mediumType != null">medium_type,</if>
|
|
|
+ <if test="pointType != null">point_type,</if>
|
|
|
+ <if test="layer != null">layer,</if>
|
|
|
+ <if test="groupPosition != null">group_position,</if>
|
|
|
+ <if test="pointPosition != null">point_position,</if>
|
|
|
+ <if test="groupCode != null">group_code,</if>
|
|
|
+ <if test="extendCoude != null">extend_coude,</if>
|
|
|
+ <if test="subPointType != null">sub_point_type,</if>
|
|
|
+ <if test="dia != null">dia,</if>
|
|
|
+ <if test="unarrive != null">unarrive,</if>
|
|
|
+ <if test="unarriveReason != null">unarrive_reason,</if>
|
|
|
+ <if test="keepWarm != null">keep_warm,</if>
|
|
|
+ <if test="temperature != null">temperature,</if>
|
|
|
+ <if test="pressure != null">pressure,</if>
|
|
|
+ <if test="runTime != null">run_time,</if>
|
|
|
+ <if test="pidNo != null">pid_no,</if>
|
|
|
+ <if test="pidUrl != null">pid_url,</if>
|
|
|
+ <if test="picNo != null">pic_no,</if>
|
|
|
+ <if test="picUrl != null">pic_url,</if>
|
|
|
+ <if test="tocMark != null">toc_mark,</if>
|
|
|
+ <if test="methaneMark != null">methane_mark,</if>
|
|
|
+ <if test="vocsMark != null">vocs_mark,</if>
|
|
|
+ <if test="remarks != null">remarks,</if>
|
|
|
+ <if test="approveStatus != null">approve_status,</if>
|
|
|
+ <if test="approveTime != null">approve_time,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="createrCode != null">creater_code,</if>
|
|
|
+ createdate,
|
|
|
+ <if test="updaterCode != null">updater_code,</if>
|
|
|
+ <if test="updatedate != null">updatedate,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="ppm != null">#{ppm},</if>
|
|
|
+ <if test="leakageDegree != null">#{leakageDegree},</if>
|
|
|
+ <if test="plantId != null">#{plantId},</if>
|
|
|
+ <if test="regionId != null">#{regionId},</if>
|
|
|
+ <if test="devId != null">#{devId},</if>
|
|
|
+ <if test="medium != null">#{medium},</if>
|
|
|
+ <if test="mediumType != null">#{mediumType},</if>
|
|
|
+ <if test="pointType != null">#{pointType},</if>
|
|
|
+ <if test="layer != null">#{layer},</if>
|
|
|
+ <if test="groupPosition != null">#{groupPosition},</if>
|
|
|
+ <if test="pointPosition != null">#{pointPosition},</if>
|
|
|
+ <if test="groupCode != null">#{groupCode},</if>
|
|
|
+ <if test="extendCoude != null">#{extendCoude},</if>
|
|
|
+ <if test="subPointType != null">#{subPointType},</if>
|
|
|
+ <if test="dia != null">#{dia},</if>
|
|
|
+ <if test="unarrive != null">#{unarrive},</if>
|
|
|
+ <if test="unarriveReason != null">#{unarriveReason},</if>
|
|
|
+ <if test="keepWarm != null">#{keepWarm},</if>
|
|
|
+ <if test="temperature != null">#{temperature},</if>
|
|
|
+ <if test="pressure != null">#{pressure},</if>
|
|
|
+ <if test="runTime != null">#{runTime},</if>
|
|
|
+ <if test="pidNo != null">#{pidNo},</if>
|
|
|
+ <if test="pidUrl != null">#{pidUrl},</if>
|
|
|
+ <if test="picNo != null">#{picNo},</if>
|
|
|
+ <if test="picUrl != null">#{picUrl},</if>
|
|
|
+ <if test="tocMark != null">#{tocMark},</if>
|
|
|
+ <if test="methaneMark != null">#{methaneMark},</if>
|
|
|
+ <if test="vocsMark != null">#{vocsMark},</if>
|
|
|
+ <if test="remarks != null">#{remarks},</if>
|
|
|
+ <if test="approveStatus != null">#{approveStatus},</if>
|
|
|
+ <if test="approveTime != null">#{approveTime},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="createrCode != null">#{createrCode},</if>
|
|
|
+ sysdate(),
|
|
|
+ <if test="updaterCode != null">#{updaterCode},</if>
|
|
|
+ <if test="updatedate != null">#{updatedate},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTBasePoint" parameterType="TBasePoint">
|
|
|
+ update t_base_point
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="ppm != null">ppm = #{ppm},</if>
|
|
|
+ <if test="leakageDegree != null">leakage_degree = #{leakageDegree},</if>
|
|
|
+ <if test="plantId != null">plant_id = #{plantId},</if>
|
|
|
+ <if test="regionId != null">region_id = #{regionId},</if>
|
|
|
+ <if test="devId != null">dev_id = #{devId},</if>
|
|
|
+ <if test="medium != null">medium = #{medium},</if>
|
|
|
+ <if test="mediumType != null">medium_type = #{mediumType},</if>
|
|
|
+ <if test="pointType != null">point_type = #{pointType},</if>
|
|
|
+ <if test="layer != null">layer = #{layer},</if>
|
|
|
+ <if test="groupPosition != null">group_position = #{groupPosition},</if>
|
|
|
+ <if test="pointPosition != null">point_position = #{pointPosition},</if>
|
|
|
+ <if test="groupCode != null">group_code = #{groupCode},</if>
|
|
|
+ <if test="extendCoude != null">extend_coude = #{extendCoude},</if>
|
|
|
+ <if test="subPointType != null">sub_point_type = #{subPointType},</if>
|
|
|
+ <if test="dia != null">dia = #{dia},</if>
|
|
|
+ <if test="unarrive != null">unarrive = #{unarrive},</if>
|
|
|
+ <if test="unarriveReason != null">unarrive_reason = #{unarriveReason},</if>
|
|
|
+ <if test="keepWarm != null">keep_warm = #{keepWarm},</if>
|
|
|
+ <if test="temperature != null">temperature = #{temperature},</if>
|
|
|
+ <if test="pressure != null">pressure = #{pressure},</if>
|
|
|
+ <if test="runTime != null">run_time = #{runTime},</if>
|
|
|
+ <if test="pidNo != null">pid_no = #{pidNo},</if>
|
|
|
+ <if test="pidUrl != null">pid_url = #{pidUrl},</if>
|
|
|
+ <if test="picNo != null">pic_no = #{picNo},</if>
|
|
|
+ <if test="picUrl != null">pic_url = #{picUrl},</if>
|
|
|
+ <if test="tocMark != null">toc_mark = #{tocMark},</if>
|
|
|
+ <if test="methaneMark != null">methane_mark = #{methaneMark},</if>
|
|
|
+ <if test="vocsMark != null">vocs_mark = #{vocsMark},</if>
|
|
|
+ <if test="remarks != null">remarks = #{remarks},</if>
|
|
|
+ <if test="approveStatus != null">approve_status = #{approveStatus},</if>
|
|
|
+ <if test="approveTime != null">approve_time = #{approveTime},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="createrCode != null">creater_code = #{createrCode},</if>
|
|
|
+ <if test="createdate != null">createdate = #{createdate},</if>
|
|
|
+ <if test="updaterCode != null">updater_code = #{updaterCode},</if>
|
|
|
+ <if test="updatedate != null">updatedate = #{updatedate},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTBasePointById" parameterType="Long">
|
|
|
+ delete from t_base_point where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTBasePointByIds" parameterType="String">
|
|
|
+ delete from t_base_point where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|