BisInspPblmMlistDao.xml 12 KB

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