Commit ff133fd2 by 张富康

feat(perfSalary): 改进绩效工资批量提交和工薪查询功能

- 在绩效工资批量提交请求中添加评分月份字段
- 将提交列表中的请求对象替换为DTO对象
- 移除单个绩效提交请求中上级领导手机号字段
- 在控制器中设置上级领导手机号为登录用户手机号
- 在Mapper中新增查询员工月工资方法
- 在Mapper XML中新增对应SQL查询语句
- 在服务层保存提交时新增金额计算方式字段赋值
- 新增StaffMonthSalaryDTO类封装员工薪资数据
1 parent aef7c282
package cn.com.glsx.dj.staff.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class StaffMonthSalaryDTO implements Serializable {
/**
*
*/
private static final long serialVersionUID = 4789440447598977456L;
/**
* 应出勤天数
*/
private BigDecimal shouldWorkDay;
/**
* 实际出勤天数
*/
private BigDecimal actualWorkDay;
/**
* 薪资标准 = 底薪 + 绩效工资
*/
private BigDecimal salaryStandard;
/**
* 底薪
*/
private BigDecimal minimumSalary;
/**
* 绩效等级
*/
private String performanceLevel;
/**
* 绩效工资
*/
private BigDecimal performanceSalary;
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper.perfSalary;
import cn.com.glsx.dj.staff.dto.StaffMonthSalaryDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.*;
import cn.com.glsx.dj.staff.model.perfSalary.PerformanceEvaluation;
import org.apache.ibatis.annotations.Mapper;
......@@ -29,4 +30,7 @@ public interface PerformanceEvaluationMapper extends OreMapper<PerformanceEvalua
BigDecimal getTotalExtraAmount(PerfRuleReqDTO perfRuleReqDTO);
int submitOne(PerformanceEvaluation updatePerfAppraisalDetailDTO);
StaffMonthSalaryDTO queryStaffMonthSalary(@Param("evaluationMonth") String evaluationMonth, @Param("mobilePhone") String mobilePhone);
}
\ No newline at end of file
......@@ -192,6 +192,7 @@ public class PerformanceEvaluationService {
// 基本工资
updatePerfAppraisal.setBasicSalary(NumberUtil.add(perfAppraisalDetailDTO.getBaseSalary(), performanceSalary));
updatePerfAppraisal.setSubmitCount(perfAppraisalDetailDTO.getSubmitCount() + 1);
updatePerfAppraisal.setAmountCalculationType(ObjectUtil.isNotEmpty(perfAppraisalSubmitReqDTO.getManualFinalPerformanceAmount()) ? 2 : 1);
updatePerfAppraisal.setUpdatedBy(perfAppraisalSubmitReqDTO.getOperator());
int updateCount = performanceEvaluationMapper.submitOne(updatePerfAppraisal);
if (updateCount < 1) {
......
......@@ -474,6 +474,7 @@
manual_reward_coefficient = #{manualRewardCoefficient},
manual_score_symbol_value = #{manualScoreSymbolValue},
performance_salary = #{performanceSalary},
amount_calculation_type = #{amountCalculationType},
basic_salary = #{basicSalary},
submit_count = #{submitCount},
update_by = #{updateBy},
......@@ -483,4 +484,26 @@
and <![CDATA[ submit_count < 2]]>
</update>
<select id="queryStaffMonthSalary" resultType="cn.com.glsx.dj.staff.dto.StaffMonthSalaryDTO">
SELECT expected_attendance_days AS shouldWorkDay,
COALESCE(sas.appeal_attendance_days, sas.actual_attendance_days) AS actuaLWorkDay,
spe.basic_salary AS salaryStandard,
spe.performance_salary AS performanceSalary,
CASE
WHEN adopt_type = 1 THEN auto_grade_code
WHEN adopt_type = 2 THEN manual_grade_code
END AS performanceLevel,
spe.base_salary AS baseSalary
FROM sal_performance_evaluation spe
LEFT JOIN sal_attendance_summary sas
ON spe.mobile_phone = sas.mobile_phone
AND spe.evaluation_month = sas.attendance_month
AND sas.deleted_flag = 'N'
WHERE spe.deleted_flag = 'N'
AND spe.evaluation_month = #{evaluationMonth}
AND spe.mobile_phone = #{mobilePhone}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!