BisInspSvwtqhChkDao.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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.BisInspSvwtqhChkDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspSvwtqhChk" id="bisInspSvwtqhChkResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isInPlan" column="IS_IN_PLAN"/>
  8. <result property="chkYear" column="CHK_YEAR"/>
  9. <result property="isMakApp" column="IS_MAK_APP"/>
  10. <result property="isBuldGroup" column="IS_BULD_GROUP"/>
  11. <result property="isCompTarget" column="IS_COMP_TARGET"/>
  12. <result property="buldNote" column="BULD_NOTE"/>
  13. <result property="isRunNorm" column="IS_RUN_NORM"/>
  14. <result property="persId" column="PERS_ID"/>
  15. <result property="intm" column="INTM"/>
  16. <result property="uptm" column="UPTM"/>
  17. <result property="note" column="NOTE"/>
  18. <result property="dataStat" column="DATA_STAT"/>
  19. </resultMap>
  20. <sql id="table_columns">
  21. ID,
  22. RGSTR_ID,
  23. IS_IN_PLAN,
  24. CHK_YEAR,
  25. IS_MAK_APP,
  26. IS_BULD_GROUP,
  27. IS_COMP_TARGET,
  28. BULD_NOTE,
  29. IS_RUN_NORM,
  30. PERS_ID,
  31. INTM,
  32. UPTM,
  33. NOTE,
  34. DATA_STAT
  35. </sql>
  36. <sql id="entity_properties">
  37. #{id},
  38. #{rgstrId},
  39. #{isInPlan},
  40. #{chkYear},
  41. #{isMakApp},
  42. #{isBuldGroup},
  43. #{isCompTarget},
  44. #{buldNote},
  45. #{isRunNorm},
  46. #{persId},
  47. #{intm},
  48. #{uptm},
  49. #{note},
  50. #{dataStat}
  51. </sql>
  52. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  53. <sql id="page_where">
  54. <trim prefix="where" prefixOverrides="and | or ">
  55. <if test="rgstrId != null and rgstrId != ''">
  56. and RGSTR_ID = #{rgstrId}
  57. </if>
  58. <if test="isInPlan != null and isInPlan != ''">
  59. and IS_IN_PLAN = #{isInPlan}
  60. </if>
  61. <if test="chkYear != null and chkYear != ''">
  62. and CHK_YEAR = #{chkYear}
  63. </if>
  64. <if test="isMakApp != null and isMakApp != ''">
  65. and IS_MAK_APP = #{isMakApp}
  66. </if>
  67. <if test="isBuldGroup != null and isBuldGroup != ''">
  68. and IS_BULD_GROUP = #{isBuldGroup}
  69. </if>
  70. <if test="isCompTarget != null and isCompTarget != ''">
  71. and IS_COMP_TARGET = #{isCompTarget}
  72. </if>
  73. <if test="buldNote != null and buldNote != ''">
  74. and BULD_NOTE = #{buldNote}
  75. </if>
  76. <if test="isRunNorm != null and isRunNorm != ''">
  77. and IS_RUN_NORM = #{isRunNorm}
  78. </if>
  79. <if test="persId != null and persId != ''">
  80. and PERS_ID = #{persId}
  81. </if>
  82. <if test="intm != null">
  83. and INTM = #{intm}
  84. </if>
  85. <if test="uptm != null">
  86. and UPTM = #{uptm}
  87. </if>
  88. <if test="note != null and note != ''">
  89. and NOTE = #{note}
  90. </if>
  91. <if test="dataStat != null and dataStat != ''">
  92. and DATA_STAT = #{dataStat}
  93. </if>
  94. and DATA_STAT='0'
  95. </trim>
  96. </sql>
  97. <select id="get" resultMap="bisInspSvwtqhChkResultMap" parameterType="String">
  98. select
  99. <include refid="table_columns"/>
  100. from BIS_INSP_SVWTQH_CHK where RGSTR_ID = #{id}
  101. </select>
  102. <select id="getBy" resultMap="bisInspSvwtqhChkResultMap">
  103. select
  104. <include refid="table_columns"/>
  105. from BIS_INSP_SVWTQH_CHK
  106. <include refid="page_where"/>
  107. </select>
  108. <select id="findAll" resultMap="bisInspSvwtqhChkResultMap">
  109. select
  110. <include refid="table_columns"/>
  111. from BIS_INSP_SVWTQH_CHK
  112. </select>
  113. <select id="findList" resultMap="bisInspSvwtqhChkResultMap">
  114. select
  115. <include refid="table_columns"/>
  116. from BIS_INSP_SVWTQH_CHK
  117. <include refid="page_where"/>
  118. </select>
  119. <select id="selectCount" resultType="int">
  120. select count(ID) from BIS_INSP_SVWTQH_CHK
  121. <include refid="page_where"/>
  122. </select>
  123. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtqhChk">
  124. insert into BIS_INSP_SVWTQH_CHK(
  125. <include refid="table_columns"/>
  126. )
  127. values (
  128. <include refid="entity_properties"/>
  129. )
  130. </insert>
  131. <delete id="delete" parameterType="java.lang.String">
  132. update BIS_INSP_SVWTQH_CHK set DATA_STAT='9' where ID = #{id}
  133. </delete>
  134. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtqhChk">
  135. update BIS_INSP_SVWTQH_CHK set DATA_STAT='9'
  136. <include refid="page_where"/>
  137. </delete>
  138. <update id="deleteInFlag" parameterType="java.lang.String">
  139. update BIS_INSP_SVWTQH_CHK set DATA_STAT = '9' where ID = #{id}
  140. </update>
  141. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtqhChk">
  142. update BIS_INSP_SVWTQH_CHK
  143. <trim prefix="set" suffixOverrides=",">
  144. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  145. = #{rgstrId},
  146. </if>
  147. <if test="isInPlan != null and isInPlan != ''">IS_IN_PLAN
  148. = #{isInPlan},
  149. </if>
  150. <if test="chkYear != null and chkYear != ''">CHK_YEAR
  151. = #{chkYear},
  152. </if>
  153. <if test="isMakApp != null and isMakApp != ''">IS_MAK_APP
  154. = #{isMakApp},
  155. </if>
  156. <if test="isBuldGroup != null and isBuldGroup != ''">IS_BULD_GROUP
  157. = #{isBuldGroup},
  158. </if>
  159. <if test="isCompTarget != null and isCompTarget != ''">IS_COMP_TARGET
  160. = #{isCompTarget},
  161. </if>
  162. <if test="buldNote != null and buldNote != ''">BULD_NOTE
  163. = #{buldNote},
  164. </if>
  165. <if test="isRunNorm != null and isRunNorm != ''">IS_RUN_NORM
  166. = #{isRunNorm},
  167. </if>
  168. <if test="persId != null and persId != ''">PERS_ID
  169. = #{persId},
  170. </if>
  171. <if test="intm != null">INTM
  172. = #{intm},
  173. </if>
  174. <if test="uptm != null">UPTM
  175. = #{uptm},
  176. </if>
  177. <if test="note != null and note != ''">NOTE
  178. = #{note},
  179. </if>
  180. <if test="dataStat != null and dataStat != ''">DATA_STAT
  181. = #{dataStat},
  182. </if>
  183. </trim>
  184. <where>ID = #{id}</where>
  185. </update>
  186. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtqhChk">
  187. update BIS_INSP_SVWTQH_CHK
  188. <trim prefix="set" suffixOverrides=",">
  189. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  190. = #{rgstrId},
  191. </if>
  192. <if test="isInPlan != null and isInPlan != ''">IS_IN_PLAN
  193. = #{isInPlan},
  194. </if>
  195. <if test="chkYear != null and chkYear != ''">CHK_YEAR
  196. = #{chkYear},
  197. </if>
  198. <if test="isMakApp != null and isMakApp != ''">IS_MAK_APP
  199. = #{isMakApp},
  200. </if>
  201. <if test="isBuldGroup != null and isBuldGroup != ''">IS_BULD_GROUP
  202. = #{isBuldGroup},
  203. </if>
  204. <if test="isCompTarget != null and isCompTarget != ''">IS_COMP_TARGET
  205. = #{isCompTarget},
  206. </if>
  207. <if test="buldNote != null and buldNote != ''">BULD_NOTE
  208. = #{buldNote},
  209. </if>
  210. <if test="isRunNorm != null and isRunNorm != ''">IS_RUN_NORM
  211. = #{isRunNorm},
  212. </if>
  213. <if test="persId != null and persId != ''">PERS_ID
  214. = #{persId},
  215. </if>
  216. <if test="intm != null">INTM
  217. = #{intm},
  218. </if>
  219. <if test="uptm != null">UPTM
  220. = #{uptm},
  221. </if>
  222. <if test="note != null and note != ''">NOTE
  223. = #{note},
  224. </if>
  225. <if test="dataStat != null and dataStat != ''">DATA_STAT
  226. = #{dataStat},
  227. </if>
  228. </trim>
  229. <include refid="page_where"/>
  230. </update>
  231. <!-- 其他自定义SQL -->
  232. </mapper>