Browse Source

1.bug修复

dev
zhenghaoyu 3 days ago
parent
commit
25de2f9ccd
  1. 10
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  2. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  3. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  4. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  5. 110
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  6. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  7. 16
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

10
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java

@ -339,6 +339,16 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
currentStockArticleEntity.setIncomingNum(enterNum);
Long orderId = stockArticleClient.addData(currentStockArticleEntity);
if(!Objects.isNull(orderId)){
if(orderId.equals(0L)){
log.warn("################dealAbnormal: 订单信息保存失败 orderCode={} warehouseId={}",orderCode,warehouseId);
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################dealAbnormal: 订单信息正在更新 orderCode={} warehouseId={}",orderCode,warehouseId);
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
List<TrunklineScanZeroDetailEntity> updateScanZeroDetailEntityList = new ArrayList<>();
List<DistributionParcelNumberEntity> addParcelNumberEntityList = new ArrayList<>();
List<AftersalesAbnormalRecordZeroDetailEntity> updateRecordZeroDetailList = new ArrayList<>();

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -85,24 +85,23 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
if(exists){
String idStr = bladeRedis.get(key);
if("1".equals(idStr)){
throw new CustomerException(405,"订单"+orderCode+"正在更新,请重新扫描");
return 1L;
}else{
return Long.valueOf(idStr);
}
}else{
bladeRedis.setEx(key,"1",30L);
DistributionStockArticleEntity distributionStockArticle = distributionStockArticleService.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(ObjectUtils.isNotEmpty(distributionStockArticle)){
bladeRedis.setEx(key,distributionStockArticle.getId(),30L);
return distributionStockArticle.getId();
}else{
bladeRedis.setEx(key,"1",30L);
boolean saveFlag = distributionStockArticleService.save(distributionStockArticleEntity);
if(saveFlag){
bladeRedis.setEx(key,distributionStockArticle.getId(),30L);
return distributionStockArticleEntity.getId();
}else{
throw new CustomerException(405,"订单"+orderCode+"保存失败,请重新扫描");
return 0L;
}
}
}

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

@ -6193,6 +6193,15 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
if (Objects.isNull(orderId)) {
log.warn("#################createStockArticle: 保存订单信息失败 orderCode={}", distributionStockArticleEntity.getOrderCode());
throw new CustomerException(405, "保存订单信息失败");
}else{
if(orderId.equals(0L)){
log.warn("################createStockArticle: 订单信息保存失败 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################dealAbnocreateStockArticlermal: 订单信息正在更新 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
}
List<WarehouseWayBillDetail> wayBillDetailList = warehouseWaybillDetailClient.findByWaybillId(warehouseWaybill.getId());

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

@ -233,6 +233,16 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
if (Objects.isNull(orderId)) {
log.warn("##############saveOrderAndPackage: 订单信息有误 orderId={}", orderId);
throw new CustomerException(405, "订单信息有误");
}else{
if(orderId.equals(0L)){
log.warn("################saveOrderAndPackage: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################saveOrderAndPackage: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
}
log.info("#############saveOrderAndPackage: 订单信息保存成功 orderId={}", orderId);
@ -582,6 +592,15 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
if (Objects.isNull(orderId)) {
log.warn("##############saveOrderAndPackage: 订单信息有误 orderId={}", orderId);
throw new CustomerException(405, "订单信息有误");
}else{
if(orderId.equals(0L)){
log.warn("################saveOrderAndPackage: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################saveOrderAndPackage: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
}
stockArticleClient.updateAllOrderTotalNum(orderCode, total);

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

@ -1347,6 +1347,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setWarehouseEntryTimeEnd(date);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) {
if(orderId.equals(1L)){
log.warn("################unloadByLoadId: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
Integer isTransfer = 1;
List<DistributionParcelListVO> parcelListEntityList = distributionParcelListClient.findEntityVOListByOrderCode(orderCode, fromWarehouseId);
@ -5201,6 +5207,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setWarehouseEntryTimeEnd(date);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) {
if(orderId.equals(1L)){
log.warn("################zeroUnloadEnter: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
Integer isTransfer = 1;
List<DistributionParcelListVO> parcelListEntityList = distributionParcelListClient.findEntityVOListByOrderCode(orderCode, fromWarehouseId);
@ -5749,6 +5759,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if(NumberUtil.equals(orderId,0)){
log.warn("################111111: 保存失败");
throw new CustomerException(405,"保存失败");
}else{
if(orderId.equals(1L)){
log.warn("################updateParcelListToWarehouse: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
}
}else{
stockArticleEntity.setGenre(1);
@ -7628,6 +7643,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setAllocation(null);
newStockArticleEntity.setTrays(null);
orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if(orderId.equals(0L)){
log.warn("################batchUnload: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################batchUnload: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
finalOrderCodes.put(e, orderId);
}
@ -7749,6 +7773,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setAllocation(null);
newStockArticleEntity.setTrays(null);
orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if(orderId.equals(0L)){
log.warn("################batchUnload: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################batchUnload: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
finalOrderCodes1.put(e, orderId);
}
@ -10105,6 +10137,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newEntity.setAllocation(null);
newEntity.setTrays(null);
Long orderId = distributionStockArticleClient.addData(newEntity);
if(orderId.equals(0L)){
log.warn("################getDistributionStockArticle: 订单信息保存失败 orderCode={} warehouseId={}",newEntity.getOrderCode(),newEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################getDistributionStockArticle: 订单信息正在更新 orderCode={} warehouseId={}",newEntity.getOrderCode(),newEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
newEntity.setId(orderId);
return newEntity;
}
@ -11897,6 +11937,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setWarehouseEntryTime(new Date());
currentStockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackage: 订单信息保存失败 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackage: 订单信息正在更新 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
currentStockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = currentStockArticleEntity.getId();
@ -12112,6 +12160,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setWarehouseEntryTime(new Date());
currentStockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackage: 订单信息保存失败 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackage: 订单信息正在更新 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
currentStockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = currentStockArticleEntity.getId();
@ -12286,6 +12342,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
stockArticleEntity.setWarehouseEntryTime(new Date());
stockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(stockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackage: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackage: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
stockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = stockArticleEntity.getId();
@ -12386,6 +12450,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticle.setWarehouseEntryTime(new Date());
newStockArticle.setWarehouseEntryTimeEnd(new Date());
orderId = distributionStockArticleClient.addData(newStockArticle);
if(orderId.equals(0L)){
log.warn("################unloadPackage: 订单信息保存失败 orderCode={} warehouseId={}",newStockArticle.getOrderCode(),newStockArticle.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################unloadPackage: 订单信息正在更新 orderCode={} warehouseId={}",newStockArticle.getOrderCode(),newStockArticle.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} else {
orderId = newStockArticle.getId();
}
@ -12753,6 +12826,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setWarehouseEntryTime(new Date());
currentStockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackageNoXz: 订单信息保存失败 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackageNoXz: 订单信息正在更新 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
currentStockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = currentStockArticleEntity.getId();
@ -12902,6 +12983,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setWarehouseEntryTime(new Date());
currentStockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackageNoXz: 订单信息保存失败 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackageNoXz: 订单信息正在更新 orderCode={} warehouseId={}",currentStockArticleEntity.getOrderCode(),currentStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
currentStockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = currentStockArticleEntity.getId();
@ -13067,6 +13156,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
stockArticleEntity.setWarehouseEntryTime(new Date());
stockArticleEntity.setWarehouseEntryTimeEnd(new Date());
currentOrderId = distributionStockArticleClient.addData(stockArticleEntity);
if(currentOrderId.equals(0L)){
log.warn("################unloadPackageNoXz: 订单信息保存失败 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(currentOrderId.equals(1L)){
log.warn("################unloadPackageNoXz: 订单信息正在更新 orderCode={} warehouseId={}",stockArticleEntity.getOrderCode(),stockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
stockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = stockArticleEntity.getId();
@ -13164,6 +13261,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticle.setWarehouseEntryTime(new Date());
newStockArticle.setWarehouseEntryTimeEnd(new Date());
orderId = distributionStockArticleClient.addData(newStockArticle);
if(orderId.equals(0L)){
log.warn("################unloadPackageNoXz: 订单信息保存失败 orderCode={} warehouseId={}",newStockArticle.getOrderCode(),newStockArticle.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(orderId.equals(1L)){
log.warn("################unloadPackageNoXz: 订单信息正在更新 orderCode={} warehouseId={}",newStockArticle.getOrderCode(),newStockArticle.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} else {
orderId = newStockArticle.getId();
}
@ -13863,6 +13968,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setCarsLoadNum(0);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) {
if(orderId.equals(1L)){
log.warn("################unloadZeroWithTray: 订单信息正在更新 orderCode={} warehouseId={}",newStockArticleEntity.getOrderCode(),newStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, fromWarehouseId);
List<DistributionParcelNumberEntity> ls = new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) {

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -4877,10 +4877,15 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
id = distributionStockArticleClient.addData(distributionStockArticleEntity);
distributionStockArticleEntity.setId(id);
if (id == 0) {
log.warn("#################handleDataToPlatform: 保存订单信息失败 orderCode={}", orderCode);
throw new CustomerException(405, "保存订单信息失败");
if(id.equals(0L)){
log.warn("################handleDataToPlatform: 订单信息保存失败 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(id.equals(1L)){
log.warn("################handleDataToPlatform: 订单信息正在更新 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
} else {
id = distributionStockArticleEntity.getId();
distributionStockArticleEntity.setTotalNumber(total);

16
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -285,9 +285,13 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setDescriptionGoods(sb.toString());
id = distributionStockArticleClient.addData(distributionStockArticleEntity);
if (id == 0) {
log.warn("#################createStockArticle: 保存订单信息失败 orderSelfNum={}", waybillNo);
throw new CustomerException(405, "保存订单信息失败");
if(id.equals(0L)){
log.warn("################createStockArticle: 订单信息保存失败 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息保存失败");
}
if(id.equals(1L)){
log.warn("################createStockArticle: 订单信息正在更新 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
//第一次生成订单也要生成包件信息
@ -460,6 +464,12 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
log.warn("###########splitOrder: 保存新订单数据失败");
throw new CustomerException(405, "保存新订单数据失败");
} else {
if(aLong.equals(1L)){
log.warn("################splitOrder: 订单信息正在更新 orderCode={} warehouseId={}",distributionStockArticleEntity.getOrderCode(),distributionStockArticleEntity.getWarehouseId());
throw new CustomerException(405,"订单信息正在更新,请稍后重试");
}
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>();
for (ProductDTO productDTO : products) {
String productName = productDTO.getProductName();

Loading…
Cancel
Save