|
|
|
@ -200,6 +200,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
}); |
|
|
|
|
return list; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<DistributionSignforOwnExcel> exportDistributionSignforOwn(Map<String, Object> distributionSignfor) { |
|
|
|
|
|
|
|
|
@ -1363,6 +1364,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional |
|
|
|
|
public R oneclick(DistributionSignforDTO distributionSignfor) { |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if (Objects.isNull(myCurrentWarehouse)) { |
|
|
|
@ -1426,7 +1428,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return R.fail("签收失败"); |
|
|
|
|
} |
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
|
|
|
|
|
//处理库存品
|
|
|
|
|
//查询出该客户下的库存品信息
|
|
|
|
|
List<DisStockListDetailEntity> detailEntities = distributionReservationMapper.selectInventoryListByReservation(distributionSignforEntity.getReservationId()); |
|
|
|
@ -1434,108 +1435,194 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
boolean flag = detailEntities.stream().allMatch(s -> Func.isNotEmpty(s.getStockPackageCode())); |
|
|
|
|
//只要库存品没有进行备货操作则不能进行一件装车操作
|
|
|
|
|
if (flag) { |
|
|
|
|
//库存品均已备货
|
|
|
|
|
List<DisStockListDetailEntity> unLoadingiNventoryList = detailEntities.stream().filter(i -> i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())).collect(Collectors.toList()); |
|
|
|
|
if (Func.isNotEmpty(unLoadingiNventoryList) && unLoadingiNventoryList.size() > 0) { |
|
|
|
|
for (DisStockListDetailEntity disStockListDetailEntity : unLoadingiNventoryList) { |
|
|
|
|
// --------------------修改库存品包件装车和签收状态——————————————————————————————————————————
|
|
|
|
|
disStockListDetailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
disStockListDetailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
disStockListDetailService.updateById(disStockListDetailEntity); |
|
|
|
|
|
|
|
|
|
DistributionLoadscaninvnEntity loadscaninvnEntity = new DistributionLoadscaninvnEntity(); |
|
|
|
|
for (DisStockListDetailEntity detailEntity : detailEntities) { |
|
|
|
|
DistributionLoadscaninvnEntity loadscaninvnEntity = distributionLoadscaninvnService.getOne(Wrappers.<DistributionLoadscaninvnEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getReservationId, detailEntity.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getInventoryId, detailEntity.getStockListId()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, detailEntity.getStockPackageCode()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getInventoryPackageId, detailEntity.getId()) |
|
|
|
|
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
|
if (Func.isNotEmpty(loadscaninvnEntity)) { |
|
|
|
|
if (!loadscaninvnEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){ |
|
|
|
|
//存在库存品装车数据,这里进行签收状态修改
|
|
|
|
|
loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum()); |
|
|
|
|
loadscaninvnEntity.setOneClick(1); |
|
|
|
|
loadscaninvnEntity.setOneQclick(2); |
|
|
|
|
loadscaninvnEntity.setSigningUser(user.getNickName()); |
|
|
|
|
loadscaninvnEntity.setSigningUserId(user.getUserId()); |
|
|
|
|
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum()); |
|
|
|
|
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
distributionLoadscaninvnService.updateById(loadscaninvnEntity); |
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId()); |
|
|
|
|
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub()); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
//不存在装车数据 这里需要进行装车数据的补录
|
|
|
|
|
detailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
detailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
disStockListDetailService.updateById(detailEntity); |
|
|
|
|
DistributionLoadscaninvnEntity newLoadscaninvnEntity = new DistributionLoadscaninvnEntity(); |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) { |
|
|
|
|
loadscaninvnEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); |
|
|
|
|
newLoadscaninvnEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) { |
|
|
|
|
loadscaninvnEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
newLoadscaninvnEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleId())) { |
|
|
|
|
loadscaninvnEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
newLoadscaninvnEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleNub())) { |
|
|
|
|
loadscaninvnEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
newLoadscaninvnEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverPhone())) { |
|
|
|
|
loadscaninvnEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
loadscaninvnEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString()); |
|
|
|
|
loadscaninvnEntity.setOrderPackageCode(disStockListDetailEntity.getStockPackageCode()); |
|
|
|
|
loadscaninvnEntity.setInventoryId(disStockListDetailEntity.getStockListId()); |
|
|
|
|
loadscaninvnEntity.setDeliveryId(distributionSignforEntity.getDeliveryId()); |
|
|
|
|
loadscaninvnEntity.setReservationId(distributionSignforEntity.getReservationId()); |
|
|
|
|
loadscaninvnEntity.setScanUser(user.getNickName()); |
|
|
|
|
loadscaninvnEntity.setScanTime(new Date()); |
|
|
|
|
loadscaninvnEntity.setPackageNub(disStockListDetailEntity.getNum()); |
|
|
|
|
loadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue()); |
|
|
|
|
loadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue()); |
|
|
|
|
loadscaninvnEntity.setScanType("1"); |
|
|
|
|
loadscaninvnEntity.setType(2); |
|
|
|
|
loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
loadscaninvnEntity.setIsSignfor(1); |
|
|
|
|
loadscaninvnEntity.setReceivedQuantity(disStockListDetailEntity.getNum()); |
|
|
|
|
loadscaninvnEntity.setOneClick(2); |
|
|
|
|
loadscaninvnEntity.setOneQclick(2); |
|
|
|
|
loadscaninvnEntity.setSigningUser(user.getNickName()); |
|
|
|
|
loadscaninvnEntity.setSigningUserId(user.getUserId()); |
|
|
|
|
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
|
|
|
|
|
newLoadscaninvnEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
newLoadscaninvnEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString()); |
|
|
|
|
newLoadscaninvnEntity.setOrderPackageCode(detailEntity.getStockPackageCode()); |
|
|
|
|
newLoadscaninvnEntity.setInventoryId(detailEntity.getStockListId()); |
|
|
|
|
newLoadscaninvnEntity.setDeliveryId(distributionSignforEntity.getDeliveryId()); |
|
|
|
|
newLoadscaninvnEntity.setReservationId(distributionSignforEntity.getReservationId()); |
|
|
|
|
newLoadscaninvnEntity.setInventoryPackageId(detailEntity.getId()); |
|
|
|
|
newLoadscaninvnEntity.setScanUser(user.getNickName()); |
|
|
|
|
newLoadscaninvnEntity.setScanTime(new Date()); |
|
|
|
|
newLoadscaninvnEntity.setPackageNub(detailEntity.getNum()); |
|
|
|
|
newLoadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue()); |
|
|
|
|
newLoadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue()); |
|
|
|
|
newLoadscaninvnEntity.setScanType("1"); |
|
|
|
|
newLoadscaninvnEntity.setType(2); |
|
|
|
|
newLoadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
newLoadscaninvnEntity.setIsSignfor(1); |
|
|
|
|
newLoadscaninvnEntity.setReceivedQuantity(detailEntity.getNum()); |
|
|
|
|
newLoadscaninvnEntity.setOneClick(2); |
|
|
|
|
newLoadscaninvnEntity.setOneQclick(2); |
|
|
|
|
newLoadscaninvnEntity.setSigningUser(user.getNickName()); |
|
|
|
|
newLoadscaninvnEntity.setSigningUserId(user.getUserId()); |
|
|
|
|
newLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
if (distributionSignfor.getIsClerk()) { |
|
|
|
|
loadscaninvnEntity.setMsg("文员一键签收数据补录"); |
|
|
|
|
newLoadscaninvnEntity.setMsg("文员一键签收数据补录"); |
|
|
|
|
} else { |
|
|
|
|
loadscaninvnEntity.setMsg("司机一键签收数据补录"); |
|
|
|
|
newLoadscaninvnEntity.setMsg("司机一键签收数据补录"); |
|
|
|
|
} |
|
|
|
|
distributionLoadscaninvnService.save(loadscaninvnEntity); |
|
|
|
|
distributionLoadscaninvnService.save(newLoadscaninvnEntity); |
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId()); |
|
|
|
|
//更新签收表的签收数量和装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub()); |
|
|
|
|
Integer j = distributionSignforMapper.updateLoadAndsignforByinvn(newLoadscaninvnEntity.getDeliveryId(), newLoadscaninvnEntity.getReservationId(), newLoadscaninvnEntity.getPackageNub()); |
|
|
|
|
//维护预约库存品数据
|
|
|
|
|
//扣减库存
|
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListService.getById(disStockListDetailEntity.getStockListId()); |
|
|
|
|
stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - loadscaninvnEntity.getPackageNub()); |
|
|
|
|
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - loadscaninvnEntity.getPackageNub()); |
|
|
|
|
stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + loadscaninvnEntity.getPackageNub()); |
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListService.getById(detailEntity.getStockListId()); |
|
|
|
|
stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - newLoadscaninvnEntity.getPackageNub()); |
|
|
|
|
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - newLoadscaninvnEntity.getPackageNub()); |
|
|
|
|
stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + newLoadscaninvnEntity.getPackageNub()); |
|
|
|
|
distributionStockListService.updateById(stockListEntity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//库存品扫描记录补充
|
|
|
|
|
for (DisStockListDetailEntity detailEntity : detailEntities) { |
|
|
|
|
if (detailEntity.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())) { |
|
|
|
|
detailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
disStockListDetailService.updateById(detailEntity); |
|
|
|
|
//查询出对于的装车扫描记录
|
|
|
|
|
List<DistributionLoadscaninvnEntity> list = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getDeliveryId, distributionSignfor.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getReservationId, distributionSignfor.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, detailEntity.getStockPackageCode()) |
|
|
|
|
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); |
|
|
|
|
if (list.size() == 1) { |
|
|
|
|
//正常进行扫描记录签收修改
|
|
|
|
|
DistributionLoadscaninvnEntity loadscaninvnEntity = list.get(0); |
|
|
|
|
if (distributionSignfor.getIsClerk()) { |
|
|
|
|
loadscaninvnEntity.setMsg("文员一键签收数据补录"); |
|
|
|
|
} else { |
|
|
|
|
loadscaninvnEntity.setMsg("司机一键签收数据补录"); |
|
|
|
|
} |
|
|
|
|
loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); |
|
|
|
|
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum()); |
|
|
|
|
loadscaninvnEntity.setOneClick(1); |
|
|
|
|
loadscaninvnEntity.setOneQclick(2); |
|
|
|
|
loadscaninvnEntity.setSigningUser(user.getUserName()); |
|
|
|
|
loadscaninvnEntity.setSigningUserId(user.getUserId()); |
|
|
|
|
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum()); |
|
|
|
|
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date())); |
|
|
|
|
distributionLoadscaninvnService.updateById(loadscaninvnEntity); |
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId()); |
|
|
|
|
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub()); |
|
|
|
|
} else { |
|
|
|
|
log.error("################库存品未进行备货操作+{}" + list); |
|
|
|
|
//此时说明在同一配送任务下,同一客户出现了相同的库存品包件码
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//对库存品包件上级的状态维护
|
|
|
|
|
distributionAsyncService.checkStockArticleListSigningStatus(detailEntity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// //库存品均已备货
|
|
|
|
|
// List<DisStockListDetailEntity> unLoadingiNventoryList = detailEntities.stream().filter(i -> i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())).collect(Collectors.toList());
|
|
|
|
|
// if (Func.isNotEmpty(unLoadingiNventoryList) && unLoadingiNventoryList.size() > 0) {
|
|
|
|
|
// for (DisStockListDetailEntity disStockListDetailEntity : unLoadingiNventoryList) {
|
|
|
|
|
//// --------------------修改库存品包件装车和签收状态——————————————————————————————————————————
|
|
|
|
|
// disStockListDetailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue());
|
|
|
|
|
// disStockListDetailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue());
|
|
|
|
|
// disStockListDetailService.updateById(disStockListDetailEntity);
|
|
|
|
|
//
|
|
|
|
|
// DistributionLoadscaninvnEntity loadscaninvnEntity = new DistributionLoadscaninvnEntity();
|
|
|
|
|
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
|
|
|
|
|
// loadscaninvnEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) {
|
|
|
|
|
// loadscaninvnEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleId())) {
|
|
|
|
|
// loadscaninvnEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleNub())) {
|
|
|
|
|
// loadscaninvnEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
|
|
|
|
|
// }
|
|
|
|
|
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverPhone())) {
|
|
|
|
|
// loadscaninvnEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
|
|
|
|
|
// }
|
|
|
|
|
// loadscaninvnEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString());
|
|
|
|
|
// loadscaninvnEntity.setOrderPackageCode(disStockListDetailEntity.getStockPackageCode());
|
|
|
|
|
// loadscaninvnEntity.setInventoryId(disStockListDetailEntity.getStockListId());
|
|
|
|
|
// loadscaninvnEntity.setDeliveryId(distributionSignforEntity.getDeliveryId());
|
|
|
|
|
// loadscaninvnEntity.setReservationId(distributionSignforEntity.getReservationId());
|
|
|
|
|
// loadscaninvnEntity.setScanUser(user.getNickName());
|
|
|
|
|
// loadscaninvnEntity.setScanTime(new Date());
|
|
|
|
|
// loadscaninvnEntity.setPackageNub(disStockListDetailEntity.getNum());
|
|
|
|
|
// loadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue());
|
|
|
|
|
// loadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue());
|
|
|
|
|
// loadscaninvnEntity.setScanType("1");
|
|
|
|
|
// loadscaninvnEntity.setType(2);
|
|
|
|
|
// loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
|
|
|
|
|
// loadscaninvnEntity.setIsSignfor(1);
|
|
|
|
|
// loadscaninvnEntity.setReceivedQuantity(disStockListDetailEntity.getNum());
|
|
|
|
|
// loadscaninvnEntity.setOneClick(2);
|
|
|
|
|
// loadscaninvnEntity.setOneQclick(2);
|
|
|
|
|
// loadscaninvnEntity.setSigningUser(user.getNickName());
|
|
|
|
|
// loadscaninvnEntity.setSigningUserId(user.getUserId());
|
|
|
|
|
// loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
|
|
|
|
|
//
|
|
|
|
|
// if (distributionSignfor.getIsClerk()) {
|
|
|
|
|
// loadscaninvnEntity.setMsg("文员一键签收数据补录");
|
|
|
|
|
// } else {
|
|
|
|
|
// loadscaninvnEntity.setMsg("司机一键签收数据补录");
|
|
|
|
|
// }
|
|
|
|
|
// distributionLoadscaninvnService.save(loadscaninvnEntity);
|
|
|
|
|
// Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
|
|
|
|
|
// //更新签收表的签收数量和装车数量
|
|
|
|
|
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
|
|
|
|
|
// //维护预约库存品数据
|
|
|
|
|
// //扣减库存
|
|
|
|
|
// DistributionStockListEntity stockListEntity = distributionStockListService.getById(disStockListDetailEntity.getStockListId());
|
|
|
|
|
// stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - loadscaninvnEntity.getPackageNub());
|
|
|
|
|
// stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - loadscaninvnEntity.getPackageNub());
|
|
|
|
|
// stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + loadscaninvnEntity.getPackageNub());
|
|
|
|
|
// distributionStockListService.updateById(stockListEntity);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// //库存品扫描记录补充
|
|
|
|
|
// for (DisStockListDetailEntity detailEntity : detailEntities) {
|
|
|
|
|
// if (detailEntity.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())) {
|
|
|
|
|
// detailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue());
|
|
|
|
|
// disStockListDetailService.updateById(detailEntity);
|
|
|
|
|
// //查询出对于的装车扫描记录
|
|
|
|
|
// List<DistributionLoadscaninvnEntity> list = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
|
|
|
|
|
// .eq(DistributionLoadscaninvnEntity::getDeliveryId, distributionSignfor.getDeliveryId())
|
|
|
|
|
// .eq(DistributionLoadscaninvnEntity::getReservationId, distributionSignfor.getReservationId())
|
|
|
|
|
// .eq(DistributionLoadscaninvnEntity::getOrderPackageCode, detailEntity.getStockPackageCode())
|
|
|
|
|
// .ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
|
|
|
|
|
// if (list.size() == 1) {
|
|
|
|
|
// //正常进行扫描记录签收修改
|
|
|
|
|
// DistributionLoadscaninvnEntity loadscaninvnEntity = list.get(0);
|
|
|
|
|
// if (distributionSignfor.getIsClerk()) {
|
|
|
|
|
// loadscaninvnEntity.setMsg("文员一键签收数据补录");
|
|
|
|
|
// } else {
|
|
|
|
|
// loadscaninvnEntity.setMsg("司机一键签收数据补录");
|
|
|
|
|
// }
|
|
|
|
|
// loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
|
|
|
|
|
// loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
|
|
|
|
|
// loadscaninvnEntity.setOneClick(1);
|
|
|
|
|
// loadscaninvnEntity.setOneQclick(2);
|
|
|
|
|
// loadscaninvnEntity.setSigningUser(user.getUserName());
|
|
|
|
|
// loadscaninvnEntity.setSigningUserId(user.getUserId());
|
|
|
|
|
// loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
|
|
|
|
|
// loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
|
|
|
|
|
// distributionLoadscaninvnService.updateById(loadscaninvnEntity);
|
|
|
|
|
// Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
|
|
|
|
|
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
|
|
|
|
|
// } else {
|
|
|
|
|
// log.error("################库存品未进行备货操作+{}" + list);
|
|
|
|
|
// //此时说明在同一配送任务下,同一客户出现了相同的库存品包件码
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// //对库存品包件上级的状态维护
|
|
|
|
|
// distributionAsyncService.checkStockArticleListSigningStatus(detailEntity);
|
|
|
|
|
// }
|
|
|
|
|
} else { |
|
|
|
|
log.error("################库存品未进行备货操作+{}" + detailEntities); |
|
|
|
|
return R.fail("一键装车失败!!!库存品都备货了!?"); |
|
|
|
|