|
|
|
@ -1386,6 +1386,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
|
|
|
|
|
Integer carsType = orderDetailEntity.getCarsType(); |
|
|
|
|
Integer signState = orderDetailEntity.getSignState(); |
|
|
|
|
waybillNo = orderDetailEntity.getWaybillNo(); |
|
|
|
|
Date rukuTime = orderDetailEntity.getCreateTime(); |
|
|
|
|
|
|
|
|
|
//存入运单信息
|
|
|
|
|
WayBillEntity waybillEntity = saveWaybillEntity(waybillNo); |
|
|
|
@ -1408,9 +1409,20 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
|
|
|
|
|
// if(3==carsType||4 == carsType){
|
|
|
|
|
// entity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue());
|
|
|
|
|
// }
|
|
|
|
|
// if(2 == signState){
|
|
|
|
|
// entity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
|
|
|
|
|
// }
|
|
|
|
|
if(2 == signState){ |
|
|
|
|
entity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); |
|
|
|
|
}else{ |
|
|
|
|
String warehouseName = waybillEntity.getWarehouseName();//目的仓
|
|
|
|
|
BasicdataWarehouseEntity endhouse = basicdataWarehouseClient.findByName(warehouseName); |
|
|
|
|
Long endWarehouseId = endhouse.getId(); |
|
|
|
|
Long warehouseId = distributionStockArticleEntity.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
if(endWarehouseId.equals(warehouseId)){ |
|
|
|
|
entity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue()); |
|
|
|
|
}else{ |
|
|
|
|
entity.setOrderPackageStatus(OrderPackageStatusConstant.zhongzhuanruku.getValue()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
entity.setOrderPackageFreezeStatus(OrderPackageFreezeStatusConstant.weidongjie.getValue()); |
|
|
|
|
entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); |
|
|
|
|
entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue()); |
|
|
|
@ -1431,7 +1443,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
|
|
|
|
|
entity.setDealerCode(distributionStockArticleEntity.getDealerCode()); |
|
|
|
|
entity.setDealerName(distributionStockArticleEntity.getDealerName()); |
|
|
|
|
|
|
|
|
|
entity.setWarehouseEntryTimeEnd(CommonUtil.StringToDate(operationTime)); |
|
|
|
|
entity.setWarehouseEntryTimeEnd(rukuTime); |
|
|
|
|
|
|
|
|
|
entity.setMaterialCode(vo.getMaterialCode()); |
|
|
|
|
entity.setMaterialName(vo.getMaterialName()); |
|
|
|
@ -1455,20 +1467,21 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
|
|
|
|
|
log.warn("#################handleDataToPlatform: 保存包件信息失败 orderCode={}", entity.getOrderCode()); |
|
|
|
|
}else{ |
|
|
|
|
log.info("################handleDataToPlatform: 保存包件成功 OrderPackageCode={}",vo.getPacketBarCode()); |
|
|
|
|
Integer handQuantity = distributionStockArticleEntity.getHandQuantity(); |
|
|
|
|
Integer totalNumber = distributionStockArticleEntity.getTotalNumber(); |
|
|
|
|
|
|
|
|
|
if(handQuantity+1 >= totalNumber){ |
|
|
|
|
distributionStockArticleEntity.setCompleteSet(1); |
|
|
|
|
distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.yishouhuo.getValue()); |
|
|
|
|
distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); |
|
|
|
|
}else{ |
|
|
|
|
distributionStockArticleEntity.setCompleteSet(0); |
|
|
|
|
distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue()); |
|
|
|
|
distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue()); |
|
|
|
|
} |
|
|
|
|
distributionStockArticleEntity.setHandQuantity(handQuantity + 1); |
|
|
|
|
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity); |
|
|
|
|
// distributionStockArticleClient.updateOrderInfo(orderCode,distributionStockArticleEntity.getWarehouseId());
|
|
|
|
|
// Integer handQuantity = distributionStockArticleEntity.getHandQuantity();
|
|
|
|
|
// Integer totalNumber = distributionStockArticleEntity.getTotalNumber();
|
|
|
|
|
//
|
|
|
|
|
// if(handQuantity+1 >= totalNumber){
|
|
|
|
|
// distributionStockArticleEntity.setCompleteSet(1);
|
|
|
|
|
// distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.yishouhuo.getValue());
|
|
|
|
|
// distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue());
|
|
|
|
|
// }else{
|
|
|
|
|
// distributionStockArticleEntity.setCompleteSet(0);
|
|
|
|
|
// distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue());
|
|
|
|
|
// distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue());
|
|
|
|
|
// }
|
|
|
|
|
// distributionStockArticleEntity.setHandQuantity(handQuantity + 1);
|
|
|
|
|
// distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|