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 63885b635..013149476 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 @@ -862,19 +862,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) { @@ -884,7 +884,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; } @@ -893,13 +893,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()); @@ -919,7 +919,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=否 @@ -962,7 +962,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 35570144f..eea8d4154 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/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 queryWrapper = new QueryWrapper<>(); queryWrapper.eq("waybill_no", waybillNo); - WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillMapper.selectOne(queryWrapper); - return warehouseWaybillEntity; + return warehouseWaybillMapper.selectOne(queryWrapper); } @Override