|
|
@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.support.TransactionTemplate;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -108,8 +109,11 @@ public class DriverGoodsLossIntervalServiceImpl implements DriverGoodsLossInterv
|
|
|
if (null == areaStaffVos || areaStaffVos.isEmpty()) {
|
|
|
throw new MessageException("当前仓库下没有司机");
|
|
|
}
|
|
|
- bo.setIntervalStartTime(LocalDateTime.parse(bo.getIntervalStartTime().toLocalDate() + " 04:00:00"));
|
|
|
- bo.setIntervalEndTime(LocalDateTime.parse(bo.getIntervalEndTime().toLocalDate() + " 03:59:59"));
|
|
|
+
|
|
|
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+ DateTimeFormatter dateTimeFormatterWithTime = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ bo.setIntervalStartTime(LocalDateTime.parse(bo.getIntervalStartTime().toLocalDate().format(dateTimeFormatter) + " 04:00:00", dateTimeFormatterWithTime));
|
|
|
+ bo.setIntervalEndTime(LocalDateTime.parse(bo.getIntervalEndTime().toLocalDate().format(dateTimeFormatter) + " 03:59:59", dateTimeFormatterWithTime));
|
|
|
|
|
|
bo.setBeginStatDate(bo.getIntervalStartTime().toLocalDate());
|
|
|
bo.setEndStatDate(bo.getIntervalEndTime().toLocalDate());
|
|
|
@@ -127,7 +131,7 @@ public class DriverGoodsLossIntervalServiceImpl implements DriverGoodsLossInterv
|
|
|
}
|
|
|
|
|
|
// 获取司机未补货的补货单列表
|
|
|
- List<DriverGoodsLossStatUnReplenishSnapshot> driverGoodsLossStatUnReplenishSnapshots = replenishOrderInfoMapper.searchDriverGoodsLossStatUnReplenishSnapshot(bo.getAreaStaffIds(), bo.getIntervalStartTime(), bo.getIntervalEndTime());
|
|
|
+ List<DriverGoodsLossStatUnReplenishSnapshot> driverGoodsLossStatUnReplenishSnapshots = driverGoodsLossStatUnReplenishSnapshotMapper.searchDriverGoodsLossStatUnReplenishSnapshot(bo.getAreaStaffIds(), bo.getIntervalStartTime(), bo.getIntervalEndTime());
|
|
|
List<ReplenishOrderDetail> unReplenishOrderDetails = new ArrayList<>();
|
|
|
if (null != driverGoodsLossStatUnReplenishSnapshots && !driverGoodsLossStatUnReplenishSnapshots.isEmpty()) {
|
|
|
unReplenishOrderDetails = replenishOrderDetailMapper.searchByOrderNumbers(driverGoodsLossStatUnReplenishSnapshots.stream().map(DriverGoodsLossStatUnReplenishSnapshot::getUnReplenishOrderNumber).collect(Collectors.toList()));
|