227a098d2e80c2f7c6336ce5934330dfcda3df5a.svn-base 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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.TacPawpBstocmCpssDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpBstocmCpss" id="tacPawpBstocmCpssResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="cpssId" column="CPSS_ID"/>
  7. <result property="spvsnUnit" column="SPVSN_UNIT"/>
  8. <result property="unitNames" column="unit_Names"/>
  9. <result property="sSpvsnOrg" column="S_SPVSN_ORG"/>
  10. <result property="supvsSum" column="SUPVS_SUM"/>
  11. <result property="drctNum" column="DRCT_NUM"/>
  12. <result property="dptDrctNum" column="DPT_DRCT_NUM"/>
  13. <result property="spvsNgnerNum" column="SPVS_NGNER_NUM"/>
  14. <result property="inspctNum" column="INSPCT_NUM"/>
  15. <result property="othNum" column="OTH_NUM"/>
  16. <result property="spwacodNum" column="SPWACOD_NUM"/>
  17. <result property="spwacodDuty" column="SPWACOD_DUTY"/>
  18. <result property="wprIsFmlt" column="WPR_IS_FMLT"/>
  19. <result property="wprIsCmplnc" column="WPR_IS_CMPLNC"/>
  20. <result property="swsIsFmlt" column="SWS_IS_FMLT"/>
  21. <result property="swsIsCmplnc" column="SWS_IS_CMPLNC"/>
  22. <result property="spvsnPlFmlt" column="SPVSN_PL_FMLT"/>
  23. <result property="spvsnPlCmplnc" column="SPVSN_PL_CMPLNC"/>
  24. <result property="sedrIsPrpre" column="SEDR_IS_PRPRE"/>
  25. <result property="sedrIsCmplnc" column="SEDR_IS_CMPLNC"/>
  26. <result property="spvsnLogIsFill" column="SPVSN_LOG_IS_FILL"/>
  27. <result property="spvsnLogIsCmplnc" column="SPVSN_LOG_IS_CMPLNC"/>
  28. <result property="ssrIsFill" column="SSR_IS_FILL"/>
  29. <result property="ssrIsCmplnc" column="SSR_IS_CMPLNC"/>
  30. <result property="tsmrIsPrpre" column="TSMR_IS_PRPRE"/>
  31. <result property="tsmrIsCmplnc" column="TSMR_IS_CMPLNC"/>
  32. <result property="spvsnMtIsHold" column="SPVSN_MT_IS_HOLD"/>
  33. <result property="spvsnMtIsCmplnc" column="SPVSN_MT_IS_CMPLNC"/>
  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. <result property="unitNames" column="unit_Names"/>
  40. <result property="sctnId" column="SCTN_ID"/>
  41. <result property="sn" column="SN"/>
  42. <result property="spvsnSctn" column="SPVSN_SCTN"/>
  43. </resultMap>
  44. <sql id="table_columns">
  45. ID,SPVSN_SCTN,
  46. CPSS_ID,
  47. SPVSN_UNIT,
  48. S_SPVSN_ORG,
  49. SUPVS_SUM,
  50. DRCT_NUM,
  51. DPT_DRCT_NUM,
  52. SPVS_NGNER_NUM,
  53. INSPCT_NUM,
  54. OTH_NUM,
  55. SPWACOD_NUM,
  56. SPWACOD_DUTY,
  57. WPR_IS_FMLT,
  58. WPR_IS_CMPLNC,
  59. SWS_IS_FMLT,
  60. SWS_IS_CMPLNC,
  61. SPVSN_PL_FMLT,
  62. SPVSN_PL_CMPLNC,
  63. SEDR_IS_PRPRE,
  64. SEDR_IS_CMPLNC,
  65. SPVSN_LOG_IS_FILL,
  66. SPVSN_LOG_IS_CMPLNC,
  67. SSR_IS_FILL,
  68. SSR_IS_CMPLNC,
  69. TSMR_IS_PRPRE,
  70. TSMR_IS_CMPLNC,
  71. SPVSN_MT_IS_HOLD,
  72. SPVSN_MT_IS_CMPLNC,
  73. NOTE,
  74. PERS_ID,
  75. INTM,
  76. UPTM,
  77. DATA_STAT,unit_Names,SCTN_ID,SN
  78. </sql>
  79. <sql id="entity_properties">
  80. #{id},#{spvsnSctn},
  81. #{cpssId},
  82. #{spvsnUnit},
  83. #{sSpvsnOrg},
  84. #{supvsSum},
  85. #{drctNum},
  86. #{dptDrctNum},
  87. #{spvsNgnerNum},
  88. #{inspctNum},
  89. #{othNum},
  90. #{spwacodNum},
  91. #{spwacodDuty},
  92. #{wprIsFmlt},
  93. #{wprIsCmplnc},
  94. #{swsIsFmlt},
  95. #{swsIsCmplnc},
  96. #{spvsnPlFmlt},
  97. #{spvsnPlCmplnc},
  98. #{sedrIsPrpre},
  99. #{sedrIsCmplnc},
  100. #{spvsnLogIsFill},
  101. #{spvsnLogIsCmplnc},
  102. #{ssrIsFill},
  103. #{ssrIsCmplnc},
  104. #{tsmrIsPrpre},
  105. #{tsmrIsCmplnc},
  106. #{spvsnMtIsHold},
  107. #{spvsnMtIsCmplnc},
  108. #{note},
  109. #{persId},
  110. #{intm},
  111. #{uptm},
  112. #{dataStat},#{unitNames},#{sctnId},#{sn}
  113. </sql>
  114. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  115. <sql id="page_where">
  116. <trim prefix="where" prefixOverrides="and | or ">
  117. <if test="cpssId != null and cpssId != ''">and cpss_Id = #{cpssId}</if>
  118. <if test="spvsnSctn != null and spvsnSctn != ''">and spvsn_Sctn = #{spvsnSctn}</if>
  119. <if test="spvsnUnit != null and spvsnUnit != ''">and SPVSN_UNIT like '%${spvsnUnit}%'</if>
  120. <if test="sSpvsnOrg != null and sSpvsnOrg != ''">and S_SPVSN_ORG like '%${sSpvsnOrg}%'</if>
  121. <if test="supvsSum != null and supvsSum != ''">and SUPVS_SUM = #{supvsSum}</if>
  122. <if test="drctNum != null and drctNum != ''">and DRCT_NUM = #{drctNum}</if>
  123. <if test="dptDrctNum != null and dptDrctNum != ''">and DPT_DRCT_NUM = #{dptDrctNum}</if>
  124. <if test="spvsNgnerNum != null and spvsNgnerNum != ''">and SPVS_NGNER_NUM = #{spvsNgnerNum}</if>
  125. <if test="inspctNum != null and inspctNum != ''">and INSPCT_NUM = #{inspctNum}</if>
  126. <if test="othNum != null and othNum != ''">and OTH_NUM = #{othNum}</if>
  127. <if test="spwacodNum != null and spwacodNum != ''">and SPWACOD_NUM = #{spwacodNum}</if>
  128. <if test="spwacodDuty != null and spwacodDuty != ''">and SPWACOD_DUTY = #{spwacodDuty}</if>
  129. <if test="wprIsFmlt != null and wprIsFmlt != ''">and WPR_IS_FMLT = #{wprIsFmlt}</if>
  130. <if test="wprIsCmplnc != null and wprIsCmplnc != ''">and WPR_IS_CMPLNC = #{wprIsCmplnc}</if>
  131. <if test="swsIsFmlt != null and swsIsFmlt != ''">and SWS_IS_FMLT = #{swsIsFmlt}</if>
  132. <if test="swsIsCmplnc != null and swsIsCmplnc != ''">and SWS_IS_CMPLNC = #{swsIsCmplnc}</if>
  133. <if test="spvsnPlFmlt != null and spvsnPlFmlt != ''">and SPVSN_PL_FMLT = #{spvsnPlFmlt}</if>
  134. <if test="spvsnPlCmplnc != null and spvsnPlCmplnc != ''">and SPVSN_PL_CMPLNC = #{spvsnPlCmplnc}</if>
  135. <if test="sedrIsPrpre != null and sedrIsPrpre != ''">and SEDR_IS_PRPRE = #{sedrIsPrpre}</if>
  136. <if test="sedrIsCmplnc != null and sedrIsCmplnc != ''">and SEDR_IS_CMPLNC = #{sedrIsCmplnc}</if>
  137. <if test="spvsnLogIsFill != null and spvsnLogIsFill != ''">and SPVSN_LOG_IS_FILL = #{spvsnLogIsFill}</if>
  138. <if test="spvsnLogIsCmplnc != null and spvsnLogIsCmplnc != ''">and SPVSN_LOG_IS_CMPLNC =
  139. #{spvsnLogIsCmplnc}
  140. </if>
  141. <if test="ssrIsFill != null and ssrIsFill != ''">and SSR_IS_FILL = #{ssrIsFill}</if>
  142. <if test="ssrIsCmplnc != null and ssrIsCmplnc != ''">and SSR_IS_CMPLNC = #{ssrIsCmplnc}</if>
  143. <if test="tsmrIsPrpre != null and tsmrIsPrpre != ''">and TSMR_IS_PRPRE = #{tsmrIsPrpre}</if>
  144. <if test="tsmrIsCmplnc != null and tsmrIsCmplnc != ''">and TSMR_IS_CMPLNC = #{tsmrIsCmplnc}</if>
  145. <if test="spvsnMtIsHold != null and spvsnMtIsHold != ''">and SPVSN_MT_IS_HOLD = #{spvsnMtIsHold}</if>
  146. <if test="spvsnMtIsCmplnc != null and spvsnMtIsCmplnc != ''">and SPVSN_MT_IS_CMPLNC = #{spvsnMtIsCmplnc}
  147. </if>
  148. <if test="note != null and note != ''">and NOTE = #{note}</if>
  149. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  150. <if test="intm != null">and INTM = #{intm}</if>
  151. <if test="uptm != null">and UPTM = #{uptm}</if>
  152. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  153. <if test="unitNames != null and unitNames != ''">and unit_Names like '%${unitNames}%'</if>
  154. <if test="sctnId != null and sctnId != ''">and sctnId = #{sctnId}</if>
  155. <if test="sn != null">and SN = #{sn}</if>
  156. </trim>
  157. </sql>
  158. <select id="get" resultMap="tacPawpBstocmCpssResultMap" parameterType="String">
  159. select
  160. <include refid="table_columns"/>
  161. from TAC_PAWP_BSTOCM_CPSS where ID = #{id}
  162. </select>
  163. <select id="getBy" resultMap="tacPawpBstocmCpssResultMap">
  164. select
  165. <include refid="table_columns"/>
  166. from TAC_PAWP_BSTOCM_CPSS
  167. <include refid="page_where"/>
  168. </select>
  169. <select id="findAll" resultMap="tacPawpBstocmCpssResultMap">
  170. select
  171. <include refid="table_columns"/>
  172. from TAC_PAWP_BSTOCM_CPSS
  173. </select>
  174. <select id="findList" resultMap="tacPawpBstocmCpssResultMap">
  175. select
  176. <include refid="table_columns"/>
  177. from TAC_PAWP_BSTOCM_CPSS
  178. <include refid="page_where"/>
  179. </select>
  180. <select id="selectCount" resultType="int">
  181. select count(ID) from TAC_PAWP_BSTOCM_CPSS
  182. <include refid="page_where"/>
  183. </select>
  184. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmCpss">
  185. insert into TAC_PAWP_BSTOCM_CPSS(
  186. <include refid="table_columns"/>
  187. )
  188. values (
  189. <include refid="entity_properties"/>
  190. )
  191. </insert>
  192. <delete id="delete" parameterType="java.lang.String">
  193. delete from TAC_PAWP_BSTOCM_CPSS where ID = #{id}
  194. </delete>
  195. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmCpss">
  196. delete from TAC_PAWP_BSTOCM_CPSS
  197. <include refid="page_where"/>
  198. </delete>
  199. <update id="deleteInFlag" parameterType="java.lang.String">
  200. update TAC_PAWP_BSTOCM_CPSS set flag_valid = 0 where ID = #{id}
  201. </update>
  202. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmCpss">
  203. update TAC_PAWP_BSTOCM_CPSS
  204. <trim prefix="set" suffixOverrides=",">
  205. <if test="cpssId != null and cpssId != ''">cpss_Id = #{cpssId},</if>
  206. <if test="spvsnUnit != null and spvsnUnit != ''">SPVSN_UNIT = #{spvsnUnit},</if>
  207. <if test="unitNames != null and unitNames != ''">unit_Names = #{unitNames},</if>
  208. <if test="sSpvsnOrg != null and sSpvsnOrg != ''">S_SPVSN_ORG = #{sSpvsnOrg},</if>
  209. <if test="spvsnSctn != null and spvsnSctn != ''">spvsn_Sctn = #{spvsnSctn},</if>
  210. <if test="supvsSum != null">SUPVS_SUM = #{supvsSum},</if>
  211. <if test="drctNum != null">DRCT_NUM = #{drctNum},</if>
  212. <if test="dptDrctNum != null">DPT_DRCT_NUM = #{dptDrctNum},</if>
  213. <if test="spvsNgnerNum != null">SPVS_NGNER_NUM = #{spvsNgnerNum},</if>
  214. <if test="inspctNum != null">INSPCT_NUM = #{inspctNum},</if>
  215. <if test="othNum != null">OTH_NUM = #{othNum},</if>
  216. <if test="spwacodNum != null">SPWACOD_NUM = #{spwacodNum},</if>
  217. <if test="spwacodDuty != null">SPWACOD_DUTY = #{spwacodDuty},</if>
  218. <if test="wprIsFmlt != null and wprIsFmlt != ''">WPR_IS_FMLT = #{wprIsFmlt},</if>
  219. <if test="wprIsCmplnc != null and wprIsCmplnc != ''">WPR_IS_CMPLNC = #{wprIsCmplnc},</if>
  220. <if test="swsIsFmlt != null and swsIsFmlt != ''">SWS_IS_FMLT = #{swsIsFmlt},</if>
  221. <if test="swsIsCmplnc != null and swsIsCmplnc != ''">SWS_IS_CMPLNC = #{swsIsCmplnc},</if>
  222. <if test="spvsnPlFmlt != null and spvsnPlFmlt != ''">SPVSN_PL_FMLT = #{spvsnPlFmlt},</if>
  223. <if test="spvsnPlCmplnc != null and spvsnPlCmplnc != ''">SPVSN_PL_CMPLNC = #{spvsnPlCmplnc},</if>
  224. <if test="sedrIsPrpre != null and sedrIsPrpre != ''">SEDR_IS_PRPRE = #{sedrIsPrpre},</if>
  225. <if test="sedrIsCmplnc != null and sedrIsCmplnc != ''">SEDR_IS_CMPLNC = #{sedrIsCmplnc},</if>
  226. <if test="spvsnLogIsFill != null and spvsnLogIsFill != ''">SPVSN_LOG_IS_FILL = #{spvsnLogIsFill},</if>
  227. <if test="spvsnLogIsCmplnc != null and spvsnLogIsCmplnc != ''">SPVSN_LOG_IS_CMPLNC = #{spvsnLogIsCmplnc},
  228. </if>
  229. <if test="ssrIsFill != null and ssrIsFill != ''">SSR_IS_FILL = #{ssrIsFill},</if>
  230. <if test="ssrIsCmplnc != null and ssrIsCmplnc != ''">SSR_IS_CMPLNC = #{ssrIsCmplnc},</if>
  231. <if test="tsmrIsPrpre != null and tsmrIsPrpre != ''">TSMR_IS_PRPRE = #{tsmrIsPrpre},</if>
  232. <if test="tsmrIsCmplnc != null and tsmrIsCmplnc != ''">TSMR_IS_CMPLNC = #{tsmrIsCmplnc},</if>
  233. <if test="spvsnMtIsHold != null and spvsnMtIsHold != ''">SPVSN_MT_IS_HOLD = #{spvsnMtIsHold},</if>
  234. <if test="spvsnMtIsCmplnc != null and spvsnMtIsCmplnc != ''">SPVSN_MT_IS_CMPLNC = #{spvsnMtIsCmplnc},</if>
  235. <if test="note != null">NOTE = #{note},</if>
  236. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  237. <if test="intm != null">INTM = #{intm},</if>
  238. <if test="uptm != null">UPTM = #{uptm},</if>
  239. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  240. <if test="sctnId != null">SCTN_ID = #{sctnId},</if>
  241. <if test="sn != null">SN = #{sn},</if>
  242. </trim>
  243. <where>ID = #{id}</where>
  244. </update>
  245. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmCpss">
  246. update TAC_PAWP_BSTOCM_CPSS
  247. <trim prefix="set" suffixOverrides=",">
  248. <if test="cpssId != null and cpssId != ''">cpss_Id = #{cpssId},</if>
  249. <if test="spvsnUnit != null and spvsnUnit != ''">SPVSN_UNIT = #{spvsnUnit},</if>
  250. <if test="unitNames != null and unitNames != ''">unit_Names = #{unitNames},</if>
  251. <if test="sSpvsnOrg != null and sSpvsnOrg != ''">S_SPVSN_ORG = #{sSpvsnOrg},</if>
  252. <if test="spvsnSctn != null and spvsnSctn != ''">spvsn_Sctn = #{spvsnSctn},</if>
  253. <if test="supvsSum != null">SUPVS_SUM = #{supvsSum},</if>
  254. <if test="drctNum != null">DRCT_NUM = #{drctNum},</if>
  255. <if test="dptDrctNum != null">DPT_DRCT_NUM = #{dptDrctNum},</if>
  256. <if test="spvsNgnerNum != null">SPVS_NGNER_NUM = #{spvsNgnerNum},</if>
  257. <if test="inspctNum != null">INSPCT_NUM = #{inspctNum},</if>
  258. <if test="othNum != null">OTH_NUM = #{othNum},</if>
  259. <if test="spwacodNum != null">SPWACOD_NUM = #{spwacodNum},</if>
  260. <if test="spwacodDuty != null">SPWACOD_DUTY = #{spwacodDuty},</if>
  261. <if test="wprIsFmlt != null and wprIsFmlt != ''">WPR_IS_FMLT = #{wprIsFmlt},</if>
  262. <if test="wprIsCmplnc != null and wprIsCmplnc != ''">WPR_IS_CMPLNC = #{wprIsCmplnc},</if>
  263. <if test="swsIsFmlt != null and swsIsFmlt != ''">SWS_IS_FMLT = #{swsIsFmlt},</if>
  264. <if test="swsIsCmplnc != null and swsIsCmplnc != ''">SWS_IS_CMPLNC = #{swsIsCmplnc},</if>
  265. <if test="spvsnPlFmlt != null and spvsnPlFmlt != ''">SPVSN_PL_FMLT = #{spvsnPlFmlt},</if>
  266. <if test="spvsnPlCmplnc != null and spvsnPlCmplnc != ''">SPVSN_PL_CMPLNC = #{spvsnPlCmplnc},</if>
  267. <if test="sedrIsPrpre != null and sedrIsPrpre != ''">SEDR_IS_PRPRE = #{sedrIsPrpre},</if>
  268. <if test="sedrIsCmplnc != null and sedrIsCmplnc != ''">SEDR_IS_CMPLNC = #{sedrIsCmplnc},</if>
  269. <if test="spvsnLogIsFill != null and spvsnLogIsFill != ''">SPVSN_LOG_IS_FILL = #{spvsnLogIsFill},</if>
  270. <if test="spvsnLogIsCmplnc != null and spvsnLogIsCmplnc != ''">SPVSN_LOG_IS_CMPLNC = #{spvsnLogIsCmplnc},
  271. </if>
  272. <if test="ssrIsFill != null and ssrIsFill != ''">SSR_IS_FILL = #{ssrIsFill},</if>
  273. <if test="ssrIsCmplnc != null and ssrIsCmplnc != ''">SSR_IS_CMPLNC = #{ssrIsCmplnc},</if>
  274. <if test="tsmrIsPrpre != null and tsmrIsPrpre != ''">TSMR_IS_PRPRE = #{tsmrIsPrpre},</if>
  275. <if test="tsmrIsCmplnc != null and tsmrIsCmplnc != ''">TSMR_IS_CMPLNC = #{tsmrIsCmplnc},</if>
  276. <if test="spvsnMtIsHold != null and spvsnMtIsHold != ''">SPVSN_MT_IS_HOLD = #{spvsnMtIsHold},</if>
  277. <if test="spvsnMtIsCmplnc != null and spvsnMtIsCmplnc != ''">SPVSN_MT_IS_CMPLNC = #{spvsnMtIsCmplnc},</if>
  278. <if test="note != null">NOTE = #{note},</if>
  279. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  280. <if test="intm != null">INTM = #{intm},</if>
  281. <if test="uptm != null">UPTM = #{uptm},</if>
  282. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  283. <if test="sctnId != null">SCTN_ID = #{sctnId},</if>
  284. <if test="sn != null">SN = #{sn},</if>
  285. </trim>
  286. <include refid="page_where"/>
  287. </update>
  288. <!-- 其他自定义SQL -->
  289. </mapper>