BisInspQaScoreSdDao.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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.BisInspQaScoreSdDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspQaScoreSd" id="bisInspQaScoreSdResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="qaMgr" column="QA_MGR"/>
  8. <result property="qaDst" column="QA_DST"/>
  9. <result property="qaNewEta" column="QA_NEW_ETA"/>
  10. <result property="qaZrr" column="QA_ZRR"/>
  11. <result property="qaBuld" column="QA_BULD"/>
  12. <result property="qaGzyd" column="QA_GZYD"/>
  13. <result property="qaZgls" column="QA_ZGLS"/>
  14. <result property="qaJdsq" column="QA_JDSQ"/>
  15. <result property="qaGzjh" column="QA_GZJH"/>
  16. <result property="qaXmhf" column="QA_XMHF"/>
  17. <result property="qaPdbz" column="QA_PDBZ"/>
  18. <result property="qaZzqk" column="QA_ZZQK"/>
  19. <result property="qaJlqk" column="QA_JLQK"/>
  20. <result property="qaYxqk" column="QA_YXQK"/>
  21. <result property="qaJdjc" column="QA_JDJC"/>
  22. <result property="qaZljl" column="QA_ZLJL"/>
  23. <result property="qaWtcl" column="QA_WTCL"/>
  24. <result property="qaZszrz" column="QA_ZSZRZ"/>
  25. <result property="qaZdbg" column="QA_ZDBG"/>
  26. <result property="qaJdda" column="QA_JDDA"/>
  27. <result property="qaJbts" column="QA_JBTS"/>
  28. <result property="qaFwxw" column="QA_FWXW"/>
  29. <result property="qaGlxxh" column="QA_GLXXH"/>
  30. <result property="qaSpts" column="QA_SPTS"/>
  31. <result property="total" column="TOTAL"/>
  32. <result property="subTotal" column="SUB_TOTAL"/>
  33. <result property="addTotal" column="ADD_TOTAL"/>
  34. <result property="note" column="NOTE"/>
  35. <result property="persId" column="PERS_ID"/>
  36. <result property="intm" column="INTM"/>
  37. <result property="uptm" column="UPTM"/>
  38. <result property="dataStat" column="DATA_STAT"/>
  39. </resultMap>
  40. <sql id="table_columns">
  41. ID,
  42. RGSTR_ID,
  43. QA_MGR,
  44. QA_DST,
  45. QA_NEW_ETA,
  46. QA_ZRR,
  47. QA_BULD,
  48. QA_GZYD,
  49. QA_ZGLS,
  50. QA_JDSQ,
  51. QA_GZJH,
  52. QA_XMHF,
  53. QA_PDBZ,
  54. QA_ZZQK,
  55. QA_JLQK,
  56. QA_YXQK,
  57. QA_JDJC,
  58. QA_ZLJL,
  59. QA_WTCL,
  60. QA_ZSZRZ,
  61. QA_ZDBG,
  62. QA_JDDA,
  63. QA_JBTS,
  64. QA_FWXW,
  65. QA_GLXXH,
  66. QA_SPTS,
  67. TOTAL,
  68. SUB_TOTAL,
  69. ADD_TOTAL,
  70. NOTE,
  71. PERS_ID,
  72. INTM,
  73. UPTM,
  74. DATA_STAT
  75. </sql>
  76. <sql id="entity_properties">
  77. #{id},
  78. #{rgstrId},
  79. #{qaMgr},
  80. #{qaDst},
  81. #{qaNewEta},
  82. #{qaZrr},
  83. #{qaBuld},
  84. #{qaGzyd},
  85. #{qaZgls},
  86. #{qaJdsq},
  87. #{qaGzjh},
  88. #{qaXmhf},
  89. #{qaPdbz},
  90. #{qaZzqk},
  91. #{qaJlqk},
  92. #{qaYxqk},
  93. #{qaJdjc},
  94. #{qaZljl},
  95. #{qaWtcl},
  96. #{qaZszrz},
  97. #{qaZdbg},
  98. #{qaJdda},
  99. #{qaJbts},
  100. #{qaFwxw},
  101. #{qaGlxxh},
  102. #{qaSpts},
  103. #{total},
  104. #{subTotal},
  105. #{addTotal},
  106. #{note},
  107. #{persId},
  108. #{intm},
  109. #{uptm},
  110. #{dataStat}
  111. </sql>
  112. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  113. <sql id="page_where">
  114. <trim prefix="where" prefixOverrides="and | or ">
  115. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  116. <if test="qaMgr != null and qaMgr != ''">and QA_MGR = #{qaMgr}</if>
  117. <if test="qaDst != null and qaDst != ''">and QA_DST = #{qaDst}</if>
  118. <if test="qaNewEta != null and qaNewEta != ''">and QA_NEW_ETA = #{qaNewEta}</if>
  119. <if test="qaZrr != null and qaZrr != ''">and QA_ZRR = #{qaZrr}</if>
  120. <if test="qaBuld != null and qaBuld != ''">and QA_BULD = #{qaBuld}</if>
  121. <if test="qaGzyd != null and qaGzyd != ''">and QA_GZYD = #{qaGzyd}</if>
  122. <if test="qaZgls != null and qaZgls != ''">and QA_ZGLS = #{qaZgls}</if>
  123. <if test="qaJdsq != null and qaJdsq != ''">and QA_JDSQ = #{qaJdsq}</if>
  124. <if test="qaGzjh != null and qaGzjh != ''">and QA_GZJH = #{qaGzjh}</if>
  125. <if test="qaXmhf != null and qaXmhf != ''">and QA_XMHF = #{qaXmhf}</if>
  126. <if test="qaPdbz != null and qaPdbz != ''">and QA_PDBZ = #{qaPdbz}</if>
  127. <if test="qaZzqk != null and qaZzqk != ''">and QA_ZZQK = #{qaZzqk}</if>
  128. <if test="qaJlqk != null and qaJlqk != ''">and QA_JLQK = #{qaJlqk}</if>
  129. <if test="qaYxqk != null and qaYxqk != ''">and QA_YXQK = #{qaYxqk}</if>
  130. <if test="qaJdjc != null and qaJdjc != ''">and QA_JDJC = #{qaJdjc}</if>
  131. <if test="qaZljl != null and qaZljl != ''">and QA_ZLJL = #{qaZljl}</if>
  132. <if test="qaWtcl != null and qaWtcl != ''">and QA_WTCL = #{qaWtcl}</if>
  133. <if test="qaZszrz != null and qaZszrz != ''">and QA_ZSZRZ = #{qaZszrz}</if>
  134. <if test="qaZdbg != null and qaZdbg != ''">and QA_ZDBG = #{qaZdbg}</if>
  135. <if test="qaJdda != null and qaJdda != ''">and QA_JDDA = #{qaJdda}</if>
  136. <if test="qaJbts != null and qaJbts != ''">and QA_JBTS = #{qaJbts}</if>
  137. <if test="qaFwxw != null and qaFwxw != ''">and QA_FWXW = #{qaFwxw}</if>
  138. <if test="qaGlxxh != null and qaGlxxh != ''">and QA_GLXXH = #{qaGlxxh}</if>
  139. <if test="qaSpts != null and qaSpts != ''">and QA_SPTS = #{qaSpts}</if>
  140. <if test="total != null and total != ''">and TOTAL = #{total}</if>
  141. <if test="subTotal != null and subTotal != ''">and SUB_TOTAL = #{subTotal}</if>
  142. <if test="addTotal != null and addTotal != ''">and ADD_TOTAL = #{addTotal}</if>
  143. <if test="note != null and note != ''">and NOTE = #{note}</if>
  144. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  145. <if test="intm != null">and INTM = #{intm}</if>
  146. <if test="uptm != null">and UPTM = #{uptm}</if>
  147. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  148. </trim>
  149. </sql>
  150. <select id="get" resultMap="bisInspQaScoreSdResultMap" parameterType="String" >
  151. select <include refid="table_columns" /> from BIS_INSP_QA_SCORE_SD where RGSTR_ID = #{id}
  152. </select>
  153. <select id="getBy" resultMap="bisInspQaScoreSdResultMap">
  154. select <include refid="table_columns" /> from BIS_INSP_QA_SCORE_SD <include refid="page_where" />
  155. </select>
  156. <select id="findAll" resultMap="bisInspQaScoreSdResultMap">
  157. select <include refid="table_columns" /> from BIS_INSP_QA_SCORE_SD
  158. </select>
  159. <select id="findList" resultMap="bisInspQaScoreSdResultMap">
  160. select <include refid="table_columns" /> from BIS_INSP_QA_SCORE_SD <include refid="page_where" />
  161. </select>
  162. <select id="selectCount" resultType="int" >
  163. select count(ID) from BIS_INSP_QA_SCORE_SD <include refid="page_where" />
  164. </select>
  165. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspQaScoreSd">
  166. insert into BIS_INSP_QA_SCORE_SD( <include refid="table_columns" /> )
  167. values ( <include refid="entity_properties" /> )
  168. </insert>
  169. <delete id="delete" parameterType="java.lang.String">
  170. update BIS_INSP_QA_SCORE_SD set DATA_STAT='9' where ID = #{id}
  171. </delete>
  172. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspQaScoreSd">
  173. delete from BIS_INSP_QA_SCORE_SD <include refid="page_where" />
  174. </delete>
  175. <update id="deleteInFlag" parameterType="java.lang.String">
  176. update BIS_INSP_QA_SCORE_SD set flag_valid = 0 where ID = #{id}
  177. </update>
  178. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspQaScoreSd">
  179. update BIS_INSP_QA_SCORE_SD
  180. <trim prefix="set" suffixOverrides=",">
  181. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  182. <if test="qaMgr != null">QA_MGR = #{qaMgr},</if>
  183. <if test="qaDst != null">QA_DST = #{qaDst},</if>
  184. <if test="qaNewEta != null">QA_NEW_ETA = #{qaNewEta},</if>
  185. <if test="qaZrr != null">QA_ZRR = #{qaZrr},</if>
  186. <if test="qaBuld != null">QA_BULD = #{qaBuld},</if>
  187. <if test="qaGzyd != null">QA_GZYD = #{qaGzyd},</if>
  188. <if test="qaZgls != null">QA_ZGLS = #{qaZgls},</if>
  189. <if test="qaJdsq != null">QA_JDSQ = #{qaJdsq},</if>
  190. <if test="qaGzjh != null">QA_GZJH = #{qaGzjh},</if>
  191. <if test="qaXmhf != null">QA_XMHF = #{qaXmhf},</if>
  192. <if test="qaPdbz != null">QA_PDBZ = #{qaPdbz},</if>
  193. <if test="qaZzqk != null">QA_ZZQK = #{qaZzqk},</if>
  194. <if test="qaJlqk != null">QA_JLQK = #{qaJlqk},</if>
  195. <if test="qaYxqk != null">QA_YXQK = #{qaYxqk},</if>
  196. <if test="qaJdjc != null">QA_JDJC = #{qaJdjc},</if>
  197. <if test="qaZljl != null">QA_ZLJL = #{qaZljl},</if>
  198. <if test="qaWtcl != null">QA_WTCL = #{qaWtcl},</if>
  199. <if test="qaZszrz != null">QA_ZSZRZ = #{qaZszrz},</if>
  200. <if test="qaZdbg != null">QA_ZDBG = #{qaZdbg},</if>
  201. <if test="qaJdda != null">QA_JDDA = #{qaJdda},</if>
  202. <if test="qaJbts != null">QA_JBTS = #{qaJbts},</if>
  203. <if test="qaFwxw != null">QA_FWXW = #{qaFwxw},</if>
  204. <if test="qaGlxxh != null">QA_GLXXH = #{qaGlxxh},</if>
  205. <if test="qaSpts != null">QA_SPTS = #{qaSpts},</if>
  206. <if test="total != null">TOTAL = #{total},</if>
  207. <if test="subTotal != null">SUB_TOTAL = #{subTotal},</if>
  208. <if test="addTotal != null">ADD_TOTAL = #{addTotal},</if>
  209. <if test="note != null and note != ''">NOTE = #{note},</if>
  210. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  211. <if test="intm != null">INTM = #{intm},</if>
  212. <if test="uptm != null">UPTM = #{uptm},</if>
  213. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  214. </trim>
  215. <where>ID = #{id}</where>
  216. </update>
  217. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspQaScoreSd">
  218. update BIS_INSP_QA_SCORE_SD
  219. <trim prefix="set" suffixOverrides=",">
  220. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  221. <if test="qaMgr != null and qaMgr != ''">QA_MGR = #{qaMgr},</if>
  222. <if test="qaDst != null and qaDst != ''">QA_DST = #{qaDst},</if>
  223. <if test="qaNewEta != null and qaNewEta != ''">QA_NEW_ETA = #{qaNewEta},</if>
  224. <if test="qaZrr != null and qaZrr != ''">QA_ZRR = #{qaZrr},</if>
  225. <if test="qaBuld != null and qaBuld != ''">QA_BULD = #{qaBuld},</if>
  226. <if test="qaGzyd != null and qaGzyd != ''">QA_GZYD = #{qaGzyd},</if>
  227. <if test="qaZgls != null and qaZgls != ''">QA_ZGLS = #{qaZgls},</if>
  228. <if test="qaJdsq != null and qaJdsq != ''">QA_JDSQ = #{qaJdsq},</if>
  229. <if test="qaGzjh != null and qaGzjh != ''">QA_GZJH = #{qaGzjh},</if>
  230. <if test="qaXmhf != null and qaXmhf != ''">QA_XMHF = #{qaXmhf},</if>
  231. <if test="qaPdbz != null and qaPdbz != ''">QA_PDBZ = #{qaPdbz},</if>
  232. <if test="qaZzqk != null and qaZzqk != ''">QA_ZZQK = #{qaZzqk},</if>
  233. <if test="qaJlqk != null and qaJlqk != ''">QA_JLQK = #{qaJlqk},</if>
  234. <if test="qaYxqk != null and qaYxqk != ''">QA_YXQK = #{qaYxqk},</if>
  235. <if test="qaJdjc != null and qaJdjc != ''">QA_JDJC = #{qaJdjc},</if>
  236. <if test="qaZljl != null and qaZljl != ''">QA_ZLJL = #{qaZljl},</if>
  237. <if test="qaWtcl != null and qaWtcl != ''">QA_WTCL = #{qaWtcl},</if>
  238. <if test="qaZszrz != null and qaZszrz != ''">QA_ZSZRZ = #{qaZszrz},</if>
  239. <if test="qaZdbg != null and qaZdbg != ''">QA_ZDBG = #{qaZdbg},</if>
  240. <if test="qaJdda != null and qaJdda != ''">QA_JDDA = #{qaJdda},</if>
  241. <if test="qaJbts != null and qaJbts != ''">QA_JBTS = #{qaJbts},</if>
  242. <if test="qaFwxw != null and qaFwxw != ''">QA_FWXW = #{qaFwxw},</if>
  243. <if test="qaGlxxh != null and qaGlxxh != ''">QA_GLXXH = #{qaGlxxh},</if>
  244. <if test="qaSpts != null and qaSpts != ''">QA_SPTS = #{qaSpts},</if>
  245. <if test="total != null and total != ''">TOTAL = #{total},</if>
  246. <if test="subTotal != null and subTotal != ''">SUB_TOTAL = #{subTotal},</if>
  247. <if test="addTotal != null and addTotal != ''">ADD_TOTAL = #{addTotal},</if>
  248. <if test="note != null and note != ''">NOTE = #{note},</if>
  249. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  250. <if test="intm != null">INTM = #{intm},</if>
  251. <if test="uptm != null">UPTM = #{uptm},</if>
  252. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  253. </trim>
  254. <include refid="page_where" />
  255. </update>
  256. <!-- 其他自定义SQL -->
  257. </mapper>