2f1d17f07f4e8ccb8cd21808fc39a94c43e1ba8b.svn-base 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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.TacPawpBitopqQmsDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpBitopqQms" id="tacPawpBitopqQmsResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="sysType" column="SYS_TYPE"/>
  8. <result property="sysNm" column="SYS_NM"/>
  9. <result property="orgNm" column="ORG_NM"/>
  10. <result property="stfSttn" column="STF_STTN"/>
  11. <result property="qasms" column="QASMS"/>
  12. <result property="qasm" column="QASM"/>
  13. <result property="qsorgIsDamp" column="QSORG_IS_DAMP"/>
  14. <result property="qsorgIsCpd" column="QSORG_IS_CPD"/>
  15. <result property="qsorgQassai" column="QSORG_QASSAI"/>
  16. <result property="remark" column="REMARK"/>
  17. <result property="persId" column="PERS_ID"/>
  18. <result property="intm" column="INTM"/>
  19. <result property="uptm" column="UPTM"/>
  20. <result property="dataStat" column="DATA_STAT"/>
  21. <result property="subName" column="SUB_NAME"/>
  22. </resultMap>
  23. <sql id="table_columns">
  24. ID,
  25. RGSTR_ID,
  26. SYS_TYPE,
  27. SYS_NM,
  28. ORG_NM,
  29. STF_STTN,
  30. QASMS,
  31. QASM,
  32. QSORG_IS_DAMP,
  33. QSORG_IS_CPD,
  34. QSORG_QASSAI,
  35. REMARK,
  36. PERS_ID,
  37. INTM,
  38. UPTM,
  39. DATA_STAT
  40. </sql>
  41. <sql id="entity_properties">
  42. #{id},
  43. #{rgstrId},
  44. #{sysType},
  45. #{sysNm},
  46. #{orgNm},
  47. #{stfSttn},
  48. #{qasms},
  49. #{qasm},
  50. #{qsorgIsDamp},
  51. #{qsorgIsCpd},
  52. #{qsorgQassai},
  53. #{remark},
  54. #{persId},
  55. #{intm},
  56. #{uptm},
  57. #{dataStat}
  58. </sql>
  59. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  60. <sql id="page_where">
  61. <trim prefix="where" prefixOverrides="and | or ">
  62. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  63. <if test="sysType != null and sysType != ''">and SYS_TYPE = #{sysType}</if>
  64. <if test="sysNm != null and sysNm != ''">and SYS_NM like '%${sysNm}%'</if>
  65. <if test="orgNm != null and orgNm != ''">and ORG_NM like '%${orgNm}%'</if>
  66. <if test="stfSttn != null and stfSttn != ''">and STF_STTN = #{stfSttn}</if>
  67. <if test="qasms != null and qasms != ''">and QASMS = #{qasms}</if>
  68. <if test="qasm != null and qasm != ''">and QASM = #{qasm}</if>
  69. <if test="qsorgIsDamp != null and qsorgIsDamp != ''">and QSORG_IS_DAMP = #{qsorgIsDamp}</if>
  70. <if test="qsorgIsCpd != null and qsorgIsCpd != ''">and QSORG_IS_CPD = #{qsorgIsCpd}</if>
  71. <if test="qsorgQassai != null and qsorgQassai != ''">and QSORG_QASSAI = #{qsorgQassai}</if>
  72. <if test="remark != null and remark != ''">and REMARK like '%${remark}%'</if>
  73. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  74. <if test="intm != null">and INTM = #{intm}</if>
  75. <if test="uptm != null">and UPTM = #{uptm}</if>
  76. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  77. </trim>
  78. </sql>
  79. <select id="get" resultMap="tacPawpBitopqQmsResultMap" parameterType="String">
  80. select
  81. <include refid="table_columns"/>
  82. from TAC_PAWP_BITOPQ_QMS where ID = #{id}
  83. </select>
  84. <select id="getBy" resultMap="tacPawpBitopqQmsResultMap">
  85. select
  86. <include refid="table_columns"/>
  87. from TAC_PAWP_BITOPQ_QMS
  88. <include refid="page_where"/>
  89. </select>
  90. <select id="findAll" resultMap="tacPawpBitopqQmsResultMap">
  91. select
  92. <include refid="table_columns"/>
  93. from TAC_PAWP_BITOPQ_QMS
  94. </select>
  95. <select id="findList" resultMap="tacPawpBitopqQmsResultMap">
  96. select t.* ,O.SUB_NAME from TAC_PAWP_BITOPQ_QMS t,TAC_OBJ_SUBJECT O where t.sys_type=O.Id
  97. <if test="rgstrId != null and rgstrId != ''">and t.RGSTR_ID = #{rgstrId}</if>
  98. <if test="sysType != null and sysType != ''">and t.SYS_TYPE = #{sysType}</if>
  99. <if test="sysNm != null and sysNm != ''">and t.SYS_NM = #{sysNm}</if>
  100. <if test="orgNm != null and orgNm != ''">and t.ORG_NM = #{orgNm}</if>
  101. <if test="stfSttn != null and stfSttn != ''">and t.STF_STTN = #{stfSttn}</if>
  102. <if test="qasms != null and qasms != ''">and t.QASMS = #{qasms}</if>
  103. <if test="qasm != null and qasm != ''">and t.QASM = #{qasm}</if>
  104. <if test="qsorgIsDamp != null and qsorgIsDamp != ''">and t.QSORG_IS_DAMP = #{qsorgIsDamp}</if>
  105. <if test="qsorgIsCpd != null and qsorgIsCpd != ''">and t.QSORG_IS_CPD = #{qsorgIsCpd}</if>
  106. <if test="qsorgQassai != null and qsorgQassai != ''">and t.QSORG_QASSAI = #{qsorgQassai}</if>
  107. <if test="remark != null and remark != ''">and t.REMARK = #{remark}</if>
  108. <if test="persId != null and persId != ''">and t.PERS_ID = #{persId}</if>
  109. <if test="intm != null">and t.INTM = #{intm}</if>
  110. <if test="uptm != null">and t.UPTM = #{uptm}</if>
  111. <if test="dataStat != null and dataStat != ''">and t.DATA_STAT = #{dataStat}</if>
  112. <if test="subName != null and subName != ''">and O.SUB_NAME = #{subName}</if>
  113. </select>
  114. <select id="selectCount" resultType="int">
  115. select count(ID) from TAC_PAWP_BITOPQ_QMS
  116. <include refid="page_where"/>
  117. </select>
  118. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBitopqQms">
  119. insert into TAC_PAWP_BITOPQ_QMS(
  120. <include refid="table_columns"/>
  121. )
  122. values (
  123. <include refid="entity_properties"/>
  124. )
  125. </insert>
  126. <delete id="delete" parameterType="java.lang.String">
  127. delete from TAC_PAWP_BITOPQ_QMS where ID = #{id}
  128. </delete>
  129. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBitopqQms">
  130. delete from TAC_PAWP_BITOPQ_QMS
  131. <include refid="page_where"/>
  132. </delete>
  133. <update id="deleteInFlag" parameterType="java.lang.String">
  134. update TAC_PAWP_BITOPQ_QMS set flag_valid = 0 where ID = #{id}
  135. </update>
  136. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBitopqQms">
  137. update TAC_PAWP_BITOPQ_QMS
  138. <trim prefix="set" suffixOverrides=",">
  139. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  140. <if test="sysType != null and sysType != ''">SYS_TYPE = #{sysType},</if>
  141. <if test="sysNm != null and sysNm != ''">SYS_NM = #{sysNm},</if>
  142. <if test="orgNm != null">ORG_NM = #{orgNm},</if>
  143. <if test="stfSttn != null">STF_STTN = #{stfSttn},</if>
  144. <if test="qasms != null">QASMS = #{qasms},</if>
  145. <if test="qasm != null">QASM = #{qasm},</if>
  146. <if test="qsorgIsDamp != null">QSORG_IS_DAMP = #{qsorgIsDamp},</if>
  147. <if test="qsorgIsCpd != null">QSORG_IS_CPD = #{qsorgIsCpd},</if>
  148. <if test="qsorgQassai != null">QSORG_QASSAI = #{qsorgQassai},</if>
  149. <if test="remark != null">REMARK = #{remark},</if>
  150. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  151. <if test="intm != null">INTM = #{intm},</if>
  152. <if test="uptm != null">UPTM = #{uptm},</if>
  153. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  154. </trim>
  155. <where>ID = #{id}</where>
  156. </update>
  157. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBitopqQms">
  158. update TAC_PAWP_BITOPQ_QMS
  159. <trim prefix="set" suffixOverrides=",">
  160. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  161. <if test="sysType != null and sysType != ''">SYS_TYPE = #{sysType},</if>
  162. <if test="sysNm != null">SYS_NM = #{sysNm},</if>
  163. <if test="orgNm != null">ORG_NM = #{orgNm},</if>
  164. <if test="stfSttn != null">STF_STTN = #{stfSttn},</if>
  165. <if test="qasms != null">QASMS = #{qasms},</if>
  166. <if test="qasm != null">QASM = #{qasm},</if>
  167. <if test="qsorgIsDamp != null">QSORG_IS_DAMP = #{qsorgIsDamp},</if>
  168. <if test="qsorgIsCpd != null">QSORG_IS_CPD = #{qsorgIsCpd},</if>
  169. <if test="qsorgQassai != null">QSORG_QASSAI = #{qsorgQassai},</if>
  170. <if test="remark != null">REMARK = #{remark},</if>
  171. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  172. <if test="intm != null">INTM = #{intm},</if>
  173. <if test="uptm != null">UPTM = #{uptm},</if>
  174. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  175. </trim>
  176. <include refid="page_where"/>
  177. </update>
  178. <!-- 其他自定义SQL -->
  179. </mapper>