From d66d71219f0f052d238aad70321ad0b6724de14a Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Mon, 9 Oct 2023 10:39:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E5=8F=AF=E8=A7=86=E5=8C=96=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E8=AE=A1=E7=AE=97=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/WarehouseGoodsAllocationMapper.java | 2 ++ .../mapper/WarehouseGoodsAllocationMapper.xml | 12 ++++++++++-- .../impl/WarehouseGoodsAllocationServiceImpl.java | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java index 25cc11905..8115963b9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java @@ -167,4 +167,6 @@ public interface WarehouseGoodsAllocationMapper extends BaseMapper selectIsStocking(@Param("allocationId") Long allocationId); + + Integer selectOrderNum(@Param("id") Long id); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml index db4a407ef..3897c842b 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml @@ -19,8 +19,7 @@ FROM logpm_warehouse_goods_allocation ${ew.customSqlSegment} + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java index 2fd12ccf7..891cb8d5c 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java @@ -398,7 +398,9 @@ public class WarehouseGoodsAllocationServiceImpl extends BaseServiceImpl Date: Mon, 9 Oct 2023 13:32:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=AC=A7=E6=B4=BE?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=A2=9E=E5=8A=A0=E5=88=B0=E4=BB=93=E5=BA=93=20?= =?UTF-8?q?=E5=92=8C=E5=BF=97=E9=82=A6=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AsyncDataServiceImpl.java | 22 +++++++++---------- .../service/impl/OuPaiFactoryServiceImpl.java | 2 +- .../factory/receiver/UnloadCarComHandler.java | 4 ++-- .../controller/ZbFactoryDataController.java | 10 ++++----- .../impl/WarehouseWaybillServiceImpl.java | 9 +++----- 5 files changed, 21 insertions(+), 26 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java index d025e18f6..b0247882e 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java @@ -852,19 +852,19 @@ public class AsyncDataServiceImpl implements IAsyncDataService { } /** - * 获取订单对象 加入了缓存 - * - * @param orderSelfNum + * 获取订单缓存对象 + * @param receiptId 收货任务ID + * @param orderSelfNum 订单自编号 + * @param departCode 发车单号 * @return */ private AdvanceEntity findAdvanceEntityUseCacheByOrderSelfNumAndReceiptId(Long receiptId,String orderSelfNum,String departCode) { String key = AdvanceEntity.class.getName() + ":"+receiptId + orderSelfNum + ":" + departCode; - AdvanceEntity advanceEntity = bladeRedis.get(key); -// if (ObjectUtils.isNull(advanceEntity)) { + // if (ObjectUtils.isNull(advanceEntity)) { //// advanceEntity = iAdvanceClient.getEntityByMctsTruck(orderSelfNum,departCode); //// bladeRedis.setEx(key, advanceEntity, 12 * 60 * 60L); // } - return advanceEntity; + return bladeRedis.get(key); } private AdvanceEntity saveAdvanceInfor(ZbOrderPackageEntity serviceNumEntity, List zbOrderPackageEntityList) { @@ -874,7 +874,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService { // 查询订单对应的发货单 ZbReceiptEntity zbReceiptEntity = findZbReceiptEntityUseCacheById(serviceNumEntity.getReceiptId()); - AdvanceEntity advanceEntity = findAdvanceEntityUseCacheByOrderSelfNumAndReceiptId(serviceNumEntity.getReceiptId(),serviceNumEntity.getRelationOrderCode(),zbReceiptEntity.getDepartCode()); + AdvanceEntity advanceEntity = findAdvanceEntityUseCacheByOrderSelfNumAndReceiptId(serviceNumEntity.getReceiptId(),serviceNumEntity.getPlatformOrderCode(),zbReceiptEntity.getDepartCode()); if (ObjectUtils.isNotNull(advanceEntity)) { return advanceEntity; } @@ -883,13 +883,13 @@ public class AsyncDataServiceImpl implements IAsyncDataService { //添加订单信息 advanceEntity = new AdvanceEntity(); - advanceEntity.setOrderSelfNum(StringUtil.isBlank(serviceNumEntity.getRelationOrderCode()) ? "" : serviceNumEntity.getRelationOrderCode()); //订单自编号 + advanceEntity.setOrderSelfNum(StringUtil.isBlank(serviceNumEntity.getPlatformOrderCode()) ? "" : serviceNumEntity.getPlatformOrderCode()); //订单自编号 advanceEntity.setSiteName(""); // 基地 advanceEntity.setArea(""); // 区域 advanceEntity.setOrderTypeName(zbReceiptEntity.getOrderType()); //订单类型名称 可以为空 advanceEntity.setOrderClassName("工厂"); //订单类型 可以为空 advanceEntity.setType(FactoryConstant.ZHIBANG); - int num = mathTotalOrderPackageNum(serviceNumEntity.getRelationOrderCode(), zbOrderPackageEntityList); + int num = mathTotalOrderPackageNum(serviceNumEntity.getPlatformOrderCode(), zbOrderPackageEntityList); advanceEntity.setTotal(num); //订单总数据 advanceEntity.setMctsTruck(StringUtil.isBlank(zbReceiptEntity.getDepartCode()) ? "" : zbReceiptEntity.getDepartCode()); //车次 advanceEntity.setMctsTruckNo(zbReceiptEntity.getCarNumber()); @@ -909,7 +909,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService { advanceEntity.setStoreNo(StringUtil.isBlank(serviceNumEntity.getCustomerCode()) ? "" : serviceNumEntity.getCustomerCode()); //门店编码 advanceEntity.setStoreName(serviceNumEntity.getCustomerName()); //门店名称 advanceEntity.setSerialKey(""); //序列号 - advanceEntity.setServiceNum(StringUtil.isBlank(serviceNumEntity.getPlatformOrderCode()) ? "" : serviceNumEntity.getPlatformOrderCode()); //服务号 + advanceEntity.setServiceNum(StringUtil.isBlank(serviceNumEntity.getRelationOrderCode()) ? "" : serviceNumEntity.getRelationOrderCode()); //服务号 advanceEntity.setMatingCode("");//齐套模式 可以为空 advanceEntity.setContractNum("");//合同号 可以为空 advanceEntity.setLeaveBehind(serviceNumEntity.getLegacyFlag());//遗留:Y=是,N=否 @@ -952,7 +952,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService { private int mathTotalOrderPackageNum(String orderNum, List zbOrderPackageEntityList) { int totalPackageNum = 0; for (ZbOrderPackageEntity entity : zbOrderPackageEntityList) { - if (entity.getRelationOrderCode().equals(orderNum)) { + if (entity.getPlatformOrderCode().equals(orderNum)) { totalPackageNum++; } } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index a62e56a99..d401552c0 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -147,7 +147,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { if (Objects.isNull(packageEntity)) { log.warn("############oid 查询数据失败: {}", key); // 查询欧派系统的的数据 - String url = ouPaiProperties.getUri() + "tims_odata_api/api/odata/Package(" + key + ")?select=Code,PackageStatus,FirstClassCode,FirstClassName,SecondClassCode,SecondClassName,ThirdClassCode,ThirdClassName,BuyIn,CosourcingCode,CosourcingUnit,Length,Width,Height,Weight,IsInventory,SendTime,ReceivingTime,CreateTime,ShipTime,CarNumber,DeliveryMethod&$expand=ReceivingOrders($select=Code,Type,Status,Plate,PackagesCount,ReceivePackageCount,PlateNum,CarNumber,CarrierCode,SendTime,ArrivalTime,ReceiveTime,CreateTime,ReturnNumber;$expand=EndWarehouse($select=Name,Code))&$expand=Order($select=SelfCode,Code)"; + String url = ouPaiProperties.getUri() + "tims_odata_api/api/odata/Package(" + key + ")?select=Code,PackageStatus,FirstClassCode,FirstClassName,SecondClassCode,SecondClassName,ThirdClassCode,ThirdClassName,BuyIn,CosourcingCode,CosourcingUnit,Length,Width,Height,Weight,IsInventory,SendTime,ReceivingTime,CreateTime,ShipTime,CarNumber,DeliveryMethod&$expand=ReceivingOrders($select=Code,Type,Status,Plate,PackagesCount,ReceivePackageCount,PlateNum,CarNumber,CarrierCode,SendTime,ArrivalTime,ReceiveTime,CreateTime,ReturnNumber;$expand=EndWarehouse($select=Name,Code)&$expand=FromWarehouse($select=Name,Code)&$expand=CurrentWarehouse($select=Name,Code))&$expand=Order($select=SelfCode,Code)"; OpOrderStatusLogEntity opOrderStatusLogEntity = sendRequestData(url, event); JSONObject jsonObject = JSONObject.parseObject(opOrderStatusLogEntity.getResponseBody()); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java index ae87b6573..4a85e02ec 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java @@ -112,8 +112,8 @@ public class UnloadCarComHandler { /** * 根基匹配到的发货单编号 推送梦天 * - * @param carNum - * @param completeDate + * @param carNum 车次号 + * @param completeDate 完成时间 * @throws ParseException * @throws NoSuchAlgorithmException * @throws JsonProcessingException diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/zb/controller/ZbFactoryDataController.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/zb/controller/ZbFactoryDataController.java index b2026adf1..3b9213260 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/zb/controller/ZbFactoryDataController.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/zb/controller/ZbFactoryDataController.java @@ -30,6 +30,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.io.OutputStream; +import java.nio.file.Files; import java.util.Objects; /** @@ -94,10 +95,6 @@ public class ZbFactoryDataController { zbFactoryLogService.save(zbFactoryLogEntity); - - - - // orderStatusLogService.save(orderStatusLog); // //判断数据是否已存入 @@ -149,8 +146,9 @@ public class ZbFactoryDataController { , MediaType.MULTIPART_FORM_DATA_VALUE , true , file.getName()); - try (InputStream input = new FileInputStream(file); - OutputStream os = item.getOutputStream()) { + try ( + InputStream input = Files.newInputStream(file.toPath()); + OutputStream os = item.getOutputStream()) { // 流转移 IOUtils.copy(input, os); } catch (Exception e) { diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index 4b38338d5..30685ad9b 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -184,11 +184,9 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("waybill_no", waybillNo); - WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillMapper.selectOne(queryWrapper); - return warehouseWaybillEntity; + return warehouseWaybillMapper.selectOne(queryWrapper); } @Override