综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CmcWageMapper.xml 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.oa.mapper.CmcWageMapper">
  6. <resultMap type="CmcWage" id="CmcWageResult">
  7. <result property="wageId" column="wage_id" />
  8. <result property="userId" column="user_id" />
  9. <result property="baseSalary" column="base_salary" />
  10. <result property="yearSalary" column="year_salary" />
  11. <result property="postSalary" column="post_salary" />
  12. <result property="performanceSalary" column="performance_salary" />
  13. <result property="certificatesSubsidy" column="certificates_subsidy" />
  14. <result property="festivalSubsidy" column="festival_subsidy" />
  15. <result property="postStableSubsidy" column="post_stable_subsidy" />
  16. <result property="highTemperatureSubsidy" column="high_temperature_subsidy" />
  17. <result property="attendanceDeduct" column="attendance_deduct" />
  18. <result property="payableWage" column="payable_wage" />
  19. <result property="houseFund" column="house_fund" />
  20. <result property="endowmentInsurance" column="endowment_insurance" />
  21. <result property="unemploymentInsurance" column="unemployment_insurance" />
  22. <result property="medicalInsurance" column="medical_insurance" />
  23. <result property="propertyFee" column="property_fee" />
  24. <result property="deductTotal" column="deduct_total" />
  25. <result property="socialSecurityUnit" column="social_security_unit" />
  26. <result property="individualIncomeTax" column="individual_income_tax" />
  27. <result property="paidWage" column="paid_wage" />
  28. <result property="payDay" column="pay_day" />
  29. <result property="payMonth" column="pay_month" />
  30. <result property="remark" column="remark" />
  31. <result property="performanceId" column="performance_id" />
  32. </resultMap>
  33. <sql id="selectCmcWageVo">
  34. 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
  35. </sql>
  36. <select id="selectCmcWageList" parameterType="CmcWage" resultMap="CmcWageResult">
  37. <include refid="selectCmcWageVo"/>
  38. <where>
  39. <if test="userId != null "> and user_id = #{userId}</if>
  40. <if test="baseSalary != null "> and base_salary = #{baseSalary}</if>
  41. <if test="yearSalary != null "> and year_salary = #{yearSalary}</if>
  42. <if test="postSalary != null "> and post_salary = #{postSalary}</if>
  43. <if test="performanceSalary != null "> and performance_salary = #{performanceSalary}</if>
  44. <if test="certificatesSubsidy != null "> and certificates_subsidy = #{certificatesSubsidy}</if>
  45. <if test="festivalSubsidy != null "> and festival_subsidy = #{festivalSubsidy}</if>
  46. <if test="postStableSubsidy != null "> and post_stable_subsidy = #{postStableSubsidy}</if>
  47. <if test="highTemperatureSubsidy != null "> and high_temperature_subsidy = #{highTemperatureSubsidy}</if>
  48. <if test="attendanceDeduct != null "> and attendance_deduct = #{attendanceDeduct}</if>
  49. <if test="payableWage != null "> and payable_wage = #{payableWage}</if>
  50. <if test="houseFund != null "> and house_fund = #{houseFund}</if>
  51. <if test="endowmentInsurance != null "> and endowment_insurance = #{endowmentInsurance}</if>
  52. <if test="unemploymentInsurance != null "> and unemployment_insurance = #{unemploymentInsurance}</if>
  53. <if test="medicalInsurance != null "> and medical_insurance = #{medicalInsurance}</if>
  54. <if test="propertyFee != null "> and property_fee = #{propertyFee}</if>
  55. <if test="deductTotal != null "> and deduct_total = #{deductTotal}</if>
  56. <if test="socialSecurityUnit != null "> and social_security_unit = #{socialSecurityUnit}</if>
  57. <if test="individualIncomeTax != null "> and individual_income_tax = #{individualIncomeTax}</if>
  58. <if test="paidWage != null "> and paid_wage = #{paidWage}</if>
  59. <if test="payDay != null "> and pay_day = #{payDay}</if>
  60. <if test="payMonth != null "> and pay_month = #{payMonth}</if>
  61. <if test="performanceId != null and performanceId != ''"> and performance_id = #{performanceId}</if>
  62. </where>
  63. </select>
  64. <select id="selectCmcWageByWageId" parameterType="Integer" resultMap="CmcWageResult">
  65. <include refid="selectCmcWageVo"/>
  66. where wage_id = #{wageId}
  67. </select>
  68. <insert id="insertCmcWage" parameterType="CmcWage">
  69. insert into cmc_wage
  70. <trim prefix="(" suffix=")" suffixOverrides=",">
  71. <if test="wageId != null">wage_id,</if>
  72. <if test="userId != null">user_id,</if>
  73. <if test="baseSalary != null">base_salary,</if>
  74. <if test="yearSalary != null">year_salary,</if>
  75. <if test="postSalary != null">post_salary,</if>
  76. <if test="performanceSalary != null">performance_salary,</if>
  77. <if test="certificatesSubsidy != null">certificates_subsidy,</if>
  78. <if test="festivalSubsidy != null">festival_subsidy,</if>
  79. <if test="postStableSubsidy != null">post_stable_subsidy,</if>
  80. <if test="highTemperatureSubsidy != null">high_temperature_subsidy,</if>
  81. <if test="attendanceDeduct != null">attendance_deduct,</if>
  82. <if test="payableWage != null">payable_wage,</if>
  83. <if test="houseFund != null">house_fund,</if>
  84. <if test="endowmentInsurance != null">endowment_insurance,</if>
  85. <if test="unemploymentInsurance != null">unemployment_insurance,</if>
  86. <if test="medicalInsurance != null">medical_insurance,</if>
  87. <if test="propertyFee != null">property_fee,</if>
  88. <if test="deductTotal != null">deduct_total,</if>
  89. <if test="socialSecurityUnit != null">social_security_unit,</if>
  90. <if test="individualIncomeTax != null">individual_income_tax,</if>
  91. <if test="paidWage != null">paid_wage,</if>
  92. <if test="payDay != null">pay_day,</if>
  93. <if test="payMonth != null">pay_month,</if>
  94. <if test="remark != null">remark,</if>
  95. <if test="performanceId != null">performance_id,</if>
  96. </trim>
  97. <trim prefix="values (" suffix=")" suffixOverrides=",">
  98. <if test="wageId != null">#{wageId},</if>
  99. <if test="userId != null">#{userId},</if>
  100. <if test="baseSalary != null">#{baseSalary},</if>
  101. <if test="yearSalary != null">#{yearSalary},</if>
  102. <if test="postSalary != null">#{postSalary},</if>
  103. <if test="performanceSalary != null">#{performanceSalary},</if>
  104. <if test="certificatesSubsidy != null">#{certificatesSubsidy},</if>
  105. <if test="festivalSubsidy != null">#{festivalSubsidy},</if>
  106. <if test="postStableSubsidy != null">#{postStableSubsidy},</if>
  107. <if test="highTemperatureSubsidy != null">#{highTemperatureSubsidy},</if>
  108. <if test="attendanceDeduct != null">#{attendanceDeduct},</if>
  109. <if test="payableWage != null">#{payableWage},</if>
  110. <if test="houseFund != null">#{houseFund},</if>
  111. <if test="endowmentInsurance != null">#{endowmentInsurance},</if>
  112. <if test="unemploymentInsurance != null">#{unemploymentInsurance},</if>
  113. <if test="medicalInsurance != null">#{medicalInsurance},</if>
  114. <if test="propertyFee != null">#{propertyFee},</if>
  115. <if test="deductTotal != null">#{deductTotal},</if>
  116. <if test="socialSecurityUnit != null">#{socialSecurityUnit},</if>
  117. <if test="individualIncomeTax != null">#{individualIncomeTax},</if>
  118. <if test="paidWage != null">#{paidWage},</if>
  119. <if test="payDay != null">#{payDay},</if>
  120. <if test="payMonth != null">#{payMonth},</if>
  121. <if test="remark != null">#{remark},</if>
  122. <if test="performanceId != null">#{performanceId},</if>
  123. </trim>
  124. </insert>
  125. <update id="updateCmcWage" parameterType="CmcWage">
  126. update cmc_wage
  127. <trim prefix="SET" suffixOverrides=",">
  128. <if test="userId != null">user_id = #{userId},</if>
  129. <if test="baseSalary != null">base_salary = #{baseSalary},</if>
  130. <if test="yearSalary != null">year_salary = #{yearSalary},</if>
  131. <if test="postSalary != null">post_salary = #{postSalary},</if>
  132. <if test="performanceSalary != null">performance_salary = #{performanceSalary},</if>
  133. <if test="certificatesSubsidy != null">certificates_subsidy = #{certificatesSubsidy},</if>
  134. <if test="festivalSubsidy != null">festival_subsidy = #{festivalSubsidy},</if>
  135. <if test="postStableSubsidy != null">post_stable_subsidy = #{postStableSubsidy},</if>
  136. <if test="highTemperatureSubsidy != null">high_temperature_subsidy = #{highTemperatureSubsidy},</if>
  137. <if test="attendanceDeduct != null">attendance_deduct = #{attendanceDeduct},</if>
  138. <if test="payableWage != null">payable_wage = #{payableWage},</if>
  139. <if test="houseFund != null">house_fund = #{houseFund},</if>
  140. <if test="endowmentInsurance != null">endowment_insurance = #{endowmentInsurance},</if>
  141. <if test="unemploymentInsurance != null">unemployment_insurance = #{unemploymentInsurance},</if>
  142. <if test="medicalInsurance != null">medical_insurance = #{medicalInsurance},</if>
  143. <if test="propertyFee != null">property_fee = #{propertyFee},</if>
  144. <if test="deductTotal != null">deduct_total = #{deductTotal},</if>
  145. <if test="socialSecurityUnit != null">social_security_unit = #{socialSecurityUnit},</if>
  146. <if test="individualIncomeTax != null">individual_income_tax = #{individualIncomeTax},</if>
  147. <if test="paidWage != null">paid_wage = #{paidWage},</if>
  148. <if test="payDay != null">pay_day = #{payDay},</if>
  149. <if test="payMonth != null">pay_month = #{payMonth},</if>
  150. <if test="remark != null">remark = #{remark},</if>
  151. <if test="performanceId != null">performance_id = #{performanceId},</if>
  152. </trim>
  153. where wage_id = #{wageId}
  154. </update>
  155. <delete id="deleteCmcWageByWageId" parameterType="Integer">
  156. delete from cmc_wage where wage_id = #{wageId}
  157. </delete>
  158. <delete id="deleteCmcWageByWageIds" parameterType="String">
  159. delete from cmc_wage where wage_id in
  160. <foreach item="wageId" collection="array" open="(" separator="," close=")">
  161. #{wageId}
  162. </foreach>
  163. </delete>
  164. <delete id="deleteCmcWageByPerformanceIds" parameterType="String">
  165. delete from cmc_wage where performance_id in
  166. <foreach item="performanceId" collection="array" open="(" separator="," close=")">
  167. #{performanceId}
  168. </foreach>
  169. </delete>
  170. </mapper>