Browse Source

异常增加装车ID

master
汤建军 6 months ago
parent
commit
8484de7a02
  1. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanAbnormalEntity.java
  2. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  3. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

8
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanAbnormalEntity.java

@ -105,7 +105,13 @@ public class DistributionLoadscanAbnormalEntity extends TenantEntity {
* 仓库Id
*/
@ApiModelProperty(value = "仓库Id")
private String warehouseId;
private Long warehouseId;
/**
* 扫描记录ID
*/
@ApiModelProperty(value = "扫描记录ID")
private Long loadingId;
/**
* 仓库名称
*/

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

@ -5464,7 +5464,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanAbnormalEntity.setLoadingQuantity(parcelListEntity.getQuantity());
distributionLoadscanAbnormalEntity.setPackageCode(parcelListEntity.getOrderPackageCode());
distributionLoadscanAbnormalEntity.setPackageId(parcelListEntity.getId());
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity);
//添加包件数据至扫描表中
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDeliveryId())) {
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
@ -5500,6 +5500,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
loadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId());
loadscanEntity.setIsAbnormalLoading(2);
distributionLoadscanService.save(loadscanEntity);
distributionLoadscanAbnormalEntity.setLoadingId(loadscanEntity.getId());
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getScanUser() + "扫描异常装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
@ -7704,7 +7706,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
.eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId())
);
String content = "";
Long loadingId = 0L;
if (!signforEntityList.isEmpty()) {
List<Long> reservationIds = signforEntityList.stream().map(DistributionSignforEntity::getReservationId).collect(Collectors.toList());
List<DistributionReservationPackageEntity> reservationPackageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda()
@ -7727,6 +7729,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (!Func.isEmpty(loadscanEntity)) {
loadingId = loadscanEntity.getId();
//存在装车数据
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscanEntity.setSignforState(2);
@ -7790,6 +7793,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanEntity.setSigningUserId(distributionDeliverySelfEntity.getDeliveryId());
distributionLoadscanEntity.setScanStatus(LoadingStatusConstant.buluzhuangche.getValue());
distributionLoadscanService.save(distributionLoadscanEntity);
loadingId = distributionLoadscanEntity.getId();
//进行签收数量的修改
Integer i = distributionDeliveryListMapper.updateloadingTimeById(deliveryListEntity.getId());
//更新装车包件数和签收包件数
@ -7845,6 +7849,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanEntity.setSigningUserId(Long.parseLong(distributionLoadscanEntity.getDriverId()));
distributionLoadscanEntity.setTrainNumber(deliveryListEntity.getTrainNumber());
distributionLoadscanService.updateById(distributionLoadscanEntity);
loadingId = distributionLoadscanEntity.getId();
Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//更新签收人
BladeUser user = AuthUtil.getUser();
@ -7906,6 +7911,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanEntity.setIsAbnormalSigning(2);
distributionLoadscanEntity.setAbnormalNote("异常签收");
distributionLoadscanService.save(distributionLoadscanEntity);
loadingId = distributionLoadscanEntity.getId();
//进行签收数量的修改
Integer i = distributionDeliveryListMapper.updateloadingTimeById(deliveryListEntity.getId());
//更新装车包件数和签收包件数
@ -7955,6 +7961,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
packageObj.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
packageObj.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
distributionParcelListService.updateById(packageObj);
//处理异常驳回未滞留的情况
handleAbnormalTurnDown(deliveryListEntity.getId(),packageObj.getOrderPackageCode(), entityWarehouseId.getId());
//下架解托
warehouseUpdownTypeClient.downPackageAndDelTrayAndIsUpdate(packageObj.getOrderPackageCode(), entityWarehouseId.getId(), "扫描装车进行下架、解托", false);
//维护订单
@ -7962,8 +7970,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//维护车次任务状态
deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.peisongzhong.getValue());
distributionDeliveryListService.updateById(deliveryListEntity);
}
}
@ -7971,7 +7977,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
private void handleAbnormalTurnDown(Long deliveryId, String orderPackageCode, Long warehouseId) {
List<DistributionLoadscanAbnormalEntity> list = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getDeliveryListId, deliveryId)
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, orderPackageCode)
.eq(DistributionLoadscanAbnormalEntity::getWarehouseId, warehouseId)
.eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, LoadingAbnormalAuditingStatusConstant.yichang.getValue())
);
if (!list.isEmpty()) {
if (list.size() == 1){
distributionLoadscanAbnormalService.removeById(list.get(0));
}else {
log.info("查询包件驳回数据存在多个deliveryId:{},orderPackageCode:{},warehouseId:{}",deliveryId,orderPackageCode,warehouseId);
}
}
}
@Override

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

@ -3320,6 +3320,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "扫描异常签收,装车方式:补录装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
Long loadingId = 0L;
switch (reservationEntity.getDeliveryType()) {
case "1":
//商配
@ -3394,8 +3395,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isEmpty(loadscanEntity)) {
//更新装车包件数和签收包件数
distributionLoadscanService.save(distributionLoadscanEntity);
loadingId = distributionLoadscanEntity.getId();
Integer j = distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
} else {
loadingId = distributionLoadscanEntity.getId();
content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getSigningUser() + "扫描异常签收,装车方式:扫描装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
distributionLoadscanService.updateById(distributionLoadscanEntity);
distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
@ -3463,8 +3466,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setAbnormalNote("异常签收");
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托");
if (Func.isEmpty(loadscanEntity)) {
loadingId = distributionLoadscanEntity.getId();
distributionLoadscanService.save(distributionLoadscanEntity);
} else {
loadingId = distributionLoadscanEntity.getId();
content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getScanUser() + "扫描异常签收,装车方式:扫描装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
distributionLoadscanService.updateById(distributionLoadscanEntity);
}
@ -3514,6 +3519,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanAbnormalEntity.setLoadingQuantity(parcelListEntity.getQuantity());
distributionLoadscanAbnormalEntity.setPackageCode(parcelListEntity.getOrderPackageCode());
distributionLoadscanAbnormalEntity.setPackageId(parcelListEntity.getId());
distributionLoadscanAbnormalEntity.setLoadingId(loadingId);
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity);
}
//修改对应的签收为可审核

Loading…
Cancel
Save