b61d99da1c72eadfeb124bf0c1ca2bb5e48fe540.svn-base 7.2 KB

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