From 8a9bbd27cbc410bce7ab5fb519ae8e5bb5801dbb Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 7 May 2024 11:59:35 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/WorkNodeEnums.java | 9 +++++++++ .../warehouse/vo/WarehousePackageTrackLogVO.java | 11 +++++++++++ .../trunkline/service/IOpenOrderAsyncService.java | 2 +- .../service/impl/OpenOrderAsyncServiceImpl.java | 3 ++- .../service/impl/OpenOrderServiceImpl.java | 2 +- .../impl/TrunklineCarsOrderEntityServiceImpl.java | 2 +- .../mapper/WarehousePackageTrackLogMapper.java | 7 +++++-- .../mapper/WarehousePackageTrackLogMapper.xml | 12 ++++++++++++ .../impl/WarehousePackageTrackLogServiceImpl.java | 15 ++++++++++----- 9 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehousePackageTrackLogVO.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.xml diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java b/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java index 07cb4af36..bb1d3c29a 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java @@ -51,4 +51,13 @@ public enum WorkNodeEnums implements Serializable { this.value = value; } + public static String getValue(Integer code) { + for (WorkNodeEnums value : WorkNodeEnums.values()) { + if (value.getCode().equals(code)) { + return value.getValue(); + } + } + return null; + } + } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehousePackageTrackLogVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehousePackageTrackLogVO.java new file mode 100644 index 000000000..3da6e1fd5 --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehousePackageTrackLogVO.java @@ -0,0 +1,11 @@ +package com.logpm.warehouse.vo; + +import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; +import lombok.Data; + +@Data +public class WarehousePackageTrackLogVO extends WarehousePackageTrackLogEntity { + + private String workNodeName; + +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java index aee687625..5516ea1ee 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java @@ -18,7 +18,7 @@ public interface IOpenOrderAsyncService { void saveUnloadStartCarLog(TrunklineCarsLoadLineEntity currentCarsLoadLineEntity, String nickName,Long userId); - void incomingPackageBatch(List advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId); + void incomingPackageBatch(List advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId,String warehouseName); void saveUpdateLog(Long waybillId, String waybillNo, String trackType, String refer, String operationRemark, String nickName, Long userId, Long warehouseId, String warehouseName, WarehouseWaybillEntity waybillEntity); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java index 18c60f527..8c96245cb 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java @@ -259,10 +259,11 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService { @Async("asyncExecutor") @Override - public void incomingPackageBatch(List advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId) { + public void incomingPackageBatch(List advanceIds, Long userId, Long deptId, String tenantId, String nickName,Integer incomingType,Long warehouseId,String warehouseName) { InComingDTO inComingDTO = new InComingDTO(); inComingDTO.setAdvanceIds(advanceIds); inComingDTO.setWarehouseId(warehouseId); + inComingDTO.setWarehouseName(warehouseName); inComingDTO.setUserId(userId); inComingDTO.setDeptId(deptId); inComingDTO.setTenantId(tenantId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 9f2a9501a..a5cb12287 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -566,7 +566,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { //判断是否是开单及入库的配置 Boolean aBoolean = basicdataOpenIncomingClient.checkOpenIncoming(warehouseId, brandId); if (Boolean.TRUE.equals(aBoolean)) { - openOrderAsyncService.incomingPackageBatch(advanceIds, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getTenantId(), AuthUtil.getNickName(), IncomingTypeEnum.OPEN_TO_IN.getCode(),warehouseId); + openOrderAsyncService.incomingPackageBatch(advanceIds, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getTenantId(), AuthUtil.getNickName(), IncomingTypeEnum.OPEN_TO_IN.getCode(),warehouseId,warehouseName); } //异步存入日志 diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java index 57ea6074d..e424bc0fa 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java @@ -70,7 +70,7 @@ public class TrunklineCarsOrderEntityServiceImpl extends BaseServiceImpl findCarsLoadOrderInfoListPlan(Long loadId, String waybillNo) { - return baseMapper.findCarsLoadOrderInfoList(loadId,waybillNo); + return baseMapper.findCarsLoadOrderInfoListPlan(loadId,waybillNo); } @Override diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.java index ce0db12a3..2635737a7 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.java @@ -2,11 +2,14 @@ package com.logpm.warehouse.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; +import com.logpm.warehouse.vo.WarehousePackageTrackLogVO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; @Mapper public interface WarehousePackageTrackLogMapper extends BaseMapper { - - + List finaPackageTrackLogList(@Param("orderPackageCode") String orderPackageCode); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.xml new file mode 100644 index 000000000..83329919d --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehousePackageTrackLogServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehousePackageTrackLogServiceImpl.java index ed58b877c..85c998c03 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehousePackageTrackLogServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehousePackageTrackLogServiceImpl.java @@ -1,15 +1,18 @@ package com.logpm.warehouse.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; import com.logpm.warehouse.mapper.WarehousePackageTrackLogMapper; import com.logpm.warehouse.service.IWarehousePackageTrackLogService; +import com.logpm.warehouse.vo.WarehousePackageTrackLogVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springblade.common.constant.WorkNodeEnums; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.api.R; import org.springframework.stereotype.Service; +import java.util.List; + @Service @AllArgsConstructor @Slf4j @@ -17,10 +20,12 @@ public class WarehousePackageTrackLogServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("order_package_code",orderPackageCode) - .orderByAsc("create_time"); + List list = baseMapper.finaPackageTrackLogList(orderPackageCode); + + list.forEach(item->{ + item.setWorkNodeName(WorkNodeEnums.getValue(item.getWorkNode())); + }); - return R.data(baseMapper.selectList(queryWrapper)); + return R.data(list); } }