BisInspSwhsRgstrMeasuresDao.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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.BisInspSwhsRgstrMeasuresDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspSwhsRgstrMeasures" id="bisInspSwhsRgstrMeasuresResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isTcowqmWtmiafmtr" column="IS_TCOWQM_WTMIAFMTR"/>
  8. <result property="isEowqoms" column="IS_EOWQOMS"/>
  9. <result property="isSwqiowstswrmisar" column="IS_SWQIOWSTSWRMISAR"/>
  10. <result property="isAmwqiadtfad" column="IS_AMWQIADTFAD"/>
  11. <result property="isPzfdwsad" column="IS_PZFDWSAD"/>
  12. <result property="isEcgbacws" column="IS_ECGBACWS"/>
  13. <result property="annInflow" column="ANN_INFLOW"/>
  14. <result property="annInflowDry" column="ANN_INFLOW_DRY"/>
  15. <result property="isHasProject" column="IS_HAS_PROJECT"/>
  16. <result property="isHasIwba" column="IS_HAS_IWBA"/>
  17. <result property="recPersId" column="REC_PERS_ID"/>
  18. <result property="inTm" column="IN_TM"/>
  19. <result property="upTm" column="UP_TM"/>
  20. <result property="dataStat" column="DATA_STAT"/>
  21. <result property="insImp" column="INS_IMP"/>
  22. </resultMap>
  23. <sql id="table_columns">
  24. ID,
  25. RGSTR_ID,
  26. IS_TCOWQM_WTMIAFMTR,
  27. IS_EOWQOMS,
  28. IS_SWQIOWSTSWRMISAR,
  29. IS_AMWQIADTFAD,
  30. IS_PZFDWSAD,
  31. IS_ECGBACWS,
  32. ANN_INFLOW,
  33. ANN_INFLOW_DRY,
  34. IS_HAS_PROJECT,
  35. IS_HAS_IWBA,
  36. REC_PERS_ID,
  37. IN_TM,
  38. UP_TM,
  39. DATA_STAT,
  40. INS_IMP
  41. </sql>
  42. <sql id="entity_properties">
  43. #{id},
  44. #{rgstrId},
  45. #{isTcowqmWtmiafmtr},
  46. #{isEowqoms},
  47. #{isSwqiowstswrmisar},
  48. #{isAmwqiadtfad},
  49. #{isPzfdwsad},
  50. #{isEcgbacws},
  51. #{annInflow},
  52. #{annInflowDry},
  53. #{isHasProject},
  54. #{isHasIwba},
  55. #{recPersId},
  56. #{inTm},
  57. #{upTm},
  58. #{dataStat},
  59. #{insImp}
  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="isTcowqmWtmiafmtr != null and isTcowqmWtmiafmtr != ''">and IS_TCOWQM_WTMIAFMTR = #{isTcowqmWtmiafmtr}</if>
  66. <if test="isEowqoms != null and isEowqoms != ''">and IS_EOWQOMS = #{isEowqoms}</if>
  67. <if test="isSwqiowstswrmisar != null and isSwqiowstswrmisar != ''">and IS_SWQIOWSTSWRMISAR = #{isSwqiowstswrmisar}</if>
  68. <if test="isAmwqiadtfad != null and isAmwqiadtfad != ''">and IS_AMWQIADTFAD = #{isAmwqiadtfad}</if>
  69. <if test="isPzfdwsad != null and isPzfdwsad != ''">and IS_PZFDWSAD = #{isPzfdwsad}</if>
  70. <if test="isEcgbacws != null and isEcgbacws != ''">and IS_ECGBACWS = #{isEcgbacws}</if>
  71. <if test="annInflow != null and annInflow != ''">and ANN_INFLOW = #{annInflow}</if>
  72. <if test="annInflowDry != null and annInflowDry != ''">and ANN_INFLOW_DRY = #{annInflowDry}</if>
  73. <if test="isHasProject != null and isHasProject != ''">and IS_HAS_PROJECT = #{isHasProject}</if>
  74. <if test="isHasIwba != null and isHasIwba != ''">and IS_HAS_IWBA = #{isHasIwba}</if>
  75. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  76. <if test="inTm != null">and IN_TM = #{inTm}</if>
  77. <if test="upTm != null">and UP_TM = #{upTm}</if>
  78. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  79. <if test="insImp != null and insImp != ''">and INS_IMP = #{insImp}</if>
  80. </trim>
  81. </sql>
  82. <select id="get" resultMap="bisInspSwhsRgstrMeasuresResultMap" parameterType="String" >
  83. select <include refid="table_columns" /> from BIS_INSP_SWHS_RGSTR_MEASURES where RGSTR_ID = #{id}
  84. </select>
  85. <select id="getBy" resultMap="bisInspSwhsRgstrMeasuresResultMap">
  86. select <include refid="table_columns" /> from BIS_INSP_SWHS_RGSTR_MEASURES <include refid="page_where" />
  87. </select>
  88. <select id="findAll" resultMap="bisInspSwhsRgstrMeasuresResultMap">
  89. select <include refid="table_columns" /> from BIS_INSP_SWHS_RGSTR_MEASURES
  90. </select>
  91. <select id="findList" resultMap="bisInspSwhsRgstrMeasuresResultMap">
  92. select <include refid="table_columns" /> from BIS_INSP_SWHS_RGSTR_MEASURES <include refid="page_where" />
  93. </select>
  94. <select id="selectCount" resultType="int" >
  95. select count(ID) from BIS_INSP_SWHS_RGSTR_MEASURES <include refid="page_where" />
  96. </select>
  97. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspSwhsRgstrMeasures">
  98. insert into BIS_INSP_SWHS_RGSTR_MEASURES( <include refid="table_columns" /> )
  99. values ( <include refid="entity_properties" /> )
  100. </insert>
  101. <delete id="delete" parameterType="java.lang.String">
  102. delete from BIS_INSP_SWHS_RGSTR_MEASURES where ID = #{id}
  103. </delete>
  104. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSwhsRgstrMeasures">
  105. delete from BIS_INSP_SWHS_RGSTR_MEASURES <include refid="page_where" />
  106. </delete>
  107. <update id="deleteInFlag" parameterType="java.lang.String">
  108. update BIS_INSP_SWHS_RGSTR_MEASURES set flag_valid = 0 where ID = #{id}
  109. </update>
  110. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspSwhsRgstrMeasures">
  111. update BIS_INSP_SWHS_RGSTR_MEASURES
  112. <trim prefix="set" suffixOverrides=",">
  113. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  114. <if test="isTcowqmWtmiafmtr != null and isTcowqmWtmiafmtr != ''">IS_TCOWQM_WTMIAFMTR = #{isTcowqmWtmiafmtr},</if>
  115. <if test="isEowqoms != null and isEowqoms != ''">IS_EOWQOMS = #{isEowqoms},</if>
  116. <if test="isSwqiowstswrmisar != null and isSwqiowstswrmisar != ''">IS_SWQIOWSTSWRMISAR = #{isSwqiowstswrmisar},</if>
  117. <if test="isAmwqiadtfad != null and isAmwqiadtfad != ''">IS_AMWQIADTFAD = #{isAmwqiadtfad},</if>
  118. <if test="isPzfdwsad != null and isPzfdwsad != ''">IS_PZFDWSAD = #{isPzfdwsad},</if>
  119. <if test="isEcgbacws != null and isEcgbacws != ''">IS_ECGBACWS = #{isEcgbacws},</if>
  120. <if test="annInflow != null and annInflow != ''">ANN_INFLOW = #{annInflow},</if>
  121. <if test="annInflowDry != null and annInflowDry != ''">ANN_INFLOW_DRY = #{annInflowDry},</if>
  122. <if test="isHasProject != null and isHasProject != ''">IS_HAS_PROJECT = #{isHasProject},</if>
  123. <if test="isHasIwba != null and isHasIwba != ''">IS_HAS_IWBA = #{isHasIwba},</if>
  124. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  125. <if test="inTm != null">IN_TM = #{inTm},</if>
  126. <if test="upTm != null">UP_TM = #{upTm},</if>
  127. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  128. <if test="insImp != null and insImp != ''">INS_IMP = #{insImp},</if>
  129. </trim>
  130. <where>ID = #{id}</where>
  131. </update>
  132. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSwhsRgstrMeasures">
  133. update BIS_INSP_SWHS_RGSTR_MEASURES
  134. <trim prefix="set" suffixOverrides=",">
  135. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  136. <if test="isTcowqmWtmiafmtr != null and isTcowqmWtmiafmtr != ''">IS_TCOWQM_WTMIAFMTR = #{isTcowqmWtmiafmtr},</if>
  137. <if test="isEowqoms != null and isEowqoms != ''">IS_EOWQOMS = #{isEowqoms},</if>
  138. <if test="isSwqiowstswrmisar != null and isSwqiowstswrmisar != ''">IS_SWQIOWSTSWRMISAR = #{isSwqiowstswrmisar},</if>
  139. <if test="isAmwqiadtfad != null and isAmwqiadtfad != ''">IS_AMWQIADTFAD = #{isAmwqiadtfad},</if>
  140. <if test="isPzfdwsad != null and isPzfdwsad != ''">IS_PZFDWSAD = #{isPzfdwsad},</if>
  141. <if test="isEcgbacws != null and isEcgbacws != ''">IS_ECGBACWS = #{isEcgbacws},</if>
  142. <if test="annInflow != null and annInflow != ''">ANN_INFLOW = #{annInflow},</if>
  143. <if test="annInflowDry != null and annInflowDry != ''">ANN_INFLOW_DRY = #{annInflowDry},</if>
  144. <if test="isHasProject != null and isHasProject != ''">IS_HAS_PROJECT = #{isHasProject},</if>
  145. <if test="isHasIwba != null and isHasIwba != ''">IS_HAS_IWBA = #{isHasIwba},</if>
  146. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  147. <if test="inTm != null">IN_TM = #{inTm},</if>
  148. <if test="upTm != null">UP_TM = #{upTm},</if>
  149. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  150. <if test="insImp != null and insImp != ''">INS_IMP = #{insImp},</if>
  151. </trim>
  152. <include refid="page_where" />
  153. </update>
  154. <!-- 其他自定义SQL -->
  155. </mapper>