diff --git a/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/oupai/entity/FactoryPackageEntity.java b/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/oupai/entity/FactoryPackageEntity.java index f6e4aec10..3f157ce7e 100644 --- a/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/oupai/entity/FactoryPackageEntity.java +++ b/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/oupai/entity/FactoryPackageEntity.java @@ -120,7 +120,9 @@ public class FactoryPackageEntity extends BaseEntity { @ApiModelProperty(name = "预留5",notes = "") private String reserve5 ; - + /** oid */ + @ApiModelProperty(name = "oid",notes = "") + private String oid ; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index a80b2c0c0..adb4e12bd 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -3287,7 +3287,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl set = total.keySet(); for (String key:set){ - if(!"合计件数".equals(key)){ + if(!"合计数量".equals(key)){ numObj.put(key,0); for (Map m:mapList){ String thirdProduct = (String)m.get("thirdProduct"); @@ -3338,7 +3338,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("oid",orderCode); + FactoryPackageEntity packageEntity = factoryPackageService.getOne(queryWrapper); + packageEntity.setPackageStatus(5); + factoryPackageService.updateById(packageEntity); + + JSONObject jo = new JSONObject(); + jo.put("orderPackageCode",orderCode); + jo.put("receivingTime",CommonUtil.dateToString(packageEntity.getUpdateTime())); + + //真正的处理需要的数据 + Map map = new HashMap<>(); + map.put("messageId", CommonUtil.getUUID()); + map.put("type", "Push"); + map.put("messageData", jo.toJSONString()); + map.put("createTime", new Date().getTime()); + try { + rabbitTemplate.convertAndSend(RabbitConstant.OUPAI_RECEIVING_EXCHANGE, RabbitConstant.OUPAI_RECEIVING_ROUTING, map); + } catch (Exception e) { + log.error("############saveOuPaiPackageStatusByCode: {}", e.getMessage()); + } + + log.info("############saveOuPaiPackageStatusByCode: 数据处理结束"); - handlePackageData(url, event); return orderCode; } @Override public String saveOuPaiOutGoingOrderByCode(String orderCode, Integer event) { // - String url = ouPaiProperties.getUri() + "tims_odata_api/api/odata/OutGoingOrder?$filter=Code eq 'PS20230802-6'" + + String url = ouPaiProperties.getUri() + "tims_odata_api/api/odata/OutGoingOrder?$filter=Code eq '"+orderCode+"'" + "&$select=Code,Status,Truck,DriverPhone,Platform,DeliveryDate,Creator,CreateTime,IsAdjust,SendTime," + "Customers,Volume" + "&$expand=Warehouse($select=Code,Name)" + @@ -459,6 +480,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { factoryPackageEntity = new FactoryPackageEntity(); factoryPackageEntity.setOrderId(orderId); factoryPackageEntity.setCode(packageCode); + factoryPackageEntity.setOid(packageEntity.getString("Oid")); factoryPackageEntity.setFirstClassCode(packageEntity.getString("FirstClassCode")); factoryPackageEntity.setFirstClassName(packageEntity.getString("FirstClassName")); factoryPackageEntity.setSecondClassCode(packageEntity.getString("SecondClassCode")); @@ -577,7 +599,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { 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;" + + "Packages($select=Oid,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=" + "Code,SelfCode,ContractNumber,ServiceNumber,OrderClass,OrderType,Status,FactoryShipStatus,FactorySendQty,WarehouseReceiveStatus,WarehouseReceiveQty,ReservationStatus,Store,MatingCode,IsMating,FirstClassCode,Leave,Customer,Province,City,CustomerAddress,CustomerPhone,ShopReceiver,BrandCode,BrandName,From,OutGoingTime,CreateTime,Freeze,FirstShipTime,MatingShipTime,FirstReceiveTime,MatingReceiveTime;\n" + "$expand=Store($select=Name,Code;$expand=Shop))" +