将除重新核算的项目外的所有的值都锁定
This commit is contained in:
parent
59c32b24e6
commit
0aabcd0471
|
|
@ -254,8 +254,21 @@ public class SalaryAcctManager extends Service {
|
||||||
// 7、查询考勤引用的所有字段
|
// 7、查询考勤引用的所有字段
|
||||||
List<AttendQuoteFieldListDTO> attendQuoteFieldListDTOS = getAttendQuoteFieldService(user).listAll();
|
List<AttendQuoteFieldListDTO> attendQuoteFieldListDTOS = getAttendQuoteFieldService(user).listAll();
|
||||||
|
|
||||||
//核算锁定值
|
// //核算锁定值
|
||||||
List<Long> lockSalaryItemIds = salaryAcctRecordPO.getLockSalaryItemIds();
|
// List<Long> lockSalaryItemIds = salaryAcctRecordPO.getLockSalaryItemIds();
|
||||||
|
// Map<String, SalaryAcctResultPO> acctResults = new HashMap<>();
|
||||||
|
// if (CollectionUtils.isNotEmpty(lockSalaryItemIds)) {
|
||||||
|
// List<SalaryAcctResultPO> acctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecordId));
|
||||||
|
// acctResults = Optional.ofNullable(acctResultPOS)
|
||||||
|
// .orElse(new ArrayList<>())
|
||||||
|
// .stream()
|
||||||
|
// .filter(po -> lockSalaryItemIds.contains(po.getSalaryItemId()))
|
||||||
|
// .collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a));
|
||||||
|
// }
|
||||||
|
|
||||||
|
//将除重新核算的项目外的所有的值都锁定
|
||||||
|
List<Long> salaryItemIds = calculateParam.getSalaryItemIds();
|
||||||
|
List<Long> lockSalaryItemIds = salaryItemPOS.stream().map(SalaryItemPO::getId).filter(id -> !salaryItemIds.contains(id)).collect(Collectors.toList());
|
||||||
Map<String, SalaryAcctResultPO> acctResults = new HashMap<>();
|
Map<String, SalaryAcctResultPO> acctResults = new HashMap<>();
|
||||||
if (CollectionUtils.isNotEmpty(lockSalaryItemIds)) {
|
if (CollectionUtils.isNotEmpty(lockSalaryItemIds)) {
|
||||||
List<SalaryAcctResultPO> acctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecordId));
|
List<SalaryAcctResultPO> acctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecordId));
|
||||||
|
|
@ -266,6 +279,7 @@ public class SalaryAcctManager extends Service {
|
||||||
.collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a));
|
.collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 8、查询公式详情
|
// 8、查询公式详情
|
||||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getFormulaId);
|
Set<Long> formulaIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getFormulaId);
|
||||||
formulaIds.addAll(SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId));
|
formulaIds.addAll(SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue