|
@@ -59,6 +59,7 @@ import com.zhongzheng.modules.top.goods.mapper.TopOldOrderMapper;
|
|
|
import com.zhongzheng.modules.top.goods.service.*;
|
|
import com.zhongzheng.modules.top.goods.service.*;
|
|
|
import com.zhongzheng.modules.top.goods.vo.*;
|
|
import com.zhongzheng.modules.top.goods.vo.*;
|
|
|
import com.zhongzheng.modules.top.order.bo.PayOrderCallBackBo;
|
|
import com.zhongzheng.modules.top.order.bo.PayOrderCallBackBo;
|
|
|
|
|
+import com.zhongzheng.modules.top.order.bo.TopDetailStatisticsTotal;
|
|
|
import com.zhongzheng.modules.top.order.bo.TopOrderStatisticsBo;
|
|
import com.zhongzheng.modules.top.order.bo.TopOrderStatisticsBo;
|
|
|
import com.zhongzheng.modules.top.order.bo.TopOrderStatisticsViewBo;
|
|
import com.zhongzheng.modules.top.order.bo.TopOrderStatisticsViewBo;
|
|
|
import com.zhongzheng.modules.top.order.domain.TopOrderBankPay;
|
|
import com.zhongzheng.modules.top.order.domain.TopOrderBankPay;
|
|
@@ -2828,10 +2829,10 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
|
|
|
twoVo.setCustomerName(customerName);
|
|
twoVo.setCustomerName(customerName);
|
|
|
twoVo.setTime(time);
|
|
twoVo.setTime(time);
|
|
|
twoVo.setTimeStr(DateUtils.timestampToDateFormat(time,"yyyy-MM"));
|
|
twoVo.setTimeStr(DateUtils.timestampToDateFormat(time,"yyyy-MM"));
|
|
|
- if (voList2.stream().anyMatch(x ->
|
|
|
|
|
|
|
+ if (voList3.stream().anyMatch(x ->
|
|
|
DateUtils.getScheduleTimeZeroTime(x.getOrderTime()) >= time
|
|
DateUtils.getScheduleTimeZeroTime(x.getOrderTime()) >= time
|
|
|
&& DateUtils.getScheduleTimeZeroTime(x.getOrderTime()) <= monthTime.get(time))){
|
|
&& DateUtils.getScheduleTimeZeroTime(x.getOrderTime()) <= monthTime.get(time))){
|
|
|
- TopOrderStatisticsTwoVo statisticsTwoVo = voList2.stream()
|
|
|
|
|
|
|
+ TopOrderStatisticsTwoVo statisticsTwoVo = voList3.stream()
|
|
|
.filter(x ->
|
|
.filter(x ->
|
|
|
DateUtils.getScheduleTimeZeroTime(x.getOrderTime()) >= time
|
|
DateUtils.getScheduleTimeZeroTime(x.getOrderTime()) >= time
|
|
|
&& DateUtils.getScheduleTimeZeroTime(x.getOrderTime()) <= monthTime.get(time)).findFirst().get();
|
|
&& DateUtils.getScheduleTimeZeroTime(x.getOrderTime()) <= monthTime.get(time)).findFirst().get();
|
|
@@ -2876,13 +2877,22 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(bo.getBusinessName())){
|
|
|
|
|
+ String collect = Arrays.stream(bo.getBusinessName().split("-")).collect(Collectors.joining());
|
|
|
|
|
+ bo.setBusinessName(collect);
|
|
|
|
|
+ }
|
|
|
List<TopOrderStatisticsDetailVo> detailVos = baseMapper.getDetailStatistics(bo);
|
|
List<TopOrderStatisticsDetailVo> detailVos = baseMapper.getDetailStatistics(bo);
|
|
|
if (CollectionUtils.isEmpty(detailVos)){
|
|
if (CollectionUtils.isEmpty(detailVos)){
|
|
|
return new ArrayList<>();
|
|
return new ArrayList<>();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- TopOrderStatisticsDetailTotalVo totalVo = baseMapper.getDetailStatisticsTotal(bo.getStartTime(),bo.getEndTime());
|
|
|
|
|
|
|
+ TopDetailStatisticsTotal total = new TopDetailStatisticsTotal();
|
|
|
|
|
+ total.setStartTime(bo.getStartTime());
|
|
|
|
|
+ total.setEndTime(bo.getEndTime());
|
|
|
|
|
+ total.setCustomerId(bo.getCustomerId());
|
|
|
|
|
+ total.setBusinessName(bo.getBusinessName());
|
|
|
|
|
+ total.setCustomerName(bo.getCustomerName());
|
|
|
|
|
+ total.setTenantId(bo.getTenantId());
|
|
|
|
|
+ TopOrderStatisticsDetailTotalVo totalVo = baseMapper.getDetailStatisticsTotal(total);
|
|
|
detailVos.forEach(item -> {
|
|
detailVos.forEach(item -> {
|
|
|
//订单客户机构ID
|
|
//订单客户机构ID
|
|
|
if (item.getOrderType() == 1){
|
|
if (item.getOrderType() == 1){
|
|
@@ -2903,6 +2913,9 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
|
|
|
topOrderStatisticsBo.setStartTime(startTime - time);
|
|
topOrderStatisticsBo.setStartTime(startTime - time);
|
|
|
topOrderStatisticsBo.setEndTime(startTime);
|
|
topOrderStatisticsBo.setEndTime(startTime);
|
|
|
topOrderStatisticsBo.setCustomerId(item.getCustomerId());
|
|
topOrderStatisticsBo.setCustomerId(item.getCustomerId());
|
|
|
|
|
+ topOrderStatisticsBo.setBusinessName(bo.getBusinessName());
|
|
|
|
|
+ topOrderStatisticsBo.setCustomerName(bo.getCustomerName());
|
|
|
|
|
+ topOrderStatisticsBo.setTenantId(bo.getTenantId());
|
|
|
List<TopOrderStatisticsMoneyVo> moneyStatistics = baseMapper.getMoneyStatistics(topOrderStatisticsBo);
|
|
List<TopOrderStatisticsMoneyVo> moneyStatistics = baseMapper.getMoneyStatistics(topOrderStatisticsBo);
|
|
|
if (CollectionUtils.isNotEmpty(moneyStatistics)){
|
|
if (CollectionUtils.isNotEmpty(moneyStatistics)){
|
|
|
BigDecimal money = moneyStatistics.stream().findFirst().get().getMoney();
|
|
BigDecimal money = moneyStatistics.stream().findFirst().get().getMoney();
|
|
@@ -3238,7 +3251,14 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- TopOrderStatisticsDetailTotalVo totalVo = baseMapper.getDetailStatisticsTotal(bo.getStartTime(),bo.getEndTime());
|
|
|
|
|
|
|
+ TopDetailStatisticsTotal total = new TopDetailStatisticsTotal();
|
|
|
|
|
+ total.setStartTime(bo.getStartTime());
|
|
|
|
|
+ total.setEndTime(bo.getEndTime());
|
|
|
|
|
+ total.setCustomerId(bo.getCustomerId());
|
|
|
|
|
+ total.setBusinessName(bo.getBusinessName());
|
|
|
|
|
+ total.setCustomerName(bo.getCustomerName());
|
|
|
|
|
+ total.setTenantId(bo.getTenantId());
|
|
|
|
|
+ TopOrderStatisticsDetailTotalVo totalVo = baseMapper.getDetailStatisticsTotal(total);
|
|
|
resultVo.setOrderNum(totalVo.getOrderNumTotal());
|
|
resultVo.setOrderNum(totalVo.getOrderNumTotal());
|
|
|
resultVo.setMoney(totalVo.getMoneyTotal());
|
|
resultVo.setMoney(totalVo.getMoneyTotal());
|
|
|
BigDecimal moneyTotal = totalVo.getMoneyTotal();
|
|
BigDecimal moneyTotal = totalVo.getMoneyTotal();
|
|
@@ -3248,7 +3268,14 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
|
|
|
Long endTime = bo.getEndTime();
|
|
Long endTime = bo.getEndTime();
|
|
|
Long time = endTime - startTime;
|
|
Long time = endTime - startTime;
|
|
|
Long timeTwo =startTime - time;
|
|
Long timeTwo =startTime - time;
|
|
|
- TopOrderStatisticsDetailTotalVo totalVoTwo = baseMapper.getDetailStatisticsTotal(timeTwo,startTime);
|
|
|
|
|
|
|
+ TopDetailStatisticsTotal total1 = new TopDetailStatisticsTotal();
|
|
|
|
|
+ total1.setStartTime(timeTwo);
|
|
|
|
|
+ total1.setEndTime(startTime);
|
|
|
|
|
+ total1.setCustomerId(bo.getCustomerId());
|
|
|
|
|
+ total1.setBusinessName(bo.getBusinessName());
|
|
|
|
|
+ total1.setCustomerName(bo.getCustomerName());
|
|
|
|
|
+ total1.setTenantId(bo.getTenantId());
|
|
|
|
|
+ TopOrderStatisticsDetailTotalVo totalVoTwo = baseMapper.getDetailStatisticsTotal(total1);
|
|
|
if (ObjectUtils.isNotNull(totalVoTwo)){
|
|
if (ObjectUtils.isNotNull(totalVoTwo)){
|
|
|
BigDecimal money = totalVoTwo.getMoneyTotal();
|
|
BigDecimal money = totalVoTwo.getMoneyTotal();
|
|
|
if (ObjectUtils.isNull(money)){
|
|
if (ObjectUtils.isNull(money)){
|
|
@@ -3271,7 +3298,14 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
|
|
|
//同比
|
|
//同比
|
|
|
Long startBefore = DateUtils.getDayBefore(bo.getStartTime(), 365);
|
|
Long startBefore = DateUtils.getDayBefore(bo.getStartTime(), 365);
|
|
|
Long endBefore = DateUtils.getDayBefore(bo.getEndTime(), 365);
|
|
Long endBefore = DateUtils.getDayBefore(bo.getEndTime(), 365);
|
|
|
- TopOrderStatisticsDetailTotalVo totalVo3 = baseMapper.getDetailStatisticsTotal(startBefore,endBefore);
|
|
|
|
|
|
|
+ TopDetailStatisticsTotal total2 = new TopDetailStatisticsTotal();
|
|
|
|
|
+ total2.setStartTime(startBefore);
|
|
|
|
|
+ total2.setEndTime(endBefore);
|
|
|
|
|
+ total2.setCustomerId(bo.getCustomerId());
|
|
|
|
|
+ total2.setBusinessName(bo.getBusinessName());
|
|
|
|
|
+ total2.setCustomerName(bo.getCustomerName());
|
|
|
|
|
+ total2.setTenantId(bo.getTenantId());
|
|
|
|
|
+ TopOrderStatisticsDetailTotalVo totalVo3 = baseMapper.getDetailStatisticsTotal(total2);
|
|
|
if (ObjectUtils.isNotNull(totalVo3)){
|
|
if (ObjectUtils.isNotNull(totalVo3)){
|
|
|
BigDecimal money = totalVo3.getMoneyTotal();
|
|
BigDecimal money = totalVo3.getMoneyTotal();
|
|
|
if (ObjectUtils.isNull(money)){
|
|
if (ObjectUtils.isNull(money)){
|