BisInspRsvrProjectRepDao.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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.BisInspRsvrProjectRepDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrProject" id="bisInspRsvrProjectRepResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="reverOrg" column="REVER_ORG"/>
  8. <result property="reverOrgName" column="REVER_ORG_NAME"/>
  9. <result property="poorCountry" column="POOR_COUNTRY"/>
  10. <result property="waterRunInfo" column="WATER_RUN_INFO"/>
  11. <result property="fsltdzInfo" column="FSLTDZ_INFO"/>
  12. <result property="diskRunInfo" column="DISK_RUN_INFO"/>
  13. <result property="hasSetMainFl" column="HAS_SET_MAIN_FL"/>
  14. <result property="isMainFlNormal" column="IS_MAIN_FL_NORMAL"/>
  15. <result property="hasSetPourFl" column="HAS_SET_POUR_FL"/>
  16. <result property="pourFyIsNormal" column="POUR_FY_IS_NORMAL"/>
  17. <result property="hasExtDamSafeAppr" column="HAS_EXT_DAM_SAFE_APPR"/>
  18. <result property="extDamSafeAppr" column="EXT_DAM_SAFE_APPR"/>
  19. <result property="ifReinForce" column="IF_REIN_FORCE"/>
  20. <result property="reinForceRun" column="REIN_FORCE_RUN"/>
  21. <result property="recPersId" column="REC_PERS_ID"/>
  22. <result property="recPers2" column="REC_PERS2"/>
  23. <result property="recPersTel" column="REC_PERS_TEL"/>
  24. <result property="createTime" column="CREATE_TIME"/>
  25. <result property="updateTime" column="UPDATE_TIME"/>
  26. <result property="status" column="STATUS"/>
  27. <result property="notReinForce" column="NOT_REIN_FORCE"/>
  28. </resultMap>
  29. <sql id="table_columns">
  30. ID,
  31. RGSTR_ID,
  32. REVER_ORG,
  33. REVER_ORG_NAME,
  34. POOR_COUNTRY,
  35. WATER_RUN_INFO,
  36. FSLTDZ_INFO,
  37. DISK_RUN_INFO,
  38. HAS_SET_MAIN_FL,
  39. IS_MAIN_FL_NORMAL,
  40. HAS_SET_POUR_FL,
  41. POUR_FY_IS_NORMAL,
  42. HAS_EXT_DAM_SAFE_APPR,
  43. EXT_DAM_SAFE_APPR,
  44. IF_REIN_FORCE,
  45. REIN_FORCE_RUN,
  46. REC_PERS_ID,
  47. REC_PERS2,
  48. REC_PERS_TEL,
  49. CREATE_TIME,
  50. UPDATE_TIME,
  51. STATUS,
  52. NOT_REIN_FORCE
  53. </sql>
  54. <sql id="entity_properties">
  55. #{id},
  56. #{rgstrId},
  57. #{reverOrg},
  58. #{reverOrgName},
  59. #{poorCountry},
  60. #{waterRunInfo},
  61. #{fsltdzInfo},
  62. #{diskRunInfo},
  63. #{hasSetMainFl},
  64. #{isMainFlNormal},
  65. #{hasSetPourFl},
  66. #{pourFyIsNormal},
  67. #{hasExtDamSafeAppr},
  68. #{extDamSafeAppr},
  69. #{ifReinForce},
  70. #{reinForceRun},
  71. #{recPersId},
  72. #{recPers2},
  73. #{recPersTel},
  74. #{createTime},
  75. #{updateTime},
  76. #{status},
  77. #{notReinForce}
  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 != ''">and RGSTR_ID = #{rgstrId}</if>
  83. <if test="reverOrg != null and reverOrg != ''">and REVER_ORG = #{reverOrg}</if>
  84. <if test="reverOrgName != null and reverOrgName != ''">and REVER_ORG_NAME = #{reverOrgName}</if>
  85. <if test="poorCountry != null and poorCountry != ''">and POOR_COUNTRY = #{poorCountry}</if>
  86. <if test="waterRunInfo != null and waterRunInfo != ''">and WATER_RUN_INFO = #{waterRunInfo}</if>
  87. <if test="fsltdzInfo != null and fsltdzInfo != ''">and FSLTDZ_INFO = #{fsltdzInfo}</if>
  88. <if test="diskRunInfo != null and diskRunInfo != ''">and DISK_RUN_INFO = #{diskRunInfo}</if>
  89. <if test="hasSetMainFl != null and hasSetMainFl != ''">and HAS_SET_MAIN_FL = #{hasSetMainFl}</if>
  90. <if test="isMainFlNormal != null and isMainFlNormal != ''">and IS_MAIN_FL_NORMAL = #{isMainFlNormal}</if>
  91. <if test="hasSetPourFl != null and hasSetPourFl != ''">and HAS_SET_POUR_FL = #{hasSetPourFl}</if>
  92. <if test="pourFyIsNormal != null and pourFyIsNormal != ''">and POUR_FY_IS_NORMAL = #{pourFyIsNormal}</if>
  93. <if test="hasExtDamSafeAppr != null and hasExtDamSafeAppr != ''">and HAS_EXT_DAM_SAFE_APPR = #{hasExtDamSafeAppr}</if>
  94. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">and EXT_DAM_SAFE_APPR = #{extDamSafeAppr}</if>
  95. <if test="ifReinForce != null and ifReinForce != ''">and IF_REIN_FORCE = #{ifReinForce}</if>
  96. <if test="reinForceRun != null and reinForceRun != ''">and REIN_FORCE_RUN = #{reinForceRun}</if>
  97. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  98. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  99. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  100. <if test="createTime != null">and CREATE_TIME = #{createTime}</if>
  101. <if test="updateTime != null">and UPDATE_TIME = #{updateTime}</if>
  102. <if test="status != null and status != ''">and STATUS = #{status}</if>
  103. <if test="notReinForce != null and notReinForce != ''">and NOT_REIN_FORCE = #{notReinForce}</if>
  104. </trim>
  105. </sql>
  106. <select id="get" resultMap="bisInspRsvrProjectRepResultMap" parameterType="String" >
  107. select <include refid="table_columns" /> from BIS_INSP_RSVR_PROJECT_REP where ID = #{id}
  108. </select>
  109. <select id="getBy" resultMap="bisInspRsvrProjectRepResultMap">
  110. select <include refid="table_columns" /> from BIS_INSP_RSVR_PROJECT_REP <include refid="page_where" />
  111. </select>
  112. <select id="findAll" resultMap="bisInspRsvrProjectRepResultMap">
  113. select <include refid="table_columns" /> from BIS_INSP_RSVR_PROJECT_REP
  114. </select>
  115. <select id="findList" resultMap="bisInspRsvrProjectRepResultMap">
  116. select <include refid="table_columns" /> from BIS_INSP_RSVR_PROJECT_REP <include refid="page_where" />
  117. </select>
  118. <select id="selectCount" resultType="int" >
  119. select count(ID) from BIS_INSP_RSVR_PROJECT_REP <include refid="page_where" />
  120. </select>
  121. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrProject">
  122. insert into BIS_INSP_RSVR_PROJECT_REP( <include refid="table_columns" /> )
  123. values ( <include refid="entity_properties" /> )
  124. </insert>
  125. <delete id="delete" parameterType="java.lang.String">
  126. delete from BIS_INSP_RSVR_PROJECT_REP where ID = #{id}
  127. </delete>
  128. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrProject">
  129. delete from BIS_INSP_RSVR_PROJECT_REP <include refid="page_where" />
  130. </delete>
  131. <update id="deleteInFlag" parameterType="java.lang.String">
  132. update BIS_INSP_RSVR_PROJECT_REP set flag_valid = 0 where ID = #{id}
  133. </update>
  134. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrProject">
  135. update BIS_INSP_RSVR_PROJECT_REP
  136. <trim prefix="set" suffixOverrides=",">
  137. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  138. <if test="reverOrg != null and reverOrg != ''">REVER_ORG = #{reverOrg},</if>
  139. <if test="reverOrgName != null and reverOrgName != ''">REVER_ORG_NAME = #{reverOrgName},</if>
  140. <if test="poorCountry != null and poorCountry != ''">POOR_COUNTRY = #{poorCountry},</if>
  141. <if test="waterRunInfo != null and waterRunInfo != ''">WATER_RUN_INFO = #{waterRunInfo},</if>
  142. <if test="fsltdzInfo != null and fsltdzInfo != ''">FSLTDZ_INFO = #{fsltdzInfo},</if>
  143. <if test="diskRunInfo != null and diskRunInfo != ''">DISK_RUN_INFO = #{diskRunInfo},</if>
  144. <if test="hasSetMainFl != null and hasSetMainFl != ''">HAS_SET_MAIN_FL = #{hasSetMainFl},</if>
  145. <if test="isMainFlNormal != null and isMainFlNormal != ''">IS_MAIN_FL_NORMAL = #{isMainFlNormal},</if>
  146. <if test="hasSetPourFl != null and hasSetPourFl != ''">HAS_SET_POUR_FL = #{hasSetPourFl},</if>
  147. <if test="pourFyIsNormal != null and pourFyIsNormal != ''">POUR_FY_IS_NORMAL = #{pourFyIsNormal},</if>
  148. <if test="hasExtDamSafeAppr != null and hasExtDamSafeAppr != ''">HAS_EXT_DAM_SAFE_APPR = #{hasExtDamSafeAppr},</if>
  149. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">EXT_DAM_SAFE_APPR = #{extDamSafeAppr},</if>
  150. <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
  151. <if test="reinForceRun != null and reinForceRun != ''">REIN_FORCE_RUN = #{reinForceRun},</if>
  152. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  153. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  154. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  155. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  156. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  157. <if test="status != null and status != ''">STATUS = #{status},</if>
  158. <if test="notReinForce != null and notReinForce != ''">NOT_REIN_FORCE = #{notReinForce},</if>
  159. </trim>
  160. <where>ID = #{id}</where>
  161. </update>
  162. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrProject">
  163. update BIS_INSP_RSVR_PROJECT_REP
  164. <trim prefix="set" suffixOverrides=",">
  165. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  166. <if test="reverOrg != null and reverOrg != ''">REVER_ORG = #{reverOrg},</if>
  167. <if test="reverOrgName != null and reverOrgName != ''">REVER_ORG_NAME = #{reverOrgName},</if>
  168. <if test="poorCountry != null and poorCountry != ''">POOR_COUNTRY = #{poorCountry},</if>
  169. <if test="waterRunInfo != null and waterRunInfo != ''">WATER_RUN_INFO = #{waterRunInfo},</if>
  170. <if test="fsltdzInfo != null and fsltdzInfo != ''">FSLTDZ_INFO = #{fsltdzInfo},</if>
  171. <if test="diskRunInfo != null and diskRunInfo != ''">DISK_RUN_INFO = #{diskRunInfo},</if>
  172. <if test="hasSetMainFl != null and hasSetMainFl != ''">HAS_SET_MAIN_FL = #{hasSetMainFl},</if>
  173. <if test="isMainFlNormal != null and isMainFlNormal != ''">IS_MAIN_FL_NORMAL = #{isMainFlNormal},</if>
  174. <if test="hasSetPourFl != null and hasSetPourFl != ''">HAS_SET_POUR_FL = #{hasSetPourFl},</if>
  175. <if test="pourFyIsNormal != null and pourFyIsNormal != ''">POUR_FY_IS_NORMAL = #{pourFyIsNormal},</if>
  176. <if test="hasExtDamSafeAppr != null and hasExtDamSafeAppr != ''">HAS_EXT_DAM_SAFE_APPR = #{hasExtDamSafeAppr},</if>
  177. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">EXT_DAM_SAFE_APPR = #{extDamSafeAppr},</if>
  178. <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
  179. <if test="reinForceRun != null and reinForceRun != ''">REIN_FORCE_RUN = #{reinForceRun},</if>
  180. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  181. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  182. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  183. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  184. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  185. <if test="status != null and status != ''">STATUS = #{status},</if>
  186. <if test="notReinForce != null and notReinForce != ''">NOT_REIN_FORCE = #{notReinForce},</if>
  187. </trim>
  188. <include refid="page_where" />
  189. </update>
  190. <!-- 其他自定义SQL -->
  191. </mapper>