Browse Source

1.干线bug修复

visual
zhenghaoyu 7 months ago
parent
commit
adcf2301fb
  1. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  2. 40
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  3. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillTrackServiceImpl.java

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -38,7 +38,6 @@ import org.springblade.common.annotations.RepeatSubmit;
import org.springblade.common.constant.CodeNumConstant;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.IncomingTypeEnum;
import org.springblade.common.constant.WorkNodeEnums;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.constant.order.*;
import org.springblade.common.exception.CustomerException;
@ -2290,8 +2289,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findAllParcelListByAdvanceIds(advanceIds);
if(CollUtil.isNotEmpty(parcelListEntityList)){
//把parcelListEntityList包件集合中所有元素的orderCode放入一个Set集合
Set<String> orderCodeSet = parcelListEntityList.stream().map(DistributionParcelListEntity::getOrderCode).collect(Collectors.toSet());
List<DistributionStockArticleEntity> stockArticleEntities = distributionStockArticleClient.findAllStockArticleListByOrderCodes(new ArrayList<>(orderCodeSet));
@ -2346,7 +2343,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<TrunklineWaybillPackageEntity> trunklineWaybillPackageEntities = trunklineWaybillPackageService.list(queryWrapper);
if(!trunklineWaybillPackageEntities.isEmpty()){
for (TrunklineWaybillPackageEntity trunklineWaybillPackageEntity : trunklineWaybillPackageEntities) {
trunklineWaybillPackageEntity.setPackageStatus(WorkNodeEnums.END_WAREHOUSE_UNLOADING.getCode());
trunklineWaybillPackageEntity.setPackageStatus(30);
}
trunklineWaybillPackageService.updateBatchById(trunklineWaybillPackageEntities);
}

40
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -1953,34 +1953,32 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
carsLoadEntity.setCarsLineName(loadLineTitleName);
Long lastEndWarehouseId = null;
if(!StringUtil.equals("4",loadType)){
carsLoadEntity.setEndWarehouseIds(endWarehouseIds);
carsLoadEntity.setEndWarehouseNames(endWarehouseNames);
String[] split = endWarehouseIds.split(",");
int length = split.length;
Long.parseLong(split[length - 1]);
}else{
lastEndWarehouseId = warehouseId;
}
if(lastEndWarehouseId.equals(warehouseId)){
//移除当前仓作为目的仓的装车记录
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("load_id",loadId)
Long lastEndWarehouseId = Long.parseLong(split[length - 1]);
if(lastEndWarehouseId.equals(warehouseId)){
//移除当前仓作为目的仓的装车记录
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("load_id",loadId)
.eq("warehouse_id",warehouseId).isNull("final_node_id");
List<TrunklineCarsLoadScanEntity> carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper);
if(CollUtil.isNotEmpty(carsLoadScanEntityList)){
//把carsLoadScanEntityList中所有元素的id放入一个List
List<Long> ids = carsLoadScanEntityList.stream().map(TrunklineCarsLoadScanEntity::getId).collect(Collectors.toList());
removeCarsLoadScan(ids,warehouseId);
}
carsLoadEntity.setLoadStatus("40");
}else{
Long startWarehouseId = carsLoadEntity.getStartWarehouseId();
if(startWarehouseId.equals(warehouseId)){
carsLoadEntity.setLoadStatus("0");
List<TrunklineCarsLoadScanEntity> carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper);
if(CollUtil.isNotEmpty(carsLoadScanEntityList)){
//把carsLoadScanEntityList中所有元素的id放入一个List
List<Long> ids = carsLoadScanEntityList.stream().map(TrunklineCarsLoadScanEntity::getId).collect(Collectors.toList());
removeCarsLoadScan(ids,warehouseId);
}
carsLoadEntity.setLoadStatus("40");
}else{
carsLoadEntity.setLoadStatus("20");
Long startWarehouseId = carsLoadEntity.getStartWarehouseId();
if(startWarehouseId.equals(warehouseId)){
carsLoadEntity.setLoadStatus("0");
}else{
carsLoadEntity.setLoadStatus("20");
}
}
}

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillTrackServiceImpl.java

@ -149,6 +149,9 @@ public class TrunklineWaybillTrackServiceImpl extends BaseServiceImpl<TrunklineW
}
private void addPackageWaybillTrackLog(WaybillLogDTO waybillLogDTO,Long waybillId) {
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
Integer num = waybillLogDTO.getNum();
String carNumber = waybillLogDTO.getCarNumber();
String driverName = waybillLogDTO.getDriverName();
@ -193,6 +196,6 @@ public class TrunklineWaybillTrackServiceImpl extends BaseServiceImpl<TrunklineW
String operationRemark = warehouseName+" "+typeStr+num+"件,车次号:"+trainNumber+",司机:"+driverName+",车牌号:"+carNumber+",签收人"+ signUser+",签收单:"+signOrderCode+",签收时间"+ CommonUtil.dateToStringGeneral(signTime);
openOrderAsyncService.saveLog(waybillId,waybillNo,"100",warehouseName+" "+typeStr,operationRemark,nickName,userId,warehouseId,warehouseName);
trunklineWaybillPackageService.updateWaybillStatus(waybillEntity);
}
}

Loading…
Cancel
Save