Commit 98ee829d authored by huyuchen's avatar huyuchen

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

parents 7171cace a7e86091
...@@ -159,4 +159,10 @@ public class ExcelAttributeConstants { ...@@ -159,4 +159,10 @@ public class ExcelAttributeConstants {
public static final String SOCIAL_DISPATCH_HANDLE_REASON = "social-conduct-add-reason"; 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 FUND_DISPATCH_HANDLE_REASON = "fund-conduct-add-reason";
//社保派增委托备注
public static final String TRUST_REMARK_REDUCE = "trustRemarkReduce";
//社保派减委托备注
public static final String TRUST_REMARK_ADD = "trustRemark";
} }
...@@ -96,18 +96,44 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper, ...@@ -96,18 +96,44 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
log.error("商险不购买提醒初始化停用客服异常:",e); log.error("商险不购买提醒初始化停用客服异常:",e);
} }
//处理已经离职数据,分批请求,每次请求1000条数据,返回在职人员信息 //处理已经离职数据,分批请求,每次请求1000条数据,返回在职人员信息
R<Set<String>> onlineSet;
R<Set<String>> onlineSetTemp = new R<>(); 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())); onlineSetTemp = archivesDaprUtil.getEmpOnlineMap(list.stream().map(TInsuranceAlert::getEmpIdcardNo).collect(Collectors.toList()));
}else { }else {
for (int i = 0; i < list.size(); i++) { // 提前提取身份证号列表,避免重复 stream 操作
if (i % 1000 == 0) { List<String> idCardNoList = list.stream()
onlineSet = archivesDaprUtil.getEmpOnlineMap(list.stream().map(TInsuranceAlert::getEmpIdcardNo).collect(Collectors.toList())); .map(TInsuranceAlert::getEmpIdcardNo)
if (null != onlineSet && Common.isNotNull(onlineSet.getData())) { .collect(Collectors.toList());
onlineSetTemp.getData().addAll(onlineSet.getData());
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);
} }
} }
//如果不存在离职人员直接走生成逻辑 //如果不存在离职人员直接走生成逻辑
......
...@@ -154,6 +154,6 @@ ...@@ -154,6 +154,6 @@
select a.DEPT_NAME,a.DEPT_NO, 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='0' THEN 1 ELSE 0 END) as 'lq',
SUM(CASE WHEN a.IS_OVERDUE='1' THEN 1 ELSE 0 END) as 'gq' 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> </select>
</mapper> </mapper>
...@@ -588,7 +588,7 @@ ...@@ -588,7 +588,7 @@
<select id="getEmpAccountExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountExportSpecialVo"> <select id="getEmpAccountExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountExportSpecialVo">
SELECT SELECT
a.SALARY_MONTH export1, 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.SETTLEMENT_MONTH export3,
a.DEPT_NAME export4, a.DEPT_NAME export4,
a.EMP_NAME export5, a.EMP_NAME export5,
......
...@@ -507,7 +507,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable { ...@@ -507,7 +507,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 委托备注 * 委托备注
*/ */
@Length(max = 100, message = "委托备注 不能超过100 个字符" ) @Length(max = 100, message = "委托备注 不能超过100 个字符" )
@ExcelAttribute(name = "委托备注", maxLength = 100) @ExcelAttribute(name = "委托备注", maxLength = 100,isDataId = true,dataType = ExcelAttributeConstants.TRUST_REMARK_ADD,isConvert = false)
@Schema(description = "委托备注" ) @Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" ) @ExcelProperty("委托备注" )
......
...@@ -104,7 +104,7 @@ public class TDispatchReduceVo extends RowIndex implements Serializable { ...@@ -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 = "委托备注" ) @Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" ) @ExcelProperty("委托备注" )
......
...@@ -539,12 +539,12 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -539,12 +539,12 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
if (socialInfo == null || Common.isEmpty(socialInfo.getId())) { if (socialInfo == null || Common.isEmpty(socialInfo.getId())) {
return R.failed("未找到社保"); return R.failed("未找到社保");
} else { } else {
String handleRemark; TDispatchInfo disExist = dispatchInfoMapper.selectOne(Wrappers.<TDispatchInfo>query().lambda()
.eq(TDispatchInfo::getSocialId, id).last(CommonConstants.LAST_ONE_SQL));
String handleRemark = "派增";
// 有可以转的项目,则可以转 // 有可以转的项目,则可以转
boolean canUpdate = false; boolean canUpdate = false;
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) { if (disExist != null && CommonConstants.ONE_STRING.equals(disExist.getType())) {
handleRemark = "派增";
} else {
handleRemark = "派减"; handleRemark = "派减";
} }
// 判断养工失转人工 // 判断养工失转人工
...@@ -582,7 +582,7 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -582,7 +582,7 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
} }
} }
// 更新社保和加日志 // 更新社保和加日志
return doUpdateCoreAndLog(id, user, socialInfo, handleRemark, canUpdate); return doUpdateCoreAndLog(user, socialInfo, handleRemark, canUpdate, disExist);
} }
} }
...@@ -618,12 +618,12 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -618,12 +618,12 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
if (socialInfo == null || Common.isEmpty(socialInfo.getId())) { if (socialInfo == null || Common.isEmpty(socialInfo.getId())) {
return R.failed("未找到社保"); return R.failed("未找到社保");
} else { } else {
String handleRemark; TDispatchInfo disExist = dispatchInfoMapper.selectOne(Wrappers.<TDispatchInfo>query().lambda()
.eq(TDispatchInfo::getSocialId, id).last(CommonConstants.LAST_ONE_SQL));
String handleRemark = "派增";
// 有可以转的项目,则可以转 // 有可以转的项目,则可以转
boolean canUpdate = false; boolean canUpdate = false;
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) { if (disExist != null && CommonConstants.ONE_STRING.equals(disExist.getType())) {
handleRemark = "派增";
} else {
handleRemark = "派减"; handleRemark = "派减";
} }
// 判断养工失转自动化 // 判断养工失转自动化
...@@ -660,7 +660,7 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -660,7 +660,7 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
|| CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle()) || CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) { || CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) {
socialInfo.setYsdHandleStatus(CommonConstants.FIVE_STRING); socialInfo.setYsdHandleStatus(CommonConstants.ONE_STRING);
handleRemark += "医疗、生育、大病手动转自动化"; handleRemark += "医疗、生育、大病手动转自动化";
canUpdate = true; canUpdate = true;
} else if (!CommonConstants.THREE_STRING.equals(isSocial)) { } else if (!CommonConstants.THREE_STRING.equals(isSocial)) {
...@@ -669,12 +669,11 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -669,12 +669,11 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
} }
} }
// 更新社保和加日志 // 更新社保和加日志
return doUpdateCoreAndLog(id, user, socialInfo, handleRemark, canUpdate); return doUpdateCoreAndLog(user, socialInfo, handleRemark, canUpdate, disExist);
} }
} }
/** /**
* @param id 社保ID
* @param user 当前登录人 * @param user 当前登录人
* @param socialInfo 社保信息 * @param socialInfo 社保信息
* @param handleRemark 操作备注 * @param handleRemark 操作备注
...@@ -684,11 +683,10 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -684,11 +683,10 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
* @Date: 2025/4/25 17:24 * @Date: 2025/4/25 17:24
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
private R<String> doUpdateCoreAndLog(String id, YifuUser user, TSocialInfo socialInfo, String handleRemark, boolean canUpdate) { private R<String> doUpdateCoreAndLog(YifuUser user, TSocialInfo socialInfo, String handleRemark
, boolean canUpdate, TDispatchInfo disExist) {
if (canUpdate) { if (canUpdate) {
this.updateById(socialInfo); this.updateById(socialInfo);
TDispatchInfo disExist = dispatchInfoMapper.selectOne(Wrappers.<TDispatchInfo>query().lambda()
.eq(TDispatchInfo::getSocialId, id).last(CommonConstants.LAST_ONE_SQL));
if (disExist != null) { if (disExist != null) {
socialInfo.setDispatchId(disExist.getId()); socialInfo.setDispatchId(disExist.getId());
} }
......
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