Browse Source

装车、签收增加回库校验,完善异常和回库任务

dist.1.3.0
汤建军 7 months ago
parent
commit
7955fbd1df
  1. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionLoadscanAbnormalClient.java
  2. 2
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionLoadscanAbnormalClient.java
  4. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  5. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  6. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java
  7. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionLoadscanAbnormalClient.java

@ -17,6 +17,7 @@
package com.logpm.distribution.feign;
import com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@ -29,7 +30,7 @@ import org.springframework.web.bind.annotation.RequestParam;
* @since 2023-09-22
*/
@FeignClient(
value = "loadscanAbnormal"
value = ModuleNameConstant.APPLICATION_DISTRIBUTION_NAME
)
public interface IDistributionLoadscanAbnormalClient {
@ -47,5 +48,5 @@ public interface IDistributionLoadscanAbnormalClient {
BladePage<DistributionLoadscanAbnormalEntity> loadscanAbnormalTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
@GetMapping(TOP+"completeAbnormal")
void completeAbnormal(Long abnormalId);
void completeAbnormal(@RequestParam("abnormalId")Long abnormalId);
}

2
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java

@ -73,5 +73,5 @@ public interface IWarehouseRetentionScanClient {
List<DistributionRetentionScanVO> getRetentionScanEntityListByWarehouseId(@RequestParam("warehouseId") Long warehouseId,@RequestParam("taskTimeStart")String taskTimeStart,@RequestParam("taskTimeEnd")String taskTimeEnd);
@GetMapping(TOP+"/judgeIsHaveRetention")
boolean judgeIsHaveRetention(String orderPackageCode, Long id);
boolean judgeIsHaveRetention(@RequestParam("orderPackageCode")String orderPackageCode,@RequestParam("warehouseId") Long warehouseId);
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionLoadscanAbnormalClient.java

@ -24,6 +24,7 @@ import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ -52,6 +53,7 @@ public class DistributionLoadscanAbnormalClient implements IDistributionLoadscan
}
@Override
@Transactional
public void completeAbnormal(Long abnormalId) {
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = new DistributionLoadscanAbnormalEntity();
distributionLoadscanAbnormalEntity.setId(abnormalId);

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

@ -6814,6 +6814,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//已经进行装车
loadscanEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue());
distributionLoadscanService.updateById(loadscanEntity);
//对此包件进行回库操作
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.weizhuancghe.getValue());
distributionParcelListService.updateById(parcelListEntity);
// 对应签收信息的装车数量要进行扣减
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub());
//维护订单状态
@ -6821,6 +6826,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.CANCEL_DISTRIBUTION.getCode());
aaa.add(js);
//对滞留包件进行签收信息数量减少
//进行指定包件的相关订单维护
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(),parcelListEntity.getWarehouseId());
}
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
@ -8659,6 +8666,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return Resp.scanFail("此包件存在计划", "此包件存在计划");
}
//判定是否满足异常装车
if (!deliveryListEntity.getKind().equals("1")) {
return Resp.scanFail("外协不允许进行异常操作", "外协不允许进行异常操作");
}
Boolean isAbnormalLoadingFlag = judgeIsAbnormalLoading(deliveryId, parcelListEntity, reservationId);
if (isAbnormalLoadingFlag) {
log.info("异常装车判定成功>>>>>>packageCode:{},reservationId:{}", distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getReservationId());
@ -9246,6 +9256,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryList.getId())
.eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
.ne(DistributionLoadscanEntity::getIsAbnormalLoading, 2)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
int abnormalTotal = 0;
if (Func.isNotEmpty(abnormalLoadingPack)) {

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

@ -5278,7 +5278,21 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.fail(403, "仓库信息不能为空");
// throw new CustomerException(403, "仓库信息不能为/**/空");
}
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getReservationId, distributionSignfor.getReservationId())
.ne(DistributionLoadscanAbnormalEntity::getAbnormalType, LoadingAbnormalTypeConstant.zhuangcheyichang.getValue())
);
if (!abnormalEntities.isEmpty()) {
boolean isAuditing = abnormalEntities.stream().anyMatch(a -> LoadingAbnormalAuditingStatusConstant.daishenhe.getValue().equals(a.getAuditingStatus()));
if (isAuditing){
return Resp.scanFail("当前客户存在异常未操作","当前客户存在异常未操作");
}else {
boolean isComplete = abnormalEntities.stream().anyMatch(b -> b.getComplete() != 1);
if (isComplete){
return Resp.scanFail("当前客户存在回库未完成","当前客户存在回库未完成");
}
}
}
int loadingPackageNum = 0;
int loadingInventoryNum = 0;
int signingPackageNum = 0;

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java

@ -83,8 +83,6 @@ public class WarehouseRetentionScanClient implements IWarehouseRetentionScanClie
@Override
public boolean judgeIsHaveRetention(String orderPackageCode, Long warehouseId) {
return warehouseRetentionScanService.judgeIsHaveRetention(orderPackageCode,warehouseId);
}

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

@ -477,7 +477,9 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
//维护签收表的异常状态
distributionSignforClient.maintainIsHaveAbnormalPackage(warehouseRetentionScanEntity.getReservationId());
//对此回库任务绑定的异常标注完成
distributionLoadscanAbnormalClient.completeAbnormal(warehouseRetentionScanEntity.getAbnormalId());
if (Func.isNotEmpty(warehouseRetentionScanEntity.getAbnormalId())){
distributionLoadscanAbnormalClient.completeAbnormal(warehouseRetentionScanEntity.getAbnormalId());
}
}
}
if (saveFlah.get()) {

Loading…
Cancel
Save