TacPawpBstocmPlprsDao.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.TacPawpBstocmPlprsDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpBstocmPlprs" id="tacPawpBstocmPlprsResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="unitName" column="UNIT_NAME"/>
  8. <result property="legalName" column="LEGAL_NAME"/>
  9. <result property="techLead" column="TECH_LEAD"/>
  10. <result property="isPor" column="IS_POR"/>
  11. <result property="isClearIoapr" column="IS_CLEAR_IOAPR"/>
  12. <result property="domms" column="DOMMS"/>
  13. <result property="isHandQcp" column="IS_HAND_QCP"/>
  14. <result property="isHandFpfc" column="IS_HAND_FPFC"/>
  15. <result property="isSetPapor" column="IS_SET_PAPOR"/>
  16. <result property="isStart" column="IS_START"/>
  17. <result property="stTm" column="ST_TM"/>
  18. <result property="remark" column="REMARK"/>
  19. <result property="note" column="NOTE"/>
  20. <result property="persId" column="PERS_ID"/>
  21. <result property="intm" column="INTM"/>
  22. <result property="uptm" column="UPTM"/>
  23. <result property="dataStat" column="DATA_STAT"/>
  24. </resultMap>
  25. <sql id="table_columns">
  26. ID,
  27. RGSTR_ID,
  28. UNIT_NAME,
  29. LEGAL_NAME,
  30. TECH_LEAD,
  31. IS_POR,
  32. IS_CLEAR_IOAPR,
  33. DOMMS,
  34. IS_HAND_QCP,
  35. IS_HAND_FPFC,
  36. IS_SET_PAPOR,
  37. IS_START,
  38. ST_TM,
  39. REMARK,
  40. NOTE,
  41. PERS_ID,
  42. INTM,
  43. UPTM,
  44. DATA_STAT
  45. </sql>
  46. <sql id="entity_properties">
  47. #{id},
  48. #{rgstrId},
  49. #{unitName},
  50. #{legalName},
  51. #{techLead},
  52. #{isPor},
  53. #{isClearIoapr},
  54. #{domms},
  55. #{isHandQcp},
  56. #{isHandFpfc},
  57. #{isSetPapor},
  58. #{isStart},
  59. #{stTm},
  60. #{remark},
  61. #{note},
  62. #{persId},
  63. #{intm},
  64. #{uptm},
  65. #{dataStat}
  66. </sql>
  67. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  68. <sql id="page_where">
  69. <trim prefix="where" prefixOverrides="and | or ">
  70. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  71. <if test="unitName != null and unitName != ''">and UNIT_NAME like '%${unitName}%'</if>
  72. <if test="legalName != null and legalName != ''">and LEGAL_NAME like '%${legalName}%'</if>
  73. <if test="techLead != null and techLead != ''">and TECH_LEAD like '%${techLead}%'</if>
  74. <if test="isPor != null and isPor != ''">and IS_POR = #{isPor}</if>
  75. <if test="isClearIoapr != null and isClearIoapr != ''">and IS_CLEAR_IOAPR = #{isClearIoapr}</if>
  76. <if test="domms != null and domms != ''">and DOMMS = #{domms}</if>
  77. <if test="isHandQcp != null and isHandQcp != ''">and IS_HAND_QCP = #{isHandQcp}</if>
  78. <if test="isHandFpfc != null and isHandFpfc != ''">and IS_HAND_FPFC = #{isHandFpfc}</if>
  79. <if test="isSetPapor != null and isSetPapor != ''">and IS_SET_PAPOR = #{isSetPapor}</if>
  80. <if test="isStart != null and isStart != ''">and IS_START = #{isStart}</if>
  81. <if test="stTm != null">and ST_TM = #{stTm}</if>
  82. <if test="remark != null and remark != ''">and REMARK like '%${remark}%'</if>
  83. <if test="note != null and note != ''">and NOTE = #{note}</if>
  84. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  85. <if test="intm != null">and INTM = #{intm}</if>
  86. <if test="uptm != null">and UPTM = #{uptm}</if>
  87. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  88. </trim>
  89. </sql>
  90. <select id="get" resultMap="tacPawpBstocmPlprsResultMap" parameterType="String">
  91. select
  92. <include refid="table_columns"/>
  93. from TAC_PAWP_BSTOCM_PLPRS where ID = #{id}
  94. </select>
  95. <select id="getBy" resultMap="tacPawpBstocmPlprsResultMap">
  96. select
  97. <include refid="table_columns"/>
  98. from TAC_PAWP_BSTOCM_PLPRS
  99. <include refid="page_where"/>
  100. </select>
  101. <select id="findAll" resultMap="tacPawpBstocmPlprsResultMap">
  102. select
  103. <include refid="table_columns"/>
  104. from TAC_PAWP_BSTOCM_PLPRS
  105. </select>
  106. <select id="findList" resultMap="tacPawpBstocmPlprsResultMap">
  107. select
  108. <include refid="table_columns"/>
  109. from TAC_PAWP_BSTOCM_PLPRS
  110. <include refid="page_where"/>
  111. </select>
  112. <select id="selectCount" resultType="int">
  113. select count(ID) from TAC_PAWP_BSTOCM_PLPRS
  114. <include refid="page_where"/>
  115. </select>
  116. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmPlprs">
  117. insert into TAC_PAWP_BSTOCM_PLPRS(
  118. <include refid="table_columns"/>
  119. )
  120. values (
  121. <include refid="entity_properties"/>
  122. )
  123. </insert>
  124. <delete id="delete" parameterType="java.lang.String">
  125. delete from TAC_PAWP_BSTOCM_PLPRS where ID = #{id}
  126. </delete>
  127. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmPlprs">
  128. delete from TAC_PAWP_BSTOCM_PLPRS
  129. <include refid="page_where"/>
  130. </delete>
  131. <update id="deleteInFlag" parameterType="java.lang.String">
  132. update TAC_PAWP_BSTOCM_PLPRS set flag_valid = 0 where ID = #{id}
  133. </update>
  134. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmPlprs">
  135. update TAC_PAWP_BSTOCM_PLPRS
  136. <trim prefix="set" suffixOverrides=",">
  137. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  138. <if test="unitName != null">UNIT_NAME = #{unitName},</if>
  139. <if test="legalName != null">LEGAL_NAME = #{legalName},</if>
  140. <if test="techLead != null">TECH_LEAD = #{techLead},</if>
  141. <if test="isPor != null and isPor != ''">IS_POR = #{isPor},</if>
  142. <if test="isClearIoapr != null and isClearIoapr != ''">IS_CLEAR_IOAPR = #{isClearIoapr},</if>
  143. <if test="domms != null and domms != ''">DOMMS = #{domms},</if>
  144. <if test="isHandQcp != null and isHandQcp != ''">IS_HAND_QCP = #{isHandQcp},</if>
  145. <if test="isHandFpfc != null and isHandFpfc != ''">IS_HAND_FPFC = #{isHandFpfc},</if>
  146. <if test="isSetPapor != null and isSetPapor != ''">IS_SET_PAPOR = #{isSetPapor},</if>
  147. <if test="isStart != null and isStart != ''">IS_START = #{isStart},</if>
  148. <if test="stTm != null">ST_TM = #{stTm},</if>
  149. <if test="remark != null">REMARK = #{remark},</if>
  150. <if test="note != null">NOTE = #{note},</if>
  151. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  152. <if test="intm != null">INTM = #{intm},</if>
  153. <if test="uptm != null">UPTM = #{uptm},</if>
  154. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  155. </trim>
  156. <where>ID = #{id}</where>
  157. </update>
  158. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmPlprs">
  159. update TAC_PAWP_BSTOCM_PLPRS
  160. <trim prefix="set" suffixOverrides=",">
  161. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  162. <if test="unitName != null">UNIT_NAME = #{unitName},</if>
  163. <if test="legalName != null">LEGAL_NAME = #{legalName},</if>
  164. <if test="techLead != null">TECH_LEAD = #{techLead},</if>
  165. <if test="isPor != null and isPor != ''">IS_POR = #{isPor},</if>
  166. <if test="isClearIoapr != null and isClearIoapr != ''">IS_CLEAR_IOAPR = #{isClearIoapr},</if>
  167. <if test="domms != null and domms != ''">DOMMS = #{domms},</if>
  168. <if test="isHandQcp != null and isHandQcp != ''">IS_HAND_QCP = #{isHandQcp},</if>
  169. <if test="isHandFpfc != null and isHandFpfc != ''">IS_HAND_FPFC = #{isHandFpfc},</if>
  170. <if test="isSetPapor != null and isSetPapor != ''">IS_SET_PAPOR = #{isSetPapor},</if>
  171. <if test="isStart != null and isStart != ''">IS_START = #{isStart},</if>
  172. <if test="stTm != null">ST_TM = #{stTm},</if>
  173. <if test="remark != null">REMARK = #{remark},</if>
  174. <if test="note != null">NOTE = #{note},</if>
  175. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  176. <if test="intm != null">INTM = #{intm},</if>
  177. <if test="uptm != null">UPTM = #{uptm},</if>
  178. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  179. </trim>
  180. <include refid="page_where"/>
  181. </update>
  182. <!-- 其他自定义SQL -->
  183. </mapper>