10a5f445c75a8e619e8dda1f2d3ffcafdf30f5aa.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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.BisInspRectPblmProvinceDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince" id="bisInspRectPblmProvinceResultMap">
  5. <result property="inspPblmType" column="INSP_PBLM_TYPE"/>
  6. <result property="inspPblmCode" column="INSP_PBLM_CODE"/>
  7. <result property="inspPblmName" column="INSP_PBLM_NAME"/>
  8. <result property="inspPblmDesc" column="INSP_PBLM_DESC"/>
  9. <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
  10. <result property="inspPblmTm" column="INSP_PBLM_TM"/>
  11. <result property="crrtTm" column="CRRT_TM"/>
  12. <result property="rectConc" column="RECT_CONC"/>
  13. <result property="rectTm" column="RECT_TM"/>
  14. <result property="rectNote" column="RECT_NOTE"/>
  15. <result property="rectPersId" column="RECT_PERS_ID"/>
  16. <result property="rectPersNm" column="RECT_PERS_NM"/>
  17. <result property="chkState" column="CHK_STATE"/>
  18. <result property="isTranc" column="IS_TRANC"/>
  19. <result property="satOrgId" column="SAT_ORG_ID"/>
  20. <result property="satOrgName" column="SAT_ORG_NAME"/>
  21. <result property="note" column="NOTE"/>
  22. <result property="persId" column="PERS_ID"/>
  23. <result property="persName" column="PERS_NAME"/>
  24. <result property="intm" column="INTM"/>
  25. <result property="uptm" column="UPTM"/>
  26. <result property="dataStat" column="DATA_STAT"/>
  27. <result property="id" column="ID"/>
  28. <result property="rectId" column="RECT_ID"/>
  29. <result property="code" column="CODE"/>
  30. <result property="objType" column="OBJ_TYPE"/>
  31. <result property="name" column="NAME"/>
  32. <result property="regid" column="REGID"/>
  33. <result property="objId" column="OBJ_ID"/>
  34. <result property="adCode" column="AD_CODE"/>
  35. <result property="adName" column="AD_NAME"/>
  36. <result property="pblmId" column="PBLM_ID"/>
  37. <result property="jchkState" column="JCHK_STATE"/>
  38. <result property="chkStateNote" column="CHK_STATE_NOTE"/>
  39. <result property="jchkStateNote" column="JCHK_STATE_NOTE"/>
  40. </resultMap>
  41. <sql id="table_columns">
  42. INSP_PBLM_TYPE,
  43. INSP_PBLM_CODE,
  44. INSP_PBLM_NAME,
  45. INSP_PBLM_DESC,
  46. INSP_PBLM_CATE,
  47. INSP_PBLM_TM,
  48. CRRT_TM,
  49. RECT_CONC,
  50. RECT_TM,
  51. RECT_NOTE,
  52. RECT_PERS_ID,
  53. RECT_PERS_NM,
  54. CHK_STATE,
  55. IS_TRANC,
  56. SAT_ORG_ID,
  57. SAT_ORG_NAME,
  58. NOTE,
  59. PERS_ID,
  60. PERS_NAME,
  61. INTM,
  62. UPTM,
  63. DATA_STAT,
  64. ID,
  65. RECT_ID,
  66. CODE,
  67. OBJ_TYPE,
  68. NAME,
  69. REGID,
  70. OBJ_ID,
  71. AD_CODE,
  72. AD_NAME,
  73. PBLM_ID,
  74. JCHK_STATE,
  75. CHK_STATE_NOTE,
  76. JCHK_STATE_NOTE
  77. </sql>
  78. <sql id="entity_properties">
  79. #{inspPblmType},
  80. #{inspPblmCode},
  81. #{inspPblmName},
  82. #{inspPblmDesc},
  83. #{inspPblmCate},
  84. #{inspPblmTm},
  85. #{crrtTm},
  86. #{rectConc},
  87. #{rectTm},
  88. #{rectNote},
  89. #{rectPersId},
  90. #{rectPersNm},
  91. #{chkState},
  92. #{isTranc},
  93. #{satOrgId},
  94. #{satOrgName},
  95. #{note},
  96. #{persId},
  97. #{persName},
  98. #{intm},
  99. #{uptm},
  100. #{dataStat},
  101. #{id},
  102. #{rectId},
  103. #{code},
  104. #{objType},
  105. #{name},
  106. #{regid},
  107. #{objId},
  108. #{adCode},
  109. #{adName},
  110. #{pblmId},
  111. #{jchkState},
  112. #{chkStateNote},
  113. #{jchkStateNote}
  114. </sql>
  115. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  116. <sql id="page_where">
  117. <trim prefix="where" prefixOverrides="and | or ">
  118. <if test="chkStateNote != null and chkStateNote != ''">and CHK_STATE_NOTE = #{chkStateNote}</if>
  119. <if test="jchkStateNote != null and jchkStateNote != ''">and JCHK_STATE_NOTE = #{jchkStateNote}</if>
  120. <if test="inspPblmCode != null and inspPblmCode != ''">and INSP_PBLM_CODE = #{inspPblmCode}</if>
  121. <if test="inspPblmName != null and inspPblmName != ''">and INSP_PBLM_NAME = #{inspPblmName}</if>
  122. <if test="inspPblmDesc != null and inspPblmDesc != ''">and INSP_PBLM_DESC like '%${inspPblmDesc}%' </if>
  123. <if test="inspPblmCate != null and inspPblmCate != ''">and INSP_PBLM_CATE = #{inspPblmCate}</if>
  124. <if test="inspPblmTm != null">and INSP_PBLM_TM = #{inspPblmTm}</if>
  125. <if test="crrtTm != null">and CRRT_TM = #{crrtTm}</if>
  126. <if test="rectConc != null and rectConc != ''">and RECT_CONC = #{rectConc}</if>
  127. <if test="rectTm != null">and RECT_TM = #{rectTm}</if>
  128. <if test="rectNote != null and rectNote != ''">and RECT_NOTE = #{rectNote}</if>
  129. <if test="rectPersId != null and rectPersId != ''">and RECT_PERS_ID = #{rectPersId}</if>
  130. <if test="rectPersNm != null and rectPersNm != ''">and RECT_PERS_NM = #{rectPersNm}</if>
  131. <if test="chkState != null and chkState != ''">and CHK_STATE = #{chkState}</if>
  132. <if test="isTranc != null and isTranc != ''">and IS_TRANC = #{isTranc}</if>
  133. <if test="satOrgId != null and satOrgId != ''">and SAT_ORG_ID = #{satOrgId}</if>
  134. <if test="satOrgName != null and satOrgName != ''">and SAT_ORG_NAME = #{satOrgName}</if>
  135. <if test="note != null and note != ''">and NOTE = #{note}</if>
  136. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  137. <if test="persName != null and persName != ''">and PERS_NAME = #{persName}</if>
  138. <if test="intm != null">and INTM = #{intm}</if>
  139. <if test="uptm != null">and UPTM = #{uptm}</if>
  140. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  141. <if test="id != null and id != ''">and ID = #{id}</if>
  142. <if test="rectId != null and rectId != ''">and RECT_ID = #{rectId}</if>
  143. <if test="code != null and code != ''">and CODE = #{code}</if>
  144. <if test="objType != null and objType != ''">and OBJ_TYPE = #{objType}</if>
  145. <if test="name != null and name != ''">and NAME like '%${name}%' </if>
  146. <if test="regid != null and regid != ''">and REGID = #{regid}</if>
  147. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  148. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  149. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  150. <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
  151. <if test="jchkState != null and jchkState != ''">and JCHK_STATE = #{jchkState}</if>
  152. <if test="satOrg != null and satOrg != ''"> and id in
  153. (select rect_id from bis_insp_rect_pblm_province where is_tranc='1' and sat_org_id=#{satOrg})</if>
  154. and DATA_STAT='0'
  155. </trim>
  156. </sql>
  157. <select id="get" resultMap="bisInspRectPblmProvinceResultMap" parameterType="String" >
  158. select <include refid="table_columns" /> from BIS_INSP_RECT_PBLM_PROVINCE where ID = #{id}
  159. </select>
  160. <select id="getBy" resultMap="bisInspRectPblmProvinceResultMap">
  161. select <include refid="table_columns" /> from BIS_INSP_RECT_PBLM_PROVINCE <include refid="page_where" />
  162. </select>
  163. <select id="findAll" resultMap="bisInspRectPblmProvinceResultMap">
  164. select <include refid="table_columns" /> from BIS_INSP_RECT_PBLM_PROVINCE
  165. </select>
  166. <select id="findList" resultMap="bisInspRectPblmProvinceResultMap">
  167. select <include refid="table_columns" /> from BIS_INSP_RECT_PBLM_PROVINCE <include refid="page_where" /> order by name, UPTM desc
  168. </select>
  169. <select id="selectCount" resultType="int" >
  170. select count(ID) from BIS_INSP_RECT_PBLM_PROVINCE <include refid="page_where" />
  171. </select>
  172. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince">
  173. insert into BIS_INSP_RECT_PBLM_PROVINCE( <include refid="table_columns" /> )
  174. values ( <include refid="entity_properties" /> )
  175. </insert>
  176. <delete id="delete" parameterType="java.lang.String">
  177. update BIS_INSP_RECT_PBLM_PROVINCE set DATA_STAT='9' where ID = #{id}
  178. </delete>
  179. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince">
  180. update BIS_INSP_RECT_PBLM_PROVINCE set DATA_STAT='9' <include refid="page_where" />
  181. </delete>
  182. <update id="deleteInFlag" parameterType="java.lang.String">
  183. update BIS_INSP_RECT_PBLM_PROVINCE set DATA_STAT = '9' where ID = #{id}
  184. </update>
  185. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince">
  186. update BIS_INSP_RECT_PBLM_PROVINCE
  187. <trim prefix="set" suffixOverrides=",">
  188. <if test="chkStateNote != null and chkStateNote != ''">CHK_STATE_NOTE = #{chkStateNote},</if>
  189. <if test="jchkStateNote != null and jchkStateNote != ''">JCHK_STATE_NOTE = #{jchkStateNote},</if>
  190. <if test="inspPblmCode != null and inspPblmCode != ''">INSP_PBLM_CODE = #{inspPblmCode},</if>
  191. <if test="inspPblmName != null and inspPblmName != ''">INSP_PBLM_NAME = #{inspPblmName},</if>
  192. <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
  193. <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
  194. <if test="inspPblmTm != null">INSP_PBLM_TM = #{inspPblmTm},</if>
  195. <if test="crrtTm != null">CRRT_TM = #{crrtTm},</if>
  196. <if test="rectConc != null and rectConc != ''">RECT_CONC = #{rectConc},</if>
  197. <if test="rectTm != null">RECT_TM = #{rectTm},</if>
  198. <if test="rectNote != null and rectNote != ''">RECT_NOTE = #{rectNote},</if>
  199. <if test="rectPersId != null and rectPersId != ''">RECT_PERS_ID = #{rectPersId},</if>
  200. <if test="rectPersNm != null and rectPersNm != ''">RECT_PERS_NM = #{rectPersNm},</if>
  201. <if test="chkState != null and chkState != ''">CHK_STATE = #{chkState},</if>
  202. <if test="isTranc != null and isTranc != ''">IS_TRANC = #{isTranc},</if>
  203. <if test="satOrgId != null and satOrgId != ''">SAT_ORG_ID = #{satOrgId},</if>
  204. <if test="satOrgName != null and satOrgName != ''">SAT_ORG_NAME = #{satOrgName},</if>
  205. <if test="note != null and note != ''">NOTE = #{note},</if>
  206. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  207. <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
  208. <if test="intm != null">INTM = #{intm},</if>
  209. <if test="uptm != null">UPTM = #{uptm},</if>
  210. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  211. <if test="id != null and id != ''">ID = #{id},</if>
  212. <if test="rectId != null and rectId != ''">RECT_ID = #{rectId},</if>
  213. <if test="code != null and code != ''">CODE = #{code},</if>
  214. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  215. <if test="name != null and name != ''">NAME = #{name},</if>
  216. <if test="regid != null and regid != ''">REGID = #{regid},</if>
  217. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  218. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  219. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  220. <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
  221. <if test="jchkState != null and jchkState != ''">JCHK_STATE = #{jchkState},</if>
  222. </trim>
  223. <where>ID = #{id}</where>
  224. </update>
  225. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectPblmProvince">
  226. update BIS_INSP_RECT_PBLM_PROVINCE
  227. <trim prefix="set" suffixOverrides=",">
  228. <if test="chkStateNote != null and chkStateNote != ''">CHK_STATE_NOTE = #{chkStateNote},</if>
  229. <if test="jchkStateNote != null and jchkStateNote != ''">JCHK_STATE_NOTE = #{jchkStateNote},</if>
  230. <if test="inspPblmCode != null and inspPblmCode != ''">INSP_PBLM_CODE = #{inspPblmCode},</if>
  231. <if test="inspPblmName != null and inspPblmName != ''">INSP_PBLM_NAME = #{inspPblmName},</if>
  232. <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
  233. <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
  234. <if test="inspPblmTm != null">INSP_PBLM_TM = #{inspPblmTm},</if>
  235. <if test="crrtTm != null">CRRT_TM = #{crrtTm},</if>
  236. <if test="rectConc != null and rectConc != ''">RECTONC = #{rectConc},</if>
  237. <if test="rectTm != null">RECT_TM = #{rectTm},</if>
  238. <if test="rectNote != null and rectNote != ''">RECT_NOTE = #{rectNote},</if>
  239. <if test="rectPersId != null and rectPersId != ''">RECT_PERS_ID = #{rectPersId},</if>
  240. <if test="rectPersNm != null and rectPersNm != ''">RECT_PERS_NM = #{rectPersNm},</if>
  241. <if test="chkState != null and chkState != ''">CHK_STATE = #{chkState},</if>
  242. <if test="isTranc != null and isTranc != ''">IS_TRANC = #{isTranc},</if>
  243. <if test="satOrgId != null and satOrgId != ''">SAT_ORG_ID = #{satOrgId},</if>
  244. <if test="satOrgName != null and satOrgName != ''">SAT_ORG_NAME = #{satOrgName},</if>
  245. <if test="note != null and note != ''">NOTE = #{note},</if>
  246. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  247. <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
  248. <if test="intm != null">INTM = #{intm},</if>
  249. <if test="uptm != null">UPTM = #{uptm},</if>
  250. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  251. <if test="id != null and id != ''">ID = #{id},</if>
  252. <if test="rectId != null and rectId != ''">RECT_ID = #{rectId},</if>
  253. <if test="code != null and code != ''">CODE = #{code},</if>
  254. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  255. <if test="name != null and name != ''">NAME = #{name},</if>
  256. <if test="regid != null and regid != ''">REGID = #{regid},</if>
  257. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  258. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  259. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  260. <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
  261. <if test="jchkState != null and jchkState != ''">JCHK_STATE = #{jchkState},</if>
  262. </trim>
  263. <include refid="page_where" />
  264. </update>
  265. <!-- 其他自定义SQL -->
  266. <!-- 其他自定义SQL -->
  267. <select id="getPrjctSize" resultType="java.lang.Integer">
  268. select count(distinct(name))con from BIS_INSP_RECT_PBLM_PROVINCE t where rect_id=#{rectId} and DATA_STAT='0'
  269. </select>
  270. </mapper>