BisInspRsvrSdSynDao.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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.BisInspRsvrSdSynDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrSdSyn" id="bisInspRsvrSdSynResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isExpSour" column="IS_EXP_SOUR"/>
  8. <result property="isAskRgstr" column="IS_ASK_RGSTR"/>
  9. <result property="isRgstrNpm" column="IS_RGSTR_NPM"/>
  10. <result property="isRunRvmg" column="IS_RUN_RVMG"/>
  11. <result property="isRunPlan" column="IS_RUN_PLAN"/>
  12. <result property="isStorWater" column="IS_STOR_WATER"/>
  13. <result property="isRunFsltdz" column="IS_RUN_FSLTDZ"/>
  14. <result property="isRunStor" column="IS_RUN_STOR"/>
  15. <result property="isSafIdnt" column="IS_SAF_IDNT"/>
  16. <result property="isIdntPro" column="IS_IDNT_PRO"/>
  17. <result property="isMontTrim" column="IS_MONT_TRIM"/>
  18. <result property="isStorGood" column="IS_STOR_GOOD"/>
  19. <result property="isReqStsf" column="IS_REQ_STSF"/>
  20. <result property="isMgnRoom" column="IS_MGN_ROOM"/>
  21. <result property="isSteRange" column="IS_STE_RANGE"/>
  22. <result property="isRngRisk" column="IS_RNG_RISK"/>
  23. <result property="isRngSlt" column="IS_RNG_SLT"/>
  24. <result property="isInRisk" column="IS_IN_RISK"/>
  25. <result property="isDamRisk" column="IS_DAM_RISK"/>
  26. <result property="isStorLit" column="IS_STOR_LIT"/>
  27. <result property="isRngBuld" column="IS_RNG_BULD"/>
  28. <result property="isClnRub" column="IS_CLN_RUB"/>
  29. <result property="dataStat" column="DATA_STAT"/>
  30. <result property="persId" column="PERS_ID"/>
  31. <result property="intm" column="INTM"/>
  32. <result property="uptm" column="UPTM"/>
  33. <result property="note" column="NOTE"/>
  34. </resultMap>
  35. <sql id="table_columns">
  36. ID,
  37. RGSTR_ID,
  38. IS_EXP_SOUR,
  39. IS_ASK_RGSTR,
  40. IS_RGSTR_NPM,
  41. IS_RUN_RVMG,
  42. IS_RUN_PLAN,
  43. IS_STOR_WATER,
  44. IS_RUN_FSLTDZ,
  45. IS_RUN_STOR,
  46. IS_SAF_IDNT,
  47. IS_IDNT_PRO,
  48. IS_MONT_TRIM,
  49. IS_STOR_GOOD,
  50. IS_REQ_STSF,
  51. IS_MGN_ROOM,
  52. IS_STE_RANGE,
  53. IS_RNG_RISK,
  54. IS_RNG_SLT,
  55. IS_IN_RISK,
  56. IS_DAM_RISK,
  57. IS_STOR_LIT,
  58. IS_RNG_BULD,
  59. IS_CLN_RUB,
  60. DATA_STAT,
  61. PERS_ID,
  62. INTM,
  63. UPTM,
  64. NOTE
  65. </sql>
  66. <sql id="entity_properties">
  67. #{id},
  68. #{rgstrId},
  69. #{isExpSour},
  70. #{isAskRgstr},
  71. #{isRgstrNpm},
  72. #{isRunRvmg},
  73. #{isRunPlan},
  74. #{isStorWater},
  75. #{isRunFsltdz},
  76. #{isRunStor},
  77. #{isSafIdnt},
  78. #{isIdntPro},
  79. #{isMontTrim},
  80. #{isStorGood},
  81. #{isReqStsf},
  82. #{isMgnRoom},
  83. #{isSteRange},
  84. #{isRngRisk},
  85. #{isRngSlt},
  86. #{isInRisk},
  87. #{isDamRisk},
  88. #{isStorLit},
  89. #{isRngBuld},
  90. #{isClnRub},
  91. #{dataStat},
  92. #{persId},
  93. #{intm},
  94. #{uptm},
  95. #{note}
  96. </sql>
  97. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  98. <sql id="page_where">
  99. <trim prefix="where" prefixOverrides="and | or ">
  100. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  101. <if test="isExpSour != null and isExpSour != ''">and IS_EXP_SOUR = #{isExpSour}</if>
  102. <if test="isAskRgstr != null and isAskRgstr != ''">and IS_ASK_RGSTR = #{isAskRgstr}</if>
  103. <if test="isRgstrNpm != null and isRgstrNpm != ''">and IS_RGSTR_NPM = #{isRgstrNpm}</if>
  104. <if test="isRunRvmg != null and isRunRvmg != ''">and IS_RUN_RVMG = #{isRunRvmg}</if>
  105. <if test="isRunPlan != null and isRunPlan != ''">and IS_RUN_PLAN = #{isRunPlan}</if>
  106. <if test="isStorWater != null and isStorWater != ''">and IS_STOR_WATER = #{isStorWater}</if>
  107. <if test="isRunFsltdz != null and isRunFsltdz != ''">and IS_RUN_FSLTDZ = #{isRunFsltdz}</if>
  108. <if test="isRunStor != null and isRunStor != ''">and IS_RUN_STOR = #{isRunStor}</if>
  109. <if test="isSafIdnt != null and isSafIdnt != ''">and IS_SAF_IDNT = #{isSafIdnt}</if>
  110. <if test="isIdntPro != null and isIdntPro != ''">and IS_IDNT_PRO = #{isIdntPro}</if>
  111. <if test="isMontTrim != null and isMontTrim != ''">and IS_MONT_TRIM = #{isMontTrim}</if>
  112. <if test="isStorGood != null and isStorGood != ''">and IS_STOR_GOOD = #{isStorGood}</if>
  113. <if test="isReqStsf != null and isReqStsf != ''">and IS_REQ_STSF = #{isReqStsf}</if>
  114. <if test="isMgnRoom != null and isMgnRoom != ''">and IS_MGN_ROOM = #{isMgnRoom}</if>
  115. <if test="isSteRange != null and isSteRange != ''">and IS_STE_RANGE = #{isSteRange}</if>
  116. <if test="isRngRisk != null and isRngRisk != ''">and IS_RNG_RISK = #{isRngRisk}</if>
  117. <if test="isRngSlt != null and isRngSlt != ''">and IS_RNG_SLT = #{isRngSlt}</if>
  118. <if test="isInRisk != null and isInRisk != ''">and IS_IN_RISK = #{isInRisk}</if>
  119. <if test="isDamRisk != null and isDamRisk != ''">and IS_DAM_RISK = #{isDamRisk}</if>
  120. <if test="isStorLit != null and isStorLit != ''">and IS_STOR_LIT = #{isStorLit}</if>
  121. <if test="isRngBuld != null and isRngBuld != ''">and IS_RNG_BULD = #{isRngBuld}</if>
  122. <if test="isClnRub != null and isClnRub != ''">and IS_CLN_RUB = #{isClnRub}</if>
  123. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  124. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  125. <if test="intm != null">and INTM = #{intm}</if>
  126. <if test="uptm != null">and UPTM = #{uptm}</if>
  127. <if test="note != null and note != ''">and NOTE = #{note}</if>
  128. </trim>
  129. </sql>
  130. <select id="get" resultMap="bisInspRsvrSdSynResultMap" parameterType="String" >
  131. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_SYN where RGSTR_ID = #{id}
  132. </select>
  133. <select id="getBy" resultMap="bisInspRsvrSdSynResultMap">
  134. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_SYN <include refid="page_where" />
  135. </select>
  136. <select id="findAll" resultMap="bisInspRsvrSdSynResultMap">
  137. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_SYN
  138. </select>
  139. <select id="findList" resultMap="bisInspRsvrSdSynResultMap">
  140. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_SYN <include refid="page_where" />
  141. </select>
  142. <select id="selectCount" resultType="int" >
  143. select count(ID) from BIS_INSP_RSVR_SD_SYN <include refid="page_where" />
  144. </select>
  145. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdSyn">
  146. insert into BIS_INSP_RSVR_SD_SYN( <include refid="table_columns" /> )
  147. values ( <include refid="entity_properties" /> )
  148. </insert>
  149. <delete id="delete" parameterType="java.lang.String">
  150. update BIS_INSP_RSVR_SD_SYN set DATA_STAT='9' where ID = #{id}
  151. </delete>
  152. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdSyn">
  153. delete from BIS_INSP_RSVR_SD_SYN <include refid="page_where" />
  154. </delete>
  155. <update id="deleteInFlag" parameterType="java.lang.String">
  156. update BIS_INSP_RSVR_SD_SYN set flag_valid = 0 where ID = #{id}
  157. </update>
  158. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdSyn">
  159. update BIS_INSP_RSVR_SD_SYN
  160. <trim prefix="set" suffixOverrides=",">
  161. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  162. <if test="isExpSour != null and isExpSour != ''">IS_EXP_SOUR = #{isExpSour},</if>
  163. <if test="isAskRgstr != null and isAskRgstr != ''">IS_ASK_RGSTR = #{isAskRgstr},</if>
  164. <if test="isRgstrNpm != null and isRgstrNpm != ''">IS_RGSTR_NPM = #{isRgstrNpm},</if>
  165. <if test="isRunRvmg != null and isRunRvmg != ''">IS_RUN_RVMG = #{isRunRvmg},</if>
  166. <if test="isRunPlan != null and isRunPlan != ''">IS_RUN_PLAN = #{isRunPlan},</if>
  167. <if test="isStorWater != null and isStorWater != ''">IS_STOR_WATER = #{isStorWater},</if>
  168. <if test="isRunFsltdz != null and isRunFsltdz != ''">IS_RUN_FSLTDZ = #{isRunFsltdz},</if>
  169. <if test="isRunStor != null and isRunStor != ''">IS_RUN_STOR = #{isRunStor},</if>
  170. <if test="isSafIdnt != null and isSafIdnt != ''">IS_SAF_IDNT = #{isSafIdnt},</if>
  171. <if test="isIdntPro != null and isIdntPro != ''">IS_IDNT_PRO = #{isIdntPro},</if>
  172. <if test="isMontTrim != null and isMontTrim != ''">IS_MONT_TRIM = #{isMontTrim},</if>
  173. <if test="isStorGood != null and isStorGood != ''">IS_STOR_GOOD = #{isStorGood},</if>
  174. <if test="isReqStsf != null and isReqStsf != ''">IS_REQ_STSF = #{isReqStsf},</if>
  175. <if test="isMgnRoom != null and isMgnRoom != ''">IS_MGN_ROOM = #{isMgnRoom},</if>
  176. <if test="isSteRange != null and isSteRange != ''">IS_STE_RANGE = #{isSteRange},</if>
  177. <if test="isRngRisk != null and isRngRisk != ''">IS_RNG_RISK = #{isRngRisk},</if>
  178. <if test="isRngSlt != null and isRngSlt != ''">IS_RNG_SLT = #{isRngSlt},</if>
  179. <if test="isInRisk != null and isInRisk != ''">IS_IN_RISK = #{isInRisk},</if>
  180. <if test="isDamRisk != null and isDamRisk != ''">IS_DAM_RISK = #{isDamRisk},</if>
  181. <if test="isStorLit != null and isStorLit != ''">IS_STOR_LIT = #{isStorLit},</if>
  182. <if test="isRngBuld != null and isRngBuld != ''">IS_RNG_BULD = #{isRngBuld},</if>
  183. <if test="isClnRub != null and isClnRub != ''">IS_CLN_RUB = #{isClnRub},</if>
  184. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  185. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  186. <if test="intm != null">INTM = #{intm},</if>
  187. <if test="uptm != null">UPTM = #{uptm},</if>
  188. <if test="note != null and note != ''">NOTE = #{note},</if>
  189. </trim>
  190. <where>ID = #{id}</where>
  191. </update>
  192. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdSyn">
  193. update BIS_INSP_RSVR_SD_SYN
  194. <trim prefix="set" suffixOverrides=",">
  195. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  196. <if test="isExpSour != null and isExpSour != ''">IS_EXP_SOUR = #{isExpSour},</if>
  197. <if test="isAskRgstr != null and isAskRgstr != ''">IS_ASK_RGSTR = #{isAskRgstr},</if>
  198. <if test="isRgstrNpm != null and isRgstrNpm != ''">IS_RGSTR_NPM = #{isRgstrNpm},</if>
  199. <if test="isRunRvmg != null and isRunRvmg != ''">IS_RUN_RVMG = #{isRunRvmg},</if>
  200. <if test="isRunPlan != null and isRunPlan != ''">IS_RUN_PLAN = #{isRunPlan},</if>
  201. <if test="isStorWater != null and isStorWater != ''">IS_STOR_WATER = #{isStorWater},</if>
  202. <if test="isRunFsltdz != null and isRunFsltdz != ''">IS_RUN_FSLTDZ = #{isRunFsltdz},</if>
  203. <if test="isRunStor != null and isRunStor != ''">IS_RUN_STOR = #{isRunStor},</if>
  204. <if test="isSafIdnt != null and isSafIdnt != ''">IS_SAF_IDNT = #{isSafIdnt},</if>
  205. <if test="isIdntPro != null and isIdntPro != ''">IS_IDNT_PRO = #{isIdntPro},</if>
  206. <if test="isMontTrim != null and isMontTrim != ''">IS_MONT_TRIM = #{isMontTrim},</if>
  207. <if test="isStorGood != null and isStorGood != ''">IS_STOR_GOOD = #{isStorGood},</if>
  208. <if test="isReqStsf != null and isReqStsf != ''">IS_REQ_STSF = #{isReqStsf},</if>
  209. <if test="isMgnRoom != null and isMgnRoom != ''">IS_MGN_ROOM = #{isMgnRoom},</if>
  210. <if test="isSteRange != null and isSteRange != ''">IS_STE_RANGE = #{isSteRange},</if>
  211. <if test="isRngRisk != null and isRngRisk != ''">IS_RNG_RISK = #{isRngRisk},</if>
  212. <if test="isRngSlt != null and isRngSlt != ''">IS_RNG_SLT = #{isRngSlt},</if>
  213. <if test="isInRisk != null and isInRisk != ''">IS_IN_RISK = #{isInRisk},</if>
  214. <if test="isDamRisk != null and isDamRisk != ''">IS_DAM_RISK = #{isDamRisk},</if>
  215. <if test="isStorLit != null and isStorLit != ''">IS_STOR_LIT = #{isStorLit},</if>
  216. <if test="isRngBuld != null and isRngBuld != ''">IS_RNG_BULD = #{isRngBuld},</if>
  217. <if test="isClnRub != null and isClnRub != ''">IS_CLN_RUB = #{isClnRub},</if>
  218. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  219. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  220. <if test="intm != null">INTM = #{intm},</if>
  221. <if test="uptm != null">UPTM = #{uptm},</if>
  222. <if test="note != null and note != ''">NOTE = #{note},</if>
  223. </trim>
  224. <include refid="page_where" />
  225. </update>
  226. <!-- 其他自定义SQL -->
  227. </mapper>