2e43b39e4d23a4e5bb95e3f9158a4b682ba7240d.svn-base 7.6 KB

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