Commit 2cc5a805 authored by hongguangwu's avatar hongguangwu

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

parents 7d1817a0 8147fd58
......@@ -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 = "trustRemarkAdd";
}
......@@ -96,18 +96,44 @@ 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);
}
}
//如果不存在离职人员直接走生成逻辑
......
......@@ -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_REDUCE)
@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_ADD)
@Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" )
......
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