Commit 509da204 by 张富康

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

2 parents 67bf33ea db63eace
...@@ -7,5 +7,6 @@ import lombok.experimental.SuperBuilder; ...@@ -7,5 +7,6 @@ import lombok.experimental.SuperBuilder;
@Data @Data
@ToString @ToString
@SuperBuilder @SuperBuilder
@NoArgsConstructor
public class PerformanceApproveConfigDTO extends PerformanceApproveConfig { public class PerformanceApproveConfigDTO extends PerformanceApproveConfig {
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,13 +2,16 @@ package cn.com.glsx.dj.staff.dto.performance; ...@@ -2,13 +2,16 @@ package cn.com.glsx.dj.staff.dto.performance;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.*;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@Data @Data
@AllArgsConstructor
@NoArgsConstructor
public class PerformanceConfigApprovePageDTO implements Serializable { public class PerformanceConfigApprovePageDTO implements Serializable {
private Integer merchantId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "主键ID") @ApiModelProperty(notes = "主键ID")
......
...@@ -12,6 +12,8 @@ import java.util.Date; ...@@ -12,6 +12,8 @@ import java.util.Date;
@ToString @ToString
@SuperBuilder @SuperBuilder
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper=false)
@AllArgsConstructor
@NoArgsConstructor
public class PerformanceTimeCycleDTO extends PerformanceTimeCycle { public class PerformanceTimeCycleDTO extends PerformanceTimeCycle {
@ApiModelProperty(notes = "周期开始时间") @ApiModelProperty(notes = "周期开始时间")
......
...@@ -17,7 +17,7 @@ public interface PerformanceTimeCycleRemote { ...@@ -17,7 +17,7 @@ public interface PerformanceTimeCycleRemote {
@ApiMethod("全部工资提成系统周期管理") @ApiMethod("全部工资提成系统周期管理")
@ApiResponse("工资提成系统周期") @ApiResponse("工资提成系统周期")
List<PerformanceTimeCycleDTO> getPerformanceTimeCycle(); List<PerformanceTimeCycleDTO> listAllPerformanceTimeCycle();
/** /**
......
...@@ -19,7 +19,7 @@ public class PerformanceTimeCycleRemoteImpl implements PerformanceTimeCycleRemot ...@@ -19,7 +19,7 @@ public class PerformanceTimeCycleRemoteImpl implements PerformanceTimeCycleRemot
} }
@Override @Override
public List<PerformanceTimeCycleDTO> getPerformanceTimeCycle() { public List<PerformanceTimeCycleDTO> listAllPerformanceTimeCycle() {
return performanceTimeCycleService.list(); return performanceTimeCycleService.list();
} }
......
...@@ -135,7 +135,18 @@ public class EffectiveReferralReviewService { ...@@ -135,7 +135,18 @@ public class EffectiveReferralReviewService {
if (referralReviewCommonDTOS.isEmpty()) { if (referralReviewCommonDTOS.isEmpty()) {
return null; return null;
} }
return referralReviewCommonDTOS.get(0); EffectiveReferralReviewCommonDTO reviewCommonDTO = referralReviewCommonDTOS.get(0);
//2、查询T1时间配置
PerformanceTimeCycleDTO performanceTimeCycleDTO = performanceTimeCycleService.selectByCode(PerformanceTimeCycleCodeEnum.T1.getCode());
if (Objects.nonNull(performanceTimeCycleDTO)
&& performanceTimeCycleDTO.getStartDate() != null
&& performanceTimeCycleDTO.getEndDate() != null
&& reviewCommonDTO.getIsReviewed().equals(0)) {
if (new Date().after(performanceTimeCycleDTO.getEndDate())) {
reviewCommonDTO.setIsReviewed(2);
}
}
return reviewCommonDTO;
} }
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class)
......
...@@ -730,30 +730,30 @@ public class StaffMonthSalarySlipService { ...@@ -730,30 +730,30 @@ public class StaffMonthSalarySlipService {
} }
StaffMonthSalarySlipSend monthSalary = list.get(0); StaffMonthSalarySlipSend monthSalary = list.get(0);
StaffMonthSalarySlipSendDTO resp = new StaffMonthSalarySlipSendDTO(); StaffMonthSalarySlipSendDTO resp = new StaffMonthSalarySlipSendDTO();
staffMonthSalarySlipSend.setStaffName(monthSalary.getStaffName()); resp.setStaffName(monthSalary.getStaffName());
staffMonthSalarySlipSend.setStaffPhone(monthSalary.getStaffPhone()); resp.setStaffPhone(monthSalary.getStaffPhone());
staffMonthSalarySlipSend.setBusinessTypes(monthSalary.getBusinessTypes()); resp.setBusinessTypes(monthSalary.getBusinessTypes());
staffMonthSalarySlipSend.setSalaryMonth(monthSalary.getSalaryMonth()); resp.setSalaryMonth(monthSalary.getSalaryMonth());
staffMonthSalarySlipSend.setFinalDataFlag(monthSalary.getFinalDataFlag()); resp.setFinalDataFlag(monthSalary.getFinalDataFlag());
staffMonthSalarySlipSend.setActualWorkDay(monthSalary.getActualWorkDay()); resp.setActualWorkDay(monthSalary.getActualWorkDay());
staffMonthSalarySlipSend.setMinimumSalary(monthSalary.getMinimumSalary()); resp.setMinimumSalary(monthSalary.getMinimumSalary());
staffMonthSalarySlipSend.setPerformanceLevel(monthSalary.getPerformanceLevel()); resp.setPerformanceLevel(monthSalary.getPerformanceLevel());
staffMonthSalarySlipSend.setPerformanceSalary(monthSalary.getPerformanceSalary()); resp.setPerformanceSalary(monthSalary.getPerformanceSalary());
staffMonthSalarySlipSend.setCommissionPrice(monthSalary.getCommissionPrice()); resp.setCommissionPrice(monthSalary.getCommissionPrice());
staffMonthSalarySlipSend.setDailyDeductMoney(monthSalary.getDailyDeductMoney()); resp.setDailyDeductMoney(monthSalary.getDailyDeductMoney());
staffMonthSalarySlipSend.setPadDeductMoney(monthSalary.getPadDeductMoney()); resp.setPadDeductMoney(monthSalary.getPadDeductMoney());
staffMonthSalarySlipSend.setDeferExpenses(monthSalary.getDeferExpenses()); resp.setDeferExpenses(monthSalary.getDeferExpenses());
staffMonthSalarySlipSend.setDeferIncome(monthSalary.getDeferIncome()); resp.setDeferIncome(monthSalary.getDeferIncome());
staffMonthSalarySlipSend.setOtherDeduction(monthSalary.getOtherDeduction()); resp.setOtherDeduction(monthSalary.getOtherDeduction());
staffMonthSalarySlipSend.setOtherRewards(monthSalary.getOtherRewards()); resp.setOtherRewards(monthSalary.getOtherRewards());
staffMonthSalarySlipSend.setSalary(monthSalary.getSalary()); resp.setSalary(monthSalary.getSalary());
staffMonthSalarySlipSend.setCreatedBy(monthSalary.getCreatedBy()); resp.setCreatedBy(monthSalary.getCreatedBy());
staffMonthSalarySlipSend.setUpdatedBy(monthSalary.getUpdatedBy()); resp.setUpdatedBy(monthSalary.getUpdatedBy());
staffMonthSalarySlipSend.setDeletedFlag(monthSalary.getDeletedFlag()); resp.setDeletedFlag(monthSalary.getDeletedFlag());
staffMonthSalarySlipSend.setId(monthSalary.getId()); resp.setId(monthSalary.getId());
staffMonthSalarySlipSend.setCreatedDate(monthSalary.getCreatedDate()); resp.setCreatedDate(monthSalary.getCreatedDate());
staffMonthSalarySlipSend.setUpdatedDate(monthSalary.getUpdatedDate()); resp.setUpdatedDate(monthSalary.getUpdatedDate());
staffMonthSalarySlipSend.setStatus(monthSalary.getStatus()); resp.setStatus(monthSalary.getStatus());
return resp; return resp;
} }
} }
......
...@@ -55,13 +55,20 @@ public class PerformanceConfigApproveService { ...@@ -55,13 +55,20 @@ public class PerformanceConfigApproveService {
} }
public PerformanceConfigApproveDetailDTO getPerformanceConfigApproveDetail(PerformanceConfigApproveDTO dto) { public PerformanceConfigApproveDetailDTO getPerformanceConfigApproveDetail(PerformanceConfigApproveDTO dto) {
PerformanceConfigApproveDetailDTO performanceConfigApproveDetail = performanceConfigApproveMapper.getPerformanceConfigApproveDetail(dto); PerformanceConfigApproveDetailDTO result = performanceConfigApproveMapper.getPerformanceConfigApproveDetail(dto);
if (performanceConfigApproveDetail == null) { if (result == null) {
return null; return null;
} }
List<PerformanceConfigMerchantBrandRefDTO> performanceConfigMerchantBrandRefDTOS = performanceConfigMerchantBrandRefService.listByConfigId(performanceConfigApproveDetail.getPerformanceConfigId()); // 获取门店品牌
performanceConfigApproveDetail.setMerchantBrandRefList(performanceConfigMerchantBrandRefDTOS); List<PerformanceConfigMerchantBrandRefDTO> performanceConfigMerchantBrandRefDTOS = performanceConfigMerchantBrandRefService.listByConfigId(result.getPerformanceConfigId());
return performanceConfigApproveDetail; result.setMerchantBrandRefList(performanceConfigMerchantBrandRefDTOS);
// 获取审批记录
List<PerformanceConfigApproveOperationRecordDTO> recordDTOList = performanceConfigApproveOperationRecordService.listByPerformanceConfigApproveId(dto.getId());
result.setApproveOperationRecordList(recordDTOList);
// 获取审批人配置
List<PerformanceApproveConfigDTO> performanceApproveConfigDTOS = performanceApproveConfigService.listAll();
result.setApproveConfigList(performanceApproveConfigDTOS);
return result;
} }
public PerformanceConfigApprovePermissionDTO getPerformanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto) { public PerformanceConfigApprovePermissionDTO getPerformanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto) {
......
...@@ -20,75 +20,60 @@ ...@@ -20,75 +20,60 @@
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" extends="BaseResultMap"> <resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" extends="BaseResultMap">
</resultMap> </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" > <sql id="Base_Column_List" >
id, performance_config_id, approve_remark, approve_attachments, attachment_imgs, submit_username, 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 approve_status, merchant_names, brands_names, created_by, created_date, updated_by, updated_date, deleted_flag
</sql> </sql>
<!-- 联表查询:审批主表 + 提成方案配置表 --> <!-- 联表查询:审批主表 + 提成方案配置表 -->
<select id="listPerformanceConfig" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO" resultMap="PageDTOResultMap"> <select id="listPerformanceConfig"
parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO">
SELECT SELECT
a.id AS a_id, a.id AS id,
c.scheme_name AS c_scheme_name, c.scheme_name AS schemeName,
c.business_type AS c_business_type, c.business_type AS businessType,
c.effective_month AS c_effective_month, c.effective_month AS effectiveMonth,
c.status AS c_status, c.status AS status,
a.merchant_names AS a_merchant_names, a.merchant_names AS merchantNames,
a.brands_names AS a_brands_names, a.brands_names AS brandsNames,
a.created_date AS a_created_date, a.created_date AS createdDate,
a.updated_date AS a_updated_date a.updated_date AS updatedDate
FROM FROM
dj_car_life_performance_config_approve a dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c LEFT JOIN dj_car_life_performance_config c
ON a.performance_config_id = c.id ON a.performance_config_id = c.id
AND c.deleted_flag = 'N' AND c.deleted_flag = 'N'
LEFT JOIN dj_car_life_performance_config_merchant_brand_ref ref
ON c.id = ref.performance_config_id
AND ref.deleted_flag = 'N'
WHERE WHERE
a.deleted_flag = 'N' a.deleted_flag = 'N'
<if test="status != null">
AND c.status = #{status}
</if>
<if test="businessType != null">
AND c.business_type = #{businessType}
</if>
<if test="merchantId != null">
AND ref.merchant_id = #{merchantId}
</if>
GROUP BY
a.id, c.scheme_name, c.business_type, c.effective_month, c.status,
a.merchant_names, a.brands_names, a.created_date, a.updated_date
ORDER BY ORDER BY
a.created_date DESC a.created_date DESC
</select> </select>
<select id="getPerformanceConfigApproveDetail" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" resultMap="ApproveDetailResultMap">
<select id="getPerformanceConfigApproveDetail" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDetailDTO">
SELECT SELECT
a.id AS a_id, a.id AS id,
a.performance_config_id AS a_performance_config_id, a.performance_config_id AS performanceConfigId,
c.scheme_name AS c_scheme_name, c.scheme_name AS schemeName,
c.scheme_type AS c_scheme_type, c.scheme_type AS schemeType,
c.effective_month AS c_effective_month c.effective_month AS effectiveMonth,
a.approve_remark AS approveRemark,
a.attachment_imgs AS attachment_imgs
FROM FROM
dj_car_life_performance_config_approve a dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c LEFT JOIN dj_car_life_performance_config c
...@@ -101,23 +86,24 @@ ...@@ -101,23 +86,24 @@
</if> </if>
LIMIT 1 LIMIT 1
</select> </select>
<select id="getPerformanceConfigApproveDetailAndPermission" <select id="getPerformanceConfigApproveDetailAndPermission"
parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
resultMap="ApprovePermissionResultMap"> resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePermissionDTO">
SELECT SELECT
a.id AS a_id, a.id AS approveId,
a.performance_config_id AS a_performance_config_id, a.performance_config_id AS performanceConfigId,
a.approve_remark AS a_approve_remark, a.approve_remark AS approveRemark,
a.approve_attachments AS a_approve_attachments, a.approve_attachments AS approveAttachments,
a.attachment_imgs AS a_attachment_imgs, a.attachment_imgs AS attachmentImgs,
a.submit_username AS a_submit_username, a.submit_username AS submitUsername,
a.approve_status AS a_approve_status, a.approve_status AS approveStatus,
a.merchant_names AS a_merchant_names, a.merchant_names AS merchantNames,
a.brands_names AS a_brands_names, a.brands_names AS brandsNames,
CASE CASE
WHEN ac.approver_type IS NOT NULL THEN CAST(ac.approver_type AS CHAR) WHEN ac.approver_type IS NOT NULL THEN CAST(ac.approver_type AS CHAR)
ELSE '0' ELSE '0'
END AS approve_permission END AS approvePermission
FROM FROM
dj_car_life_performance_config_approve a dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_approve_config ac LEFT JOIN dj_car_life_performance_approve_config ac
...@@ -129,6 +115,7 @@ ...@@ -129,6 +115,7 @@
AND a.id = #{id} AND a.id = #{id}
LIMIT 1 LIMIT 1
</select> </select>
<insert id="insertOne" <insert id="insertOne"
parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
useGeneratedKeys="true" useGeneratedKeys="true"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
id, performance_config_approve_id, approve_status, approver_type, push_status, approve_time, approve_opinion, approver_name, id, performance_config_approve_id, status, approver_type, push_status, approve_time, approve_opinion, approver_name,
approver_mobile, created_by, created_date, updated_by, updated_date, deleted_flag approver_mobile, created_by, created_date, updated_by, updated_date, deleted_flag
</sql> </sql>
......
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
<select id="listPerformanceConfig" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO" resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"> <select id="listPerformanceConfig" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO" resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO">
SELECT SELECT
c.id, c.id,
c.scheme_type,
c.scheme_name AS schemeName, c.scheme_name AS schemeName,
c.business_type AS businessType, c.business_type AS businessType,
c.status, c.status,
...@@ -86,7 +85,7 @@ ...@@ -86,7 +85,7 @@
AND r.deleted_flag = 'N' AND r.deleted_flag = 'N'
WHERE WHERE
c.deleted_flag = 'N' c.deleted_flag = 'N'
<if test="scheme_type != null"> <if test="schemeType != null">
AND c.scheme_type = #{schemeType} AND c.scheme_type = #{schemeType}
</if> </if>
GROUP BY GROUP BY
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!