Commit 6d88f779 authored by hongguangwu's avatar hongguangwu

基数配置,仅更新派增办理成功、部分失败。

parent 6df329f2
......@@ -1433,7 +1433,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// 社保
if (CommonConstants.ZERO_STRING.equals(sysBaseSetInfo.getBaseType())) {
socialFundInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.eq(TSocialFundInfo::getSocialHousehold, sysBaseSetInfo.getDepartId()));
.eq(TSocialFundInfo::getSocialHousehold, sysBaseSetInfo.getDepartId())
.in(TSocialFundInfo::getSocialStatus, CommonConstants.dingleDigitStrArray[3], CommonConstants.dingleDigitStrArray[4])
.isNotNull(TSocialFundInfo::getSocialId)
);
for (TSocialFundInfo socialFundInfo : socialFundInfoList) {
// 2022-8-9 15:26:20 新增逻辑:从不收取变为收取
if (CommonConstants.ZERO_STRING.equals(sysBaseSetInfo.getIsIllness()) && socialFundInfo.getBigailmentStart() == null) {
......@@ -1449,7 +1452,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// 公积金
if (CommonConstants.ONE_STRING.equals(sysBaseSetInfo.getBaseType())) {
socialFundInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.eq(TSocialFundInfo::getProvidentHousehold, sysBaseSetInfo.getDepartId()));
.eq(TSocialFundInfo::getProvidentHousehold, sysBaseSetInfo.getDepartId())
.eq(TSocialFundInfo::getFundStatus, CommonConstants.dingleDigitStrArray[3])
.isNotNull(TSocialFundInfo::getFundId)
);
for (TSocialFundInfo socialFundInfo : socialFundInfoList) {
this.changeFundInfoByBase(socialFundInfo, sysBaseSetInfo);
socialFundInfoMap.put(socialFundInfo.getId(), socialFundInfo);
......@@ -1457,7 +1463,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
for (TSocialFundInfo socialFundInfo : socialFundInfoMap.values()) {
this.updateForecastLibaryCore(socialFundInfo, socialFundInfo.getDoMonth());
this.updateForecastLibaryCore(socialFundInfo, socialFundInfo.getDoMonth(), true);
socialFundInfoMapper.updateById(socialFundInfo);
}
}
......@@ -1472,7 +1478,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
@Override
public R<String> updateToneForecastLibary(TSocialFundInfo socialFundInfo, String doMonth) {
return this.updateForecastLibaryCore(socialFundInfo, doMonth);
return this.updateForecastLibaryCore(socialFundInfo, doMonth, false);
}
/**
......@@ -1484,7 +1490,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
@Override
public R<String> updateForecastLibaryByDispatch(TSocialFundInfo socialFundInfo) {
return this.updateForecastLibaryCore(socialFundInfo, null);
return this.updateForecastLibaryCore(socialFundInfo, null, false);
}
/**
......@@ -1604,13 +1610,14 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
/**
* @param isOnly 是否仅更新传过来的社保公积金,true:是
* @param socialFundInfo
* @Description: 根据社保公积金信息表更新预估库
* @Author: hgw
* @Date: 2022/7/26 19:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private R<String> updateForecastLibaryCore(TSocialFundInfo socialFundInfo, String doMonth) {
private R<String> updateForecastLibaryCore(TSocialFundInfo socialFundInfo, String doMonth, boolean isOnly) {
String empIdCard = socialFundInfo.getEmpIdcard();
//定义未推送的按条件查询得到的预估数据
List<TForecastLibrary> librarySocialList = null;
......@@ -1675,8 +1682,19 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT)
.in(TForecastLibrary::getProvidentPayMonth, payMonthList)
.eq(TForecastLibrary::getDataPush, CommonConstants.ONE_INT));
socialInfoList = socialFundInfoMapper.getSocialList(empIdCard, null);
fundList = socialFundInfoMapper.getFundList(empIdCard, null);
if (isOnly) {
if (Common.isNotNull(socialFundInfo.getSocialId())) {
socialInfoList = new ArrayList<>();
socialInfoList.add(socialFundInfo);
}
if (Common.isNotNull(socialFundInfo.getFundId())) {
fundList = new ArrayList<>();
fundList.add(socialFundInfo);
}
} else {
socialInfoList = socialFundInfoMapper.getSocialList(empIdCard, null);
fundList = socialFundInfoMapper.getFundList(empIdCard, null);
}
}
if (Common.isEmpty(socialInfoList)
&& Common.isEmpty(fundList)) {
......
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