|
@@ -130,10 +130,10 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
|
|
|
throw new CostException("责任中心:" + accountShare.getResponsibilityName() + ";会计中心为:" + accountShare.getAccountingNames() + ";未设置分摊参数比例");
|
|
|
}
|
|
|
|
|
|
- List<CostCostingGroup> groups = responsibilityCodeMap.get(responsibilityCode);
|
|
|
- if (CollUtil.isEmpty(groups)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
+// List<CostCostingGroup> groups = responsibilityCodeMap.get(responsibilityCode);
|
|
|
+// if (CollUtil.isEmpty(groups)) {
|
|
|
+// continue;
|
|
|
+// }
|
|
|
// 计算本次分摊的钱
|
|
|
BigDecimal totalAmount = this.getCostAmount(accountShare, calcType, responsibilityCodeMap, costList);
|
|
|
if (totalAmount.equals(BigDecimal.ZERO)) {
|
|
@@ -320,7 +320,7 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
|
|
|
|
|
|
BigDecimal bigDecimal = all.stream()
|
|
|
.map(Allocation::getAmount)
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::subtract);
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
if (Objects.nonNull(bigDecimal)) {
|
|
|
costAmount = costAmount.add(bigDecimal);
|
|
@@ -339,7 +339,7 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
|
|
|
if (!all.isEmpty()) {
|
|
|
BigDecimal bigDecimal = all.stream()
|
|
|
.map(Allocation::getAmount)
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::subtract);
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
if (Objects.nonNull(bigDecimal)) {
|
|
|
costAmount = costAmount.add(bigDecimal);
|
|
|
}
|