BisInspYnDrdmpSystemDao.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  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.BisInspYnDrdmpSystemDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSystem" id="bisInspYnDrdmpSystemResultMap">
  5. <result property="impLeadNote" column="IMP_LEAD_NOTE"/>
  6. <result property="persId" column="PERS_ID"/>
  7. <result property="intm" column="INTM"/>
  8. <result property="uptm" column="UPTM"/>
  9. <result property="state" column="STATE"/>
  10. <result property="dataStat" column="DATA_STAT"/>
  11. <result property="id" column="ID"/>
  12. <result property="rgstrId" column="RGSTR_ID"/>
  13. <result property="isLearn" column="IS_LEARN"/>
  14. <result property="learnNote" column="LEARN_NOTE"/>
  15. <result property="isOrgLearn" column="IS_ORG_LEARN"/>
  16. <result property="orgLearNote" column="ORG_LEAR_NOTE"/>
  17. <result property="isImpFile" column="IS_IMP_FILE"/>
  18. <result property="impFileNote" column="IMP_FILE_NOTE"/>
  19. <result property="isImpPdc" column="IS_IMP_PDC"/>
  20. <result property="impPdcNote" column="IMP_PDC_NOTE"/>
  21. <result property="isImpAck" column="IS_IMP_ACK"/>
  22. <result property="impAckNote" column="IMP_ACK_NOTE"/>
  23. <result property="isImpPblm" column="IS_IMP_PBLM"/>
  24. <result property="impPblmNote" column="IMP_PBLM_NOTE"/>
  25. <result property="isImpOther" column="IS_IMP_OTHER"/>
  26. <result property="impOtherNote" column="IMP_OTHER_NOTE"/>
  27. <result property="isImpLead" column="IS_IMP_LEAD"/>
  28. </resultMap>
  29. <sql id="table_columns">
  30. IMP_LEAD_NOTE,
  31. PERS_ID,
  32. INTM,
  33. UPTM,
  34. STATE,
  35. DATA_STAT,
  36. ID,
  37. RGSTR_ID,
  38. IS_LEARN,
  39. LEARN_NOTE,
  40. IS_ORG_LEARN,
  41. ORG_LEAR_NOTE,
  42. IS_IMP_FILE,
  43. IMP_FILE_NOTE,
  44. IS_IMP_PDC,
  45. IMP_PDC_NOTE,
  46. IS_IMP_ACK,
  47. IMP_ACK_NOTE,
  48. IS_IMP_PBLM,
  49. IMP_PBLM_NOTE,
  50. IS_IMP_OTHER,
  51. IMP_OTHER_NOTE,
  52. IS_IMP_LEAD
  53. </sql>
  54. <sql id="entity_properties">
  55. #{impLeadNote},
  56. #{persId},
  57. #{intm},
  58. #{uptm},
  59. #{state},
  60. #{dataStat},
  61. #{id},
  62. #{rgstrId},
  63. #{isLearn},
  64. #{learnNote},
  65. #{isOrgLearn},
  66. #{orgLearNote},
  67. #{isImpFile},
  68. #{impFileNote},
  69. #{isImpPdc},
  70. #{impPdcNote},
  71. #{isImpAck},
  72. #{impAckNote},
  73. #{isImpPblm},
  74. #{impPblmNote},
  75. #{isImpOther},
  76. #{impOtherNote},
  77. #{isImpLead}
  78. </sql>
  79. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  80. <sql id="page_where">
  81. <trim prefix="where" prefixOverrides="and | or ">
  82. <if test="impLeadNote != null and impLeadNote != ''">
  83. and IMP_LEAD_NOTE = #{impLeadNote}
  84. </if>
  85. <if test="persId != null and persId != ''">
  86. and PERS_ID = #{persId}
  87. </if>
  88. <if test="intm != null">
  89. and INTM = #{intm}
  90. </if>
  91. <if test="uptm != null">
  92. and UPTM = #{uptm}
  93. </if>
  94. <if test="state != null and state != ''">
  95. and STATE = #{state}
  96. </if>
  97. <if test="dataStat != null and dataStat != ''">
  98. and DATA_STAT = #{dataStat}
  99. </if>
  100. <if test="rgstrId != null and rgstrId != ''">
  101. and RGSTR_ID = #{rgstrId}
  102. </if>
  103. <if test="isLearn != null and isLearn != ''">
  104. and IS_LEARN = #{isLearn}
  105. </if>
  106. <if test="learnNote != null and learnNote != ''">
  107. and LEARN_NOTE = #{learnNote}
  108. </if>
  109. <if test="isOrgLearn != null and isOrgLearn != ''">
  110. and IS_ORG_LEARN = #{isOrgLearn}
  111. </if>
  112. <if test="orgLearNote != null and orgLearNote != ''">
  113. and ORG_LEAR_NOTE = #{orgLearNote}
  114. </if>
  115. <if test="isImpFile != null and isImpFile != ''">
  116. and IS_IMP_FILE = #{isImpFile}
  117. </if>
  118. <if test="impFileNote != null and impFileNote != ''">
  119. and IMP_FILE_NOTE = #{impFileNote}
  120. </if>
  121. <if test="isImpPdc != null and isImpPdc != ''">
  122. and IS_IMP_PDC = #{isImpPdc}
  123. </if>
  124. <if test="impPdcNote != null and impPdcNote != ''">
  125. and IMP_PDC_NOTE = #{impPdcNote}
  126. </if>
  127. <if test="isImpAck != null and isImpAck != ''">
  128. and IS_IMP_ACK = #{isImpAck}
  129. </if>
  130. <if test="impAckNote != null and impAckNote != ''">
  131. and IMP_ACK_NOTE = #{impAckNote}
  132. </if>
  133. <if test="isImpPblm != null and isImpPblm != ''">
  134. and IS_IMP_PBLM = #{isImpPblm}
  135. </if>
  136. <if test="impPblmNote != null and impPblmNote != ''">
  137. and IMP_PBLM_NOTE = #{impPblmNote}
  138. </if>
  139. <if test="isImpOther != null and isImpOther != ''">
  140. and IS_IMP_OTHER = #{isImpOther}
  141. </if>
  142. <if test="impOtherNote != null and impOtherNote != ''">
  143. and IMP_OTHER_NOTE = #{impOtherNote}
  144. </if>
  145. <if test="isImpLead != null and isImpLead != ''">
  146. and IS_IMP_LEAD = #{isImpLead}
  147. </if>
  148. and DATA_STAT='0'
  149. </trim>
  150. </sql>
  151. <select id="get" resultMap="bisInspYnDrdmpSystemResultMap" parameterType="String">
  152. select
  153. <include refid="table_columns"/>
  154. from BIS_INSP_YN_DRDMP_SYSTEM where RGSTR_ID = #{id}
  155. </select>
  156. <select id="getBy" resultMap="bisInspYnDrdmpSystemResultMap">
  157. select
  158. <include refid="table_columns"/>
  159. from BIS_INSP_YN_DRDMP_SYSTEM
  160. <include refid="page_where"/>
  161. </select>
  162. <select id="findAll" resultMap="bisInspYnDrdmpSystemResultMap">
  163. select
  164. <include refid="table_columns"/>
  165. from BIS_INSP_YN_DRDMP_SYSTEM
  166. </select>
  167. <select id="findList" resultMap="bisInspYnDrdmpSystemResultMap">
  168. select
  169. <include refid="table_columns"/>
  170. from BIS_INSP_YN_DRDMP_SYSTEM
  171. <include refid="page_where"/>
  172. </select>
  173. <select id="selectCount" resultType="int">
  174. select count(ID) from BIS_INSP_YN_DRDMP_SYSTEM
  175. <include refid="page_where"/>
  176. </select>
  177. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSystem">
  178. insert into BIS_INSP_YN_DRDMP_SYSTEM(
  179. <include refid="table_columns"/>
  180. )
  181. values (
  182. <include refid="entity_properties"/>
  183. )
  184. </insert>
  185. <delete id="delete" parameterType="java.lang.String">
  186. update BIS_INSP_YN_DRDMP_SYSTEM set DATA_STAT='9' where ID = #{id}
  187. </delete>
  188. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSystem">
  189. update BIS_INSP_YN_DRDMP_SYSTEM set DATA_STAT='9'
  190. <include refid="page_where"/>
  191. </delete>
  192. <update id="deleteInFlag" parameterType="java.lang.String">
  193. update BIS_INSP_YN_DRDMP_SYSTEM set DATA_STAT = '9' where ID = #{id}
  194. </update>
  195. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSystem">
  196. update BIS_INSP_YN_DRDMP_SYSTEM
  197. <trim prefix="set" suffixOverrides=",">
  198. <if test="impLeadNote != null and impLeadNote != ''">IMP_LEAD_NOTE
  199. = #{impLeadNote},
  200. </if>
  201. <if test="persId != null and persId != ''">PERS_ID
  202. = #{persId},
  203. </if>
  204. <if test="intm != null">INTM
  205. = #{intm},
  206. </if>
  207. <if test="uptm != null">UPTM
  208. = #{uptm},
  209. </if>
  210. <if test="state != null and state != ''">STATE
  211. = #{state},
  212. </if>
  213. <if test="dataStat != null and dataStat != ''">DATA_STAT
  214. = #{dataStat},
  215. </if>
  216. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  217. = #{rgstrId},
  218. </if>
  219. <if test="isLearn != null and isLearn != ''">IS_LEARN
  220. = #{isLearn},
  221. </if>
  222. <if test="learnNote != null and learnNote != ''">LEARN_NOTE
  223. = #{learnNote},
  224. </if>
  225. <if test="isOrgLearn != null and isOrgLearn != ''">IS_ORG_LEARN
  226. = #{isOrgLearn},
  227. </if>
  228. <if test="orgLearNote != null and orgLearNote != ''">ORG_LEAR_NOTE
  229. = #{orgLearNote},
  230. </if>
  231. <if test="isImpFile != null and isImpFile != ''">IS_IMP_FILE
  232. = #{isImpFile},
  233. </if>
  234. <if test="impFileNote != null and impFileNote != ''">IMP_FILE_NOTE
  235. = #{impFileNote},
  236. </if>
  237. <if test="isImpPdc != null and isImpPdc != ''">IS_IMP_PDC
  238. = #{isImpPdc},
  239. </if>
  240. <if test="impPdcNote != null and impPdcNote != ''">IMP_PDC_NOTE
  241. = #{impPdcNote},
  242. </if>
  243. <if test="isImpAck != null and isImpAck != ''">IS_IMP_ACK
  244. = #{isImpAck},
  245. </if>
  246. <if test="impAckNote != null and impAckNote != ''">IMP_ACK_NOTE
  247. = #{impAckNote},
  248. </if>
  249. <if test="isImpPblm != null and isImpPblm != ''">IS_IMP_PBLM
  250. = #{isImpPblm},
  251. </if>
  252. <if test="impPblmNote != null and impPblmNote != ''">IMP_PBLM_NOTE
  253. = #{impPblmNote},
  254. </if>
  255. <if test="isImpOther != null and isImpOther != ''">IS_IMP_OTHER
  256. = #{isImpOther},
  257. </if>
  258. <if test="impOtherNote != null and impOtherNote != ''">IMP_OTHER_NOTE
  259. = #{impOtherNote},
  260. </if>
  261. <if test="isImpLead != null and isImpLead != ''">IS_IMP_LEAD
  262. = #{isImpLead},
  263. </if>
  264. </trim>
  265. <where>ID = #{id}</where>
  266. </update>
  267. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSystem">
  268. update BIS_INSP_YN_DRDMP_SYSTEM
  269. <trim prefix="set" suffixOverrides=",">
  270. <if test="impLeadNote != null and impLeadNote != ''">IMP_LEAD_NOTE
  271. = #{impLeadNote},
  272. </if>
  273. <if test="persId != null and persId != ''">PERS_ID
  274. = #{persId},
  275. </if>
  276. <if test="intm != null">INTM
  277. = #{intm},
  278. </if>
  279. <if test="uptm != null">UPTM
  280. = #{uptm},
  281. </if>
  282. <if test="state != null and state != ''">STATE
  283. = #{state},
  284. </if>
  285. <if test="dataStat != null and dataStat != ''">DATA_STAT
  286. = #{dataStat},
  287. </if>
  288. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  289. = #{rgstrId},
  290. </if>
  291. <if test="isLearn != null and isLearn != ''">IS_LEARN
  292. = #{isLearn},
  293. </if>
  294. <if test="learnNote != null and learnNote != ''">LEARN_NOTE
  295. = #{learnNote},
  296. </if>
  297. <if test="isOrgLearn != null and isOrgLearn != ''">IS_ORG_LEARN
  298. = #{isOrgLearn},
  299. </if>
  300. <if test="orgLearNote != null and orgLearNote != ''">ORG_LEAR_NOTE
  301. = #{orgLearNote},
  302. </if>
  303. <if test="isImpFile != null and isImpFile != ''">IS_IMP_FILE
  304. = #{isImpFile},
  305. </if>
  306. <if test="impFileNote != null and impFileNote != ''">IMP_FILE_NOTE
  307. = #{impFileNote},
  308. </if>
  309. <if test="isImpPdc != null and isImpPdc != ''">IS_IMP_PDC
  310. = #{isImpPdc},
  311. </if>
  312. <if test="impPdcNote != null and impPdcNote != ''">IMP_PDC_NOTE
  313. = #{impPdcNote},
  314. </if>
  315. <if test="isImpAck != null and isImpAck != ''">IS_IMP_ACK
  316. = #{isImpAck},
  317. </if>
  318. <if test="impAckNote != null and impAckNote != ''">IMP_ACK_NOTE
  319. = #{impAckNote},
  320. </if>
  321. <if test="isImpPblm != null and isImpPblm != ''">IS_IMP_PBLM
  322. = #{isImpPblm},
  323. </if>
  324. <if test="impPblmNote != null and impPblmNote != ''">IMP_PBLM_NOTE
  325. = #{impPblmNote},
  326. </if>
  327. <if test="isImpOther != null and isImpOther != ''">IS_IMP_OTHER
  328. = #{isImpOther},
  329. </if>
  330. <if test="impOtherNote != null and impOtherNote != ''">IMP_OTHER_NOTE
  331. = #{impOtherNote},
  332. </if>
  333. <if test="isImpLead != null and isImpLead != ''">IS_IMP_LEAD
  334. = #{isImpLead},
  335. </if>
  336. </trim>
  337. <include refid="page_where"/>
  338. </update>
  339. <!-- 其他自定义SQL -->
  340. </mapper>