BisInspStndMgamtDao.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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.BisInspStndMgamtDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspStndMgamt" id="bisInspStndMgamtResultMap">
  5. <result property="isGaugeClear" column="IS_GAUGE_CLEAR"/>
  6. <result property="status" column="STATUS"/>
  7. <result property="id" column="ID"/>
  8. <result property="rgstrId" column="RGSTR_ID"/>
  9. <result property="rsCode" column="RS_CODE"/>
  10. <result property="rsvrNm" column="RSVR_NM"/>
  11. <result property="engScal" column="ENG_SCAL"/>
  12. <result property="isGauge" column="IS_GAUGE"/>
  13. <result property="isRainSys" column="IS_RAIN_SYS"/>
  14. <result property="isMaterials" column="IS_MATERIALS"/>
  15. <result property="isPubSignboard" column="IS_PUB_SIGNBOARD"/>
  16. <result property="isWarnSignboard" column="IS_WARN_SIGNBOARD"/>
  17. <result property="persId" column="PERS_ID"/>
  18. <result property="note" column="NOTE"/>
  19. <result property="intm" column="INTM"/>
  20. <result property="uptm" column="UPTM"/>
  21. <result property="dataStat" column="DATA_STAT"/>
  22. </resultMap>
  23. <sql id="table_columns">
  24. IS_GAUGE_CLEAR,
  25. STATUS,
  26. ID,
  27. RGSTR_ID,
  28. RS_CODE,
  29. RSVR_NM,
  30. ENG_SCAL,
  31. IS_GAUGE,
  32. IS_RAIN_SYS,
  33. IS_MATERIALS,
  34. IS_PUB_SIGNBOARD,
  35. IS_WARN_SIGNBOARD,
  36. PERS_ID,
  37. NOTE,
  38. INTM,
  39. UPTM,
  40. DATA_STAT
  41. </sql>
  42. <sql id="entity_properties">
  43. #{isGaugeClear},
  44. #{status},
  45. #{id},
  46. #{rgstrId},
  47. #{rsCode},
  48. #{rsvrNm},
  49. #{engScal},
  50. #{isGauge},
  51. #{isRainSys},
  52. #{isMaterials},
  53. #{isPubSignboard},
  54. #{isWarnSignboard},
  55. #{persId},
  56. #{note},
  57. #{intm},
  58. #{uptm},
  59. #{dataStat}
  60. </sql>
  61. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  62. <sql id="page_where">
  63. <trim prefix="where" prefixOverrides="and | or ">
  64. <if test="status != null and status != ''">and STATUS = #{status}</if>
  65. <if test="id != null and id != ''">and ID = #{id}</if>
  66. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  67. <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
  68. <if test="rsvrNm != null and rsvrNm != ''">and RSVR_NM = #{rsvrNm}</if>
  69. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  70. <if test="isGauge != null and isGauge != ''">and IS_GAUGE = #{isGauge}</if>
  71. <if test="isRainSys != null and isRainSys != ''">and IS_RAIN_SYS = #{isRainSys}</if>
  72. <if test="isMaterials != null and isMaterials != ''">and IS_MATERIALS = #{isMaterials}</if>
  73. <if test="isPubSignboard != null and isPubSignboard != ''">and IS_PUB_SIGNBOARD = #{isPubSignboard}</if>
  74. <if test="isWarnSignboard != null and isWarnSignboard != ''">and IS_WARN_SIGNBOARD = #{isWarnSignboard}</if>
  75. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  76. <if test="note != null and note != ''">and NOTE = #{note}</if>
  77. <if test="intm != null">and INTM = #{intm}</if>
  78. <if test="uptm != null">and UPTM = #{uptm}</if>
  79. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  80. and DATA_STAT='0'
  81. </trim>
  82. </sql>
  83. <select id="get" resultMap="bisInspStndMgamtResultMap" parameterType="String" >
  84. select <include refid="table_columns" /> from BIS_INSP_STND_MGAMT where ID = #{id}
  85. </select>
  86. <select id="getBy" resultMap="bisInspStndMgamtResultMap">
  87. select <include refid="table_columns" /> from BIS_INSP_STND_MGAMT <include refid="page_where" />
  88. </select>
  89. <select id="findAll" resultMap="bisInspStndMgamtResultMap">
  90. select <include refid="table_columns" /> from BIS_INSP_STND_MGAMT
  91. </select>
  92. <select id="findList" resultMap="bisInspStndMgamtResultMap">
  93. select <include refid="table_columns" /> from BIS_INSP_STND_MGAMT <include refid="page_where" />
  94. </select>
  95. <select id="selectCount" resultType="int" >
  96. select count(ID) from BIS_INSP_STND_MGAMT <include refid="page_where" />
  97. </select>
  98. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspStndMgamt">
  99. insert into BIS_INSP_STND_MGAMT( <include refid="table_columns" /> )
  100. values ( <include refid="entity_properties" /> )
  101. </insert>
  102. <delete id="delete" parameterType="java.lang.String">
  103. update BIS_INSP_STND_MGAMT set DATA_STAT='9' where ID = #{id}
  104. </delete>
  105. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStndMgamt">
  106. update BIS_INSP_STND_MGAMT set DATA_STAT='9' <include refid="page_where" />
  107. </delete>
  108. <update id="deleteInFlag" parameterType="java.lang.String">
  109. update BIS_INSP_STND_MGAMT set DATA_STAT = '9' where ID = #{id}
  110. </update>
  111. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspStndMgamt">
  112. update BIS_INSP_STND_MGAMT
  113. <trim prefix="set" suffixOverrides=",">
  114. <if test="isGaugeClear != null and isGaugeClear != ''">IS_GAUGE_CLEAR = #{isGaugeClear},</if>
  115. <if test="status != null and status != ''">STATUS = #{status},</if>
  116. <if test="id != null and id != ''">ID = #{id},</if>
  117. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  118. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  119. <if test="rsvrNm != null and rsvrNm != ''">RSVR_NM = #{rsvrNm},</if>
  120. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  121. <if test="isGauge != null and isGauge != ''">IS_GAUGE = #{isGauge},</if>
  122. <if test="isRainSys != null and isRainSys != ''">IS_RAIN_SYS = #{isRainSys},</if>
  123. <if test="isMaterials != null and isMaterials != ''">IS_MATERIALS = #{isMaterials},</if>
  124. <if test="isPubSignboard != null and isPubSignboard != ''">IS_PUB_SIGNBOARD = #{isPubSignboard},</if>
  125. <if test="isWarnSignboard != null and isWarnSignboard != ''">IS_WARN_SIGNBOARD = #{isWarnSignboard},</if>
  126. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  127. <if test="note != null and note != ''">NOTE = #{note},</if>
  128. <if test="intm != null">INTM = #{intm},</if>
  129. <if test="uptm != null">UPTM = #{uptm},</if>
  130. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  131. </trim>
  132. <where>ID = #{id}</where>
  133. </update>
  134. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStndMgamt">
  135. update BIS_INSP_STND_MGAMT
  136. <trim prefix="set" suffixOverrides=",">
  137. <if test="isGaugeClear != null and isGaugeClear != ''">IS_GAUGE_CLEAR = #{isGaugeClear},</if>
  138. <if test="status != null and status != ''">STATUS = #{status},</if>
  139. <if test="id != null and id != ''">ID = #{id},</if>
  140. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  141. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  142. <if test="rsvrNm != null and rsvrNm != ''">RSVR_NM = #{rsvrNm},</if>
  143. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  144. <if test="isGauge != null and isGauge != ''">IS_GAUGE = #{isGauge},</if>
  145. <if test="isRainSys != null and isRainSys != ''">IS_RAIN_SYS = #{isRainSys},</if>
  146. <if test="isMaterials != null and isMaterials != ''">IS_MATERIALS = #{isMaterials},</if>
  147. <if test="isPubSignboard != null and isPubSignboard != ''">IS_PUB_SIGNBOARD = #{isPubSignboard},</if>
  148. <if test="isWarnSignboard != null and isWarnSignboard != ''">IS_WARN_SIGNBOARD = #{isWarnSignboard},</if>
  149. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  150. <if test="note != null and note != ''">NOTE = #{note},</if>
  151. <if test="intm != null">INTM = #{intm},</if>
  152. <if test="uptm != null">UPTM = #{uptm},</if>
  153. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  154. </trim>
  155. <include refid="page_where" />
  156. </update>
  157. <!-- 其他自定义SQL -->
  158. </mapper>