|
|
@@ -15,7 +15,6 @@ import com.yr.warehouse.admin.replenish.data.ReplenishOrderDetail;
|
|
|
import com.yr.warehouse.admin.replenish.mapper.ReplenishOrderDetailMapper;
|
|
|
import com.yr.warehouse.admin.replenish.mapper.ReplenishOrderInfoMapper;
|
|
|
import com.yr.warehouse.admin.service.driver.DriverGoodsLossIntervalService;
|
|
|
-import com.yr.warehouse.admin.service.statistics.DriverStatisticsService;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -500,6 +499,15 @@ public class DriverGoodsLossIntervalServiceImpl implements DriverGoodsLossInterv
|
|
|
List<ReplenishOrderDetail> unReplenishDetails
|
|
|
) {
|
|
|
Set<Integer> goodsIds = new HashSet<>();
|
|
|
+ if (null == areaStaffDriverOnRouteDetailLogList) {
|
|
|
+ areaStaffDriverOnRouteDetailLogList = new ArrayList<>();
|
|
|
+ }
|
|
|
+ if (null == driverOnRouteAccountRecordDetailList) {
|
|
|
+ driverOnRouteAccountRecordDetailList = new ArrayList<>();
|
|
|
+ }
|
|
|
+ if (null == unReplenishDetails) {
|
|
|
+ unReplenishDetails = new ArrayList<>();
|
|
|
+ }
|
|
|
|
|
|
Map<Integer, List<DriverOnRouteDetailLog>> areaStaffDriverOnRouteDetailLogMapByGoodsId = areaStaffDriverOnRouteDetailLogList.stream().collect(Collectors.groupingBy(DriverOnRouteDetailLog::getGoodsId));
|
|
|
Map<Integer, List<DriverOnRouteAccountRecordDetail>> driverOnRouteAccountRecordDetailMapByGoodsId = driverOnRouteAccountRecordDetailList.stream().collect(Collectors.groupingBy(DriverOnRouteAccountRecordDetail::getGoodsId));
|
|
|
@@ -555,8 +563,8 @@ public class DriverGoodsLossIntervalServiceImpl implements DriverGoodsLossInterv
|
|
|
* @param driverEquipmentLossRecordList 设备货损统计数据
|
|
|
*/
|
|
|
private EquipmentLossIntervalDetail buildDriverEquipmentLossRecord(Long areaStaffId,
|
|
|
- EquipmentLossIntervalDetail lastEquipmentLossIntervalDetail,
|
|
|
- List<DriverEquipmentLossRecord> driverEquipmentLossRecordList) {
|
|
|
+ EquipmentLossIntervalDetail lastEquipmentLossIntervalDetail,
|
|
|
+ List<DriverEquipmentLossRecord> driverEquipmentLossRecordList) {
|
|
|
EquipmentLossIntervalDetail equipmentLossIntervalDetail = new EquipmentLossIntervalDetail();
|
|
|
equipmentLossIntervalDetail.setAreaStaffId(areaStaffId);
|
|
|
Long lastRemainingEquipmentStock = 0L; // 上次剩余设备库存
|