Commit 746b4a1d by 叶立庆

Merge branch 'v5.6.0' of http://192.168.3.233:8090/dj/rpc-staff into v5.6.0

# Conflicts:
#	rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/config/dubbo/SmartCarLifeDubboConfig.java
#	rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/StaffPerformanceCalService.java
#	rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/util/HttpRequestUtils.java
2 parents 4f968fc5 2e4c58cc
Showing 82 changed files with 1588 additions and 211 deletions
......@@ -22,6 +22,11 @@
<artifactId>hutool-all</artifactId>
<version>5.8.38</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-smartcarlife-api</artifactId>
<version>5.6.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
......
......@@ -24,7 +24,7 @@ public class AssessmentFactorDailyDataDTO implements Serializable {
/**
* 该门店的该个人实际售前触客数
*/
private Integer storePreSalesTouchCount;
private Integer storePersonalPreSalesTouchCount;
/**
* 门店总触客数(该门店的所有个人实际售前触客数之和)
......
......@@ -46,4 +46,19 @@ public class AssessmentFactorOrderDataDTO implements Serializable {
* 主订单成交数(门店+业务+品牌)
*/
private Integer mainOrderCountByBrand;
/**
* 主订单成交数(门店+业务+品牌+品类)
*/
private Integer mainOrderCountByBrandAndCategory;
/**
* 子订单成交数(门店+业务+品牌+品类)
*/
private Integer subOrderCountByBrandAndCategory;
/**
* 品类订单产值合计(门店+业务+品牌+品类)
*/
private BigDecimal categoryOrderOutputTotalByBrandAndCategory;
}
package cn.com.glsx.dj.staff.dto;
import cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineDTO;
import cn.com.glsx.dj.staff.model.PerformanceParamConfigCondition;
import lombok.Data;
import lombok.ToString;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;
@SuperBuilder
@ToString(callSuper = true)
@Data
public class PerformanceParamConfigConditionDTO extends PerformanceParamConfigCondition {
private MerchantPerformanceProductDefineDTO productDefine;
@ApiModelProperty(notes = "提成方案置ID")
private Integer performanceConfigId;
}
package cn.com.glsx.dj.staff.dto;
import java.util.List;
import cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineDTO;
import cn.com.glsx.dj.staff.model.PerformanceParamConfig;
import lombok.AllArgsConstructor;
import lombok.Data;
......@@ -9,6 +8,8 @@ import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.util.List;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
......@@ -17,5 +18,7 @@ import lombok.experimental.SuperBuilder;
public class PerformanceParamConfigDTO extends PerformanceParamConfig {
private static final long serialVersionUID = 5606800131085599586L;
private MerchantPerformanceProductDefineDTO productDefine;
private List<PerformanceParamConfigConditionDTO> performanceParamConfigConditions;
}
......@@ -44,6 +44,26 @@ public class StaffPerformanceCalContextDTO implements Serializable {
private Map<String, List<StaffPerformanceSubOrderDTO>> groupedOrdersMap;
/**
* 商户ID
*/
private Integer merchantId;
/**
* 业务类型
*/
private Byte businessType;
/**
* 品牌ID
*/
private Integer brandId;
/**
* 子品牌ID
*/
private Integer childBrandId;
/**
* 当前计算的门店提成方案
*/
private PerformanceConfigDTO performanceConfig;
......
......@@ -7,10 +7,11 @@ import lombok.experimental.SuperBuilder;
/**
* 员工绩效计算结果DTO
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Data
public class StaffPerformanceDTO extends StaffPerformance {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = -6357597727215841459L;
}
......@@ -54,11 +54,21 @@ public class StaffPerformanceSubOrderDTO implements Serializable {
private Integer brandId;
/**
* 品牌ID名称
*/
private String brandName;
/**
* 子品牌ID
*/
private Integer childBrandId;
/**
* 子品牌ID名称
*/
private String childBrandName;
/**
* 升级商品ID
*/
private Integer upgradeGoodsId;
......
package cn.com.glsx.dj.staff.dto.perfSalary;
import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
/**
* 有效引荐数表
*/
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
@EqualsAndHashCode(callSuper = true)
public class EffectiveReferralReviewDTO extends EffectiveReferralReview {
private static final long serialVersionUID = 1L;
......
......@@ -5,6 +5,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.io.Serializable;
......@@ -12,6 +13,7 @@ import java.io.Serializable;
@AllArgsConstructor
@NoArgsConstructor
@ToString
@SuperBuilder
public class PerformanceApproveConfigDTO implements Serializable {
private static final long serialVersionUID = 1L;
......
package cn.com.glsx.dj.staff.dto.performance;
import cn.com.glsx.dj.staff.model.PerformanceConfigApprove;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import lombok.*;
import lombok.experimental.SuperBuilder;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class PerformanceConfigApproveDTO implements Serializable {
@SuperBuilder
public class PerformanceConfigApproveDTO extends PerformanceConfigApprove {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "主键ID")
private Integer id;
@ApiModelProperty(notes = "提成方案配置ID(dj_car_life_performance_config.id)")
private Integer performanceConfigId;
@ApiModelProperty(notes = "审批说明")
private String approveRemark;
@ApiModelProperty(notes = "审批附件urls,多个用英文逗号分隔")
private String approveAttachments;
@ApiModelProperty(notes = "附图urls,多个用英文逗号分隔")
private String attachmentImgs;
@ApiModelProperty(notes = "提交人用户名")
private String submitUsername;
@ApiModelProperty(notes = "审批状态(1:审批中;2:已通过;3:已驳回)")
private Integer approveStatus;
@ApiModelProperty(notes = "门店名称, 多个用英文逗号分隔")
private String merchantNames;
@ApiModelProperty(notes = "名称, 多个用英文逗号分隔")
private String brandsNames;
@ApiModelProperty(notes = "手机号码")
private String mobile;
}
\ No newline at end of file
......@@ -2,10 +2,22 @@ package cn.com.glsx.dj.staff.dto.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PerformanceConfigApproveDetailDTO {
@ApiModelProperty(notes = "主键ID")
private Integer id;
@ApiModelProperty(notes = "方案id")
private Integer performanceConfigId;
@ApiModelProperty(notes = "方案名称")
private String schemeName;
......
......@@ -10,7 +10,7 @@ import java.util.Date;
public class PerformanceConfigApprovePageDTO {
@ApiModelProperty(notes = "主键ID")
private Long performanceConfigApproveId;
private Integer id;
@ApiModelProperty(notes = "方案名称")
private String schemeName;
......@@ -24,10 +24,10 @@ public class PerformanceConfigApprovePageDTO {
@ApiModelProperty(notes = "状态(0.草稿,1.审批中,2.生效,3.未生效)")
private Integer status;
@ApiModelProperty(notes = "门店名称")
@ApiModelProperty(notes = "门店名称,多个按照逗号分隔")
private String merchantNames;
@ApiModelProperty(notes = "品牌名称")
@ApiModelProperty(notes = "品牌名称,多个按照逗号分隔")
private String brandsNames;
@ApiModelProperty(notes = "提交时间")
......
......@@ -6,6 +6,33 @@ import lombok.Data;
@Data
public class PerformanceConfigApprovePermissionDTO {
@ApiModelProperty(notes = "状态(1:查阅人;2:审批人)")
@ApiModelProperty(notes = "主键ID")
private Integer id;
@ApiModelProperty(notes = "提成方案配置ID(dj_car_life_performance_config.id)")
private Integer performanceConfigId;
@ApiModelProperty(notes = "审批说明")
private String approveRemark;
@ApiModelProperty(notes = "审批附件urls,多个用英文逗号分隔")
private String approveAttachments;
@ApiModelProperty(notes = "附图urls,多个用英文逗号分隔")
private String attachmentImgs;
@ApiModelProperty(notes = "提交人用户名")
private String submitUsername;
@ApiModelProperty(notes = "审批状态(1:审批中;2:已通过;3:已驳回)")
private Integer approveStatus;
@ApiModelProperty(notes = "门店名称, 多个用英文逗号分隔")
private String merchantNames;
@ApiModelProperty(notes = "名称, 多个用英文逗号分隔")
private String brandsNames;
@ApiModelProperty(notes = "0:无权限 1:查阅人;2:审批人")
private String approvePermission;
}
......@@ -4,10 +4,7 @@ import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.*;
import java.io.Serializable;
import java.util.List;
......@@ -16,6 +13,7 @@ import java.util.List;
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
public class PerformanceConfigDetailDTO implements Serializable {
@ApiModelProperty(notes = "主键ID")
......@@ -30,9 +28,6 @@ public class PerformanceConfigDetailDTO implements Serializable {
@ApiModelProperty(notes = "业务类型(0:轻改,1:权益;2:延保)")
private Byte businessType;
@ApiModelProperty(notes = "规则选项配置json")
private String ruleOptionsConfig;
@ApiModelProperty(notes = "生效月份(格式:yyyy-MM)")
private String effectiveMonth;
......
package cn.com.glsx.dj.staff.dto.performance;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
import cn.com.glsx.dj.staff.model.PerformanceTimeCycle;
import lombok.*;
import lombok.experimental.SuperBuilder;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class PerformanceTimeCycleDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "主键ID")
private Long id;
@ApiModelProperty(notes = "周期名称")
private String cycleName;
@ApiModelProperty(notes = "周期基本事项")
private String cycleItem;
@ApiModelProperty(notes = "周期开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startDate;
@ApiModelProperty(notes = "周期结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endDate;
@ApiModelProperty(notes = "是否启用(N:否,Y:是)")
private String enableFlag;
@ApiModelProperty(notes = "创建人")
private String createdBy;
@ApiModelProperty(notes = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdDate;
@ApiModelProperty(notes = "修改人")
private String updatedBy;
@ApiModelProperty(notes = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedDate;
@ApiModelProperty(notes = "删除标识(D:已删除;N:未删除)")
private String deletedFlag;
@SuperBuilder
public class PerformanceTimeCycleDTO extends PerformanceTimeCycle {
}
\ No newline at end of file
package cn.com.glsx.dj.staff.dto.performance;
import cn.com.glsx.dj.staff.dto.StaffPerformanceDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class StaffPerformanceGetDTO {
@ApiModelProperty(name = "staffPerformanceList", notes = "工资提成列表获取")
private List<StaffPerformanceDTO> staffPerformanceList;
}
package cn.com.glsx.dj.staff.enums;
/**
* 考核因子枚举
*/
public enum AssessmentFactorEnum implements BaseEnum<Integer, String> {
PERSONAL_MONTHLY_TOTAL_OUTPUT_VALUE(1, "个人月度总产值"),
PERSONAL_MONTHLY_SINGLE_STORE_OUTPUT_VALUE(2, "个人月度单店产值"),
PERSONAL_CUSTOMER_PENETRATION_RATE(3, "个人客户渗透率"),
PERSONAL_SINGLE_PRODUCT_PENETRATION_RATE(4, "个人单品渗透率"),
HIGH_CUSTOMER_UNIT_PRICE(5, "高客单价"),
TOTAL_CUSTOMER_CONTACT_UNIT_PRICE(6, "总触客客单价(适用园区店)"),
CUSTOMER_CONTACT_UNIT_PRICE(7, "触客客单价"),
UPGRADE_UNIT_PRICE(8, "升级客单价"),
DELIVERY_UNIT_PRICE(9, "交车客单价"),
STORE_CUSTOMER_CONTACT_RATE_DELIVERY(10, "门店触客率(交车)"),
STORE_CUSTOMER_CONTACT_RATE_EFFECTIVE_REFERRAL(11, "门店触客率(有效引荐)"),
UPGRADE_ORDER_QUANTITY(12, "升级订单数");
private final Integer code;
private final String desc;
AssessmentFactorEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
@Override
public Integer getCode() {
return code;
}
@Override
public String getDesc() {
return desc;
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.enums;
/**
* 提成基数枚举
*/
public enum CommissionBaseEnum implements BaseEnum<Integer, String> {
GMV(1, "GMV产值"),
SJDDS(2, "升级订单数"),
DDTC(3, "单店提成");
private final Integer code;
private final String desc;
CommissionBaseEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
@Override
public Integer getCode() {
return code;
}
@Override
public String getDesc() {
return desc;
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.enums;
/**
* 提成方式枚举
*/
public enum CommissionMethodEnum implements BaseEnum<Integer, String> {
BL(1, "比例"),
XS(2, "系数"),
GDJE(3, "固定金额");
private final Integer code;
private final String desc;
CommissionMethodEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
@Override
public Integer getCode() {
return code;
}
@Override
public String getDesc() {
return desc;
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.enums;
/**
* 商品配置类型枚举
*/
public enum ProductConfigTypeEnum implements BaseEnum<Integer, String> {
PRODUCT_CATEGORY(0, "商品分类"),
DESIGNATED_PRODUCT(1, "圈定产品"),
DESIGNATED_PACKAGE(2, "圈定套餐");
private final Integer code;
private final String desc;
ProductConfigTypeEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
@Override
public Integer getCode() {
return code;
}
@Override
public String getDesc() {
return desc;
}
}
\ No newline at end of file
......@@ -31,7 +31,7 @@ public class PerformanceConfig implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(notes = "主键ID")
private Long id;
private Integer id;
@ApiModelProperty(notes = "方案名称")
@Column(name = "scheme_name")
......@@ -51,7 +51,7 @@ public class PerformanceConfig implements Serializable {
@ApiModelProperty(notes = "业务类型(0:轻改,1:权益;2:延保)")
@Column(name = "business_type")
private Integer businessType;
private Byte businessType;
@ApiModelProperty(notes = "状态(0.草稿,1.审批中,2.生效,3.未生效)")
@Column(name = "status")
......
......@@ -40,7 +40,7 @@ public class PerformanceParamConfig implements Serializable {
@ApiModelProperty(notes = "考核因子")
@Column(name = "assessment_factor")
private String assessmentFactor;
private Byte assessmentFactor;
@ApiModelProperty(notes = "考核因子区间开始值")
@Column(name = "start_value")
......@@ -60,7 +60,7 @@ public class PerformanceParamConfig implements Serializable {
@ApiModelProperty(notes = "商品配置类型(-1:全部商品,0:商品分类,1:圈定产品,2圈定套餐)")
@Column(name = "goods_config_type")
private Integer goodsConfigType;
private Byte goodsConfigType;
@ApiModelProperty(notes = "商品分类(一级)")
@Column(name = "goods_type")
......
......@@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
......@@ -16,11 +15,10 @@ import java.util.Date;
/**
* 员工提成
*/
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@SuperBuilder
@Data
@Table(name = "dj_car_life_staff_performance")
public class StaffPerformance implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -48,7 +46,7 @@ public class StaffPerformance implements Serializable {
@ApiModelProperty(notes = "业务类型(0:轻改,1:权益;2:延保)")
@Column(name = "business_type")
private Integer businessType;
private Byte businessType;
@ApiModelProperty(notes = "主品牌id")
@Column(name = "brand_id")
......
......@@ -41,6 +41,8 @@ public class AutoPerformRule implements Serializable {
@Column(name = "month_onboard_output_threshold")
private Integer monthOnboardOutputThreshold;
/**
* 当月入职新员工-触发规则后的等级编码
*/
......@@ -63,6 +65,7 @@ public class AutoPerformRule implements Serializable {
private BigDecimal monthOnboardTriggerRewardCoefficient;
/**
* 当月入职新员工-规则外的默认等级编码
*/
......@@ -84,6 +87,8 @@ public class AutoPerformRule implements Serializable {
@Column(name = "month_onboard_default_reward_coefficient")
private BigDecimal monthOnboardDefaultRewardCoefficient;
/**
* 非月入职员工-产值阈值(5000-20000)<此值
*/
......@@ -91,6 +96,8 @@ public class AutoPerformRule implements Serializable {
@Column(name = "no_month_onboard_output_threshold")
private Integer noMonthOnboardOutputThreshold;
/**
* 非月入职员工-触发规则后的等级编码
*/
......@@ -98,7 +105,6 @@ public class AutoPerformRule implements Serializable {
@Column(name = "no_month_onboard_trigger_level_code")
private String noMonthOnboardTriggerLevelCode;
/**
* 非月入职员工-触发规则后的等级编码-分数范围
*/
......@@ -113,6 +119,8 @@ public class AutoPerformRule implements Serializable {
@Column(name = "no_month_onboard_trigger_reward_coefficient")
private BigDecimal noMonthOnboardTriggerRewardCoefficient;
/**
* 非月入职员工-规则外的默认等级编码
*/
......@@ -134,6 +142,8 @@ public class AutoPerformRule implements Serializable {
@Column(name = "no_month_onboard_default_reward_coefficient")
private BigDecimal noMonthOnboardDefaultRewardCoefficient;
/**
* 生效月份(yyyy-mm格式)
*/
......
......@@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
import java.io.Serializable;
......@@ -17,6 +18,7 @@ import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Accessors(chain = true)
@Table(name = "sal_effective_referral_review")
public class EffectiveReferralReview implements Serializable {
......@@ -101,7 +103,7 @@ public class EffectiveReferralReview implements Serializable {
*/
@ApiModelProperty(notes = "业务场景:1-精品升级(轻改);2-会员权益(广联权益);3-单延保;")
@Column(name = "scene_type")
private Integer sceneType;
private Byte sceneType;
/**
* 是否需要总部复核:1-需要
......
......@@ -45,9 +45,8 @@ public class PerformanceEvaluation implements Serializable {
* 评分月份(yyyy-mm)
*/
@ApiModelProperty(notes = "评分月份(yyyy-mm)")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "evaluation_month")
private Date evaluationMonth;
private String evaluationMonth;
/**
* 绩效等级-系统自动设置
......@@ -57,18 +56,19 @@ public class PerformanceEvaluation implements Serializable {
private String autoGradeCode;
/**
* 分数范围-系统自动设置
*/
@ApiModelProperty(notes = "分数范围-系统自动设置")
@Column(name = "auto_score_symbol_value")
private String autoScoreSymbolValue;
/**
* 奖励系数-系统自动设置
*/
@ApiModelProperty(notes = "奖励系数-系统自动设置")
@Column(name = "auto_reward_coefficient")
private BigDecimal autoRewardCoefficient;
/**
* 分数范围-系统自动设置
*/
@ApiModelProperty(notes = "分数范围-系统自动设置")
@Column(name = "auto_score_symbol_value")
private String autoScoreSymbolValue;
/**
* 绩效等级-手动设置
......@@ -106,36 +106,67 @@ public class PerformanceEvaluation implements Serializable {
private Integer isAutoPerformance;
/**
* 绩效工资
*/
@ApiModelProperty(notes = "绩效工资")
@Column(name = "performance_salary")
private BigDecimal performanceSalary;
/**
* 转正前底薪
* 转正前工资
*/
@ApiModelProperty(notes = "转正前底薪")
@ApiModelProperty(notes = "转正前工资")
@Column(name = "before_correction_basic_salary")
private BigDecimal beforeCorrectionBasicSalary;
/**
* 转正后底薪
* 转正后工资
*/
@ApiModelProperty(notes = "转正后底薪")
@ApiModelProperty(notes = "转正后工资")
@Column(name = "after_correction_basic_salary")
private BigDecimal afterCorrectionBasicSalary;
/**
* 考勤计算后底薪
* 底薪占工资占比 默认0.7
*/
@ApiModelProperty(notes = "底薪占工资占比 默认0.7")
@Column(name = "basic_salary_ratio")
private BigDecimal basicSalaryRatio;
/**
* 考勤计算后-试用期阶段工资
*/
@ApiModelProperty(notes = "考勤计算后底薪")
@Column(name = "after_attendance_basic_salary")
private BigDecimal afterAttendanceBasicSalary;
@ApiModelProperty(notes = "考勤计算后-试用期阶段工资")
@Column(name = "after_attendance_probation_basic_salary")
private BigDecimal afterAttendanceProbationBasicSalary;
/**
* 基本工资(底薪+绩效工资)
* 考勤计算后-转正后阶段工资
*/
@ApiModelProperty(notes = "考勤计算后-转正后阶段工资")
@Column(name = "after_attendance_regular_basic_salary")
private BigDecimal afterAttendanceRegularBasicSalary;
/**
* 考勤计算后-合计工资
*/
@ApiModelProperty(notes = "考勤计算后-合计工资")
@Column(name = "after_attendance_total_basic_salary")
private BigDecimal afterAttendanceTotalBasicSalary;
/**
* 底薪 = 考勤计算后-合计工资 x basic_salary_ratio
*/
@ApiModelProperty(notes = "底薪")
@Column(name = "base_salary")
private BigDecimal baseSalary;
/**
* 绩效工资 = 考勤计算后-合计工资 x (1 - basic_salary_ratio) x 评分系数
*/
@ApiModelProperty(notes = "绩效工资")
@Column(name = "performance_salary")
private BigDecimal performanceSalary;
/**
* 基本工资 = (底薪 + 绩效工资)
*/
@ApiModelProperty(notes = "基本工资(底薪+绩效工资)")
@Column(name = "basic_salary")
......@@ -159,17 +190,22 @@ public class PerformanceEvaluation implements Serializable {
* 入职日期
*/
@ApiModelProperty(notes = "入职日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "entry_date")
private Date entryDate;
private String entryDate;
/**
* 转正日期
*/
@ApiModelProperty(notes = "转正日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "correction_date")
private Date correctionDate;
private String correctionDate;
/**
* 离职日期
*/
@ApiModelProperty(notes = "离职日期")
@Column(name = "leave_date")
private String leaveDate;
/**
* 是否该月入职:1-是,0-否
......@@ -179,9 +215,9 @@ public class PerformanceEvaluation implements Serializable {
private Integer isEntry;
/**
* 是否试用期:1-是,0-否
* 该月是否试用期:1-是,0-否
*/
@ApiModelProperty(notes = "是否试用期:1-是,0-否")
@ApiModelProperty(notes = "该月是否试用期:1-是,0-否")
@Column(name = "is_probation")
private Integer isProbation;
......@@ -192,19 +228,13 @@ public class PerformanceEvaluation implements Serializable {
@Column(name = "is_correction")
private Integer isCorrection;
/**
* 该月是否离职 1-是,0-否
*/
@ApiModelProperty(notes = "该月是否离职 1-是,0-否")
@Column(name = "is_leaving")
private Integer isLeaving;
/**
* 门店名称
*/
@ApiModelProperty(notes = "门店名称")
@Column(name = "merchant_name")
private Integer merchantName;
private String merchantName;
/**
......
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import java.util.List;
@ApiService(value = "提成方案审批人配置", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceApproveConfigRemote {
List<PerformanceApproveConfigDTO> selectAll();
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.framework.core.annotation.ApiService;
@ApiService(value = "提成方案审批操作记录", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigApproveOperationRecordRemote {
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ApiService(value = "提成方案审批主表", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigApproveRemote {
@ApiMethod("提成方案审批列表")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("提成方案审批分页")
RpcResponse<RpcPagination<PerformanceConfigApprovePageDTO>> performanceConfigApprovePage(RpcPagination<PerformanceConfigApprovePageDTO> pagination);
@ApiMethod("提成方案审批详情")
@ApiParam(name = "dto", notes = "查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("提成方案审批详情")
RpcResponse<PerformanceConfigApproveDetailDTO> performanceConfigApproveDetail(PerformanceConfigApproveDTO dto);
@ApiMethod("提成方案审批详情")
@ApiParam(name = "dto", notes = "查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("提成方案审批详情")
RpcResponse<PerformanceConfigApprovePermissionDTO> performanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto);
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import java.util.List;
@ApiService(value = "提成方案商户品牌关联", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigMerchantBrandRefRemote {
RpcResponse<Boolean> performanceConfigMerchantBrandRefAdd(List<PerformanceConfigMerchantBrandRefDTO> merchantBrandRefList);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import java.util.List;
@ApiService(value = "提成方案参数配置", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigParamConfigRemote {
RpcResponse<Boolean> performanceConfigParamConfigAdd(List<PerformanceParamConfigDTO> performanceParamConfigList);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO;
import cn.com.glsx.dj.staff.dto.performance.*;
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 = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigRemote {
@ApiMethod("提成方案新增")
@ApiParam(name = "dto", notes = "提成方案信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<Boolean> performanceConfigAdd(@NotNull PerformanceConfigDTO dto);
@ApiMethod("提成方案修改")
@ApiParam(name = "dto", notes = "提成方案信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<Boolean> performanceConfigUpdate(@NotNull PerformanceConfigDTO dto);
@ApiMethod("分页查询提成方案")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("招聘需求分页")
RpcResponse<RpcPagination<PerformanceConfigPageDTO>> performanceConfigPage(RpcPagination<PerformanceConfigPageDTO> pagination);
@ApiMethod("门店提成方案列表(以门店为维度)")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("招聘需求分页")
RpcResponse<RpcPagination<PerformanceConfigPageByMerchantDTO>> performanceConfigPageByMerchant(RpcPagination<PerformanceConfigPageByMerchantDTO> pagination);
@ApiMethod("通过名称查询提成方案")
@ApiParam(name = "dto", notes = "提成方案信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<PerformanceConfigDTO> selectByName(@NotNull PerformanceConfigDTO dto);
@ApiMethod("查询提成方案详情")
@ApiParam(name = "dto", notes = "提成方案信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<PerformanceConfigDetailDTO> performanceConfigDetail(PerformanceConfigDTO dto);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ApiService(value = "提成方案规则", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigRuleRemote {
RpcResponse<Boolean> performanceConfigRuleAdd(PerformanceConfigRuleDTO performanceConfigRule);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO;
import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import java.util.List;
@ApiService(value = "提成方案参数条件配置", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceParamConfigConditionRemote {
@ApiMethod("添加提成参数条件")
@ApiParam(name = "dto", notes = "dto", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("添加提成参数条件")
RpcResponse<Boolean> performanceParamConfigConditionAdd(List<PerformanceParamConfigConditionDTO> performanceParamConfigConditionDTOList);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.framework.core.annotation.*;
@ApiService(value = "提成系统周期", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceTimeCycleRemote {
@ApiMethod("当前工资提成系统周期管理")
@ApiParam(name = "dto", notes = "dto", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("当前工资提成系统周期")
PerformanceTimeCycleDTO getCurrPerformanceTimeCycle(PerformanceTimeCycleDTO dto);
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
* @Title:
* @Description:
* @Author xiehx
* @Date 2025/10/23
* @Date 2025/10/23 .
**/
@Configuration
public class BeanConfig {
......
package cn.com.glsx.dj.staff.config.dubbo;
import cn.com.glsx.dj.smartcarlife.remote.*;
import cn.com.glsx.dj.staff.config.DubboConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.com.glsx.dj.staff.config.DubboConfig;
@Configuration
public class SmartCarLifeDubboConfig extends DubboConfig {
......@@ -23,20 +22,24 @@ public class SmartCarLifeDubboConfig extends DubboConfig {
public StaffBaseInfoRemote staffBaseInfoRemote() {
return factory.builder(StaffBaseInfoRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
@Bean
public GoodsOrderRemote goodsOrderRemote() {
return factory.builder(GoodsOrderRemote.class).check(check).timeout(timeout).build();
return factory.builder(GoodsOrderRemote.class).check(check).timeout(timeout).build();
}
@Bean
public StaffBehaviorDeductMoneyRecordRemote staffBehaviorDeductMoneyRecordRemote() {
return factory.builder(StaffBehaviorDeductMoneyRecordRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
@Bean
public ShopMerchantDirectorConfigRemote shopMerchantDirectorConfigRemote(){
public ShopMerchantDirectorConfigRemote shopMerchantDirectorConfigRemote() {
return factory.builder(ShopMerchantDirectorConfigRemote.class).protocol("dubbo").check(check).version("1.0.0").timeout(timeout).build();
}
@Bean
public MerchantPerformanceProductDefineRemote merchantPerformanceProductDefineRemote() {
return factory.builder(MerchantPerformanceProductDefineRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
}
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.model.PerformanceApproveConfig;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface PerformanceApproveConfigMapper extends OreMapper<PerformanceApproveConfig> {
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.dj.staff.model.PerformanceConfigApprove;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface PerformanceConfigApproveMapper extends OreMapper<PerformanceConfigApprove> {
List<PerformanceConfigApprovePageDTO> listPerformanceConfig(PerformanceConfigApprovePageDTO condition);
PerformanceConfigApproveDetailDTO getPerformanceConfigApproveDetail(PerformanceConfigApproveDTO dto);
PerformanceConfigApprovePermissionDTO getPerformanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto);
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.model.PerformanceConfigApproveOperationRecord;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface PerformanceConfigApproveOperationRecordMapper extends OreMapper<PerformanceConfigApproveOperationRecord> {
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO;
import cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO;
import cn.com.glsx.dj.staff.model.PerformanceConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO;
import java.util.List;
@Mapper
public interface PerformanceConfigMapper extends OreMapper<PerformanceConfig> {
PerformanceConfigDTO selectEffectiveConfig(PerformanceConfigDTO dto);
PerformanceConfigDTO selectByName(PerformanceConfigDTO dto);
List<PerformanceConfigPageDTO> listPerformanceConfig(PerformanceConfigPageDTO dto);
PerformanceConfigDTO selectById(@Param("id") Integer id);
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.model.PerformanceConfigMerchantBrandRef;
import org.mapstruct.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface PerformanceConfigMerchantBrandRefMapper extends OreMapper<PerformanceConfigMerchantBrandRef> {
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO;
import cn.com.glsx.dj.staff.model.PerformanceParamConfigCondition;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface PerformanceParamConfigConditionMapper extends OreMapper<PerformanceParamConfigCondition> {
List<PerformanceParamConfigConditionDTO> listByParamConfigId(
PerformanceParamConfigConditionDTO dto);
void deleteByPerformanceConfigId(@Param("performanceConfigId") Integer performanceConfigId);
}
\ No newline at end of file
......@@ -10,4 +10,6 @@ import java.util.List;
@Mapper
public interface PerformanceParamConfigMapper extends OreMapper<PerformanceParamConfig> {
List<PerformanceParamConfigDTO> listByConfigId(PerformanceParamConfigDTO dto);
void deleteByPerformanceParamConfigId(Integer id);
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.dj.staff.model.PerformanceTimeCycle;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface PerformanceTimeCycleMapper extends OreMapper<PerformanceTimeCycle> {
PerformanceTimeCycleDTO selectCurrCycle();
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.StaffPerformanceDTO;
import cn.com.glsx.dj.staff.dto.StaffPerformanceDailyReportQueryDTO;
import cn.com.glsx.dj.staff.dto.StaffPerformanceOrderQueryDTO;
import cn.com.glsx.dj.staff.dto.StaffPerformanceSubOrderDTO;
import org.apache.ibatis.annotations.Mapper;
......@@ -21,4 +22,12 @@ public interface StaffPerformanceCalMapper extends OreMapper<StaffPerformanceDTO
* @return 订单列表
*/
List<StaffPerformanceSubOrderDTO> selectStaffOrders(StaffPerformanceOrderQueryDTO query);
/**
* 统计实际售前触客数
*
* @param query 查询参数
* @return 日报数据列表
*/
Integer statPreSalesTouchCount(StaffPerformanceDailyReportQueryDTO query);
}
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.StaffPerformanceDTO;
import cn.com.glsx.dj.staff.model.StaffPerformance;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface StaffPerformanceMapper extends OreMapper<StaffPerformance> {
List<StaffPerformanceDTO> listStaffPerformance(StaffPerformanceDTO dto);
}
\ No newline at end of file
package cn.com.glsx.dj.staff.mapper.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
......@@ -7,4 +8,11 @@ import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface EffectiveReferralReviewMapper extends OreMapper<EffectiveReferralReview> {
/**
* 根据条件查询单条有效引荐数记录
*
* @param query 查询条件
* @return 记录
*/
EffectiveReferralReviewDTO selectOneByQuery(EffectiveReferralReviewDTO query);
}
\ No newline at end of file
......@@ -2,9 +2,15 @@ package cn.com.glsx.dj.staff.mapper.perfSalary;
import cn.com.glsx.dj.staff.model.perfSalary.PerformanceEvaluation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface PerformanceEvaluationMapper extends OreMapper<PerformanceEvaluation> {
void insertOrUpdate(PerformanceEvaluation performanceEvaluation);
void insertOrUpdateBatch(@Param("list") List<PerformanceEvaluation> performanceEvaluationList);
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import java.util.Collections;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceApproveConfigRemoteImpl implements PerformanceApproveConfigRemote {
@Override
public List<PerformanceApproveConfigDTO> selectAll() {
return Collections.emptyList();
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigApproveOperationRecordRemoteImpl implements PerformanceConfigApproveOperationRecordRemote {
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceConfigApproveService;
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 org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigApproveRemoteImpl implements PerformanceConfigApproveRemote {
@Autowired
private PerformanceConfigApproveService performanceConfigApproveService;
@Override
public RpcResponse<RpcPagination<PerformanceConfigApprovePageDTO>> performanceConfigApprovePage(RpcPagination<PerformanceConfigApprovePageDTO> pagination) {
pagination = RpcPagination.copyPage(performanceConfigApproveService.pagePerformanceConfigApprove(pagination));
return RpcResponse.success(pagination);
}
@Override
public RpcResponse<PerformanceConfigApproveDetailDTO> performanceConfigApproveDetail(PerformanceConfigApproveDTO dto) {
return RpcResponse.success(performanceConfigApproveService.getPerformanceConfigApproveDetail(dto));
}
@Override
public RpcResponse<PerformanceConfigApprovePermissionDTO> performanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto) {
return RpcResponse.success(performanceConfigApproveService.getPerformanceConfigApproveDetailAndPermission(dto));
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigMerchantBrandRefRemoteImpl implements PerformanceConfigMerchantBrandRefRemote {
@Override
public RpcResponse<Boolean> performanceConfigMerchantBrandRefAdd(List<PerformanceConfigMerchantBrandRefDTO> merchantBrandRefList) {
return null;
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceConfigParamConfigService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
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 PerformanceConfigParamConfigRemoteImpl implements PerformanceConfigParamConfigRemote {
@Autowired
private PerformanceConfigParamConfigService performanceConfigParamConfigService;
@Override
public RpcResponse<Boolean> performanceConfigParamConfigAdd(List<PerformanceParamConfigDTO> performanceParamConfigList) {
performanceConfigParamConfigService.insertList(performanceParamConfigList);
return RpcResponse.success(true);
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceConfigService;
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 org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
@Autowired
private PerformanceConfigService performanceConfigService;
@Override
public RpcResponse<Boolean> performanceConfigAdd(PerformanceConfigDTO dto) {
return null;
}
@Override
public RpcResponse<Boolean> performanceConfigUpdate(PerformanceConfigDTO dto) {
return null;
}
@Override
public RpcResponse<RpcPagination<PerformanceConfigPageDTO>> performanceConfigPage(RpcPagination<PerformanceConfigPageDTO> pagination) {
pagination = RpcPagination.copyPage(performanceConfigService.pagePerformanceConfig(pagination));
return RpcResponse.success(pagination);
}
@Override
public RpcResponse<RpcPagination<PerformanceConfigPageByMerchantDTO>> performanceConfigPageByMerchant(RpcPagination<PerformanceConfigPageByMerchantDTO> pagination) {
return null;
}
@Override
public RpcResponse<PerformanceConfigDTO> selectByName(PerformanceConfigDTO dto) {
return RpcResponse.success(performanceConfigService.selectByName(dto));
}
@Override
public RpcResponse<PerformanceConfigDetailDTO> performanceConfigDetail(PerformanceConfigDTO dto) {
return RpcResponse.success(performanceConfigService.selectPerformanceConfigDetail(dto));
}
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigRuleRemoteImpl implements PerformanceConfigRuleRemote {
@Override
public RpcResponse<Boolean> performanceConfigRuleAdd(PerformanceConfigRuleDTO performanceConfigRule) {
return null;
}
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceParamConfigConditionService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
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 PerformanceParamConfigConditionRemoteImpl implements PerformanceParamConfigConditionRemote {
@Autowired
private PerformanceParamConfigConditionService performanceParamConfigConditionService;
@Override
public RpcResponse<Boolean> performanceParamConfigConditionAdd(List<PerformanceParamConfigConditionDTO> performanceParamConfigConditionDTOList) {
performanceParamConfigConditionService.insertList(performanceParamConfigConditionDTOList);
return RpcResponse.success(true);
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceTimeCycleService;
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 PerformanceTimeCycleRemoteImpl implements PerformanceTimeCycleRemote {
@Autowired
private PerformanceTimeCycleService performanceTimeCycleService;
@Override
public PerformanceTimeCycleDTO getCurrPerformanceTimeCycle(PerformanceTimeCycleDTO dto) {
return performanceTimeCycleService.selectCurrCycle();
}
}
\ No newline at end of file
......@@ -283,6 +283,13 @@ public class AttendanceDataCleansingService {
for (StaffQwClockClean clockInfo : staffQwClockCleans) {
try {
// 2. 处理每条考勤记录
// 判断该打卡日期是否在离职直接之后,如果在离职日期之后则不计算
if (StrUtil.isNotBlank(employee.getLastWorkDate())) {
if(DateUtil.compare(DateUtil.parse(clockInfo.getClockInDate(), "yyyy-MM-dd"), DateUtil.parse(employee.getLastWorkDate(), "yyyy-MM-dd")) > 0){
log.info("{} 打卡日期:{},离职日期:{} 打卡日期在离职日期之后,不处理", employee.getStaffName(), clockInfo.getClockInDate(), employee.getLastWorkDate());
continue;
}
}
ClockInResult result = processClockIn(clockInfo, lastMonthYMD, employee);
workHours = NumberUtil.add(workHours, result.getTotalWorkHours());
lateEarlyMinutes = NumberUtil.add(lateEarlyMinutes, result.getLateEarlyMinutes());
......@@ -739,7 +746,8 @@ public class AttendanceDataCleansingService {
String clockInDate = clockInfo.getClockInDate();
String officialDate = employee.getOfficialDate();
// yyyy-MM-dd 比较clockInDate officialDate 日期大小 该打卡日期是否转正后
boolean isAfterOfficialDate = StrUtil.isNotBlank(officialDate) && DateUtil.compare(DateUtil.parse(clockInDate, "yyyy-MM-dd"), DateUtil.parse(officialDate, "yyyy-MM-dd")) >= 0;
boolean isAfterOfficialDate = StrUtil.isNotBlank(officialDate)
&& DateUtil.compare(DateUtil.parse(clockInDate, "yyyy-MM-dd"), DateUtil.parse(officialDate, "yyyy-MM-dd")) >= 0;
BigDecimal totalWorkHours = BigDecimal.ZERO;
BigDecimal lateEarlyMinutes = BigDecimal.ZERO;
// todz
......@@ -785,6 +793,7 @@ public class AttendanceDataCleansingService {
}
}
// 4. 处理下班打卡
if (ObjectUtil.isNotEmpty(clockInfo.getClockOutTimeEnd())) {
// 判断经纬度是否在商户打卡地址100米范围内
......
......@@ -7,9 +7,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import javax.annotation.Resource;
@Slf4j
@Service
@Transactional(propagation = Propagation.SUPPORTS, rollbackFor = RpcServiceException.class)
......@@ -23,4 +23,14 @@ public class EffectiveReferralReviewService {
}
/**
* 根据条件查询单条有效引荐数记录
*
* @param query 查询参数
* @return 记录
*/
public EffectiveReferralReviewDTO queryEffectiveReferralReview(EffectiveReferralReviewDTO query) {
return effectiveReferralReviewMapper.selectOneByQuery(query);
}
}
\ No newline at end of file
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveMapper;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
public class PerformanceConfigApproveService {
@Autowired
private PerformanceConfigApproveMapper performanceConfigApproveMapper;
@Autowired
private PerformanceConfigMerchantBrandRefService performanceConfigMerchantBrandRefService;
public Page<PerformanceConfigApprovePageDTO> pagePerformanceConfigApprove(RpcPagination<PerformanceConfigApprovePageDTO> pagination) {
try{
Page<PerformanceConfigApprovePageDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(),pagination.isNeedCount());
performanceConfigApproveMapper.listPerformanceConfig(pagination.getCondition());
return page;
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
public PerformanceConfigApproveDetailDTO getPerformanceConfigApproveDetail(PerformanceConfigApproveDTO dto) {
PerformanceConfigApproveDetailDTO performanceConfigApproveDetail = performanceConfigApproveMapper.getPerformanceConfigApproveDetail(dto);
if (performanceConfigApproveDetail == null) {
return null;
}
List<PerformanceConfigMerchantBrandRefDTO> performanceConfigMerchantBrandRefDTOS = performanceConfigMerchantBrandRefService.listByConfigId(performanceConfigApproveDetail.getPerformanceConfigId());
performanceConfigApproveDetail.setMerchantBrandRefList(performanceConfigMerchantBrandRefDTOS);
return performanceConfigApproveDetail;
}
public PerformanceConfigApprovePermissionDTO getPerformanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto) {
return performanceConfigApproveMapper.getPerformanceConfigApproveDetailAndPermission(dto);
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceConfigMerchantBrandRefMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
*
* @time 2026-01-15 20:28
*/
@Slf4j
@Service
public class PerformanceConfigMerchantBrandRefService {
@Autowired
private PerformanceConfigMerchantBrandRefMapper performanceConfigMerchantBrandRefMapper;
public List<PerformanceConfigMerchantBrandRefDTO> listByConfigId(Integer id) {
return null;
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceParamConfigMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
public class PerformanceConfigParamConfigService {
@Autowired
private PerformanceParamConfigMapper performanceParamConfigMapper;
public void insertList(List<PerformanceParamConfigDTO> performanceParamConfigList) {
// 1 先删掉逻辑删除久的配置
performanceParamConfigMapper.deleteByPerformanceParamConfigId(performanceParamConfigList.get(0).getId());
// 2 插入新的配置
performanceParamConfigMapper.insertList(performanceParamConfigList);
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceConfigRuleMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
*
*
* @time 2026-01-15 20:27
*/
@Slf4j
@Service
public class PerformanceConfigRuleService {
@Autowired
private PerformanceConfigRuleMapper performanceConfigRuleMapper;
public PerformanceConfigRuleDTO listByConfigId(Integer id) {
return null;
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO;
import cn.com.glsx.dj.staff.dto.*;
import cn.com.glsx.dj.staff.dto.performance.PerformanceConfigDetailDTO;
import cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceConfigMapper;
import cn.com.glsx.dj.staff.model.PerformanceConfig;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import java.util.List;
/**
......@@ -22,6 +29,14 @@ public class PerformanceConfigService {
@Autowired
private PerformanceParamConfigService performanceParamConfigService;
@Autowired
private PerformanceConfigRuleService performanceConfigRuleService;
@Autowired
private PerformanceConfigMerchantBrandRefService performanceConfigMerchantBrandRefService;
/**
* 查找门店 业务场景 品牌生效的提成配置
*
......@@ -50,4 +65,49 @@ public class PerformanceConfigService {
// 3. 返回PerformanceConfigDTO
return result;
}
public PerformanceConfigDTO selectByName(PerformanceConfigDTO dto) {
return performanceConfigMapper.selectByName(dto);
}
public Page<PerformanceConfigPageDTO> pagePerformanceConfig(RpcPagination<PerformanceConfigPageDTO> pagination) {
try{
Page<PerformanceConfigPageDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(),pagination.isNeedCount());
performanceConfigMapper.listPerformanceConfig(pagination.getCondition());
return page;
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
/**
* 查询提成方案详情
*/
public PerformanceConfigDetailDTO selectPerformanceConfigDetail(PerformanceConfigDTO dto) {
PerformanceConfig config = performanceConfigMapper.selectById(dto.getId());
if (config == null) {
return null;
}
PerformanceConfigDetailDTO result = PerformanceConfigDetailDTO.builder()
.id(config.getId())
.schemeName(config.getSchemeName())
.schemeType(config.getSchemeType())
.businessType(config.getBusinessType())
.effectiveMonth(config.getEffectiveMonth())
.build();
// 查询rule
PerformanceConfigRuleDTO ruleDTO = performanceConfigRuleService
.listByConfigId(dto.getId());
result.setPerformanceConfigRule(ruleDTO);
// 查询参数配置
List<PerformanceParamConfigDTO> performanceParamConfigs = performanceParamConfigService
.listByConfigId(result.getId());
result.setParamConfigList(performanceParamConfigs);
// 查询商户品牌
List<PerformanceConfigMerchantBrandRefDTO> merchantBrandRefs = performanceConfigMerchantBrandRefService
.listByConfigId(result.getId());
result.setMerchantBrandRefList(merchantBrandRefs);
return result;
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceParamConfigConditionMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
public class PerformanceParamConfigConditionService {
@Autowired
private PerformanceParamConfigConditionMapper performanceParamConfigConditionMapper;
public void insertList(List<PerformanceParamConfigConditionDTO> performanceParamConfigConditionDTOList) {
// 1 把物理删除久的condition
performanceParamConfigConditionMapper.deleteByPerformanceConfigId(performanceParamConfigConditionDTOList.get(0).getPerformanceConfigId());
// 2 插入新的condition
performanceParamConfigConditionMapper.insertList(performanceParamConfigConditionDTOList);
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceTimeCycleMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class PerformanceTimeCycleService {
@Autowired
private PerformanceTimeCycleMapper performanceTimeCycleMapper;
/**
* 获取当前提成周期
*
* @return PerformanceTimeCycleDTO
*/
public PerformanceTimeCycleDTO selectCurrCycle() {
return performanceTimeCycleMapper.selectCurrCycle();
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.StaffPerformanceDTO;
import cn.com.glsx.dj.staff.mapper.StaffPerformanceMapper;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Slf4j
@Service
@Transactional(propagation = Propagation.SUPPORTS, rollbackFor = RpcServiceException.class)
public class StaffPerformanceService {
@Lazy
@Autowired
private StaffPerformanceService thiz;
@Autowired
private StaffPerformanceMapper staffPerformanceMapper;
public List<StaffPerformanceDTO> listStaffPerformance(StaffPerformanceDTO dto) {
try{
return staffPerformanceMapper.listStaffPerformance(dto);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
}
......@@ -31,7 +31,9 @@
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/>
<result column="deleted_flag" jdbcType="VARCHAR" property="deletedFlag"/>
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List">
id, merchant_id, total_delivery_count, area_effective_count,
reviewed_effective_count, review_month, image_urls, remark,
......@@ -40,5 +42,28 @@
manager_commit_time, reviewed_by, reviewed_name, reviewed_time,
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<select id="selectOneByQuery" resultMap="DTOResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
sal_effective_referral_review
<where>
deleted_flag = 'N'
<if test="merchantId != null">
AND merchant_id = #{merchantId}
</if>
<if test="sceneType != null">
AND scene_type = #{sceneType}
</if>
<if test="brandId != null">
AND brand_id = #{brandId}
</if>
<if test="reviewMonth != null">
and review_month = #{reviewMonth}
</if>
</where>
LIMIT
1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.com.glsx.dj.staff.mapper.PerformanceApproveConfigMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.PerformanceApproveConfig" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="approver_name" property="approverName" jdbcType="VARCHAR" />
<result column="approver_mobile" property="approverMobile" jdbcType="VARCHAR" />
<result column="approver_type" property="approverType" jdbcType="TINYINT" />
<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.performance.PerformanceApproveConfigDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
id, approver_name, approver_mobile, approver_type,
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.PerformanceConfigApprove" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="performance_config_id" property="performanceConfigId" jdbcType="INTEGER" />
<result column="approve_remark" property="approveRemark" jdbcType="VARCHAR" />
<result column="approve_attachments" property="approveAttachments" jdbcType="VARCHAR" />
<result column="attachment_imgs" property="attachmentImgs" jdbcType="VARCHAR" />
<result column="submit_username" property="submitUsername" jdbcType="VARCHAR" />
<result column="approve_status" property="approveStatus" jdbcType="TINYINT" />
<result column="merchant_names" property="merchantNames" jdbcType="VARCHAR" />
<result column="brands_names" property="brandsNames" 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.performance.PerformanceConfigApproveDTO" extends="BaseResultMap">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="performance_config_id" property="performanceConfigId" jdbcType="INTEGER" />
<result column="approve_remark" property="approveRemark" jdbcType="VARCHAR" />
<result column="approve_attachments" property="approveAttachments" jdbcType="VARCHAR" />
<result column="attachment_imgs" property="attachmentImgs" jdbcType="VARCHAR" />
<result column="submit_username" property="submitUsername" jdbcType="VARCHAR" />
<result column="approve_status" property="approveStatus" jdbcType="TINYINT" />
<result column="merchant_names" property="merchantNames" jdbcType="VARCHAR" />
<result column="brands_names" property="brandsNames" jdbcType="VARCHAR" />
</resultMap>
<!-- 分页DTO结果映射:联表后完整匹配所有字段 -->
<resultMap id="PageDTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO">
<id column="a_id" property="id" jdbcType="INTEGER" />
<result column="c_scheme_name" property="schemeName" jdbcType="VARCHAR" />
<result column="c_business_type" property="businessType" jdbcType="TINYINT" />
<result column="c_effective_month" property="effectiveMonth" jdbcType="VARCHAR" />
<result column="c_status" property="status" jdbcType="TINYINT" />
<result column="a_merchant_names" property="merchantNames" jdbcType="VARCHAR" />
<result column="a_brands_names" property="brandsNames" jdbcType="VARCHAR" />
<result column="a_created_date" property="submitDate" jdbcType="TIMESTAMP" />
<result column="a_updated_date" property="approveDate" jdbcType="TIMESTAMP" />
</resultMap>
<resultMap id="ApproveDetailResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDetailDTO">
<id column="a_id" property="id" jdbcType="INTEGER" />
<result column="a_performance_config_id" property="performanceConfigId" jdbcType="INTEGER" /> <!-- 新增的方案ID -->
<result column="c_scheme_name" property="schemeName" jdbcType="VARCHAR" />
<result column="c_scheme_type" property="schemeType" jdbcType="TINYINT" />
<result column="c_effective_month" property="effectiveMonth" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="ApprovePermissionResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePermissionDTO">
<id column="a_id" property="id" jdbcType="INTEGER" />
<result column="a_performance_config_id" property="performanceConfigId" jdbcType="INTEGER" />
<result column="a_approve_remark" property="approveRemark" jdbcType="VARCHAR" />
<result column="a_approve_attachments" property="approveAttachments" jdbcType="VARCHAR" />
<result column="a_attachment_imgs" property="attachmentImgs" jdbcType="VARCHAR" />
<result column="a_submit_username" property="submitUsername" jdbcType="VARCHAR" />
<result column="a_approve_status" property="approveStatus" jdbcType="TINYINT" />
<result column="a_merchant_names" property="merchantNames" jdbcType="VARCHAR" />
<result column="a_brands_names" property="brandsNames" jdbcType="VARCHAR" />
<!-- 权限字段:1=查阅人/2=审批人/0=无权限 -->
<result column="approve_permission" property="approvePermission" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, performance_config_id, approve_remark, approve_attachments, attachment_imgs, submit_username,
approve_status, merchant_names, brands_names, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<!-- 联表查询:审批主表 + 提成方案配置表 -->
<select id="listPerformanceConfig" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO" resultMap="PageDTOResultMap">
SELECT
a.id AS a_id,
c.scheme_name AS c_scheme_name,
c.business_typeG AS c_business_type,
c.effective_month AS c_effective_month,
c.status AS c_status,
a.merchant_names AS a_merchant_names,
a.brands_names AS a_brands_names,
a.created_date AS a_created_date,
a.updated_date AS a_updated_date
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
ON a.performance_config_id = c.id
AND c.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
ORDER BY
a.created_date DESC
</select>
<select id="getPerformanceConfigApproveDetail" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" resultMap="ApproveDetailResultMap">
SELECT
a.id AS a_id,
a.performance_config_id AS a_performance_config_id,
c.scheme_name AS c_scheme_name,
c.scheme_type AS c_scheme_type,
c.effective_month AS c_effective_month
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
ON a.performance_config_id = c.id
AND c.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
<if test="id != null">
AND a.id = #{id}
</if>
LIMIT 1
</select>
<select id="getPerformanceConfigApproveDetailAndPermission"
parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
resultMap="ApprovePermissionResultMap">
SELECT
a.id AS a_id,
a.performance_config_id AS a_performance_config_id,
a.approve_remark AS a_approve_remark,
a.approve_attachments AS a_approve_attachments,
a.attachment_imgs AS a_attachment_imgs,
a.submit_username AS a_submit_username,
a.approve_status AS a_approve_status,
a.merchant_names AS a_merchant_names,
a.brands_names AS a_brands_names,
CASE
WHEN ac.approver_type IS NOT NULL THEN CAST(ac.approver_type AS CHAR)
ELSE '0'
END AS approve_permission
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_approve_config ac
ON a.performance_config_id = ac.performance_config_id
AND ac.approver_mobile = #{mobile}
AND ac.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
AND a.id = #{id}
LIMIT 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveOperationRecordMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.PerformanceConfigApproveOperationRecord" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="performance_config_approve_id" property="performanceConfigApproveId" jdbcType="INTEGER" />
<result column="approve_status" property="approveStatus" jdbcType="TINYINT" />
<result column="approve_time" property="approveTime" jdbcType="TIMESTAMP" />
<result column="approve_opinion" property="approveOpinion" jdbcType="VARCHAR" />
<result column="approver_name" property="approverName" jdbcType="VARCHAR" />
<result column="approver_mobile" property="approverMobile" 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.performance.PerformanceConfigApproveOperationRecordDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
id, performance_config_approve_id, approve_status, approve_time, approve_opinion, approver_name,
approver_mobile, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</mapper>
\ No newline at end of file
......@@ -47,4 +47,58 @@
AND r.child_id = #{childBrandId}
LIMIT 1
</select>
<select id="selectByName" parameterType="cn.com.glsx.dj.staff.dto.PerformanceConfigDTO" resultMap="DTOResultMap">
SELECT
c.*
FROM
dj_car_life_performance_config c
WHERE
c.deleted_flag = 'N'
AND c.status = 2
AND r.scheme_name = #{schemeName}
LIMIT 1
</select>
<select id="listPerformanceConfig" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO" resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO">
SELECT
c.id,
c.scheme_name as schemeName,
c.business_type as businessType,
c.status,
c.effective_month as effectiveMonth,
c.updated_date as updatedDate,
IFNULL(COUNT(DISTINCT r.merchant_id), 0) as applicationQuantity
FROM
dj_car_life_performance_config c
LEFT JOIN dj_car_life_performance_config_merchant_brand_ref r
ON c.id = r.performance_config_id
AND r.deleted_flag = 'N'
WHERE
c.deleted_flag = 'N'
GROUP BY
c.id,
c.scheme_name,
c.business_type,
c.status,
c.effective_month,
c.updated_date
ORDER BY
c.updated_date DESC
</select>
<!-- 根据ID查询提成方案配置(未删除) -->
<select id="selectById"
parameterType="java.lang.Integer"
resultMap="DTOResultMap">
SELECT
c.*
FROM
dj_car_life_performance_config c
WHERE
c.deleted_flag = 'N'
AND c.id = #{id}
LIMIT 1
</select>
</mapper>
\ No newline at end of file
......@@ -29,6 +29,18 @@
<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.PerformanceParamConfigConditionDTO" extends="BaseResultMap">
<association property="productDefine" javaType="cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineDTO">
<id column="product_define_id" property="id" jdbcType="INTEGER" />
<result column="define_type" property="defineType" jdbcType="TINYINT" />
<result column="define_name" property="defineName" jdbcType="VARCHAR" />
<collection property="itemList" ofType="cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineItemDTO">
<id column="product_define_item_id" property="id" jdbcType="INTEGER" />
<result column="item_id" property="itemId" jdbcType="INTEGER" />
<result column="item_name" property="itemName" jdbcType="VARCHAR" />
</collection>
</association>
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
......@@ -40,4 +52,59 @@
condition_end_value, condition_commission_base, condition_commission_type, condition_commission_type_value,
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<update id="deleteByPerformanceConfigId" parameterType="java.lang.Integer">
UPDATE dj_car_life_performance_param_config_condition cond
INNER JOIN dj_car_life_performance_param_config param
ON cond.performance_param_config_id = param.id
AND param.deleted_flag = 'N'
SET
cond.deleted_flag = 'D',
cond.updated_date = NOW()
WHERE
param.performance_config_id = #{performanceConfigId}
AND cond.deleted_flag = 'N'
</update>
<select id="listByParamConfigId" resultMap="DTOResultMap">
SELECT
dcpcc.id,
dcpcc.performance_param_config_id,
dcpcc.condition_type,
dcpcc.condition_goods_config_type,
dcpcc.condition_goods_type,
dcpcc.condition_goods_type_name,
dcpcc.condition_secondary_goods_type,
dcpcc.condition_secondary_goods_type_name,
dcpcc.condition_third_level_goods_type,
dcpcc.condition_third_level_goods_type_name,
dcpcc.condition_product_define_id,
dcpcc.condition_product_define_name,
dcpcc.condition_assessment_factors,
dcpcc.condition_start_value,
dcpcc.condition_end_value,
dcpcc.condition_commission_base,
dcpcc.condition_commission_type,
dcpcc.condition_commission_type_value,
dcpcc.created_by,
dcpcc.created_date,
dcpcc.updated_by,
dcpcc.updated_date,
dcpcc.deleted_flag,
dcpd.id AS product_define_id,
dcpd.define_type,
dcpd.define_name,
dcpdi.id AS product_define_item_id,
dcpdi.item_id,
dcpdi.item_name
FROM
dj_car_life_performance_param_config_condition dcpcc
LEFT JOIN dj_car_life_merchant_performance_product_define dcpd ON dcpcc.condition_product_define_id = dcpd.id
LEFT JOIN dj_car_life_merchant_performance_product_define_item dcpdi ON dcpd.id = dcpdi.product_define_id
AND dcpdi.deleted_flag = 'N'
WHERE
dcpcc.deleted_flag = 'N'
AND dcpcc.performance_param_config_id = #{performanceParamConfigId}
ORDER BY
id DESC
</select>
</mapper>
\ No newline at end of file
......@@ -29,27 +29,19 @@
<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.PerformanceParamConfigDTO" extends="BaseResultMap">
<collection property="performanceParamConfigConditions" ofType="cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO">
<id column="cc_id" property="id" jdbcType="INTEGER" />
<result column="performance_param_config_id" property="performanceParamConfigId" jdbcType="INTEGER" />
<result column="condition_type" property="conditionType" jdbcType="TINYINT" />
<result column="condition_goods_config_type" property="conditionGoodsConfigType" jdbcType="TINYINT" />
<result column="condition_goods_type" property="conditionGoodsType" jdbcType="INTEGER" />
<result column="condition_goods_type_name" property="conditionGoodsTypeName" jdbcType="VARCHAR" />
<result column="condition_secondary_goods_type" property="conditionSecondaryGoodsType" jdbcType="INTEGER" />
<result column="condition_secondary_goods_type_name" property="conditionSecondaryGoodsTypeName" jdbcType="VARCHAR" />
<result column="condition_third_level_goods_type" property="conditionThirdLevelGoodsType" jdbcType="INTEGER" />
<result column="condition_third_level_goods_type_name" property="conditionThirdLevelGoodsTypeName" jdbcType="VARCHAR" />
<result column="condition_product_define_id" property="conditionProductDefineId" jdbcType="INTEGER" />
<result column="condition_product_define_name" property="conditionProductDefineName" jdbcType="VARCHAR" />
<result column="condition_assessment_factors" property="conditionAssessmentFactors" jdbcType="VARCHAR" />
<result column="condition_start_value" property="conditionStartValue" jdbcType="DECIMAL" />
<result column="condition_end_value" property="conditionEndValue" jdbcType="DECIMAL" />
<result column="condition_commission_base" property="conditionCommissionBase" jdbcType="VARCHAR" />
<result column="condition_commission_type" property="conditionCommissionType" jdbcType="VARCHAR" />
<result column="condition_commission_type_value" property="conditionCommissionTypeValue" jdbcType="DECIMAL" />
</collection>
<resultMap id="ListByConfigIdResultMap" type="cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO" extends="BaseResultMap">
<association property="productDefine" javaType="cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineDTO">
<id column="product_define_id" property="id" jdbcType="INTEGER" />
<result column="define_type" property="defineType" jdbcType="TINYINT" />
<result column="define_name" property="defineName" jdbcType="VARCHAR" />
<collection property="itemList" ofType="cn.com.glsx.dj.smartcarlife.model.MerchantPerformanceProductDefineItem">
<id column="product_define_item_id" property="id" jdbcType="INTEGER" />
<result column="item_id" property="itemId" jdbcType="INTEGER" />
<result column="item_name" property="itemName" jdbcType="VARCHAR" />
</collection>
</association>
<collection property="performanceParamConfigConditions" column="id"
select="cn.com.glsx.dj.staff.mapper.PerformanceParamConfigConditionMapper.listByParamConfigId"/>
</resultMap>
<sql id="Base_Column_List" >
<!--
......@@ -62,7 +54,7 @@
updated_by, updated_date, deleted_flag
</sql>
<select id="listByConfigId" parameterType="cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO" resultMap="DTOResultMap">
<select id="listByConfigId" parameterType="cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO" resultMap="ListByConfigIdResultMap">
SELECT
c.id,
c.performance_config_id,
......@@ -87,30 +79,27 @@
c.updated_by,
c.updated_date,
c.deleted_flag,
cc.id AS cc_id,
cc.performance_param_config_id,
cc.condition_type,
cc.condition_goods_config_type,
cc.condition_goods_type,
cc.condition_goods_type_name,
cc.condition_secondary_goods_type,
cc.condition_secondary_goods_type_name,
cc.condition_third_level_goods_type,
cc.condition_third_level_goods_type_name,
cc.condition_product_define_id,
cc.condition_product_define_name,
cc.condition_assessment_factors,
cc.condition_start_value,
cc.condition_end_value,
cc.condition_commission_base,
cc.condition_commission_type,
cc.condition_commission_type_value
dcpd.define_type,
dcpd.define_name,
dcpdi.id AS product_define_item_id,
dcpdi.item_id,
dcpdi.item_name
FROM
dj_car_life_performance_param_config c
LEFT JOIN dj_car_life_performance_param_config_condition cc ON c.id = cc.performance_param_config_id
AND cc.deleted_flag = 'N'
LEFT JOIN dj_car_life_merchant_performance_product_define dcpd ON c.product_define_id = dcpd.id
LEFT JOIN dj_car_life_merchant_performance_product_define_item dcpdi ON dcpd.id = dcpdi.product_define_id
AND dcpdi.deleted_flag = 'N'
WHERE
c.deleted_flag = 'N'
AND c.performance_config_id = #{performanceConfigId}
</select>
<update id="deleteByPerformanceParamConfigId" parameterType="java.lang.Integer">
UPDATE dj_car_life_performance_param_config
SET
deleted_flag = 'D',
updated_date = NOW()
WHERE
deleted_flag = 'N'
AND performance_config_id = #{id}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.com.glsx.dj.staff.mapper.PerformanceTimeCycleMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.PerformanceTimeCycle" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="BIGINT" />
<result column="cycle_name" property="cycleName" jdbcType="VARCHAR" />
<result column="cycle_item" property="cycleItem" jdbcType="VARCHAR" />
<result column="start_date" property="startDate" jdbcType="TIMESTAMP" />
<result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
<result column="enable_flag" property="enableFlag" jdbcType="CHAR" />
<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.performance.PerformanceTimeCycleDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, cycle_name, cycle_item, start_date, end_date, enable_flag,
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<select id="selectCurrCycle" resultMap="DTOResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
dj_car_life_performance_time_cycle
WHERE
deleted_flag = 'N'
AND enable_flag = 'Y'
AND NOW() BETWEEN start_date AND end_date
LIMIT 1
</select>
</mapper>
\ No newline at end of file
......@@ -54,11 +54,11 @@
<if test="staffPhone != null and staffPhone != ''">
AND dclsi.phone_number = #{staffPhone}
</if>
<if test="startTime != null and startTime != ''">
AND dclpo.success_date &gt;= #{startTime}
<if test="startDate != null and startDate != ''">
AND dclpo.success_date &gt;= #{startDate}
</if>
<if test="endTime != null and endTime != ''">
AND dclpo.success_date &lt;= #{endTime}
<if test="endDate != null and endDate != ''">
AND dclpo.success_date &lt;= #{endDate}
</if>
<if test="statusList != null and statusList.size > 0">
AND dclgo.status IN
......@@ -69,4 +69,34 @@
</where>
</select>
<select id="statPreSalesTouchCount" resultType="java.lang.Integer">
SELECT
ifnull(sum(equity_to_shop_count), 0)
FROM
dj_car_life_staff_daily_report_huawei dclsdrh
LEFT JOIN dj_car_life_staff_info dclsi ON dclsi.staff_uuid = dclsdrh.staff_uuid
AND dclsi.deleted_flag = 'N'
<where>
dclsdrh.deleted_flag = 'N'
<if test="merchantId != null and merchantId != 0">
AND dclsdrh.merchant_id = #{merchantId}
</if>
<if test="sceneType != null and sceneType != 0">
AND dclsdrh.scene_type = #{sceneType}
</if>
<if test="staffPhone != null and staffPhone != ''">
AND dclsi.phone_number = #{staffPhone}
</if>
<if test="brandId != null and brandId != 0">
AND dclsdrh.first_brand_id = #{brandId}
</if>
<if test="childBrandId != null and childBrandId != 0">
AND dclsdrh.brand_id = #{childBrandId}
</if>
<if test="month != null and month != ''">
AND dclsdrh.report_date &gt;= concat( #{month}, '-01')
AND dclsdrh.report_date &lt; DATE_ADD(concat( #{month}, '-01'), INTERVAL 1 MONTH)
</if>
</where>
</select>
</mapper>
......@@ -35,6 +35,9 @@
<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.StaffPerformanceDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
......@@ -46,4 +49,19 @@
upgrade_order_num, personal_penetration_rate, performance_amount, created_by, created_date,
updated_by, updated_date, deleted_flag
</sql>
<select id="listStaffPerformance" resultMap="DTOResultMap">
select
<include refid="Base_Column_List" />
from dj_car_life_staff_performance dclsp
<where>
dclsp.deleted_flag = 'N'
<if test="staffPhone != null">
and dclsp.staff_phone = #{staffPhone}
</if>
<if test="month != null">
and dclsp.month = #{month}
</if>
</where>
</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!