Commit aa6e8234 authored by hongguangwu's avatar hongguangwu

优化-预估库获取基数配置

parent 34a67cd5
......@@ -42,6 +42,12 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
*/
IPage<TForecastLibrary> getTForecastLibraryPage(Page<TForecastLibrary> page, TForecastLibrary tForecastLibrary);
/**
* @Description: 批量导出
* @Author: hgw
* @Date: 2022/8/4 9:34
* @return: void
**/
void listExport(HttpServletResponse response, TForecastLibrary searchVo);
/**
......
......@@ -312,13 +312,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
String sfMapKey;
if (Common.isNotNull(librarySocialList)) {
for (TForecastLibrary library : librarySocialList) {
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getSocialPayMonth(), library.getSocialCreateMonth());
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getSocialPayMonth(), library.getSocialCreateMonth(), CommonConstants.ZERO_STRING);
socialHistoryMap.put(sfMapKey, library);
}
}
if (Common.isNotNull(libraryFundList)) {
for (TForecastLibrary library : libraryFundList) {
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getProvidentPayMonth(), library.getProvidentCreateMonth());
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getProvidentPayMonth(), library.getProvidentCreateMonth(), CommonConstants.ONE_STRING);
fundHistoryMap.put(sfMapKey, library);
}
}
......@@ -326,7 +326,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(librarySocialListTemp)) {
TForecastLibrary libraryOld;
for (TForecastLibrary library : librarySocialListTemp) {
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getSocialPayMonth(), library.getSocialCreateMonth());
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getSocialPayMonth(), library.getSocialCreateMonth(), CommonConstants.ZERO_STRING);
libraryOld = socialPushMap.get(sfMapKey);
if (libraryOld != null) {
this.getChangeAddData(libraryOld, library);
......@@ -338,7 +338,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(libraryFundListTemp)) {
TForecastLibrary libraryOld;
for (TForecastLibrary library : libraryFundListTemp) {
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getProvidentPayMonth(), library.getProvidentCreateMonth());
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getProvidentPayMonth(), library.getProvidentCreateMonth(), CommonConstants.ONE_STRING);
libraryOld = fundPushMap.get(sfMapKey);
if (libraryOld != null) {
this.getChangeAddData(libraryOld, library);
......@@ -349,14 +349,22 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
/**
* @param type 类型:0社保,1公积金
* @Description:
* @Author: hgw
* @Date: 2022/8/4 9:50
* @return: java.lang.String
**/
private String getMapKey(String empIdcard, String settleDomainId
, String socialPayMonth, String socialCreateMonth) {
, String socialPayMonth, String socialCreateMonth, String type) {
StringBuilder sfMapKey;
sfMapKey = new StringBuilder(empIdcard);
// 获取key
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(settleDomainId);
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(socialPayMonth);
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(socialCreateMonth);
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(type);
return sfMapKey.toString();
}
......@@ -438,26 +446,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
/**
* @Description: 填充key的基本信息
* @Author: hgw
* @Date: 2022-7-19 15:30:45
* @return: void
**/
private void getMapKey(StringBuilder mapKeyBuilder, String socialProvince, String socialCity, String socialTown) {
if (Common.isNotNull(socialProvince)) {
mapKeyBuilder.append(CommonConstants.DOWN_LINE_STRING).append(socialProvince);
}
if (Common.isNotNull(socialCity)) {
mapKeyBuilder.append(CommonConstants.DOWN_LINE_STRING).append(socialCity);
} else if (Common.isNotNull(socialProvince) && "12".equals(socialProvince)) {
mapKeyBuilder.append(CommonConstants.DOWN_LINE_STRING).append("135");
}
if (Common.isNotNull(socialTown)) {
mapKeyBuilder.append(CommonConstants.DOWN_LINE_STRING).append(socialTown);
}
}
private void initSocialLibary(String diffType, String payMonth, Map<String, TForecastLibrary> saveLibraryMap
, TSocialFundInfo tSocialInfo, boolean isReduceFund, HashMap<String, TAgentConfig> agentConfigMap
, TForecastLibrary lib, String sfMapKey, TForecastLibrary historyLibrary) {
......@@ -1125,6 +1113,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
// 大病取值方式:1 按比例 按派单的基数和比例来
if (CommonConstants.ONE_STRING.equals(sysBaseSetInfo.getValueType())) {
library.setUnitBigailmentBase(baseLimit);
library.setUnitBigailmentPro(sysBaseSetInfo.getPayCompanyPro());
library.setPersonalBigailmentBase(baseLimit);
library.setPersonalBigailmentPro(sysBaseSetInfo.getPayPersonalPro());
library.setPersonalBigailmentFee(BigDecimalUtils.safeMultiply(
baseLimit,
sysBaseSetInfo.getPayPersonalPro(),
......@@ -1744,7 +1736,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
for (TSocialFundInfo tSocialInfo : socialInfoList) {
minStartDate = this.getMinDate(tSocialInfo);
createMonth = ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth);
sfMapKey = this.getMapKey(tSocialInfo.getEmpIdcard(), tSocialInfo.getSettleDomain(), payMonth, createMonth);
sfMapKey = this.getMapKey(tSocialInfo.getEmpIdcard(), tSocialInfo.getSettleDomain(), payMonth, createMonth, CommonConstants.ZERO_STRING);
// 变更:已推送的,计算变更值
tForecastLibrary = socialPushMap.get(sfMapKey);
......@@ -1777,7 +1769,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(fundList)) {
for (TSocialFundInfo providentFund : fundList) {
createMonth = ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth);
sfMapKey = this.getMapKey(providentFund.getEmpIdcard(), providentFund.getSettleDomainFund(), payMonth, createMonth);
sfMapKey = this.getMapKey(providentFund.getEmpIdcard(), providentFund.getSettleDomainFund(), payMonth, createMonth, CommonConstants.ONE_STRING);
// 变更:已推送的,计算变更值
tForecastLibrary = fundPushMap.get(sfMapKey);
diffType = SocialConstants.DIFF_TYPE_ONE;
......
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