BisInspIrrWasDao.xml 18 KB

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