|
@@ -30,38 +30,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
30
|
30
|
<result property="payMonth" column="pay_month" />
|
31
|
31
|
<result property="remark" column="remark" />
|
32
|
32
|
<result property="performanceId" column="performance_id" />
|
|
33
|
+ <association property="user" javaType="SysUser" resultMap="SysUserResult" />
|
|
34
|
+ </resultMap>
|
|
35
|
+
|
|
36
|
+ <resultMap type="SysUser" id="SysUserResult">
|
|
37
|
+ <result property="userId" column="user_id" />
|
|
38
|
+ <result property="nickName" column="nick_name" />
|
33
|
39
|
</resultMap>
|
34
|
40
|
|
35
|
41
|
<sql id="selectCmcWageVo">
|
36
|
|
- select wage_id, user_id, base_salary, year_salary, post_salary, performance_salary, certificates_subsidy, festival_subsidy, post_stable_subsidy, high_temperature_subsidy, attendance_deduct, payable_wage, house_fund, endowment_insurance, unemployment_insurance, medical_insurance, property_fee, deduct_total, social_security_unit, individual_income_tax, paid_wage, pay_day, pay_month, remark, performance_id from cmc_wage
|
|
42
|
+ select w.wage_id, w.user_id, w.base_salary, w.year_salary, w.post_salary, w.performance_salary, w.certificates_subsidy, w.festival_subsidy, w.post_stable_subsidy,
|
|
43
|
+ w.high_temperature_subsidy, w.attendance_deduct, w.payable_wage, w.house_fund, w.endowment_insurance, w.unemployment_insurance, w.medical_insurance, w.property_fee,
|
|
44
|
+ w.deduct_total, w.social_security_unit, w.individual_income_tax, w.paid_wage, w.pay_day, w.pay_month, w.remark, w.performance_id, u.nick_name from cmc_wage as w
|
|
45
|
+ left join sys_user as u on u.user_id = w.user_id
|
37
|
46
|
</sql>
|
38
|
47
|
|
39
|
48
|
<select id="selectCmcWageList" parameterType="CmcWage" resultMap="CmcWageResult">
|
40
|
49
|
<include refid="selectCmcWageVo"/>
|
41
|
50
|
<where>
|
42
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
43
|
|
- <if test="baseSalary != null "> and base_salary = #{baseSalary}</if>
|
44
|
|
- <if test="yearSalary != null "> and year_salary = #{yearSalary}</if>
|
45
|
|
- <if test="postSalary != null "> and post_salary = #{postSalary}</if>
|
46
|
|
- <if test="performanceSalary != null "> and performance_salary = #{performanceSalary}</if>
|
47
|
|
- <if test="certificatesSubsidy != null "> and certificates_subsidy = #{certificatesSubsidy}</if>
|
48
|
|
- <if test="festivalSubsidy != null "> and festival_subsidy = #{festivalSubsidy}</if>
|
49
|
|
- <if test="postStableSubsidy != null "> and post_stable_subsidy = #{postStableSubsidy}</if>
|
50
|
|
- <if test="highTemperatureSubsidy != null "> and high_temperature_subsidy = #{highTemperatureSubsidy}</if>
|
51
|
|
- <if test="attendanceDeduct != null "> and attendance_deduct = #{attendanceDeduct}</if>
|
52
|
|
- <if test="payableWage != null "> and payable_wage = #{payableWage}</if>
|
53
|
|
- <if test="houseFund != null "> and house_fund = #{houseFund}</if>
|
54
|
|
- <if test="endowmentInsurance != null "> and endowment_insurance = #{endowmentInsurance}</if>
|
55
|
|
- <if test="unemploymentInsurance != null "> and unemployment_insurance = #{unemploymentInsurance}</if>
|
56
|
|
- <if test="medicalInsurance != null "> and medical_insurance = #{medicalInsurance}</if>
|
57
|
|
- <if test="propertyFee != null "> and property_fee = #{propertyFee}</if>
|
58
|
|
- <if test="deductTotal != null "> and deduct_total = #{deductTotal}</if>
|
59
|
|
- <if test="socialSecurityUnit != null "> and social_security_unit = #{socialSecurityUnit}</if>
|
60
|
|
- <if test="individualIncomeTax != null "> and individual_income_tax = #{individualIncomeTax}</if>
|
61
|
|
- <if test="paidWage != null "> and paid_wage = #{paidWage}</if>
|
62
|
|
- <if test="payDay != null "> and pay_day = #{payDay}</if>
|
63
|
|
- <if test="payMonth != null "> and pay_month = #{payMonth}</if>
|
64
|
|
- <if test="performanceId != null and performanceId != ''"> and performance_id = #{performanceId}</if>
|
|
51
|
+ <if test="userId != null "> and w.user_id = #{userId}</if>
|
|
52
|
+ <if test="baseSalary != null "> and w.base_salary = #{baseSalary}</if>
|
|
53
|
+ <if test="yearSalary != null "> and w.year_salary = #{yearSalary}</if>
|
|
54
|
+ <if test="postSalary != null "> and w.post_salary = #{postSalary}</if>
|
|
55
|
+ <if test="performanceSalary != null "> and w.performance_salary = #{performanceSalary}</if>
|
|
56
|
+ <if test="certificatesSubsidy != null "> and w.certificates_subsidy = #{certificatesSubsidy}</if>
|
|
57
|
+ <if test="festivalSubsidy != null "> and w.festival_subsidy = #{festivalSubsidy}</if>
|
|
58
|
+ <if test="postStableSubsidy != null "> and w.post_stable_subsidy = #{postStableSubsidy}</if>
|
|
59
|
+ <if test="highTemperatureSubsidy != null "> and w.high_temperature_subsidy = #{highTemperatureSubsidy}</if>
|
|
60
|
+ <if test="attendanceDeduct != null "> and w.attendance_deduct = #{attendanceDeduct}</if>
|
|
61
|
+ <if test="payableWage != null "> and w.payable_wage = #{payableWage}</if>
|
|
62
|
+ <if test="houseFund != null "> and w.house_fund = #{houseFund}</if>
|
|
63
|
+ <if test="endowmentInsurance != null "> and w.endowment_insurance = #{endowmentInsurance}</if>
|
|
64
|
+ <if test="unemploymentInsurance != null "> and w.unemployment_insurance = #{unemploymentInsurance}</if>
|
|
65
|
+ <if test="medicalInsurance != null "> and w.medical_insurance = #{medicalInsurance}</if>
|
|
66
|
+ <if test="propertyFee != null "> and w.property_fee = #{propertyFee}</if>
|
|
67
|
+ <if test="deductTotal != null "> and w.deduct_total = #{deductTotal}</if>
|
|
68
|
+ <if test="socialSecurityUnit != null "> and w.social_security_unit = #{socialSecurityUnit}</if>
|
|
69
|
+ <if test="individualIncomeTax != null "> and w.individual_income_tax = #{individualIncomeTax}</if>
|
|
70
|
+ <if test="paidWage != null "> and w.paid_wage = #{paidWage}</if>
|
|
71
|
+ <if test="payDay != null "> and w.pay_day = #{payDay}</if>
|
|
72
|
+ <if test="payMonth != null "> and MONTH(w.pay_month) = MONTH(#{payMonth})</if>
|
|
73
|
+ <if test="performanceId != null and performanceId != ''"> and w.performance_id = #{performanceId}</if>
|
65
|
74
|
</where>
|
66
|
75
|
</select>
|
67
|
76
|
|