Commit 4048f3ff authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into MVP1.7.10-Friend

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialInfoServiceImpl.java
parents 1de38be3 04a9725b
......@@ -184,9 +184,9 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelProperty("档案柜号")
private String fileCabinetNo;
/**
* 离职日期
* 离职日期 fxj 2025-05-08 优化线上邮件报错 isDate = true
*/
@ExcelAttribute(name = "离职日期")
@ExcelAttribute(name = "离职日期",isDate = true)
@Schema(description = "离职日期")
@ExcelProperty("离职日期")
private String leaveDate;
......
......@@ -159,4 +159,10 @@ public class ExcelAttributeConstants {
public static final String SOCIAL_DISPATCH_HANDLE_REASON = "social-conduct-add-reason";
// 公积金办理失败类型
public static final String FUND_DISPATCH_HANDLE_REASON = "fund-conduct-add-reason";
//社保派增委托备注
public static final String TRUST_REMARK_REDUCE = "trustRemarkReduce";
//社保派减委托备注
public static final String TRUST_REMARK_ADD = "trustRemark";
}
......@@ -10,6 +10,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialStatusUpdateVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentSocialPush;
......@@ -17,6 +18,7 @@ import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
......@@ -31,6 +33,9 @@ import java.util.stream.Collectors;
@Service
public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements EkpSocialInfoService {
private static final int MAX_RETRY = 3; // 最大重试次数
private static final long RETRY_DELAY_MS = 200; // 重试间隔
/**
//@Description: 社保明细推送至ekp
//@Author: huyc
......@@ -39,200 +44,260 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
**/
public EkpSocialPushInfoVo pushSocialInfoToEkp(List<EkpPushSocialParam> unPushList) {
//插入数据集合
List<EkpSocialInfo> socialInfoList = new ArrayList<>();
//社保推送记录表
List<TPaymentSocialPush> socialPushList = new ArrayList<>();
//社保id集合 用于更新社保状态
List<String> paymentIds = new ArrayList<>();
//获取ekp所有项目信息
List<EkpDeptInfoVo> deptInfoVoList = baseMapper.getAllEkpDeptInfo();
Map<String,EkpDeptInfoVo> map = new HashMap<>();
EkpDeptInfoVo deptInfo;
EkpSocialSumInfoVo socialSumInfo;
if (Optional.ofNullable(deptInfoVoList).isPresent()) {
map = deptInfoVoList.stream().collect(Collectors.toMap(EkpDeptInfoVo::getDeptNo, k->k));
}
EkpSocialInfo socialCount;
try {
StringBuilder stringBuilder = new StringBuilder();
for (EkpPushSocialParam socialParam : unPushList) {
//去重 防止重复推送
socialCount = baseMapper.selectOne(Wrappers.<EkpSocialInfo>query().lambda()
.eq(EkpSocialInfo::getFd_3b0b716e771e06, socialParam.getFd_3b0afbe1f94a08())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(socialCount).isPresent()) {
continue;
}
EkpSocialInfo socialInfo = new EkpSocialInfo();
//对象信息赋值
copySocialProperties(socialParam, socialInfo);
//项目信息
deptInfo = map.get(socialInfo.getFd_3adfe8c70d3fd4());
if (Common.isEmpty(deptInfo)) {
continue;
}
socialInfo.setFd_3b16e2f436ff98_text(deptInfo.getDeptName());
socialInfo.setFd_3b16e2f436ff98(deptInfo.getFdId());
//实际结算月份
if ("生成月本月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(dateStringInsert(socialInfo.getFd_3adfe8cb96c41e()));
} else if ("生成月上月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(DateUtil.dateToString(DateUtil.addMonthByDate(DateUtil.parseDate(socialInfo.getFd_3adfe8cb96c41e(), "yyyyMM"), -1), "yyyy-MM"));
} else if ("生成月次月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(DateUtil.dateToString(DateUtil.addMonthByDate(DateUtil.parseDate(socialInfo.getFd_3adfe8cb96c41e(), "yyyyMM"), 1), "yyyy-MM"));
} else {
socialInfo.setFd_3adfe8cff746bc("");
}
//是否全部结算
if ("全量未结算数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3b1354c3add8c2(CommonConstants.IS_TRUE);
} else {
socialInfo.setFd_3b1354c3add8c2(CommonConstants.IS_FALSE);
}
//生成月份
socialInfo.setFd_3adfe8cb96c41e(dateStringInsert(socialInfo.getFd_3adfe8cb96c41e()));
//获取社保订单明细合计
socialSumInfo = baseMapper.getCostSumInfo(socialInfo.getFd_3adfe8c7e4cf7a(), socialInfo.getFd_3adfe8cb96c41e());
//预估合计
BigDecimal ygSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgSum());
//预估个人合计
BigDecimal ygPersonSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgPersonSum());
//实缴合计
BigDecimal sjSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjSum());
//预估单位合计
BigDecimal ygDwSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgDwSum());
//实缴单位合计
BigDecimal sjDwSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjDwSum());
//实缴个人合计
BigDecimal sjPersonSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjPersonSum());
//应收
BigDecimal ys = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYs());
//个人应收
BigDecimal personYs = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getPersonYs());
//单位应收
BigDecimal dwYs = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getDwYs());
//实缴单位合计
BigDecimal shdw = Common.isEmpty(socialInfo.getFd_3af9f2e9208e4e()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f2e9208e4e());
//实缴个人合计
BigDecimal shgr = Common.isEmpty(socialInfo.getFd_3af9f303037214()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f303037214());
//预估合计
BigDecimal yghj = Common.isEmpty(socialInfo.getFd_3af9f2883941b4()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f2883941b4());
//预估个人合计
BigDecimal yggrhj = Common.isEmpty(socialInfo.getFd_3af9f285ee1e38()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f285ee1e38());
//预估单位部分
BigDecimal ygdwbf = Common.isEmpty(socialInfo.getFd_3adfeb4e8064a8()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3adfeb4e8064a8());
//实缴合计
BigDecimal sjhj = Common.isEmpty(socialInfo.getFd_3af9f3059e5b9c()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f3059e5b9c());
//单位差异
if ("是".equals(socialInfo.getFd_3add9de0be85e4()) && "实缴".equals(socialInfo.getFd_3add9dd7833db8())) {
//单位差异
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(预估单位合计)$)
socialInfo.setFd_3adfeb53c70f72(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum, shdw),ygDwSum).doubleValue());
//个人差异
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(预估个人合计)$)
socialInfo.setFd_3adfeb5413fb44(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum, shgr),ygPersonSum).doubleValue());
}
//Fd_3adfeb7b624f06应收;Fd_3b35a57aee1428个人应收;fd_3b35a57b6e9d0a单位应收
if ("是".equals(deptInfo.getIsBpo())) {
//应收
socialInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
socialInfo.setFd_3b35a57aee1428(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应收
socialInfo.setFd_3b35a57b6e9d0a(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
if ("实缴".equals(deptInfo.getSettleType())) {
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygSum, yghj),ys).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估个人合计)$) + $预估个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum, yggrhj),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum, ygdwbf),dwYs).doubleValue());
if (!unPushList.isEmpty()) {
Map<String, List<EkpPushSocialParam>> groups = unPushList.stream()
.collect(Collectors.groupingBy(a -> a.getFd_3adfe8c7e4cf7a() + "_" + a.getFd_3adfe8cb96c41e()));
Map<String, EkpDeptInfoVo> finalMap = map;
groups.forEach((key, group) -> {
String[] parts = key.split("_");
String idCard = parts[0];
String month = parts[1];
String lockKey = "B_LOCK:" + key;
boolean lockAcquired = false;
int retryCount = 0;
String requestId;
// 重试获取锁
while (!lockAcquired && retryCount < MAX_RETRY) {
requestId = RedisDistributedLock.getLock(lockKey, "10");
if (null != requestId) {
lockAcquired = true;
try {
processSingleGroup(idCard, month,group, finalMap,stringBuilder,socialPushList,paymentIds);
} catch (ParseException e) {
e.printStackTrace();
} finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
} else {
if (ygSum.doubleValue() > 0) {
//应收
socialInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
socialInfo.setFd_3b35a57aee1428(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应收
socialInfo.setFd_3b35a57b6e9d0a(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjSum, sjhj),ys).doubleValue());
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum, shgr),personYs).doubleValue());
//列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum, shdw),dwYs).doubleValue());
retryCount++;
try {
Thread.sleep(RETRY_DELAY_MS); // 间隔后重试
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}
});
}
if (!socialPushList.isEmpty()) {
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo pushInfoVo = new EkpSocialPushInfoVo();
pushInfoVo.setUnPushInfo(socialPushList);
pushInfoVo.setPaymentIds(paymentIds);
pushInfoVo.setPaymentIdSum(stringBuilder.toString());
return pushInfoVo;
}
}catch (Exception e) {
log.error("社保明细推送失败",e);
return null;
}
return null;
}
private void processSingleGroup(String idCard, String month, List<EkpPushSocialParam> group,
Map<String,EkpDeptInfoVo> map,StringBuilder stringBuilder,
List<TPaymentSocialPush> socialPushList,List<String> paymentIds ) throws ParseException {
//插入数据集合
List<EkpSocialInfo> socialInfoList = new ArrayList<>();
EkpDeptInfoVo deptInfo;
EkpSocialInfo socialCount;
//获取社保订单明细合计
EkpSocialSumInfoVo socialSumInfo = baseMapper.getCostSumInfo(idCard, dateStringInsert(month));
//预估单位合计
BigDecimal ygDwSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgDwSum());
//实缴单位合计
BigDecimal sjDwSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjDwSum());
//实缴个人合计
BigDecimal sjPersonSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjPersonSum());
//预估合计
BigDecimal ygSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgSum());
//预估个人合计
BigDecimal ygPersonSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgPersonSum());
//实缴合计
BigDecimal sjSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjSum());
//应收
BigDecimal ys = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYs());
//个人应收
BigDecimal personYs = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getPersonYs());
//单位应收
BigDecimal dwYs = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getDwYs());
for (EkpPushSocialParam socialParam : group) {
//去重 防止重复推送
socialCount = baseMapper.selectOne(Wrappers.<EkpSocialInfo>query().lambda()
.eq(EkpSocialInfo::getFd_3b0b716e771e06, socialParam.getFd_3b0afbe1f94a08())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(socialCount).isPresent()) {
continue;
}
EkpSocialInfo socialInfo = new EkpSocialInfo();
//对象信息赋值
copySocialProperties(socialParam, socialInfo);
//项目信息
deptInfo = map.get(socialInfo.getFd_3adfe8c70d3fd4());
if (Common.isEmpty(deptInfo)) {
continue;
}
socialInfo.setFd_3b16e2f436ff98_text(deptInfo.getDeptName());
socialInfo.setFd_3b16e2f436ff98(deptInfo.getFdId());
//实际结算月份
if ("生成月本月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(dateStringInsert(socialInfo.getFd_3adfe8cb96c41e()));
} else if ("生成月上月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(DateUtil.dateToString(DateUtil.addMonthByDate(DateUtil.parseDate(socialInfo.getFd_3adfe8cb96c41e(), "yyyyMM"), -1), "yyyy-MM"));
} else if ("生成月次月数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3adfe8cff746bc(DateUtil.dateToString(DateUtil.addMonthByDate(DateUtil.parseDate(socialInfo.getFd_3adfe8cb96c41e(), "yyyyMM"), 1), "yyyy-MM"));
} else {
socialInfo.setFd_3adfe8cff746bc("");
}
//是否全部结算
if ("全量未结算数据".equals(deptInfo.getSocialType())) {
socialInfo.setFd_3b1354c3add8c2(CommonConstants.IS_TRUE);
} else {
socialInfo.setFd_3b1354c3add8c2(CommonConstants.IS_FALSE);
}
//生成月份
socialInfo.setFd_3adfe8cb96c41e(dateStringInsert(socialInfo.getFd_3adfe8cb96c41e()));
//实缴单位合计
BigDecimal shdw = Common.isEmpty(socialInfo.getFd_3af9f2e9208e4e()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f2e9208e4e());
//实缴个人合计
BigDecimal shgr = Common.isEmpty(socialInfo.getFd_3af9f303037214()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f303037214());
//预估合计
BigDecimal yghj = Common.isEmpty(socialInfo.getFd_3af9f2883941b4()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f2883941b4());
//预估个人合计
BigDecimal yggrhj = Common.isEmpty(socialInfo.getFd_3af9f285ee1e38()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f285ee1e38());
//预估单位部分
BigDecimal ygdwbf = Common.isEmpty(socialInfo.getFd_3adfeb4e8064a8()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3adfeb4e8064a8());
//实缴合计
BigDecimal sjhj = Common.isEmpty(socialInfo.getFd_3af9f3059e5b9c()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f3059e5b9c());
//单位差异
if ("是".equals(socialInfo.getFd_3add9de0be85e4()) && "实缴".equals(socialInfo.getFd_3add9dd7833db8())) {
//单位差异
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(预估单位合计)$)
socialInfo.setFd_3adfeb53c70f72(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum, shdw),ygDwSum).doubleValue());
//个人差异
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(预估个人合计)$)
socialInfo.setFd_3adfeb5413fb44(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum, shgr),ygPersonSum).doubleValue());
}
//Fd_3adfeb7b624f06应收;Fd_3b35a57aee1428个人应收;fd_3b35a57b6e9d0a单位应收
if ("是".equals(deptInfo.getIsBpo())) {
//应收
socialInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
socialInfo.setFd_3b35a57aee1428(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应收
socialInfo.setFd_3b35a57b6e9d0a(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
if ("实缴".equals(deptInfo.getSettleType())) {
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygSum, yghj),ys).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估个人合计)$) + $预估个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum, yggrhj),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum, ygdwbf),dwYs).doubleValue());
} else {
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$-$列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygSum, yghj),ys).doubleValue());
//$列表.求总和$( $社保订单明细*总数(预估个人合计)$) + $预估个人合计$-$列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum, yggrhj),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$-$列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum, ygdwbf),dwYs).doubleValue());
if (ygSum.doubleValue() > 0) {
//应收
socialInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
socialInfo.setFd_3b35a57aee1428(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应收
socialInfo.setFd_3b35a57b6e9d0a(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjSum, sjhj),ys).doubleValue());
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum, shgr),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
//列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum, shdw),dwYs).doubleValue());
}
}
}
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//应支出
socialInfo.setFd_3adfeb7bd97464(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应支
socialInfo.setFd_3b35a5b03100c4(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应支
socialInfo.setFd_3b35a5b0b04d54(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
//应支出
socialInfo.setFd_3adfeb7bd97464(socialInfo.getFd_3af9f3059e5b9c());
//个人应支
socialInfo.setFd_3b35a5b03100c4(socialInfo.getFd_3af9f303037214());
//单位应支
socialInfo.setFd_3b35a5b0b04d54(socialInfo.getFd_3af9f2e9208e4e());
}
//创建时间
socialInfo.setCreateTime(DateUtil.getCurrentDateTime());
socialInfoList.add(socialInfo);
if (CommonConstants.ZERO_STRING.equals(socialParam.getYgFlag())) {
stringBuilder.append(socialParam.getSocialIds()).append(",");
paymentIds.add(socialParam.getSocialIds());
TPaymentSocialPush a = new TPaymentSocialPush();
a.setPaymentIds(socialParam.getSocialIds());
a.setId(socialParam.getFd_3b0afbe1f94a08());
socialPushList.add(a);
} else {
paymentIds.add(socialParam.getFd_3b0afbe1f94a08());
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$-$列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygSum, yghj),ys).doubleValue());
//$列表.求总和$( $社保订单明细*总数(预估个人合计)$) + $预估个人合计$-$列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum, yggrhj),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$-$列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum, ygdwbf),dwYs).doubleValue());
} else {
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjSum, sjhj),ys).doubleValue());
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum, shgr),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum, shdw),dwYs).doubleValue());
}
}
}
if (!socialInfoList.isEmpty()) {
boolean flag = this.saveBatch(socialInfoList);
if (flag) {
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo pushInfoVo = new EkpSocialPushInfoVo();
pushInfoVo.setUnPushInfo(socialPushList);
pushInfoVo.setPaymentIds(paymentIds);
pushInfoVo.setPaymentIdSum(stringBuilder.toString());
return pushInfoVo;
}
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//应支出
socialInfo.setFd_3adfeb7bd97464(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应支
socialInfo.setFd_3b35a5b03100c4(CommonConstants.ZERO_INTEGER.doubleValue());
//单位应支
socialInfo.setFd_3b35a5b0b04d54(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
//应支出
socialInfo.setFd_3adfeb7bd97464(socialInfo.getFd_3af9f3059e5b9c());
//个人应支
socialInfo.setFd_3b35a5b03100c4(socialInfo.getFd_3af9f303037214());
//单位应支
socialInfo.setFd_3b35a5b0b04d54(socialInfo.getFd_3af9f2e9208e4e());
}
//创建时间
socialInfo.setCreateTime(DateUtil.getCurrentDateTime());
socialInfoList.add(socialInfo);
//金额累加
//预估单位合计
ygDwSum = ygDwSum.add(Common.isEmpty(socialInfo.getFd_3adfeb4e8064a8()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3adfeb4e8064a8()));
//实缴单位合计
sjDwSum = sjDwSum.add(Common.isEmpty(socialInfo.getFd_3af9f2e9208e4e()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f2e9208e4e()));
//实缴个人合计
sjPersonSum = sjPersonSum.add(Common.isEmpty(socialInfo.getFd_3af9f303037214()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f303037214()));
//预估合计
ygSum = ygSum.add(Common.isEmpty(socialInfo.getFd_3af9f2883941b4()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f2883941b4()));
//预估个人合计
ygPersonSum = ygPersonSum.add(Common.isEmpty(socialInfo.getFd_3af9f285ee1e38()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f285ee1e38()));
//实缴合计
sjSum = sjSum.add(Common.isEmpty(socialInfo.getFd_3af9f3059e5b9c()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f3059e5b9c()));
//应收
ys = ys.add(Common.isEmpty(socialInfo.getFd_3adfeb7b624f06()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3adfeb7b624f06()));
//个人应收
personYs = personYs.add(Common.isEmpty(socialInfo.getFd_3b35a57aee1428()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3b35a57aee1428()));
//单位应收
dwYs = dwYs.add(Common.isEmpty(socialInfo.getFd_3b35a57b6e9d0a()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3b35a57b6e9d0a()));
if (CommonConstants.ZERO_STRING.equals(socialParam.getYgFlag())) {
stringBuilder.append(socialParam.getSocialIds()).append(",");
paymentIds.add(socialParam.getSocialIds());
TPaymentSocialPush a = new TPaymentSocialPush();
a.setPaymentIds(socialParam.getSocialIds());
a.setId(socialParam.getFd_3b0afbe1f94a08());
socialPushList.add(a);
} else {
paymentIds.add(socialParam.getFd_3b0afbe1f94a08());
}
}catch (Exception e) {
log.error("社保明细推送失败",e);
return null;
}
return null;
if (!socialInfoList.isEmpty()) {
this.saveBatch(socialInfoList);
}
}
@Override
......
......@@ -23,9 +23,9 @@ spring:
activate:
on-profile: prd
redis:
host: 192.168.10.153
host: 192.168.0.222
port: 22379
password: '@yf_2017'
password: '@yf_2022'
## spring security 配置
security:
oauth2:
......
......@@ -2989,6 +2989,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//兼容处理,结算月为空时赋值null huych
if(Common.isEmpty(param.getSettleMonth())){
param.setSettleMonth(null);
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期 + 购买标准 是唯一(剔除退回、过期状态的记录)
//待投保、投保中、已投保(有效、未过期)
......@@ -3357,6 +3361,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//兼容处理,结算月为空时赋值null huych
if(Common.isEmpty(param.getSettleMonth())){
param.setSettleMonth(null);
}
//记录查重校验:姓名 + 身份证号 + 保单号 + 保险公司 + 险种 + 购买标准
//待投保、投保中、已投保(有效、未过期)
......
......@@ -96,19 +96,45 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
log.error("商险不购买提醒初始化停用客服异常:",e);
}
//处理已经离职数据,分批请求,每次请求1000条数据,返回在职人员信息
R<Set<String>> onlineSet;
R<Set<String>> onlineSetTemp = new R<>();
if (list.size() <= 1000){
if (list.size() <= 2000){
onlineSetTemp = archivesDaprUtil.getEmpOnlineMap(list.stream().map(TInsuranceAlert::getEmpIdcardNo).collect(Collectors.toList()));
}else {
for (int i = 0; i < list.size(); i++) {
if (i % 1000 == 0) {
onlineSet = archivesDaprUtil.getEmpOnlineMap(list.stream().map(TInsuranceAlert::getEmpIdcardNo).collect(Collectors.toList()));
if (null != onlineSet && Common.isNotNull(onlineSet.getData())) {
onlineSetTemp.getData().addAll(onlineSet.getData());
// 提前提取身份证号列表,避免重复 stream 操作
List<String> idCardNoList = list.stream()
.map(TInsuranceAlert::getEmpIdcardNo)
.collect(Collectors.toList());
int batchSize = 2000;
int totalSize = idCardNoList.size();
// 初始化 onlineSetTemp,防止 NullPointerException
if (onlineSetTemp == null) {
onlineSetTemp = new R<>(); // 替换为实际类型
}
R<Set<String>> onlineSet;
Set<String> temp = new HashSet<>();
for (int i = 0; i < totalSize; i++) {
if (i % batchSize == 0) {
// 计算当前批次的结束索引
int end = Math.min(i + batchSize, totalSize);
// 获取当前批次的数据
List<String> subList = idCardNoList.subList(i, end);
// 调用接口获取在职人员信息
onlineSet = archivesDaprUtil.getEmpOnlineMap(subList);
// 判空处理
if (onlineSet != null && onlineSet.getData() != null && Common.isNotNull(onlineSet.getData())) {
temp.addAll(onlineSet.getData());
}
}
}
if (temp != null){
onlineSetTemp.setData(temp);
}
}
//如果不存在离职人员直接走生成逻辑
if (Common.isNotKong(onlineSetTemp.getData())){
......@@ -358,7 +384,7 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
if (Common.isEmpty(content)){
content = new StringBuilder();
content.append(String.format("项目数:%d、商险临期人数:%d、商险过期人数:%d,<br/>",
temp.getDomainNum(), temp.getGqNum(), temp.getLqNum())); pushMap.put(user.getWxMessage(), content);
temp.getDomainNum(), temp.getLqNum(), temp.getGqNum())); pushMap.put(user.getWxMessage(), content);
}
}
}
......@@ -410,7 +436,7 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>();
textcard.put("title", "<b>商险待办提醒</b>");
textcard.put("title", "商险待办提醒");
textcard.put("url", String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "66" ));
content.append("请及时至HRO系统进行处理,以免人员脱保!");
textcard.put("description", content.toString());
......
......@@ -154,6 +154,6 @@
select a.DEPT_NAME,a.DEPT_NO,
SUM(case when a.IS_OVERDUE='0' THEN 1 ELSE 0 END) as 'lq',
SUM(CASE WHEN a.IS_OVERDUE='1' THEN 1 ELSE 0 END) as 'gq'
from t_insurance_alert a GROUP BY a.DEPT_NO,a.IS_OVERDUE
from t_insurance_alert a GROUP BY a.DEPT_NO
</select>
</mapper>
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
......@@ -13,22 +14,57 @@ import java.io.Serializable;
@Data
public class TSalaryAccountExportSpecialVo implements Serializable {
private static final long serialVersionUID = 1L;
// 工资月份,发放状态,结算月份,项目名称,员工姓名,银行卡号,开户行,身份证号,工资发放方式,社保扣缴月份" +
// ",公积金扣缴月份,社保优先级,公积金优先级,年终奖扣税方案,是否扣除社保,是否扣除公积金
@ExcelProperty("工资月份")
private String export1;
@ExcelProperty("发放状态")
private String export2;
@ExcelProperty("结算月份")
private String export3;
@ExcelProperty("项目名称")
private String export4;
@ExcelProperty("员工姓名")
private String export5;
@ExcelProperty("银行卡号")
private String export6;
@ExcelProperty("开户行")
private String export7;
@ExcelProperty("身份证号")
private String export8;
@ExcelProperty("工资发放方式")
private String export9;
@ExcelProperty("社保扣缴月份")
private String export10;
@ExcelProperty("公积金扣缴月份")
private String export11;
@ExcelProperty("社保优先级")
private String export12;
@ExcelProperty("公积金优先级")
private String export13;
@ExcelProperty("年终奖扣税方案")
private String export14;
@ExcelProperty("是否扣除社保")
private String export15;
@ExcelProperty("是否扣除公积金")
private String export16;
@ExcelProperty("工资表主键")
private String accountId;
}
......@@ -387,7 +387,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
private void getEmpAccountExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo) {
String fileName = "工资条查询导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TSalaryAccountExportVo> list = new ArrayList<>();
List<TSalaryAccountExportSpecialVo> list = new ArrayList<>();
long count = baseMapper.getEmpAccountCount(searchVo);
ServletOutputStream out = null;
......
......@@ -588,7 +588,7 @@
<select id="getEmpAccountExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountExportSpecialVo">
SELECT
a.SALARY_MONTH export1,
if(a.DISTRIBUTION_FLAG='1','发放成功',if(a.DISTRIBUTION_FLAG='2','发放失败','未发放')) export2,
if(a.PAY_SETTLE_FLAG='0','已发放',if(a.PAY_SETTLE_FLAG='1','发放中','未发放')) export2,
a.SETTLEMENT_MONTH export3,
a.DEPT_NAME export4,
a.EMP_NAME export5,
......@@ -613,7 +613,6 @@
</if>
where a.DELETE_FLAG = 0
<include refid="tSalaryAccount_where"/>
order by a.SETTLEMENT_MONTH asc
<if test="tSalaryAccount != null">
<if test="tSalaryAccount.limitStart != null">
limit #{tSalaryAccount.limitStart},#{tSalaryAccount.limitEnd}
......@@ -669,7 +668,6 @@
</if>
where a.DELETE_FLAG = 0
<include refid="tSalaryAccount_where"/>
order by a.SETTLEMENT_MONTH asc
</select>
<!--tSalaryAccount简单分页查询-->
<select id="getTSalaryAccountPageDataByIds" resultMap="tSalaryAccountMap">
......
......@@ -507,7 +507,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 委托备注
*/
@Length(max = 100, message = "委托备注 不能超过100 个字符" )
@ExcelAttribute(name = "委托备注", maxLength = 100)
@ExcelAttribute(name = "委托备注", maxLength = 100,isDataId = true,dataType = ExcelAttributeConstants.TRUST_REMARK_ADD,isConvert = false)
@Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" )
......
......@@ -104,7 +104,7 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
/**
* 委托备注
*/
@ExcelAttribute(name = "委托备注" , maxLength = 200)
@ExcelAttribute(name = "委托备注" , maxLength = 200,isDataId = true,dataType = ExcelAttributeConstants.TRUST_REMARK_REDUCE,isConvert = false)
@Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" )
......
......@@ -540,7 +540,9 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
return R.failed("未找到社保");
} else {
TDispatchInfo disExist = dispatchInfoMapper.selectOne(Wrappers.<TDispatchInfo>query().lambda()
.eq(TDispatchInfo::getSocialId, id).last(CommonConstants.LAST_ONE_SQL));
.eq(TDispatchInfo::getSocialId, id)
.eq(TDispatchInfo::getStatus, CommonConstants.TWO_STRING)
.orderByDesc(TDispatchInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
String handleRemark = "派增";
// 有可以转的项目,则可以转
boolean canUpdate = false;
......@@ -619,7 +621,9 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
return R.failed("未找到社保");
} else {
TDispatchInfo disExist = dispatchInfoMapper.selectOne(Wrappers.<TDispatchInfo>query().lambda()
.eq(TDispatchInfo::getSocialId, id).last(CommonConstants.LAST_ONE_SQL));
.eq(TDispatchInfo::getSocialId, id)
.eq(TDispatchInfo::getStatus, CommonConstants.TWO_STRING)
.orderByDesc(TDispatchInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
String handleRemark = "派增";
// 有可以转的项目,则可以转
boolean canUpdate = false;
......@@ -652,14 +656,14 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
&& Common.isNotNull(socialInfo.getYsdHandleStatus())
&& CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
// 医生大状态为待办理或派减待办理
if (CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getPensionHandle())
if (CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) {
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())) {
socialInfo.setYsdHandleStatus(CommonConstants.ONE_STRING);
handleRemark += "医疗、生育、大病手动转自动化";
canUpdate = true;
......@@ -695,7 +699,11 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
, CommonConstants.ONE_STRING);
return R.ok("成功");
} else {
return R.failed("状态未变更,请刷新后查看列表状态!");
if (Common.isNotNull(handleRemark) && handleRemark.length() > 2) {
return R.failed("【"+handleRemark+"】状态未变更,请刷新后查看列表状态!");
} else {
return R.failed("状态未变更,请刷新后查看列表状态!");
}
}
}
......
......@@ -1414,12 +1414,12 @@
a.FIRST_PAY_TIME,
a.GRADUATION_TIME,
IF(a.LEAVE_DATE is not null,DATE_FORMAT(a.LEAVE_DATE,"%Y-%m-%d"),"") as "LEAVE_DATE"
,if(a.type ='1', s.add_ygs_Handle_Status, s.ygs_Handle_Status) ygs_Handle_Status
,if(a.type ='1', s.add_ysd_Handle_Status, s.ysd_Handle_Status) ysd_Handle_Status
,if(a.type ='1', s.add_YGS_REMARK, s.YGS_REMARK) YGS_REMARK
,if(a.type ='1', s.add_YSD_REMARK, s.YSD_REMARK) YSD_REMARK
,if(a.type ='1', s.add_YGS_REQUEST_ID, s.YGS_REQUEST_ID) YGS_REQUEST_ID
,if(a.type ='1', s.add_YSD_REQUEST_ID, s.YSD_REQUEST_ID) YSD_REQUEST_ID
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_ygs_Handle_Status, s.ygs_Handle_Status) ygs_Handle_Status
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_ysd_Handle_Status, s.ysd_Handle_Status) ysd_Handle_Status
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_YGS_REMARK, s.YGS_REMARK) YGS_REMARK
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_YSD_REMARK, s.YSD_REMARK) YSD_REMARK
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_YGS_REQUEST_ID, s.YGS_REQUEST_ID) YGS_REQUEST_ID
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_YSD_REQUEST_ID, s.YSD_REQUEST_ID) YSD_REQUEST_ID
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
......@@ -1665,12 +1665,12 @@
a.GRADUATION_TIME,a.AUTO_FLAG
,a.SOCIAL_HOUSEHOLD_NAME
,s.YGS_REMARK_OLD,s.YSD_REMARK_OLD
,if(a.type ='1', s.add_ygs_Handle_Status, s.ygs_Handle_Status) ygs_Handle_Status
,if(a.type ='1', s.add_ysd_Handle_Status, s.ysd_Handle_Status) ysd_Handle_Status
,if(a.type ='1', s.add_YGS_REMARK, s.YGS_REMARK) YGS_REMARK
,if(a.type ='1', s.add_YSD_REMARK, s.YSD_REMARK) YSD_REMARK
,if(a.type ='1', s.add_YGS_REQUEST_ID, s.YGS_REQUEST_ID) YGS_REQUEST_ID
,if(a.type ='1', s.add_YSD_REQUEST_ID, s.YSD_REQUEST_ID) YSD_REQUEST_ID
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_ygs_Handle_Status, s.ygs_Handle_Status) ygs_Handle_Status
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_ysd_Handle_Status, s.ysd_Handle_Status) ysd_Handle_Status
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_YGS_REMARK, s.YGS_REMARK) YGS_REMARK
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_YSD_REMARK, s.YSD_REMARK) YSD_REMARK
,if(a.type ='0' and s.add_ygs_Handle_Status != '0', s.add_YGS_REQUEST_ID, s.YGS_REQUEST_ID) YGS_REQUEST_ID
,if(a.type ='0' and s.add_ysd_Handle_Status != '0', s.add_YSD_REQUEST_ID, s.YSD_REQUEST_ID) YSD_REQUEST_ID
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
......
......@@ -528,8 +528,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
List<String> list2 = list.stream().map(PersonVo::getUid).collect(Collectors.toList());
List<String> collect = list1.stream().filter(s -> !list2.contains(s)
).collect(Collectors.toList());
log.error("要重置为不可用的用户列表:" + collect);
if (!collect.isEmpty()) {
log.error("要重置为不可用的用户列表:" + collect);
LambdaUpdateWrapper<SysUser> settleUpdate = new LambdaUpdateWrapper<>();
settleUpdate.in(SysUser::getUsername, collect)
.set(SysUser::getDelFlag, CommonConstants.ONE_STRING);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment