Commit 6dea47f8 authored by hongguangwu's avatar hongguangwu

MVP1.7.3-shuiyou 增减接口

parent 301c32d8
......@@ -62,6 +62,12 @@ public class TSocialFriendBackLog {
@ExcelProperty("请求ID")
@Schema(description = "请求ID")
private String requestId;
@ExcelAttribute(name = "类型")
@ExcelProperty("类型")
@Schema(description = "类型")
private Integer type;
/**
* 日志
*/
......
......@@ -84,7 +84,7 @@ public class SocialSoldierYsdAddVo implements Serializable {
private String socialTown;
@ExcelProperty("养老起缴日期")
private String pensionStart;
;
@ExcelProperty("养老基数")
private BigDecimal unitPensionCardinal;
@ExcelProperty("医疗起缴日期")
......
......@@ -333,8 +333,9 @@ public class SocialFriendConfig {
tszdxx.put("qyzgshbxzyhmc", vo.getQyzgshbxzyhmc());
} else {
// 企业职工基本医疗保险参保登记表 安徽非必填! 数组
String[] arr = {vo.getQyzgjbylbxcbdjb()};
// 增员、减员必填
tszdxx.put("qyzgjbylbxcbdjb", vo.getQyzgjbylbxcbdjb());
tszdxx.put("qyzgjbylbxcbdjb", arr);
}
cbrymdOne.put("tszdxx", tszdxx);
......@@ -399,7 +400,8 @@ public class SocialFriendConfig {
// tszdxx.put("zgshbxjshmc", )
if (type > 2) {
// 职工基本医疗保险参保登记表
tszdxx.put("zgjbylbxcbdjb", vo.getQyzgjbylbxcbdjb());
String[] arr = {vo.getQyzgjbylbxcbdjb()};
tszdxx.put("zgjbylbxcbdjb", arr);
}
cbrymdOne.put("tszdxx", tszdxx);
cbrymdArr.add(cbrymdOne);
......
......@@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import java.net.URL;
import java.util.List;
/**
......@@ -41,5 +40,5 @@ public interface TSocialFriendPushService extends IService<TSocialInfo> {
**/
R<String> pushFriend(List<String> dispatchIdList);
R<String> doExportRoster(String socialId, String type, String unitCreditCode);
R<String> doExportRoster(String socialId, String type, String unitCreditCode);
}
......@@ -20,9 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult;
import java.util.List;
/**
* 社保士兵
......@@ -33,7 +30,7 @@ import java.util.List;
public interface TSocialFriendService extends IService<TSocialInfo> {
/**
* @Description: 查看社保士兵反馈情况
* @Description: 查看税友反馈情况
* @Author: hgw
* @Date: 2024/5/11 14:45
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
......
......@@ -64,6 +64,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
private final TSocialDeadlineInfoService tSocialDeadlineInfoService;
private final TSocialSoldierLogService tSocialSoldierLogService;
private final TSocialFriendBackLogService tSocialFriendBackLogService;
private final TSocialFreindSetService tSocialFreindSetService;
private final TSocialInfoMapper socialMapper;
@Autowired
private ExcelMergeImage excelMergeImage;
......@@ -88,38 +89,41 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
**/
@Override
public R<String> pushFriend(List<String> dispatchIdList) {
TSocialFreindSet set = tSocialFreindSetService.getById("1");
if (set != null && Common.isNotNull(set.getType()) && 1 == set.getType()) {
// 获取时间限制配置(获取 当月启用 的配置)
Map<String, TSocialDeadlineInfo> socialSetMap = tSocialDeadlineInfoService.getSocialSetByAreaId();
// 获取时间限制配置(获取 当月启用 的配置)
Map<String, TSocialDeadlineInfo> socialSetMap = tSocialDeadlineInfoService.getSocialSetByAreaId();
// 社保增员、社保减员、医保增员、医保减员
// 养工失新增列表
List<SociaFriendYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList);
if (ygsAddlist != null && !ygsAddlist.isEmpty()) {
this.doPushSocialAndLogYgs(socialSetMap, ygsAddlist, 1);
}
// 社保增员、社保减员、医保增员、医保减员
// 养工失新增列表
List<SociaFriendYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList);
if (ygsAddlist != null && !ygsAddlist.isEmpty()) {
this.doPushSocialAndLogYgs(socialSetMap, ygsAddlist, 1);
}
// 养工失减少列表
List<SociaFriendYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList);
if (ygsReducelist != null && !ygsReducelist.isEmpty()) {
this.doPushSocialAndLogYgs(socialSetMap, ygsReducelist, 2);
}
// 医生大新增列表
List<SociaFriendYgsAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList);
if (ysdAddlist != null && !ysdAddlist.isEmpty()) {
this.doPushSocialAndLogYsd(socialSetMap, ysdAddlist, 3);
}
// 医生大减少列表
List<SociaFriendYgsAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList);
if (ysdReducelist != null && !ysdReducelist.isEmpty()) {
this.doPushSocialAndLogYsd(socialSetMap, ysdReducelist, 4);
}
if ((ygsAddlist == null || ygsAddlist.isEmpty())
&& (ygsReducelist == null || ygsReducelist.isEmpty())
&& (ysdAddlist == null || ysdAddlist.isEmpty())
&& (ysdReducelist == null || ysdReducelist.isEmpty())
) {
return R.failed("无数据,推送结束!");
// 养工失减少列表
List<SociaFriendYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList);
if (ygsReducelist != null && !ygsReducelist.isEmpty()) {
this.doPushSocialAndLogYgs(socialSetMap, ygsReducelist, 2);
}
// 医生大新增列表
List<SociaFriendYgsAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList);
if (ysdAddlist != null && !ysdAddlist.isEmpty()) {
this.doPushSocialAndLogYsd(socialSetMap, ysdAddlist, 3);
}
// 医生大减少列表
List<SociaFriendYgsAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList);
if (ysdReducelist != null && !ysdReducelist.isEmpty()) {
this.doPushSocialAndLogYsd(socialSetMap, ysdReducelist, 4);
}
if ((ygsAddlist == null || ygsAddlist.isEmpty())
&& (ygsReducelist == null || ygsReducelist.isEmpty())
&& (ysdAddlist == null || ysdAddlist.isEmpty())
&& (ysdReducelist == null || ysdReducelist.isEmpty())
) {
return R.failed("无数据,推送结束!");
}
}
return R.ok("推送成功!!");
}
......@@ -153,6 +157,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
socialInfo.setId(vo.getSocialId());
backLog = new TSocialFriendBackLog();
backLog.setSocialId(vo.getSocialId());
backLog.setType(type);
// 房工接口,获取 企业职工社会保险增员花名册 url
urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode());
if (urlR != null && urlR.getCode()==200 && Common.isNotNull(urlR.getData())) {
......@@ -231,6 +236,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
socialInfo.setId(vo.getSocialId());
backLog = new TSocialFriendBackLog();
backLog.setSocialId(vo.getSocialId());
backLog.setType(type);
// 房工接口,获取 企业职工基本医疗保险参保登记表 url
urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode());
if (urlR != null && urlR.getCode()==200 && Common.isNotNull(urlR.getData())) {
......@@ -625,6 +631,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
inputStreamOut = new FileInputStream(outFile);
// 转换成图片 完成后清理流
TSocialFriendBackLog backLog = new TSocialFriendBackLog();
backLog.setType(Integer.parseInt(type));
R<String> ulrR = excelToImage.excelToImg(inputStreamOut,socialFriendConfig,restTemplate, backLog);
tSocialFriendBackLogService.save(backLog);
return ulrR;
......@@ -888,6 +895,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
inputStreamOut = new FileInputStream(outFile);
// 转换成图片 完成后清理流
TSocialFriendBackLog backLog = new TSocialFriendBackLog();
backLog.setType(Integer.parseInt(type));
R<String> ulrR = excelToImage.excelToImg(inputStreamOut,socialFriendConfig,restTemplate, backLog);
tSocialFriendBackLogService.save(backLog);
return ulrR;
......
......@@ -57,6 +57,7 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
private final TAuditInfoService tAuditInfoService;
private final TSocialSoldierLogService tSocialSoldierLogService;
private final TSocialFriendBackLogService tSocialFriendBackLogService;
private final TSocialFreindSetService tSocialFreindSetService;
/**
* @Description: 5 查看任务进度
......@@ -66,59 +67,62 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
**/
@Override
public R<String> getInfoByRequestId() {
// true养工失 false 医生大
boolean typeFlag = true;
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
YifuUser user = new YifuUser("1", 1L, "", "税友",
"税友", "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null);
// 失败原因配置
Map<String, FailReasonConfig> errorMap = failReasonConfigService.getFailReasonMap();
// 获取所有需要反馈的任务id
List<TSocialInfo> socialList = tSocialInfoService.getSocialFriendYgsAll();
List<TSocialFriendBackLog> logList;
TSocialFriendBackLog backLog;
if (socialList != null && !socialList.isEmpty()) {
FriendResult info;
logList = new ArrayList<>();
for (TSocialInfo socialInfo : socialList) {
backLog = new TSocialFriendBackLog();
backLog.setSocialId(socialInfo.getId());
backLog.setRequestId(socialInfo.getYgsRequestId());
info = socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYgsRequestId(), backLog);
logList.add(backLog);
if (info != null && Common.isNotNull(info.getZt())) {
doCore(info, socialInfo, typeFlag, user, errorMap);
TSocialFreindSet set = tSocialFreindSetService.getById("1");
if (set != null && Common.isNotNull(set.getType()) && 1 == set.getType()) {
// true养工失 false 医生大
boolean typeFlag = true;
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
YifuUser user = new YifuUser("1", 1L, "", "税友",
"税友", "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null);
// 失败原因配置
Map<String, FailReasonConfig> errorMap = failReasonConfigService.getFailReasonMap();
// 获取所有需要反馈的任务id
List<TSocialInfo> socialList = tSocialInfoService.getSocialFriendYgsAll();
List<TSocialFriendBackLog> logList;
TSocialFriendBackLog backLog;
if (socialList != null && !socialList.isEmpty()) {
FriendResult info;
logList = new ArrayList<>();
for (TSocialInfo socialInfo : socialList) {
backLog = new TSocialFriendBackLog();
backLog.setSocialId(socialInfo.getId());
backLog.setRequestId(socialInfo.getYgsRequestId());
info = socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYgsRequestId(), backLog);
logList.add(backLog);
if (info != null && Common.isNotNull(info.getZt())) {
doCore(info, socialInfo, typeFlag, user, errorMap);
}
}
}
if (!logList.isEmpty()) {
tSocialFriendBackLogService.saveBatch(logList);
}
}
// 医保
typeFlag = false;
List<TSocialInfo> socialYsdList = tSocialInfoService.getSocialFriendYsdAll();
if (socialYsdList != null && !socialYsdList.isEmpty()) {
FriendResult info;
logList = new ArrayList<>();
for (TSocialInfo socialInfo : socialYsdList) {
backLog = new TSocialFriendBackLog();
backLog.setSocialId(socialInfo.getId());
backLog.setRequestId(socialInfo.getYsdRequestId());
info = socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYsdRequestId(), backLog);
logList.add(backLog);
if (info != null && Common.isNotNull(info.getZt())) {
doCore(info, socialInfo, typeFlag, user, errorMap);
if (!logList.isEmpty()) {
tSocialFriendBackLogService.saveBatch(logList);
}
}
if (!logList.isEmpty()) {
tSocialFriendBackLogService.saveBatch(logList);
// 医保
typeFlag = false;
List<TSocialInfo> socialYsdList = tSocialInfoService.getSocialFriendYsdAll();
if (socialYsdList != null && !socialYsdList.isEmpty()) {
FriendResult info;
logList = new ArrayList<>();
for (TSocialInfo socialInfo : socialYsdList) {
backLog = new TSocialFriendBackLog();
backLog.setSocialId(socialInfo.getId());
backLog.setRequestId(socialInfo.getYsdRequestId());
info = socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYsdRequestId(), backLog);
logList.add(backLog);
if (info != null && Common.isNotNull(info.getZt())) {
doCore(info, socialInfo, typeFlag, user, errorMap);
}
}
if (!logList.isEmpty()) {
tSocialFriendBackLogService.saveBatch(logList);
}
}
}
return R.ok();
......@@ -428,6 +432,9 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
auditInfo.setId(null);
auditInfo.setAuditStatus(CommonConstants.TWO_STRING);
auditInfo.setAuditRemark(handleRemark);
if (Common.isNotNull(title) && title.length() > 255) {
title = title.substring(0, 255);
}
auditInfo.setTitle(title);
auditInfo.setOrganName(user.getDeptName());
auditInfo.setAuditUser(user.getNickname());
......
......@@ -25,10 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialDeadlineInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
......@@ -69,6 +66,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
private final TAutoPaymentDetailService tAutoPaymentDetailService;
private final TSocialDeadlineInfoService tSocialDeadlineInfoService;
private final TSocialSoldierLogService tSocialSoldierLogService;
private final TSocialFreindSetService tSocialFreindSetService;
// 安徽省之外的,默认社保士兵
private static final String SOCIAL_PROVINCE = "安徽省";
/**
* @param socialList
......@@ -162,6 +162,21 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return new CommonsMultipartFile(item);
}
/**
* @param
* @Description: 查询配置开关是否为社保士兵 true:开 false 关(不是安徽省,也可以处理)
* @Author: hgw
* @Date: 2024/12/13 15:29
* @return: boolean
**/
private boolean getFriendSet() {
TSocialFreindSet set = tSocialFreindSetService.getById("1");
boolean setFlag = false;
if (set == null || Common.isEmpty(set.getType()) || 0 == set.getType()) {
setFlag = true;
}
return setFlag;
}
/**
* @Description: 推送到社保士兵
* @Author: hgw
......@@ -171,6 +186,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
@Override
public R<String> pushSoldier(List<String> dispatchIdList) {
// 查询配置开关是否为社保士兵 true:开 false 关(不是安徽省,也可以处理)
boolean setFlag = getFriendSet();
// 获取时间限制配置(获取 当月启用 的配置)
Map<String, TSocialDeadlineInfo> socialsetMap = tSocialDeadlineInfoService.getSocialSet();
......@@ -178,23 +196,23 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
// 养工失新增列表
List<SocialSoldierYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList);
if (ygsAddlist != null && !ygsAddlist.isEmpty()) {
this.doPushSocialAndLogYgs(socialsetMap, ygsAddlist, "社保增员");
this.doPushSocialAndLogYgs(socialsetMap, ygsAddlist, "社保增员", setFlag);
}
// 养工失减少列表
List<SocialSoldierYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList);
if (ygsReducelist != null && !ygsReducelist.isEmpty()) {
this.doPushSocialAndLogYgs(socialsetMap, ygsReducelist, "社保减员");
this.doPushSocialAndLogYgs(socialsetMap, ygsReducelist, "社保减员", setFlag);
}
// 医生大新增列表
List<SocialSoldierYsdAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList);
if (ysdAddlist != null && !ysdAddlist.isEmpty()) {
this.doPushSocialAndLogYsd(socialsetMap, ysdAddlist, "医保增员");
this.doPushSocialAndLogYsd(socialsetMap, ysdAddlist, "医保增员", setFlag);
}
// 医生大减少列表
List<SocialSoldierYsdAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList);
if (ysdReducelist != null && !ysdReducelist.isEmpty()) {
this.doPushSocialAndLogYsd(socialsetMap, ysdReducelist, "医保减员");
this.doPushSocialAndLogYsd(socialsetMap, ysdReducelist, "医保减员", setFlag);
}
if ((ygsAddlist == null || ygsAddlist.isEmpty())
&& (ygsReducelist == null || ygsReducelist.isEmpty())
......@@ -203,6 +221,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
) {
return R.failed("无数据,推送结束!");
}
return R.ok("推送成功!!");
}
......@@ -213,7 +232,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
* @return: void
**/
private void doPushSocialAndLogYgs(Map<String, TSocialDeadlineInfo> socialsetMap
, List<SocialSoldierYgsAddVo> ygsAddlist, String socialType) {
, List<SocialSoldierYgsAddVo> ygsAddlist, String socialType, boolean setFlag) {
List<TSocialInfo> socialIdList = new ArrayList<>();
int canPushType;
TSocialInfo socialInfo;
......@@ -224,29 +243,32 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
String remark;
List<TSocialInfo> renGongList = new ArrayList<>();
for (SocialSoldierYgsAddVo vo : ygsAddlist) {
// 0:未到时间不动; 1:推送; 2:转人工
canPushType = this.getCanPushType(socialsetMap, vo);
if (1 == canPushType) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
ygsAddlistCopy.add(vo);
remark = "已推送提交任务!";
} else {
if (0 == canPushType) {
remark = "未到时间,不推送!";
} else {
remark = "无时间配置或超出办理截止时间,转人工!";
if (setFlag || !SOCIAL_PROVINCE.equals(vo.getSocialProvince())) {
// 0:未到时间不动; 1:推送; 2:转人工
canPushType = this.getCanPushType(socialsetMap, vo);
if (1 == canPushType) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialInfo.setYgsHandleStatus(CommonConstants.FIVE_STRING);
renGongList.add(socialInfo);
socialIdList.add(socialInfo);
ygsAddlistCopy.add(vo);
remark = "已推送提交任务!";
} else {
if (0 == canPushType) {
remark = "未到时间,不推送!";
} else {
remark = "无时间配置或超出办理截止时间,转人工!";
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialInfo.setYgsHandleStatus(CommonConstants.FIVE_STRING);
renGongList.add(socialInfo);
}
}
socialLog = tSocialSoldierLogService.getYgsSoldierLog(vo, type, remark);
if (socialLog != null) {
logList.add(socialLog);
}
}
socialLog = tSocialSoldierLogService.getYgsSoldierLog(vo, type, remark);
if (socialLog != null) {
logList.add(socialLog);
}
}
if (!renGongList.isEmpty()) {
......@@ -281,7 +303,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
* @return: void
**/
private void doPushSocialAndLogYsd(Map<String, TSocialDeadlineInfo> socialsetMap
, List<SocialSoldierYsdAddVo> ysdAddlist, String socialType) {
, List<SocialSoldierYsdAddVo> ysdAddlist, String socialType, boolean setFlag) {
List<TSocialInfo> socialIdList = new ArrayList<>();
int canPushType;
TSocialInfo socialInfo;
......@@ -292,29 +314,31 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
List<TSocialInfo> renGongList = new ArrayList<>();
String remark;
for (SocialSoldierYsdAddVo vo : ysdAddlist) {
// 0:未到时间不动; 1:推送; 2:转人工
canPushType = this.getCanPushTypeYsd(socialsetMap, vo);
if (1 == canPushType) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
ysdAddlistCopy.add(vo);
remark = "已推送提交任务!";
} else {
if (0 == canPushType) {
remark = "未到时间,不推送!";
} else {
remark = "无时间配置或超出办理截止时间,转人工!";
if (setFlag || !SOCIAL_PROVINCE.equals(vo.getSocialProvince())) {
// 0:未到时间不动; 1:推送; 2:转人工
canPushType = this.getCanPushTypeYsd(socialsetMap, vo);
if (1 == canPushType) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialInfo.setYsdHandleStatus(CommonConstants.FIVE_STRING);
renGongList.add(socialInfo);
socialIdList.add(socialInfo);
ysdAddlistCopy.add(vo);
remark = "已推送提交任务!";
} else {
if (0 == canPushType) {
remark = "未到时间,不推送!";
} else {
remark = "无时间配置或超出办理截止时间,转人工!";
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialInfo.setYsdHandleStatus(CommonConstants.FIVE_STRING);
renGongList.add(socialInfo);
}
}
socialLog = tSocialSoldierLogService.getYsdSoldierLog(vo, type, remark);
if (socialLog != null) {
logList.add(socialLog);
}
}
socialLog = tSocialSoldierLogService.getYsdSoldierLog(vo, type, remark);
if (socialLog != null) {
logList.add(socialLog);
}
}
if (!renGongList.isEmpty()) {
......@@ -464,6 +488,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
**/
@Override
public R<String> pushSoldierByAudit() {
// 养工失待审核列表
List<SocialSoldierYgsAuditVo> ygsAddlist = baseMapper.getSocialSoldierYgsAuditVoList();
List<SocialSoldierYgsAuditVo> ygsAddByGroupBylist = baseMapper.getSocialSoldierYgsAuditVoListByGroupBy();
......
......@@ -89,6 +89,10 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 附件
private final String RESULT_ANNEX = "resultAnnex";
private final TSocialFreindSetService tSocialFreindSetService;
// 安徽省之外的,默认社保士兵
private static final String SOCIAL_PROVINCE = "安徽省";
/**
* @Description: 6每月6号定时任务获取社保士兵实缴3张表
* @Author: hgw
......@@ -1476,6 +1480,22 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
return R.ok(voList);
}
/**
* @param
* @Description: 查询配置开关是否为社保士兵 true:开 false 关(不是安徽省,也可以处理)
* @Author: hgw
* @Date: 2024/12/13 15:29
* @return: boolean
**/
private boolean getFriendSet() {
TSocialFreindSet set = tSocialFreindSetService.getById("1");
boolean setFlag = false;
if (set == null || Common.isEmpty(set.getType()) || 0 == set.getType()) {
setFlag = true;
}
return setFlag;
}
/**
* @param addId
* @Description: 5 查看任务进度
......@@ -1503,14 +1523,20 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
if (socialList != null && !socialList.isEmpty()) {
Map<String, TSocialInfo> idCardMap = new HashMap<>();
Set<String> addIdSet = new HashSet<>();
// 查询配置开关是否为社保士兵 true:开 false 关(不是安徽省,也可以处理)
boolean setFlag = getFriendSet();
for (TSocialInfo socialInfo : socialList) {
if (Common.isNotNull(socialInfo.getYgsAddId())) {
addIdSet.add(socialInfo.getYgsAddId());
idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
}
if (Common.isNotNull(socialInfo.getYsdAddId())) {
addIdSet.add(socialInfo.getYsdAddId());
idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
if (setFlag || !SOCIAL_PROVINCE.equals(socialInfo.getSocialProvince())) {
if (Common.isNotNull(socialInfo.getYgsAddId())) {
addIdSet.add(socialInfo.getYgsAddId());
idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
}
if (Common.isNotNull(socialInfo.getYsdAddId())) {
addIdSet.add(socialInfo.getYsdAddId());
idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
}
}
}
HttpURLConnection conn;
......
......@@ -28,6 +28,7 @@
<result property="socialId" column="SOCIAL_ID"/>
<result property="requestId" column="REQUEST_ID"/>
<result property="logInfo" column="LOG_INFO"/>
<result property="type" column="TYPE"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
......
......@@ -116,7 +116,7 @@
<sql id="where_getSocialSoldier_base_handler">
<where>
a.DELETE_FLAG = '0'
a.DELETE_FLAG = '0' and a.SOCIAL_PROVINCE = '12'
<if test="idsStr != null and idsStr.size > 0">
AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
......
......@@ -595,6 +595,7 @@
<select id="getSocialSoldierYgsAll" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.SOCIAL_PROVINCE,
a.EMP_NAME,
a.SOCIAL_HOUSEHOLD_NAME,
a.EMP_IDCARD,
......@@ -618,6 +619,7 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id
<select id="getSocialSoldierYsdAll" resultMap="tSocialInfoMap">
SELECT
a.ID,
a.SOCIAL_PROVINCE,
a.EMP_NAME,
a.SOCIAL_HOUSEHOLD_NAME,
a.EMP_IDCARD,
......
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