Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 8 months ago
parent
commit
1a9c68a21d
  1. 122
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  2. 26
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

122
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -456,8 +456,12 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
stockArticleEntity.setTypeService("1");//默认商配 stockArticleEntity.setTypeService("1");//默认商配
if(!StringUtil.isBlank(waybillNo)){ if(Objects.isNull(waybillEntity)){
if(!Objects.isNull(waybillEntity)){ if(!StringUtil.isBlank(waybillNo)){
waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(Objects.isNull(waybillEntity)){
throw new CustomerException(405,"运单信息不存在");
}
Long consigneeId = waybillEntity.getConsigneeId(); Long consigneeId = waybillEntity.getConsigneeId();
BasicdataClientEntity clientEntity = basicdataClientClient.findEntityById(consigneeId); BasicdataClientEntity clientEntity = basicdataClientClient.findEntityById(consigneeId);
@ -479,45 +483,67 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
if(!Objects.isNull(basicdataStoreBusinessEntity)){ if(!Objects.isNull(basicdataStoreBusinessEntity)){
stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold()); stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold());
} }
} }else{
}else{ Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrand(dealerName, advanceEntity.getBrand());
Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrand(dealerName, advanceEntity.getBrand()); BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(clientId);
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(clientId); if(!Objects.isNull(basicdataClientEntity)){
if(!Objects.isNull(basicdataClientEntity)){ String clientType = basicdataClientEntity.getClientType();
String clientType = basicdataClientEntity.getClientType(); if("5".equals(clientType)){
if("5".equals(clientType)){ stockArticleEntity.setStoreId(basicdataClientEntity.getId());
stockArticleEntity.setStoreId(basicdataClientEntity.getId()); stockArticleEntity.setStoreCode(basicdataClientEntity.getClientCode());
stockArticleEntity.setStoreCode(basicdataClientEntity.getClientCode()); stockArticleEntity.setStoreName(basicdataClientEntity.getClientName());
stockArticleEntity.setStoreName(basicdataClientEntity.getClientName()); //查询门店的父级商场
//查询门店的父级商场 Long pid = basicdataClientEntity.getPid();
Long pid = basicdataClientEntity.getPid(); BasicdataClientEntity pidEntity = basicdataClientClient.findEntityById(pid);
BasicdataClientEntity pidEntity = basicdataClientClient.findEntityById(pid); if(!Objects.isNull(pidEntity)){
if(!Objects.isNull(pidEntity)){ String pidEntityClientType = pidEntity.getClientType();
String pidEntityClientType = pidEntity.getClientType(); if("2".equals(pidEntityClientType)){
if("2".equals(pidEntityClientType)){ //商城
//商城 stockArticleEntity.setMallId(pidEntity.getId());
stockArticleEntity.setMallId(pidEntity.getId()); stockArticleEntity.setMallName(pidEntity.getClientName());
stockArticleEntity.setMallName(pidEntity.getClientName()); stockArticleEntity.setMallCode(pidEntity.getClientCode());
stockArticleEntity.setMallCode(pidEntity.getClientCode());
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(pidEntity.getId(), 3);
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(pidEntity.getId(), 3); if(!Objects.isNull(basicdataStoreBusinessEntity)){
if(!Objects.isNull(basicdataStoreBusinessEntity)){ stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold());
stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold()); }
} }
} }
} }else if("2".equals(clientType)){
}else if("2".equals(clientType)){ //商城
//商城 stockArticleEntity.setMallId(basicdataClientEntity.getId());
stockArticleEntity.setMallId(basicdataClientEntity.getId()); stockArticleEntity.setMallName(basicdataClientEntity.getClientName());
stockArticleEntity.setMallName(basicdataClientEntity.getClientName()); stockArticleEntity.setMallCode(basicdataClientEntity.getClientCode());
stockArticleEntity.setMallCode(basicdataClientEntity.getClientCode());
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(basicdataClientEntity.getId(), 3);
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(basicdataClientEntity.getId(), 3); if(!Objects.isNull(basicdataStoreBusinessEntity)){
if(!Objects.isNull(basicdataStoreBusinessEntity)){ stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold());
stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold()); }
} }
} }
} }
}else{
Long consigneeId = waybillEntity.getConsigneeId();
BasicdataClientEntity clientEntity = basicdataClientClient.findEntityById(consigneeId);
if(!Objects.isNull(clientEntity)){
stockArticleEntity.setMallId(clientEntity.getId());
stockArticleEntity.setMallName(clientEntity.getClientName());
stockArticleEntity.setMallCode(clientEntity.getClientCode());
}
String consignee = waybillEntity.getConsignee();
String consigneeName = waybillEntity.getConsigneeName();
String consigneeMobile = waybillEntity.getConsigneeMobile();
String consigneeAddress = waybillEntity.getConsigneeAddress();
stockArticleEntity.setConsigneeUnit(consignee);
stockArticleEntity.setConsigneePerson(consigneeName);
stockArticleEntity.setConsigneeMobile(consigneeMobile);
stockArticleEntity.setConsigneeAddress(consigneeAddress);
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(consigneeId, 3);
if(!Objects.isNull(basicdataStoreBusinessEntity)){
stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold());
}
} }
stockArticleEntity.setCustomerName(advanceEntity.getCustomerName()); stockArticleEntity.setCustomerName(advanceEntity.getCustomerName());
@ -564,19 +590,17 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
parcelList.setWarehouse(warehouseEntity.getName()); parcelList.setWarehouse(warehouseEntity.getName());
parcelList.setWarehouseId(warehouseId); parcelList.setWarehouseId(warehouseId);
String waybillNo = advanceEntity.getWaybillNo(); String waybillNo = advanceEntity.getWaybillNo();
if(StringUtil.isNotBlank(waybillNo)){ if(!Objects.isNull(waybillEntity)){
if(!Objects.isNull(waybillEntity)){ Long departureWarehouseId = waybillEntity.getDepartureWarehouseId();
Long departureWarehouseId = waybillEntity.getDepartureWarehouseId(); Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId(); parcelList.setWaybillId(waybillEntity.getId());
parcelList.setWaybillId(waybillEntity.getId()); parcelList.setWaybillNumber(waybillEntity.getWaybillNo());
parcelList.setWaybillNumber(waybillEntity.getWaybillNo()); parcelList.setSendWarehouseId(departureWarehouseId);
parcelList.setSendWarehouseId(departureWarehouseId); parcelList.setSendWarehouseName(waybillEntity.getDepartureWarehouseName());
parcelList.setSendWarehouseName(waybillEntity.getDepartureWarehouseName()); parcelList.setAcceptWarehouseId(destinationWarehouseId);
parcelList.setAcceptWarehouseId(destinationWarehouseId); parcelList.setAcceptWarehouseName(waybillEntity.getDestinationWarehouseName());
parcelList.setAcceptWarehouseName(waybillEntity.getDestinationWarehouseName()); if(departureWarehouseId.equals(destinationWarehouseId)){
if(departureWarehouseId.equals(destinationWarehouseId)){ parcelList.setIsTransfer(0);
parcelList.setIsTransfer(0);
}
} }
} }
parcelList.setConditions(1); parcelList.setConditions(1);

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

