Commit ca108cfe authored by Fuzy's avatar Fuzy

重构计算方法

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