|
@@ -58,12 +58,9 @@ public class OrderSalesShipmentStatisticsServiceImpl implements OrderSalesShipme
|
|
|
|
|
|
@Override
|
|
|
public Map<Long, OrderSalesShipmentStatisticsBo> getSalesShipmentStatisticsByDate(List<Long> bomSpecIds) {
|
|
|
- Date date = new Date();
|
|
|
- Date startDate = DateUtil.beginOfDay(DateUtil.offsetDay(date, -90));
|
|
|
IWrapper<OrderSku> wrapper = IWrapper.getWrapper();
|
|
|
wrapper.orderByDesc("os", OrderSku::getId);
|
|
|
wrapper.in("bs", BomSpec::getId, bomSpecIds);
|
|
|
- wrapper.between("oi", OrderInfo::getShippingTime, startDate, date);
|
|
|
wrapper.groupBy("bs.id");
|
|
|
List<OrderSalesShipmentStatisticsBo> list = orderSalesShipmentStatisticsMapper.getOrderSalesShipmentStatisticsList(wrapper);
|
|
|
return list.stream().collect(Collectors.toMap(OrderSalesShipmentStatisticsBo::getBomSpecId, Function.identity()));
|
|
@@ -77,9 +74,7 @@ public class OrderSalesShipmentStatisticsServiceImpl implements OrderSalesShipme
|
|
|
String thirtyDaysDate = DateUtil.formatDate(DateUtil.offsetDay(date, -30));
|
|
|
|
|
|
IWrapper<OrderSku> wrapper = IWrapper.getWrapper();
|
|
|
- wrapper.orderByDesc("os", OrderSku::getId);
|
|
|
- wrapper.eq("oi", OrderInfo::getDepartmentId, dto.getDepartmentId());
|
|
|
- wrapper.between("oi", OrderInfo::getShippingTime, ninetyDaysDate, date);
|
|
|
+ wrapper.eq("oq", OrderInfo::getDepartmentId, dto.getDepartmentId());
|
|
|
if (Objects.equals(dto.getBomClassify(), 1)) {
|
|
|
wrapper.eq("bc", BomClassify::getCode, "201.G");
|
|
|
} else if (Objects.equals(dto.getBomClassify(), 2)){
|
|
@@ -93,6 +88,7 @@ public class OrderSalesShipmentStatisticsServiceImpl implements OrderSalesShipme
|
|
|
wrapper.like("bs", BomSpec::getHeight, dto.getHeight());
|
|
|
wrapper.like("bs", BomSpec::getName, dto.getBomSpecName());
|
|
|
wrapper.groupBy("bs.id");
|
|
|
+ wrapper.orderByDesc("bs", BomSpec::getId);
|
|
|
List<OrderSalesShipmentStatisticsBo> statisticsVoList = orderSalesShipmentStatisticsMapper.getOrderSalesShipmentStatisticsList(wrapper);
|
|
|
if (ObjectUtil.isEmpty(statisticsVoList)) {
|
|
|
return Collections.emptyList();
|