BisInspIrrPitDao.xml 17 KB

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