|
@@ -136,7 +136,7 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
|
|
|
List<AllocationQuery> allocationQueryList = allocationQueryService.list(new QueryWrapper<AllocationQuery>().lambda().eq(AllocationQuery::getHospId, hospId)
|
|
|
.eq(year > 0, AllocationQuery::getDateYear, year)
|
|
|
.eq(month > 0, AllocationQuery::getDateMonth, month)
|
|
|
- .eq(AllocationQuery::getOriginType, NumberConstant.TWO));
|
|
|
+ );
|
|
|
if (CollUtil.isEmpty(allocationQueryList)) {
|
|
|
throw new CostException(500, "分摊后数据不存在");
|
|
|
}
|
|
@@ -182,6 +182,7 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
|
|
|
Map<Long, List<CostDepartmentProfitVO>> listMap = list.stream().collect(Collectors.groupingBy(CostDepartmentProfitVO::getReportId));
|
|
|
// 记录每一次计算的钱
|
|
|
list.forEach(i -> {
|
|
|
+ Long reportId = i.getReportId();
|
|
|
Integer calcType = i.getCalcType();
|
|
|
if (NumberConstant.ONE.equals(calcType)){
|
|
|
// TODO 按照会计科目进行计算
|
|
@@ -298,7 +299,8 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
|
|
|
// 查找在归集数据里面当前责任中心对应的这些会计科目的金额
|
|
|
List<IncomeCollection> incomeCollectionList = list.stream().filter(income -> income.getResponsibilityCode().equals(i.getResponsibilityCode()) && accountList.contains(income.getAccountingCode())).collect(Collectors.toList());
|
|
|
// 需要查询分摊后的表
|
|
|
- // 归集加
|
|
|
+ List<AllocationQueryReportVO> collect = allocationQueryReportVOList.stream().filter(m -> m.getResponsibilityCode().equals(i.getResponsibilityCode())).collect(Collectors.toList());
|
|
|
+ List<AllocationQueryReportVO> collect1 = collect.stream().filter(m -> !Collections.disjoint(accountList, m.getAccountingCodes())).collect(Collectors.toList());
|
|
|
List<AllocationQueryReportVO> reportVOList = allocationQueryReportVOList.stream().filter(m -> m.getResponsibilityCode().equals(i.getResponsibilityCode()) && !Collections.disjoint(accountList, m.getAccountingCodes())).collect(Collectors.toList());
|
|
|
if (CollUtil.isNotEmpty(incomeCollectionList)) {
|
|
|
incomeCollectionList.forEach(m -> {
|