Commit 3c198cd5 by 陶光胜

观云台小程序

parent 61dd32e3
......@@ -88,26 +88,22 @@ public class BaseSalesController {
ServiceResponse<Page<BaseSalesDTO>> response = this.baseSalesApiService.pageBaseSales(dto);
vo.setPage(this.goDownComponent.parseData(response.getResult(), qo.getChannel(), qo.getEnterpriseId(), qo.getLevel(), maxLevel));
dto.setCountType(2);//合计
ServiceResponse<Page<BaseSalesDTO>> response1 = this.baseSalesApiService.pageBaseSales(dto);
if(response1.isSuccess() && response1.getResult() != null && CollectionUtils.isNotEmpty(response1.getResult().getResult())){
BaseSalesDTO total = response1.getResult().getResult().get(0);
if(total != null){
total.setId("0");
total.setName("合计");
vo.setTotal(total);
}
/**所有渠道或者线下渠道第一层级 合计算上无归属数据**/
if(qo.getChannel() == null || (qo.getChannel() == StoreChannelEnum.OFFLINE.getChannel() && qo.getLevel() == levelVo.getLevel())){
dto.getStoreInfoIdList().add(-1);
dto.getOnLine().add("-1");
}
ServiceResponse<Page<BaseSalesDTO>> totalResponse = this.baseSalesApiService.pageBaseSales(dto);
this.goDownComponent.parseTotal(totalResponse, vo);
if(qo.getChannel() != null && qo.getChannel() == 1 && qo.getLevel() == levelVo.getLevel()){
dto.setCountType(3); //无归属
ServiceResponse<Page<BaseSalesDTO>> response2 = this.baseSalesApiService.pageBaseSales(dto);
if(response2.isSuccess() && response2.getResult() != null && CollectionUtils.isNotEmpty(response2.getResult().getResult())){
BaseSalesDTO wgs = response2.getResult().getResult().get(0);
if(wgs != null){
wgs.setName("无归属");
wgs.setId("-1");
vo.setWgs(wgs);
}
}
dto.setChannel(null);
dto.getStoreInfoIdList().clear();
dto.getOnLine().clear();
dto.getStoreInfoIdList().add(-1);
dto.getOnLine().add("-1");
ServiceResponse<Page<BaseSalesDTO>> wgsResponse = this.baseSalesApiService.pageBaseSales(dto);
this.goDownComponent.parseWgs(wgsResponse, vo);
}
return RestResponse.success(vo);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment