综合办公系统
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

CmcWageMapper.xml 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. <association property="user" javaType="SysUser" resultMap="SysUserResult" />
  33. </resultMap>
  34. <resultMap type="SysUser" id="SysUserResult">
  35. <result property="userId" column="user_id" />
  36. <result property="nickName" column="nick_name" />
  37. </resultMap>
  38. <sql id="selectCmcWageVo">
  39. 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,
  40. 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,
  41. 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
  42. left join sys_user as u on u.user_id = w.user_id
  43. </sql>
  44. <select id="selectCmcWageList" parameterType="CmcWage" resultMap="CmcWageResult">
  45. <include refid="selectCmcWageVo"/>
  46. <where>
  47. <if test="userId != null "> and w.user_id = #{userId}</if>
  48. <if test="baseSalary != null "> and w.base_salary = #{baseSalary}</if>
  49. <if test="yearSalary != null "> and w.year_salary = #{yearSalary}</if>
  50. <if test="postSalary != null "> and w.post_salary = #{postSalary}</if>
  51. <if test="performanceSalary != null "> and w.performance_salary = #{performanceSalary}</if>
  52. <if test="certificatesSubsidy != null "> and w.certificates_subsidy = #{certificatesSubsidy}</if>
  53. <if test="festivalSubsidy != null "> and w.festival_subsidy = #{festivalSubsidy}</if>
  54. <if test="postStableSubsidy != null "> and w.post_stable_subsidy = #{postStableSubsidy}</if>
  55. <if test="highTemperatureSubsidy != null "> and w.high_temperature_subsidy = #{highTemperatureSubsidy}</if>
  56. <if test="attendanceDeduct != null "> and w.attendance_deduct = #{attendanceDeduct}</if>
  57. <if test="payableWage != null "> and w.payable_wage = #{payableWage}</if>
  58. <if test="houseFund != null "> and w.house_fund = #{houseFund}</if>
  59. <if test="endowmentInsurance != null "> and w.endowment_insurance = #{endowmentInsurance}</if>
  60. <if test="unemploymentInsurance != null "> and w.unemployment_insurance = #{unemploymentInsurance}</if>
  61. <if test="medicalInsurance != null "> and w.medical_insurance = #{medicalInsurance}</if>
  62. <if test="propertyFee != null "> and w.property_fee = #{propertyFee}</if>
  63. <if test="deductTotal != null "> and w.deduct_total = #{deductTotal}</if>
  64. <if test="socialSecurityUnit != null "> and w.social_security_unit = #{socialSecurityUnit}</if>
  65. <if test="individualIncomeTax != null "> and w.individual_income_tax = #{individualIncomeTax}</if>
  66. <if test="paidWage != null "> and w.paid_wage = #{paidWage}</if>
  67. <if test="payDay != null "> and w.pay_day = #{payDay}</if>
  68. <if test="payMonth != null "> and MONTH(w.pay_month) = MONTH(#{payMonth})</if>
  69. <if test="performanceId != null and performanceId != ''"> and w.performance_id = #{performanceId}</if>
  70. </where>
  71. </select>
  72. <select id="selectCmcWageByWageId" parameterType="Integer" resultMap="CmcWageResult">
  73. <include refid="selectCmcWageVo"/>
  74. where wage_id = #{wageId}
  75. </select>
  76. <insert id="insertCmcWage" parameterType="CmcWage">
  77. insert into cmc_wage
  78. <trim prefix="(" suffix=")" suffixOverrides=",">
  79. <if test="wageId != null">wage_id,</if>
  80. <if test="userId != null">user_id,</if>
  81. <if test="baseSalary != null">base_salary,</if>
  82. <if test="yearSalary != null">year_salary,</if>
  83. <if test="postSalary != null">post_salary,</if>
  84. <if test="performanceSalary != null">performance_salary,</if>
  85. <if test="certificatesSubsidy != null">certificates_subsidy,</if>
  86. <if test="festivalSubsidy != null">festival_subsidy,</if>
  87. <if test="postStableSubsidy != null">post_stable_subsidy,</if>
  88. <if test="highTemperatureSubsidy != null">high_temperature_subsidy,</if>
  89. <if test="attendanceDeduct != null">attendance_deduct,</if>
  90. <if test="payableWage != null">payable_wage,</if>
  91. <if test="houseFund != null">house_fund,</if>
  92. <if test="endowmentInsurance != null">endowment_insurance,</if>
  93. <if test="unemploymentInsurance != null">unemployment_insurance,</if>
  94. <if test="medicalInsurance != null">medical_insurance,</if>
  95. <if test="propertyFee != null">property_fee,</if>
  96. <if test="deductTotal != null">deduct_total,</if>
  97. <if test="socialSecurityUnit != null">social_security_unit,</if>
  98. <if test="individualIncomeTax != null">individual_income_tax,</if>
  99. <if test="paidWage != null">paid_wage,</if>
  100. <if test="payDay != null">pay_day,</if>
  101. <if test="payMonth != null">pay_month,</if>
  102. <if test="remark != null">remark,</if>
  103. <if test="performanceId != null">performance_id,</if>
  104. </trim>
  105. <trim prefix="values (" suffix=")" suffixOverrides=",">
  106. <if test="wageId != null">#{wageId},</if>
  107. <if test="userId != null">#{userId},</if>
  108. <if test="baseSalary != null">#{baseSalary},</if>
  109. <if test="yearSalary != null">#{yearSalary},</if>
  110. <if test="postSalary != null">#{postSalary},</if>
  111. <if test="performanceSalary != null">#{performanceSalary},</if>
  112. <if test="certificatesSubsidy != null">#{certificatesSubsidy},</if>
  113. <if test="festivalSubsidy != null">#{festivalSubsidy},</if>
  114. <if test="postStableSubsidy != null">#{postStableSubsidy},</if>
  115. <if test="highTemperatureSubsidy != null">#{highTemperatureSubsidy},</if>
  116. <if test="attendanceDeduct != null">#{attendanceDeduct},</if>
  117. <if test="payableWage != null">#{payableWage},</if>
  118. <if test="houseFund != null">#{houseFund},</if>
  119. <if test="endowmentInsurance != null">#{endowmentInsurance},</if>
  120. <if test="unemploymentInsurance != null">#{unemploymentInsurance},</if>
  121. <if test="medicalInsurance != null">#{medicalInsurance},</if>
  122. <if test="propertyFee != null">#{propertyFee},</if>
  123. <if test="deductTotal != null">#{deductTotal},</if>
  124. <if test="socialSecurityUnit != null">#{socialSecurityUnit},</if>
  125. <if test="individualIncomeTax != null">#{individualIncomeTax},</if>
  126. <if test="paidWage != null">#{paidWage},</if>
  127. <if test="payDay != null">#{payDay},</if>
  128. <if test="payMonth != null">#{payMonth},</if>
  129. <if test="remark != null">#{remark},</if>
  130. <if test="performanceId != null">#{performanceId},</if>
  131. </trim>
  132. </insert>
  133. <update id="updateCmcWage" parameterType="CmcWage">
  134. update cmc_wage
  135. <trim prefix="SET" suffixOverrides=",">
  136. <if test="userId != null">user_id = #{userId},</if>
  137. <if test="baseSalary != null">base_salary = #{baseSalary},</if>
  138. <if test="yearSalary != null">year_salary = #{yearSalary},</if>
  139. <if test="postSalary != null">post_salary = #{postSalary},</if>
  140. <if test="performanceSalary != null">performance_salary = #{performanceSalary},</if>
  141. <if test="certificatesSubsidy != null">certificates_subsidy = #{certificatesSubsidy},</if>
  142. <if test="festivalSubsidy != null">festival_subsidy = #{festivalSubsidy},</if>
  143. <if test="postStableSubsidy != null">post_stable_subsidy = #{postStableSubsidy},</if>
  144. <if test="highTemperatureSubsidy != null">high_temperature_subsidy = #{highTemperatureSubsidy},</if>
  145. <if test="attendanceDeduct != null">attendance_deduct = #{attendanceDeduct},</if>
  146. <if test="payableWage != null">payable_wage = #{payableWage},</if>
  147. <if test="houseFund != null">house_fund = #{houseFund},</if>
  148. <if test="endowmentInsurance != null">endowment_insurance = #{endowmentInsurance},</if>
  149. <if test="unemploymentInsurance != null">unemployment_insurance = #{unemploymentInsurance},</if>
  150. <if test="medicalInsurance != null">medical_insurance = #{medicalInsurance},</if>
  151. <if test="propertyFee != null">property_fee = #{propertyFee},</if>
  152. <if test="deductTotal != null">deduct_total = #{deductTotal},</if>
  153. <if test="socialSecurityUnit != null">social_security_unit = #{socialSecurityUnit},</if>
  154. <if test="individualIncomeTax != null">individual_income_tax = #{individualIncomeTax},</if>
  155. <if test="paidWage != null">paid_wage = #{paidWage},</if>
  156. <if test="payDay != null">pay_day = #{payDay},</if>
  157. <if test="payMonth != null">pay_month = #{payMonth},</if>
  158. <if test="remark != null">remark = #{remark},</if>
  159. <if test="performanceId != null">performance_id = #{performanceId},</if>
  160. </trim>
  161. where wage_id = #{wageId}
  162. </update>
  163. <delete id="deleteCmcWageByWageId" parameterType="Integer">
  164. delete from cmc_wage where wage_id = #{wageId}
  165. </delete>
  166. <delete id="deleteCmcWageByWageIds" parameterType="String">
  167. delete from cmc_wage where wage_id in
  168. <foreach item="wageId" collection="array" open="(" separator="," close=")">
  169. #{wageId}
  170. </foreach>
  171. </delete>
  172. <delete id="deleteCmcWageByPerformanceIds" parameterType="String">
  173. delete from cmc_wage where performance_id in
  174. <foreach item="performanceId" collection="array" open="(" separator="," close=")">
  175. #{performanceId}
  176. </foreach>
  177. </delete>
  178. </mapper>