Commit 1086e540 by 章家宝

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

2 parents 40bd7429 cc0a8448
Showing 27 changed files with 307 additions and 58 deletions
...@@ -31,6 +31,11 @@ public class StaffSalaryAppealApplyRecordDTO extends StaffSalaryAppealApplyRecor ...@@ -31,6 +31,11 @@ public class StaffSalaryAppealApplyRecordDTO extends StaffSalaryAppealApplyRecor
private String applyEndTime; private String applyEndTime;
/** /**
* 是否超管
*/
private Boolean isSuper;
/**
* 查询条件:登录手机号 * 查询条件:登录手机号
*/ */
private String loginPhone; private String loginPhone;
......
...@@ -101,7 +101,7 @@ public class AppraisalBaseInfoDTO implements Serializable { ...@@ -101,7 +101,7 @@ public class AppraisalBaseInfoDTO implements Serializable {
private BigDecimal afterCorrectionBasicSalary; private BigDecimal afterCorrectionBasicSalary;
/** /**
* 考勤计算后底薪 todz 考勤申诉成功后需要更新该字段 * 考勤计算后底薪
*/ */
@ApiModelProperty(notes = "考勤计算后底薪") @ApiModelProperty(notes = "考勤计算后底薪")
private BigDecimal afterAttendanceBasicSalary; private BigDecimal afterAttendanceBasicSalary;
......
...@@ -54,4 +54,7 @@ public class EffectiveReferralReviewCommonDTO extends EffectiveReferralReview { ...@@ -54,4 +54,7 @@ public class EffectiveReferralReviewCommonDTO extends EffectiveReferralReview {
@ApiModelProperty(value = "操作人id") @ApiModelProperty(value = "操作人id")
private String updatedById; private String updatedById;
@ApiModelProperty(notes = "是否可编辑:0-不可编辑,1-可编辑")
private Integer updateFlag;
} }
\ No newline at end of file \ No newline at end of file
...@@ -16,4 +16,8 @@ public class StoreEffectiveReferralDetailDTO implements Serializable { ...@@ -16,4 +16,8 @@ public class StoreEffectiveReferralDetailDTO implements Serializable {
@ApiModelProperty(value = "业务场景引荐数列表") @ApiModelProperty(value = "业务场景引荐数列表")
private List<SceneTypeEffectiveReferralDTO> sceneTypeEffectiveReferrals; private List<SceneTypeEffectiveReferralDTO> sceneTypeEffectiveReferrals;
@ApiModelProperty(notes = "是否可编辑:0-不可编辑,1-可编辑")
private Integer updateFlag;
} }
package cn.com.glsx.dj.staff.dto.perfSalary;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
public class StoreEffectiveReferralDetailReqDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "门店id", required = true)
@NotNull(message = "门店id不能为空")
private Integer merchantId;
@ApiModelProperty(notes = "复核时间-月份")
@NotNull(message = "复核时间-月份不能为空")
private String reviewMonth;
}
...@@ -40,7 +40,7 @@ public class StaffSalaryAppealSummaryDTO implements Serializable { ...@@ -40,7 +40,7 @@ public class StaffSalaryAppealSummaryDTO implements Serializable {
private BigDecimal padDeductionAmount; private BigDecimal padDeductionAmount;
@ApiModelProperty("缺失日报日期") @ApiModelProperty("缺失日报日期")
private List<String> missingDailyReportDates; private List<Integer> missingDailyReportDates;
@ApiModelProperty("是否允许发起考勤申诉") @ApiModelProperty("是否允许发起考勤申诉")
private Boolean attendanceAppealable; private Boolean attendanceAppealable;
...@@ -50,4 +50,11 @@ public class StaffSalaryAppealSummaryDTO implements Serializable { ...@@ -50,4 +50,11 @@ public class StaffSalaryAppealSummaryDTO implements Serializable {
@ApiModelProperty("是否允许发起平板申诉") @ApiModelProperty("是否允许发起平板申诉")
private Boolean padAppealable; private Boolean padAppealable;
@ApiModelProperty("可申诉开始时间")
private String appealStartTime;
@ApiModelProperty("可申诉结束时间")
private String appealEndTime;
} }
...@@ -19,7 +19,7 @@ import java.util.Date; ...@@ -19,7 +19,7 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
// todz dj_car_life_staff_qw_clock_in_info_dev 修改 // todz dj_car_life_staff_qw_clock_in_info_dev 修改
@Table(name = "dj_car_life_staff_qw_clock_in_info_dev") @Table(name = "dj_car_life_staff_qw_clock_in_info")
public class StaffQwClockInInfo implements Serializable { public class StaffQwClockInInfo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.remote.perfSalary; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.remote.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO; import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralDetailDTO; import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralDetailDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralDetailReqDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralSubmitDTO; import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralSubmitDTO;
import cn.com.glsx.framework.core.annotation.ApiMethod; import cn.com.glsx.framework.core.annotation.ApiMethod;
import cn.com.glsx.framework.core.annotation.ApiParam; import cn.com.glsx.framework.core.annotation.ApiParam;
...@@ -23,7 +24,7 @@ public interface EffectiveReferralReviewMiniProgramRemote { ...@@ -23,7 +24,7 @@ public interface EffectiveReferralReviewMiniProgramRemote {
@ApiMethod("门店有效引荐数详情") @ApiMethod("门店有效引荐数详情")
@ApiParam(name = "id", notes = "门店有效引荐记录id", dataType = ApiParam.DataTypeEnum.INTEGER, required = true) @ApiParam(name = "id", notes = "门店有效引荐记录id", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)
@ApiResponse("门店有效引荐数详情") @ApiResponse("门店有效引荐数详情")
RpcResponse<StoreEffectiveReferralDetailDTO> effectiveReferralStoreDetail(Integer id); RpcResponse<StoreEffectiveReferralDetailDTO> effectiveReferralStoreDetail(StoreEffectiveReferralDetailReqDTO request);
@ApiMethod("门店有效引荐数提交") @ApiMethod("门店有效引荐数提交")
@ApiParam(name = "dto", notes = "提交信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true) @ApiParam(name = "dto", notes = "提交信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
......
...@@ -9,7 +9,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf; ...@@ -9,7 +9,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import javax.annotation.Resource; import javax.annotation.Resource;
@Slf4j @Slf4j
@ElasticJobConf(name = "AttendanceDataCleansing", cron = "0 0 6 1 * ? ", description = "考勤数据清洗", overwrite = false) @ElasticJobConf(name = "AttendanceDataCleansing", cron = "0 0 6 1 * ? ", description = "考勤数据清洗-可配参数格式(yyyy-MM-dd)", overwrite = false)
public class AttendanceDataCleansingJob implements SimpleJob { public class AttendanceDataCleansingJob implements SimpleJob {
@Resource @Resource
...@@ -20,7 +20,7 @@ public class AttendanceDataCleansingJob implements SimpleJob { ...@@ -20,7 +20,7 @@ public class AttendanceDataCleansingJob implements SimpleJob {
public void execute(ShardingContext shardingContext) { public void execute(ShardingContext shardingContext) {
log.info("----------------考勤数据清洗开始-----------------"); log.info("----------------考勤数据清洗开始-----------------");
try { try {
attendanceDataCleansingService.attendanceDataCleansing(); attendanceDataCleansingService.attendanceDataCleansing(shardingContext.getJobParameter());
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
......
package cn.com.glsx.dj.staff.mapper; package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.SalaryAppealApplyAttachmentDTO;
import cn.com.glsx.dj.staff.model.SalaryAppealApplyAttachment; import cn.com.glsx.dj.staff.model.SalaryAppealApplyAttachment;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper @Mapper
public interface SalaryAppealApplyAttachmentMapper extends OreMapper<SalaryAppealApplyAttachment> { public interface SalaryAppealApplyAttachmentMapper extends OreMapper<SalaryAppealApplyAttachment> {
/**
* 批量查询附件列表
* @param recordIds 申诉记录ID列表
* @return 附件列表
*/
List<SalaryAppealApplyAttachmentDTO> batchSelectByRecordIds(@Param("recordIds") List<Integer> recordIds);
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.perfSalary; package cn.com.glsx.dj.staff.remote.perfSalary;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO; import cn.com.glsx.dj.staff.dto.perfSalary.*;
import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralDetailDTO;
import cn.com.glsx.dj.staff.dto.perfSalary.StoreEffectiveReferralSubmitDTO;
import cn.com.glsx.dj.staff.service.perfSalary.EffectiveReferralReviewMiniProgramService; import cn.com.glsx.dj.staff.service.perfSalary.EffectiveReferralReviewMiniProgramService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
...@@ -32,9 +29,9 @@ public class EffectiveReferralReviewMiniProgramRemoteImpl implements EffectiveRe ...@@ -32,9 +29,9 @@ public class EffectiveReferralReviewMiniProgramRemoteImpl implements EffectiveRe
} }
@Override @Override
public RpcResponse<StoreEffectiveReferralDetailDTO> effectiveReferralStoreDetail(Integer merchantId) { public RpcResponse<StoreEffectiveReferralDetailDTO> effectiveReferralStoreDetail(StoreEffectiveReferralDetailReqDTO request) {
try{ try{
return RpcResponse.success(effectiveReferralReviewMiniprogramService.effectiveReferralStoreDetail(merchantId)); return RpcResponse.success(effectiveReferralReviewMiniprogramService.effectiveReferralStoreDetail(request));
}catch(Exception e){ }catch(Exception e){
log.error(e.getMessage(),e); log.error(e.getMessage(),e);
return RpcResponse.error(e); return RpcResponse.error(e);
......
...@@ -190,7 +190,7 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote { ...@@ -190,7 +190,7 @@ public class PerfRuleRemoteImpl implements PerfRuleRemote {
*/ */
@Override @Override
public RpcResponse<Boolean> attendanceDataCleansing() { public RpcResponse<Boolean> attendanceDataCleansing() {
attendanceDataCleansingService.attendanceDataCleansing(); attendanceDataCleansingService.attendanceDataCleansing("");
return RpcResponse.success(true); return RpcResponse.success(true);
} }
......
...@@ -6,6 +6,7 @@ import cn.com.glsx.dj.staff.dto.salaryappealapply.StaffSalaryAppealSummaryDTO; ...@@ -6,6 +6,7 @@ import cn.com.glsx.dj.staff.dto.salaryappealapply.StaffSalaryAppealSummaryDTO;
import cn.com.glsx.dj.staff.service.StaffSalaryAppealApplyRecordService; import cn.com.glsx.dj.staff.service.StaffSalaryAppealApplyRecordService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService; import org.apache.dubbo.config.annotation.DubboService;
...@@ -25,6 +26,9 @@ public class StaffSalaryAppealApplyRecordRemoteImpl implements StaffSalaryAppeal ...@@ -25,6 +26,9 @@ public class StaffSalaryAppealApplyRecordRemoteImpl implements StaffSalaryAppeal
log.info("createAppeal start, dto:{}", dto); log.info("createAppeal start, dto:{}", dto);
Boolean result = staffSalaryAppealApplyRecordService.createAppeal(dto); Boolean result = staffSalaryAppealApplyRecordService.createAppeal(dto);
return RpcResponse.success(result); return RpcResponse.success(result);
}catch (RpcServiceException e) {
log.error(e.getMessage(),e);
return RpcResponse.error(e);
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(),e); log.error(e.getMessage(),e);
return RpcResponse.error(e); return RpcResponse.error(e);
...@@ -95,6 +99,9 @@ public class StaffSalaryAppealApplyRecordRemoteImpl implements StaffSalaryAppeal ...@@ -95,6 +99,9 @@ public class StaffSalaryAppealApplyRecordRemoteImpl implements StaffSalaryAppeal
log.info("webReply start, dto:{}", dto); log.info("webReply start, dto:{}", dto);
Boolean result = staffSalaryAppealApplyRecordService.webReply(dto); Boolean result = staffSalaryAppealApplyRecordService.webReply(dto);
return RpcResponse.success(result); return RpcResponse.success(result);
} catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(),e); log.error(e.getMessage(),e);
return RpcResponse.error(e); return RpcResponse.error(e);
......
...@@ -3,10 +3,13 @@ package cn.com.glsx.dj.staff.service.perfSalary; ...@@ -3,10 +3,13 @@ package cn.com.glsx.dj.staff.service.perfSalary;
import cn.com.glsx.dj.smartcarlife.dto.merchant.CarBrandDTO; import cn.com.glsx.dj.smartcarlife.dto.merchant.CarBrandDTO;
import cn.com.glsx.dj.smartcarlife.response.ServiceStaffRopResponse; import cn.com.glsx.dj.smartcarlife.response.ServiceStaffRopResponse;
import cn.com.glsx.dj.staff.dto.perfSalary.*; import cn.com.glsx.dj.staff.dto.perfSalary.*;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.dj.staff.enums.PerformanceTimeCycleCodeEnum;
import cn.com.glsx.dj.staff.enums.perfSalary.EffectiveReferralBrandTypeEnum; import cn.com.glsx.dj.staff.enums.perfSalary.EffectiveReferralBrandTypeEnum;
import cn.com.glsx.dj.staff.enums.perfSalary.EffectiveReferralSceneEnum; import cn.com.glsx.dj.staff.enums.perfSalary.EffectiveReferralSceneEnum;
import cn.com.glsx.dj.staff.mapper.perfSalary.EffectiveReferralReviewMapper; import cn.com.glsx.dj.staff.mapper.perfSalary.EffectiveReferralReviewMapper;
import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview; import cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceTimeCycleService;
import cn.com.glsx.framework.core.beans.BaseModel; import cn.com.glsx.framework.core.beans.BaseModel;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum; import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
...@@ -16,6 +19,7 @@ import cn.com.glsx.scrm.proxy.enums.ProxyRequestSourceEnum; ...@@ -16,6 +19,7 @@ import cn.com.glsx.scrm.proxy.enums.ProxyRequestSourceEnum;
import cn.com.glsx.scrm.proxy.model.CommonProxyRequest; import cn.com.glsx.scrm.proxy.model.CommonProxyRequest;
import cn.com.glsx.scrm.proxy.model.ProxyBaseResponse; import cn.com.glsx.scrm.proxy.model.ProxyBaseResponse;
import cn.com.glsx.scrm.proxy.remote.CommonProxyRemote; import cn.com.glsx.scrm.proxy.remote.CommonProxyRemote;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -29,6 +33,8 @@ import org.springframework.util.LinkedMultiValueMap; ...@@ -29,6 +33,8 @@ import org.springframework.util.LinkedMultiValueMap;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.YearMonth;
import java.time.temporal.ChronoUnit;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -50,17 +56,21 @@ public class EffectiveReferralReviewMiniProgramService { ...@@ -50,17 +56,21 @@ public class EffectiveReferralReviewMiniProgramService {
@Autowired @Autowired
private TaskExecutor taskExecutor; private TaskExecutor taskExecutor;
@Resource
private PerformanceTimeCycleService performanceTimeCycleService;
public List<EffectiveReferralReviewCommonDTO> effectiveReferralStoreList(EffectiveReferralReviewCommonDTO request) { public List<EffectiveReferralReviewCommonDTO> effectiveReferralStoreList(EffectiveReferralReviewCommonDTO request) {
//筛选项:门店名字(模糊搜索),状态:未提交、已提交,月份:2026-01, //筛选项:门店名字(模糊搜索),状态:未提交、已提交,月份:2026-01,
//特殊逻辑:根据商户门店id去重,根据门店首字母倒序。要根据门店的不同业务场景的数据判断是否已提交和未提交。 //特殊逻辑:根据商户门店id去重,根据门店首字母倒序。要根据门店的不同业务场景的数据判断是否已提交和未提交。
//不同业务场景`scene_type` '业务场景:1-精品升级(轻改);2-会员权益(广联权益);3-单延保 状态`status` '状态:0-未提交,1-草稿,2-已提交',全部为已提交时,总的提交状态submitStatus才是已提交。 //不同业务场景`scene_type` '业务场景:1-精品升级(轻改);2-会员权益(广联权益);3-单延保 状态`status` '状态:0-未提交,1-草稿,2-已提交',全部为已提交时,总的提交状态submitStatus才是已提交。
//注意:要跟服务商户表dj_car_life_service_merchant根据`merchant_id`关联,用于筛选项门店搜索,sal_effective_referral_review作为主表 //注意:要跟服务商户表dj_car_life_service_merchant根据`merchant_id`关联,用于筛选项门店搜索,sal_effective_referral_review作为主表
request.getMerchantIds().addAll(Lists.newArrayList(44211832,44209298,44209902,44209880)); request.getMerchantIds().addAll(Lists.newArrayList(44211832,44209298,44209902,44209880));
log.info("门店有效引荐数列表MerchantIds:{}", JSON.toJSONString(request.getMerchantIds()));
List<EffectiveReferralReviewCommonDTO> list = effectiveReferralReviewMapper.selectStoreList(request); List<EffectiveReferralReviewCommonDTO> list = effectiveReferralReviewMapper.selectStoreList(request);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
return list; return list;
} }
//赋值不同业务提交状态 //赋值不同业务提交状态、是否可编辑标识
fillSceneTypeSubmitStatus(list); fillSceneTypeSubmitStatus(list);
return list; return list;
} }
...@@ -71,6 +81,9 @@ public class EffectiveReferralReviewMiniProgramService { ...@@ -71,6 +81,9 @@ public class EffectiveReferralReviewMiniProgramService {
* @param list * @param list
*/ */
private void fillSceneTypeSubmitStatus(List<EffectiveReferralReviewCommonDTO> list) { private void fillSceneTypeSubmitStatus(List<EffectiveReferralReviewCommonDTO> list) {
//查询时间配置
PerformanceTimeCycleDTO performanceTimeCycleDTO = performanceTimeCycleService.selectByCode(PerformanceTimeCycleCodeEnum.T1.getCode());
list.forEach(item -> { list.forEach(item -> {
Example example = new Example(EffectiveReferralReview.class); Example example = new Example(EffectiveReferralReview.class);
example.createCriteria() example.createCriteria()
...@@ -89,38 +102,118 @@ public class EffectiveReferralReviewMiniProgramService { ...@@ -89,38 +102,118 @@ public class EffectiveReferralReviewMiniProgramService {
if (CollectionUtils.isNotEmpty(singleExtendedWarrantyList)) { if (CollectionUtils.isNotEmpty(singleExtendedWarrantyList)) {
item.setSingleExtendedWarrantySubmitStatus(singleExtendedWarrantyList.get(0).getStatus()); item.setSingleExtendedWarrantySubmitStatus(singleExtendedWarrantyList.get(0).getStatus());
} }
//当前时间年月是否比核查时间晚并超过1个月,或者当前时间不在T1时间配置内,则不可编辑
long monthDiff = getMonthDiff(effectiveReferralReviews.get(0).getReviewMonth());
if ((Objects.nonNull(performanceTimeCycleDTO)
&& performanceTimeCycleDTO.getStartDate() != null
&& performanceTimeCycleDTO.getEndDate() != null
&& new Date().after(performanceTimeCycleDTO.getEndDate()))
|| monthDiff > 1) {
item.setUpdateFlag(0);
}
else {
item.setUpdateFlag(1);
}
}); });
} }
public StoreEffectiveReferralDetailDTO effectiveReferralStoreDetail(Integer merchantId) { public StoreEffectiveReferralDetailDTO effectiveReferralStoreDetail(StoreEffectiveReferralDetailReqDTO request) {
//1、根据门店id获取门店所有数据 //1、根据门店id获取门店所有数据
EffectiveReferralReviewCommonDTO commonDTO = new EffectiveReferralReviewCommonDTO(); EffectiveReferralReviewCommonDTO commonDTO = new EffectiveReferralReviewCommonDTO();
commonDTO.setMerchantId(merchantId); commonDTO.setMerchantId(request.getMerchantId());
commonDTO.setReviewMonth(request.getReviewMonth());
List<EffectiveReferralReviewCommonDTO> referralReviewCommonDTOS = effectiveReferralReviewMapper.selectStoreEffectiveReferralList(commonDTO); List<EffectiveReferralReviewCommonDTO> referralReviewCommonDTOS = effectiveReferralReviewMapper.selectStoreEffectiveReferralList(commonDTO);
if (CollectionUtils.isEmpty(referralReviewCommonDTOS)) { if (CollectionUtils.isEmpty(referralReviewCommonDTOS)) {
return new StoreEffectiveReferralDetailDTO(); return new StoreEffectiveReferralDetailDTO();
} }
//2、查询其它品牌名称 //2、查询其它品牌名称
String otherBrandName = ""; String otherBrandName = getOtherBrandName(request.getMerchantId(), referralReviewCommonDTOS);
List<EffectiveReferralReviewCommonDTO> otherBrandEffectiveReferrals =
referralReviewCommonDTOS.stream().filter(item -> item.getBrandId() == -1).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(otherBrandEffectiveReferrals)) {
Map<Integer, String> merchantBandInfoMap = this.batchQueryMerchantBandInfo(Lists.newArrayList(merchantId));
otherBrandName = this.filterDistinctBrandName(merchantBandInfoMap.get(merchantId), "鸿蒙智行");
}
//3、封装各业务场景引荐数 //3、封装各业务场景引荐数
List<SceneTypeEffectiveReferralDTO> sceneTypeEffectiveReferrals = getSceneTypeEffectiveReferralDTOS(referralReviewCommonDTOS, otherBrandName); List<SceneTypeEffectiveReferralDTO> sceneTypeEffectiveReferrals = getSceneTypeEffectiveReferralDTOS(referralReviewCommonDTOS, otherBrandName);
//4、封装返回参数 //4、查询时间配置
PerformanceTimeCycleDTO performanceTimeCycleDTO = performanceTimeCycleService.selectByCode(PerformanceTimeCycleCodeEnum.T1.getCode());
//5、当前时间年月是否比核查时间晚并超过1个月, 则不可编辑
long monthDiff = getMonthDiff(referralReviewCommonDTOS.get(0).getReviewMonth());
//6、封装返回参数
StoreEffectiveReferralDetailDTO detailDTO = new StoreEffectiveReferralDetailDTO(); StoreEffectiveReferralDetailDTO detailDTO = new StoreEffectiveReferralDetailDTO();
if ((Objects.nonNull(performanceTimeCycleDTO)
&& performanceTimeCycleDTO.getStartDate() != null
&& performanceTimeCycleDTO.getEndDate() != null
&& new Date().after(performanceTimeCycleDTO.getEndDate()))
|| monthDiff > 1) {
detailDTO.setUpdateFlag(0);
}
else {
detailDTO.setUpdateFlag(1);
}
detailDTO.setMerchantName(referralReviewCommonDTOS.get(0).getMerchantName()); detailDTO.setMerchantName(referralReviewCommonDTOS.get(0).getMerchantName());
detailDTO.setSceneTypeEffectiveReferrals(sceneTypeEffectiveReferrals); detailDTO.setSceneTypeEffectiveReferrals(sceneTypeEffectiveReferrals);
return detailDTO; return detailDTO;
} }
/** /**
* 获取月份差 当前时间年月 - 核查年月
* @param reviewMonth
* @return
*/
private long getMonthDiff(String reviewMonth) {
YearMonth targetMonth = YearMonth.parse(reviewMonth);
YearMonth currentMonth = YearMonth.now();
//计算月份差(当前 - 目标)
// 转换为LocalDate进行比较
return ChronoUnit.MONTHS.between(
targetMonth.atDay(1), // 转换为LocalDate进行比较
currentMonth.atDay(1)
);
}
public static void main(String[] args) {
String reviewMonth = "2025-12";
// 解析字符串为 YearMonth
YearMonth targetMonth = YearMonth.parse(reviewMonth);
// 获取当前时间的年月
YearMonth currentMonth = YearMonth.now();
//计算月份差(当前 - 目标)
long monthDiff = ChronoUnit.MONTHS.between(
targetMonth.atDay(1), // 转换为LocalDate进行比较
currentMonth.atDay(1)
);
System.out.println(monthDiff > 1);
System.out.println(currentMonth.isBefore(targetMonth));
System.out.println(currentMonth.isAfter(targetMonth));
}
/**
* 获取门店其它品牌名称
*
* @param merchantId
* @param referralReviewCommonDTOS
* @return
*/
private String getOtherBrandName(Integer merchantId, List<EffectiveReferralReviewCommonDTO> referralReviewCommonDTOS) {
String otherBrandName = "";
try {
List<EffectiveReferralReviewCommonDTO> otherBrandEffectiveReferrals =
referralReviewCommonDTOS.stream().filter(item -> item.getBrandId() == -1).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(otherBrandEffectiveReferrals)) {
Map<Integer, String> merchantBandInfoMap = this.batchQueryMerchantBandInfo(Lists.newArrayList(merchantId));
otherBrandName = this.filterDistinctBrandName(merchantBandInfoMap.get(merchantId), "鸿蒙智行");
}
} catch (Exception e) {
log.info("获取门店其它品牌名称异常,merchantId:{}", merchantId, e);
}
return otherBrandName;
}
/**
* 根据业务场景获取各业务场景引荐数 * 根据业务场景获取各业务场景引荐数
* *
* @param referralReviewCommonDTOS * @param referralReviewCommonDTOS
......
...@@ -38,6 +38,8 @@ import org.springframework.transaction.annotation.Propagation; ...@@ -38,6 +38,8 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.YearMonth;
import java.time.temporal.ChronoUnit;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -105,23 +107,43 @@ public class EffectiveReferralReviewService { ...@@ -105,23 +107,43 @@ public class EffectiveReferralReviewService {
//2、查询T1时间配置 //2、查询T1时间配置
PerformanceTimeCycleDTO performanceTimeCycleDTO = performanceTimeCycleService.selectByCode(PerformanceTimeCycleCodeEnum.T1.getCode()); PerformanceTimeCycleDTO performanceTimeCycleDTO = performanceTimeCycleService.selectByCode(PerformanceTimeCycleCodeEnum.T1.getCode());
//3、填充复核状态,待复核状态下的数据,如果当前时间大于T1时间配置内的结束时间,置为已失效 //3、当前时间年月是否比核查时间晚并超过1个月, 则不可编辑
long monthDiff = getMonthDiff(list.get(0).getReviewMonth());
//4、填充复核状态,待复核状态下的数据,如果当前时间大于T1时间配置内的结束时间,置为已失效
for (EffectiveReferralReviewCommonDTO item : list) { for (EffectiveReferralReviewCommonDTO item : list) {
if (Objects.nonNull(performanceTimeCycleDTO) if ((Objects.nonNull(performanceTimeCycleDTO)
&& performanceTimeCycleDTO.getStartDate() != null && performanceTimeCycleDTO.getStartDate() != null
&& performanceTimeCycleDTO.getEndDate() != null && performanceTimeCycleDTO.getEndDate() != null
&& item.getIsReviewed().equals(0)) { && item.getIsReviewed().equals(0)
if (new Date().after(performanceTimeCycleDTO.getEndDate())) { && new Date().after(performanceTimeCycleDTO.getEndDate()))
item.setIsReviewed(2); || (item.getIsReviewed().equals(0) && monthDiff > 1)) {
} item.setIsReviewed(2);
} }
} }
//4、返回结果 //5、返回结果
pagination = RpcPagination.copyPage(page); pagination = RpcPagination.copyPage(page);
return pagination; return pagination;
} }
/**
* 获取月份差 当前时间年月 - 核查年月
* @param reviewMonth
* @return
*/
private long getMonthDiff(String reviewMonth) {
YearMonth targetMonth = YearMonth.parse(reviewMonth);
YearMonth currentMonth = YearMonth.now();
//计算月份差(当前 - 目标)
// 转换为LocalDate进行比较
return ChronoUnit.MONTHS.between(
targetMonth.atDay(1), // 转换为LocalDate进行比较
currentMonth.atDay(1)
);
}
/** /**
* 查询有效引荐数详情 * 查询有效引荐数详情
* *
...@@ -138,13 +160,16 @@ public class EffectiveReferralReviewService { ...@@ -138,13 +160,16 @@ public class EffectiveReferralReviewService {
EffectiveReferralReviewCommonDTO reviewCommonDTO = referralReviewCommonDTOS.get(0); EffectiveReferralReviewCommonDTO reviewCommonDTO = referralReviewCommonDTOS.get(0);
//2、查询T1时间配置 //2、查询T1时间配置
PerformanceTimeCycleDTO performanceTimeCycleDTO = performanceTimeCycleService.selectByCode(PerformanceTimeCycleCodeEnum.T1.getCode()); PerformanceTimeCycleDTO performanceTimeCycleDTO = performanceTimeCycleService.selectByCode(PerformanceTimeCycleCodeEnum.T1.getCode());
if (Objects.nonNull(performanceTimeCycleDTO)
//3、当前时间年月是否比核查时间晚并超过1个月, 则不可编辑
long monthDiff = getMonthDiff(reviewCommonDTO.getReviewMonth());
if ((Objects.nonNull(performanceTimeCycleDTO)
&& performanceTimeCycleDTO.getStartDate() != null && performanceTimeCycleDTO.getStartDate() != null
&& performanceTimeCycleDTO.getEndDate() != null && performanceTimeCycleDTO.getEndDate() != null
&& reviewCommonDTO.getIsReviewed().equals(0)) { && reviewCommonDTO.getIsReviewed().equals(0)
if (new Date().after(performanceTimeCycleDTO.getEndDate())) { && new Date().after(performanceTimeCycleDTO.getEndDate()))
reviewCommonDTO.setIsReviewed(2); || (reviewCommonDTO.getIsReviewed().equals(0) && monthDiff > 1)) {
} reviewCommonDTO.setIsReviewed(2);
} }
return reviewCommonDTO; return reviewCommonDTO;
} }
......
...@@ -173,6 +173,7 @@ public class PerformanceEvaluationService { ...@@ -173,6 +173,7 @@ public class PerformanceEvaluationService {
} }
// 判断该金额加上totalExtraAmount是否大于0 如果结果大于0则抛异常说明 当前你名下的驻店销售组员,奖励金额已超出当前扣罚金额,请及时调整整体绩效等级 // 判断该金额加上totalExtraAmount是否大于0 如果结果大于0则抛异常说明 当前你名下的驻店销售组员,奖励金额已超出当前扣罚金额,请及时调整整体绩效等级
if (NumberUtil.add(subInit, totalExtraAmount).compareTo(BigDecimal.ZERO) > 0) { if (NumberUtil.add(subInit, totalExtraAmount).compareTo(BigDecimal.ZERO) > 0) {
log.info("奖励金额已超出当前扣罚金额-超过金额:{}", NumberUtil.add(subInit, totalExtraAmount));
throw new RpcServiceException("亲,当前你名下的驻店销售组员,奖励金额已超出当前扣罚金额,请及时调整整体绩效等级"); throw new RpcServiceException("亲,当前你名下的驻店销售组员,奖励金额已超出当前扣罚金额,请及时调整整体绩效等级");
} }
// 更新绩效 // 更新绩效
...@@ -286,8 +287,10 @@ public class PerformanceEvaluationService { ...@@ -286,8 +287,10 @@ public class PerformanceEvaluationService {
updatePerfAppraisal.setHandleStatus(1); updatePerfAppraisal.setHandleStatus(1);
updatePerfAppraisal.setManualFinalPerformanceAmount(perfAppraisalSubmit.getManualFinalPerformanceAmount()); updatePerfAppraisal.setManualFinalPerformanceAmount(perfAppraisalSubmit.getManualFinalPerformanceAmount());
updatePerfAppraisal.setManualGradeCode(perfAppraisalSubmit.getManualGradeCode()); updatePerfAppraisal.setManualGradeCode(perfAppraisalSubmit.getManualGradeCode());
updatePerfAppraisal.setManualRewardCoefficient(performanceLevelMap.get(perfAppraisalSubmit.getManualGradeCode()).getRewardCoefficient()); updatePerfAppraisal.setManualRewardCoefficient(ObjectUtil.isNotEmpty(perfAppraisalSubmit.getManualGradeCode()) ?
updatePerfAppraisal.setManualScoreSymbolValue(performanceLevelMap.get(perfAppraisalSubmit.getManualGradeCode()).getScoreSymbolValue()); performanceLevelMap.get(perfAppraisalSubmit.getManualGradeCode()).getRewardCoefficient() : null);
updatePerfAppraisal.setManualScoreSymbolValue(ObjectUtil.isNotEmpty(perfAppraisalSubmit.getManualGradeCode()) ?
performanceLevelMap.get(perfAppraisalSubmit.getManualGradeCode()).getScoreSymbolValue() : null);
// 绩效工资 // 绩效工资
updatePerfAppraisal.setPerformanceSalary(performanceSalary); updatePerfAppraisal.setPerformanceSalary(performanceSalary);
// 基本工资 // 基本工资
...@@ -298,6 +301,7 @@ public class PerformanceEvaluationService { ...@@ -298,6 +301,7 @@ public class PerformanceEvaluationService {
} }
// 判断 totalSubInit、totalExtraAmount加和 是否大于0 // 判断 totalSubInit、totalExtraAmount加和 是否大于0
if (NumberUtil.add(totalSubInit, totalExtraAmount).compareTo(BigDecimal.ZERO) > 0 ) { if (NumberUtil.add(totalSubInit, totalExtraAmount).compareTo(BigDecimal.ZERO) > 0 ) {
log.info("奖励金额已超出当前扣罚金额-超过金额:{}", NumberUtil.add(totalSubInit, totalExtraAmount));
throw new RpcServiceException("亲,当前你名下的驻店销售组员,奖励金额已超出当前扣罚金额,请及时调整整体绩效等级"); throw new RpcServiceException("亲,当前你名下的驻店销售组员,奖励金额已超出当前扣罚金额,请及时调整整体绩效等级");
} }
// 更新数据 // 更新数据
......
...@@ -27,7 +27,6 @@ import com.github.pagehelper.Page; ...@@ -27,7 +27,6 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.oreframework.distribute.lock.annotation.GlsxDistributeLockable; import org.oreframework.distribute.lock.annotation.GlsxDistributeLockable;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
...@@ -38,7 +37,10 @@ import tk.mybatis.mapper.entity.Example; ...@@ -38,7 +37,10 @@ import tk.mybatis.mapper.entity.Example;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.*; import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Slf4j @Slf4j
...@@ -476,10 +478,11 @@ public class StaffMonthSalarySlipService { ...@@ -476,10 +478,11 @@ public class StaffMonthSalarySlipService {
StaffMonthBdmCount oldRecord = list.get(0); StaffMonthBdmCount oldRecord = list.get(0);
oldRecord.setModifyFlag(1); oldRecord.setModifyFlag(1);
oldRecord.setShopCount(staffMonthBdmCount.getShopCount()); oldRecord.setShopCount(staffMonthBdmCount.getShopCount());
oldRecord.setRecordingCount(staffMonthBdmCount.getRecordingCount());
oldRecord.setBehaviorCount(Math.abs(staffMonthBdmCount.getRecordingCount() - oldRecord.getShopCount())); oldRecord.setBehaviorCount(Math.abs(staffMonthBdmCount.getRecordingCount() - oldRecord.getShopCount()));
oldRecord.setUpdatedDate(new Date()); oldRecord.setUpdatedDate(new Date());
oldRecord.setUpdatedBy(staffMonthBdmCount.getUpdatedBy()); oldRecord.setUpdatedBy(staffMonthBdmCount.getUpdatedBy());
return staffMonthBdmCountMapper.updateByPrimaryKeySelective(staffMonthBdmCount); return staffMonthBdmCountMapper.updateByPrimaryKeySelective(oldRecord);
} }
// 新增 // 新增
...@@ -706,6 +709,7 @@ public class StaffMonthSalarySlipService { ...@@ -706,6 +709,7 @@ public class StaffMonthSalarySlipService {
StaffMonthSalarySlipSendDTO resp = new StaffMonthSalarySlipSendDTO(); StaffMonthSalarySlipSendDTO resp = new StaffMonthSalarySlipSendDTO();
resp.setStaffName(monthSalary.getStaffName()); resp.setStaffName(monthSalary.getStaffName());
resp.setStaffPhone(monthSalary.getStaffPhone()); resp.setStaffPhone(monthSalary.getStaffPhone());
resp.setEntryDate(monthSalary.getEntryDate());
resp.setBusinessTypes(monthSalary.getBusinessTypes()); resp.setBusinessTypes(monthSalary.getBusinessTypes());
resp.setSalaryMonth(monthSalary.getSalaryMonth()); resp.setSalaryMonth(monthSalary.getSalaryMonth());
resp.setFinalDataFlag(monthSalary.getFinalDataFlag()); resp.setFinalDataFlag(monthSalary.getFinalDataFlag());
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
total_work_hours, total_work_hours,
late_early_minutes, late_early_minutes,
late_early_hours, late_early_hours,
probation_hours,
correction_hours,
probation_days,
correction_days,
missing_punch_count, missing_punch_count,
entry_date, entry_date,
correction_date, correction_date,
...@@ -44,6 +48,10 @@ ...@@ -44,6 +48,10 @@
#{totalWorkHours}, #{totalWorkHours},
#{lateEarlyMinutes}, #{lateEarlyMinutes},
#{lateEarlyHours}, #{lateEarlyHours},
#{probationHours},
#{correctionHours},
#{probationDays},
#{correctionDays},
#{missingPunchCount}, #{missingPunchCount},
#{entryDate}, #{entryDate},
#{correctionDate}, #{correctionDate},
...@@ -67,6 +75,10 @@ ...@@ -67,6 +75,10 @@
total_work_hours = VALUES(total_work_hours), total_work_hours = VALUES(total_work_hours),
late_early_minutes = VALUES(late_early_minutes), late_early_minutes = VALUES(late_early_minutes),
late_early_hours = VALUES(late_early_hours), late_early_hours = VALUES(late_early_hours),
probation_hours = VALUES(probation_hours),
correction_hours = VALUES(correction_hours),
probation_days = VALUES(probation_days),
correction_days = VALUES(correction_days),
missing_punch_count = VALUES(missing_punch_count), missing_punch_count = VALUES(missing_punch_count),
entry_date = VALUES(entry_date), entry_date = VALUES(entry_date),
correction_date = VALUES(correction_date), correction_date = VALUES(correction_date),
...@@ -93,6 +105,10 @@ ...@@ -93,6 +105,10 @@
total_work_hours, total_work_hours,
late_early_minutes, late_early_minutes,
late_early_hours, late_early_hours,
probation_hours,
correction_hours,
probation_days,
correction_days,
missing_punch_count, missing_punch_count,
entry_date, entry_date,
correction_date, correction_date,
...@@ -123,6 +139,10 @@ ...@@ -123,6 +139,10 @@
#{item.totalWorkHours}, #{item.totalWorkHours},
#{item.lateEarlyMinutes}, #{item.lateEarlyMinutes},
#{item.lateEarlyHours}, #{item.lateEarlyHours},
#{item.probationHours},
#{item.correctionHours},
#{item.probationDays},
#{item.correctionDays},
#{item.missingPunchCount}, #{item.missingPunchCount},
#{item.entryDate}, #{item.entryDate},
#{item.correctionDate}, #{item.correctionDate},
...@@ -149,6 +169,10 @@ ...@@ -149,6 +169,10 @@
total_work_hours = VALUES(total_work_hours), total_work_hours = VALUES(total_work_hours),
late_early_minutes = VALUES(late_early_minutes), late_early_minutes = VALUES(late_early_minutes),
late_early_hours = VALUES(late_early_hours), late_early_hours = VALUES(late_early_hours),
probation_hours = VALUES(probation_hours),
correction_hours = VALUES(correction_hours),
probation_days = VALUES(probation_days),
correction_days = VALUES(correction_days),
missing_punch_count = VALUES(missing_punch_count), missing_punch_count = VALUES(missing_punch_count),
entry_date = VALUES(entry_date), entry_date = VALUES(entry_date),
correction_date = VALUES(correction_date), correction_date = VALUES(correction_date),
...@@ -166,7 +190,7 @@ ...@@ -166,7 +190,7 @@
id AS id, id AS id,
mobile_phone AS mobilePhone, mobile_phone AS mobilePhone,
name AS name, name AS name,
DATE_FORMAT(attendance_month, '%Y-%m') AS attendanceMonth, attendance_month AS attendanceMonth,
expected_attendance_days AS expectedAttendanceDays, expected_attendance_days AS expectedAttendanceDays,
actual_attendance_days AS actualAttendanceDays, actual_attendance_days AS actualAttendanceDays,
appeal_attendance_days AS appealAttendanceDays, appeal_attendance_days AS appealAttendanceDays,
......
...@@ -165,7 +165,10 @@ ...@@ -165,7 +165,10 @@
<if test="id != null "> <if test="id != null ">
AND serr.id = #{id} AND serr.id = #{id}
</if> </if>
ORDER BY serr.id DESC <if test="reviewMonth != null and reviewMonth != ''">
AND serr.review_month = #{reviewMonth}
</if>
ORDER BY serr.id DESC, serr.manager_commit_time DESC
</select> </select>
......
...@@ -526,8 +526,8 @@ ...@@ -526,8 +526,8 @@
spe.merchant_name AS merchantName, spe.merchant_name AS merchantName,
spe.oId_job_post AS oIdJobPost, spe.oId_job_post AS oIdJobPost,
spe.superior_leader_name AS superiorLeaderName, spe.superior_leader_name AS superiorLeaderName,
spe.entry_date AS entryDate, DATE_FORMAT(spe.entry_date, '%Y-%m-%d') AS entryDate,
spe.leave_date AS leaveDate, DATE_FORMAT(spe.leave_date, '%Y-%m-%d') AS leaveDate,
IF(spe.is_probation = 1 AND spe.is_correction = 0, spe.before_correction_basic_salary, IF(spe.is_probation = 1 AND spe.is_correction = 0, spe.before_correction_basic_salary,
spe.after_correction_basic_salary) AS salaryStandard, spe.after_correction_basic_salary) AS salaryStandard,
sas.expected_attendance_days AS expectedAttendanceDays, sas.expected_attendance_days AS expectedAttendanceDays,
...@@ -549,8 +549,8 @@ ...@@ -549,8 +549,8 @@
AND sas.deleted_flag = 'N' AND sas.deleted_flag = 'N'
WHERE spe.deleted_flag = 'N' WHERE spe.deleted_flag = 'N'
AND spe.evaluation_month = #{evaluationMonth} AND spe.evaluation_month = #{evaluationMonth}
ORDER BY IF(name REGEXP '^[A-Za-z]', CONVERT(name USING gbk), CONVERT(CONVERT(name USING gbk) USING utf8mb4)), ORDER BY IF(spe.name REGEXP '^[A-Za-z]', CONVERT(spe.name USING gbk), CONVERT(CONVERT(spe.name USING gbk) USING utf8mb4)),
name; spe.name;
</select> </select>
......
...@@ -3,5 +3,36 @@ ...@@ -3,5 +3,36 @@
<mapper namespace="cn.com.glsx.dj.staff.mapper.SalaryAppealApplyAttachmentMapper"> <mapper namespace="cn.com.glsx.dj.staff.mapper.SalaryAppealApplyAttachmentMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.SalaryAppealApplyAttachment">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="salary_appeal_apply_record_id" property="salaryAppealApplyRecordId" jdbcType="INTEGER" />
<result column="file_name" property="fileName" jdbcType="VARCHAR" />
<result column="file_url" property="fileUrl" 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.SalaryAppealApplyAttachmentDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List">
id, salary_appeal_apply_record_id, file_name, file_url, created_by, created_date,
updated_by, updated_date, deleted_flag
</sql>
<!-- 批量查询附件列表 -->
<select id="batchSelectByRecordIds" resultMap="DTOResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM dj_car_life_salary_appeal_apply_attachment
WHERE deleted_flag = 'N'
AND salary_appeal_apply_record_id IN
<foreach collection="recordIds" item="recordId" open="(" separator="," close=")">
#{recordId}
</foreach>
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -129,6 +129,12 @@ ...@@ -129,6 +129,12 @@
AND dsmr.sub_merchant_type IN (6, 8) AND dsmr.sub_merchant_type IN (6, 8)
AND dsmr.main_merchant_type = 2 AND dsmr.main_merchant_type = 2
AND dsmr.sub_merchant_id = dsi.merchant_id AND dsmr.sub_merchant_id = dsi.merchant_id
<if test="merchantIds != null and merchantIds.size()>0">
AND dsmr.main_merchant_id IN
<foreach collection="merchantIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
) )
AND EXISTS ( AND EXISTS (
SELECT 1 SELECT 1
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
select user_id as userId, select user_id as userId,
staff_phone as staffPhone, staff_phone as staffPhone,
clock_in_date as clockInDate clock_in_date as clockInDate
from dj_car_life_staff_qw_clock_in_info_dev from dj_car_life_staff_qw_clock_in_info
where deleted_flag = 'N' where deleted_flag = 'N'
and (DATE_FORMAT(clock_in_date, '%Y-%m') = #{clockInDate}) and (DATE_FORMAT(clock_in_date, '%Y-%m') = #{clockInDate})
order by user_id; order by user_id;
......
...@@ -49,12 +49,18 @@ ...@@ -49,12 +49,18 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM dj_car_life_staff_salary_appeal_apply_record FROM dj_car_life_staff_salary_appeal_apply_record
WHERE deleted_flag = 'N' WHERE deleted_flag = 'N'
<if test="isSuper != null and !isSuper">
AND direct_leader_phone = #{loginPhone}
</if>
<if test="staffName != null and staffName != ''"> <if test="staffName != null and staffName != ''">
AND staff_name LIKE CONCAT('%', #{staffName}, '%') AND staff_name LIKE CONCAT('%', #{staffName}, '%')
</if> </if>
<if test="appealType != null"> <if test="appealType != null">
AND appeal_type = #{appealType} AND appeal_type = #{appealType}
</if> </if>
<if test="dealStatus != null">
AND deal_status = #{dealStatus}
</if>
<if test="applyStartTime != null and applyStartTime != ''"> <if test="applyStartTime != null and applyStartTime != ''">
AND created_date &gt;= #{applyStartTime} AND created_date &gt;= #{applyStartTime}
</if> </if>
...@@ -126,17 +132,13 @@ ...@@ -126,17 +132,13 @@
</foreach> </foreach>
) )
</if> </if>
<if test="sceneTypeList != null and sceneTypeList.size() > 0"> <if test="sceneType != null">
AND EXISTS ( AND EXISTS (
SELECT 1 SELECT 1
FROM dj_car_life_staff_info dclsi FROM dj_car_life_staff_info dclsi
WHERE dclsi.phone_number = dj_car_life_staff_salary_appeal_apply_record.staff_phone WHERE dclsi.phone_number = dj_car_life_staff_salary_appeal_apply_record.staff_phone
AND dclsi.deleted_flag = 'N' AND dclsi.deleted_flag = 'N'
AND ( AND FIND_IN_SET(#{sceneType}, dclsi.staff_scene_label) > 0
<foreach collection="sceneTypeList" item="sceneType" separator="OR">
FIND_IN_SET(#{sceneType}, dclsi.staff_scene_label) > 0
</foreach>
)
) )
</if> </if>
ORDER BY created_date DESC ORDER BY created_date DESC
......
...@@ -40,11 +40,11 @@ public class StaffMonthSalaryServiceTest extends BaseServiceTest { ...@@ -40,11 +40,11 @@ public class StaffMonthSalaryServiceTest extends BaseServiceTest {
@Test @Test
public void testSendMessage() { public void testSendMessage() {
Integer merchantId = env.getProperty("staff.month.salary.send.qw.notice.merchantId", Integer.class, 44202977); Integer merchantId = 44210895;
// 发送自建应用消息对应(wechat-build-server)配置门店号 // 发送自建应用消息对应(wechat-build-server)配置门店号
Integer sendConfigMerchantId = env.getProperty("staff.month.salary.send.qw.config.merchantId", Integer.class, 442029771); Integer sendConfigMerchantId = 442108951;
String agentId = env.getProperty("staff.month.salary.send.qw.notice.agentId", String.class, "1000024"); String agentId = "1000004";
String userId = qwManager.getUserId(merchantId, "17620387810"); String userId = qwManager.getUserId(merchantId, "18126301457");
String titleEnv = env.getProperty("staff.month.salary.send.qw.notice.title", String.class, "%s工资条系统数据"); String titleEnv = env.getProperty("staff.month.salary.send.qw.notice.title", String.class, "%s工资条系统数据");
String descriptionEvn = env.getProperty("staff.month.salary.send.qw.notice.description", String.class, "您好!感谢您这一月的辛勤工作,以下是您%s月的系统数据工资条,请查收!如有疑问请联系您的管辖上级处理。"); String descriptionEvn = env.getProperty("staff.month.salary.send.qw.notice.description", String.class, "您好!感谢您这一月的辛勤工作,以下是您%s月的系统数据工资条,请查收!如有疑问请联系您的管辖上级处理。");
String urlEvn = env.getProperty("staff.month.salary.send.qw.notice.url", String.class,"http://3.cn"); String urlEvn = env.getProperty("staff.month.salary.send.qw.notice.url", String.class,"http://3.cn");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!