BisInspRvgmBswkDao.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  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.BisInspRvgmBswkDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRvgmBswk" id="bisInspRvgmBswkResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isBuldSys" column="IS_BULD_SYS"/>
  8. <result property="buldSysNote" column="BULD_SYS_NOTE"/>
  9. <result property="isWorkAsk" column="IS_WORK_ASK"/>
  10. <result property="workAskNote" column="WORK_ASK_NOTE"/>
  11. <result property="isStndRange" column="IS_STND_RANGE"/>
  12. <result property="stndRangeNote" column="STND_RANGE_NOTE"/>
  13. <result property="isCutRange" column="IS_CUT_RANGE"/>
  14. <result property="cutRangeNote" column="CUT_RANGE_NOTE"/>
  15. <result property="isBuldPrct" column="IS_BULD_PRCT"/>
  16. <result property="buldPrctNote" column="BULD_PRCT_NOTE"/>
  17. <result property="isFrontPrct" column="IS_FRONT_PRCT"/>
  18. <result property="frontPrctNote" column="FRONT_PRCT_NOTE"/>
  19. <result property="isPlanSand" column="IS_PLAN_SAND"/>
  20. <result property="planSandNote" column="PLAN_SAND_NOTE"/>
  21. <result property="isSandNo" column="IS_SAND_NO"/>
  22. <result property="sandNoNote" column="SAND_NO_NOTE"/>
  23. <result property="persId" column="PERS_ID"/>
  24. <result property="intm" column="INTM"/>
  25. <result property="uptm" column="UPTM"/>
  26. <result property="state" column="STATE"/>
  27. <result property="dataStat" column="DATA_STAT"/>
  28. </resultMap>
  29. <sql id="table_columns">
  30. ID,
  31. RGSTR_ID,
  32. IS_BULD_SYS,
  33. BULD_SYS_NOTE,
  34. IS_WORK_ASK,
  35. WORK_ASK_NOTE,
  36. IS_STND_RANGE,
  37. STND_RANGE_NOTE,
  38. IS_CUT_RANGE,
  39. CUT_RANGE_NOTE,
  40. IS_BULD_PRCT,
  41. BULD_PRCT_NOTE,
  42. IS_FRONT_PRCT,
  43. FRONT_PRCT_NOTE,
  44. IS_PLAN_SAND,
  45. PLAN_SAND_NOTE,
  46. IS_SAND_NO,
  47. SAND_NO_NOTE,
  48. PERS_ID,
  49. INTM,
  50. UPTM,
  51. STATE,
  52. DATA_STAT
  53. </sql>
  54. <sql id="entity_properties">
  55. #{id},
  56. #{rgstrId},
  57. #{isBuldSys},
  58. #{buldSysNote},
  59. #{isWorkAsk},
  60. #{workAskNote},
  61. #{isStndRange},
  62. #{stndRangeNote},
  63. #{isCutRange},
  64. #{cutRangeNote},
  65. #{isBuldPrct},
  66. #{buldPrctNote},
  67. #{isFrontPrct},
  68. #{frontPrctNote},
  69. #{isPlanSand},
  70. #{planSandNote},
  71. #{isSandNo},
  72. #{sandNoNote},
  73. #{persId},
  74. #{intm},
  75. #{uptm},
  76. #{state},
  77. #{dataStat}
  78. </sql>
  79. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  80. <sql id="page_where">
  81. <trim prefix="where" prefixOverrides="and | or ">
  82. <if test="rgstrId != null and rgstrId != ''">
  83. and RGSTR_ID = #{rgstrId}
  84. </if>
  85. <if test="isBuldSys != null and isBuldSys != ''">
  86. and IS_BULD_SYS = #{isBuldSys}
  87. </if>
  88. <if test="buldSysNote != null and buldSysNote != ''">
  89. and BULD_SYS_NOTE = #{buldSysNote}
  90. </if>
  91. <if test="isWorkAsk != null and isWorkAsk != ''">
  92. and IS_WORK_ASK = #{isWorkAsk}
  93. </if>
  94. <if test="workAskNote != null and workAskNote != ''">
  95. and WORK_ASK_NOTE = #{workAskNote}
  96. </if>
  97. <if test="isStndRange != null and isStndRange != ''">
  98. and IS_STND_RANGE = #{isStndRange}
  99. </if>
  100. <if test="stndRangeNote != null and stndRangeNote != ''">
  101. and STND_RANGE_NOTE = #{stndRangeNote}
  102. </if>
  103. <if test="isCutRange != null and isCutRange != ''">
  104. and IS_CUT_RANGE = #{isCutRange}
  105. </if>
  106. <if test="cutRangeNote != null and cutRangeNote != ''">
  107. and CUT_RANGE_NOTE = #{cutRangeNote}
  108. </if>
  109. <if test="isBuldPrct != null and isBuldPrct != ''">
  110. and IS_BULD_PRCT = #{isBuldPrct}
  111. </if>
  112. <if test="buldPrctNote != null and buldPrctNote != ''">
  113. and BULD_PRCT_NOTE = #{buldPrctNote}
  114. </if>
  115. <if test="isFrontPrct != null and isFrontPrct != ''">
  116. and IS_FRONT_PRCT = #{isFrontPrct}
  117. </if>
  118. <if test="frontPrctNote != null and frontPrctNote != ''">
  119. and FRONT_PRCT_NOTE = #{frontPrctNote}
  120. </if>
  121. <if test="isPlanSand != null and isPlanSand != ''">
  122. and IS_PLAN_SAND = #{isPlanSand}
  123. </if>
  124. <if test="planSandNote != null and planSandNote != ''">
  125. and PLAN_SAND_NOTE = #{planSandNote}
  126. </if>
  127. <if test="isSandNo != null and isSandNo != ''">
  128. and IS_SAND_NO = #{isSandNo}
  129. </if>
  130. <if test="sandNoNote != null and sandNoNote != ''">
  131. and SAND_NO_NOTE = #{sandNoNote}
  132. </if>
  133. <if test="persId != null and persId != ''">
  134. and PERS_ID = #{persId}
  135. </if>
  136. <if test="intm != null">
  137. and INTM = #{intm}
  138. </if>
  139. <if test="uptm != null">
  140. and UPTM = #{uptm}
  141. </if>
  142. <if test="state != null and state != ''">
  143. and STATE = #{state}
  144. </if>
  145. <if test="dataStat != null and dataStat != ''">
  146. and DATA_STAT = #{dataStat}
  147. </if>
  148. and DATA_STAT='0'
  149. </trim>
  150. </sql>
  151. <select id="get" resultMap="bisInspRvgmBswkResultMap" parameterType="String">
  152. select
  153. <include refid="table_columns"/>
  154. from BIS_INSP_RVGM_BSWK where RGSTR_ID = #{id}
  155. </select>
  156. <select id="getBy" resultMap="bisInspRvgmBswkResultMap">
  157. select
  158. <include refid="table_columns"/>
  159. from BIS_INSP_RVGM_BSWK
  160. <include refid="page_where"/>
  161. </select>
  162. <select id="findAll" resultMap="bisInspRvgmBswkResultMap">
  163. select
  164. <include refid="table_columns"/>
  165. from BIS_INSP_RVGM_BSWK
  166. </select>
  167. <select id="findList" resultMap="bisInspRvgmBswkResultMap">
  168. select
  169. <include refid="table_columns"/>
  170. from BIS_INSP_RVGM_BSWK
  171. <include refid="page_where"/>
  172. </select>
  173. <select id="selectCount" resultType="int">
  174. select count(ID) from BIS_INSP_RVGM_BSWK
  175. <include refid="page_where"/>
  176. </select>
  177. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRvgmBswk">
  178. insert into BIS_INSP_RVGM_BSWK(
  179. <include refid="table_columns"/>
  180. )
  181. values (
  182. <include refid="entity_properties"/>
  183. )
  184. </insert>
  185. <delete id="delete" parameterType="java.lang.String">
  186. update BIS_INSP_RVGM_BSWK set DATA_STAT='9' where ID = #{id}
  187. </delete>
  188. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRvgmBswk">
  189. update BIS_INSP_RVGM_BSWK set DATA_STAT='9'
  190. <include refid="page_where"/>
  191. </delete>
  192. <update id="deleteInFlag" parameterType="java.lang.String">
  193. update BIS_INSP_RVGM_BSWK set DATA_STAT = '9' where ID = #{id}
  194. </update>
  195. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRvgmBswk">
  196. update BIS_INSP_RVGM_BSWK
  197. <trim prefix="set" suffixOverrides=",">
  198. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  199. = #{rgstrId},
  200. </if>
  201. <if test="isBuldSys != null and isBuldSys != ''">IS_BULD_SYS
  202. = #{isBuldSys},
  203. </if>
  204. <if test="buldSysNote != null and buldSysNote != ''">BULD_SYS_NOTE
  205. = #{buldSysNote},
  206. </if>
  207. <if test="isWorkAsk != null and isWorkAsk != ''">IS_WORK_ASK
  208. = #{isWorkAsk},
  209. </if>
  210. <if test="workAskNote != null and workAskNote != ''">WORK_ASK_NOTE
  211. = #{workAskNote},
  212. </if>
  213. <if test="isStndRange != null and isStndRange != ''">IS_STND_RANGE
  214. = #{isStndRange},
  215. </if>
  216. <if test="stndRangeNote != null and stndRangeNote != ''">STND_RANGE_NOTE
  217. = #{stndRangeNote},
  218. </if>
  219. <if test="isCutRange != null and isCutRange != ''">IS_CUT_RANGE
  220. = #{isCutRange},
  221. </if>
  222. <if test="cutRangeNote != null and cutRangeNote != ''">CUT_RANGE_NOTE
  223. = #{cutRangeNote},
  224. </if>
  225. <if test="isBuldPrct != null and isBuldPrct != ''">IS_BULD_PRCT
  226. = #{isBuldPrct},
  227. </if>
  228. <if test="buldPrctNote != null and buldPrctNote != ''">BULD_PRCT_NOTE
  229. = #{buldPrctNote},
  230. </if>
  231. <if test="isFrontPrct != null and isFrontPrct != ''">IS_FRONT_PRCT
  232. = #{isFrontPrct},
  233. </if>
  234. <if test="frontPrctNote != null and frontPrctNote != ''">FRONT_PRCT_NOTE
  235. = #{frontPrctNote},
  236. </if>
  237. <if test="isPlanSand != null and isPlanSand != ''">IS_PLAN_SAND
  238. = #{isPlanSand},
  239. </if>
  240. <if test="planSandNote != null and planSandNote != ''">PLAN_SAND_NOTE
  241. = #{planSandNote},
  242. </if>
  243. <if test="isSandNo != null and isSandNo != ''">IS_SAND_NO
  244. = #{isSandNo},
  245. </if>
  246. <if test="sandNoNote != null and sandNoNote != ''">SAND_NO_NOTE
  247. = #{sandNoNote},
  248. </if>
  249. <if test="persId != null and persId != ''">PERS_ID
  250. = #{persId},
  251. </if>
  252. <if test="intm != null">INTM
  253. = #{intm},
  254. </if>
  255. <if test="uptm != null">UPTM
  256. = #{uptm},
  257. </if>
  258. <if test="state != null and state != ''">STATE
  259. = #{state},
  260. </if>
  261. <if test="dataStat != null and dataStat != ''">DATA_STAT
  262. = #{dataStat},
  263. </if>
  264. </trim>
  265. <where>ID = #{id}</where>
  266. </update>
  267. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRvgmBswk">
  268. update BIS_INSP_RVGM_BSWK
  269. <trim prefix="set" suffixOverrides=",">
  270. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  271. = #{rgstrId},
  272. </if>
  273. <if test="isBuldSys != null and isBuldSys != ''">IS_BULD_SYS
  274. = #{isBuldSys},
  275. </if>
  276. <if test="buldSysNote != null and buldSysNote != ''">BULD_SYS_NOTE
  277. = #{buldSysNote},
  278. </if>
  279. <if test="isWorkAsk != null and isWorkAsk != ''">IS_WORK_ASK
  280. = #{isWorkAsk},
  281. </if>
  282. <if test="workAskNote != null and workAskNote != ''">WORK_ASK_NOTE
  283. = #{workAskNote},
  284. </if>
  285. <if test="isStndRange != null and isStndRange != ''">IS_STND_RANGE
  286. = #{isStndRange},
  287. </if>
  288. <if test="stndRangeNote != null and stndRangeNote != ''">STND_RANGE_NOTE
  289. = #{stndRangeNote},
  290. </if>
  291. <if test="isCutRange != null and isCutRange != ''">IS_CUT_RANGE
  292. = #{isCutRange},
  293. </if>
  294. <if test="cutRangeNote != null and cutRangeNote != ''">CUT_RANGE_NOTE
  295. = #{cutRangeNote},
  296. </if>
  297. <if test="isBuldPrct != null and isBuldPrct != ''">IS_BULD_PRCT
  298. = #{isBuldPrct},
  299. </if>
  300. <if test="buldPrctNote != null and buldPrctNote != ''">BULD_PRCT_NOTE
  301. = #{buldPrctNote},
  302. </if>
  303. <if test="isFrontPrct != null and isFrontPrct != ''">IS_FRONT_PRCT
  304. = #{isFrontPrct},
  305. </if>
  306. <if test="frontPrctNote != null and frontPrctNote != ''">FRONT_PRCT_NOTE
  307. = #{frontPrctNote},
  308. </if>
  309. <if test="isPlanSand != null and isPlanSand != ''">IS_PLAN_SAND
  310. = #{isPlanSand},
  311. </if>
  312. <if test="planSandNote != null and planSandNote != ''">PLAN_SAND_NOTE
  313. = #{planSandNote},
  314. </if>
  315. <if test="isSandNo != null and isSandNo != ''">IS_SAND_NO
  316. = #{isSandNo},
  317. </if>
  318. <if test="sandNoNote != null and sandNoNote != ''">SAND_NO_NOTE
  319. = #{sandNoNote},
  320. </if>
  321. <if test="persId != null and persId != ''">PERS_ID
  322. = #{persId},
  323. </if>
  324. <if test="intm != null">INTM
  325. = #{intm},
  326. </if>
  327. <if test="uptm != null">UPTM
  328. = #{uptm},
  329. </if>
  330. <if test="state != null and state != ''">STATE
  331. = #{state},
  332. </if>
  333. <if test="dataStat != null and dataStat != ''">DATA_STAT
  334. = #{dataStat},
  335. </if>
  336. </trim>
  337. <include refid="page_where"/>
  338. </update>
  339. <!-- 其他自定义SQL -->
  340. </mapper>