| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- <?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.BisZhejiangCheckPlanDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisZhejiangCheckPlan" id="bisZhejiangCheckPlanResultMap">
- <result property="id" column="ID"/>
- <result property="workerNmDesc" column="WORKER_NM_DESC"/>
- <result property="wokerNm" column="WOKER_NM"/>
- <result property="content" column="CONTENT"/>
- <result property="checkWay" column="CHECK_WAY"/>
- <result property="persId" column="PERS_ID"/>
- <result property="checkEndDate" column="CHECK_END_DATE"/>
- <result property="checkSttdDate" column="CHECK_STTD_DATE"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="note" column="NOTE"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="state" column="STATE"/>
- <result property="checkRelay" column="CHECK_RELAY"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="departId" column="depart_Id"/>
- <result property="departNm" column="depart_Nm"/>
- <result property="year" column="YEAR"/>
- <result property="isSend" column="IS_SEND"/>
- <result property="fileState" column="FILE_STATE"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="inspType" column="INSP_TYPE"/>
- <result property="inspName" column="INSP_Name"/>
- <result property="month" column="MONTH"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,INSP_Name,MONTH,depart_Id,depart_Nm,
- WORKER_NM_DESC,
- WOKER_NM,
- CONTENT,
- CHECK_WAY,
- PERS_ID,
- CHECK_END_DATE,
- CHECK_STTD_DATE,
- INTM,
- UPTM,
- NOTE,
- DATA_STAT,
- STATE,
- CHECK_RELAY,
- ORG_ID,
- ORG_NAME,
- YEAR,
- IS_SEND,
- FILE_STATE,
- PERS_NAME,
- INSP_TYPE
- </sql>
- <sql id="entity_properties">
- #{id},#{inspName},#{month},#{departId},#{departNm},
- #{workerNmDesc},
- #{wokerNm},
- #{content},
- #{checkWay},
- #{persId},
- #{checkEndDate},
- #{checkSttdDate},
- #{intm},
- #{uptm},
- #{note},
- #{dataStat},
- #{state},
- #{checkRelay},
- #{orgId},
- #{orgName},
- #{year},
- #{isSend},
- #{fileState},
- #{persName},
- #{inspType}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="workerNmDesc != null and workerNmDesc != ''">and WORKER_NM_DESC = #{workerNmDesc}</if>
- <if test="wokerNm != null and wokerNm != ''">and WOKER_NM like '%${wokerNm}%'</if>
- <if test="departId != null and departId != ''">and depart_Id = #{departId}</if>
- <if test="departNm != null and departNm != ''">and depart_Nm = #{departNm}</if>
- <if test="month != null and month != ''">and MONTH = #{month}</if>
- <if test="inspName != null and inspName != ''">and INSP_NAME = #{inspName}</if>
- <if test="content != null and content != ''">and CONTENT = #{content}</if>
- <if test="checkWay != null and checkWay != ''">and CHECK_WAY = #{checkWay}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="checkEndDate != null and checkEndDate != ''">and CHECK_END_DATE = #{checkEndDate}</if>
- <if test="checkSttdDate != null and checkSttdDate != ''">and CHECK_STTD_DATE = #{checkSttdDate}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="state != null and state != ''">and STATE = #{state}</if>
- <if test="checkRelay != null and checkRelay != ''">and CHECK_RELAY = #{checkRelay}</if>
- <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
- <if test="orgName != null and orgName != ''">and ORG_NAME = #{orgName}</if>
- <if test="year != null and year != ''">and YEAR = #{year}</if>
- <if test="isSend != null and isSend != ''">and IS_SEND = #{isSend}</if>
- <if test="fileState != null and fileState != ''">and FILE_STATE = #{fileState}</if>
- <if test="persName != null and persName != ''">and PERS_NAME = #{persName}</if>
- <if test="inspType != null and inspType != ''">and INSP_TYPE = #{inspType}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisZhejiangCheckPlanResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_ZHEJIANG_CHECK_PLAN where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisZhejiangCheckPlanResultMap">
- select <include refid="table_columns" /> from BIS_ZHEJIANG_CHECK_PLAN <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisZhejiangCheckPlanResultMap">
- select <include refid="table_columns" /> from BIS_ZHEJIANG_CHECK_PLAN
- </select>
- <select id="findList" resultMap="bisZhejiangCheckPlanResultMap">
- select <include refid="table_columns" /> from BIS_ZHEJIANG_CHECK_PLAN <include refid="page_where" />
- order by CHECK_STTD_DATE desc
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_ZHEJIANG_CHECK_PLAN <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisZhejiangCheckPlan">
- insert into BIS_ZHEJIANG_CHECK_PLAN( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_ZHEJIANG_CHECK_PLAN where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisZhejiangCheckPlan">
- delete from BIS_ZHEJIANG_CHECK_PLAN <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_ZHEJIANG_CHECK_PLAN set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisZhejiangCheckPlan">
- update BIS_ZHEJIANG_CHECK_PLAN
- <trim prefix="set" suffixOverrides=",">
- <if test="departId != null and departId != ''"> depart_Id = #{departId},</if>
- <if test="departNm != null and departNm != ''"> depart_Nm = #{departNm},</if>
- <if test="month != null and month != ''"> MONTH = #{month},</if>
- <if test="inspName != null and inspName != ''"> INSP_NAME = #{inspName},</if>
- <if test="workerNmDesc != null and workerNmDesc != ''">WORKER_NM_DESC = #{workerNmDesc},</if>
- <if test="wokerNm != null and wokerNm != ''">WOKER_NM = #{wokerNm},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="checkWay != null and checkWay != ''">CHECK_WAY = #{checkWay},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="checkEndDate != null and checkEndDate != ''">CHECK_END_DATE = #{checkEndDate},</if>
- <if test="checkSttdDate != null and checkSttdDate != ''">CHECK_STTD_DATE = #{checkSttdDate},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- <if test="checkRelay != null and checkRelay != ''">CHECK_RELAY = #{checkRelay},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="orgName != null and orgName != ''">ORG_NAME = #{orgName},</if>
- <if test="year != null and year != ''">YEAR = #{year},</if>
- <if test="isSend != null and isSend != ''">IS_SEND = #{isSend},</if>
- <if test="fileState != null and fileState != ''">FILE_STATE = #{fileState},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="inspType != null and inspType != ''">INSP_TYPE = #{inspType},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisZhejiangCheckPlan">
- update BIS_ZHEJIANG_CHECK_PLAN
- <trim prefix="set" suffixOverrides=",">
- <if test="departId != null and departId != ''"> depart_Id = #{departId},</if>
- <if test="departNm != null and departNm != ''"> depart_Nm = #{departNm},</if>
- <if test="month != null and month != ''"> MONTH = #{month},</if>
- <if test="inspName != null and inspName != ''"> INSP_NAME = #{inspName},</if>
- <if test="workerNmDesc != null and workerNmDesc != ''">WORKER_NM_DESC = #{workerNmDesc},</if>
- <if test="wokerNm != null and wokerNm != ''">WOKER_NM = #{wokerNm},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="checkWay != null and checkWay != ''">CHECK_WAY = #{checkWay},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="checkEndDate != null and checkEndDate != ''">CHECK_END_DATE = #{checkEndDate},</if>
- <if test="checkSttdDate != null and checkSttdDate != ''">CHECK_STTD_DATE = #{checkSttdDate},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- <if test="checkRelay != null and checkRelay != ''">CHECK_RELAY = #{checkRelay},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="orgName != null and orgName != ''">ORG_NAME = #{orgName},</if>
- <if test="year != null and year != ''">YEAR = #{year},</if>
- <if test="isSend != null and isSend != ''">IS_SEND = #{isSend},</if>
- <if test="fileState != null and fileState != ''">FILE_STATE = #{fileState},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="inspType != null and inspType != ''">INSP_TYPE = #{inspType},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|