Commit ca108cfe authored by Fuzy's avatar Fuzy

重构计算方法

parent 959f7df4
......@@ -6,6 +6,7 @@
<resultMap type="com.ruoyi.system.model.wages.dao.WagesDetailsOriginalExcelDAO" id="WagesDetailsOriginalDataResult">
<result property="id" column="id"/>
<result property="sskId" column="ssk_id"/>
<result property="year" column="year"/>
<result property="month" column="month"/>
<result property="unitName" column="unit_name"/>
......@@ -50,7 +51,6 @@
<sql id="selectWagesDetailsOriginalDataVo">
select id,
ssk_id,
year,
month,
unit_name,
......@@ -94,56 +94,101 @@
from wages_details_original_data
where import_time = #{date}
</sql>
<select id="selectAll" parameterType="com.ruoyi.system.model.wages.dao.WagesDetailsOriginalExcelDAO"
resultMap="WagesDetailsOriginalDataResult">
<include refid="selectWagesDetailsOriginalDataVo"/>
<where>
'1' = '1'
<if test="sskId != null and sskId != ''">and ssk_id = #{sskId}</if>
<if test="year != null and year != ''">and year = #{year}</if>
<if test="month != null and month != ''">and month = #{month}</if>
<if test="unitName != null and unitName != ''">and unit_name like concat('%', #{unitName}, '%')</if>
<if test="peopleCount != null ">and people_count = #{peopleCount}</if>
<if test="totalWithholding != null ">and total_withholding = #{totalWithholding}</if>
<if test="netSalary != null ">and net_salary = #{netSalary}</if>
<if test="oneChildFee != null ">and one_child_fee = #{oneChildFee}</if>
<if test="medicalSubsidy != null ">and medical_subsidy = #{medicalSubsidy}</if>
<if test="healthCareFee != null ">and health_care_fee = #{healthCareFee}</if>
<if test="classMealFee != null ">and class_meal_fee = #{classMealFee}</if>
<if test="soapFee != null ">and soap_fee = #{soapFee}</if>
<if test="nursingFee != null ">and nursing_fee = #{nursingFee}</if>
<if test="heatstrokePreventionSubsidy != null ">and heatstroke_prevention_subsidy =
#{heatstrokePreventionSubsidy}
</if>
<if test="heatingSubsidy != null ">and heating_subsidy = #{heatingSubsidy}</if>
<if test="manuscriptFee != null ">and manuscript_fee = #{manuscriptFee}</if>
<if test="driverAllowance != null ">and driver_allowance = #{driverAllowance}</if>
<if test="graduateSettlementFee != null ">and graduate_settlement_fee = #{graduateSettlementFee}</if>
<if test="oneTimeDisabilitySubsidy != null ">and one_time_disability_subsidy = #{oneTimeDisabilitySubsidy}
</if>
<if test="lectureAndExamFee != null ">and lecture_and_exam_fee = #{lectureAndExamFee}</if>
<if test="otherSubsidies != null ">and other_subsidies = #{otherSubsidies}</if>
<if test="houseRent != null ">and house_rent = #{houseRent}</if>
<if test="wagesPayable != null ">and Wages_payable = #{wagesPayable}</if>
<if test="accommodation != null ">and accommodation = #{accommodation}</if>
<if test="heatingFee != null ">and heating_fee = #{heatingFee}</if>
<if test="tradeUnionDues != null ">and trade_union_dues = #{tradeUnionDues}</if>
<if test="compensationDeduction != null ">and compensation_deduction = #{compensationDeduction}</if>
<if test="otherDeductions != null ">and other_deductions = #{otherDeductions}</if>
<if test="mutualMedicalAid != null ">and mutual_medical_aid = #{mutualMedicalAid}</if>
<if test="communicationFee != null ">and communication_fee = #{communicationFee}</if>
<if test="tax1 != null ">and tax1 = #{tax1}</if>
<if test="tax2 != null ">and tax2 = #{tax2}</if>
<if test="pensionInsurance != null ">and pension_insurance = #{pensionInsurance}</if>
<if test="unemploymentInsurance != null ">and unemployment_insurance = #{unemploymentInsurance}</if>
<if test="medicalInsurance != null ">and medical_insurance = #{medicalInsurance}</if>
<if test="annuity != null ">and annuity = #{annuity}</if>
<if test="housingProvidentFund != null ">and housing_provident_fund = #{housingProvidentFund}</if>
<if test="enterpriseFund != null ">and enterprise_fund = #{enterpriseFund}</if>
<if test="annuityIncomeTax != null ">and annuity_income_tax = #{annuityIncomeTax}</if>
<if test="totalPayment != null ">and total_payment = #{totalPayment}</if>
<if test="totalSalaryDisbursement != null ">and total_salary_disbursement = #{totalSalaryDisbursement}</if>
</where>
<select id="selectAll" resultMap="WagesDetailsOriginalDataResult">
select id,
year,
month,
unit_name,
people_count,
total_withholding,
net_salary,
one_child_fee,
medical_subsidy,
health_care_fee,
class_meal_fee,
soap_fee,
nursing_fee,
heatstroke_prevention_subsidy,
heating_subsidy,
manuscript_fee,
driver_allowance,
graduate_settlement_fee,
one_time_disability_subsidy,
lecture_and_exam_fee,
other_subsidies,
house_rent,
Wages_payable,
accommodation,
heating_fee,
trade_union_dues,
compensation_deduction,
other_deductions,
mutual_medical_aid,
communication_fee,
tax1,
tax2,
pension_insurance,
unemployment_insurance,
medical_insurance,
annuity,
housing_provident_fund,
enterprise_fund,
annuity_income_tax,
total_payment,
total_salary_disbursement
from wages_details_original_data
where import_time = #{date}
</select>
<!-- <select id="selectAll" parameterType="com.ruoyi.system.model.wages.dao.WagesDetailsOriginalExcelDAO"-->
<!-- resultMap="WagesDetailsOriginalDataResult">-->
<!-- <include refid="selectWagesDetailsOriginalDataVo"/>-->
<!-- <where>-->
<!--'1' = '1'-->
<!-- <if test="sskId != null and sskId != ''">and ssk_id = #{sskId}</if>-->
<!-- <if test="year != null and year != ''">and year = #{year}</if>-->
<!-- <if test="month != null and month != ''">and month = #{month}</if>-->
<!-- <if test="unitName != null and unitName != ''">and unit_name like concat('%', #{unitName}, '%')</if>-->
<!-- <if test="peopleCount != null ">and people_count = #{peopleCount}</if>-->
<!-- <if test="totalWithholding != null ">and total_withholding = #{totalWithholding}</if>-->
<!-- <if test="netSalary != null ">and net_salary = #{netSalary}</if>-->
<!-- <if test="oneChildFee != null ">and one_child_fee = #{oneChildFee}</if>-->
<!-- <if test="medicalSubsidy != null ">and medical_subsidy = #{medicalSubsidy}</if>-->
<!-- <if test="healthCareFee != null ">and health_care_fee = #{healthCareFee}</if>-->
<!-- <if test="classMealFee != null ">and class_meal_fee = #{classMealFee}</if>-->
<!-- <if test="soapFee != null ">and soap_fee = #{soapFee}</if>-->
<!-- <if test="nursingFee != null ">and nursing_fee = #{nursingFee}</if>-->
<!-- <if test="heatstrokePreventionSubsidy != null ">and heatstroke_prevention_subsidy =-->
<!-- #{heatstrokePreventionSubsidy}-->
<!-- </if>-->
<!-- <if test="heatingSubsidy != null ">and heating_subsidy = #{heatingSubsidy}</if>-->
<!-- <if test="manuscriptFee != null ">and manuscript_fee = #{manuscriptFee}</if>-->
<!-- <if test="driverAllowance != null ">and driver_allowance = #{driverAllowance}</if>-->
<!-- <if test="graduateSettlementFee != null ">and graduate_settlement_fee = #{graduateSettlementFee}</if>-->
<!-- <if test="oneTimeDisabilitySubsidy != null ">and one_time_disability_subsidy = #{oneTimeDisabilitySubsidy}-->
<!-- </if>-->
<!-- <if test="lectureAndExamFee != null ">and lecture_and_exam_fee = #{lectureAndExamFee}</if>-->
<!-- <if test="otherSubsidies != null ">and other_subsidies = #{otherSubsidies}</if>-->
<!-- <if test="houseRent != null ">and house_rent = #{houseRent}</if>-->
<!-- <if test="wagesPayable != null ">and Wages_payable = #{wagesPayable}</if>-->
<!-- <if test="accommodation != null ">and accommodation = #{accommodation}</if>-->
<!-- <if test="heatingFee != null ">and heating_fee = #{heatingFee}</if>-->
<!-- <if test="tradeUnionDues != null ">and trade_union_dues = #{tradeUnionDues}</if>-->
<!-- <if test="compensationDeduction != null ">and compensation_deduction = #{compensationDeduction}</if>-->
<!-- <if test="otherDeductions != null ">and other_deductions = #{otherDeductions}</if>-->
<!-- <if test="mutualMedicalAid != null ">and mutual_medical_aid = #{mutualMedicalAid}</if>-->
<!-- <if test="communicationFee != null ">and communication_fee = #{communicationFee}</if>-->
<!-- <if test="tax1 != null ">and tax1 = #{tax1}</if>-->
<!-- <if test="tax2 != null ">and tax2 = #{tax2}</if>-->
<!-- <if test="pensionInsurance != null ">and pension_insurance = #{pensionInsurance}</if>-->
<!-- <if test="unemploymentInsurance != null ">and unemployment_insurance = #{unemploymentInsurance}</if>-->
<!-- <if test="medicalInsurance != null ">and medical_insurance = #{medicalInsurance}</if>-->
<!-- <if test="annuity != null ">and annuity = #{annuity}</if>-->
<!-- <if test="housingProvidentFund != null ">and housing_provident_fund = #{housingProvidentFund}</if>-->
<!-- <if test="enterpriseFund != null ">and enterprise_fund = #{enterpriseFund}</if>-->
<!-- <if test="annuityIncomeTax != null ">and annuity_income_tax = #{annuityIncomeTax}</if>-->
<!-- <if test="totalPayment != null ">and total_payment = #{totalPayment}</if>-->
<!-- <if test="totalSalaryDisbursement != null ">and total_salary_disbursement = #{totalSalaryDisbursement}</if>-->
<!-- </where>-->
<!-- </select>-->
</mapper>
\ No newline at end of file
......@@ -33,21 +33,36 @@
from wages_overview_original_data
where import_time = #{date}
</sql>
<select id="selectAll" parameterType="com.ruoyi.system.model.wages.dao.WagesOverviewOriginalExcelDAO"
resultMap="WagesOverviewOriginalDataResult">
<include refid="selectWagesOverviewOriginalDataVo"/>
<where>
<if test="year != null and year != ''">and year = #{year}</if>
<if test="month != null and month != ''">and month = #{month}</if>
<if test="unitCode != null and unitCode != ''">and unit_code = #{unitCode}</if>
<if test="unitName != null and unitName != ''">and unit_name like concat('%', #{unitName}, '%')</if>
<if test="workerCount != null ">and worker_count = #{workerCount}</if>
<if test="workerWagesPayable != null ">and worker_wages_payable = #{workerWagesPayable}</if>
<if test="cadreCount != null ">and cadre_count = #{cadreCount}</if>
<if test="cadreWagesPayable != null ">and cadre_wages_payable = #{cadreWagesPayable}</if>
<if test="totalCount != null ">and total_count = #{totalCount}</if>
<if test="totalWagesPayable != null ">and total_wages_payable = #{totalWagesPayable}</if>
</where>
<select id="selectAll" resultMap="WagesOverviewOriginalDataResult">
select id,
year,
month,
unit_code,
unit_name,
worker_count,
worker_wages_payable,
cadre_count,
cadre_wages_payable,
total_count,
total_wages_payable
from wages_overview_original_data
where import_time = #{date}
</select>
<!-- <select id="selectAll" parameterType="com.ruoyi.system.model.wages.dao.WagesOverviewOriginalExcelDAO"-->
<!-- resultMap="WagesOverviewOriginalDataResult">-->
<!-- <include refid="selectWagesOverviewOriginalDataVo"/>-->
<!-- <where>-->
<!-- <if test="year != null and year != ''">and year = #{year}</if>-->
<!-- <if test="month != null and month != ''">and month = #{month}</if>-->
<!-- <if test="unitCode != null and unitCode != ''">and unit_code = #{unitCode}</if>-->
<!-- <if test="unitName != null and unitName != ''">and unit_name like concat('%', #{unitName}, '%')</if>-->
<!-- <if test="workerCount != null ">and worker_count = #{workerCount}</if>-->
<!-- <if test="workerWagesPayable != null ">and worker_wages_payable = #{workerWagesPayable}</if>-->
<!-- <if test="cadreCount != null ">and cadre_count = #{cadreCount}</if>-->
<!-- <if test="cadreWagesPayable != null ">and cadre_wages_payable = #{cadreWagesPayable}</if>-->
<!-- <if test="totalCount != null ">and total_count = #{totalCount}</if>-->
<!-- <if test="totalWagesPayable != null ">and total_wages_payable = #{totalWagesPayable}</if>-->
<!-- </where>-->
<!-- </select>-->
</mapper>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment