Browse Source

1.欧派的数据接受新参数

training
pref_mail@163.com 2 years ago
parent
commit
aabfd7972e
  1. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/controller/OupaiFactoryDataController.java
  2. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/IOuPaiFactoryService.java
  3. 17
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java
  4. 18
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/controller/OupaiFactoryDataController.java

@ -50,7 +50,7 @@ public class OupaiFactoryDataController {
factoryLogService.save(orderStatusLog);
String carNum = null;
try {
// carNum = mtFactoryDataService.saveData(ouPaiDataPushVO);
carNum = mtFactoryDataService.saveData(ouPaiDataPushVO);
orderStatusLog.setDataStatus(1);
} catch (ServiceException e) {

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/IOuPaiFactoryService.java

@ -5,10 +5,10 @@ public interface IOuPaiFactoryService {
/**
* 根基欧派派车单查询订单信息
* @param CarNumber
* @param carNumber
* @return
*/
String saveOuPaiFactoryOrderDTOByCarCarNumber(String CarNumber);
String saveOuPaiFactoryOrderDTOByCarCarNumber(String carNumber);
}

17
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java

@ -21,10 +21,19 @@ public class OuPaiFactoryDataServiceImpl implements IOuPaiFactoryDataService {
@Override
public String saveData(OuPaiDataPushVO ouPaiDataPushVO) {
// 获取需要处理的数据并存入数据库
String carNum =ouPaiFactoryService.saveOuPaiFactoryOrderDTOByCarCarNumber(ouPaiDataPushVO.getCarNum());
// 将需要将数据
return carNum;
// 需要判断 这个里面的事件是否为
if(ouPaiDataPushVO.getEvent()==3 && "ReceivingOrder".equals(ouPaiDataPushVO.getTypeName())){
// 获取需要处理的数据并存入数据库
String carNum =ouPaiFactoryService.saveOuPaiFactoryOrderDTOByCarCarNumber(ouPaiDataPushVO.getOrderCode());
// 将需要将数据
return carNum;
}
return ouPaiDataPushVO.getOrderCode();
}
}

18
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java

@ -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=" +

Loading…
Cancel
Save