|
|
@ -233,7 +233,7 @@ public class BirRoiRateServiceImpl extends ServiceImpl<BirRoiRateMapper,BirRoiRa |
|
|
|
regionSupplierLqw.eq(BmsSupplier::getRegionFirst, supplier.getRegionFirst()); |
|
|
|
regionSupplierLqw.select(BmsSupplier::getId,BmsSupplier::getCode); |
|
|
|
List<BmsSupplier> regionSupplierList = bmsSupplierMapper.selectList(regionSupplierLqw); |
|
|
|
List<String> regionSupplierIds = regionSupplierList.stream().map(BmsSupplier::getId).collect(Collectors.toList()); |
|
|
|
List<String> regionSupplierIds = regionSupplierList.stream().map(BmsSupplier::getId).distinct().collect(Collectors.toList()); |
|
|
|
regionSupplierIds.add("-999"); |
|
|
|
//加载公司内费用
|
|
|
|
BirRoiCostDTO costDTO4Com = new BirRoiCostDTO(); |
|
|
@ -322,10 +322,14 @@ public class BirRoiRateServiceImpl extends ServiceImpl<BirRoiRateMapper,BirRoiRa |
|
|
|
|
|
|
|
for(BirRoiCostItemVo vo:list){ |
|
|
|
if(vo.getYearMonth()<=currMonthNum && vo.getYearMonth()>=startMonthNum){ |
|
|
|
if(vo.getAllCostAmt()!=null){ |
|
|
|
costAmt = costAmt.add(vo.getAllCostAmt()); |
|
|
|
} |
|
|
|
if(vo.getAllDispatchAmt()!=null){ |
|
|
|
dispatchAmt = dispatchAmt.add(vo.getAllDispatchAmt()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(dispatchAmt.compareTo(BigDecimal.ZERO)>0) { |
|
|
|
ytdPercent = costAmt.divide(dispatchAmt,4, RoundingMode.HALF_UP).floatValue(); |
|
|
@ -428,10 +432,14 @@ public class BirRoiRateServiceImpl extends ServiceImpl<BirRoiRateMapper,BirRoiRa |
|
|
|
|
|
|
|
for(BirRoiCostItemVo vo:list){ |
|
|
|
if(vo.getYearMonth()<=currMonthNum && vo.getYearMonth()>=startMonthNum){ |
|
|
|
if(vo.getAllCostAmt()!=null){ |
|
|
|
costAmt = costAmt.add(vo.getAllCostAmt()); |
|
|
|
} |
|
|
|
if(vo.getAllDispatchAmt()!=null){ |
|
|
|
dispatchAmt = dispatchAmt.add(vo.getAllDispatchAmt()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(dispatchAmt.compareTo(BigDecimal.ZERO)>0) { |
|
|
|
qtdPercent = costAmt.divide(dispatchAmt,4, RoundingMode.HALF_UP).floatValue(); |
|
|
|