## Fix - 盒数大小区逻辑
This commit is contained in:
parent
f74abd210f
commit
5577de14e5
|
@ -55,7 +55,7 @@ public class DataStatisticsUtil {
|
|||
excludeDailySettlementData(detailVOList);
|
||||
}else{
|
||||
// 排除注水数据
|
||||
excludeWaterInjectionData(detailVOList);
|
||||
excludeWaterInjectionData(detailVOList, pkId);
|
||||
}
|
||||
Integer smallRangeTotalBoxNum = total.getTotalBoxNum() - bigRange.getTotalBoxNum();
|
||||
if(smallRangeTotalBoxNum < 0){
|
||||
|
@ -119,17 +119,21 @@ public class DataStatisticsUtil {
|
|||
|
||||
/**
|
||||
* 排除昨日日结注水数据
|
||||
* 自己的注水不排除
|
||||
* @param detailVOList
|
||||
*/
|
||||
public static void excludeWaterInjectionData(List<CuMemberRetailDataStatisticsDetailVO> detailVOList){
|
||||
public static void excludeWaterInjectionData(List<CuMemberRetailDataStatisticsDetailVO> detailVOList, Long pkId){
|
||||
detailVOList.parallelStream().forEach(detailVO -> {
|
||||
detailVO.setTotalBoxNum(
|
||||
detailVO.getTotalBoxNum()
|
||||
- detailVO.getBigBoxNum() // 注水大区
|
||||
- detailVO.getSmallBoxNum() // 注水小区
|
||||
);
|
||||
if(!detailVO.getPkId().equals(pkId)){
|
||||
detailVO.setTotalBoxNum(
|
||||
detailVO.getTotalBoxNum()
|
||||
- detailVO.getBigBoxNum() // 注水大区
|
||||
- detailVO.getSmallBoxNum() // 注水小区
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加虚拟分支 主要为
|
||||
* 1.自己的消费总数
|
||||
|
@ -154,7 +158,7 @@ public class DataStatisticsUtil {
|
|||
CuMemberRetailDataStatisticsDetailVO smallRangeVirtualDetailVO = CuMemberRetailDataStatisticsDetailVO.builder()
|
||||
.pkId(SMALL_RANGE_VIRTUAL_ID)
|
||||
.memberCode(SMALL_RANGE_VIRTUAL_NAME)
|
||||
.totalBoxNum(detailVO.getBigBoxNum())
|
||||
.totalBoxNum(detailVO.getSmallBoxNum())
|
||||
.totalPv(BigDecimal.ZERO)
|
||||
.bigBoxNum(0)
|
||||
.smallBoxNum(0)
|
||||
|
|
Loading…
Reference in New Issue