|
@@ -0,0 +1,106 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.enteprise.industry_oveview.mapper.IndustryOverviewMapper">
|
|
|
+
|
|
|
+ <resultMap type="IndustryOverview" id="IndustryOverviewResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="year" column="year" />
|
|
|
+ <result property="landArea" column="land_area" />
|
|
|
+ <result property="powerConsumeSum" column="power_consume_sum" />
|
|
|
+ <result property="energyConsumeSum" column="energy_consume_sum" />
|
|
|
+ <result property="fundingSum" column="funding_sum" />
|
|
|
+ <result property="employeeNumberSum" column="employee_number_sum" />
|
|
|
+ <result property="profitSum" column="profit_sum" />
|
|
|
+ <result property="enterpriseNumbers" column="enterprise_numbers" />
|
|
|
+ <result property="totalIndustrialValueSum" column="total_industrial_value_sum" />
|
|
|
+ <result property="taxableIncomeSum" column="taxable_income_sum" />
|
|
|
+ <result property="paidTaxSum" column="paid_tax_sum" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectIndustryOverviewVo">
|
|
|
+ select id, year, land_area, power_consume_sum, energy_consume_sum, funding_sum, employee_number_sum, profit_sum, enterprise_numbers, total_industrial_value_sum, taxable_income_sum, paid_tax_sum from industry_overview
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectIndustryOverviewList" parameterType="IndustryOverview" resultMap="IndustryOverviewResult">
|
|
|
+ <include refid="selectIndustryOverviewVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="year != null and year != ''"> and year = #{year}</if>
|
|
|
+ <if test="landArea != null "> and land_area = #{landArea}</if>
|
|
|
+ <if test="powerConsumeSum != null "> and power_consume_sum = #{powerConsumeSum}</if>
|
|
|
+ <if test="energyConsumeSum != null "> and energy_consume_sum = #{energyConsumeSum}</if>
|
|
|
+ <if test="fundingSum != null "> and funding_sum = #{fundingSum}</if>
|
|
|
+ <if test="employeeNumberSum != null "> and employee_number_sum = #{employeeNumberSum}</if>
|
|
|
+ <if test="profitSum != null "> and profit_sum = #{profitSum}</if>
|
|
|
+ <if test="enterpriseNumbers != null "> and enterprise_numbers = #{enterpriseNumbers}</if>
|
|
|
+ <if test="totalIndustrialValueSum != null "> and total_industrial_value_sum = #{totalIndustrialValueSum}</if>
|
|
|
+ <if test="taxableIncomeSum != null "> and taxable_income_sum = #{taxableIncomeSum}</if>
|
|
|
+ <if test="paidTaxSum != null "> and paid_tax_sum = #{paidTaxSum}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectIndustryOverviewById" parameterType="Long" resultMap="IndustryOverviewResult">
|
|
|
+ <include refid="selectIndustryOverviewVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertIndustryOverview" parameterType="IndustryOverview" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into industry_overview
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="year != null and year != ''">year,</if>
|
|
|
+ <if test="landArea != null">land_area,</if>
|
|
|
+ <if test="powerConsumeSum != null">power_consume_sum,</if>
|
|
|
+ <if test="energyConsumeSum != null">energy_consume_sum,</if>
|
|
|
+ <if test="fundingSum != null">funding_sum,</if>
|
|
|
+ <if test="employeeNumberSum != null">employee_number_sum,</if>
|
|
|
+ <if test="profitSum != null">profit_sum,</if>
|
|
|
+ <if test="enterpriseNumbers != null">enterprise_numbers,</if>
|
|
|
+ <if test="totalIndustrialValueSum != null">total_industrial_value_sum,</if>
|
|
|
+ <if test="taxableIncomeSum != null">taxable_income_sum,</if>
|
|
|
+ <if test="paidTaxSum != null">paid_tax_sum,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="year != null and year != ''">#{year},</if>
|
|
|
+ <if test="landArea != null">#{landArea},</if>
|
|
|
+ <if test="powerConsumeSum != null">#{powerConsumeSum},</if>
|
|
|
+ <if test="energyConsumeSum != null">#{energyConsumeSum},</if>
|
|
|
+ <if test="fundingSum != null">#{fundingSum},</if>
|
|
|
+ <if test="employeeNumberSum != null">#{employeeNumberSum},</if>
|
|
|
+ <if test="profitSum != null">#{profitSum},</if>
|
|
|
+ <if test="enterpriseNumbers != null">#{enterpriseNumbers},</if>
|
|
|
+ <if test="totalIndustrialValueSum != null">#{totalIndustrialValueSum},</if>
|
|
|
+ <if test="taxableIncomeSum != null">#{taxableIncomeSum},</if>
|
|
|
+ <if test="paidTaxSum != null">#{paidTaxSum},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateIndustryOverview" parameterType="IndustryOverview">
|
|
|
+ update industry_overview
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="year != null and year != ''">year = #{year},</if>
|
|
|
+ <if test="landArea != null">land_area = #{landArea},</if>
|
|
|
+ <if test="powerConsumeSum != null">power_consume_sum = #{powerConsumeSum},</if>
|
|
|
+ <if test="energyConsumeSum != null">energy_consume_sum = #{energyConsumeSum},</if>
|
|
|
+ <if test="fundingSum != null">funding_sum = #{fundingSum},</if>
|
|
|
+ <if test="employeeNumberSum != null">employee_number_sum = #{employeeNumberSum},</if>
|
|
|
+ <if test="profitSum != null">profit_sum = #{profitSum},</if>
|
|
|
+ <if test="enterpriseNumbers != null">enterprise_numbers = #{enterpriseNumbers},</if>
|
|
|
+ <if test="totalIndustrialValueSum != null">total_industrial_value_sum = #{totalIndustrialValueSum},</if>
|
|
|
+ <if test="taxableIncomeSum != null">taxable_income_sum = #{taxableIncomeSum},</if>
|
|
|
+ <if test="paidTaxSum != null">paid_tax_sum = #{paidTaxSum},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteIndustryOverviewById" parameterType="Long">
|
|
|
+ delete from industry_overview where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteIndustryOverviewByIds" parameterType="String">
|
|
|
+ delete from industry_overview where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|