OrgRatepayMapper.xml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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="com.goafanti.common.dao.OrgRatepayMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgRatepay" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="operating_income" property="operatingIncome" jdbcType="DECIMAL" />
  8. <result column="management_cost" property="managementCost" jdbcType="DECIMAL" />
  9. <result column="operating_profit" property="operatingProfit" jdbcType="DECIMAL" />
  10. <result column="non_operating_income" property="nonOperatingIncome" jdbcType="DECIMAL" />
  11. <result column="non_taxable_income" property="nonTaxableIncome" jdbcType="DECIMAL" />
  12. <result column="tax_exempt_income" property="taxExemptIncome" jdbcType="DECIMAL" />
  13. <result column="subsidy_income" property="subsidyIncome" jdbcType="DECIMAL" />
  14. <result column="year" property="year" jdbcType="INTEGER" />
  15. <result column="gross_profit" property="grossProfit" jdbcType="DECIMAL" />
  16. <result column="research_cost" property="researchCost" jdbcType="DECIMAL" />
  17. <result column="tax_return_url" property="taxReturnUrl" jdbcType="VARCHAR" />
  18. <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
  19. </resultMap>
  20. <sql id="Base_Column_List" >
  21. id, uid, operating_income, management_cost, operating_profit, non_operating_income,
  22. non_taxable_income, tax_exempt_income, subsidy_income, year, gross_profit, research_cost, tax_return_url, deleted_sign
  23. </sql>
  24. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  25. select
  26. <include refid="Base_Column_List" />
  27. from org_ratepay
  28. where id = #{id,jdbcType=VARCHAR}
  29. </select>
  30. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  31. delete from org_ratepay
  32. where id = #{id,jdbcType=VARCHAR}
  33. </delete>
  34. <insert id="insert" parameterType="com.goafanti.common.model.OrgRatepay" >
  35. insert into org_ratepay (id, uid, operating_income,
  36. management_cost, operating_profit, non_operating_income,
  37. non_taxable_income, tax_exempt_income, subsidy_income, year, gross_profit, research_cost,
  38. tax_return_url, deleted_sign)
  39. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{operatingIncome,jdbcType=DECIMAL},
  40. #{managementCost,jdbcType=DECIMAL}, #{operatingProfit,jdbcType=DECIMAL}, #{nonOperatingIncome,jdbcType=DECIMAL},
  41. #{nonTaxableIncome,jdbcType=DECIMAL}, #{taxExemptIncome,jdbcType=DECIMAL}, #{subsidyIncome,jdbcType=DECIMAL},
  42. #{year,jdbcType=INTEGER}, #{grossProfit,jdbcType=DECIMAL}, #{researchCost,jdbcType=DECIMAL},
  43. #{taxReturnUrl,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER})
  44. </insert>
  45. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgRatepay" >
  46. insert into org_ratepay
  47. <trim prefix="(" suffix=")" suffixOverrides="," >
  48. <if test="id != null" >
  49. id,
  50. </if>
  51. <if test="uid != null" >
  52. uid,
  53. </if>
  54. <if test="operatingIncome != null" >
  55. operating_income,
  56. </if>
  57. <if test="managementCost != null" >
  58. management_cost,
  59. </if>
  60. <if test="operatingProfit != null" >
  61. operating_profit,
  62. </if>
  63. <if test="nonOperatingIncome != null" >
  64. non_operating_income,
  65. </if>
  66. <if test="nonTaxableIncome != null" >
  67. non_taxable_income,
  68. </if>
  69. <if test="taxExemptIncome != null" >
  70. tax_exempt_income,
  71. </if>
  72. <if test="subsidyIncome != null" >
  73. subsidy_income,
  74. </if>
  75. <if test="year != null" >
  76. year,
  77. </if>
  78. <if test="grossProfit != null" >
  79. gross_profit,
  80. </if>
  81. <if test="researchCost != null" >
  82. research_cost,
  83. </if>
  84. <if test="taxReturnUrl != null" >
  85. tax_return_url,
  86. </if>
  87. <if test="deletedSign != null" >
  88. deleted_sign,
  89. </if>
  90. </trim>
  91. <trim prefix="values (" suffix=")" suffixOverrides="," >
  92. <if test="id != null" >
  93. #{id,jdbcType=VARCHAR},
  94. </if>
  95. <if test="uid != null" >
  96. #{uid,jdbcType=VARCHAR},
  97. </if>
  98. <if test="operatingIncome != null" >
  99. #{operatingIncome,jdbcType=DECIMAL},
  100. </if>
  101. <if test="managementCost != null" >
  102. #{managementCost,jdbcType=DECIMAL},
  103. </if>
  104. <if test="operatingProfit != null" >
  105. #{operatingProfit,jdbcType=DECIMAL},
  106. </if>
  107. <if test="nonOperatingIncome != null" >
  108. #{nonOperatingIncome,jdbcType=DECIMAL},
  109. </if>
  110. <if test="nonTaxableIncome != null" >
  111. #{nonTaxableIncome,jdbcType=DECIMAL},
  112. </if>
  113. <if test="taxExemptIncome != null" >
  114. #{taxExemptIncome,jdbcType=DECIMAL},
  115. </if>
  116. <if test="subsidyIncome != null" >
  117. #{subsidyIncome,jdbcType=DECIMAL},
  118. </if>
  119. <if test="year != null" >
  120. #{year,jdbcType=INTEGER},
  121. </if>
  122. <if test="grossProfit != null" >
  123. #{grossProfit,jdbcType=DECIMAL},
  124. </if>
  125. <if test="researchCost != null" >
  126. #{researchCost,jdbcType=DECIMAL},
  127. </if>
  128. <if test="taxReturnUrl != null" >
  129. #{taxReturnUrl,jdbcType=VARCHAR},
  130. </if>
  131. <if test="deletedSign != null" >
  132. #{deletedSign,jdbcType=INTEGER},
  133. </if>
  134. </trim>
  135. </insert>
  136. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgRatepay" >
  137. update org_ratepay
  138. <set >
  139. <if test="uid != null" >
  140. uid = #{uid,jdbcType=VARCHAR},
  141. </if>
  142. <if test="operatingIncome != null" >
  143. operating_income = #{operatingIncome,jdbcType=DECIMAL},
  144. </if>
  145. <if test="managementCost != null" >
  146. management_cost = #{managementCost,jdbcType=DECIMAL},
  147. </if>
  148. <if test="operatingProfit != null" >
  149. operating_profit = #{operatingProfit,jdbcType=DECIMAL},
  150. </if>
  151. <if test="nonOperatingIncome != null" >
  152. non_operating_income = #{nonOperatingIncome,jdbcType=DECIMAL},
  153. </if>
  154. <if test="nonTaxableIncome != null" >
  155. non_taxable_income = #{nonTaxableIncome,jdbcType=DECIMAL},
  156. </if>
  157. <if test="taxExemptIncome != null" >
  158. tax_exempt_income = #{taxExemptIncome,jdbcType=DECIMAL},
  159. </if>
  160. <if test="subsidyIncome != null" >
  161. subsidy_income = #{subsidyIncome,jdbcType=DECIMAL},
  162. </if>
  163. <if test="year != null" >
  164. year = #{year,jdbcType=INTEGER},
  165. </if>
  166. <if test="grossProfit != null" >
  167. gross_profit = #{grossProfit,jdbcType=DECIMAL},
  168. </if>
  169. <if test="researchCost != null" >
  170. research_cost = #{researchCost,jdbcType=DECIMAL},
  171. </if>
  172. <if test="taxReturnUrl != null" >
  173. tax_return_url = #{taxReturnUrl,jdbcType=VARCHAR},
  174. </if>
  175. <if test="deletedSign != null" >
  176. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  177. </if>
  178. </set>
  179. where id = #{id,jdbcType=VARCHAR}
  180. </update>
  181. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgRatepay" >
  182. update org_ratepay
  183. set uid = #{uid,jdbcType=VARCHAR},
  184. operating_income = #{operatingIncome,jdbcType=DECIMAL},
  185. management_cost = #{managementCost,jdbcType=DECIMAL},
  186. operating_profit = #{operatingProfit,jdbcType=DECIMAL},
  187. non_operating_income = #{nonOperatingIncome,jdbcType=DECIMAL},
  188. non_taxable_income = #{nonTaxableIncome,jdbcType=DECIMAL},
  189. tax_exempt_income = #{taxExemptIncome,jdbcType=DECIMAL},
  190. subsidy_income = #{subsidyIncome,jdbcType=DECIMAL},
  191. year = #{year,jdbcType=INTEGER},
  192. gross_profit = #{grossProfit,jdbcType=DECIMAL},
  193. research_cost = #{researchCost,jdbcType=DECIMAL},
  194. tax_return_url = #{taxReturnUrl,jdbcType=VARCHAR},
  195. deleted_sign = #{deletedSign,jdbcType=INTEGER}
  196. where id = #{id,jdbcType=VARCHAR}
  197. </update>
  198. <select id="findOrgRatepayListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
  199. select
  200. <include refid="Base_Column_List" />
  201. from org_ratepay
  202. where deleted_sign = 0
  203. <if test="uid != null">
  204. and uid = #{uid,jdbcType=VARCHAR}
  205. </if>
  206. <if test="year != null">
  207. and year = #{year,jdbcType=INTEGER}
  208. </if>
  209. order by year desc
  210. <if test="page_sql != null">
  211. ${page_sql}
  212. </if>
  213. </select>
  214. <select id="findOrgRatepayCount" resultType="java.lang.Integer" parameterType="String">
  215. select count(1)
  216. from org_ratepay
  217. where deleted_sign = 0
  218. <if test="uid != null">
  219. and uid = #{uid,jdbcType=VARCHAR}
  220. </if>
  221. <if test="year != null">
  222. and year = #{year,jdbcType=INTEGER}
  223. </if>
  224. </select>
  225. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  226. update org_ratepay set deleted_sign = 1
  227. where id in
  228. <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
  229. #{item}
  230. </foreach>
  231. </update>
  232. <select id="selectRatepayByUidAndYear" resultMap="BaseResultMap" >
  233. select
  234. <include refid="Base_Column_List" />
  235. from org_ratepay
  236. where
  237. uid = #{uid,jdbcType=VARCHAR}
  238. and year = #{year,jdbcType=INTEGER}
  239. and deleted_sign = 0
  240. </select>
  241. </mapper>