BisInspStndDtyminDao.xml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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.BisInspStndDtyminDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspStndDtymin" id="bisInspStndDtyminResultMap">
  5. <result property="status" column="STATUS"/>
  6. <result property="id" column="ID"/>
  7. <result property="rgstrId" column="RGSTR_ID"/>
  8. <result property="rsCode" column="RS_CODE"/>
  9. <result property="rsvrNm" column="RSVR_NM"/>
  10. <result property="engScal" column="ENG_SCAL"/>
  11. <result property="isSetMain" column="IS_SET_MAIN"/>
  12. <result property="isMainAll" column="IS_MAIN_ALL"/>
  13. <result property="isClear" column="IS_CLEAR"/>
  14. <result property="isWeed" column="IS_WEED"/>
  15. <result property="isExceed" column="IS_EXCEED"/>
  16. <result property="isGully" column="IS_GULLY"/>
  17. <result property="isWaterWeed" column="IS_WATER_WEED"/>
  18. <result property="isFish" column="IS_FISH"/>
  19. <result property="isSundries" column="IS_SUNDRIES"/>
  20. <result property="isWagaSundries" column="IS_WAGA_SUNDRIES"/>
  21. <result property="isHoist" column="IS_HOIST"/>
  22. <result property="persId" column="PERS_ID"/>
  23. <result property="note" column="NOTE"/>
  24. <result property="intm" column="INTM"/>
  25. <result property="uptm" column="UPTM"/>
  26. <result property="dataStat" column="DATA_STAT"/>
  27. </resultMap>
  28. <sql id="table_columns">
  29. STATUS,
  30. ID,
  31. RGSTR_ID,
  32. RS_CODE,
  33. RSVR_NM,
  34. ENG_SCAL,
  35. IS_SET_MAIN,
  36. IS_MAIN_ALL,
  37. IS_CLEAR,
  38. IS_WEED,
  39. IS_EXCEED,
  40. IS_GULLY,
  41. IS_WATER_WEED,
  42. IS_FISH,
  43. IS_SUNDRIES,
  44. IS_WAGA_SUNDRIES,
  45. IS_HOIST,
  46. PERS_ID,
  47. NOTE,
  48. INTM,
  49. UPTM,
  50. DATA_STAT
  51. </sql>
  52. <sql id="entity_properties">
  53. #{status},
  54. #{id},
  55. #{rgstrId},
  56. #{rsCode},
  57. #{rsvrNm},
  58. #{engScal},
  59. #{isSetMain},
  60. #{isMainAll},
  61. #{isClear},
  62. #{isWeed},
  63. #{isExceed},
  64. #{isGully},
  65. #{isWaterWeed},
  66. #{isFish},
  67. #{isSundries},
  68. #{isWagaSundries},
  69. #{isHoist},
  70. #{persId},
  71. #{note},
  72. #{intm},
  73. #{uptm},
  74. #{dataStat}
  75. </sql>
  76. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  77. <sql id="page_where">
  78. <trim prefix="where" prefixOverrides="and | or ">
  79. <if test="id != null and id != ''">and ID = #{id}</if>
  80. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  81. <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
  82. <if test="rsvrNm != null and rsvrNm != ''">and RSVR_NM = #{rsvrNm}</if>
  83. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  84. <if test="isSetMain != null and isSetMain != ''">and IS_SET_MAIN = #{isSetMain}</if>
  85. <if test="isMainAll != null and isMainAll != ''">and IS_MAIN_ALL = #{isMainAll}</if>
  86. <if test="isClear != null and isClear != ''">and IS_CLEAR = #{isClear}</if>
  87. <if test="isWeed != null and isWeed != ''">and IS_WEED = #{isWeed}</if>
  88. <if test="isExceed != null and isExceed != ''">and IS_EXCEED = #{isExceed}</if>
  89. <if test="isGully != null and isGully != ''">and IS_GULLY = #{isGully}</if>
  90. <if test="isWaterWeed != null and isWaterWeed != ''">and IS_WATER_WEED = #{isWaterWeed}</if>
  91. <if test="isFish != null and isFish != ''">and IS_FISH = #{isFish}</if>
  92. <if test="isSundries != null and isSundries != ''">and IS_SUNDRIES = #{isSundries}</if>
  93. <if test="isWagaSundries != null and isWagaSundries != ''">and IS_WAGA_SUNDRIES = #{isWagaSundries}</if>
  94. <if test="isHoist != null and isHoist != ''">and IS_HOIST = #{isHoist}</if>
  95. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  96. <if test="note != null and note != ''">and NOTE = #{note}</if>
  97. <if test="intm != null">and INTM = #{intm}</if>
  98. <if test="uptm != null">and UPTM = #{uptm}</if>
  99. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  100. <if test="status != null and status != ''">and STATUS = #{status}</if>
  101. and DATA_STAT='0'
  102. </trim>
  103. </sql>
  104. <select id="get" resultMap="bisInspStndDtyminResultMap" parameterType="String" >
  105. select <include refid="table_columns" /> from BIS_INSP_STND_DTYMIN where ID = #{id}
  106. </select>
  107. <select id="getBy" resultMap="bisInspStndDtyminResultMap">
  108. select <include refid="table_columns" /> from BIS_INSP_STND_DTYMIN <include refid="page_where" />
  109. </select>
  110. <select id="findAll" resultMap="bisInspStndDtyminResultMap">
  111. select <include refid="table_columns" /> from BIS_INSP_STND_DTYMIN
  112. </select>
  113. <select id="findList" resultMap="bisInspStndDtyminResultMap">
  114. select <include refid="table_columns" /> from BIS_INSP_STND_DTYMIN <include refid="page_where" />
  115. </select>
  116. <select id="selectCount" resultType="int" >
  117. select count(ID) from BIS_INSP_STND_DTYMIN <include refid="page_where" />
  118. </select>
  119. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspStndDtymin">
  120. insert into BIS_INSP_STND_DTYMIN( <include refid="table_columns" /> )
  121. values ( <include refid="entity_properties" /> )
  122. </insert>
  123. <delete id="delete" parameterType="java.lang.String">
  124. update BIS_INSP_STND_DTYMIN set DATA_STAT='9' where ID = #{id}
  125. </delete>
  126. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStndDtymin">
  127. update BIS_INSP_STND_DTYMIN set DATA_STAT='9' <include refid="page_where" />
  128. </delete>
  129. <update id="deleteInFlag" parameterType="java.lang.String">
  130. update BIS_INSP_STND_DTYMIN set DATA_STAT = '9' where ID = #{id}
  131. </update>
  132. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspStndDtymin">
  133. update BIS_INSP_STND_DTYMIN
  134. <trim prefix="set" suffixOverrides=",">
  135. <if test="id != null and id != ''">ID = #{id},</if>
  136. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  137. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  138. <if test="rsvrNm != null and rsvrNm != ''">RSVR_NM = #{rsvrNm},</if>
  139. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  140. <if test="isSetMain != null and isSetMain != ''">IS_SET_MAIN = #{isSetMain},</if>
  141. <if test="isMainAll != null and isMainAll != ''">IS_MAIN_ALL = #{isMainAll},</if>
  142. <if test="isClear != null and isClear != ''">IS_CLEAR = #{isClear},</if>
  143. <if test="isWeed != null and isWeed != ''">IS_WEED = #{isWeed},</if>
  144. <if test="isExceed != null and isExceed != ''">IS_EXCEED = #{isExceed},</if>
  145. <if test="isGully != null and isGully != ''">IS_GULLY = #{isGully},</if>
  146. <if test="isWaterWeed != null and isWaterWeed != ''">IS_WATER_WEED = #{isWaterWeed},</if>
  147. <if test="isFish != null and isFish != ''">IS_FISH = #{isFish},</if>
  148. <if test="isSundries != null and isSundries != ''">IS_SUNDRIES = #{isSundries},</if>
  149. <if test="isWagaSundries != null and isWagaSundries != ''">IS_WAGA_SUNDRIES = #{isWagaSundries},</if>
  150. <if test="isHoist != null and isHoist != ''">IS_HOIST = #{isHoist},</if>
  151. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  152. <if test="note != null and note != ''">NOTE = #{note},</if>
  153. <if test="intm != null">INTM = #{intm},</if>
  154. <if test="uptm != null">UPTM = #{uptm},</if>
  155. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  156. <if test="status != null and status != ''">STATUS = #{status},</if>
  157. </trim>
  158. <where>ID = #{id}</where>
  159. </update>
  160. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStndDtymin">
  161. update BIS_INSP_STND_DTYMIN
  162. <trim prefix="set" suffixOverrides=",">
  163. <if test="id != null and id != ''">ID = #{id},</if>
  164. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  165. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  166. <if test="rsvrNm != null and rsvrNm != ''">RSVR_NM = #{rsvrNm},</if>
  167. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  168. <if test="isSetMain != null and isSetMain != ''">IS_SET_MAIN = #{isSetMain},</if>
  169. <if test="isMainAll != null and isMainAll != ''">IS_MAIN_ALL = #{isMainAll},</if>
  170. <if test="isClear != null and isClear != ''">IS_CLEAR = #{isClear},</if>
  171. <if test="isWeed != null and isWeed != ''">IS_WEED = #{isWeed},</if>
  172. <if test="isExceed != null and isExceed != ''">IS_EXCEED = #{isExceed},</if>
  173. <if test="isGully != null and isGully != ''">IS_GULLY = #{isGully},</if>
  174. <if test="isWaterWeed != null and isWaterWeed != ''">IS_WATER_WEED = #{isWaterWeed},</if>
  175. <if test="isFish != null and isFish != ''">IS_FISH = #{isFish},</if>
  176. <if test="isSundries != null and isSundries != ''">IS_SUNDRIES = #{isSundries},</if>
  177. <if test="isWagaSundries != null and isWagaSundries != ''">IS_WAGA_SUNDRIES = #{isWagaSundries},</if>
  178. <if test="isHoist != null and isHoist != ''">IS_HOIST = #{isHoist},</if>
  179. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  180. <if test="note != null and note != ''">NOTE = #{note},</if>
  181. <if test="intm != null">INTM = #{intm},</if>
  182. <if test="uptm != null">UPTM = #{uptm},</if>
  183. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  184. <if test="status != null and status != ''">STATUS = #{status},</if>
  185. </trim>
  186. <include refid="page_where" />
  187. </update>
  188. <!-- 其他自定义SQL -->
  189. </mapper>