BisInspRssfgdBaseDao.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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.BisInspRssfgdBaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRssfgdBase" id="bisInspRssfgdBaseResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="budDep" column="BUD_DEP"/>
  8. <result property="budDepPers" column="BUD_DEP_PERS"/>
  9. <result property="budDepPersTel" column="BUD_DEP_PERS_TEL"/>
  10. <result property="comDep" column="COM_DEP"/>
  11. <result property="comDepPers" column="COM_DEP_PERS"/>
  12. <result property="comDepPersTel" column="COM_DEP_PERS_TEL"/>
  13. <result property="chkTm" column="CHK_TM"/>
  14. <result property="mendTm" column="MEND_TM"/>
  15. <result property="chkDep" column="CHK_DEP"/>
  16. <result property="chkDepPers" column="CHK_DEP_PERS"/>
  17. <result property="planTask" column="PLAN_TASK"/>
  18. <result property="actCase" column="ACT_CASE"/>
  19. <result property="persId" column="PERS_ID"/>
  20. <result property="intm" column="INTM"/>
  21. <result property="uptm" column="UPTM"/>
  22. <result property="note" column="NOTE"/>
  23. <result property="state" column="STATE"/>
  24. <result property="dataStat" column="DATA_STAT"/>
  25. </resultMap>
  26. <sql id="table_columns">
  27. ID,
  28. RGSTR_ID,
  29. BUD_DEP,
  30. BUD_DEP_PERS,
  31. BUD_DEP_PERS_TEL,
  32. COM_DEP,
  33. COM_DEP_PERS,
  34. COM_DEP_PERS_TEL,
  35. CHK_TM,
  36. MEND_TM,
  37. CHK_DEP,
  38. CHK_DEP_PERS,
  39. PLAN_TASK,
  40. ACT_CASE,
  41. PERS_ID,
  42. INTM,
  43. UPTM,
  44. NOTE,
  45. STATE,
  46. DATA_STAT
  47. </sql>
  48. <sql id="entity_properties">
  49. #{id},
  50. #{rgstrId},
  51. #{budDep},
  52. #{budDepPers},
  53. #{budDepPersTel},
  54. #{comDep},
  55. #{comDepPers},
  56. #{comDepPersTel},
  57. #{chkTm},
  58. #{mendTm},
  59. #{chkDep},
  60. #{chkDepPers},
  61. #{planTask},
  62. #{actCase},
  63. #{persId},
  64. #{intm},
  65. #{uptm},
  66. #{note},
  67. #{state},
  68. #{dataStat}
  69. </sql>
  70. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  71. <sql id="page_where">
  72. <trim prefix="where" prefixOverrides="and | or ">
  73. <if test="rgstrId != null and rgstrId != ''">
  74. and RGSTR_ID = #{rgstrId}
  75. </if>
  76. <if test="budDep != null and budDep != ''">
  77. and BUD_DEP = #{budDep}
  78. </if>
  79. <if test="budDepPers != null and budDepPers != ''">
  80. and BUD_DEP_PERS = #{budDepPers}
  81. </if>
  82. <if test="budDepPersTel != null and budDepPersTel != ''">
  83. and BUD_DEP_PERS_TEL = #{budDepPersTel}
  84. </if>
  85. <if test="comDep != null and comDep != ''">
  86. and COM_DEP = #{comDep}
  87. </if>
  88. <if test="comDepPers != null and comDepPers != ''">
  89. and COM_DEP_PERS = #{comDepPers}
  90. </if>
  91. <if test="comDepPersTel != null and comDepPersTel != ''">
  92. and COM_DEP_PERS_TEL = #{comDepPersTel}
  93. </if>
  94. <if test="chkTm != null">
  95. and CHK_TM = #{chkTm}
  96. </if>
  97. <if test="mendTm != null">
  98. and MEND_TM = #{mendTm}
  99. </if>
  100. <if test="chkDep != null and chkDep != ''">
  101. and CHK_DEP = #{chkDep}
  102. </if>
  103. <if test="chkDepPers != null and chkDepPers != ''">
  104. and CHK_DEP_PERS = #{chkDepPers}
  105. </if>
  106. <if test="planTask != null and planTask != ''">
  107. and PLAN_TASK = #{planTask}
  108. </if>
  109. <if test="actCase != null and actCase != ''">
  110. and ACT_CASE = #{actCase}
  111. </if>
  112. <if test="persId != null and persId != ''">
  113. and PERS_ID = #{persId}
  114. </if>
  115. <if test="intm != null">
  116. and INTM = #{intm}
  117. </if>
  118. <if test="uptm != null">
  119. and UPTM = #{uptm}
  120. </if>
  121. <if test="note != null and note != ''">
  122. and NOTE = #{note}
  123. </if>
  124. <if test="state != null and state != ''">
  125. and STATE = #{state}
  126. </if>
  127. <if test="dataStat != null and dataStat != ''">
  128. and DATA_STAT = #{dataStat}
  129. </if>
  130. and DATA_STAT='0'
  131. </trim>
  132. </sql>
  133. <select id="get" resultMap="bisInspRssfgdBaseResultMap" parameterType="String">
  134. select
  135. <include refid="table_columns"/>
  136. from BIS_INSP_RSSFGD_BASE where RGSTR_ID = #{id}
  137. </select>
  138. <select id="getBy" resultMap="bisInspRssfgdBaseResultMap">
  139. select
  140. <include refid="table_columns"/>
  141. from BIS_INSP_RSSFGD_BASE
  142. <include refid="page_where"/>
  143. </select>
  144. <select id="findAll" resultMap="bisInspRssfgdBaseResultMap">
  145. select
  146. <include refid="table_columns"/>
  147. from BIS_INSP_RSSFGD_BASE
  148. </select>
  149. <select id="findList" resultMap="bisInspRssfgdBaseResultMap">
  150. select
  151. <include refid="table_columns"/>
  152. from BIS_INSP_RSSFGD_BASE
  153. <include refid="page_where"/>
  154. </select>
  155. <select id="selectCount" resultType="int">
  156. select count(ID) from BIS_INSP_RSSFGD_BASE
  157. <include refid="page_where"/>
  158. </select>
  159. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfgdBase">
  160. insert into BIS_INSP_RSSFGD_BASE(
  161. <include refid="table_columns"/>
  162. )
  163. values (
  164. <include refid="entity_properties"/>
  165. )
  166. </insert>
  167. <delete id="delete" parameterType="java.lang.String">
  168. update BIS_INSP_RSSFGD_BASE set DATA_STAT='9' where ID = #{id}
  169. </delete>
  170. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfgdBase">
  171. update BIS_INSP_RSSFGD_BASE set DATA_STAT='9'
  172. <include refid="page_where"/>
  173. </delete>
  174. <update id="deleteInFlag" parameterType="java.lang.String">
  175. update BIS_INSP_RSSFGD_BASE set DATA_STAT = '9' where ID = #{id}
  176. </update>
  177. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfgdBase">
  178. update BIS_INSP_RSSFGD_BASE
  179. <trim prefix="set" suffixOverrides=",">
  180. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  181. = #{rgstrId},
  182. </if>
  183. <if test="budDep != null and budDep != ''">BUD_DEP
  184. = #{budDep},
  185. </if>
  186. <if test="budDepPers != null and budDepPers != ''">BUD_DEP_PERS
  187. = #{budDepPers},
  188. </if>
  189. <if test="budDepPersTel != null and budDepPersTel != ''">BUD_DEP_PERS_TEL
  190. = #{budDepPersTel},
  191. </if>
  192. <if test="comDep != null and comDep != ''">COM_DEP
  193. = #{comDep},
  194. </if>
  195. <if test="comDepPers != null and comDepPers != ''">COM_DEP_PERS
  196. = #{comDepPers},
  197. </if>
  198. <if test="comDepPersTel != null and comDepPersTel != ''">COM_DEP_PERS_TEL
  199. = #{comDepPersTel},
  200. </if>
  201. <if test="chkTm != null">CHK_TM
  202. = #{chkTm},
  203. </if>
  204. <if test="mendTm != null">MEND_TM
  205. = #{mendTm},
  206. </if>
  207. <if test="chkDep != null and chkDep != ''">CHK_DEP
  208. = #{chkDep},
  209. </if>
  210. <if test="chkDepPers != null and chkDepPers != ''">CHK_DEP_PERS
  211. = #{chkDepPers},
  212. </if>
  213. <if test="planTask != null and planTask != ''">PLAN_TASK
  214. = #{planTask},
  215. </if>
  216. <if test="actCase != null and actCase != ''">ACT_CASE
  217. = #{actCase},
  218. </if>
  219. <if test="persId != null and persId != ''">PERS_ID
  220. = #{persId},
  221. </if>
  222. <if test="intm != null">INTM
  223. = #{intm},
  224. </if>
  225. <if test="uptm != null">UPTM
  226. = #{uptm},
  227. </if>
  228. <if test="note != null and note != ''">NOTE
  229. = #{note},
  230. </if>
  231. <if test="state != null and state != ''">STATE
  232. = #{state},
  233. </if>
  234. <if test="dataStat != null and dataStat != ''">DATA_STAT
  235. = #{dataStat},
  236. </if>
  237. </trim>
  238. <where>ID = #{id}</where>
  239. </update>
  240. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfgdBase">
  241. update BIS_INSP_RSSFGD_BASE
  242. <trim prefix="set" suffixOverrides=",">
  243. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  244. = #{rgstrId},
  245. </if>
  246. <if test="budDep != null and budDep != ''">BUD_DEP
  247. = #{budDep},
  248. </if>
  249. <if test="budDepPers != null and budDepPers != ''">BUD_DEP_PERS
  250. = #{budDepPers},
  251. </if>
  252. <if test="budDepPersTel != null and budDepPersTel != ''">BUD_DEP_PERS_TEL
  253. = #{budDepPersTel},
  254. </if>
  255. <if test="comDep != null and comDep != ''">COM_DEP
  256. = #{comDep},
  257. </if>
  258. <if test="comDepPers != null and comDepPers != ''">COM_DEP_PERS
  259. = #{comDepPers},
  260. </if>
  261. <if test="comDepPersTel != null and comDepPersTel != ''">COM_DEP_PERS_TEL
  262. = #{comDepPersTel},
  263. </if>
  264. <if test="chkTm != null">CHK_TM
  265. = #{chkTm},
  266. </if>
  267. <if test="mendTm != null">MEND_TM
  268. = #{mendTm},
  269. </if>
  270. <if test="chkDep != null and chkDep != ''">CHK_DEP
  271. = #{chkDep},
  272. </if>
  273. <if test="chkDepPers != null and chkDepPers != ''">CHK_DEP_PERS
  274. = #{chkDepPers},
  275. </if>
  276. <if test="planTask != null and planTask != ''">PLAN_TASK
  277. = #{planTask},
  278. </if>
  279. <if test="actCase != null and actCase != ''">ACT_CASE
  280. = #{actCase},
  281. </if>
  282. <if test="persId != null and persId != ''">PERS_ID
  283. = #{persId},
  284. </if>
  285. <if test="intm != null">INTM
  286. = #{intm},
  287. </if>
  288. <if test="uptm != null">UPTM
  289. = #{uptm},
  290. </if>
  291. <if test="note != null and note != ''">NOTE
  292. = #{note},
  293. </if>
  294. <if test="state != null and state != ''">STATE
  295. = #{state},
  296. </if>
  297. <if test="dataStat != null and dataStat != ''">DATA_STAT
  298. = #{dataStat},
  299. </if>
  300. </trim>
  301. <include refid="page_where"/>
  302. </update>
  303. <!-- 其他自定义SQL -->
  304. </mapper>