| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <?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.com.goldenwater.dcproj.dao.BisInspRectFdbkDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRectFdbk" id="bisInspRectFdbkResultMap">
- <result property="guid" column="GUID"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="orgGuid" column="ORG_GUID"/>
- <result property="rectMeas" column="RECT_MEAS"/>
- <result property="rectConc" column="RECT_CONC"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="recPers" column="REC_PERS"/>
- <result property="note" column="NOTE"/>
- <result property="hasVed" column="HAS_VED"/>
- </resultMap>
- <sql id="table_columns">
- GUID,
- PBLM_ID,
- ORG_GUID,
- RECT_MEAS,
- RECT_CONC,
- DATA_STAT,
- COLL_TIME,
- REC_PERS,
- NOTE,HAS_VED
- </sql>
- <sql id="entity_properties">
- #{guid},
- #{pblmId},
- #{orgGuid},
- #{rectMeas},
- #{rectConc},
- #{dataStat},
- #{collTime},
- #{recPers},
- #{note},#{hasVed}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
- <if test="orgGuid != null and orgGuid != ''">and ORG_GUID = #{orgGuid}</if>
- <if test="rectMeas != null and rectMeas != ''">and RECT_MEAS = #{rectMeas}</if>
- <if test="rectConc != null and rectConc != ''">and RECT_CONC = #{rectConc}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="collTime != null">and COLL_TIME = #{collTime}</if>
- <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="hasVed != null and hasVed != ''">and HAS_VED = #{hasVed}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspRectFdbkResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from bis_insp_rect_fdbk where GUID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspRectFdbkResultMap">
- select GUID,
- PBLM_ID, ORG_GUID,
- RECT_MEAS, (case when RECT_CONC is null then '0' else RECT_CONC end) as RECT_CONC, DATA_STAT,
- COLL_TIME,REC_PERS,HAS_VED as has_Ved,
- NOTE from bis_insp_rect_fdbk
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspRectFdbkResultMap">
- select
- <include refid="table_columns"/>
- from bis_insp_rect_fdbk
- </select>
- <select id="findList" resultMap="bisInspRectFdbkResultMap">
- select
- <include refid="table_columns"/>
- from bis_insp_rect_fdbk
- <include refid="page_where"/>
- order by COLL_TIME desc
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from bis_insp_rect_fdbk
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectFdbk">
- insert into bis_insp_rect_fdbk(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from bis_insp_rect_fdbk where GUID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectFdbk">
- delete from bis_insp_rect_fdbk
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update bis_insp_rect_fdbk set flag_valid = 0 where GUID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectFdbk">
- update bis_insp_rect_fdbk
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
- <if test="rectMeas != null and rectMeas != ''">RECT_MEAS = #{rectMeas},</if>
- <if test="rectConc != null and rectConc != ''">RECT_CONC = #{rectConc},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="hasVed != null and hasVed != ''">has_Ved = #{hasVed},</if>
- </trim>
- <where>GUID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectFdbk">
- update bis_insp_rect_fdbk
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
- <if test="rectMeas != null and rectMeas != ''">RECT_MEAS = #{rectMeas},</if>
- <if test="rectConc != null and rectConc != ''">RECT_CONC = #{rectConc},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="hasVed != null and hasVed != ''">has_Ved = #{hasVed},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|