Commit 2477c031 by 崔彦峰

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

2 parents 242d0978 47af1ba9
package cn.com.glsx.dj.staff.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class MerchantInfo implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("商户号")
private Integer merchantId;
@ApiModelProperty("商户名称")
private String merchantName;
}
\ No newline at end of file
package cn.com.glsx.dj.staff.dto;
import cn.com.glsx.dj.staff.model.StaffSalaryAppealApplyRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -28,4 +29,35 @@ public class StaffSalaryAppealApplyRecordDTO extends StaffSalaryAppealApplyRecor
* 查询条件:申诉结束时间
*/
private String applyEndTime;
/**
* 查询条件:所属门店ID列表
*/
private List<Integer> merchantIdList;
/**
* 查询条件:提交开始时间
*/
private String submitTimeStart;
/**
* 查询条件:提交结束时间
*/
private String submitTimeEnd;
/**
* 查询条件:绩效月份开始
*/
private String appealMonthStart;
/**
* 查询条件:绩效月份结束
*/
private String appealMonthEnd;
@ApiModelProperty("适配业务")
private List<Integer> sceneTypeList;
@ApiModelProperty("所属门店")
private List<MerchantInfo> merchantInfoList;
}
\ No newline at end of file
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,7 @@ import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
/**
* 自动规则检测结果
......@@ -29,6 +28,36 @@ public class AutoPerformRuleResultDTO implements Serializable {
private Integer autoGradeType;
/**
* 该月产值
*/
@ApiModelProperty(notes = "该月产值")
private BigDecimal outputValue;
/**
* 实际出勤天数
*/
@ApiModelProperty(notes = "实际出勤天数")
private Integer actualAttendanceDays;
/**
* 绩效等级-系统自动设置
*/
@ApiModelProperty(notes = "绩效等级-系统自动设置")
private String autoGradeCode;
/**
* 奖励系数-系统自动设置
*/
@ApiModelProperty(notes = "奖励系数-系统自动设置")
private BigDecimal autoRewardCoefficient;
/**
* 分数范围-系统自动设置
*/
@ApiModelProperty(notes = "分数范围-系统自动设置")
private String autoScoreSymbolValue;
/**
* 当月入职新员工-出勤天数条件(1-30)≥次天数
*/
@ApiModelProperty(notes = "当月入职新员工-出勤天数条件(1-30)≥次天数")
......@@ -123,8 +152,7 @@ public class AutoPerformRuleResultDTO implements Serializable {
* 生效月份(yyyy-mm格式)
*/
@ApiModelProperty(notes = "生效月份(yyyy-mm格式)")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date effectiveMonth;
private String effectiveMonth;
/**
* 绩效等级配置uuid
......
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;
/**
* 员工绩效详情
......@@ -34,12 +32,6 @@ public class PerfAppraisalDetailDTO implements Serializable {
private String name;
/**
* 门店id
*/
@ApiModelProperty(notes = "门店id")
private Integer merchantId;
/**
* 门店名称
*/
@ApiModelProperty(notes = "门店名称")
......@@ -49,8 +41,7 @@ public class PerfAppraisalDetailDTO implements Serializable {
* 评分月份(yyyy-mm)
*/
@ApiModelProperty(notes = "评分月份(yyyy-mm)")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date evaluationMonth;
private String evaluationMonth;
/**
* 绩效等级-系统自动设置
......@@ -70,11 +61,6 @@ public class PerfAppraisalDetailDTO implements Serializable {
@ApiModelProperty(notes = "分数范围-系统自动设置")
private String autoScoreSymbolValue;
/**
* 星数-系统自动设置
*/
@ApiModelProperty(notes = "星数-系统自动设置")
private Integer autoStarCount;
/**
* 绩效等级-手动设置
......@@ -94,11 +80,6 @@ public class PerfAppraisalDetailDTO implements Serializable {
@ApiModelProperty(notes = "分数范围-手动设置")
private String manualScoreSymbolValue;
/**
* 星数-手动设置
*/
@ApiModelProperty(notes = "星数-手动设置")
private Integer manualStarCount;
/**
* 手动维护最终绩效金额(0-10000)
......@@ -113,31 +94,56 @@ public class PerfAppraisalDetailDTO implements Serializable {
private Integer isAutoPerformance;
/**
* 绩效工资
* 转正前工资
*/
@ApiModelProperty(notes = "绩效工资")
private BigDecimal performanceSalary;
@ApiModelProperty(notes = "转正前工资")
private BigDecimal beforeCorrectionBasicSalary;
/**
* 转正前底薪
* 转正后工资
*/
@ApiModelProperty(notes = "转正前底薪")
private BigDecimal beforeCorrectionBasicSalary;
@ApiModelProperty(notes = "转正后工资")
private BigDecimal afterCorrectionBasicSalary;
/**
* 转正后底薪
* 底薪占工资占比 默认0.7
*/
@ApiModelProperty(notes = "转正后底薪")
private BigDecimal afterCorrectionBasicSalary;
@ApiModelProperty(notes = "底薪占工资占比 默认0.7")
private BigDecimal basicSalaryRatio;
/**
* 考勤计算后-试用期阶段工资
*/
@ApiModelProperty(notes = "考勤计算后-试用期阶段工资")
private BigDecimal afterAttendanceProbationBasicSalary;
/**
* 考勤计算后-转正后阶段工资
*/
@ApiModelProperty(notes = "考勤计算后-转正后阶段工资")
private BigDecimal afterAttendanceRegularBasicSalary;
/**
* 考勤计算后底薪 todz 考勤申诉成功后需要更新该字段
* 考勤计算后-考勤工资(未乘0.7系数的底薪)
*/
@ApiModelProperty(notes = "考勤计算后底薪")
private BigDecimal afterAttendanceBasicSalary;
@ApiModelProperty(notes = "考勤计算后-考勤工资(未乘0.7系数的底薪)")
private BigDecimal afterAttendanceTotalBasicSalary;
/**
* 基本工资(底薪+绩效工资)
* 底薪 = 考勤计算后-考勤工资 x basic_salary_ratio
*/
@ApiModelProperty(notes = "底薪")
private BigDecimal baseSalary;
/**
* 绩效工资 = 考勤计算后-合计工资 x (1 - basic_salary_ratio) x 评分系数
*/
@ApiModelProperty(notes = "绩效工资")
private BigDecimal performanceSalary;
/**
* 基本工资 = (底薪 + 绩效工资)
*/
@ApiModelProperty(notes = "基本工资(底薪+绩效工资)")
private BigDecimal basicSalary;
......@@ -149,18 +155,22 @@ public class PerfAppraisalDetailDTO implements Serializable {
private BigDecimal totalGrossSalary;
/**
* 该月产值
*/
@ApiModelProperty(notes = "该月产值")
private BigDecimal outputValue;
/**
* 入职日期
*/
@ApiModelProperty(notes = "入职日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date entryDate;
@ApiModelProperty(notes = "入职日期 yyyy-MM-dd")
private String entryDate;
/**
* 转正日期
*/
@ApiModelProperty(notes = "转正日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date correctionDate;
@ApiModelProperty(notes = "转正日期 yyyy-MM-dd")
private String correctionDate;
/**
* 是否该月入职:1-是,0-否
......@@ -169,9 +179,9 @@ public class PerfAppraisalDetailDTO implements Serializable {
private Integer isEntry;
/**
* 是否试用期:1-是,0-否
* 该月是否试用期:1-是,0-否
*/
@ApiModelProperty(notes = "是否试用期:1-是,0-否")
@ApiModelProperty(notes = "该月是否试用期:1-是,0-否")
private Integer isProbation;
/**
......@@ -180,12 +190,6 @@ public class PerfAppraisalDetailDTO implements Serializable {
@ApiModelProperty(notes = "是否当月转正 1-是,0-否")
private Integer isCorrection;
/**
* 该月是否离职 1-是,0-否
*/
@ApiModelProperty(notes = "该月是否离职 1-是,0-否")
private Integer isLeaving;
/**
* 自动绩效配置id
......
......@@ -34,12 +34,6 @@ public class PerfRuleReqDTO implements Serializable {
private String regionManagerId;
/**
* 门店id
*/
@ApiModelProperty(notes = "门店id")
private Integer merchantId;
/**
* 绩效等级
*/
@ApiModelProperty(notes = "绩效等级")
......@@ -57,4 +51,16 @@ public class PerfRuleReqDTO implements Serializable {
@ApiModelProperty(notes = "处理状态")
private Integer handleStatus;
/**
* 门店名称&员工名称聚合搜索
*/
@ApiModelProperty(notes = "门店名称&员工名称聚合搜索")
private String merchantAndStaffSearch;
/**
* 员工名称搜索
*/
@ApiModelProperty(notes = "员工名称搜索")
private String name;
}
......@@ -34,4 +34,14 @@ public interface StaffSalaryAppealApplyRecordRemote {
* 查询复议记录列表
*/
RpcResponse<List<StaffSalaryAppealApplyRecordDTO>> replyRecordList(StaffSalaryAppealApplyRecordDTO dto);
/**
* web后台分页查询申诉记录
*/
RpcResponse<RpcPagination<StaffSalaryAppealApplyRecordDTO>> webPageList(RpcPagination<StaffSalaryAppealApplyRecordDTO> pagination);
/**
* web后台答复申诉
*/
RpcResponse<Boolean> webReply(StaffSalaryAppealApplyRecordDTO dto);
}
......@@ -14,4 +14,14 @@ public interface StaffSalaryAppealApplyRecordMapper extends OreMapper<StaffSalar
* 分页查询申诉记录
*/
List<StaffSalaryAppealApplyRecordDTO> pageList(StaffSalaryAppealApplyRecordDTO condition);
/**
* 查询复议记录列表(每种类型返回最新的一条)
*/
List<StaffSalaryAppealApplyRecordDTO> replyRecordList(StaffSalaryAppealApplyRecordDTO condition);
/**
* web后台分页查询申诉记录
*/
List<StaffSalaryAppealApplyRecordDTO> webPageList(StaffSalaryAppealApplyRecordDTO condition);
}
\ No newline at end of file
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.dto.perfSalary.*;
import cn.com.glsx.dj.staff.model.perfSalary.PerformanceEvaluation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -20,4 +18,8 @@ public interface PerformanceEvaluationMapper extends OreMapper<PerformanceEvalua
PerfAppraisalStatisticsCardDTO perfAppraisalStatisticsCard(PerfRuleReqDTO perfRuleReqDTO);
List<AppraisalInfoDTO> perfAppraisalList(PerfRuleReqDTO perfRuleReqDTO);
AutoPerformRuleResultDTO perfAppraisalAutoDetectResult(PerfRuleReqDTO perfRuleReqDTO);
PerfAppraisalDetailDTO perfAppraisalDetail(PerfRuleReqDTO perfRuleReqDTO);
}
\ No newline at end of file
......@@ -97,7 +97,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/
@Override
public RpcResponse<AutoPerformRuleResultDTO> perfAppraisalAutoDetectResult(PerfRuleReqDTO perfRuleReqDTO) {
return null;
try {
return RpcResponse.success(performanceEvaluationService.perfAppraisalAutoDetectResult(perfRuleReqDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
/**
......@@ -105,11 +110,20 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/
@Override
public RpcResponse<PerfAppraisalDetailDTO> perfAppraisalDetail(PerfRuleReqDTO perfRuleReqDTO) {
return null;
try {
return RpcResponse.success(performanceEvaluationService.perfAppraisalDetail(perfRuleReqDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
/**
* 绩效考核-提交-单个处理
* todz 员工列表
*/
/**
* 绩效考核-提交-单个处理 todz 校验
*/
@Override
public RpcResponse<Boolean> perfAppraisalSingleSubmit(PerfAppraisalSubmitReqDTO perfAppraisalSubmitReqDTO) {
......
......@@ -75,4 +75,27 @@ public class StaffSalaryAppealApplyRecordRemoteImpl implements StaffSalaryAppeal
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<RpcPagination<StaffSalaryAppealApplyRecordDTO>> webPageList(RpcPagination<StaffSalaryAppealApplyRecordDTO> pagination) {
try{
pagination = RpcPagination.copyPage(staffSalaryAppealApplyRecordService.webPageList(pagination));
return RpcResponse.success(pagination);
}catch(Exception e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> webReply(StaffSalaryAppealApplyRecordDTO dto) {
try {
log.info("webReply start, dto:{}", dto);
Boolean result = staffSalaryAppealApplyRecordService.webReply(dto);
return RpcResponse.success(result);
} catch (Exception e) {
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
}
......@@ -130,33 +130,20 @@ public class StaffSalaryAppealApplyRecordService {
}
/**
* 查询复议记录列表(根据人、申诉月份拿到最新的回复记录,按照回复时间倒序,最多两条)
* 查询复议记录列表(根据人、申诉月份,分别返回不同appeal_type的最新回复记录,每种类型各一条)
*/
public List<StaffSalaryAppealApplyRecordDTO> replyRecordList(StaffSalaryAppealApplyRecordDTO condition) {
log.info("replyRecordList start, condition:{}", condition);
Example example = new Example(StaffSalaryAppealApplyRecord.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("deletedFlag", "N");
criteria.andEqualTo("staffPhone", condition.getStaffPhone());
criteria.andEqualTo("appealMonth", condition.getAppealMonth());
criteria.andIsNotNull("replyDate"); // 只查询已回复的记录
// 按照回复时间倒序
example.orderBy("replyDate").desc();
List<StaffSalaryAppealApplyRecord> list = staffSalaryAppealApplyRecordMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) {
return new ArrayList<>();
try {
List<StaffSalaryAppealApplyRecordDTO> list = staffSalaryAppealApplyRecordMapper.replyRecordList(condition);
if (CollectionUtils.isEmpty(list)) {
return new ArrayList<>();
}
return list;
} catch (Exception e) {
log.error("replyRecordList error", e);
throw new RpcServiceException("查询复议记录失败:" + e.getMessage());
}
// 最多只返回两条
List<StaffSalaryAppealApplyRecord> resultList = list.size() > 2 ? list.subList(0, 2) : list;
return resultList.stream().map(record -> {
StaffSalaryAppealApplyRecordDTO dto = new StaffSalaryAppealApplyRecordDTO();
BeanUtils.copyProperties(record, dto);
return dto;
}).collect(Collectors.toList());
}
/**
......@@ -179,4 +166,44 @@ public class StaffSalaryAppealApplyRecordService {
return dto;
}).collect(Collectors.toList());
}
/**
* web后台分页查询
*/
public Page<StaffSalaryAppealApplyRecordDTO> webPageList(RpcPagination<StaffSalaryAppealApplyRecordDTO> pagination) {
log.info("webPageList start, pagination:{}", pagination);
try {
Page<StaffSalaryAppealApplyRecordDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(), pagination.isNeedCount());
staffSalaryAppealApplyRecordMapper.webPageList(pagination.getCondition());
return page;
} catch (Exception e) {
log.error("webPageList error", e);
throw new RpcServiceException("web后台分页查询失败:" + e.getMessage());
}
}
/**
* web后台答复申诉
*/
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class)
public Boolean webReply(StaffSalaryAppealApplyRecordDTO dto) {
log.info("webReply start, dto:{}", dto);
try {
StaffSalaryAppealApplyRecord record = new StaffSalaryAppealApplyRecord();
record.setId(dto.getId());
record.setConfirmActualAttendanceDays(dto.getConfirmActualAttendanceDays());
record.setConfirmPadRecordNum(dto.getConfirmPadRecordNum());
record.setReplyContent(dto.getReplyContent());
record.setDealStatus(2); // 2:已处理
record.setReplyDate(new Date());
record.setUpdatedBy(dto.getUpdatedBy());
record.setUpdatedDate(new Date());
int result = staffSalaryAppealApplyRecordMapper.updateByPrimaryKeySelective(record);
return result > 0;
} catch (Exception e) {
log.error("webReply error", e);
throw new RpcServiceException("web后台答复失败:" + e.getMessage());
}
}
}
\ No newline at end of file
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.dto.perfSalary.*;
import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceEvaluationMapper;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
......@@ -38,7 +36,20 @@ public class PerformanceEvaluationService {
* 绩效考核列表
*/
public List<AppraisalInfoDTO> perfAppraisalList(PerfRuleReqDTO perfRuleReqDTO) {
List<AppraisalInfoDTO> result = performanceEvaluationMapper.perfAppraisalList(perfRuleReqDTO);
return null;
return performanceEvaluationMapper.perfAppraisalList(perfRuleReqDTO);
}
/**
* 自动检测规则结果
*/
public AutoPerformRuleResultDTO perfAppraisalAutoDetectResult(PerfRuleReqDTO perfRuleReqDTO) {
return performanceEvaluationMapper.perfAppraisalAutoDetectResult(perfRuleReqDTO);
}
/**
* 绩效考核详情
*/
public PerfAppraisalDetailDTO perfAppraisalDetail(PerfRuleReqDTO perfRuleReqDTO) {
return performanceEvaluationMapper.perfAppraisalDetail(perfRuleReqDTO);
}
}
\ No newline at end of file
......@@ -293,8 +293,121 @@
<select id="perfAppraisalList" resultType="cn.com.glsx.dj.staff.dto.perfSalary.AppraisalInfoDTO">
select
id as id,
mobile_phone as mobilePhone,
name as name,
merchant_name as merchantName,
evaluation_month as evaluationMonth,
auto_grade_code as autoGradeCode,
auto_reward_coefficient as autoRewardCoefficient,
auto_score_symbol_value as autoScoreSymbolValue,
manual_grade_code as manualGradeCode,
manual_reward_coefficient as manualRewardCoefficient,
manual_score_symbol_value as manualScoreSymbolValue,
entry_date as entryDate,
auto_performance_config_id as autoPerformanceConfigId,
performance_grade_uuid as performanceGradeUuid,
auto_grade_type as autoGradeType,
submit_count as submitCount,
handle_status as handleStatus,
adopt_type as adoptType,
superior_leader_mobile_phone as superiorLeaderMobilePhone
from
sal_performance_evaluation
where deleted_flag = 'N'
and superior_leader_mobile_phone = #{regionManagerMobilePhone}
and evaluation_month = #{queryMonth}
<if test="handleStatus != null and handleStatus != ''">
and handle_status = #{handleStatus}
</if>
<if test="performanceLevel != null and performanceLevel != ''">
and (adopt_type = 1 and auto_grade_code = #{performanceLevel} or adopt_type = 2 and manual_grade_code = #{performanceLevel})
</if>
<if test="merchantAndStaffSearch != null and merchantAndStaffSearch != ''">
and (name like concat('%',#{merchantAndStaffSearch},'%') or merchant_name like concat('%',#{merchantAndStaffSearch},'%'))
</if>
order by entry_date desc, id desc
</select>
<select id="perfAppraisalAutoDetectResult" resultType="cn.com.glsx.dj.staff.dto.perfSalary.AutoPerformRuleResultDTO">
select spe.auto_grade_type as autoGradeType,
spe.output_value as outputValue,
COALESCE(sas.actual_attendance_days, sas.appeal_attendance_days) AS actualAttendanceDays,
spe.auto_grade_code as autoGradeCode,
spe.auto_reward_coefficient as autoRewardCoefficient,
spe.auto_score_symbol_value as autoScoreSymbolValue,
sapr.month_onboard_attendance_days AS monthOnboardAttendanceDays,
sapr.month_onboard_output_threshold AS monthOnboardOutputThreshold,
sapr.month_onboard_trigger_level_code AS monthOnboardTriggerLevelCode,
sapr.month_onboard_trigger_score AS monthOnboardTriggerScore,
sapr.month_onboard_trigger_reward_coefficient AS monthOnboardTriggerRewardCoefficient,
sapr.month_onboard_default_level_code AS monthOnboardDefaultLevelCode,
sapr.month_onboard_default_score AS monthOnboardDefaultScore,
sapr.month_onboard_default_reward_coefficient AS monthOnboardDefaultRewardCoefficient,
sapr.no_month_onboard_output_threshold AS noMonthOnboardOutputThreshold,
sapr.no_month_onboard_trigger_level_code AS noMonthOnboardTriggerLevelCode,
sapr.no_month_onboard_trigger_score AS noMonthOnboardTriggerScore,
sapr.no_month_onboard_trigger_reward_coefficient AS noMonthOnboardTriggerRewardCoefficient,
sapr.no_month_onboard_default_level_code AS noMonthOnboardDefaultLevelCode,
sapr.no_month_onboard_default_score AS noMonthOnboardDefaultScore,
sapr.no_month_onboard_default_reward_coefficient AS noMonthOnboardDefaultRewardCoefficient,
sapr.effective_month AS effectiveMonth,
sapr.performance_level_uuid AS performanceLevelUuid
from sal_performance_evaluation spe
left join sal_auto_perform_rule sapr on sapr.id = spe.auto_performance_config_id
left join sal_attendance_summary sas
on sas.mobile_phone = spe.mobile_phone and sas.attendance_month = spe.evaluation_month
where spe.deleted_flag = 'N'
and spe.superior_leader_mobile_phone = #{regionManagerMobilePhone}
and spe.evaluation_month = #{queryMonth}
and spe.mobile_phone = #{mobilePhone}
</select>
<select id="perfAppraisalDetail" resultType="cn.com.glsx.dj.staff.dto.perfSalary.PerfAppraisalDetailDTO">
select id as id,
mobile_phone as mobilePhone,
name as name,
merchant_name as merchantName,
evaluation_month as evaluationMonth,
auto_grade_code as autoGradeCode,
auto_reward_coefficient as autoRewardCoefficient,
auto_score_symbol_value as autoScoreSymbolValue,
manual_grade_code as manualGradeCode,
manual_reward_coefficient as manualRewardCoefficient,
manual_score_symbol_value as manualScoreSymbolValue,
manual_final_performance_amount as manualFinalPerformanceAmount,
is_auto_performance as isAutoPerformance,
before_correction_basic_salary as beforeCorrectionBasicSalary,
after_correction_basic_salary as afterCorrectionBasicSalary,
basic_salary_ratio as basicSalaryRatio,
after_attendance_probation_basic_salary as afterAttendanceProbationBasicSalary,
after_attendance_regular_basic_salary as afterAttendanceRegularBasicSalary,
after_attendance_total_basic_salary as afterAttendanceTotalBasicSalary,
base_salary as baseSalary,
performance_salary as performanceSalary,
basic_salary as basicSalary,
total_gross_salary as totalGrossSalary,
output_value as outputValue,
entry_date as entryDate,
correction_date as correctionDate,
is_entry as isEntry,
is_probation as isProbation,
is_correction as isCorrection,
auto_performance_config_id as autoPerformanceConfigId,
performance_grade_uuid as performanceGradeUuid,
auto_grade_type as autoGradeType,
submit_count as submitCount,
handle_status as handleStatus,
adopt_type as adoptType,
amount_calculation_type as amountCalculationType,
superior_leader_mobile_phone as superiorLeaderMobilePhone
from sal_performance_evaluation
where deleted_flag = 'N'
and superior_leader_mobile_phone = #{regionManagerMobilePhone}
and evaluation_month = #{queryMonth}
</select>
</mapper>
\ No newline at end of file
......@@ -61,4 +61,62 @@
ORDER BY created_date DESC
</select>
<select id="replyRecordList" resultMap="DTOResultMap">
SELECT a.*
FROM dj_car_life_staff_salary_appeal_apply_record a
JOIN (
SELECT appeal_type, MAX(reply_date) AS max_reply_date
FROM dj_car_life_staff_salary_appeal_apply_record
WHERE deleted_flag = 'N'
AND staff_phone = #{staffPhone}
AND appeal_month = #{appealMonth}
AND reply_date IS NOT NULL
GROUP BY appeal_type
) b
ON a.appeal_type = b.appeal_type
AND a.reply_date = b.max_reply_date
WHERE a.deleted_flag = 'N'
AND a.staff_phone = #{staffPhone}
AND a.appeal_month = #{appealMonth}
ORDER BY a.appeal_type ASC
</select>
<select id="webPageList" resultMap="DTOResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM dj_car_life_staff_salary_appeal_apply_record
WHERE deleted_flag = 'N'
<if test="appealType != null">
AND appeal_type = #{appealType}
</if>
<if test="sceneType != null">
AND scene_type = #{sceneType}
</if>
<if test="merchantIdList != null and merchantIdList.size() > 0">
AND merchant_id IN
<foreach collection="merchantIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="staffName != null and staffName != ''">
AND staff_name LIKE CONCAT('%', #{staffName}, '%')
</if>
<if test="dealStatus != null">
AND deal_status = #{dealStatus}
</if>
<if test="submitTimeStart != null and submitTimeStart != ''">
AND created_date &gt;= #{submitTimeStart}
</if>
<if test="submitTimeEnd != null and submitTimeEnd != ''">
AND created_date &lt;= #{submitTimeEnd}
</if>
<if test="appealMonthStart != null and appealMonthStart != ''">
AND appeal_month &gt;= #{appealMonthStart}
</if>
<if test="appealMonthEnd != null and appealMonthEnd != ''">
AND appeal_month &lt;= #{appealMonthEnd}
</if>
ORDER BY created_date DESC
</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!