WagesMapper.xml 6.73 KB
Newer Older
hehongwei's avatar
hehongwei committed
1 2 3 4 5
<?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.ruoyi.system.mapper.WagesMapper">
Fuzy's avatar
Fuzy committed
6

hehongwei's avatar
hehongwei committed
7 8 9 10 11 12
    <insert id="insertDetailsOriginal">
        insert into wages_details_original_data (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,
13
        unemployment_insurance,medical_insurance,annuity,housing_provident_fund,enterprise_fund,annuity_income_tax,total_payment,total_salary_disbursement,import_time)
hehongwei's avatar
hehongwei committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27
        values
        <foreach collection="accList" item="list" separator=",">
            (#{list.year}, #{list.month}, #{list.unitName}, #{list.peopleCount},
            #{list.totalWithholding},
            #{list.netSalary}, #{list.oneChildFee}, #{list.medicalSubsidy}, #{list.healthCareFee},
            #{list.classMealFee}, #{list.soapFee}, #{list.nursingFee}, #{list.heatstrokePreventionSubsidy},
            #{list.heatingSubsidy},
            #{list.manuscriptFee}, #{list.driverAllowance}, #{list.graduateSettlementFee},
            #{list.oneTimeDisabilitySubsidy}, #{list.lectureAndExamFee}, #{list.otherSubsidies},
            #{list.houseRent}, #{list.wagesPayable}, #{list.accommodation}, #{list.heatingFee}, #{list.tradeUnionDues},
            #{list.compensationDeduction}, #{list.otherDeductions}
            , #{list.mutualMedicalAid}, #{list.communicationFee}, #{list.tax1}, #{list.tax2}, #{list.pensionInsurance}
            , #{list.unemploymentInsurance}, #{list.medicalInsurance}, #{list.annuity}, #{list.housingProvidentFund},
            #{list.enterpriseFund}
28
            , #{list.annuityIncomeTax}, #{list.totalPayment}, #{list.totalSalaryDisbursement}, #{date})
hehongwei's avatar
hehongwei committed
29 30 31 32
        </foreach>
    </insert>
    <insert id="insertWagesOverviewOriginal">
        insert into wages_overview_original_data(year,month,unit_code,unit_name,worker_count,worker_wages_payable,
33
        cadre_count,cadre_wages_payable,total_count,total_wages_payable,import_time)
hehongwei's avatar
hehongwei committed
34 35 36 37 38
        values
        <foreach collection="accList" item="list" separator=",">
            (#{list.year}, #{list.month}, #{list.unitCode}, #{list.unitName},
            #{list.workerCount},
            #{list.workerWagesPayable}, #{list.cadreCount}, #{list.cadreWagesPayable}, #{list.totalCount},
39
            #{list.totalWagesPayable}, #{date})
hehongwei's avatar
hehongwei committed
40 41
        </foreach>
    </insert>
Fuzy's avatar
Fuzy committed
42 43 44 45 46 47 48 49 50 51 52 53
    <delete id="deleteDetailsOriginal">
        delete
        from wages_details_original_data
        where month = #{month}
          and year = #{year}
    </delete>
    <delete id="deleteWagesOverviewOriginal">
        delete
        from wages_overview_original_data
        where month = #{month}
          and year = #{year}
    </delete>
54 55 56 57 58 59 60 61 62 63
    <delete id="deleteOverviewToDate">
        delete
        from wages_overview_original_data
        where import_time = #{date};
    </delete>
    <delete id="deleteDetailsToDate">
        delete
        from wages_details_original_data
        where import_time = #{date};
    </delete>
Fuzy's avatar
Fuzy committed
64
    <select id="queryList" resultType="com.ruoyi.system.model.wages.vo.WagesOverviewOriginalDataVO">
Fuzy's avatar
Fuzy committed
65 66 67 68 69 70 71 72 73 74
        select year                 as year,
               month                as month,
               unit_code            as unitCode,
               unit_name            as unitName,
               worker_count         as workerCount,
               worker_wages_payable as workerWagesPayable,
               cadre_count          as cadreCount,
               cadre_wages_payable  as cadreWagesPayable,
               total_count          as totalCount,
               total_wages_payable  as totalWagesPayable
Fuzy's avatar
Fuzy committed
75 76
        from wages_overview_original_data
    </select>
Fuzy's avatar
Fuzy committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
    <select id="detailsSelect" resultType="com.ruoyi.system.model.wages.dao.WagesDetailsOriginalExcelDAO">
        select year                          as year,
               month                         as month,
               unit_name                     as unitName,
               people_count                  as peopleCount,
               total_withholding             as totalWithholding,
               net_salary                    as netSalary,
               one_child_fee                 as oneChildFee,
               medical_subsidy               as medicalSubsidy,
               health_care_fee               as healthCareFee,
               class_meal_fee                as classMealFee,
               soap_fee                      as soapFee,
               nursing_fee                   as nursingFee,
               heatstroke_prevention_subsidy as heatstrokePreventionSubsidy,
               heating_subsidy               as heatingSubsidy,
               manuscript_fee                as manuscriptFee,
               driver_allowance              as driverAllowance,
               graduate_settlement_fee       as graduateSettlementFee,
               one_time_disability_subsidy   as oneTimeDisabilitySubsidy,
               lecture_and_exam_fee          as lectureAndExamFee,
               other_subsidies               as otherSubsidies,
               house_rent                    as houseRent,
               Wages_payable                 as WagesPayable,
               accommodation                 as accommodation,
               heating_fee                   as heatingFee,
               trade_union_dues              as tradeUnionDues,
               compensation_deduction        as compensationDeduction,
               other_deductions              as otherDeductions,
               mutual_medical_aid            as mutual_medical_aid,
               communication_fee             as communicationFee,
               tax1                          as tax1,
               tax2                          as tax2,
               pension_insurance             as pensionInsurance,
               unemployment_insurance        as unemploymentInsurance,
               medical_insurance             as medicalInsurance,
               annuity                       as annuity,
               housing_provident_fund        as housingProvidentFund,
               enterprise_fund               as enterpriseFund,
               annuity_income_tax            as annuityIncomeTax,
               total_payment                 as totalPayment,
               total_salary_disbursement     as totalSalaryDisbursement
        from wages_details_original_data
    </select>
hehongwei's avatar
hehongwei committed
120
</mapper>