BisInspIrrPustDao.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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.BisInspIrrPustDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspIrrPust" id="bisInspIrrPustResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="objId" column="OBJ_ID"/>
  8. <result property="code" column="CODE"/>
  9. <result property="name" column="NAME"/>
  10. <result property="adCode" column="AD_CODE"/>
  11. <result property="adName" column="AD_NAME"/>
  12. <result property="sour" column="SOUR"/>
  13. <result property="compDate" column="COMP_DATE"/>
  14. <result property="insPow" column="INS_POW"/>
  15. <result property="insFlow" column="INS_FLOW"/>
  16. <result property="irrArea" column="IRR_AREA"/>
  17. <result property="desHead" column="DES_HEAD"/>
  18. <result property="higStnType" column="HIG_STN_TYPE"/>
  19. <result property="prjPbmArea" column="PRJ_PBM_AREA"/>
  20. <result property="prjWhoTend" column="PRJ_WHO_TEND"/>
  21. <result property="prjUsrType" column="PRJ_USR_TYPE"/>
  22. <result property="whoTend" column="WHO_TEND"/>
  23. <result property="isTendRcrd" column="IS_TEND_RCRD"/>
  24. <result property="tendRcrdType" column="TEND_RCRD_TYPE"/>
  25. <result property="isRun" column="IS_RUN"/>
  26. <result property="notRunType" column="NOT_RUN_TYPE"/>
  27. <result property="notRunNote" column="NOT_RUN_NOTE"/>
  28. <result property="isSafeCot" column="IS_SAFE_COT"/>
  29. <result property="isPowPrt" column="IS_POW_PRT"/>
  30. <result property="isMsrAll" column="IS_MSR_ALL"/>
  31. <result property="isBudAll" column="IS_BUD_ALL"/>
  32. <result property="isInwtAll" column="IS_INWT_ALL"/>
  33. <result property="evaluate" column="EVALUATE"/>
  34. <result property="note" column="NOTE"/>
  35. <result property="invsrName" column="INVSR_NAME"/>
  36. <result property="invsrPhone" column="INVSR_PHONE"/>
  37. <result property="invsrTm" column="INVSR_TM"/>
  38. <result property="persId" column="PERS_ID"/>
  39. <result property="intm" column="INTM"/>
  40. <result property="uptm" column="UPTM"/>
  41. <result property="dataStat" column="DATA_STAT"/>
  42. <result property="state" column="STATE"/>
  43. <result property="centerX" column="CENTER_X"/>
  44. <result property="centerY" column="CENTER_Y"/>
  45. <result property="gdX" column="GD_X"/>
  46. <result property="gdY" column="GD_Y"/>
  47. <result property="sourNote" column="SOUR_NOTE"/>
  48. <result property="isCurryearComp" column="IS_CURRYEAR_COMP"/>
  49. <result property="beforeCurryearComp" column="BEFROE_CURRYEAR"/>
  50. <result property="afterCurryearComp" column="AFTER_CURRYEAR"/>
  51. </resultMap>
  52. <sql id="table_columns">
  53. IS_CURRYEAR_COMP,
  54. BEFROE_CURRYEAR,
  55. AFTER_CURRYEAR,
  56. SOUR_NOTE,
  57. CENTER_X,
  58. CENTER_Y,
  59. GD_X,
  60. GD_Y,ID,
  61. RGSTR_ID,
  62. OBJ_ID,
  63. CODE,
  64. NAME,
  65. AD_CODE,
  66. AD_NAME,
  67. SOUR,
  68. COMP_DATE,
  69. INS_POW,
  70. INS_FLOW,
  71. IRR_AREA,
  72. DES_HEAD,
  73. HIG_STN_TYPE,
  74. PRJ_PBM_AREA,
  75. PRJ_WHO_TEND,
  76. PRJ_USR_TYPE,
  77. WHO_TEND,
  78. IS_TEND_RCRD,
  79. TEND_RCRD_TYPE,
  80. IS_RUN,
  81. NOT_RUN_TYPE,
  82. NOT_RUN_NOTE,
  83. IS_SAFE_COT,
  84. IS_POW_PRT,
  85. IS_MSR_ALL,
  86. IS_BUD_ALL,
  87. IS_INWT_ALL,
  88. EVALUATE,
  89. NOTE,
  90. INVSR_NAME,
  91. INVSR_PHONE,
  92. INVSR_TM,
  93. PERS_ID,
  94. INTM,
  95. UPTM,
  96. DATA_STAT,
  97. STATE
  98. </sql>
  99. <sql id="entity_properties">
  100. #{isCurryearComp},
  101. #{beforeCurryearComp},
  102. #{afterCurryearComp},
  103. #{sourNote},
  104. #{centerX},
  105. #{centerY},
  106. #{gdX},
  107. #{gdY},
  108. #{id},
  109. #{rgstrId},
  110. #{objId},
  111. #{code},
  112. #{name},
  113. #{adCode},
  114. #{adName},
  115. #{sour},
  116. #{compDate},
  117. #{insPow},
  118. #{insFlow},
  119. #{irrArea},
  120. #{desHead},
  121. #{higStnType},
  122. #{prjPbmArea},
  123. #{prjWhoTend},
  124. #{prjUsrType},
  125. #{whoTend},
  126. #{isTendRcrd},
  127. #{tendRcrdType},
  128. #{isRun},
  129. #{notRunType},
  130. #{notRunNote},
  131. #{isSafeCot},
  132. #{isPowPrt},
  133. #{isMsrAll},
  134. #{isBudAll},
  135. #{isInwtAll},
  136. #{evaluate},
  137. #{note},
  138. #{invsrName},
  139. #{invsrPhone},
  140. #{invsrTm},
  141. #{persId},
  142. #{intm},
  143. #{uptm},
  144. #{dataStat},
  145. #{state}
  146. </sql>
  147. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  148. <sql id="page_where">
  149. <trim prefix="where" prefixOverrides="and | or ">
  150. <if test="isCurryearComp != null and isCurryearComp != ''">and IS_CURRYEAR_COMP = #{isCurryearComp}</if>
  151. <if test="beforeCurryearComp != null and beforeCurryearComp != ''">and BEFROE_CURRYEAR = #{beforeCurryearComp}</if>
  152. <if test="afterCurryearComp != null and afterCurryearComp != ''">and AFTER_CURRYEAR = #{afterCurryearComp}</if>
  153. <if test="sourNote != null and sourNote != ''">and SOUR_NOTE = #{sourNote}</if>
  154. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  155. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  156. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  157. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  158. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  159. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  160. <if test="code != null and code != ''">and CODE = #{code}</if>
  161. <if test="name != null and name != ''">and NAME like concat('%',concat(#{name},'%'))</if>
  162. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  163. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  164. <if test="sour != null and sour != ''">and SOUR = #{sour}</if>
  165. <if test="compDate != null and compDate != ''">and COMP_DATE = #{compDate}</if>
  166. <if test="insPow != null and insPow != ''">and INS_POW = #{insPow}</if>
  167. <if test="insFlow != null and insFlow != ''">and INS_FLOW = #{insFlow}</if>
  168. <if test="irrArea != null and irrArea != ''">and IRR_AREA = #{irrArea}</if>
  169. <if test="desHead != null and desHead != ''">and DES_HEAD = #{desHead}</if>
  170. <if test="higStnType != null and higStnType != ''">and HIG_STN_TYPE = #{higStnType}</if>
  171. <if test="prjPbmArea != null and prjPbmArea != ''">and PRJ_PBM_AREA = #{prjPbmArea}</if>
  172. <if test="prjWhoTend != null and prjWhoTend != ''">and PRJ_WHO_TEND = #{prjWhoTend}</if>
  173. <if test="prjUsrType != null and prjUsrType != ''">and PRJ_USR_TYPE = #{prjUsrType}</if>
  174. <if test="whoTend != null and whoTend != ''">and WHO_TEND = #{whoTend}</if>
  175. <if test="isTendRcrd != null and isTendRcrd != ''">and IS_TEND_RCRD = #{isTendRcrd}</if>
  176. <if test="tendRcrdType != null and tendRcrdType != ''">and TEND_RCRD_TYPE = #{tendRcrdType}</if>
  177. <if test="isRun != null and isRun != ''">and IS_RUN = #{isRun}</if>
  178. <if test="notRunType != null and notRunType != ''">and NOT_RUN_TYPE = #{notRunType}</if>
  179. <if test="notRunNote != null and notRunNote != ''">and NOT_RUN_NOTE = #{notRunNote}</if>
  180. <if test="isSafeCot != null and isSafeCot != ''">and IS_SAFE_COT = #{isSafeCot}</if>
  181. <if test="isPowPrt != null and isPowPrt != ''">and IS_POW_PRT = #{isPowPrt}</if>
  182. <if test="isMsrAll != null and isMsrAll != ''">and IS_MSR_ALL = #{isMsrAll}</if>
  183. <if test="isBudAll != null and isBudAll != ''">and IS_BUD_ALL = #{isBudAll}</if>
  184. <if test="isInwtAll != null and isInwtAll != ''">and IS_INWT_ALL = #{isInwtAll}</if>
  185. <if test="evaluate != null and evaluate != ''">and EVALUATE = #{evaluate}</if>
  186. <if test="note != null and note != ''">and NOTE = #{note}</if>
  187. <if test="invsrName != null and invsrName != ''">and INVSR_NAME = #{invsrName}</if>
  188. <if test="invsrPhone != null and invsrPhone != ''">and INVSR_PHONE = #{invsrPhone}</if>
  189. <if test="invsrTm != null">and INVSR_TM = #{invsrTm}</if>
  190. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  191. <if test="intm != null">and INTM = #{intm}</if>
  192. <if test="uptm != null">and UPTM = #{uptm}</if>
  193. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  194. <if test="state != null and state != ''">and STATE = #{state}</if>
  195. and DATA_STAT='0'
  196. </trim>
  197. </sql>
  198. <select id="get" resultMap="bisInspIrrPustResultMap" parameterType="String" >
  199. select <include refid="table_columns" /> from BIS_INSP_IRR_PUST where ID = #{id}
  200. </select>
  201. <select id="getBy" resultMap="bisInspIrrPustResultMap">
  202. select <include refid="table_columns" /> from BIS_INSP_IRR_PUST <include refid="page_where" />
  203. </select>
  204. <select id="findAll" resultMap="bisInspIrrPustResultMap">
  205. select <include refid="table_columns" /> from BIS_INSP_IRR_PUST
  206. </select>
  207. <select id="findList" resultMap="bisInspIrrPustResultMap">
  208. select <include refid="table_columns" /> from BIS_INSP_IRR_PUST <include refid="page_where" />
  209. </select>
  210. <select id="selectCount" resultType="int" >
  211. select count(ID) from BIS_INSP_IRR_PUST <include refid="page_where" />
  212. </select>
  213. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrPust">
  214. insert into BIS_INSP_IRR_PUST( <include refid="table_columns" /> )
  215. values ( <include refid="entity_properties" /> )
  216. </insert>
  217. <delete id="delete" parameterType="java.lang.String">
  218. update BIS_INSP_IRR_PUST set DATA_STAT='9' where ID = #{id}
  219. </delete>
  220. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrPust">
  221. update BIS_INSP_IRR_PUST set DATA_STAT='9' <include refid="page_where" />
  222. </delete>
  223. <update id="deleteInFlag" parameterType="java.lang.String">
  224. update BIS_INSP_IRR_PUST set DATA_STAT = '9' where ID = #{id}
  225. </update>
  226. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrPust">
  227. update BIS_INSP_IRR_PUST
  228. <trim prefix="set" suffixOverrides=",">
  229. <if test="isCurryearComp != null and isCurryearComp != ''">IS_CURRYEAR_COMP = #{isCurryearComp},</if>
  230. <if test="beforeCurryearComp != null and beforeCurryearComp != ''">BEFROE_CURRYEAR = #{beforeCurryearComp},</if>
  231. <if test="afterCurryearComp != null and afterCurryearComp != ''">AFTER_CURRYEAR = #{afterCurryearComp},</if>
  232. <if test="sourNote != null and sourNote != ''">SOUR_NOTE = #{sourNote},</if>
  233. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  234. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  235. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  236. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  237. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  238. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  239. <if test="code != null and code != ''">CODE = #{code},</if>
  240. <if test="name != null and name != ''">NAME = #{name},</if>
  241. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  242. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  243. <if test="sour != null and sour != ''">SOUR = #{sour},</if>
  244. <if test="compDate != null and compDate != ''">COMP_DATE = #{compDate},</if>
  245. <if test="insPow != null and insPow != ''">INS_POW = #{insPow},</if>
  246. <if test="insFlow != null and insFlow != ''">INS_FLOW = #{insFlow},</if>
  247. <if test="irrArea != null and irrArea != ''">IRR_AREA = #{irrArea},</if>
  248. <if test="desHead != null and desHead != ''">DES_HEAD = #{desHead},</if>
  249. <if test="higStnType != null and higStnType != ''">HIG_STN_TYPE = #{higStnType},</if>
  250. <if test="prjPbmArea != null and prjPbmArea != ''">PRJ_PBM_AREA = #{prjPbmArea},</if>
  251. <if test="prjWhoTend != null and prjWhoTend != ''">PRJ_WHO_TEND = #{prjWhoTend},</if>
  252. <if test="prjUsrType != null and prjUsrType != ''">PRJ_USR_TYPE = #{prjUsrType},</if>
  253. <if test="whoTend != null and whoTend != ''">WHO_TEND = #{whoTend},</if>
  254. <if test="isTendRcrd != null and isTendRcrd != ''">IS_TEND_RCRD = #{isTendRcrd},</if>
  255. <if test="tendRcrdType != null and tendRcrdType != ''">TEND_RCRD_TYPE = #{tendRcrdType},</if>
  256. <if test="isRun != null and isRun != ''">IS_RUN = #{isRun},</if>
  257. <if test="notRunType != null and notRunType != ''">NOT_RUN_TYPE = #{notRunType},</if>
  258. <if test="notRunNote != null and notRunNote != ''">NOT_RUN_NOTE = #{notRunNote},</if>
  259. <if test="isSafeCot != null and isSafeCot != ''">IS_SAFE_COT = #{isSafeCot},</if>
  260. <if test="isPowPrt != null and isPowPrt != ''">IS_POW_PRT = #{isPowPrt},</if>
  261. <if test="isMsrAll != null and isMsrAll != ''">IS_MSR_ALL = #{isMsrAll},</if>
  262. <if test="isBudAll != null and isBudAll != ''">IS_BUD_ALL = #{isBudAll},</if>
  263. <if test="isInwtAll != null and isInwtAll != ''">IS_INWT_ALL = #{isInwtAll},</if>
  264. <if test="evaluate != null and evaluate != ''">EVALUATE = #{evaluate},</if>
  265. <if test="note != null and note != ''">NOTE = #{note},</if>
  266. <if test="invsrName != null and invsrName != ''">INVSR_NAME = #{invsrName},</if>
  267. <if test="invsrPhone != null and invsrPhone != ''">INVSR_PHONE = #{invsrPhone},</if>
  268. <if test="invsrTm != null">INVSR_TM = #{invsrTm},</if>
  269. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  270. <if test="intm != null">INTM = #{intm},</if>
  271. <if test="uptm != null">UPTM = #{uptm},</if>
  272. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  273. <if test="state != null and state != ''">STATE = #{state},</if>
  274. </trim>
  275. <where>ID = #{id}</where>
  276. </update>
  277. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrPust">
  278. update BIS_INSP_IRR_PUST
  279. <trim prefix="set" suffixOverrides=",">
  280. <if test="isCurryearComp != null and isCurryearComp != ''">IS_CURRYEAR_COMP = #{isCurryearComp},</if>
  281. <if test="beforeCurryearComp != null and beforeCurryearComp != ''">BEFROE_CURRYEAR = #{beforeCurryearComp},</if>
  282. <if test="afterCurryearComp != null and afterCurryearComp != ''">AFTER_CURRYEAR = #{afterCurryearComp},</if>
  283. <if test="sourNote != null and sourNote != ''">SOUR_NOTE = #{sourNote},</if>
  284. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  285. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  286. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  287. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  288. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  289. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  290. <if test="code != null and code != ''">CODE = #{code},</if>
  291. <if test="name != null and name != ''">NAME = #{name},</if>
  292. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  293. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  294. <if test="sour != null and sour != ''">SOUR = #{sour},</if>
  295. <if test="compDate != null and compDate != ''">COMP_DATE = #{compDate},</if>
  296. <if test="insPow != null and insPow != ''">INS_POW = #{insPow},</if>
  297. <if test="insFlow != null and insFlow != ''">INS_FLOW = #{insFlow},</if>
  298. <if test="irrArea != null and irrArea != ''">IRR_AREA = #{irrArea},</if>
  299. <if test="desHead != null and desHead != ''">DES_HEAD = #{desHead},</if>
  300. <if test="higStnType != null and higStnType != ''">HIG_STN_TYPE = #{higStnType},</if>
  301. <if test="prjPbmArea != null and prjPbmArea != ''">PRJ_PBM_AREA = #{prjPbmArea},</if>
  302. <if test="prjWhoTend != null and prjWhoTend != ''">PRJ_WHO_TEND = #{prjWhoTend},</if>
  303. <if test="prjUsrType != null and prjUsrType != ''">PRJ_USR_TYPE = #{prjUsrType},</if>
  304. <if test="whoTend != null and whoTend != ''">WHO_TEND = #{whoTend},</if>
  305. <if test="isTendRcrd != null and isTendRcrd != ''">IS_TEND_RCRD = #{isTendRcrd},</if>
  306. <if test="tendRcrdType != null and tendRcrdType != ''">TEND_RCRD_TYPE = #{tendRcrdType},</if>
  307. <if test="isRun != null and isRun != ''">IS_RUN = #{isRun},</if>
  308. <if test="notRunType != null and notRunType != ''">NOT_RUN_TYPE = #{notRunType},</if>
  309. <if test="notRunNote != null and notRunNote != ''">NOT_RUN_NOTE = #{notRunNote},</if>
  310. <if test="isSafeCot != null and isSafeCot != ''">IS_SAFE_COT = #{isSafeCot},</if>
  311. <if test="isPowPrt != null and isPowPrt != ''">IS_POW_PRT = #{isPowPrt},</if>
  312. <if test="isMsrAll != null and isMsrAll != ''">IS_MSR_ALL = #{isMsrAll},</if>
  313. <if test="isBudAll != null and isBudAll != ''">IS_BUD_ALL = #{isBudAll},</if>
  314. <if test="isInwtAll != null and isInwtAll != ''">IS_INWT_ALL = #{isInwtAll},</if>
  315. <if test="evaluate != null and evaluate != ''">EVALUATE = #{evaluate},</if>
  316. <if test="note != null and note != ''">NOTE = #{note},</if>
  317. <if test="invsrName != null and invsrName != ''">INVSR_NAME = #{invsrName},</if>
  318. <if test="invsrPhone != null and invsrPhone != ''">INVSR_PHONE = #{invsrPhone},</if>
  319. <if test="invsrTm != null">INVSR_TM = #{invsrTm},</if>
  320. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  321. <if test="intm != null">INTM = #{intm},</if>
  322. <if test="uptm != null">UPTM = #{uptm},</if>
  323. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  324. <if test="state != null and state != ''">STATE = #{state},</if>
  325. </trim>
  326. <include refid="page_where" />
  327. </update>
  328. <!-- 其他自定义SQL -->
  329. </mapper>