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;
@Data
@ToString
@SuperBuilder
@NoArgsConstructor
public class PerformanceApproveConfigDTO extends PerformanceApproveConfig {
}
\ No newline at end of file
......@@ -2,13 +2,16 @@ package cn.com.glsx.dj.staff.dto.performance;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.*;
import java.io.Serializable;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PerformanceConfigApprovePageDTO implements Serializable {
private Integer merchantId;
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "主键ID")
......
......@@ -12,6 +12,8 @@ import java.util.Date;
@ToString
@SuperBuilder
@EqualsAndHashCode(callSuper=false)
@AllArgsConstructor
@NoArgsConstructor
public class PerformanceTimeCycleDTO extends PerformanceTimeCycle {
@ApiModelProperty(notes = "周期开始时间")
......
......@@ -17,7 +17,7 @@ public interface PerformanceTimeCycleRemote {
@ApiMethod("全部工资提成系统周期管理")
@ApiResponse("工资提成系统周期")
List<PerformanceTimeCycleDTO> getPerformanceTimeCycle();
List<PerformanceTimeCycleDTO> listAllPerformanceTimeCycle();
/**
......
......@@ -19,7 +19,7 @@ public class PerformanceTimeCycleRemoteImpl implements PerformanceTimeCycleRemot
}
@Override
public List<PerformanceTimeCycleDTO> getPerformanceTimeCycle() {
public List<PerformanceTimeCycleDTO> listAllPerformanceTimeCycle() {
return performanceTimeCycleService.list();
}
......
......@@ -135,7 +135,18 @@ public class EffectiveReferralReviewService {
if (referralReviewCommonDTOS.isEmpty()) {
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)
......
......@@ -730,30 +730,30 @@ public class StaffMonthSalarySlipService {
}
StaffMonthSalarySlipSend monthSalary = list.get(0);
StaffMonthSalarySlipSendDTO resp = new StaffMonthSalarySlipSendDTO();
staffMonthSalarySlipSend.setStaffName(monthSalary.getStaffName());
staffMonthSalarySlipSend.setStaffPhone(monthSalary.getStaffPhone());
staffMonthSalarySlipSend.setBusinessTypes(monthSalary.getBusinessTypes());
staffMonthSalarySlipSend.setSalaryMonth(monthSalary.getSalaryMonth());
staffMonthSalarySlipSend.setFinalDataFlag(monthSalary.getFinalDataFlag());
staffMonthSalarySlipSend.setActualWorkDay(monthSalary.getActualWorkDay());
staffMonthSalarySlipSend.setMinimumSalary(monthSalary.getMinimumSalary());
staffMonthSalarySlipSend.setPerformanceLevel(monthSalary.getPerformanceLevel());
staffMonthSalarySlipSend.setPerformanceSalary(monthSalary.getPerformanceSalary());
staffMonthSalarySlipSend.setCommissionPrice(monthSalary.getCommissionPrice());
staffMonthSalarySlipSend.setDailyDeductMoney(monthSalary.getDailyDeductMoney());
staffMonthSalarySlipSend.setPadDeductMoney(monthSalary.getPadDeductMoney());
staffMonthSalarySlipSend.setDeferExpenses(monthSalary.getDeferExpenses());
staffMonthSalarySlipSend.setDeferIncome(monthSalary.getDeferIncome());
staffMonthSalarySlipSend.setOtherDeduction(monthSalary.getOtherDeduction());
staffMonthSalarySlipSend.setOtherRewards(monthSalary.getOtherRewards());
staffMonthSalarySlipSend.setSalary(monthSalary.getSalary());
staffMonthSalarySlipSend.setCreatedBy(monthSalary.getCreatedBy());
staffMonthSalarySlipSend.setUpdatedBy(monthSalary.getUpdatedBy());
staffMonthSalarySlipSend.setDeletedFlag(monthSalary.getDeletedFlag());
staffMonthSalarySlipSend.setId(monthSalary.getId());
staffMonthSalarySlipSend.setCreatedDate(monthSalary.getCreatedDate());
staffMonthSalarySlipSend.setUpdatedDate(monthSalary.getUpdatedDate());
staffMonthSalarySlipSend.setStatus(monthSalary.getStatus());
resp.setStaffName(monthSalary.getStaffName());
resp.setStaffPhone(monthSalary.getStaffPhone());
resp.setBusinessTypes(monthSalary.getBusinessTypes());
resp.setSalaryMonth(monthSalary.getSalaryMonth());
resp.setFinalDataFlag(monthSalary.getFinalDataFlag());
resp.setActualWorkDay(monthSalary.getActualWorkDay());
resp.setMinimumSalary(monthSalary.getMinimumSalary());
resp.setPerformanceLevel(monthSalary.getPerformanceLevel());
resp.setPerformanceSalary(monthSalary.getPerformanceSalary());
resp.setCommissionPrice(monthSalary.getCommissionPrice());
resp.setDailyDeductMoney(monthSalary.getDailyDeductMoney());
resp.setPadDeductMoney(monthSalary.getPadDeductMoney());
resp.setDeferExpenses(monthSalary.getDeferExpenses());
resp.setDeferIncome(monthSalary.getDeferIncome());
resp.setOtherDeduction(monthSalary.getOtherDeduction());
resp.setOtherRewards(monthSalary.getOtherRewards());
resp.setSalary(monthSalary.getSalary());
resp.setCreatedBy(monthSalary.getCreatedBy());
resp.setUpdatedBy(monthSalary.getUpdatedBy());
resp.setDeletedFlag(monthSalary.getDeletedFlag());
resp.setId(monthSalary.getId());
resp.setCreatedDate(monthSalary.getCreatedDate());
resp.setUpdatedDate(monthSalary.getUpdatedDate());
resp.setStatus(monthSalary.getStatus());
return resp;
}
}
......
......@@ -55,13 +55,20 @@ public class PerformanceConfigApproveService {
}
public PerformanceConfigApproveDetailDTO getPerformanceConfigApproveDetail(PerformanceConfigApproveDTO dto) {
PerformanceConfigApproveDetailDTO performanceConfigApproveDetail = performanceConfigApproveMapper.getPerformanceConfigApproveDetail(dto);
if (performanceConfigApproveDetail == null) {
PerformanceConfigApproveDetailDTO result = performanceConfigApproveMapper.getPerformanceConfigApproveDetail(dto);
if (result == null) {
return null;
}
List<PerformanceConfigMerchantBrandRefDTO> performanceConfigMerchantBrandRefDTOS = performanceConfigMerchantBrandRefService.listByConfigId(performanceConfigApproveDetail.getPerformanceConfigId());
performanceConfigApproveDetail.setMerchantBrandRefList(performanceConfigMerchantBrandRefDTOS);
return performanceConfigApproveDetail;
// 获取门店品牌
List<PerformanceConfigMerchantBrandRefDTO> performanceConfigMerchantBrandRefDTOS = performanceConfigMerchantBrandRefService.listByConfigId(result.getPerformanceConfigId());
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) {
......
......@@ -20,75 +20,60 @@
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" extends="BaseResultMap">
</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 id="listPerformanceConfig"
parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO">
SELECT
a.id AS a_id,
c.scheme_name AS c_scheme_name,
c.business_type 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
a.id AS id,
c.scheme_name AS schemeName,
c.business_type AS businessType,
c.effective_month AS effectiveMonth,
c.status AS status,
a.merchant_names AS merchantNames,
a.brands_names AS brandsNames,
a.created_date AS createdDate,
a.updated_date AS updatedDate
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'
LEFT JOIN dj_car_life_performance_config_merchant_brand_ref ref
ON c.id = ref.performance_config_id
AND ref.deleted_flag = 'N'
WHERE
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
a.created_date DESC
</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
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
a.id AS id,
a.performance_config_id AS performanceConfigId,
c.scheme_name AS schemeName,
c.scheme_type AS schemeType,
c.effective_month AS effectiveMonth,
a.approve_remark AS approveRemark,
a.attachment_imgs AS attachment_imgs
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
......@@ -96,39 +81,41 @@
AND c.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
<if test="id != null">
AND a.id = #{id}
</if>
LIMIT 1
<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">
resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePermissionDTO">
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,
a.id AS approveId,
a.performance_config_id AS performanceConfigId,
a.approve_remark AS approveRemark,
a.approve_attachments AS approveAttachments,
a.attachment_imgs AS attachmentImgs,
a.submit_username AS submitUsername,
a.approve_status AS approveStatus,
a.merchant_names AS merchantNames,
a.brands_names AS brandsNames,
CASE
WHEN ac.approver_type IS NOT NULL THEN CAST(ac.approver_type AS CHAR)
ELSE '0'
END AS approve_permission
ELSE '0'
END AS approvePermission
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'
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}
a.deleted_flag = 'N'
AND a.id = #{id}
LIMIT 1
</select>
<insert id="insertOne"
parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
useGeneratedKeys="true"
......
......@@ -26,7 +26,7 @@
<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
</sql>
......
......@@ -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
c.id,
c.scheme_type,
c.scheme_name AS schemeName,
c.business_type AS businessType,
c.status,
......@@ -86,7 +85,7 @@
AND r.deleted_flag = 'N'
WHERE
c.deleted_flag = 'N'
<if test="scheme_type != null">
<if test="schemeType != null">
AND c.scheme_type = #{schemeType}
</if>
GROUP BY
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!