|
@@ -1,9 +1,9 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.enteprise.score.mapper.ScoreMapper">
|
|
<mapper namespace="com.enteprise.score.mapper.ScoreMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="Score" id="ScoreResult">
|
|
<resultMap type="Score" id="ScoreResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="enterpriseName" column="enterprise_name" />
|
|
<result property="enterpriseName" column="enterprise_name" />
|
|
@@ -20,19 +20,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="profitScore" column="profit_score" />
|
|
<result property="profitScore" column="profit_score" />
|
|
<result property="ownerEquityScore" column="owner_equity_score" />
|
|
<result property="ownerEquityScore" column="owner_equity_score" />
|
|
<result property="fundingScore" column="funding_score" />
|
|
<result property="fundingScore" column="funding_score" />
|
|
- <result property="energyConsumeScore" column="energy_consume_score" />
|
|
|
|
<result property="powerConsumeScore" column="power_consume_score" />
|
|
<result property="powerConsumeScore" column="power_consume_score" />
|
|
|
|
+ <result property="energyConsumeScore" column="energy_consume_score" />
|
|
|
|
+ <result property="totalIndustrialValuePrecent" column="total_industrial_value_precent" />
|
|
|
|
+ <result property="taxableIncomePrecent" column="taxable_income_precent" />
|
|
|
|
+ <result property="paidTaxPrecent" column="paid_tax_precent" />
|
|
|
|
+ <result property="fundingPrecent" column="funding_precent" />
|
|
|
|
+ <result property="powerConsumePrecent" column="power_consume_precent" />
|
|
|
|
+ <result property="energyConsumePrecent" column="energy_consume_precent" />
|
|
|
|
+ <result property="totalIndustrialValueLevel" column="total_industrial_value_level" />
|
|
|
|
+ <result property="taxableIncomeLevel" column="taxable_income_level" />
|
|
|
|
+ <result property="paidTaxLevel" column="paid_tax_level" />
|
|
|
|
+ <result property="energyConsumeLevel" column="energy_consume_level" />
|
|
|
|
+ <result property="fundingLevel" column="funding_level" />
|
|
|
|
+ <result property="powerConsumeLevel" column="power_consume_level" />
|
|
<result property="year" column="year" />
|
|
<result property="year" column="year" />
|
|
<result property="month" column="month" />
|
|
<result property="month" column="month" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectScoreVo">
|
|
<sql id="selectScoreVo">
|
|
- select id, enterprise_name, location, code, main_business_score, land_area_score, total_industrial_value_score, gdp_score, taxable_income_score, paid_tax_score, main_business_income_score, employee_number_score, profit_score, owner_equity_score, funding_score, energy_consume_score, power_consume_score, year, month from score
|
|
|
|
|
|
+ select id, enterprise_name, location, code, main_business_score, land_area_score, total_industrial_value_score, gdp_score, taxable_income_score, paid_tax_score, main_business_income_score, employee_number_score, profit_score, owner_equity_score, funding_score, power_consume_score, energy_consume_score, total_industrial_value_precent, taxable_income_precent, paid_tax_precent, funding_precent, power_consume_precent, energy_consume_precent, total_industrial_value_level, taxable_income_level, paid_tax_level, energy_consume_level, funding_level, power_consume_level, year, month from score
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectScoreList" parameterType="Score" resultMap="ScoreResult">
|
|
<select id="selectScoreList" parameterType="Score" resultMap="ScoreResult">
|
|
<include refid="selectScoreVo"/>
|
|
<include refid="selectScoreVo"/>
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
|
<if test="location != null and location != ''"> and location = #{location}</if>
|
|
<if test="location != null and location != ''"> and location = #{location}</if>
|
|
<if test="code != null and code != ''"> and code = #{code}</if>
|
|
<if test="code != null and code != ''"> and code = #{code}</if>
|
|
@@ -47,13 +59,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="profitScore != null "> and profit_score = #{profitScore}</if>
|
|
<if test="profitScore != null "> and profit_score = #{profitScore}</if>
|
|
<if test="ownerEquityScore != null "> and owner_equity_score = #{ownerEquityScore}</if>
|
|
<if test="ownerEquityScore != null "> and owner_equity_score = #{ownerEquityScore}</if>
|
|
<if test="fundingScore != null "> and funding_score = #{fundingScore}</if>
|
|
<if test="fundingScore != null "> and funding_score = #{fundingScore}</if>
|
|
- <if test="energyConsumeScore != null "> and energy_consume_score = #{energyConsumeScore}</if>
|
|
|
|
<if test="powerConsumeScore != null "> and power_consume_score = #{powerConsumeScore}</if>
|
|
<if test="powerConsumeScore != null "> and power_consume_score = #{powerConsumeScore}</if>
|
|
|
|
+ <if test="energyConsumeScore != null "> and energy_consume_score = #{energyConsumeScore}</if>
|
|
|
|
+ <if test="totalIndustrialValuePrecent != null "> and total_industrial_value_precent = #{totalIndustrialValuePrecent}</if>
|
|
|
|
+ <if test="taxableIncomePrecent != null "> and taxable_income_precent = #{taxableIncomePrecent}</if>
|
|
|
|
+ <if test="paidTaxPrecent != null "> and paid_tax_precent = #{paidTaxPrecent}</if>
|
|
|
|
+ <if test="fundingPrecent != null "> and funding_precent = #{fundingPrecent}</if>
|
|
|
|
+ <if test="powerConsumePrecent != null "> and power_consume_precent = #{powerConsumePrecent}</if>
|
|
|
|
+ <if test="energyConsumePrecent != null "> and energy_consume_precent = #{energyConsumePrecent}</if>
|
|
|
|
+ <if test="totalIndustrialValueLevel != null and totalIndustrialValueLevel != ''"> and total_industrial_value_level = #{totalIndustrialValueLevel}</if>
|
|
|
|
+ <if test="taxableIncomeLevel != null and taxableIncomeLevel != ''"> and taxable_income_level = #{taxableIncomeLevel}</if>
|
|
|
|
+ <if test="paidTaxLevel != null and paidTaxLevel != ''"> and paid_tax_level = #{paidTaxLevel}</if>
|
|
|
|
+ <if test="energyConsumeLevel != null and energyConsumeLevel != ''"> and energy_consume_level = #{energyConsumeLevel}</if>
|
|
|
|
+ <if test="fundingLevel != null and fundingLevel != ''"> and funding_level = #{fundingLevel}</if>
|
|
|
|
+ <if test="powerConsumeLevel != null and powerConsumeLevel != ''"> and power_consume_level = #{powerConsumeLevel}</if>
|
|
<if test="year != null and year != ''"> and year = #{year}</if>
|
|
<if test="year != null and year != ''"> and year = #{year}</if>
|
|
<if test="month != null and month != ''"> and month = #{month}</if>
|
|
<if test="month != null and month != ''"> and month = #{month}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectScoreById" parameterType="Long" resultMap="ScoreResult">
|
|
<select id="selectScoreById" parameterType="Long" resultMap="ScoreResult">
|
|
<include refid="selectScoreVo"/>
|
|
<include refid="selectScoreVo"/>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
@@ -62,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<insert id="insertScore" parameterType="Score" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertScore" parameterType="Score" useGeneratedKeys="true" keyProperty="id">
|
|
insert into score
|
|
insert into score
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
- <if test="enterpriseName != null and enterpriseName != ''">enterprise_name,</if>
|
|
|
|
|
|
+ <if test="enterpriseName != null">enterprise_name,</if>
|
|
<if test="location != null">location,</if>
|
|
<if test="location != null">location,</if>
|
|
<if test="code != null">code,</if>
|
|
<if test="code != null">code,</if>
|
|
<if test="mainBusinessScore != null">main_business_score,</if>
|
|
<if test="mainBusinessScore != null">main_business_score,</if>
|
|
@@ -76,12 +100,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="profitScore != null">profit_score,</if>
|
|
<if test="profitScore != null">profit_score,</if>
|
|
<if test="ownerEquityScore != null">owner_equity_score,</if>
|
|
<if test="ownerEquityScore != null">owner_equity_score,</if>
|
|
<if test="fundingScore != null">funding_score,</if>
|
|
<if test="fundingScore != null">funding_score,</if>
|
|
|
|
+ <if test="powerConsumeScore != null">power_consume_score,</if>
|
|
<if test="energyConsumeScore != null">energy_consume_score,</if>
|
|
<if test="energyConsumeScore != null">energy_consume_score,</if>
|
|
- <if test="year != null and year != ''">year,</if>
|
|
|
|
|
|
+ <if test="totalIndustrialValuePrecent != null">total_industrial_value_precent,</if>
|
|
|
|
+ <if test="taxableIncomePrecent != null">taxable_income_precent,</if>
|
|
|
|
+ <if test="paidTaxPrecent != null">paid_tax_precent,</if>
|
|
|
|
+ <if test="fundingPrecent != null">funding_precent,</if>
|
|
|
|
+ <if test="powerConsumePrecent != null">power_consume_precent,</if>
|
|
|
|
+ <if test="energyConsumePrecent != null">energy_consume_precent,</if>
|
|
|
|
+ <if test="totalIndustrialValueLevel != null">total_industrial_value_level,</if>
|
|
|
|
+ <if test="taxableIncomeLevel != null">taxable_income_level,</if>
|
|
|
|
+ <if test="paidTaxLevel != null">paid_tax_level,</if>
|
|
|
|
+ <if test="energyConsumeLevel != null">energy_consume_level,</if>
|
|
|
|
+ <if test="fundingLevel != null">funding_level,</if>
|
|
|
|
+ <if test="powerConsumeLevel != null">power_consume_level,</if>
|
|
|
|
+ <if test="year != null">year,</if>
|
|
<if test="month != null">month,</if>
|
|
<if test="month != null">month,</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
- <if test="enterpriseName != null and enterpriseName != ''">#{enterpriseName},</if>
|
|
|
|
|
|
+ <if test="enterpriseName != null">#{enterpriseName},</if>
|
|
<if test="location != null">#{location},</if>
|
|
<if test="location != null">#{location},</if>
|
|
<if test="code != null">#{code},</if>
|
|
<if test="code != null">#{code},</if>
|
|
<if test="mainBusinessScore != null">#{mainBusinessScore},</if>
|
|
<if test="mainBusinessScore != null">#{mainBusinessScore},</if>
|
|
@@ -95,17 +132,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="profitScore != null">#{profitScore},</if>
|
|
<if test="profitScore != null">#{profitScore},</if>
|
|
<if test="ownerEquityScore != null">#{ownerEquityScore},</if>
|
|
<if test="ownerEquityScore != null">#{ownerEquityScore},</if>
|
|
<if test="fundingScore != null">#{fundingScore},</if>
|
|
<if test="fundingScore != null">#{fundingScore},</if>
|
|
- <if test="energyConsumeScore != null">#{energyConsumeScore},</if>
|
|
|
|
<if test="powerConsumeScore != null">#{powerConsumeScore},</if>
|
|
<if test="powerConsumeScore != null">#{powerConsumeScore},</if>
|
|
- <if test="year != null and year != ''">#{year},</if>
|
|
|
|
|
|
+ <if test="energyConsumeScore != null">#{energyConsumeScore},</if>
|
|
|
|
+ <if test="totalIndustrialValuePrecent != null">#{totalIndustrialValuePrecent},</if>
|
|
|
|
+ <if test="taxableIncomePrecent != null">#{taxableIncomePrecent},</if>
|
|
|
|
+ <if test="paidTaxPrecent != null">#{paidTaxPrecent},</if>
|
|
|
|
+ <if test="fundingPrecent != null">#{fundingPrecent},</if>
|
|
|
|
+ <if test="powerConsumePrecent != null">#{powerConsumePrecent},</if>
|
|
|
|
+ <if test="energyConsumePrecent != null">#{energyConsumePrecent},</if>
|
|
|
|
+ <if test="totalIndustrialValueLevel != null">#{totalIndustrialValueLevel},</if>
|
|
|
|
+ <if test="taxableIncomeLevel != null">#{taxableIncomeLevel},</if>
|
|
|
|
+ <if test="paidTaxLevel != null">#{paidTaxLevel},</if>
|
|
|
|
+ <if test="energyConsumeLevel != null">#{energyConsumeLevel},</if>
|
|
|
|
+ <if test="fundingLevel != null">#{fundingLevel},</if>
|
|
|
|
+ <if test="powerConsumeLevel != null">#{powerConsumeLevel},</if>
|
|
|
|
+ <if test="year != null">#{year},</if>
|
|
<if test="month != null">#{month},</if>
|
|
<if test="month != null">#{month},</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateScore" parameterType="Score">
|
|
<update id="updateScore" parameterType="Score">
|
|
update score
|
|
update score
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
- <if test="enterpriseName != null and enterpriseName != ''">enterprise_name = #{enterpriseName},</if>
|
|
|
|
|
|
+ <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
|
|
<if test="location != null">location = #{location},</if>
|
|
<if test="location != null">location = #{location},</if>
|
|
<if test="code != null">code = #{code},</if>
|
|
<if test="code != null">code = #{code},</if>
|
|
<if test="mainBusinessScore != null">main_business_score = #{mainBusinessScore},</if>
|
|
<if test="mainBusinessScore != null">main_business_score = #{mainBusinessScore},</if>
|
|
@@ -119,9 +168,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="profitScore != null">profit_score = #{profitScore},</if>
|
|
<if test="profitScore != null">profit_score = #{profitScore},</if>
|
|
<if test="ownerEquityScore != null">owner_equity_score = #{ownerEquityScore},</if>
|
|
<if test="ownerEquityScore != null">owner_equity_score = #{ownerEquityScore},</if>
|
|
<if test="fundingScore != null">funding_score = #{fundingScore},</if>
|
|
<if test="fundingScore != null">funding_score = #{fundingScore},</if>
|
|
- <if test="energyConsumeScore != null">energy_consume_score = #{energyConsumeScore},</if>
|
|
|
|
<if test="powerConsumeScore != null">power_consume_score = #{powerConsumeScore},</if>
|
|
<if test="powerConsumeScore != null">power_consume_score = #{powerConsumeScore},</if>
|
|
- <if test="year != null and year != ''">year = #{year},</if>
|
|
|
|
|
|
+ <if test="energyConsumeScore != null">energy_consume_score = #{energyConsumeScore},</if>
|
|
|
|
+ <if test="totalIndustrialValuePrecent != null">total_industrial_value_precent = #{totalIndustrialValuePrecent},</if>
|
|
|
|
+ <if test="taxableIncomePrecent != null">taxable_income_precent = #{taxableIncomePrecent},</if>
|
|
|
|
+ <if test="paidTaxPrecent != null">paid_tax_precent = #{paidTaxPrecent},</if>
|
|
|
|
+ <if test="fundingPrecent != null">funding_precent = #{fundingPrecent},</if>
|
|
|
|
+ <if test="powerConsumePrecent != null">power_consume_precent = #{powerConsumePrecent},</if>
|
|
|
|
+ <if test="energyConsumePrecent != null">energy_consume_precent = #{energyConsumePrecent},</if>
|
|
|
|
+ <if test="totalIndustrialValueLevel != null">total_industrial_value_level = #{totalIndustrialValueLevel},</if>
|
|
|
|
+ <if test="taxableIncomeLevel != null">taxable_income_level = #{taxableIncomeLevel},</if>
|
|
|
|
+ <if test="paidTaxLevel != null">paid_tax_level = #{paidTaxLevel},</if>
|
|
|
|
+ <if test="energyConsumeLevel != null">energy_consume_level = #{energyConsumeLevel},</if>
|
|
|
|
+ <if test="fundingLevel != null">funding_level = #{fundingLevel},</if>
|
|
|
|
+ <if test="powerConsumeLevel != null">power_consume_level = #{powerConsumeLevel},</if>
|
|
|
|
+ <if test="year != null">year = #{year},</if>
|
|
<if test="month != null">month = #{month},</if>
|
|
<if test="month != null">month = #{month},</if>
|
|
</trim>
|
|
</trim>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
@@ -132,7 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteScoreByIds" parameterType="String">
|
|
<delete id="deleteScoreByIds" parameterType="String">
|
|
- delete from score where id in
|
|
|
|
|
|
+ delete from score where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|