BisInspWtcrrRgstrRevDao.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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.BisInspWtcrrRgstrRevDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWtcrrRgstrRev" id="bisInspWtcrrRgstrRevResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isBudSys" column="IS_BUD_SYS"/>
  8. <result property="isPub" column="IS_PUB"/>
  9. <result property="isOrgPub" column="IS_ORG_PUB"/>
  10. <result property="isBlnTest" column="IS_BLN_TEST"/>
  11. <result property="isFrbEqp" column="IS_FRB_EQP"/>
  12. <result property="isLeak" column="IS_LEAK"/>
  13. <result property="persId" column="PERS_ID"/>
  14. <result property="intm" column="INTM"/>
  15. <result property="uptm" column="UPTM"/>
  16. <result property="state" column="STATE"/>
  17. <result property="dataStat" column="DATA_STAT"/>
  18. <result property="isOvrRule" column="IS_OVR_RULE"/>
  19. <result property="isOvrPlan" column="IS_OVR_PLAN"/>
  20. </resultMap>
  21. <sql id="table_columns">
  22. ID,
  23. RGSTR_ID,
  24. IS_BUD_SYS,
  25. IS_PUB,
  26. IS_ORG_PUB,
  27. IS_BLN_TEST,
  28. IS_FRB_EQP,
  29. IS_LEAK,
  30. PERS_ID,
  31. INTM,
  32. UPTM,
  33. STATE,
  34. IS_OVR_RULE,
  35. IS_OVR_PLAN,
  36. DATA_STAT
  37. </sql>
  38. <sql id="entity_properties">
  39. #{id},
  40. #{rgstrId},
  41. #{isBudSys},
  42. #{isPub},
  43. #{isOrgPub},
  44. #{isBlnTest},
  45. #{isFrbEqp},
  46. #{isLeak},
  47. #{persId},
  48. #{intm},
  49. #{uptm},
  50. #{state},
  51. #{isOvrRule},
  52. #{isOvrPlan},
  53. #{dataStat}
  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="isBudSys != null and isBudSys != ''">and IS_BUD_SYS = #{isBudSys}</if>
  60. <if test="isPub != null and isPub != ''">and IS_PUB = #{isPub}</if>
  61. <if test="isOrgPub != null and isOrgPub != ''">and IS_ORG_PUB = #{isOrgPub}</if>
  62. <if test="isBlnTest != null and isBlnTest != ''">and IS_BLN_TEST = #{isBlnTest}</if>
  63. <if test="isFrbEqp != null and isFrbEqp != ''">and IS_FRB_EQP = #{isFrbEqp}</if>
  64. <if test="isLeak != null and isLeak != ''">and IS_LEAK = #{isLeak}</if>
  65. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  66. <if test="intm != null">and INTM = #{intm}</if>
  67. <if test="uptm != null">and UPTM = #{uptm}</if>
  68. <if test="state != null and state != ''">and STATE = #{state}</if>
  69. <if test="isOvrRule != null and isOvrRule != ''">and IS_OVR_RULE = #{isOvrRule}</if>
  70. <if test="isOvrPlan != null and isOvrPlan != ''">and IS_OVR_PLAN = #{isOvrPlan}</if>
  71. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  72. and DATA_STAT='0'
  73. </trim>
  74. </sql>
  75. <select id="get" resultMap="bisInspWtcrrRgstrRevResultMap" parameterType="String" >
  76. select <include refid="table_columns" /> from BIS_INSP_WTCRR_RGSTR_REV where RGSTR_ID = #{id}
  77. </select>
  78. <select id="getBy" resultMap="bisInspWtcrrRgstrRevResultMap">
  79. select <include refid="table_columns" /> from BIS_INSP_WTCRR_RGSTR_REV <include refid="page_where" />
  80. </select>
  81. <select id="findAll" resultMap="bisInspWtcrrRgstrRevResultMap">
  82. select <include refid="table_columns" /> from BIS_INSP_WTCRR_RGSTR_REV
  83. </select>
  84. <select id="findList" resultMap="bisInspWtcrrRgstrRevResultMap">
  85. select <include refid="table_columns" /> from BIS_INSP_WTCRR_RGSTR_REV <include refid="page_where" />
  86. </select>
  87. <select id="selectCount" resultType="int" >
  88. select count(ID) from BIS_INSP_WTCRR_RGSTR_REV <include refid="page_where" />
  89. </select>
  90. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtcrrRgstrRev">
  91. insert into BIS_INSP_WTCRR_RGSTR_REV( <include refid="table_columns" /> )
  92. values ( <include refid="entity_properties" /> )
  93. </insert>
  94. <delete id="delete" parameterType="java.lang.String">
  95. update BIS_INSP_WTCRR_RGSTR_REV set DATA_STAT='9' where ID = #{id}
  96. </delete>
  97. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtcrrRgstrRev">
  98. update BIS_INSP_WTCRR_RGSTR_REV set DATA_STAT='9' <include refid="page_where" />
  99. </delete>
  100. <update id="deleteInFlag" parameterType="java.lang.String">
  101. update BIS_INSP_WTCRR_RGSTR_REV set DATA_STAT = '9' where ID = #{id}
  102. </update>
  103. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtcrrRgstrRev">
  104. update BIS_INSP_WTCRR_RGSTR_REV
  105. <trim prefix="set" suffixOverrides=",">
  106. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  107. <if test="isBudSys != null and isBudSys != ''">IS_BUD_SYS = #{isBudSys},</if>
  108. <if test="isPub != null and isPub != ''">IS_PUB = #{isPub},</if>
  109. <if test="isOrgPub != null and isOrgPub != ''">IS_ORG_PUB = #{isOrgPub},</if>
  110. <if test="isBlnTest != null and isBlnTest != ''">IS_BLN_TEST = #{isBlnTest},</if>
  111. <if test="isFrbEqp != null and isFrbEqp != ''">IS_FRB_EQP = #{isFrbEqp},</if>
  112. <if test="isLeak != null and isLeak != ''">IS_LEAK = #{isLeak},</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="state != null and state != ''">STATE = #{state},</if>
  117. <if test="isOvrRule != null and isOvrRule != ''">IS_OVR_RULE = #{isOvrRule},</if>
  118. <if test="isOvrPlan != null and isOvrPlan != ''">IS_OVR_PLAN = #{isOvrPlan},</if>
  119. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  120. </trim>
  121. <where>ID = #{id}</where>
  122. </update>
  123. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtcrrRgstrRev">
  124. update BIS_INSP_WTCRR_RGSTR_REV
  125. <trim prefix="set" suffixOverrides=",">
  126. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  127. <if test="isBudSys != null and isBudSys != ''">IS_BUD_SYS = #{isBudSys},</if>
  128. <if test="isPub != null and isPub != ''">IS_PUB = #{isPub},</if>
  129. <if test="isOrgPub != null and isOrgPub != ''">IS_ORG_PUB = #{isOrgPub},</if>
  130. <if test="isBlnTest != null and isBlnTest != ''">IS_BLN_TEST = #{isBlnTest},</if>
  131. <if test="isFrbEqp != null and isFrbEqp != ''">IS_FRB_EQP = #{isFrbEqp},</if>
  132. <if test="isLeak != null and isLeak != ''">IS_LEAK = #{isLeak},</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="state != null and state != ''">STATE = #{state},</if>
  137. <if test="isOvrRule != null and isOvrRule != ''">IS_OVR_RULE = #{isOvrRule},</if>
  138. <if test="isOvrPlan != null and isOvrPlan != ''">IS_OVR_PLAN = #{isOvrPlan},</if>
  139. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  140. </trim>
  141. <include refid="page_where" />
  142. </update>
  143. <!-- 其他自定义SQL -->
  144. </mapper>