Browse Source

装车取消分页

single_db
汤建军 1 year ago
parent
commit
2112c32498
  1. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java
  2. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java
  4. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  5. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  6. 35
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  7. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java

@ -65,8 +65,8 @@ public class DistributionDeliveryAppController {
@GetMapping("/custom")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "详情", notes = "传入DistributionDeliveryListDTO")
public R<IPage<DistributionAppReservationVO>> detail(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) {
IPage<DistributionAppReservationVO> pages = distributionDeliveryListService.getAppDeliveryreservationListPage(Condition.getPage(query),distributionDeliveryList);
public R<List<DistributionAppReservationVO>> detail(DistributionAppDeliveryListDTO distributionDeliveryList) {
List<DistributionAppReservationVO> pages = distributionDeliveryListService.getAppDeliveryreservationListPage(distributionDeliveryList);
return R.data(pages);
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -393,6 +393,15 @@ public class DistributionDeliveryListController extends BladeController {
return result;
}
@GetMapping("/judgmentOrderRemove")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "判断是否可以在商配计划中移除", notes = "customArgs")
public R<Boolean> judgmentOrderRemove(@RequestParam Long deliveryId,@RequestParam Long orderId) {
boolean result = distributionDeliveryListService.judgmentOrderRemove(deliveryId,orderId);
return R.data(result);
}
@PostMapping("/printBatch")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "批量打印 配送单")
@ -418,6 +427,5 @@ public class DistributionDeliveryListController extends BladeController {
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java

@ -132,7 +132,7 @@ public interface DistributionDeliveryInfoMapper extends BaseMapper<DistributionD
*
* @return
*/
List<DistributionAppReservationVO> selectAppcustomListPage(IPage<DistributionAppReservationVO> page,@Param("deliveryListId") Long id);
List<DistributionAppReservationVO> selectAppcustomListPage(@Param("deliveryListId") Long id);
/**
* App-通过配送查询客户库存品信息分页
*

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -150,7 +150,7 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
/**
* App-配送管理 查看客户
*/
IPage<DistributionAppReservationVO> getAppDeliveryreservationListPage(IPage<DistributionAppReservationVO> page,DistributionAppDeliveryListDTO distributionDeliveryList);
List<DistributionAppReservationVO> getAppDeliveryreservationListPage(DistributionAppDeliveryListDTO distributionDeliveryList);
List<DisStockListDetailVO> selectDistributionAppDeliverywrapIn( DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
@ -385,6 +385,15 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
*/
IPage<DistributionDeliveryWordVO> getShippingInformation(IPage<Object> page, DistributionDeliveryListDTO distributionDeliveryInfoDTO);
/**
* 查询商配计划订单是否可以移除
* @param deliveryId
* @param orderId
* @return
*/
boolean judgmentOrderRemove(Long deliveryId, Long orderId);
/**
* 查询签收预约客户包件信息
* @param reservationId

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -1214,24 +1214,24 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
if (Func.isNotEmpty(packageId)) {
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(packageId);
//维护包件所属订单签收状态
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
//维护该订单的签收状态
if (Func.isNotEmpty(stockArticleEntity)) {
Integer totalNumber = stockArticleEntity.getTotalNumber();
Integer orderSignNum = distributionLoadscanMapper.selectOrderSignNum(stockArticleEntity.getId());
Integer orderLoadingNum = distributionLoadscanMapper.selectOrderLoadingNum(stockArticleEntity.getId());
if (Func.isNotEmpty(orderSignNum) && orderSignNum > 0) {
if (totalNumber == orderSignNum) {
stockArticleEntity.setOrderStatus(OrderStatusConstant.qianshou.getValue());
} else {
stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenqianshou.getValue());
}
}
distributionStockArticleService.updateById(stockArticleEntity);
}
// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
// //维护该订单的签收状态
// if (Func.isNotEmpty(stockArticleEntity)) {
// Integer totalNumber = stockArticleEntity.getTotalNumber();
// Integer orderSignNum = distributionLoadscanMapper.selectOrderSignNum(stockArticleEntity.getId());
// Integer orderLoadingNum = distributionLoadscanMapper.selectOrderLoadingNum(stockArticleEntity.getId());
//
// if (Func.isNotEmpty(orderSignNum) && orderSignNum > 0) {
// if (totalNumber == orderSignNum) {
// stockArticleEntity.setOrderStatus(OrderStatusConstant.qianshou.getValue());
// } else {
// stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenqianshou.getValue());
// }
// }
// distributionStockArticleService.updateById(stockArticleEntity);
// }
distributionStockArticleService.updateOrderInfo(parcelListEntity.getOrderCode(),parcelListEntity.getWarehouseId());
}
checkReservationAndDeliveryLoadingStatus(deliveryId, reservationId);
checkReservationAndDeliverySigningStatus(reservationId, deliveryId);
//注意:这里对于异常装车的包件也需要进行统计

35
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -597,11 +597,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//扣减订单的在库数量
Integer k = distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
//这里还需要一个维护状态的方法
//这里还需要一个订单维护状态的方法
distributionStockArticleService.updateOrderInfo(parcelListEntity.getOrderCode(),parcelListEntity.getWarehouseId());
//异步维护状态
// str.append("包件装车");
// loadingNum.getAndAdd(loadscanEntity.getPackageNub());
distributionAsyncService.checkLoadingByPackage(parcelListEntity, loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId());
// distributionAsyncService.checkLoadingByPackage(parcelListEntity, loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId());
} else if (parcelListEntityList.size() == 0) {
//查找出该包件信息
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getOne(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()));
@ -612,7 +613,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleMapper.selectById(parcelListEntity.getStockArticleId());
if (shangpeiFlag) {
List<DistributionReservationEntity> reservationEntities = reservationEntityList.stream().filter(r -> Func.isNotEmpty(r.getConsignee()) && r.getConsignee().equals(stockArticleEntity.getCustomerName()) && r.getDeliveryAddress().equals(stockArticleEntity.getCustomerAddress()) && r.getDeliveryPhone().equals(stockArticleEntity.getCustomerTelephone()) && r.getMallName().equals(stockArticleEntity.getMallName())).collect(Collectors.toList());
//查看是否存在满足条件的预约单
if (reservationEntities.size() == 1) {
@ -631,7 +631,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
}
} else {
shangpeiFlag = reservationEntityList.stream().allMatch(r -> r.getDeliveryType().equals(DistributionTypeConstant.shangpei.getValue()));
if (shangpeiFlag) {
List<DistributionReservationEntity> reservationEntities = reservationEntityList.stream().filter(r -> r.getReceivingUnit().equals(stockArticleEntity.getConsigneeUnit()) && r.getMallName().equals(stockArticleEntity.getMallName())).collect(Collectors.toList());
@ -764,6 +763,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return Resp.scanFail("查询托盘货物失败", "查询托盘货物失败");
}
}
//异步维护预约装车状态,
//异步维护配送任务装车状态
//查询已装车件数
String str = getLoadingMsg(distrilbutionloadingscanDTO);
return Resp.scanSuccess("装车成功", str);
@ -1539,7 +1543,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
loadscanEntity.setVehicleName(finalDistributionDeliverySelfEntity.getVehicleNub());
loadscanEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue());
loadscanEntity.setOneClick(2);
loadscanEntity.setScanUser(user.getUserName());
loadscanEntity.setScanUser(user.getNickName());
loadscanEntity.setScanTime(now);
if (StringUtils.isNotBlank(finalDistributionDeliverySelfEntity.getDriverPhone())) {
loadscanEntity.setDriverPhone(finalDistributionDeliverySelfEntity.getDriverPhone());
@ -2625,9 +2629,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// }
@Override
public IPage<DistributionAppReservationVO> getAppDeliveryreservationListPage(IPage<DistributionAppReservationVO> page, DistributionAppDeliveryListDTO distributionDeliveryList) {
public List<DistributionAppReservationVO> getAppDeliveryreservationListPage( DistributionAppDeliveryListDTO distributionDeliveryList) {
//查询客户
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(page, distributionDeliveryList.getId());
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(distributionDeliveryList.getId());
for (DistributionAppReservationVO distributionAppReservationVO : customList) {
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distributionAppReservationVO.getId());
List<DistributionStockEntity> distributionStockEntities = new ArrayList<>();
@ -2712,7 +2716,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionAppReservationVO.setIsload("否");
}
}
return page.setRecords(customList);
return customList;
}
@Override
@ -6677,4 +6681,19 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return iPage;
}
@Override
public boolean judgmentOrderRemove(Long deliveryId, Long orderId) {
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryId)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(loadscanEntityList)){
Map<Long, DistributionLoadscanEntity> loadingOrderMap = loadscanEntityList.stream().collect(Collectors.toMap(DistributionLoadscanEntity::getOrderId, Function.identity(), (k1, k2) -> k2));
if (Func.isNotEmpty(loadingOrderMap.get(orderId))){
return false;
}
}
return true;
}
}

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -791,6 +791,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()));
//进行包件状态维护
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
distributionParcelListService.updateById(parcelListEntity);
if (Func.isNotEmpty(loadscanEntity)) {
if (loadscanEntity.getSignforState().equals(2)) {
return Resp.scanFail("重复扫描", "重复扫描");
@ -815,8 +819,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setSigningUser(nickName);
loadscanEntity.setSigningUserId(userId);
distributionLoadscanService.updateById(loadscanEntity);
//缺少一个异步维护包件签收的方法
// distributionAsyncService.changeOrderSignforStatus(collect.get(0));
@ -893,9 +895,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
//扣减订单的在库数量
Integer k = distributionStockArticleMapper.deductionHandQuantity(distributionLoadscanEntity.getOrderId(), distributionLoadscanEntity.getLoadedNub());
warehouseUpdownTypeClient.downPackageOrDelTray(collect.get(0).getOrderPackageCode(), myCurrentWarehouse.getId());
distributionAsyncService.checkSignStatus(distributionLoadscanEntity.getPackageId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getDeliveryId());
}
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
distributionAsyncService.sendFactory(collect.get(0), signingTime, distributionReservationEntity.getId(), distributionReservationEntity.getReservationCode(), myCurrentWarehouse.getId());
//TODO 这里就需要一个异步的包件状态维护方法
} else if (Func.isEmpty(collect)) {

Loading…
Cancel
Save