Commit ad503033 by 林冲

Merge remote-tracking branch 'origin/v5.6.0' into v5.6.0

2 parents 1c7a608d 380f8929
package cn.com.glsx.dj.staff.dto.perfSalary;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
......@@ -8,7 +7,6 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 员工绩效
......@@ -37,14 +35,7 @@ public class AppraisalInfoDTO implements Serializable {
* 评分月份(yyyy-mm)
*/
@ApiModelProperty(notes = "评分月份(yyyy-mm)")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date evaluationMonth;
/**
* 门店id
*/
@ApiModelProperty(notes = "门店id")
private Integer merchantId;
private String evaluationMonth;
/**
* 门店名称
......@@ -92,8 +83,7 @@ public class AppraisalInfoDTO implements Serializable {
* 入职日期
*/
@ApiModelProperty(notes = "入职日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date entryDate;
private String entryDate;
/**
* 自动绩效配置id
......
......@@ -37,7 +37,7 @@ public class PerfRuleReqDTO implements Serializable {
* 门店id
*/
@ApiModelProperty(notes = "门店id")
private String merchantId;
private Integer merchantId;
/**
* 绩效等级
......
package cn.com.glsx.dj.staff.mapper.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.AppraisalInfoDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.PerfAppraisalStatisticsCardDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.PerfRuleReqDTO;
import cn.com.glsx.dj.staff.model.perfSalary.PerformanceEvaluation;
......@@ -17,4 +18,6 @@ public interface PerformanceEvaluationMapper extends OreMapper<PerformanceEvalua
void insertOrUpdateBatch(@Param("list") List<PerformanceEvaluation> performanceEvaluationList);
PerfAppraisalStatisticsCardDTO perfAppraisalStatisticsCard(PerfRuleReqDTO perfRuleReqDTO);
List<AppraisalInfoDTO> perfAppraisalList(PerfRuleReqDTO perfRuleReqDTO);
}
\ No newline at end of file
......@@ -84,7 +84,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/
@Override
public RpcResponse<List<AppraisalInfoDTO>> perfAppraisalList(PerfRuleReqDTO perfRuleReqDTO) {
return null;
try {
return RpcResponse.success(performanceEvaluationService.perfAppraisalList(perfRuleReqDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
/**
......
package cn.com.glsx.dj.staff.service.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.AppraisalInfoDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.PerfAppraisalStatisticsCardDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.PerfRuleReqDTO;
import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceEvaluationMapper;
......@@ -10,6 +11,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
@Slf4j
......@@ -32,4 +34,11 @@ public class PerformanceEvaluationService {
return performanceEvaluationMapper.perfAppraisalStatisticsCard(perfRuleReqDTO);
}
/**
* 绩效考核列表
*/
public List<AppraisalInfoDTO> perfAppraisalList(PerfRuleReqDTO perfRuleReqDTO) {
List<AppraisalInfoDTO> result = performanceEvaluationMapper.perfAppraisalList(perfRuleReqDTO);
return null;
}
}
\ No newline at end of file
......@@ -260,15 +260,13 @@
<select id="perfAppraisalStatisticsCard" resultType="cn.com.glsx.dj.staff.dto.perfSalary.PerfAppraisalStatisticsCardDTO">
SELECT
-- 绩效等级统计(7个固定等级)
SUM(CASE WHEN grade = 'S' THEN 1 ELSE 0 END) AS sCount,
SUM(CASE WHEN grade = 'A' THEN 1 ELSE 0 END) AS aCount,
SUM(CASE WHEN grade = 'B+' THEN 1 ELSE 0 END) AS bPlusCount,
SUM(CASE WHEN grade = 'B' THEN 1 ELSE 0 END) AS bCount,
SUM(CASE WHEN grade = 'B-' THEN 1 ELSE 0 END) AS bMinusCount,
SUM(CASE WHEN grade = 'C' THEN 1 ELSE 0 END) AS cCount,
SUM(CASE WHEN grade = 'D' THEN 1 ELSE 0 END) AS dCount,
-- 汇总数据(总人数/入职人数)
COALESCE(SUM(CASE WHEN grade = 'S' THEN 1 ELSE 0 END), 0) AS sCount,
COALESCE(SUM(CASE WHEN grade = 'A' THEN 1 ELSE 0 END), 0) AS aCount,
COALESCE(SUM(CASE WHEN grade = 'B+' THEN 1 ELSE 0 END), 0) AS bPlusCount,
COALESCE(SUM(CASE WHEN grade = 'B' THEN 1 ELSE 0 END), 0) AS bCount,
COALESCE(SUM(CASE WHEN grade = 'B-' THEN 1 ELSE 0 END), 0) AS bMinusCount,
COALESCE(SUM(CASE WHEN grade = 'C' THEN 1 ELSE 0 END), 0) AS cCount,
COALESCE(SUM(CASE WHEN grade = 'D' THEN 1 ELSE 0 END), 0) AS dCount,
(SELECT COUNT(*) FROM sal_performance_evaluation
WHERE evaluation_month = #{queryMonth}
AND deleted_flag = 'N'
......@@ -280,15 +278,23 @@
AND is_entry = 1) AS entryCount
FROM (
SELECT
-- 优先取manual_grade_code,为空则取auto_grade_code
COALESCE(manual_grade_code, auto_grade_code) AS grade
CASE
WHEN adopt_type = 1 AND auto_grade_code IS NOT NULL THEN auto_grade_code
WHEN adopt_type = 2 AND manual_grade_code IS NOT NULL THEN manual_grade_code
ELSE NULL
END AS grade
FROM sal_performance_evaluation
WHERE
evaluation_month = #{queryMonth}
AND deleted_flag = 'N'
WHERE deleted_flag = 'N'
AND evaluation_month = #{queryMonth}
AND superior_leader_mobile_phone = #{regionManagerMobilePhone}
AND (manual_grade_code IS NOT NULL OR auto_grade_code IS NOT NULL)
AND adopt_type IN (1, 2)
) t
</select>
<select id="perfAppraisalList" resultType="cn.com.glsx.dj.staff.dto.perfSalary.AppraisalInfoDTO">
</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!