Commit d9f58056 authored by huyuchen's avatar huyuchen

实缴导入校验项目

parent 6a6abfb5
......@@ -663,6 +663,13 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty("支出信息付款状态")
private String payCollectFlag;
/**
* EKP的 是否BPO: 是 否
*/
@Schema(description = "是否BPO", name = "bpoFlag")
@ExcelIgnore
private String bpoFlag;
/**
* 是否需要生成收入
*/
......
......@@ -211,6 +211,15 @@ public class TProvidentFund extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目" )
private String settleDomain;
/**
* 项目编码
*/
@Length(max = 32, message = "项目编码 不能超过32个字符" )
@ExcelAttribute(name = "项目编码", maxLength = 32)
@Schema(description = "项目编码" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码" )
private String settleDomainCode;
/**
* 缴纳地-省
*/
......
......@@ -314,6 +314,15 @@ public class TSocialInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目" )
private String settleDomain;
/**
* 项目编码
*/
@Length(max = 32, message = "项目编码 不能超过32个字符" )
@ExcelAttribute(name = "项目编码", maxLength = 32)
@Schema(description = "项目编码" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码" )
private String settleDomainCode;
/**
* 缴纳地-省
*/
......
......@@ -1373,6 +1373,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fund.setDeleteFlag(CommonConstants.ZERO_STRING);
fund.setBelongUnit(excel.getCustomerId());
fund.setSettleDomain(excel.getSettleDomainId());
fund.setSettleDomainCode(excel.getSettleDomainCode());
if (Common.isNotNull(empVo)){
fund.setEmpId(empVo.getId());
fund.setEmpNo(empVo.getEmpNo());
......@@ -1504,6 +1505,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 封装单位信息 结算信息
social.setBelongUnit(excel.getCustomerId());
social.setSettleDomain(excel.getSettleDomainId());
social.setSettleDomainCode(excel.getSettleDomainCode());
if (Common.isNotNull(empVo)){
social.setEmpId(empVo.getId());
social.setEmpName(empVo.getEmpName());
......
......@@ -437,7 +437,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap = new ConcurrentHashMap<>();
//补缴利息
ConcurrentHashMap<String, BigDecimal> accrualMoneyMap = new ConcurrentHashMap<>();
//获取所有项目信息
Map<String, TSettleDomainSelectVo> domainMap = this.getSelectVoMap();
ExcelUtil<TPaymentInfoVo> util1 = new ExcelUtil<>(TPaymentInfoVo.class);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
......@@ -487,7 +488,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialInfo(cachedDataList, sumNumKey, importSuccessKey, errorMessageList, user,
rowNumber, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap, injuryMoneyMap,
medicalMoneyMap, accrualMoneyMap);
medicalMoneyMap, accrualMoneyMap ,domainMap);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -495,6 +496,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
domainMap.clear();
pensionMoneyMap.clear();
bigMoneyMap.clear();
unEmpMoneyMap.clear();
......@@ -544,7 +546,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, BigDecimal> birMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap,
ConcurrentHashMap<String, BigDecimal> accrualMoneyMap) {
ConcurrentHashMap<String, BigDecimal> accrualMoneyMap,
Map<String,TSettleDomainSelectVo> domainMap) {
HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
......@@ -800,7 +803,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 1.list.size()不足partSize,直接执行
if (list.size() < partSize) {
CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, list, areaMap, areaMap2,
executeImportSocialList(user, list, areaMap, areaMap2,domainMap,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
......@@ -815,7 +818,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 处理第一个0位元素
final List<TPaymentInfoVo> finalList = list.subList(0, 1);
CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, finalList, areaMap, areaMap2,
executeImportSocialList(user, finalList, areaMap, areaMap2,domainMap,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
......@@ -831,7 +834,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
lastIdx = i;
List<TPaymentInfoVo> finalTempList = tempList;
CompletableFuture<List<ErrorDetailVO>> oneCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, finalTempList, areaMap, areaMap2,
executeImportSocialList(user, finalTempList, areaMap, areaMap2,domainMap,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
......@@ -859,7 +862,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TPaymentInfoVo> finalTempList = tempList;
CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, finalTempList, areaMap, areaMap2,
executeImportSocialList(user, finalTempList, areaMap, areaMap2,domainMap,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
......@@ -932,6 +935,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TPaymentInfoVo> list,
HashMap<String, String> areaMap,
HashMap<String, String> areaMap2,
Map<String,TSettleDomainSelectVo> domainMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoPensionMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBirMap,
......@@ -954,8 +958,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String temp;
int res;
List<TSocialInfo> socialist;
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
TSettleDomain domain;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
......@@ -1294,6 +1297,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setEmpId(socialInfo.getEmpId());
paymentInfo.setEmpIdcard(socialInfo.getEmpIdcard());
paymentInfo.setEmpName(socialInfo.getEmpName());
//获取项目信息
if (Common.isNotNull(domainMap)) {
domain = domainMap.get(socialInfo.getSettleDomainCode());
} else {
domain = null;
}
if (Common.isNotNull(domain)) {
paymentInfo.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
paymentInfo.setSettleDomainId(socialInfo.getSettleDomain());
paymentInfo.setSettleDomainName(socialInfo.getSettleDomainName());
paymentInfo.setSettleDomainCode(socialInfo.getSettleDomainCode());
......@@ -1307,20 +1322,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setEmpId(tSocialInfo.getEmpId());
paymentInfo.setEmpIdcard(tSocialInfo.getEmpIdcard());
paymentInfo.setEmpName(tSocialInfo.getEmpName());
paymentInfo.setSettleDomainId(tSocialInfo.getSettleDomain());
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(tSocialInfo.getSettleDomain());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
paymentInfo.setSettleDomainName(vo.getDepartName());
paymentInfo.setSettleDomainCode(vo.getDepartNo());
paymentInfo.setUnitId(vo.getCustomerId());
paymentInfo.setUnitName(vo.getCustomerName());
}
//获取项目信息
if (Common.isNotNull(domainMap)) {
domain = domainMap.get(tSocialInfo.getSettleDomainCode());
} else {
domain = null;
}
if (Common.isNotNull(domain)) {
paymentInfo.setSettleDomainName(domain.getDepartName());
paymentInfo.setUnitId(domain.getCustomerId());
paymentInfo.setUnitName(domain.getCustomerName());
paymentInfo.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
paymentInfo.setSettleDomainId(tSocialInfo.getSettleDomainCode());
paymentInfo.setSettleDomainCode(tSocialInfo.getSettleDomain());
paymentInfo.setSocialProvince(tSocialInfo.getSocialProvince());
paymentInfo.setSocialCity(tSocialInfo.getSocialCity());
paymentInfo.setSocialTown(tSocialInfo.getSocialTown());
......@@ -1444,7 +1462,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//医疗插入的集合
ConcurrentHashMap<String,TPaymentInfo> batchYyInsertList = new ConcurrentHashMap<>();
//获取所有项目信息
Map<String, TSettleDomainSelectVo> domainMap = this.getSelectVoMapById();
Map<String, TSettleDomainSelectVo> domainMap = this.getSelectVoMap();
//地区数据
HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
......@@ -1574,7 +1592,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//批量插入的集合
List<TPaymentInfo> batchInsertList = new ArrayList<>();
//获取所有项目信息
Map<String, TSettleDomainSelectVo> domainMap = this.getSelectVoMapById();
Map<String, TSettleDomainSelectVo> domainMap = this.getSelectVoMap();
//地区数据
HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
......@@ -1794,6 +1812,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setEmpId(fund.getEmpId());
paymentInfo.setEmpIdcard(fund.getEmpIdcard());
paymentInfo.setEmpName(fund.getEmpName());
if (Common.isNotNull(domainMap)) {
domain = domainMap.get(fund.getSettleDomainCodeFund());
} else {
domain = null;
}
if (Common.isNotNull(domain)) {
paymentInfo.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
paymentInfo.setSettleDomainId(fund.getSettleDomainFund());
paymentInfo.setSettleDomainName(fund.getSettleDomainNameFund());
paymentInfo.setSettleDomainCode(fund.getSettleDomainCodeFund());
......@@ -1807,24 +1836,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setEmpId(tProvidentFund.getEmpId());
paymentInfo.setEmpIdcard(tProvidentFund.getEmpIdcard());
paymentInfo.setEmpName(tProvidentFund.getEmpName());
paymentInfo.setSettleDomainId(tProvidentFund.getSettleDomain());
//获取项目信息
if (Common.isNotNull(domainMap)) {
domain = domainMap.get(tProvidentFund.getSettleDomain());
domain = domainMap.get(tProvidentFund.getSettleDomainCode());
} else {
domain = null;
}
if (Common.isNotNull(domain)) {
paymentInfo.setSettleDomainName(domain.getDepartName());
paymentInfo.setSettleDomainCode(domain.getDepartNo());
paymentInfo.setUnitId(domain.getCustomerId());
paymentInfo.setUnitName(domain.getCustomerName());
paymentInfo.setBpoFlag(domain.getBpoFlag());
} else {
paymentInfo.setSettleDomainName("");
paymentInfo.setSettleDomainCode("");
paymentInfo.setUnitId("");
paymentInfo.setUnitName("");
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
paymentInfo.setSettleDomainId(tProvidentFund.getSettleDomain());
paymentInfo.setSettleDomainCode(tProvidentFund.getSettleDomainCode());
paymentInfo.setFundProvince(tProvidentFund.getFundProvince());
paymentInfo.setFundCity(tProvidentFund.getFundCity());
paymentInfo.setFundTown(tProvidentFund.getFundTown());
......@@ -2453,6 +2481,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setEmpId(socialInfo.getEmpId());
payExists.setEmpIdcard(socialInfo.getEmpIdcard());
payExists.setEmpName(socialInfo.getEmpName());
if (Common.isNotNull(domainMap)) {
domain = domainMap.get(tSocialInfo.getSettleDomainCode());
} else {
domain = null;
}
if (Common.isNotNull(domain)) {
payExists.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
payExists.setSettleDomainId(socialInfo.getSettleDomain());
payExists.setSettleDomainCode(Common.isNotNull(socialInfo.getSettleDomainCode()) ? socialInfo.getSettleDomainCode(): "");
payExists.setUnitId(Common.isNotNull(socialInfo.getUnitId()) ? socialInfo.getUnitId(): "");
......@@ -2466,23 +2505,22 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setEmpId(tSocialInfo.getEmpId());
payExists.setEmpIdcard(tSocialInfo.getEmpIdcard());
payExists.setEmpName(tSocialInfo.getEmpName());
payExists.setSettleDomainId(tSocialInfo.getSettleDomain());
if (Common.isNotNull(domainMap)) {
domain = domainMap.get(tSocialInfo.getSettleDomain());
domain = domainMap.get(tSocialInfo.getSettleDomainCode());
} else {
domain = null;
}
if (Common.isNotNull(domain)) {
payExists.setSettleDomainName(domain.getDepartName());
payExists.setSettleDomainCode(domain.getDepartNo());
payExists.setUnitId(domain.getCustomerId());
payExists.setUnitName(domain.getCustomerName());
payExists.setBpoFlag(domain.getBpoFlag());
} else {
payExists.setSettleDomainName("");
payExists.setSettleDomainCode("");
payExists.setUnitId("");
payExists.setUnitName("");
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
payExists.setSettleDomainId(tSocialInfo.getSettleDomain());
payExists.setSettleDomainCode(tSocialInfo.getSettleDomainCode());
payExists.setSocialProvince(tSocialInfo.getSocialProvince());
payExists.setSocialCity(tSocialInfo.getSocialCity());
payExists.setSocialTown(tSocialInfo.getSocialTown());
......@@ -3443,18 +3481,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return mapSelectVo;
}
private Map<String, TSettleDomainSelectVo> getSelectVoMapById() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVo();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
if (Common.isNotNull(settleDomainR) && Common.isNotNull(settleDomainR.getData())){
mapSelectVo = settleDomainR.getData().getMapSelectVo();
}
if (Common.isEmpty(mapSelectVo)){
ServiceUtil.runTimeExceptionDiy(CommonConstants.SETTLE_DOMAIN_GET_ERROR);
}
return mapSelectVo;
}
// hgw2023-1-6 10:44:00以下:B端相关接口
/**
* 按年查询指定人的缴费库数据
......
......@@ -43,6 +43,7 @@
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
......
......@@ -56,6 +56,7 @@
<result property="cardinalId" column="CARDINAL_ID"/>
<result property="oldId" column="OLD_ID"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
......
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