|
|
|
@ -41,23 +41,23 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
|
|
|
|
|
private IFactoryPackageDetailService factoryPackageDetailService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String saveOuPaiFactoryOrderDTOByCarCarNumber(String carNumber) { |
|
|
|
|
public String saveOuPaiFactoryOrderDTOByCarCarNumber(String code) { |
|
|
|
|
|
|
|
|
|
// 对返回i的数据进行处理 按照 发车单-->订单-->包件 完成保存
|
|
|
|
|
handleData(carNumber); |
|
|
|
|
handleData(code); |
|
|
|
|
|
|
|
|
|
return carNumber; |
|
|
|
|
return code; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 处理返回的JSON数据 |
|
|
|
|
* |
|
|
|
|
* @param carNumber |
|
|
|
|
* @param code |
|
|
|
|
*/ |
|
|
|
|
private void handleData(String carNumber) { |
|
|
|
|
private void handleData(String code) { |
|
|
|
|
|
|
|
|
|
OpOrderStatusLogEntity opOrderStatusLogEntity = findOurPaiDataByCarNumber(carNumber); |
|
|
|
|
OpOrderStatusLogEntity opOrderStatusLogEntity = findOurPaiDataByCarNumber(code); |
|
|
|
|
|
|
|
|
|
// 保存需要解析的数据
|
|
|
|
|
// 获取返回内容
|
|
|
|
@ -372,12 +372,12 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
|
|
|
|
|
/** |
|
|
|
|
* 请求工厂返回的的数据 |
|
|
|
|
* |
|
|
|
|
* @param carNumber |
|
|
|
|
* @param code |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
private OpOrderStatusLogEntity findOurPaiDataByCarNumber(String carNumber) { |
|
|
|
|
private OpOrderStatusLogEntity findOurPaiDataByCarNumber(String code) { |
|
|
|
|
|
|
|
|
|
String url = ouPaiProperties.getUri() + "tims_odata_api/api/odata/ReceivingOrder?$filter=CarNumber eq '"+carNumber+"'&select=Code,Type,Status,Plate,PackagesCount,ReceivePackageCount,PlateNum,CarNumber,CarrierCode,SendTime,ArrivalTime,ReceiveTime,CreateTime,ReturnNumber\n" + |
|
|
|
|
String url = ouPaiProperties.getUri() + "tims_odata_api/api/odata/ReceivingOrder?$filter=Code eq '"+code+"'&select=Code,Type,Status,Plate,PackagesCount,ReceivePackageCount,PlateNum,CarNumber,CarrierCode,SendTime,ArrivalTime,ReceiveTime,CreateTime,ReturnNumber\n" + |
|
|
|
|
"&$expand=" + |
|
|
|
|
"Packages($select=Code,PdaNumber,FirstClassCode,FirstClassName,SecondClassCode,SecondClassName,ThirdClassCode,ThirdClassName,BuyIn,CosourcingCode,CosourcingUnit,SortingCenter,DistributionCenter,Length,Width,Height,Weight,OrderDetail,Order,PathIndex,PathDetail,DeliveryOrders,ReceivingOrders,LPN,LpnSerialNum,IsEntruck,ReservationOrder,OutGoingOrderDetail,SignBill,IsInventory,Inventories,InventoryInDetails,Freeze,OutGoingOrderDetailInventoryDetail,From,Creator,CreateTime,ShipTime,CarNumber,DeliveryMethod,DeliveryReceiver,DeliveryReceiverPhone,ReturnNumber,GroupType,CarrierCode,CarrierName,PackageDetailNames,ReceivingTime,SendTime,ExceptionSignRemark,Descript,SignTime,OutOrder,IsReceiveByHand,PackageStatus,PackageDetailNames;" + |
|
|
|
|
"$expand=Order($select=" + |
|
|
|
|