forked from angelo/java-retail-app
## Fix - 市场动态-业绩列表为0
This commit is contained in:
parent
060f93a006
commit
174452f2c4
|
@ -38,4 +38,8 @@ public class MarketDynamicsQueryDateParam implements Serializable {
|
|||
private String keyWords;
|
||||
private Integer pageNum = 1;
|
||||
private Integer pageSize = 10;
|
||||
/**
|
||||
* 查询类型 1-盒数, 2-业绩
|
||||
*/
|
||||
private Integer queryType;
|
||||
}
|
||||
|
|
|
@ -230,10 +230,18 @@ public class DataStatisticsUtil {
|
|||
if(StrUtil.isNotEmpty(param.getKeyWords())){
|
||||
detailVOList = detailVOList.stream().filter(o -> o.getMemberCode().contains(param.getKeyWords()) || o.getMemberName().contains(param.getKeyWords())).collect(Collectors.toList());
|
||||
}
|
||||
MarketDynamicsDetailVO bigRange = detailVOList.stream()
|
||||
MarketDynamicsDetailVO bigRange = null;
|
||||
if(param.getQueryType().equals(1)){
|
||||
bigRange = detailVOList.stream()
|
||||
.max(Comparator.comparingInt(MarketDynamicsDetailVO::getTotalBoxNum))
|
||||
.orElse(null);
|
||||
detailVOList = detailVOList.stream().filter(o -> !o.getPkId().equals(bigRange.getPkId())).collect(Collectors.toList());
|
||||
}else{
|
||||
bigRange = detailVOList.stream()
|
||||
.max(Comparator.comparing(MarketDynamicsDetailVO::getTodayPv))
|
||||
.orElse(null);
|
||||
}
|
||||
MarketDynamicsDetailVO finalBigRange = bigRange;
|
||||
detailVOList = detailVOList.stream().filter(o -> !o.getPkId().equals(finalBigRange.getPkId())).collect(Collectors.toList());
|
||||
PageResult<MarketDynamicsDetailVO> result = MemoryPageUtils.paginate(detailVOList, param.getPageNum(), param.getPageSize());
|
||||
result.setBigRange(bigRange);
|
||||
return result;
|
||||
|
|
|
@ -882,15 +882,15 @@
|
|||
cu.PK_AWARDS,
|
||||
awards.AWARDS_NAME,
|
||||
currentMonth.ENABLE_STATUS,
|
||||
NVL( currentDay.NEW_CONSUME_PV + currentDay.TEAM_NEW_PV, 0 ) todayPv,
|
||||
NVL( currentDay.NEW_BOX_NUM + currentDay.TEAM_NEW_BOX_NUM, 0 ) todayBoxNum,
|
||||
NVL( NVL( currentMonth.NEW_CONSUME_PV, 0 ) + currentMonth.TEAM_NEW_PV, 0 ) yesterdayPv,
|
||||
NVL( NVL( currentMonth.NEW_BOX_NUM, 0 ) + currentMonth.TEAM_NEW_BOX_NUM, 0 ) yesterdayBoxNum,
|
||||
NVL( NVL( currentMonth.MONTH_CONSUME_PV, 0 ) + currentDay.NEW_CONSUME_PV + currentDay.TEAM_NEW_PV, 0 ) currentMonthPv,
|
||||
NVL( NVL( currentMonth.MONTH_BOX_NUM, 0 ) + currentDay.NEW_BOX_NUM + currentDay.TEAM_NEW_BOX_NUM, 0 ) currentMonthBoxNum,
|
||||
NVL( NVL( currentDay.NEW_CONSUME_PV, 0 ) + NVL( currentDay.TEAM_NEW_PV, 0 ), 0 ) todayPv,
|
||||
NVL( NVL( currentDay.NEW_BOX_NUM, 0 ) + NVL( currentDay.TEAM_NEW_BOX_NUM, 0 ), 0 ) todayBoxNum,
|
||||
NVL( NVL( currentMonth.NEW_CONSUME_PV, 0 ) + NVL( currentMonth.TEAM_NEW_PV, 0 ), 0 ) yesterdayPv,
|
||||
NVL( NVL( currentMonth.NEW_BOX_NUM, 0 ) + NVL( currentMonth.TEAM_NEW_BOX_NUM, 0 ), 0 ) yesterdayBoxNum,
|
||||
NVL( NVL( currentMonth.MONTH_CONSUME_PV, 0 ) + NVL( currentDay.NEW_CONSUME_PV, 0 ) + NVL( currentDay.TEAM_NEW_PV, 0 ), 0 ) currentMonthPv,
|
||||
NVL( NVL( currentMonth.MONTH_BOX_NUM, 0 ) + NVL( currentDay.NEW_BOX_NUM, 0 ) + NVL( currentDay.TEAM_NEW_BOX_NUM, 0 ), 0 ) currentMonthBoxNum,
|
||||
NVL( lastMonth.MONTH_CONSUME_PV, 0 ) lastMonthPv,
|
||||
NVL( lastMonth.MONTH_BOX_NUM, 0 ) lastMonthBoxNum,
|
||||
NVL( currentMonth.CONSUME_BOX_NUM + currentDay.NEW_BOX_NUM + currentDay.TEAM_NEW_BOX_NUM, 0 ) totalBoxNum
|
||||
NVL( NVL( currentMonth.CONSUME_BOX_NUM, 0 ) + NVL( currentDay.NEW_BOX_NUM, 0 ) + NVL( currentDay.TEAM_NEW_BOX_NUM, 0 ), 0 ) totalBoxNum
|
||||
FROM
|
||||
cu_member cu
|
||||
LEFT JOIN ${param.currentDayTableName} currentDay ON cu.PK_ID = currentDay.PK_MEMBER
|
||||
|
|
Loading…
Reference in New Issue