Commit 007aae38 authored by hongguangwu's avatar hongguangwu

调基、导出相关

parent da7e1aa6
......@@ -1115,64 +1115,24 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
/**
* 初始化公积金预估信息
*
* @param payMonth
* @param saveLibraryMap
* @param providentFund
* @param isReduceSocial
* @return
* @Author fxj
* @Date 2020-07-21
**/
private void initFundLibary(String diffType, String payMonth, Map<String, TForecastLibrary> saveLibraryMap
, TSocialFundInfo providentFund, boolean isReduceSocial, TForecastLibrary lib, String mapKeyStr
, TForecastLibrary historyLibrary) {
if (lib == null) {
lib = new TForecastLibrary();
private void changeFundInfoByBase(TSocialFundInfo socialFund, SysBaseSetInfo socialSet) {
if (Common.isNotNull(socialSet) && socialFund.getUnitFundSum() != null) {
if (socialFund.getUnitProvidengCardinal().compareTo(socialSet.getLowerLimit()) < CommonConstants.ZERO_INT) {
socialFund.setUnitProvidengCardinal(socialSet.getLowerLimit());
socialFund.setPersonalProvidentCardinal(socialSet.getLowerLimit());
} else if (socialFund.getUnitPensionCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT) {
socialFund.setUnitProvidengCardinal(socialSet.getUpperLimit());
socialFund.setPersonalProvidentCardinal(socialSet.getUpperLimit());
}
lib.setDiffType(diffType);
lib.setDataType(CommonConstants.ONE_INT);
lib.setEmpId(providentFund.getEmpId());
lib.setEmpIdcard(providentFund.getEmpIdcard());
lib.setEmpName(providentFund.getEmpName());
lib.setEmpNo(providentFund.getEmpNo());
lib.setProvidentCreateMonth(ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth));
lib.setSocialCreateMonth(lib.getProvidentCreateMonth());
//同时处理社保日期
lib.setSocialPayMonth(payMonth);
lib.setProvidentPayMonth(payMonth);
lib.setFundProvince(providentFund.getFundProvince());
lib.setFundCity(providentFund.getFundCity());
lib.setFundTown(providentFund.getFundTown());
lib.setProvidentId(providentFund.getId());
lib.setUnitId(providentFund.getUnitIdFund());
lib.setSettleDomainId(providentFund.getSettleDomainFund());
//判断是否允许补缴 是否可补缴 0:是
Integer monthT = null;
if (CommonConstants.ZERO_STRING.equals(providentFund.getCanOverpay())) {
//补缴是否含当月: 含当月
if (CommonConstants.ZERO_STRING.equals(providentFund.getHaveThisMonth())) {
monthT = Integer.parseInt(DateUtil.getYearAndMonth(LocalDateTimeUtils.formatTime(providentFund.getCreateTime(), DateUtil.DATETIME_YYYYMM), 0));
//补缴是否含当月: 不含含当月
} else {
monthT = Integer.parseInt(DateUtil.getYearAndMonth(LocalDateTimeUtils.formatTime(providentFund.getCreateTime(), DateUtil.DATETIME_YYYYMM), -CommonConstants.ONE_INT));
//单边小数点处理逻辑
if (Common.isNotNull(socialSet.getFundPayPoint())){
socialFund.setUnitFundSum(Common.formatMoneyForFund(BigDecimalUtils.safeMultiply(socialFund.getUnitProvidengCardinal(), socialFund.getUnitProvidentPer(),BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())),Integer.valueOf(socialFund.getFundPayPoint())));
socialFund.setPersonalFundSum(Common.formatMoneyForFund(BigDecimalUtils.safeMultiply(socialFund.getPersonalProvidentCardinal(), socialFund.getPersonalProvidentPer(),BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())),Integer.valueOf(socialFund.getFundPayPoint())));
}
}
// 判断公积金对应缴纳月份是否派减了
boolean isReduceFund;
if (null != providentFund.getFundReduceDate()) {
isReduceFund = Integer.parseInt(payMonth) >= DateUtil.formatDateInt(providentFund.getFundReduceDate());
} else {
isReduceFund = false;
}
lib = initForecastLibrary(lib, null, providentFund, monthT, isReduceFund, isReduceSocial, null, historyLibrary);
saveLibraryMap.put(mapKeyStr, lib);
}
private void changeSocialFundInfoByBase(TSocialFundInfo social, SysBaseSetInfo socialSet) {
private void changeSocialInfoByBase(TSocialFundInfo social, SysBaseSetInfo socialSet) {
if (Common.isNotNull(socialSet)) {
social.setCanOverpay(socialSet.getCanOverpay());
social.setSocialHousehold(socialSet.getId());
......@@ -1253,6 +1213,63 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
/**
* 初始化公积金预估信息
*
* @param payMonth
* @param saveLibraryMap
* @param providentFund
* @param isReduceSocial
* @return
* @Author fxj
* @Date 2020-07-21
**/
private void initFundLibary(String diffType, String payMonth, Map<String, TForecastLibrary> saveLibraryMap
, TSocialFundInfo providentFund, boolean isReduceSocial, TForecastLibrary lib, String mapKeyStr
, TForecastLibrary historyLibrary) {
if (lib == null) {
lib = new TForecastLibrary();
}
lib.setDiffType(diffType);
lib.setDataType(CommonConstants.ONE_INT);
lib.setEmpId(providentFund.getEmpId());
lib.setEmpIdcard(providentFund.getEmpIdcard());
lib.setEmpName(providentFund.getEmpName());
lib.setEmpNo(providentFund.getEmpNo());
lib.setProvidentCreateMonth(ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth));
lib.setSocialCreateMonth(lib.getProvidentCreateMonth());
//同时处理社保日期
lib.setSocialPayMonth(payMonth);
lib.setProvidentPayMonth(payMonth);
lib.setFundProvince(providentFund.getFundProvince());
lib.setFundCity(providentFund.getFundCity());
lib.setFundTown(providentFund.getFundTown());
lib.setProvidentId(providentFund.getId());
lib.setUnitId(providentFund.getUnitIdFund());
lib.setSettleDomainId(providentFund.getSettleDomainFund());
//判断是否允许补缴 是否可补缴 0:是
Integer monthT = null;
if (CommonConstants.ZERO_STRING.equals(providentFund.getCanOverpay())) {
//补缴是否含当月: 含当月
if (CommonConstants.ZERO_STRING.equals(providentFund.getHaveThisMonth())) {
monthT = Integer.parseInt(DateUtil.getYearAndMonth(LocalDateTimeUtils.formatTime(providentFund.getCreateTime(), DateUtil.DATETIME_YYYYMM), 0));
//补缴是否含当月: 不含含当月
} else {
monthT = Integer.parseInt(DateUtil.getYearAndMonth(LocalDateTimeUtils.formatTime(providentFund.getCreateTime(), DateUtil.DATETIME_YYYYMM), -CommonConstants.ONE_INT));
}
}
// 判断公积金对应缴纳月份是否派减了
boolean isReduceFund;
if (null != providentFund.getFundReduceDate()) {
isReduceFund = Integer.parseInt(payMonth) >= DateUtil.formatDateInt(providentFund.getFundReduceDate());
} else {
isReduceFund = false;
}
lib = initForecastLibrary(lib, null, providentFund, monthT, isReduceFund, isReduceSocial, null, historyLibrary);
saveLibraryMap.put(mapKeyStr, lib);
}
/**
* @param social
* @param limitBase
......@@ -1377,7 +1394,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialFundInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.eq(TSocialFundInfo::getSocialHousehold, sysBaseSetInfo.getDepartId()));
for (TSocialFundInfo socialFundInfo : socialFundInfoList) {
this.changeSocialFundInfoByBase(socialFundInfo, sysBaseSetInfo);
this.changeSocialInfoByBase(socialFundInfo, sysBaseSetInfo);
socialFundInfoMap.put(socialFundInfo.getId(), socialFundInfo);
}
}
......@@ -1386,6 +1403,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialFundInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.eq(TSocialFundInfo::getProvidentHousehold, sysBaseSetInfo.getDepartId()));
for (TSocialFundInfo socialFundInfo : socialFundInfoList) {
this.changeFundInfoByBase(socialFundInfo, sysBaseSetInfo);
socialFundInfoMap.put(socialFundInfo.getId(), socialFundInfo);
}
}
......
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