BisInspStstnPbDao.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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.BisInspStstnPbDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspStstnPb" id="bisInspStstnPbResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="partyBuild" column="PARTY_BUILD"/>
  8. <result property="partyBuildJoint" column="PARTY_BUILD_JOINT"/>
  9. <result property="basicTeam" column="BASIC_TEAM"/>
  10. <result property="basicActivity" column="BASIC_ACTIVITY"/>
  11. <result property="basicFunc" column="BASIC_FUNC"/>
  12. <result property="basicGuarantee" column="BASIC_GUARANTEE"/>
  13. <result property="note" column="NOTE"/>
  14. <result property="total" column="TOTAL"/>
  15. <result property="actualScore" column="ACTUAL_SCORE"/>
  16. <result property="persId" column="PERS_ID"/>
  17. <result property="intm" column="INTM"/>
  18. <result property="uptm" column="UPTM"/>
  19. <result property="dataStat" column="DATA_STAT"/>
  20. </resultMap>
  21. <sql id="table_columns">
  22. ID,
  23. RGSTR_ID,
  24. PARTY_BUILD,
  25. PARTY_BUILD_JOINT,
  26. BASIC_TEAM,
  27. BASIC_ACTIVITY,
  28. BASIC_FUNC,
  29. BASIC_GUARANTEE,
  30. NOTE,
  31. TOTAL,
  32. ACTUAL_SCORE,
  33. PERS_ID,
  34. INTM,
  35. UPTM,
  36. DATA_STAT
  37. </sql>
  38. <sql id="entity_properties">
  39. #{id},
  40. #{rgstrId},
  41. #{partyBuild},
  42. #{partyBuildJoint},
  43. #{basicTeam},
  44. #{basicActivity},
  45. #{basicFunc},
  46. #{basicGuarantee},
  47. #{note},
  48. #{total},
  49. #{actualScore},
  50. #{persId},
  51. #{intm},
  52. #{uptm},
  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="partyBuild != null and partyBuild != ''">and PARTY_BUILD = #{partyBuild}</if>
  60. <if test="partyBuildJoint != null and partyBuildJoint != ''">and PARTY_BUILD_JOINT = #{partyBuildJoint}</if>
  61. <if test="basicTeam != null and basicTeam != ''">and BASIC_TEAM = #{basicTeam}</if>
  62. <if test="basicActivity != null and basicActivity != ''">and BASIC_ACTIVITY = #{basicActivity}</if>
  63. <if test="basicFunc != null and basicFunc != ''">and BASIC_FUNC = #{basicFunc}</if>
  64. <if test="basicGuarantee != null and basicGuarantee != ''">and BASIC_GUARANTEE = #{basicGuarantee}</if>
  65. <if test="note != null and note != ''">and NOTE = #{note}</if>
  66. <if test="total != null and total != ''">and TOTAL = #{total}</if>
  67. <if test="actualScore != null and actualScore != ''">and ACTUAL_SCORE = #{actualScore}</if>
  68. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  69. <if test="intm != null">and INTM = #{intm}</if>
  70. <if test="uptm != null">and UPTM = #{uptm}</if>
  71. and DATA_STAT='0'
  72. </trim>
  73. </sql>
  74. <select id="get" resultMap="bisInspStstnPbResultMap" parameterType="String" >
  75. select <include refid="table_columns" /> from BIS_INSP_STSTN_PB where RGSTR_ID = #{rgstrId}
  76. </select>
  77. <select id="getBy" resultMap="bisInspStstnPbResultMap">
  78. select <include refid="table_columns" /> from BIS_INSP_STSTN_PB <include refid="page_where" />
  79. </select>
  80. <select id="findAll" resultMap="bisInspStstnPbResultMap">
  81. select <include refid="table_columns" /> from BIS_INSP_STSTN_PB
  82. </select>
  83. <select id="findList" resultMap="bisInspStstnPbResultMap">
  84. select <include refid="table_columns" /> from BIS_INSP_STSTN_PB <include refid="page_where" />
  85. </select>
  86. <select id="selectCount" resultType="int" >
  87. select count(ID) from BIS_INSP_STSTN_PB <include refid="page_where" />
  88. </select>
  89. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnPb">
  90. insert into BIS_INSP_STSTN_PB( <include refid="table_columns" /> )
  91. values ( <include refid="entity_properties" /> )
  92. </insert>
  93. <delete id="delete" parameterType="java.lang.String">
  94. update BIS_INSP_STSTN_PB set DATA_STAT = '9' where ID = #{id}
  95. </delete>
  96. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnPb">
  97. update BIS_INSP_STSTN_PB set DATA_STAT = '9' <include refid="page_where" />
  98. </delete>
  99. <update id="deleteInFlag" parameterType="java.lang.String">
  100. update BIS_INSP_STSTN_PB set DATA_STAT = '9' where ID = #{id}
  101. </update>
  102. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnPb">
  103. update BIS_INSP_STSTN_PB
  104. <trim prefix="set" suffixOverrides=",">
  105. <if test="partyBuild != null and partyBuild != ''">PARTY_BUILD = #{partyBuild},</if>
  106. <if test="partyBuildJoint != null and partyBuildJoint != ''">PARTY_BUILD_JOINT = #{partyBuildJoint},</if>
  107. <if test="basicTeam != null and basicTeam != ''">BASIC_TEAM = #{basicTeam},</if>
  108. <if test="basicActivity != null and basicActivity != ''">BASIC_ACTIVITY = #{basicActivity},</if>
  109. <if test="basicFunc != null and basicFunc != ''">BASIC_FUNC = #{basicFunc},</if>
  110. <if test="basicGuarantee != null and basicGuarantee != ''">BASIC_GUARANTEE = #{basicGuarantee},</if>
  111. <if test="note != null and note != ''">NOTE = #{note},</if>
  112. <if test="total != null and total != ''">TOTAL = #{total},</if>
  113. <if test="actualScore != null and actualScore != ''">ACTUAL_SCORE = #{actualScore},</if>
  114. <if test="uptm != null">UPTM = #{uptm},</if>
  115. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat}, </if>
  116. </trim>
  117. <where>ID = #{id}</where>
  118. </update>
  119. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnPb">
  120. update BIS_INSP_STSTN_PB
  121. <trim prefix="set" suffixOverrides=",">
  122. <if test="partyBuild != null and partyBuild != ''">PARTY_BUILD = #{partyBuild},</if>
  123. <if test="partyBuildJoint != null and partyBuildJoint != ''">PARTY_BUILD_JOINT = #{partyBuildJoint},</if>
  124. <if test="basicTeam != null and basicTeam != ''">BASIC_TEAM = #{basicTeam},</if>
  125. <if test="basicActivity != null and basicActivity != ''">BASIC_ACTIVITY = #{basicActivity},</if>
  126. <if test="basicFunc != null and basicFunc != ''">BASIC_FUNC = #{basicFunc},</if>
  127. <if test="basicGuarantee != null and basicGuarantee != ''">BASIC_GUARANTEE = #{basicGuarantee},</if>
  128. <if test="note != null and note != ''">NOTE = #{note},</if>
  129. <if test="total != null and total != ''">TOTAL = #{total},</if>
  130. <if test="actualScore != null and actualScore != ''">ACTUAL_SCORE = #{actualScore},</if>
  131. <if test="uptm != null">UPTM = #{uptm},</if>
  132. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat}, </if>
  133. </trim>
  134. <include refid="page_where" />
  135. </update>
  136. <!-- 其他自定义SQL -->
  137. </mapper>