福利台账列表人数统计

This commit is contained in:
钱涛 2022-09-22 17:01:21 +08:00
parent 89893288e9
commit 31317fe8ac
2 changed files with 25 additions and 9 deletions

View File

@ -220,19 +220,19 @@ public class SIAccountBiz extends Service {
List<InsuranceArchivesSocialSchemePO> socials = siArchivesBiz.getSocialByEmployeeIds(empIds);
List<Long> emp1 = socials.stream()
.filter(s -> StringUtils.isBlank(s.getSocialEndTime()) || (SalaryDateUtil.stringToDate(s.getSocialEndTime()+ "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getSocialEndTime() + "-01"))))
.filter(s -> StringUtils.isBlank(s.getSocialEndTime()) || (SalaryDateUtil.stringToDate(s.getSocialEndTime() + "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getSocialEndTime() + "-01"))))
.map(InsuranceArchivesSocialSchemePO::getEmployeeId)
.collect(Collectors.toList());
List<InsuranceArchivesFundSchemePO> funds = siArchivesBiz.getFundByEmployeeIds(empIds);
List<Long> emp2 = funds.stream()
.filter(s -> StringUtils.isBlank(s.getFundEndTime()) || (SalaryDateUtil.stringToDate(s.getFundEndTime()+ "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getFundEndTime() + "-01"))))
.filter(s -> StringUtils.isBlank(s.getFundEndTime()) || (SalaryDateUtil.stringToDate(s.getFundEndTime() + "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getFundEndTime() + "-01"))))
.map(InsuranceArchivesFundSchemePO::getEmployeeId)
.collect(Collectors.toList());
List<InsuranceArchivesOtherSchemePO> others = siArchivesBiz.getOtherByEmployeeIds(empIds);
List<Long> emp3 = others.stream()
.filter(s -> StringUtils.isBlank(s.getOtherEndTime()) || (SalaryDateUtil.stringToDate(s.getOtherEndTime()+ "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getOtherEndTime() + "-01"))))
.filter(s -> StringUtils.isBlank(s.getOtherEndTime()) || (SalaryDateUtil.stringToDate(s.getOtherEndTime() + "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getOtherEndTime() + "-01"))))
.map(InsuranceArchivesOtherSchemePO::getEmployeeId)
.collect(Collectors.toList());
validIds.addAll(emp1);
@ -776,11 +776,11 @@ public class SIAccountBiz extends Service {
boolean otherPersonFlag = false;
for (InsuranceAccountDetailPO item : v) {
// 判断社保是否为0
socialPersonFlag = (StringUtils.isBlank(item.getSocialSum()) || Double.parseDouble(item.getSocialSum()) <=0.0 );
socialPersonFlag = (StringUtils.isBlank(item.getSocialSum()) || SalaryEntityUtil.StringEqZERO(item.getSocialSum()));
BigDecimal socialPerson = socialPersonFlag ? new BigDecimal("0") : new BigDecimal(item.getSocialSum());
fundPersonFlag = (StringUtils.isBlank(item.getFundSum()) || Double.parseDouble(item.getFundSum()) <=0.0);
fundPersonFlag = (StringUtils.isBlank(item.getFundSum()) || SalaryEntityUtil.StringEqZERO(item.getFundSum()));
BigDecimal fundPerson = fundPersonFlag ? new BigDecimal("0") : new BigDecimal(item.getFundSum());
otherPersonFlag = (StringUtils.isBlank(item.getOtherSum()) || Double.parseDouble(item.getOtherSum()) <=0.0);
otherPersonFlag = (StringUtils.isBlank(item.getOtherSum()) || SalaryEntityUtil.StringEqZERO(item.getOtherSum()));
BigDecimal otherPerson = otherPersonFlag ? new BigDecimal("0") : new BigDecimal(item.getOtherSum());
socialTemp = socialTemp.add(socialPerson);
fundTemp = fundTemp.add(fundPerson);
@ -1615,7 +1615,7 @@ public class SIAccountBiz extends Service {
int otherNum = 0;
BigDecimal otherPaySum = new BigDecimal("0");
for (InsuranceAccountDetailPO item : pos) {
if (StringUtils.isNotBlank(item.getOtherSum()) && !item.getOtherSum().equals("0")) {
if (StringUtils.isNotBlank(item.getOtherSum()) && !item.getOtherSum().equals("0")) {
otherNum += 1;
otherPaySum = otherPaySum.add(new BigDecimal(item.getOtherSum()));
}
@ -1641,7 +1641,7 @@ public class SIAccountBiz extends Service {
int socialNum = 0;
BigDecimal socialPaySum = new BigDecimal("0");
for (InsuranceAccountDetailPO item : pos) {
if (StringUtils.isNotBlank(item.getSocialSum()) && !item.getSocialSum().equals("0")) {
if (StringUtils.isNotBlank(item.getSocialSum()) && !item.getSocialSum().equals("0")) {
socialNum += 1;
socialPaySum = socialPaySum.add(new BigDecimal(item.getSocialSum()));
}
@ -1676,7 +1676,7 @@ public class SIAccountBiz extends Service {
*/
public int checkIfBusinessaccounting(InsuranceAccountBatchPO param) {
List<SIAccountUtilDTO> list = getSIAccountUtilMapper().checkIfBusinessaccounting(param.getId());
return (int) list.stream().filter(e -> e.getBillmonth().equals(e.getTaxcycle().substring(0,7))).count();
return (int) list.stream().filter(e -> e.getBillmonth().equals(e.getTaxcycle().substring(0, 7))).count();
}

View File

@ -223,6 +223,7 @@ public class SalaryEntityUtil {
/**
* String转Long
*
* @param obj
* @return
*/
@ -235,6 +236,7 @@ public class SalaryEntityUtil {
/**
* String转BigDecimal
*
* @param obj
* @return
*/
@ -247,6 +249,7 @@ public class SalaryEntityUtil {
/**
* String转BigDecimal
*
* @param obj
* @return
*/
@ -257,4 +260,17 @@ public class SalaryEntityUtil {
return BigDecimal.ZERO;
}
/**
* 判断字符串是否等于0
*
* @param obj
* @return
*/
public static boolean StringEqZERO(String obj) {
if (NumberUtils.isCreatable(obj)) {
return BigDecimal.ZERO.compareTo(new BigDecimal(obj)) == 0;
}
return false;
}
}