@ -2194,7 +2194,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
// log.warn("################loadingScan: 下架及解托包件失败"); // log.warn("################loadingScan: 下架及解托包件失败");
// } // }
carsLoadScanEntity.setIsData(1); carsLoadScanEntity.setIsData(1);
isData = 1; isData = 1;
Long otherPackageId = otherParcelListEntity.getId(); Long otherPackageId = otherParcelListEntity.getId();
@ -2243,16 +2242,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Long packageId = parcelListEntity.getId(); Long packageId = parcelListEntity.getId();
waybillNo = parcelListEntity.getWaybillNumber(); waybillNo = parcelListEntity.getWaybillNumber();
orderCode = parcelListEntity.getOrderCode(); orderCode = parcelListEntity.getOrderCode();
waybillId = parcelListEntity.getWaybillId();
fromWarehouseId = parcelListEntity.getWarehouseId(); fromWarehouseId = parcelListEntity.getWarehouseId();
BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId); BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId);
if (!Objects.isNull(fromWarehouseEntity)) { if (!Objects.isNull(fromWarehouseEntity)) {
fromWarehouseName = fromWarehouseEntity.getName(); fromWarehouseName = fromWarehouseEntity.getName();
} }
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if (!Objects.isNull(waybillEntity)) {
waybillId = waybillEntity.getId();
}
carsLoadScanEntity.setWaybillId(waybillId); carsLoadScanEntity.setWaybillId(waybillId);
carsLoadScanEntity.setWaybillNo(waybillNo); carsLoadScanEntity.setWaybillNo(waybillNo);
@ -5347,15 +5342,20 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} }
Long wid = parcelListEntity.getWarehouseId(); Long wid = parcelListEntity.getWarehouseId();
String waybillNumber = parcelListEntity.getWaybillNumber(); String waybillNumber = parcelListEntity.getWaybillNumber();
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber); Long waybillId = parcelListEntity.getWaybillId();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId(); if(!Objects.isNull(waybillId)){
parcelListEntity.setOrderPackageStatus("20"); WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
if (destinationWarehouseId.equals(wid)) {
parcelListEntity.setIsTransfer(0); parcelListEntity.setIsTransfer(0);
} else { if(!Objects.isNull(waybillEntity)){
parcelListEntity.setIsTransfer(1); Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
parcelListEntity.setOrderPackageStatus("20");
if (destinationWarehouseId.equals(wid)) {
parcelListEntity.setIsTransfer(0);
} else {
parcelListEntity.setIsTransfer(1);
}
}
} }
distributionParcelListClient.update(parcelListEntity); distributionParcelListClient.update(parcelListEntity);
if (StringUtil.isNotBlank(trayCode)) { if (StringUtil.isNotBlank(trayCode)) {
updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托"); updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托");

Loading…
Cancel
Save