Commit 0df4c557 by 章家宝

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

# Conflicts:
#	rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/CommissionBaseEnum.java
#	rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/CommissionMethodEnum.java
2 parents 63e26608 fab99cb6
Showing 41 changed files with 1679 additions and 119 deletions
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 \ No newline at end of file
package cn.com.glsx.dj.staff.dto; package cn.com.glsx.dj.staff.dto;
import cn.com.glsx.dj.staff.model.StaffSalaryAppealApplyRecord; import cn.com.glsx.dj.staff.model.StaffSalaryAppealApplyRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.List;
/** /**
* 员工工资申诉记录表 * 员工工资申诉记录表
...@@ -13,4 +15,49 @@ import lombok.EqualsAndHashCode; ...@@ -13,4 +15,49 @@ import lombok.EqualsAndHashCode;
public class StaffSalaryAppealApplyRecordDTO extends StaffSalaryAppealApplyRecord { public class StaffSalaryAppealApplyRecordDTO extends StaffSalaryAppealApplyRecord {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 附件列表
*/
private List<SalaryAppealApplyAttachmentDTO> attachmentList;
/**
* 查询条件:申诉开始时间
*/
private String applyStartTime;
/**
* 查询条件:申诉结束时间
*/
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 \ No newline at end of file
package cn.com.glsx.dj.staff.dto.perfSalary; package cn.com.glsx.dj.staff.dto.perfSalary;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -8,7 +7,6 @@ import lombok.NoArgsConstructor; ...@@ -8,7 +7,6 @@ import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
* 员工绩效 * 员工绩效
...@@ -37,14 +35,7 @@ public class AppraisalInfoDTO implements Serializable { ...@@ -37,14 +35,7 @@ public class AppraisalInfoDTO implements Serializable {
* 评分月份(yyyy-mm) * 评分月份(yyyy-mm)
*/ */
@ApiModelProperty(notes = "评分月份(yyyy-mm)") @ApiModelProperty(notes = "评分月份(yyyy-mm)")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private String evaluationMonth;
private Date evaluationMonth;
/**
* 门店id
*/
@ApiModelProperty(notes = "门店id")
private Integer merchantId;
/** /**
* 门店名称 * 门店名称
...@@ -53,6 +44,12 @@ public class AppraisalInfoDTO implements Serializable { ...@@ -53,6 +44,12 @@ public class AppraisalInfoDTO implements Serializable {
private String merchantName; private String merchantName;
/** /**
* 绩效等级-系统自动设置
*/
@ApiModelProperty(notes = "绩效等级-系统自动设置")
private String autoGradeCode;
/**
* 奖励系数-系统自动设置 * 奖励系数-系统自动设置
*/ */
@ApiModelProperty(notes = "奖励系数-系统自动设置") @ApiModelProperty(notes = "奖励系数-系统自动设置")
...@@ -86,8 +83,7 @@ public class AppraisalInfoDTO implements Serializable { ...@@ -86,8 +83,7 @@ public class AppraisalInfoDTO implements Serializable {
* 入职日期 * 入职日期
*/ */
@ApiModelProperty(notes = "入职日期") @ApiModelProperty(notes = "入职日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private String entryDate;
private Date entryDate;
/** /**
* 自动绩效配置id * 自动绩效配置id
......
package cn.com.glsx.dj.staff.dto.perfSalary; package cn.com.glsx.dj.staff.dto.perfSalary;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -8,7 +7,7 @@ import lombok.NoArgsConstructor; ...@@ -8,7 +7,7 @@ import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.math.BigDecimal;
/** /**
* 自动规则检测结果 * 自动规则检测结果
...@@ -29,6 +28,36 @@ public class AutoPerformRuleResultDTO implements Serializable { ...@@ -29,6 +28,36 @@ public class AutoPerformRuleResultDTO implements Serializable {
private Integer autoGradeType; 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)≥次天数 * 当月入职新员工-出勤天数条件(1-30)≥次天数
*/ */
@ApiModelProperty(notes = "当月入职新员工-出勤天数条件(1-30)≥次天数") @ApiModelProperty(notes = "当月入职新员工-出勤天数条件(1-30)≥次天数")
...@@ -123,8 +152,7 @@ public class AutoPerformRuleResultDTO implements Serializable { ...@@ -123,8 +152,7 @@ public class AutoPerformRuleResultDTO implements Serializable {
* 生效月份(yyyy-mm格式) * 生效月份(yyyy-mm格式)
*/ */
@ApiModelProperty(notes = "生效月份(yyyy-mm格式)") @ApiModelProperty(notes = "生效月份(yyyy-mm格式)")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private String effectiveMonth;
private Date effectiveMonth;
/** /**
* 绩效等级配置uuid * 绩效等级配置uuid
......
package cn.com.glsx.dj.staff.dto.perfSalary; package cn.com.glsx.dj.staff.dto.perfSalary;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* 自动评绩效规则配置表 * 自动评绩效规则配置表
...@@ -113,9 +111,8 @@ public class AutoPerformRuleUpdateDTO implements Serializable { ...@@ -113,9 +111,8 @@ public class AutoPerformRuleUpdateDTO implements Serializable {
/** /**
* 生效月份(yyyy-mm格式) * 生效月份(yyyy-mm格式)
*/ */
@ApiModelProperty(notes = "生效月份-传参格式:yyyy-MM-dd") @ApiModelProperty(notes = "生效月份-传参格式:yyyy-MM")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String effectiveMonth;
private Date effectiveMonth;
/** /**
* 生效状态:1-生效中,2-待生效 * 生效状态:1-生效中,2-待生效
......
package cn.com.glsx.dj.staff.dto.perfSalary;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class EffectiveReferralCountDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "品牌类型:0-问界 1-智界 2-享界 3-尊界 4-尚界 5-其它品牌")
private Integer brandType;
@ApiModelProperty(value = "品牌名称,例如:问界、智界...")
private String brandName;
@ApiModelProperty(value = "交车数")
private Integer deliveryCount;
@ApiModelProperty(value = "有效引荐数")
private Integer effectiveReferralCount;
}
package cn.com.glsx.dj.staff.dto.perfSalary;
import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.util.List;
/**
* 有效引荐数表
*/
@Data
public class EffectiveReferralReviewCommonDTO extends EffectiveReferralReview {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "门店名称")
private String merchantName;
@ApiModelProperty(value = "提交状态:0-未提交 1-已提交")
private Integer submitStatus;
@ApiModelProperty(value = "单延保提交状态:0-未提交,1-草稿,2-已提交")
private Integer singleExtendedWarrantySubmitStatus;
@ApiModelProperty(value = "广联权益提交状态:0-未提交,1-草稿,2-已提交")
private Integer interestSubmitStatus;
@ApiModelProperty(value = "轻改状态:0-未提交,1-草稿,2-已提交")
private Integer lightModificationSubmitStatus;
@ApiModelProperty(value = "商户号集合,无须前端传")
private List<Integer> merchantIds;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.dto.perfSalary; package cn.com.glsx.dj.staff.dto.perfSalary;
import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview; import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview;
import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
import lombok.experimental.SuperBuilder; import lombok.experimental.SuperBuilder;
...@@ -16,5 +17,4 @@ import lombok.experimental.SuperBuilder; ...@@ -16,5 +17,4 @@ import lombok.experimental.SuperBuilder;
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper=false)
public class EffectiveReferralReviewDTO extends EffectiveReferralReview { public class EffectiveReferralReviewDTO extends EffectiveReferralReview {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.dto.perfSalary; package cn.com.glsx.dj.staff.dto.perfSalary;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -8,7 +7,6 @@ import lombok.NoArgsConstructor; ...@@ -8,7 +7,6 @@ import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
* 员工绩效详情 * 员工绩效详情
...@@ -34,12 +32,6 @@ public class PerfAppraisalDetailDTO implements Serializable { ...@@ -34,12 +32,6 @@ public class PerfAppraisalDetailDTO implements Serializable {
private String name; private String name;
/** /**
* 门店id
*/
@ApiModelProperty(notes = "门店id")
private Integer merchantId;
/**
* 门店名称 * 门店名称
*/ */
@ApiModelProperty(notes = "门店名称") @ApiModelProperty(notes = "门店名称")
...@@ -49,8 +41,7 @@ public class PerfAppraisalDetailDTO implements Serializable { ...@@ -49,8 +41,7 @@ public class PerfAppraisalDetailDTO implements Serializable {
* 评分月份(yyyy-mm) * 评分月份(yyyy-mm)
*/ */
@ApiModelProperty(notes = "评分月份(yyyy-mm)") @ApiModelProperty(notes = "评分月份(yyyy-mm)")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private String evaluationMonth;
private Date evaluationMonth;
/** /**
* 绩效等级-系统自动设置 * 绩效等级-系统自动设置
...@@ -70,11 +61,6 @@ public class PerfAppraisalDetailDTO implements Serializable { ...@@ -70,11 +61,6 @@ public class PerfAppraisalDetailDTO implements Serializable {
@ApiModelProperty(notes = "分数范围-系统自动设置") @ApiModelProperty(notes = "分数范围-系统自动设置")
private String autoScoreSymbolValue; private String autoScoreSymbolValue;
/**
* 星数-系统自动设置
*/
@ApiModelProperty(notes = "星数-系统自动设置")
private Integer autoStarCount;
/** /**
* 绩效等级-手动设置 * 绩效等级-手动设置
...@@ -94,11 +80,6 @@ public class PerfAppraisalDetailDTO implements Serializable { ...@@ -94,11 +80,6 @@ public class PerfAppraisalDetailDTO implements Serializable {
@ApiModelProperty(notes = "分数范围-手动设置") @ApiModelProperty(notes = "分数范围-手动设置")
private String manualScoreSymbolValue; private String manualScoreSymbolValue;
/**
* 星数-手动设置
*/
@ApiModelProperty(notes = "星数-手动设置")
private Integer manualStarCount;
/** /**
* 手动维护最终绩效金额(0-10000) * 手动维护最终绩效金额(0-10000)
...@@ -113,31 +94,56 @@ public class PerfAppraisalDetailDTO implements Serializable { ...@@ -113,31 +94,56 @@ public class PerfAppraisalDetailDTO implements Serializable {
private Integer isAutoPerformance; private Integer isAutoPerformance;
/** /**
* 绩效工资 * 转正前工资
*/ */
@ApiModelProperty(notes = "绩效工资") @ApiModelProperty(notes = "转正前工资")
private BigDecimal performanceSalary; private BigDecimal beforeCorrectionBasicSalary;
/** /**
* 转正前底薪 * 转正后工资
*/ */
@ApiModelProperty(notes = "转正前底薪") @ApiModelProperty(notes = "转正后工资")
private BigDecimal beforeCorrectionBasicSalary; private BigDecimal afterCorrectionBasicSalary;
/** /**
* 转正后底薪 * 底薪占工资占比 默认0.7
*/ */
@ApiModelProperty(notes = "转正后底薪") @ApiModelProperty(notes = "底薪占工资占比 默认0.7")
private BigDecimal afterCorrectionBasicSalary; private BigDecimal basicSalaryRatio;
/**
* 考勤计算后-试用期阶段工资
*/
@ApiModelProperty(notes = "考勤计算后-试用期阶段工资")
private BigDecimal afterAttendanceProbationBasicSalary;
/**
* 考勤计算后-转正后阶段工资
*/
@ApiModelProperty(notes = "考勤计算后-转正后阶段工资")
private BigDecimal afterAttendanceRegularBasicSalary;
/** /**
* 考勤计算后底薪 todz 考勤申诉成功后需要更新该字段 * 考勤计算后-考勤工资(未乘0.7系数的底薪)
*/ */
@ApiModelProperty(notes = "考勤计算后底薪") @ApiModelProperty(notes = "考勤计算后-考勤工资(未乘0.7系数的底薪)")
private BigDecimal afterAttendanceBasicSalary; 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 = "基本工资(底薪+绩效工资)") @ApiModelProperty(notes = "基本工资(底薪+绩效工资)")
private BigDecimal basicSalary; private BigDecimal basicSalary;
...@@ -149,18 +155,22 @@ public class PerfAppraisalDetailDTO implements Serializable { ...@@ -149,18 +155,22 @@ public class PerfAppraisalDetailDTO implements Serializable {
private BigDecimal totalGrossSalary; private BigDecimal totalGrossSalary;
/** /**
* 该月产值
*/
@ApiModelProperty(notes = "该月产值")
private BigDecimal outputValue;
/**
* 入职日期 * 入职日期
*/ */
@ApiModelProperty(notes = "入职日期") @ApiModelProperty(notes = "入职日期 yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private String entryDate;
private Date entryDate;
/** /**
* 转正日期 * 转正日期
*/ */
@ApiModelProperty(notes = "转正日期") @ApiModelProperty(notes = "转正日期 yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private String correctionDate;
private Date correctionDate;
/** /**
* 是否该月入职:1-是,0-否 * 是否该月入职:1-是,0-否
...@@ -169,9 +179,9 @@ public class PerfAppraisalDetailDTO implements Serializable { ...@@ -169,9 +179,9 @@ public class PerfAppraisalDetailDTO implements Serializable {
private Integer isEntry; private Integer isEntry;
/** /**
* 是否试用期:1-是,0-否 * 该月是否试用期:1-是,0-否
*/ */
@ApiModelProperty(notes = "是否试用期:1-是,0-否") @ApiModelProperty(notes = "该月是否试用期:1-是,0-否")
private Integer isProbation; private Integer isProbation;
/** /**
...@@ -180,12 +190,6 @@ public class PerfAppraisalDetailDTO implements Serializable { ...@@ -180,12 +190,6 @@ public class PerfAppraisalDetailDTO implements Serializable {
@ApiModelProperty(notes = "是否当月转正 1-是,0-否") @ApiModelProperty(notes = "是否当月转正 1-是,0-否")
private Integer isCorrection; private Integer isCorrection;
/**
* 该月是否离职 1-是,0-否
*/
@ApiModelProperty(notes = "该月是否离职 1-是,0-否")
private Integer isLeaving;
/** /**
* 自动绩效配置id * 自动绩效配置id
......
package cn.com.glsx.dj.staff.dto.perfSalary; package cn.com.glsx.dj.staff.dto.perfSalary;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -8,7 +7,6 @@ import lombok.NoArgsConstructor; ...@@ -8,7 +7,6 @@ import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
* 员工绩效详情 * 员工绩效详情
...@@ -31,8 +29,7 @@ public class PerfAppraisalSubmitReqDTO implements Serializable { ...@@ -31,8 +29,7 @@ public class PerfAppraisalSubmitReqDTO implements Serializable {
* 评分月份(yyyy-mm) * 评分月份(yyyy-mm)
*/ */
@ApiModelProperty(notes = "评分月份(yyyy-mm)") @ApiModelProperty(notes = "评分月份(yyyy-mm)")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String evaluationMonth;
private Date evaluationMonth;
/** /**
* 绩效等级-手动设置 * 绩效等级-手动设置
......
package cn.com.glsx.dj.staff.dto.perfSalary; package cn.com.glsx.dj.staff.dto.perfSalary;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -8,7 +7,7 @@ import lombok.NoArgsConstructor; ...@@ -8,7 +7,7 @@ import lombok.NoArgsConstructor;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.List;
@Data @Data
@AllArgsConstructor @AllArgsConstructor
...@@ -20,9 +19,8 @@ public class PerfRuleReqDTO implements Serializable { ...@@ -20,9 +19,8 @@ public class PerfRuleReqDTO implements Serializable {
/** /**
* 查询月份 * 查询月份
*/ */
@ApiModelProperty(notes = "查询月份-传参格式:yyyy-MM-dd") @ApiModelProperty(notes = "查询月份-传参格式:yyyy-MM")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String queryMonth;
private Date queryMonth;
/** /**
* 区域经理手机号 * 区域经理手机号
...@@ -37,12 +35,6 @@ public class PerfRuleReqDTO implements Serializable { ...@@ -37,12 +35,6 @@ public class PerfRuleReqDTO implements Serializable {
private String regionManagerId; private String regionManagerId;
/** /**
* 门店id
*/
@ApiModelProperty(notes = "门店id")
private String merchantId;
/**
* 绩效等级 * 绩效等级
*/ */
@ApiModelProperty(notes = "绩效等级") @ApiModelProperty(notes = "绩效等级")
...@@ -55,9 +47,27 @@ public class PerfRuleReqDTO implements Serializable { ...@@ -55,9 +47,27 @@ public class PerfRuleReqDTO implements Serializable {
private String mobilePhone; private String mobilePhone;
/** /**
* 批量查询员工手机号
*/
@ApiModelProperty(notes = "批量查询员工手机号")
private List<String> mobilePhoneList;
/**
* 处理状态 * 处理状态
*/ */
@ApiModelProperty(notes = "处理状态") @ApiModelProperty(notes = "处理状态")
private Integer handleStatus; private Integer handleStatus;
/**
* 门店名称&员工名称聚合搜索
*/
@ApiModelProperty(notes = "门店名称&员工名称聚合搜索")
private String merchantAndStaffSearch;
/**
* 员工名称搜索
*/
@ApiModelProperty(notes = "员工名称搜索")
private String name;
} }
package cn.com.glsx.dj.staff.dto.perfSalary;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class SceneTypeEffectiveReferralDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "业务场景:1-精品升级(轻改);2-会员权益(广联权益);3-单延保;")
private Byte sceneType;
@ApiModelProperty(value = "品牌有效引荐数DTOs")
private List<EffectiveReferralCountDTO> effectiveReferralCountDTOS;
@ApiModelProperty(value = "凭证Url 以,分隔")
private String imageUrls;
@ApiModelProperty(value = "备注")
private String remark;
}
package cn.com.glsx.dj.staff.dto.perfSalary;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class StoreEffectiveReferralDetailDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "门店名称")
private String merchantName;
@ApiModelProperty(value = "业务场景引荐数列表")
private List<SceneTypeEffectiveReferralDTO> sceneTypeEffectiveReferrals;
}
package cn.com.glsx.dj.staff.enums.perfSalary;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
/**
* 品牌类型枚举
*/
@Getter
@AllArgsConstructor
public enum EffectiveReferralBrandTypeEnum {
ASKING_WORLD(0, "问界"),
SMART_WORLD(1, "智界"),
ENJOY_WORLD(2, "享界"),
RESPECT_WORLD(3, "尊界"),
NOBLE_WORLD(4, "尚界"),
OTHER_BRAND(5, "其它品牌");
/**
* 品牌类型编码
*/
private final Integer code;
/**
* 品牌类型描述
*/
private final String description;
/**
* 根据编码获取枚举
*
* @param code 编码
* @return 对应的枚举,找不到时返回null
*/
public static EffectiveReferralBrandTypeEnum getByCode(Integer code) {
if (code == null) {
return null;
}
for (EffectiveReferralBrandTypeEnum type : EffectiveReferralBrandTypeEnum.values()) {
if (type.getCode().equals(code)) {
return type;
}
}
return null;
}
/**
* 根据编码获取描述
*
* @param code 编码
* @return 描述,找不到时返回null
*/
public static String getDescriptionByCode(Integer code) {
EffectiveReferralBrandTypeEnum type = getByCode(code);
return type != null ? type.getDescription() : null;
}
/**
* 根据描述获取枚举
*
* @param description 描述
* @return 对应的枚举,找不到时返回null
*/
public static EffectiveReferralBrandTypeEnum getByDescription(String description) {
if (StringUtils.isBlank(description)) {
return null;
}
for (EffectiveReferralBrandTypeEnum type : EffectiveReferralBrandTypeEnum.values()) {
if (type.getDescription().equals(description)) {
return type;
}
}
return null;
}
/**
* 根据描述获取编码
*
* @param description 描述
* @return 编码,找不到时返回null
*/
public static Integer getCodeByDescription(String description) {
EffectiveReferralBrandTypeEnum type = getByDescription(description);
return type != null ? type.getCode() : null;
}
/**
* 检查编码是否有效
*
* @param code 编码
* @return 是否有效
*/
public static boolean isValid(Integer code) {
return getByCode(code) != null;
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.enums.perfSalary;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 有效转介场景枚举
*/
@Getter
@AllArgsConstructor
public enum EffectiveReferralSceneEnum {
/**
* 精品升级(轻改)
*/
PREMIUM_UPGRADE((byte) 1, "精品升级(轻改)"),
/**
* 会员权益(广联权益)
*/
MEMBER_RIGHTS((byte) 2, "会员权益(广联权益)"),
/**
* 单延保
*/
SINGLE_EXTENDED_WARRANTY((byte) 3, "单延保");
/**
* 场景编码
*/
private final Byte code;
/**
* 场景描述
*/
private final String description;
private static final Map<Byte, EffectiveReferralSceneEnum> CODE_MAP =
Arrays.stream(values())
.collect(Collectors.toMap(
EffectiveReferralSceneEnum::getCode,
Function.identity()
));
/**
* 根据编码获取枚举实例
*
* @param code 场景编码
* @return 枚举实例,如果不存在则返回null
*/
public static EffectiveReferralSceneEnum getByCode(Byte code) {
return CODE_MAP.get(code);
}
/**
* 根据编码获取枚举实例(带默认值)
*
* @param code 场景编码
* @param defaultValue 默认值
* @return 枚举实例,如果不存在则返回默认值
*/
public static EffectiveReferralSceneEnum getByCodeOrDefault(Byte code, EffectiveReferralSceneEnum defaultValue) {
return CODE_MAP.getOrDefault(code, defaultValue);
}
/**
* 检查编码是否存在
*
* @param code 场景编码
* @return 是否存在
*/
public static boolean contains(Byte code) {
return CODE_MAP.containsKey(code);
}
/**
* 获取所有编码的描述映射
*
* @return 编码-描述映射
*/
public static Map<Byte, String> getAllCodeDescMap() {
return Arrays.stream(values())
.collect(Collectors.toMap(
EffectiveReferralSceneEnum::getCode,
EffectiveReferralSceneEnum::getDescription
));
}
/**
* 判断是否为指定编码
*
* @param code 待判断的编码
* @return 是否相等
*/
public boolean isCode(Byte code) {
return this.code.equals(code);
}
}
\ No newline at end of file \ No newline at end of file
...@@ -70,6 +70,13 @@ public class StaffSalaryAppealApplyRecord implements Serializable { ...@@ -70,6 +70,13 @@ public class StaffSalaryAppealApplyRecord implements Serializable {
private Integer sceneType; private Integer sceneType;
/** /**
* 发起时选择的4s店
*/
@ApiModelProperty(notes = "发起时选择的4s店")
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 实际出勤天数 * 实际出勤天数
*/ */
@ApiModelProperty(notes = "实际出勤天数") @ApiModelProperty(notes = "实际出勤天数")
...@@ -154,6 +161,14 @@ public class StaffSalaryAppealApplyRecord implements Serializable { ...@@ -154,6 +161,14 @@ public class StaffSalaryAppealApplyRecord implements Serializable {
private String replyContent; private String replyContent;
/** /**
* 答复时间
*/
@ApiModelProperty(notes = "答复时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "reply_date")
private Date replyDate;
/**
* 其他异常留言 * 其他异常留言
*/ */
@ApiModelProperty(notes = "其他异常留言") @ApiModelProperty(notes = "其他异常留言")
......
package cn.com.glsx.dj.staff.remote.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralDetailDTO;
import cn.com.glsx.framework.core.annotation.ApiMethod;
import cn.com.glsx.framework.core.annotation.ApiParam;
import cn.com.glsx.framework.core.annotation.ApiResponse;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiService(value = "小程序有效引荐接口", owner = "team", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface EffectiveReferralReviewMiniProgramRemote {
@ApiMethod("门店有效引荐数列表")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("门店有效引荐数分页")
RpcResponse<List<EffectiveReferralReviewCommonDTO>> effectiveReferralStoreList(@NotNull EffectiveReferralReviewCommonDTO request);
@ApiMethod("门店有效引荐数详情")
@ApiParam(name = "id", notes = "门店有效引荐记录id", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)
@ApiResponse("门店有效引荐数详情")
RpcResponse<StoreEffectiveReferralDetailDTO> effectiveReferralStoreDetail(Integer id);
@ApiMethod("门店有效引荐数提交")
@ApiParam(name = "dto", notes = "提交信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("提交结果")
RpcResponse<Boolean> effectiveReferralStoreSubmit(@NotNull EffectiveReferralReviewDTO dto);
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.framework.core.annotation.ApiMethod;
import cn.com.glsx.framework.core.annotation.ApiParam;
import cn.com.glsx.framework.core.annotation.ApiResponse;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import javax.validation.constraints.NotNull;
@ApiService(value = "有效引荐接口", owner = "team", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface EffectiveReferralReviewRemote {
@ApiMethod("店铺设置-有效引荐列表")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("有效引荐分页")
RpcResponse<RpcPagination<EffectiveReferralReviewCommonDTO>> effectiveReferralPage(@NotNull RpcPagination<EffectiveReferralReviewCommonDTO> pagination);
@ApiMethod("订单管理-有效引荐数复核列表")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("有效引荐复核分页")
RpcResponse<RpcPagination<EffectiveReferralReviewCommonDTO>> effectiveReferralAuditPage(@NotNull RpcPagination<EffectiveReferralReviewCommonDTO> pagination);
@ApiMethod("有效引荐详情")
@ApiParam(name = "id", notes = "有效引荐记录id", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)
@ApiResponse("有效引荐详情")
RpcResponse<EffectiveReferralReviewCommonDTO> effectiveReferralDetail(Integer id);
@ApiMethod("有效引荐数-复核")
@ApiParam(name = "dto", notes = "复核信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("复核结果")
RpcResponse<Boolean> effectiveReferralAudit(@NotNull EffectiveReferralReviewCommonDTO dto);
@ApiMethod("web端有效引荐导出数据查询")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("导出数据列表")
RpcResponse<String> effectiveReferralExportData(RpcPagination<EffectiveReferralReviewCommonDTO> pagination);
@ApiMethod("web端有效引荐复核导出数据查询")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("复核导出数据列表")
RpcResponse<String> effectiveReferralAuditExportData(RpcPagination<EffectiveReferralReviewCommonDTO> pagination);
}
\ No newline at end of file \ No newline at end of file
...@@ -45,6 +45,16 @@ public interface PerfRuleRemote { ...@@ -45,6 +45,16 @@ public interface PerfRuleRemote {
RpcResponse<PerfAppraisalDetailDTO> perfAppraisalDetail(PerfRuleReqDTO perfRuleReqDTO); RpcResponse<PerfAppraisalDetailDTO> perfAppraisalDetail(PerfRuleReqDTO perfRuleReqDTO);
/** /**
* 绩效考核批量详情
*/
RpcResponse<List<PerfAppraisalDetailDTO>> perfAppraisalBatchDetail(PerfRuleReqDTO perfRuleReqDTO);
/**
* 员工列表(过滤提交过2次的员工)-(按照评分月份,区域经理手机号筛选)
*/
RpcResponse<List<AppraisalInfoDTO>> perfStaffList(PerfRuleReqDTO perfRuleReqDTO);
/**
* 绩效考核-提交-单个处理 * 绩效考核-提交-单个处理
*/ */
RpcResponse<Boolean> perfAppraisalSingleSubmit(PerfAppraisalSubmitReqDTO perfAppraisalSubmitReqDTO); RpcResponse<Boolean> perfAppraisalSingleSubmit(PerfAppraisalSubmitReqDTO perfAppraisalSubmitReqDTO);
...@@ -63,4 +73,14 @@ public interface PerfRuleRemote { ...@@ -63,4 +73,14 @@ public interface PerfRuleRemote {
* 打卡数据 * 打卡数据
*/ */
RpcResponse<Boolean> clockInCompleteAnalysisStaff(); RpcResponse<Boolean> clockInCompleteAnalysisStaff();
/**
* 定时任务-绩效配置设置
*/
RpcResponse<Boolean> syncQwClockInDetailData(String clockInDateStr);
/**
* 每月自动评绩效
*/
RpcResponse<Boolean> autoPerfEvaluation();
} }
package cn.com.glsx.dj.staff.remote.salaryappealapply;
import cn.com.glsx.dj.staff.dto.StaffSalaryAppealApplyRecordDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import java.util.List;
@ApiService(value = "员工工资绩效申诉管理", owner = "linchong", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface StaffSalaryAppealApplyRecordRemote {
/**
* 新增申诉
*/
RpcResponse<Boolean> createAppeal(StaffSalaryAppealApplyRecordDTO dto);
/**
* 分页查询申诉记录
*/
RpcResponse<RpcPagination<StaffSalaryAppealApplyRecordDTO>> pageList(RpcPagination<StaffSalaryAppealApplyRecordDTO> pagination);
/**
* 根据id查询详情
*/
RpcResponse<StaffSalaryAppealApplyRecordDTO> detail(StaffSalaryAppealApplyRecordDTO dto);
/**
* 查询最新申诉记录
*/
RpcResponse<StaffSalaryAppealApplyRecordDTO> queryLatest(StaffSalaryAppealApplyRecordDTO dto);
/**
* 查询复议记录列表
*/
RpcResponse<List<StaffSalaryAppealApplyRecordDTO>> replyRecordList(StaffSalaryAppealApplyRecordDTO dto);
/**
* web后台分页查询申诉记录
*/
RpcResponse<RpcPagination<StaffSalaryAppealApplyRecordDTO>> webPageList(RpcPagination<StaffSalaryAppealApplyRecordDTO> pagination);
/**
* web后台答复申诉
*/
RpcResponse<Boolean> webReply(StaffSalaryAppealApplyRecordDTO dto);
}
...@@ -20,7 +20,8 @@ public class AutoPerfEvaluationJob implements SimpleJob { ...@@ -20,7 +20,8 @@ public class AutoPerfEvaluationJob implements SimpleJob {
public void execute(ShardingContext shardingContext) { public void execute(ShardingContext shardingContext) {
log.info("----------------每月自动评绩效开始-----------------"); log.info("----------------每月自动评绩效开始-----------------");
try { try {
autoPerfEvaluationService.autoPerfEvaluation(); log.info("分片参数:{}", shardingContext.getJobParameter());
autoPerfEvaluationService.autoPerfEvaluation(shardingContext.getJobParameter());
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
......
...@@ -20,7 +20,7 @@ public class PerfRuleSettingJob implements SimpleJob { ...@@ -20,7 +20,7 @@ public class PerfRuleSettingJob implements SimpleJob {
public void execute(ShardingContext shardingContext) { public void execute(ShardingContext shardingContext) {
log.info("----------------绩效配置设置开始-----------------"); log.info("----------------绩效配置设置开始-----------------");
try { try {
perfRuleRemoteService.perfRuleSettingJob(); perfRuleRemoteService.perfRuleSettingJob(shardingContext.getJobParameter());
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
......
package cn.com.glsx.dj.staff.mapper; package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.StaffSalaryAppealApplyRecordDTO;
import cn.com.glsx.dj.staff.model.StaffSalaryAppealApplyRecord; import cn.com.glsx.dj.staff.model.StaffSalaryAppealApplyRecord;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper @Mapper
public interface StaffSalaryAppealApplyRecordMapper extends OreMapper<StaffSalaryAppealApplyRecord> { public interface StaffSalaryAppealApplyRecordMapper extends OreMapper<StaffSalaryAppealApplyRecord> {
/**
* 分页查询申诉记录
*/
List<StaffSalaryAppealApplyRecordDTO> pageList(StaffSalaryAppealApplyRecordDTO condition);
/**
* 查询复议记录列表(每种类型返回最新的一条)
*/
List<StaffSalaryAppealApplyRecordDTO> replyRecordList(StaffSalaryAppealApplyRecordDTO condition);
/**
* web后台分页查询申诉记录
*/
List<StaffSalaryAppealApplyRecordDTO> webPageList(StaffSalaryAppealApplyRecordDTO condition);
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.mapper.perfSalary; package cn.com.glsx.dj.staff.mapper.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO; import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview; import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper @Mapper
public interface EffectiveReferralReviewMapper extends OreMapper<EffectiveReferralReview> { public interface EffectiveReferralReviewMapper extends OreMapper<EffectiveReferralReview> {
...@@ -15,4 +18,21 @@ public interface EffectiveReferralReviewMapper extends OreMapper<EffectiveReferr ...@@ -15,4 +18,21 @@ public interface EffectiveReferralReviewMapper extends OreMapper<EffectiveReferr
* @return 记录 * @return 记录
*/ */
EffectiveReferralReviewDTO selectOneByQuery(EffectiveReferralReviewDTO query); EffectiveReferralReviewDTO selectOneByQuery(EffectiveReferralReviewDTO query);
/**
* 查询门店列表
*
* @param query 查询条件
* @return 门店列表
*/
List<EffectiveReferralReviewCommonDTO> selectStoreList(EffectiveReferralReviewCommonDTO query);
/**
* 查询门店有效数列表
*
* @param query 查询条件
* @return 门店列表
*/
List<EffectiveReferralReviewCommonDTO> selectStoreEffectiveReferralList(EffectiveReferralReviewCommonDTO query);
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.mapper.perfSalary; package cn.com.glsx.dj.staff.mapper.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.*;
import cn.com.glsx.dj.staff.model.perfSalary.PerformanceEvaluation; import cn.com.glsx.dj.staff.model.perfSalary.PerformanceEvaluation;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Mapper @Mapper
...@@ -13,4 +15,16 @@ public interface PerformanceEvaluationMapper extends OreMapper<PerformanceEvalua ...@@ -13,4 +15,16 @@ public interface PerformanceEvaluationMapper extends OreMapper<PerformanceEvalua
void insertOrUpdate(PerformanceEvaluation performanceEvaluation); void insertOrUpdate(PerformanceEvaluation performanceEvaluation);
void insertOrUpdateBatch(@Param("list") List<PerformanceEvaluation> performanceEvaluationList); void insertOrUpdateBatch(@Param("list") List<PerformanceEvaluation> performanceEvaluationList);
PerfAppraisalStatisticsCardDTO perfAppraisalStatisticsCard(PerfRuleReqDTO perfRuleReqDTO);
List<AppraisalInfoDTO> perfAppraisalList(PerfRuleReqDTO perfRuleReqDTO);
AutoPerformRuleResultDTO perfAppraisalAutoDetectResult(PerfRuleReqDTO perfRuleReqDTO);
List<PerfAppraisalDetailDTO> perfAppraisalDetail(PerfRuleReqDTO perfRuleReqDTO);
List<AppraisalInfoDTO> perfStaffList(PerfRuleReqDTO perfRuleReqDTO);
BigDecimal getTotalExtraAmount(PerfRuleReqDTO perfRuleReqDTO);
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralDetailDTO;
import cn.com.glsx.dj.staff.service.perfSalary.EffectiveReferralReviewMiniProgramService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class EffectiveReferralReviewMiniProgramRemoteImpl implements EffectiveReferralReviewMiniProgramRemote {
@Autowired
private EffectiveReferralReviewMiniProgramService effectiveReferralReviewMiniprogramService;
@Override
public RpcResponse<List<EffectiveReferralReviewCommonDTO>> effectiveReferralStoreList(EffectiveReferralReviewCommonDTO request) {
try{
return RpcResponse.success(effectiveReferralReviewMiniprogramService.effectiveReferralStoreList(request));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<StoreEffectiveReferralDetailDTO> effectiveReferralStoreDetail(Integer merchantId) {
try{
return RpcResponse.success(effectiveReferralReviewMiniprogramService.effectiveReferralStoreDetail(merchantId));
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> effectiveReferralStoreSubmit(EffectiveReferralReviewDTO dto) {
try{
return RpcResponse.success(effectiveReferralReviewMiniprogramService.effectiveReferralStoreSubmit(dto));
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import cn.com.glsx.dj.staff.service.perfSalary.EffectiveReferralReviewService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class EffectiveReferralReviewRemoteImpl implements EffectiveReferralReviewRemote {
@Autowired
private EffectiveReferralReviewService effectiveReferralReviewService;
@Override
public RpcResponse<RpcPagination<EffectiveReferralReviewCommonDTO>> effectiveReferralPage(RpcPagination<EffectiveReferralReviewCommonDTO> pagination) {
try{
return RpcResponse.success(effectiveReferralReviewService.effectiveReferralPage(pagination));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<RpcPagination<EffectiveReferralReviewCommonDTO>> effectiveReferralAuditPage(RpcPagination<EffectiveReferralReviewCommonDTO> pagination) {
try{
return RpcResponse.success(effectiveReferralReviewService.effectiveReferralAuditPage(pagination));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<EffectiveReferralReviewCommonDTO> effectiveReferralDetail(Integer id) {
try{
return RpcResponse.success(effectiveReferralReviewService.effectiveReferralDetail(id));
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> effectiveReferralAudit(EffectiveReferralReviewCommonDTO dto) {
try{
effectiveReferralReviewService.effectiveReferralAudit(dto);
return RpcResponse.success(true);
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<String> effectiveReferralExportData(RpcPagination<EffectiveReferralReviewCommonDTO> pagination) {
try{
return RpcResponse.success(effectiveReferralReviewService.effectiveReferralExportData(pagination));
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<String> effectiveReferralAuditExportData(RpcPagination<EffectiveReferralReviewCommonDTO> pagination) {
try{
return RpcResponse.success(effectiveReferralReviewService.effectiveReferralAuditExportData(pagination));
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.perfSalary; package cn.com.glsx.dj.staff.remote.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.*; import cn.com.glsx.dj.staff.dto.perfSalary.*;
import cn.com.glsx.dj.staff.service.perfSalary.AttendanceDataCleansingService; import cn.com.glsx.dj.staff.service.perfSalary.*;
import cn.com.glsx.dj.staff.service.perfSalary.ClockInCompleteAnalysisStaffService;
import cn.com.glsx.dj.staff.service.perfSalary.PerfRuleRemoteService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -22,6 +20,10 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -22,6 +20,10 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
private AttendanceDataCleansingService attendanceDataCleansingService; private AttendanceDataCleansingService attendanceDataCleansingService;
@Resource @Resource
private ClockInCompleteAnalysisStaffService clockInCompleteAnalysisStaffService; private ClockInCompleteAnalysisStaffService clockInCompleteAnalysisStaffService;
@Resource
private AutoPerfEvaluationService autoPerfEvaluationService;
@Resource
private PerformanceEvaluationService performanceEvaluationService;
...@@ -69,7 +71,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -69,7 +71,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/ */
@Override @Override
public RpcResponse<PerfAppraisalStatisticsCardDTO> perfAppraisalStatisticsCard(PerfRuleReqDTO perfRuleReqDTO) { public RpcResponse<PerfAppraisalStatisticsCardDTO> perfAppraisalStatisticsCard(PerfRuleReqDTO perfRuleReqDTO) {
return null; try {
return RpcResponse.success(performanceEvaluationService.perfAppraisalStatisticsCard(perfRuleReqDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
} }
/** /**
...@@ -77,7 +84,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -77,7 +84,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/ */
@Override @Override
public RpcResponse<List<AppraisalInfoDTO>> perfAppraisalList(PerfRuleReqDTO perfRuleReqDTO) { 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);
}
} }
/** /**
...@@ -85,7 +97,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -85,7 +97,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/ */
@Override @Override
public RpcResponse<AutoPerformRuleResultDTO> perfAppraisalAutoDetectResult(PerfRuleReqDTO perfRuleReqDTO) { 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);
}
} }
/** /**
...@@ -93,7 +110,38 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -93,7 +110,38 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/ */
@Override @Override
public RpcResponse<PerfAppraisalDetailDTO> perfAppraisalDetail(PerfRuleReqDTO perfRuleReqDTO) { 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);
}
}
/**
* 批量查询绩效详情
*/
@Override
public RpcResponse<List<PerfAppraisalDetailDTO>> perfAppraisalBatchDetail(PerfRuleReqDTO perfRuleReqDTO) {
try {
return RpcResponse.success(performanceEvaluationService.perfAppraisalBatchDetail(perfRuleReqDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
/**
* 员工列表(过滤提交过2次的员工)-(按照评分月份,区域经理手机号筛选)
*/
@Override
public RpcResponse<List<AppraisalInfoDTO>> perfStaffList(PerfRuleReqDTO perfRuleReqDTO) {
try {
return RpcResponse.success(performanceEvaluationService.perfStaffList(perfRuleReqDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
} }
/** /**
...@@ -101,7 +149,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -101,7 +149,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/ */
@Override @Override
public RpcResponse<Boolean> perfAppraisalSingleSubmit(PerfAppraisalSubmitReqDTO perfAppraisalSubmitReqDTO) { public RpcResponse<Boolean> perfAppraisalSingleSubmit(PerfAppraisalSubmitReqDTO perfAppraisalSubmitReqDTO) {
return null; try {
return RpcResponse.success(performanceEvaluationService.perfAppraisalSingleSubmit(perfAppraisalSubmitReqDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
} }
/** /**
...@@ -109,7 +162,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -109,7 +162,12 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/ */
@Override @Override
public RpcResponse<Boolean> perfAppraisalBatchSubmit(PerfAppraisalBatchSubmitReqDTO perfAppraisalBatchSubmitReqDTO) { public RpcResponse<Boolean> perfAppraisalBatchSubmit(PerfAppraisalBatchSubmitReqDTO perfAppraisalBatchSubmitReqDTO) {
return null; try {
return RpcResponse.success(performanceEvaluationService.perfAppraisalBatchSubmit(perfAppraisalBatchSubmitReqDTO));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
} }
/** /**
...@@ -130,5 +188,23 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -130,5 +188,23 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
return RpcResponse.success(true); return RpcResponse.success(true);
} }
/**
* 定时任务-绩效配置设置
*/
@Override
public RpcResponse<Boolean> syncQwClockInDetailData(String clockInDateStr) {
perfRuleRemoteService.perfRuleSettingJob("");
return RpcResponse.success(true);
}
/**
* 每月自动评绩效
*/
@Override
public RpcResponse<Boolean> autoPerfEvaluation() {
autoPerfEvaluationService.autoPerfEvaluation("");
return RpcResponse.success(true);
}
} }
package cn.com.glsx.dj.staff.remote.salaryappealapply;
import cn.com.glsx.dj.staff.dto.StaffSalaryAppealApplyRecordDTO;
import cn.com.glsx.dj.staff.service.StaffSalaryAppealApplyRecordService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import javax.annotation.Resource;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class StaffSalaryAppealApplyRecordRemoteImpl implements StaffSalaryAppealApplyRecordRemote {
@Resource
private StaffSalaryAppealApplyRecordService staffSalaryAppealApplyRecordService;
@Override
public RpcResponse<Boolean> createAppeal(StaffSalaryAppealApplyRecordDTO dto) {
try {
log.info("createAppeal start, dto:{}", dto);
Boolean result = staffSalaryAppealApplyRecordService.createAppeal(dto);
return RpcResponse.success(result);
} catch (Exception e) {
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<RpcPagination<StaffSalaryAppealApplyRecordDTO>> pageList(RpcPagination<StaffSalaryAppealApplyRecordDTO> pagination) {
try{
pagination = RpcPagination.copyPage(staffSalaryAppealApplyRecordService.pageList(pagination));
return RpcResponse.success(pagination);
}catch(Exception e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<StaffSalaryAppealApplyRecordDTO> detail(StaffSalaryAppealApplyRecordDTO dto) {
try {
log.info("detail start, dto:{}", dto);
StaffSalaryAppealApplyRecordDTO result = staffSalaryAppealApplyRecordService.detail(dto.getId());
return RpcResponse.success(result);
} catch (Exception e) {
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<StaffSalaryAppealApplyRecordDTO> queryLatest(StaffSalaryAppealApplyRecordDTO dto) {
try {
log.info("queryLatest start, dto:{}", dto);
StaffSalaryAppealApplyRecordDTO result = staffSalaryAppealApplyRecordService.queryLatest(dto);
return RpcResponse.success(result);
} catch (Exception e) {
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffSalaryAppealApplyRecordDTO>> replyRecordList(StaffSalaryAppealApplyRecordDTO dto) {
try {
log.info("replyRecordList start, dto:{}", dto);
List<StaffSalaryAppealApplyRecordDTO> result = staffSalaryAppealApplyRecordService.replyRecordList(dto);
return RpcResponse.success(result);
} catch (Exception e) {
log.error(e.getMessage(),e);
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);
}
}
}
package cn.com.glsx.dj.staff.service; package cn.com.glsx.dj.staff.service;
import cn.com.glsx.dj.staff.dto.SalaryAppealApplyAttachmentDTO;
import cn.com.glsx.dj.staff.dto.StaffSalaryAppealApplyRecordDTO;
import cn.com.glsx.dj.staff.mapper.SalaryAppealApplyAttachmentMapper;
import cn.com.glsx.dj.staff.mapper.StaffSalaryAppealApplyRecordMapper; import cn.com.glsx.dj.staff.mapper.StaffSalaryAppealApplyRecordMapper;
import cn.com.glsx.dj.staff.model.SalaryAppealApplyAttachment;
import cn.com.glsx.dj.staff.model.StaffSalaryAppealApplyRecord;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j @Slf4j
...@@ -18,9 +33,177 @@ public class StaffSalaryAppealApplyRecordService { ...@@ -18,9 +33,177 @@ public class StaffSalaryAppealApplyRecordService {
@Resource @Resource
private StaffSalaryAppealApplyRecordMapper staffSalaryAppealApplyRecordMapper; private StaffSalaryAppealApplyRecordMapper staffSalaryAppealApplyRecordMapper;
@Resource
private SalaryAppealApplyAttachmentMapper salaryAppealApplyAttachmentMapper;
/**
* 新增申诉
*/
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class)
public void test(String test) { public Boolean createAppeal(StaffSalaryAppealApplyRecordDTO dto) {
log.info("createAppeal start, dto:{}", dto);
// 保存主表
StaffSalaryAppealApplyRecord record = new StaffSalaryAppealApplyRecord();
BeanUtils.copyProperties(dto, record);
record.setCreatedDate(new Date());
record.setUpdatedDate(new Date());
record.setDeletedFlag("N");
int result = staffSalaryAppealApplyRecordMapper.insertSelective(record);
if (result > 0) {
// 保存附件
if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) {
for (SalaryAppealApplyAttachmentDTO attachmentDTO : dto.getAttachmentList()) {
SalaryAppealApplyAttachment attachment = new SalaryAppealApplyAttachment();
BeanUtils.copyProperties(attachmentDTO, attachment);
attachment.setSalaryAppealApplyRecordId(record.getId());
attachment.setCreatedBy(dto.getCreatedBy());
attachment.setUpdatedBy(dto.getUpdatedBy());
attachment.setCreatedDate(new Date());
attachment.setUpdatedDate(new Date());
attachment.setDeletedFlag("N");
salaryAppealApplyAttachmentMapper.insertSelective(attachment);
}
}
return true;
}
return false;
}
/**
* 分页查询
*/
public Page<StaffSalaryAppealApplyRecordDTO> pageList(RpcPagination<StaffSalaryAppealApplyRecordDTO> pagination) {
log.info("pageList start, pagination:{}", pagination);
try {
Page<StaffSalaryAppealApplyRecordDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(), pagination.isNeedCount());
staffSalaryAppealApplyRecordMapper.pageList(pagination.getCondition());
return page;
} catch (Exception e) {
log.error("pageList error", e);
throw new RpcServiceException("分页查询失败:" + e.getMessage());
}
}
/**
* 查询详情
*/
public StaffSalaryAppealApplyRecordDTO detail(Integer id) {
log.info("detail start, id:{}", id);
StaffSalaryAppealApplyRecord record = staffSalaryAppealApplyRecordMapper.selectByPrimaryKey(id);
if (record == null) {
return null;
}
StaffSalaryAppealApplyRecordDTO dto = new StaffSalaryAppealApplyRecordDTO();
BeanUtils.copyProperties(record, dto);
// 查询附件
dto.setAttachmentList(getAttachmentList(id));
return dto;
}
/**
* 查询最新申诉记录
*/
public StaffSalaryAppealApplyRecordDTO queryLatest(StaffSalaryAppealApplyRecordDTO condition) {
log.info("queryLatest 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.andEqualTo("appealType", condition.getAppealType());
example.orderBy("createdDate").desc();
List<StaffSalaryAppealApplyRecord> list = staffSalaryAppealApplyRecordMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) {
return null;
}
StaffSalaryAppealApplyRecord record = list.get(0);
StaffSalaryAppealApplyRecordDTO dto = new StaffSalaryAppealApplyRecordDTO();
BeanUtils.copyProperties(record, dto);
// 查询附件
dto.setAttachmentList(getAttachmentList(record.getId()));
return dto;
} }
/**
* 查询复议记录列表(根据人、申诉月份,分别返回不同appeal_type的最新回复记录,每种类型各一条)
*/
public List<StaffSalaryAppealApplyRecordDTO> replyRecordList(StaffSalaryAppealApplyRecordDTO condition) {
log.info("replyRecordList start, condition:{}", condition);
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());
}
}
/**
* 查询附件列表
*/
private List<SalaryAppealApplyAttachmentDTO> getAttachmentList(Integer recordId) {
Example example = new Example(SalaryAppealApplyAttachment.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("salaryAppealApplyRecordId", recordId);
criteria.andEqualTo("deletedFlag", "N");
List<SalaryAppealApplyAttachment> attachments = salaryAppealApplyAttachmentMapper.selectByExample(example);
if (CollectionUtils.isEmpty(attachments)) {
return new ArrayList<>();
}
return attachments.stream().map(attachment -> {
SalaryAppealApplyAttachmentDTO dto = new SalaryAppealApplyAttachmentDTO();
BeanUtils.copyProperties(attachment, dto);
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 \ No newline at end of file
...@@ -64,7 +64,7 @@ public class AutoPerfEvaluationService { ...@@ -64,7 +64,7 @@ public class AutoPerfEvaluationService {
/** /**
* 每月自动评绩效 * 每月自动评绩效
*/ */
public void autoPerfEvaluation() { public void autoPerfEvaluation(String monthDate) {
// 查询生效中的自动绩效配置 // 查询生效中的自动绩效配置
Example autoPerformRuleExample = new Example(AutoPerformRule.class); Example autoPerformRuleExample = new Example(AutoPerformRule.class);
autoPerformRuleExample.createCriteria().andEqualTo("deletedFlag", 'N') autoPerformRuleExample.createCriteria().andEqualTo("deletedFlag", 'N')
...@@ -77,7 +77,7 @@ public class AutoPerfEvaluationService { ...@@ -77,7 +77,7 @@ public class AutoPerfEvaluationService {
// 查询北森同步表 获取该月在职或该月离职的员工 // 查询北森同步表 获取该月在职或该月离职的员工
Example staffBeisenBaseExample = new Example(StaffBeisenBaseInfo.class); Example staffBeisenBaseExample = new Example(StaffBeisenBaseInfo.class);
// 上个月 // 上个月
DateTime lastMonthDate = DateUtil.offsetMonth(new Date(), -1); DateTime lastMonthDate = StrUtil.isNotBlank(monthDate) ? DateUtil.parse(monthDate) : DateUtil.offsetMonth(new Date(), -1);
DateTime lastMonthFirstYMD = DateUtil.beginOfMonth(lastMonthDate); DateTime lastMonthFirstYMD = DateUtil.beginOfMonth(lastMonthDate);
DateTime lastMonthLastYMD = DateUtil.endOfMonth(lastMonthDate); DateTime lastMonthLastYMD = DateUtil.endOfMonth(lastMonthDate);
String lastMonth = DateUtil.format(lastMonthDate, DatePattern.NORM_MONTH_PATTERN); String lastMonth = DateUtil.format(lastMonthDate, DatePattern.NORM_MONTH_PATTERN);
......
package cn.com.glsx.dj.staff.service.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.*;
import cn.com.glsx.dj.staff.enums.perfSalary.EffectiveReferralBrandTypeEnum;
import cn.com.glsx.dj.staff.enums.perfSalary.EffectiveReferralSceneEnum;
import cn.com.glsx.dj.staff.mapper.perfSalary.EffectiveReferralReviewMapper;
import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview;
import cn.com.glsx.framework.core.beans.BaseModel;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@Slf4j
@Service
@Transactional(propagation = Propagation.SUPPORTS, rollbackFor = RpcServiceException.class)
public class EffectiveReferralReviewMiniProgramService {
@Resource
private EffectiveReferralReviewMapper effectiveReferralReviewMapper;
public List<EffectiveReferralReviewCommonDTO> effectiveReferralStoreList(EffectiveReferralReviewCommonDTO request) {
//筛选项:门店名字(模糊搜索),状态:未提交、已提交,月份:2026-01,
//特殊逻辑:根据商户门店id去重,根据门店首字母倒序。要根据门店的不同业务场景的数据判断是否已提交和未提交。
//不同业务场景`scene_type` '业务场景:1-精品升级(轻改);2-会员权益(广联权益);3-单延保 状态`status` '状态:0-未提交,1-草稿,2-已提交',全部为已提交时,总的提交状态submitStatus才是已提交。
//注意:要跟服务商户表dj_car_life_service_merchant根据`merchant_id`关联,用于筛选项门店搜索,sal_effective_referral_review作为主表
List<EffectiveReferralReviewCommonDTO> list = effectiveReferralReviewMapper.selectStoreList(request);
if (CollectionUtils.isEmpty(list)) {
return list;
}
//赋值不同业务提交状态
fillSceneTypeSubmitStatus(list);
return list;
}
/**
* 赋值不同业务场景的提交状态
*
* @param list
*/
private void fillSceneTypeSubmitStatus(List<EffectiveReferralReviewCommonDTO> list) {
list.forEach(item -> {
Example example = new Example(EffectiveReferralReview.class);
example.createCriteria()
.andEqualTo("deletedFlag", BaseModel.DeletedFlagEnum.N.name())
.andEqualTo("merchantId", item.getMerchantId());
List<EffectiveReferralReview> effectiveReferralReviews = effectiveReferralReviewMapper.selectByExample(example);
List<EffectiveReferralReview> lightModificationList = effectiveReferralReviews.stream().filter(effectiveReferralReview -> effectiveReferralReview.getSceneType() == 1).collect(Collectors.toList());
List<EffectiveReferralReview> interestList = effectiveReferralReviews.stream().filter(effectiveReferralReview -> effectiveReferralReview.getSceneType() == 2).collect(Collectors.toList());
List<EffectiveReferralReview> singleExtendedWarrantyList = effectiveReferralReviews.stream().filter(effectiveReferralReview -> effectiveReferralReview.getSceneType() == 3).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(lightModificationList)) {
item.setLightModificationSubmitStatus(lightModificationList.get(0).getStatus());
}
if (CollectionUtils.isNotEmpty(interestList)) {
item.setInterestSubmitStatus(interestList.get(0).getStatus());
}
if (CollectionUtils.isNotEmpty(singleExtendedWarrantyList)) {
item.setSingleExtendedWarrantySubmitStatus(singleExtendedWarrantyList.get(0).getStatus());
}
});
}
public StoreEffectiveReferralDetailDTO effectiveReferralStoreDetail(Integer merchantId) {
//1、根据门店id获取门店所有数据
EffectiveReferralReviewCommonDTO commonDTO = new EffectiveReferralReviewCommonDTO();
commonDTO.setMerchantId(merchantId);
List<EffectiveReferralReviewCommonDTO> referralReviewCommonDTOS = effectiveReferralReviewMapper.selectStoreEffectiveReferralList(commonDTO);
if (CollectionUtils.isEmpty(referralReviewCommonDTOS)) {
return new StoreEffectiveReferralDetailDTO();
}
//3、封装各业务场景引荐数(特殊逻辑品牌类型为其他的时候要去找路奇确认)
List<SceneTypeEffectiveReferralDTO> sceneTypeEffectiveReferrals = getSceneTypeEffectiveReferralDTOS(referralReviewCommonDTOS);
//4、封装返回参数
StoreEffectiveReferralDetailDTO detailDTO = new StoreEffectiveReferralDetailDTO();
detailDTO.setMerchantName(referralReviewCommonDTOS.get(0).getMerchantName());
detailDTO.setSceneTypeEffectiveReferrals(sceneTypeEffectiveReferrals);
return detailDTO;
}
/**
* 根据业务场景获取各业务场景引荐数
*
* @param referralReviewCommonDTOS
* @return
*/
private static List<SceneTypeEffectiveReferralDTO> getSceneTypeEffectiveReferralDTOS(List<EffectiveReferralReviewCommonDTO> referralReviewCommonDTOS) {
//1、根据业务场景分组
List<EffectiveReferralReviewCommonDTO> lightModificationList = referralReviewCommonDTOS.stream().filter(effectiveReferralReview -> Objects.equals(effectiveReferralReview.getSceneType(), EffectiveReferralSceneEnum.PREMIUM_UPGRADE.getCode())).collect(Collectors.toList());
List<EffectiveReferralReviewCommonDTO> memberRightList = referralReviewCommonDTOS.stream().filter(effectiveReferralReview -> Objects.equals(effectiveReferralReview.getSceneType(), EffectiveReferralSceneEnum.MEMBER_RIGHTS.getCode())).collect(Collectors.toList());
List<EffectiveReferralReviewCommonDTO> singleExtendedWarrantyList = referralReviewCommonDTOS.stream().filter(effectiveReferralReview -> Objects.equals(effectiveReferralReview.getSceneType(), EffectiveReferralSceneEnum.SINGLE_EXTENDED_WARRANTY.getCode())).collect(Collectors.toList());
//2、封装各业务场景有效引荐数
List<SceneTypeEffectiveReferralDTO> lightModificationDTOS =
getEffectiveReferralDTOSBySceneType(lightModificationList, EffectiveReferralSceneEnum.PREMIUM_UPGRADE.getCode());
List<SceneTypeEffectiveReferralDTO> memberRightsDTOS =
getEffectiveReferralDTOSBySceneType(memberRightList, EffectiveReferralSceneEnum.MEMBER_RIGHTS.getCode());
List<SceneTypeEffectiveReferralDTO> singleExtendedWarrantyDTOS =
getEffectiveReferralDTOSBySceneType(singleExtendedWarrantyList, EffectiveReferralSceneEnum.SINGLE_EXTENDED_WARRANTY.getCode());
List<SceneTypeEffectiveReferralDTO> sceneTypeEffectiveReferrals = new ArrayList<>();
sceneTypeEffectiveReferrals.addAll(lightModificationDTOS);
sceneTypeEffectiveReferrals.addAll(memberRightsDTOS);
sceneTypeEffectiveReferrals.addAll(singleExtendedWarrantyDTOS);
return sceneTypeEffectiveReferrals;
}
/**
* 获取各业务场景有效引荐数
*
* @param effectiveReferralList
* @param sceneType
* @return
*/
private static List<SceneTypeEffectiveReferralDTO> getEffectiveReferralDTOSBySceneType(List<EffectiveReferralReviewCommonDTO> effectiveReferralList, Byte sceneType) {
List<SceneTypeEffectiveReferralDTO> sceneTypeEffectiveReferrals = new ArrayList<>();
if (CollectionUtils.isNotEmpty(effectiveReferralList)) {
SceneTypeEffectiveReferralDTO referralDTO = new SceneTypeEffectiveReferralDTO();
referralDTO.setSceneType(sceneType);
referralDTO.setRemark(effectiveReferralList.get(0).getRemark());
referralDTO.setImageUrls(effectiveReferralList.get(0).getImageUrls());
List<EffectiveReferralCountDTO> effectiveReferralCountDTOS = new ArrayList<>();
effectiveReferralList.forEach(
item -> {
EffectiveReferralCountDTO countDTO = new EffectiveReferralCountDTO();
countDTO.setBrandName(item.getBrandName());
//todo 根据品牌id去路奇确认
if (item.getBrandId() == -1) {
countDTO.setBrandName(item.getBrandName());
}
countDTO.setBrandType(EffectiveReferralBrandTypeEnum.getCodeByDescription(item.getBrandName()));
countDTO.setDeliveryCount(item.getTotalDeliveryCount());
effectiveReferralCountDTOS.add(countDTO);
}
);
referralDTO.setEffectiveReferralCountDTOS(effectiveReferralCountDTOS);
sceneTypeEffectiveReferrals.add(referralDTO);
}
return sceneTypeEffectiveReferrals;
}
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class)
public Boolean effectiveReferralStoreSubmit(EffectiveReferralReviewDTO dto) {
// 核心业务逻辑暂不实现
effectiveReferralReviewMapper.updateByPrimaryKeySelective(dto);
return true;
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.service.perfSalary; package cn.com.glsx.dj.staff.service.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.dj.staff.mapper.perfSalary.EffectiveReferralReviewMapper; import cn.com.glsx.dj.staff.mapper.perfSalary.EffectiveReferralReviewMapper;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@Slf4j @Slf4j
@Service @Service
...@@ -18,19 +24,39 @@ public class EffectiveReferralReviewService { ...@@ -18,19 +24,39 @@ public class EffectiveReferralReviewService {
@Resource @Resource
private EffectiveReferralReviewMapper effectiveReferralReviewMapper; private EffectiveReferralReviewMapper effectiveReferralReviewMapper;
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class) public RpcPagination<EffectiveReferralReviewCommonDTO> effectiveReferralPage(RpcPagination<EffectiveReferralReviewCommonDTO> pagination) {
public void test(String test) { PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize());
List<EffectiveReferralReviewCommonDTO> list = null;
Page<EffectiveReferralReviewCommonDTO> page = (Page<EffectiveReferralReviewCommonDTO>) list;
pagination = RpcPagination.copyPage(page);
return pagination;
}
public RpcPagination<EffectiveReferralReviewCommonDTO> effectiveReferralAuditPage(RpcPagination<EffectiveReferralReviewCommonDTO> pagination) {
PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize());
List<EffectiveReferralReviewCommonDTO> list = null;
Page<EffectiveReferralReviewCommonDTO> page = (Page<EffectiveReferralReviewCommonDTO>) list;
pagination = RpcPagination.copyPage(page);
return pagination;
}
public EffectiveReferralReviewCommonDTO effectiveReferralDetail(Integer id) {
return (EffectiveReferralReviewCommonDTO) effectiveReferralReviewMapper.selectByPrimaryKey(id);
} }
/** @Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class)
* 根据条件查询单条有效引荐数记录 public void effectiveReferralAudit(EffectiveReferralReviewCommonDTO dto) {
* // 核心业务逻辑暂不实现
* @param query 查询参数 effectiveReferralReviewMapper.updateByPrimaryKeySelective(dto);
* @return 记录 }
*/
public EffectiveReferralReviewDTO queryEffectiveReferralReview(EffectiveReferralReviewDTO query) { public String effectiveReferralExportData(RpcPagination<EffectiveReferralReviewCommonDTO> pagination) {
return effectiveReferralReviewMapper.selectOneByQuery(query); return null;
} }
public String effectiveReferralAuditExportData(RpcPagination<EffectiveReferralReviewCommonDTO> pagination) {
return null;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -4,6 +4,7 @@ import cn.com.glsx.dj.staff.dto.perfSalary.*; ...@@ -4,6 +4,7 @@ import cn.com.glsx.dj.staff.dto.perfSalary.*;
import cn.com.glsx.dj.staff.enums.perfSalary.EffectiveStatusEnum; import cn.com.glsx.dj.staff.enums.perfSalary.EffectiveStatusEnum;
import cn.com.glsx.dj.staff.enums.perfSalary.PerfRuleConfigStarEnum; import cn.com.glsx.dj.staff.enums.perfSalary.PerfRuleConfigStarEnum;
import cn.com.glsx.dj.staff.mapper.perfSalary.AutoPerformRuleMapper; import cn.com.glsx.dj.staff.mapper.perfSalary.AutoPerformRuleMapper;
import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceEvaluationMapper;
import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceLevelMapper; import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceLevelMapper;
import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceMonthlyMapper; import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceMonthlyMapper;
import cn.com.glsx.dj.staff.model.perfSalary.AutoPerformRule; import cn.com.glsx.dj.staff.model.perfSalary.AutoPerformRule;
...@@ -45,6 +46,9 @@ public class PerfRuleRemoteService { ...@@ -45,6 +46,9 @@ public class PerfRuleRemoteService {
@Resource @Resource
private PerformanceMonthlyMapper performanceMonthlyMapper; private PerformanceMonthlyMapper performanceMonthlyMapper;
@Resource
private PerformanceEvaluationMapper performanceEvaluationMapper;
// 当月入职新员工-规则外的默认等级编码 // 当月入职新员工-规则外的默认等级编码
String monthOnboardDefaultLevelCode = OrePropertyConfigurer.getProperty("month_onboard_default_level_code", String.class, "B"); String monthOnboardDefaultLevelCode = OrePropertyConfigurer.getProperty("month_onboard_default_level_code", String.class, "B");
...@@ -79,8 +83,8 @@ public class PerfRuleRemoteService { ...@@ -79,8 +83,8 @@ public class PerfRuleRemoteService {
AutoPerformRuleUpdateDTO autoPerformRuleUpdateDTO = perfRuleConfigUpdateDTO.getAutoPerformRuleUpdateDTO(); AutoPerformRuleUpdateDTO autoPerformRuleUpdateDTO = perfRuleConfigUpdateDTO.getAutoPerformRuleUpdateDTO();
List<PerformanceLevelUpdateDTO> performanceLevelUpdateDTOS = perfRuleConfigUpdateDTO.getPerformanceLevelUpdateDTOS(); List<PerformanceLevelUpdateDTO> performanceLevelUpdateDTOS = perfRuleConfigUpdateDTO.getPerformanceLevelUpdateDTOS();
// hutool判断生效月份是当月或未来月份 如果不是则抛异常 // hutool判断生效月份是当月或未来月份 如果不是则抛异常
Date effectiveMonth = autoPerformRuleUpdateDTO.getEffectiveMonth(); String effectiveMonth = autoPerformRuleUpdateDTO.getEffectiveMonth() + "-01";
if (!isCurrentAndFutureMonth(DateUtil.formatDate(effectiveMonth))) { if (!isCurrentAndFutureMonth(effectiveMonth)) {
throw new RpcServiceException("生效时间应大于等于当前月"); throw new RpcServiceException("生效时间应大于等于当前月");
} }
// 删除最新的配置 // 删除最新的配置
...@@ -132,9 +136,9 @@ public class PerfRuleRemoteService { ...@@ -132,9 +136,9 @@ public class PerfRuleRemoteService {
*/ */
public PerfRuleConfigDetailDTO perfRuleConfigGet(PerfRuleReqDTO perfRuleReqDTO) { public PerfRuleConfigDetailDTO perfRuleConfigGet(PerfRuleReqDTO perfRuleReqDTO) {
PerfRuleConfigDetailDTO result = new PerfRuleConfigDetailDTO(); PerfRuleConfigDetailDTO result = new PerfRuleConfigDetailDTO();
Date queryMonth = perfRuleReqDTO.getQueryMonth(); String queryMonth = perfRuleReqDTO.getQueryMonth();
// 通过月份查询 sal_performance_monthly // 通过月份查询 sal_performance_monthly
PerformanceMonthly salPerformanceMonthly = performanceMonthlyMapper.findByYearMonth(DateUtil.formatDate(queryMonth)); PerformanceMonthly salPerformanceMonthly = performanceMonthlyMapper.findByYearMonth(queryMonth);
if (ObjectUtil.isEmpty(salPerformanceMonthly)) { if (ObjectUtil.isEmpty(salPerformanceMonthly)) {
return result; return result;
} }
...@@ -151,14 +155,15 @@ public class PerfRuleRemoteService { ...@@ -151,14 +155,15 @@ public class PerfRuleRemoteService {
return result; return result;
} }
/** /**
* 定时任务-绩效配置设置 * 定时任务-绩效配置设置
*/ */
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class)
public void perfRuleSettingJob() { public void perfRuleSettingJob(String monthDate) {
// 查询是否存在 待生效且生效时间等于上个月的配置 // 查询是否存在 待生效且生效时间等于上个月的配置
// 上个月 // 上个月
DateTime lastMonthDate = DateUtil.offsetMonth(new Date(), -1); DateTime lastMonthDate = StrUtil.isNotBlank(monthDate) ? DateUtil.parse(monthDate) : DateUtil.offsetMonth(new Date(), -1);
String lastMonth = DateUtil.format(lastMonthDate, DatePattern.NORM_MONTH_PATTERN); String lastMonth = DateUtil.format(lastMonthDate, DatePattern.NORM_MONTH_PATTERN);
String queryLastMonthPendingCondition = "(DATE_FORMAT(effective_month, '%Y-%m') = '{}')"; String queryLastMonthPendingCondition = "(DATE_FORMAT(effective_month, '%Y-%m') = '{}')";
queryLastMonthPendingCondition = StrUtil.format(queryLastMonthPendingCondition, lastMonth); queryLastMonthPendingCondition = StrUtil.format(queryLastMonthPendingCondition, lastMonth);
...@@ -229,4 +234,5 @@ public class PerfRuleRemoteService { ...@@ -229,4 +234,5 @@ public class PerfRuleRemoteService {
} }
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.service.perfSalary; package cn.com.glsx.dj.staff.service.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.*;
import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceEvaluationMapper; import cn.com.glsx.dj.staff.mapper.perfSalary.PerformanceEvaluationMapper;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
@Slf4j @Slf4j
...@@ -23,4 +28,88 @@ public class PerformanceEvaluationService { ...@@ -23,4 +28,88 @@ public class PerformanceEvaluationService {
} }
/**
* 绩效考核-统计卡片
*/
public PerfAppraisalStatisticsCardDTO perfAppraisalStatisticsCard(PerfRuleReqDTO perfRuleReqDTO) {
return performanceEvaluationMapper.perfAppraisalStatisticsCard(perfRuleReqDTO);
}
/**
* 绩效考核列表
*/
public List<AppraisalInfoDTO> perfAppraisalList(PerfRuleReqDTO perfRuleReqDTO) {
return performanceEvaluationMapper.perfAppraisalList(perfRuleReqDTO);
}
/**
* 自动检测规则结果
*/
public AutoPerformRuleResultDTO perfAppraisalAutoDetectResult(PerfRuleReqDTO perfRuleReqDTO) {
return performanceEvaluationMapper.perfAppraisalAutoDetectResult(perfRuleReqDTO);
}
/**
* 绩效考核详情
*/
public PerfAppraisalDetailDTO perfAppraisalDetail(PerfRuleReqDTO perfRuleReqDTO) {
List<PerfAppraisalDetailDTO> perfAppraisalDetailDTOS = performanceEvaluationMapper.perfAppraisalDetail(perfRuleReqDTO);
if (perfAppraisalDetailDTOS.size() > 1) {
throw new RpcServiceException("该员工该月绩效评分数据存在多条");
}
log.info("perfAppraisalDetailDTOS: {}", perfAppraisalDetailDTOS);
return CollUtil.getFirst(perfAppraisalDetailDTOS);
}
/**
* 批量查询绩效详情
*/
public List<PerfAppraisalDetailDTO> perfAppraisalBatchDetail(PerfRuleReqDTO perfRuleReqDTO) {
return performanceEvaluationMapper.perfAppraisalDetail(perfRuleReqDTO);
}
/**
* 员工列表(过滤提交过2次的员工)-(按照评分月份,区域经理手机号筛选)
*/
public List<AppraisalInfoDTO> perfStaffList(PerfRuleReqDTO perfRuleReqDTO) {
return performanceEvaluationMapper.perfStaffList(perfRuleReqDTO);
}
/**
* 绩效考核-提交-单个处理
*/
public Boolean perfAppraisalSingleSubmit(PerfAppraisalSubmitReqDTO perfAppraisalSubmitReqDTO) {
// 校验
PerfRuleReqDTO perfRuleReqDTO = new PerfRuleReqDTO();
perfRuleReqDTO.setMobilePhone(perfAppraisalSubmitReqDTO.getMobilePhone());
perfRuleReqDTO.setQueryMonth(perfAppraisalSubmitReqDTO.getEvaluationMonth());
PerfAppraisalDetailDTO perfAppraisalDetailDTO = this.perfAppraisalDetail(perfRuleReqDTO);
if (ObjectUtil.isEmpty(perfAppraisalDetailDTO) || ObjectUtil.isEmpty(perfAppraisalDetailDTO.getId())) {
throw new RpcServiceException("该员工该月绩效评分数据不存在");
}
if (perfAppraisalDetailDTO.getSubmitCount() >= 2) {
throw new RpcServiceException("该员工该月绩效评分数据已处理2次");
}
// 查询该月该经理下员工可分配绩效金额额度 当前totalExtraAmount大于0则不能提交 小于0时需要计算是否符合
BigDecimal totalExtraAmount = performanceEvaluationMapper.getTotalExtraAmount(perfRuleReqDTO);
Integer adoptType = perfAppraisalSubmitReqDTO.getAdoptType();
if (adoptType == 1) {
// 自动绩效判断 考勤计算后-合计工资 x (1 - basic_salary_ratio) x 评分系数' todz 检查一下
BigDecimal multiply = perfAppraisalDetailDTO.getAfterAttendanceTotalBasicSalary()
.multiply((BigDecimal.ONE.divide(perfAppraisalDetailDTO.getBasicSalaryRatio()))
.multiply(perfAppraisalDetailDTO.getAutoRewardCoefficient()));
// perfAppraisalDetailDTO.getAutoRewardCoefficient() * perfAppraisalDetailDTO.get()
} else {
// 手动绩效判断
}
return null;
}
/**
* 绩效考核-提交-批量处理
*/
public Boolean perfAppraisalBatchSubmit(PerfAppraisalBatchSubmitReqDTO perfAppraisalBatchSubmitReqDTO) {
return null;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,6 @@ import cn.com.glsx.dj.staff.dto.*; ...@@ -11,7 +11,6 @@ import cn.com.glsx.dj.staff.dto.*;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO; import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import cn.com.glsx.dj.staff.enums.AssessmentFactorEnum; import cn.com.glsx.dj.staff.enums.AssessmentFactorEnum;
import cn.com.glsx.dj.staff.mapper.StaffPerformanceCalMapper; import cn.com.glsx.dj.staff.mapper.StaffPerformanceCalMapper;
import cn.com.glsx.dj.staff.service.perfSalary.EffectiveReferralReviewService;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum; import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.core.util.RpcAssert; import cn.com.glsx.framework.core.util.RpcAssert;
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
WHERE WHERE
superior_leader_mobile_phone = #{regionManagerMobilePhone} superior_leader_mobile_phone = #{regionManagerMobilePhone}
<if test="attendanceMonth != null and attendanceMonth != ''"> <if test="attendanceMonth != null and attendanceMonth != ''">
AND DATE_FORMAT(attendance_month, '%Y-%m') = #{attendanceMonth} AND attendance_month = #{attendanceMonth}
</if> </if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
AND name LIKE CONCAT('%', #{name}, '%') AND name LIKE CONCAT('%', #{name}, '%')
...@@ -122,6 +122,6 @@ ...@@ -122,6 +122,6 @@
and sbbi.deleted_flag = 'N' and sbbi.deleted_flag = 'N'
where sas.deleted_flag = 'N' where sas.deleted_flag = 'N'
and sas.mobile_phone = #{mobilePhone} and sas.mobile_phone = #{mobilePhone}
and DATE_FORMAT(sas.attendance_month, '%Y-%m') = #{attendanceMonth} and sas.attendance_month = #{attendanceMonth}
</select> </select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -34,6 +34,11 @@ ...@@ -34,6 +34,11 @@
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO" extends="BaseResultMap"> <resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO" extends="BaseResultMap">
</resultMap> </resultMap>
<resultMap id="CommonDTOResultMap" type="cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO" extends="BaseResultMap">
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
<result column="submit_status" jdbcType="INTEGER" property="submitStatus"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, merchant_id, total_delivery_count, area_effective_count, id, merchant_id, total_delivery_count, area_effective_count,
reviewed_effective_count, review_month, image_urls, remark, reviewed_effective_count, review_month, image_urls, remark,
...@@ -65,5 +70,53 @@ ...@@ -65,5 +70,53 @@
LIMIT LIMIT
1 1
</select> </select>
<select id="selectStoreList" resultMap="CommonDTOResultMap">
SELECT
serr.merchant_id,
MIN(dclsm.merchant_name) AS merchant_name,
serr.review_month,
CASE
WHEN MAX(CASE WHEN serr.status IN (0, 1) THEN 1 ELSE 0 END) = 1
THEN 0
ELSE 1
END AS submit_status
FROM sal_effective_referral_review serr
LEFT JOIN dj_car_life_service_merchant dclsm ON serr.merchant_id = dclsm.merchant_id
AND dclsm.deleted_flag = 'N'
WHERE serr.deleted_flag = 'N'
and serr.merchant_id in
<foreach collection="merchantIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="merchantName != null and merchantName != ''">
AND dclsm.merchant_name LIKE CONCAT('%', #{merchantName}, '%')
</if>
<if test="createdDate != null and createdDate != ''">
AND DATE_FORMAT(serr.created_date, '%Y-%m') = #{createdDate}
</if>
GROUP BY serr.merchant_id
<if test="submitStatus != null">
HAVING
CASE
WHEN MAX(CASE WHEN serr.status IN (0, 1) THEN 1 ELSE 0 END) = 1
THEN 0
ELSE 1
END = #{submitStatus}
</if>
ORDER BY
CONVERT(MIN(dclsm.merchant_name) USING gbk) DESC
</select>
<select id="selectStoreEffectiveReferralList" resultMap="CommonDTOResultMap">
SELECT
serr.*,
dclsm.merchant_name
FROM sal_effective_referral_review serr
LEFT JOIN dj_car_life_service_merchant dclsm ON serr.merchant_id = dclsm.merchant_id
AND dclsm.deleted_flag = 'N'
WHERE serr.deleted_flag = 'N'
AND serr.merchant_id = #{merchantId}
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
auto_perform_rule_id AS autoPerformRuleId, auto_perform_rule_id AS autoPerformRuleId,
performance_level_uuid AS performanceLevelUuid performance_level_uuid AS performanceLevelUuid
FROM sal_performance_monthly FROM sal_performance_monthly
WHERE Date(month_date) = #{monthDate} WHERE month_date = #{monthDate}
</select> </select>
......
...@@ -3,5 +3,120 @@ ...@@ -3,5 +3,120 @@
<mapper namespace="cn.com.glsx.dj.staff.mapper.StaffSalaryAppealApplyRecordMapper"> <mapper namespace="cn.com.glsx.dj.staff.mapper.StaffSalaryAppealApplyRecordMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.StaffSalaryAppealApplyRecord">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="staff_name" property="staffName" jdbcType="VARCHAR" />
<result column="staff_phone" property="staffPhone" jdbcType="VARCHAR" />
<result column="appeal_type" property="appealType" jdbcType="TINYINT" />
<result column="deal_status" property="dealStatus" jdbcType="TINYINT" />
<result column="appeal_month" property="appealMonth" jdbcType="CHAR" />
<result column="scene_type" property="sceneType" jdbcType="TINYINT" />
<result column="merchant_id" property="merchantId" jdbcType="INTEGER" />
<result column="actual_attendance_days" property="actualAttendanceDays" jdbcType="DECIMAL" />
<result column="apply_actual_attendance_days" property="applyActualAttendanceDays" jdbcType="DECIMAL" />
<result column="confirm_actual_attendance_days" property="confirmActualAttendanceDays" jdbcType="DECIMAL" />
<result column="pad_record_num" property="padRecordNum" jdbcType="INTEGER" />
<result column="apply_pad_record_num" property="applyPadRecordNum" jdbcType="INTEGER" />
<result column="confirm_pad_record_num" property="confirmPadRecordNum" jdbcType="INTEGER" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="direct_leader_name" property="directLeaderName" jdbcType="VARCHAR" />
<result column="direct_leader_phone" property="directLeaderPhone" jdbcType="VARCHAR" />
<result column="reply_phone" property="replyPhone" jdbcType="VARCHAR" />
<result column="reply_name" property="replyName" jdbcType="VARCHAR" />
<result column="reply_content" property="replyContent" jdbcType="VARCHAR" />
<result column="reply_date" property="replyDate" jdbcType="TIMESTAMP" />
<result column="other_abnormal_message" property="otherAbnormalMessage" jdbcType="VARCHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.StaffSalaryAppealApplyRecordDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List">
id, staff_name, staff_phone, appeal_type, deal_status, appeal_month, scene_type, merchant_id,
actual_attendance_days, apply_actual_attendance_days, confirm_actual_attendance_days,
pad_record_num, apply_pad_record_num, confirm_pad_record_num, remark,
direct_leader_name, direct_leader_phone, reply_phone, reply_name, reply_content, reply_date,
other_abnormal_message, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<select id="pageList" resultMap="DTOResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM dj_car_life_staff_salary_appeal_apply_record
WHERE deleted_flag = 'N'
<if test="staffName != null and staffName != ''">
AND staff_name LIKE CONCAT('%', #{staffName}, '%')
</if>
<if test="applyStartTime != null and applyStartTime != ''">
AND created_date &gt;= #{applyStartTime}
</if>
<if test="applyEndTime != null and applyEndTime != ''">
AND created_date &lt;= #{applyEndTime}
</if>
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> </mapper>
\ No newline at end of file \ 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!