往期累计情况,获取当月税款所属期数据无法导入bug,
This commit is contained in:
parent
db09f8047e
commit
6418e4ad6e
|
|
@ -605,8 +605,14 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(taxYearMonthStr);
|
||||
// 获取已经核算的数据(获取税款所属期下一个月的数据)
|
||||
YearMonth nextTaxYearMonth = SalaryDateUtil.String2YearMonth(taxYearMonthStr);
|
||||
String nextTaxYearMonthStr = taxYearMonthStr;
|
||||
if( !Objects.equals(nextTaxYearMonth.getMonthValue(),12) ){
|
||||
nextTaxYearMonth = nextTaxYearMonth.plusMonths(1);
|
||||
nextTaxYearMonthStr = nextTaxYearMonth.format(SalaryDateUtil.MONTH_FORMATTER);
|
||||
}
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(nextTaxYearMonthStr);
|
||||
|
||||
//税款所属期
|
||||
Date taxYearMonth = SalaryDateUtil.localDateToDate(LocalDate.parse(taxYearMonthStr + "-01", SalaryDateUtil.DATE_FORMATTER));
|
||||
|
|
@ -737,7 +743,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
// }
|
||||
|
||||
// 判断是否有核算过
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees) && !Objects.equals(taxYearMonthStr.split("-")[1], "12") ) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(po.getEmployeeId()) && f.getTaxAgentId().equals(po.getTaxAgentId())).findFirst();
|
||||
boolean isExist = list.stream().anyMatch(f -> f.getEmployeeId().equals(po.getEmployeeId()) && f.getTaxAgentId().equals(po.getTaxAgentId()));
|
||||
if (optionalAcctEmp.isPresent() && isExist) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue