diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java b/blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java new file mode 100644 index 000000000..713ca2cb2 --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java @@ -0,0 +1,38 @@ +package org.springblade.common.constant; + +import lombok.Getter; + +@Getter +public enum IncomingTypeEnum { + + MB_INCOMING(1, "码板打托"), + SCAN_INCOMING(2, "扫码入库"), + LINE_INCOMING(3, "直接入库"), + CARS_NO_INCOMING(4, "按车次号入库"), + ORDER_CODE_INCOMING(5, "按订单号入库"), + PACKAGE_INCOMING(6, "按件入库"), + BATCH_INCOMING(7, "批量卸车入库"), + UNLOAD_TRAY_INCOMING(8, "托盘卸车入库"), + UNLOAD_TRAY_ONE(9, "卸分一体"); + + + private Integer code; + private String value; + + + IncomingTypeEnum(Integer code, String value) { + this.code = code; + this.value = value; + } + + + public static String getValue(Integer code) { + for (IncomingTypeEnum value : IncomingTypeEnum.values()) { + if (value.getCode().equals(code)) { + return value.getValue(); + } + } + return null; + } + +} 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 22fc1b5b1..07cb4af36 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 @@ -16,14 +16,14 @@ public enum WorkNodeEnums implements Serializable { INITIAL_DATA_ENTRY(10, "数据入库"), INITIAL_WAREHOUSE_ENTRY(20, "始发仓入库"), BILLING(30, "开单"), - INITIAL_WAREHOUSE_LOADING(40, "始发仓装车"), - CANCEL_INITIAL_WAREHOUSE_LOADING(50, "始发仓取消装车"), + INITIAL_WAREHOUSE_LOADING(40, "装车"), + CANCEL_INITIAL_WAREHOUSE_LOADING(50, "取消装车"), INITIAL_WAREHOUSE_DEPART(60, "始发仓发车"), CANCEL_INITIAL_WAREHOUSE_DEPART(70, "始发仓取消发车"), NET_ARRIVE_CAR(80,"网点到车"), CANCEL_NET_ARRIVE_CAR(90,"网点取消到车"), UNLOAD_INCOMING_WAREHOUSE(100,"卸车入库"), - TRANSFER_WAREHOUSE_UNLOADING(110, "网点卸车确认"), + TRANSFER_WAREHOUSE_UNLOADING(110, "卸车确认"), TRANSFER_WAREHOUSE_DEPART(120, "网点发车"), CANEL_TRANSFER_WAREHOUSE_DEPART(130, "网点取消发车"), FINAL_NET_ARRIVE_CAR(140,"终点到车"), @@ -33,7 +33,7 @@ public enum WorkNodeEnums implements Serializable { TRIPARTITE_TRANSFER_DEPART(180, "三方中转发车"), CANCEL_TRIPARTITE_TRANSFER_DEPART(190, "三方中转取消发车"), ARRICE_TRIPARTITE_TRANSFER_DEPART(200, "三方中转到达"), - sign_TRIPARTITE_TRANSFER_DEPART(210, "三方中转签收"), + SIGN_TRIPARTITE_TRANSFER_DEPART(210, "三方中转签收"), SORTING_TRAYS(220, "分拣打托"), UN_SORTING_TRAYS(230, "包件解托"), PUTAWAY(240, "上架"), diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineWaybillTrackClient.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineWaybillTrackClient.java index 2d0a86c58..cd27ce2ce 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineWaybillTrackClient.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineWaybillTrackClient.java @@ -4,7 +4,7 @@ import com.logpm.trunkline.dto.AddWaybillTrackDTO; import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @FeignClient( @@ -14,7 +14,7 @@ public interface ITrunklineWaybillTrackClient { String API_PREFIX = "trunklineWaybillOrder/client"; - @GetMapping(API_PREFIX+"/addWaybillLog") + @PostMapping(API_PREFIX+"/addWaybillLog") R addWaybillLog(@RequestBody AddWaybillTrackDTO addWaybillTrackDTO); } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehousePackageTrackLogEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehousePackageTrackLogEntity.java new file mode 100644 index 000000000..49e36b186 --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehousePackageTrackLogEntity.java @@ -0,0 +1,60 @@ +package com.logpm.warehouse.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +@Data +@TableName("logpm_warehouse_package_track_log") +@ApiModel(value = "WarehousePackageTrackLog对象", description = "包件日志跟踪记录表") +@EqualsAndHashCode(callSuper = true) +public class WarehousePackageTrackLogEntity extends TenantEntity { + + /** + * 预留1 + */ + @ApiModelProperty(value = "预留1") + private String reserve1; + /** + * 预留2 + */ + @ApiModelProperty(value = "预留2") + private String reserve2; + /** + * 预留3 + */ + @ApiModelProperty(value = "预留3") + private String reserve3; + /** + * 预留4 + */ + @ApiModelProperty(value = "预留4") + private String reserve4; + /** + * 预留5 + */ + @ApiModelProperty(value = "预留5") + private String reserve5; + + @ApiModelProperty(value = "包件码") + private String orderPackageCode; + + @ApiModelProperty(value = "仓库id") + private Long warehouseId; + + @ApiModelProperty(value = "仓库名称") + private String warehouseName; + + @ApiModelProperty(value = "工作节点") + private Integer workNode; + + @ApiModelProperty(value = "描述") + private String content; + + @ApiModelProperty(value = "操作人") + private String operator; + +} diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehousePackageTrackLogClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehousePackageTrackLogClient.java new file mode 100644 index 000000000..4fd9e5a3f --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehousePackageTrackLogClient.java @@ -0,0 +1,29 @@ +package com.logpm.warehouse.feign; + +import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; +import org.springblade.common.constant.ModuleNameConstant; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +@FeignClient( + value = ModuleNameConstant.APPLICATION_WAREHOUSE_NAME +) +public interface IWarehousePackageTrackLogClient { + + String API_PREFIX = "warehousePackageTrackLog/client"; + String TOP = API_PREFIX + "/top"; + + @PostMapping(API_PREFIX+"/addLog") + void addLog(@RequestBody WarehousePackageTrackLogEntity packageTrackLogEntity); + + @PostMapping(API_PREFIX+"/addLogList") + void addLogList(@RequestBody List packageTrackLogEntityList); + + @PostMapping(API_PREFIX+"/findPackageTrackList") + List findPackageTrackList(@RequestParam String orderPackageCode); + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java index 0cb296670..6dcb25201 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java @@ -402,7 +402,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService { basicdataCodeRecordEntity.setNum(inrc); basicdataCodeRecordService.updateById(basicdataCodeRecordEntity); - return warehouseCode+year+CommonUtil.geFourNumber(month.longValue(),5)+CommonUtil.geFourNumber(inrc.longValue(),5); + return warehouseCode+year+CommonUtil.geFourNumber(month.longValue(),2)+CommonUtil.geFourNumber(inrc.longValue(),5); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java index 7da9217b4..123aedc44 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java @@ -326,7 +326,7 @@ public class TripartiteTransferController { return R.fail(400,"仓库信息为空"); } - return carsLoadService.signLoadScanByIds(loadScanIds); + return carsLoadService.signLoadScanByIds(loadScanIds,myCurrentWarehouse.getId()); }catch (CustomerException e){ log.error(e.message,e); return R.fail(e.code,e.message); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java index 86380c025..ce3473c66 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java @@ -109,4 +109,13 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper transitOrderPageList(IPage page, @Param("param") LoadCarsDTO loadCarsDTO); + List findPackageListByLoadId(@Param("loadId") Long loadId); + + List findUnloadByLoadIdAndWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId); + + void updateScanStatusByLoadId(@Param("loadId") Long loadId, @Param("scanStatus") String scanStatus); + + List findSignListOrderPackageCodes(@Param("loadId") Long loadId); + + List findSignListOrderPackageCodesByIds(@Param("list") List loadScanIds); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml index cf0f1cbfe..df20e87ea 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml @@ -494,4 +494,47 @@ and is_data = 0 + + + + + + update logpm_trunkline_cars_load_scan + set scan_status = #{scanStatus} + where load_id = #{loadId} + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IPackageTrackLogAsyncService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IPackageTrackLogAsyncService.java new file mode 100644 index 000000000..0e4110a87 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IPackageTrackLogAsyncService.java @@ -0,0 +1,9 @@ +package com.logpm.trunkline.service; + +import java.util.List; + +public interface IPackageTrackLogAsyncService { + + void addPackageTrackLog(String tenantId, Long userId, Long deptId, String nickName, List orderPackageCodes, Long warehouseId, String warehouseName, Integer workNode, String content); + +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java index 3040cdfef..c2fa311a2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java @@ -104,4 +104,14 @@ public interface ITrunklineCarsLoadScanService extends BaseService transitOrderPageList(IPage page, LoadCarsDTO loadCarsDTO); + List findPackageListByLoadId(Long loadId); + + List findUnloadByLoadIdAndWarehouseId(Long loadId, Long warehouseId); + + void updateScanStatusByLoadId(Long loadId, String scanStatus); + + List findSignListOrderPackageCodes(Long loadId); + + List findSignListOrderPackageCodesByIds(List loadScanIds); + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java index 862019cae..bed90f9ed 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java @@ -173,7 +173,7 @@ public interface ITrunklineCarsLoadService extends BaseService loadScanIds); + R signLoadScanByIds(List loadScanIds,Long warehouseId); R findCarsLoadLogs(LoadCarsDTO loadCarsDTO); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java index a1c457c72..94a847702 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java @@ -7,15 +7,16 @@ import com.logpm.trunkline.bean.Resp; import com.logpm.trunkline.dto.InComingDTO; import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity; -import com.logpm.trunkline.service.IInComingService; -import com.logpm.trunkline.service.ITrunklineAdvanceDetailService; -import com.logpm.trunkline.service.ITrunklineAdvanceService; -import com.logpm.trunkline.service.ITrunklineBillladingPackageServicie; +import com.logpm.trunkline.service.*; import com.logpm.trunkline.vo.TrunklineAdvanceVO; import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springblade.common.constant.IncomingTypeEnum; +import org.springblade.common.constant.WorkNodeEnums; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; @@ -31,6 +32,8 @@ public class InComingServiceImpl implements IInComingService { private final ITrunklineAdvanceService advanceService; private final IWarehouseTrayTypeClient warehouseTrayTypeClient; private final IBasicdataWarehouseClient warehouseClient; + private final IPackageTrackLogAsyncService packageTrackLogAsyncService; + @Override public R incomingPackage(InComingDTO inComingDTO) { @@ -93,6 +96,12 @@ public class InComingServiceImpl implements IInComingService { List incomingWarehouseNames = advanceDetailService.findIncomingWarehouseName(advanceId); advanceService.updateIncomingWarehouseName(String.join(",",incomingWarehouseNames),advanceId); + List orderPackageCodes = new ArrayList<>(); + orderPackageCodes.add(orderPackageCode); + //存入日志 + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseName, WorkNodeEnums.INITIAL_WAREHOUSE_ENTRY.getCode(),"包件"+ IncomingTypeEnum.getValue(incomingType)); + + //2.判断包件和订单是否已经存入在库订单 boolean b = advanceService.saveOrderAndPackage(advanceDetailEntity, warehouseId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/PackageTrackLogAsyncServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/PackageTrackLogAsyncServiceImpl.java new file mode 100644 index 000000000..1abe455c2 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/PackageTrackLogAsyncServiceImpl.java @@ -0,0 +1,47 @@ +package com.logpm.trunkline.service.impl; + +import com.logpm.trunkline.service.IPackageTrackLogAsyncService; +import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; +import com.logpm.warehouse.feign.IWarehousePackageTrackLogClient; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +@Service +@Slf4j +@AllArgsConstructor +public class PackageTrackLogAsyncServiceImpl implements IPackageTrackLogAsyncService { + + private final IWarehousePackageTrackLogClient warehousePackageTrackLogClient; + + @Async + @Override + public void addPackageTrackLog(String tenantId, Long userId, Long deptId, String nickName, List orderPackageCodes, Long warehouseId, String warehouseName, Integer workNode, String content) { + List list = new ArrayList<>(); + for (String orderPackageCode : orderPackageCodes) { + Date date = new Date(); + WarehousePackageTrackLogEntity warehousePackageTrackLogEntity = new WarehousePackageTrackLogEntity(); + warehousePackageTrackLogEntity.setTenantId(tenantId); + warehousePackageTrackLogEntity.setCreateUser(userId); + warehousePackageTrackLogEntity.setCreateTime(date); + warehousePackageTrackLogEntity.setUpdateUser(userId); + warehousePackageTrackLogEntity.setUpdateTime(date); + warehousePackageTrackLogEntity.setIsDeleted(0); + warehousePackageTrackLogEntity.setStatus(1); + warehousePackageTrackLogEntity.setCreateDept(deptId); + warehousePackageTrackLogEntity.setOrderPackageCode(orderPackageCode); + warehousePackageTrackLogEntity.setWarehouseId(warehouseId); + warehousePackageTrackLogEntity.setWarehouseName(warehouseName); + warehousePackageTrackLogEntity.setWorkNode(workNode); + warehousePackageTrackLogEntity.setContent(content); + warehousePackageTrackLogEntity.setOperator(nickName); + list.add(warehousePackageTrackLogEntity); + } + warehousePackageTrackLogClient.addLogList(list); + } +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java index d509b3f25..681eca905 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java @@ -253,4 +253,29 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl findPackageListByLoadId(Long loadId) { + return baseMapper.findPackageListByLoadId(loadId); + } + + @Override + public List findUnloadByLoadIdAndWarehouseId(Long loadId, Long warehouseId) { + return baseMapper.findUnloadByLoadIdAndWarehouseId(loadId,warehouseId); + } + + @Override + public void updateScanStatusByLoadId(Long loadId, String scanStatus) { + baseMapper.updateScanStatusByLoadId(loadId,scanStatus); + } + + @Override + public List findSignListOrderPackageCodes(Long loadId) { + return baseMapper.findSignListOrderPackageCodes(loadId); + } + + @Override + public List findSignListOrderPackageCodesByIds(List loadScanIds) { + return baseMapper.findSignListOrderPackageCodesByIds(loadScanIds); + } + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index ea7deb25b..0696113b5 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -27,69 +27,11 @@ import com.logpm.factorydata.enums.NodeEnums; import com.logpm.factorydata.util.FactoryDataMessageSender; import com.logpm.factorydata.vo.NodePushMsg; import com.logpm.trunkline.bean.Resp; -import com.logpm.trunkline.dto.BatchUnloadDTO; -import com.logpm.trunkline.dto.InComingDTO; -import com.logpm.trunkline.dto.LoadCarsDTO; -import com.logpm.trunkline.dto.LoadScanBrandDTO; -import com.logpm.trunkline.dto.LoadingPackageDTO; -import com.logpm.trunkline.dto.LoadingZeroDTO; -import com.logpm.trunkline.dto.ProductInfoDTO; -import com.logpm.trunkline.dto.TrunklineCarsLoadDTO; -import com.logpm.trunkline.dto.TrunklineCarsLoadLineDTO; -import com.logpm.trunkline.dto.TrunklineCarsOrderDTO; -import com.logpm.trunkline.dto.UnloadPackageDTO; -import com.logpm.trunkline.dto.UnloadZeroDTO; -import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadContractEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadFinanceEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadLogEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity; -import com.logpm.trunkline.entity.TrunklineCarsOrderEntity; -import com.logpm.trunkline.entity.TrunklineCostShareRecordEntity; -import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity; +import com.logpm.trunkline.dto.*; +import com.logpm.trunkline.entity.*; import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper; -import com.logpm.trunkline.service.ICarsLoadAsyncService; -import com.logpm.trunkline.service.IInComingService; -import com.logpm.trunkline.service.IOpenOrderAsyncService; -import com.logpm.trunkline.service.ITrunklineAdvanceDetailService; -import com.logpm.trunkline.service.ITrunklineCarsLoadContractService; -import com.logpm.trunkline.service.ITrunklineCarsLoadFinanceService; -import com.logpm.trunkline.service.ITrunklineCarsLoadLineService; -import com.logpm.trunkline.service.ITrunklineCarsLoadLogService; -import com.logpm.trunkline.service.ITrunklineCarsLoadScanService; -import com.logpm.trunkline.service.ITrunklineCarsLoadService; -import com.logpm.trunkline.service.ITrunklineCarsLoadingLogService; -import com.logpm.trunkline.service.ITrunklineCarsOrderService; -import com.logpm.trunkline.service.ITrunklineCarsSignLogService; -import com.logpm.trunkline.service.ITrunklineCarsUnloadLogService; -import com.logpm.trunkline.service.ITrunklineCostShareRecordService; -import com.logpm.trunkline.service.ITrunklineLoadSignOrderService; -import com.logpm.trunkline.service.ITrunklineWaybillOrderService; -import com.logpm.trunkline.vo.CarsLoadAllOrderVO; -import com.logpm.trunkline.vo.CarsLoadOrderInfoVO; -import com.logpm.trunkline.vo.CarsLoadWaybillInfoVO; -import com.logpm.trunkline.vo.HasNotFinalNodeIdDataVO; -import com.logpm.trunkline.vo.LoadScanFinalNodeIdVO; -import com.logpm.trunkline.vo.LoadScanOrderVO; -import com.logpm.trunkline.vo.LoadZeroListVO; -import com.logpm.trunkline.vo.LoadingListGoodsVO; -import com.logpm.trunkline.vo.LoadingListMainVO; -import com.logpm.trunkline.vo.NodeNumDataVO; -import com.logpm.trunkline.vo.OrderScanDetailVO; -import com.logpm.trunkline.vo.SignOrderDetailVO; -import com.logpm.trunkline.vo.SignPackageVO; -import com.logpm.trunkline.vo.SignScanOrderVO; -import com.logpm.trunkline.vo.TripartiteTransferVO; -import com.logpm.trunkline.vo.TrunklineCarsLoadLoadingListVO; -import com.logpm.trunkline.vo.TrunklineCarsLoadScanVO; -import com.logpm.trunkline.vo.TrunklineCarsLoadVO; -import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO; -import com.logpm.trunkline.vo.UnloadPackageVO; -import com.logpm.trunkline.vo.UnloadScanOrderVO; -import com.logpm.trunkline.vo.UnloadZeroVO; -import com.logpm.trunkline.vo.ZeroSuppleVO; +import com.logpm.trunkline.service.*; +import com.logpm.trunkline.vo.*; import com.logpm.warehouse.entity.WarehouseWayBillDetail; import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; @@ -99,9 +41,7 @@ import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringEscapeUtils; -import org.springblade.common.constant.CodeNumConstant; -import org.springblade.common.constant.DictBizConstant; -import org.springblade.common.constant.RabbitConstant; +import org.springblade.common.constant.*; import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; @@ -119,14 +59,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeSet; +import java.util.*; @Slf4j @Service @@ -164,6 +97,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl loadCarsPageList(LoadCarsDTO loadCarsDTO) { @@ -215,6 +149,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseEntity.getName()+"起始仓发车"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.INITIAL_WAREHOUSE_DEPART.getCode(),content ); } catch (Exception e) { log.warn("############startCarByLoadId: 存入日志失败"); @@ -357,6 +301,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseEntity.getName()+"网点发车"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.TRANSFER_WAREHOUSE_DEPART.getCode(),content ); } catch (Exception e) { log.warn("############startCarByLoadId: 存入日志失败"); } @@ -377,7 +326,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseEntity.getName()+"到车"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), workNode,content ); + } catch (Exception e) { log.warn("#############arriveCarByLoadId: 存入日志失败"); } @@ -538,6 +500,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseEntity.getName()+"始发仓取消发车"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.CANCEL_INITIAL_WAREHOUSE_DEPART.getCode(),content ); } catch (Exception e) { log.warn("#############cancelStartCarByLoadId: 存入日志失败"); } @@ -618,6 +590,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseEntity.getName()+"网点取消发车"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.CANEL_TRANSFER_WAREHOUSE_DEPART.getCode(),content ); + } catch (Exception e) { log.warn("#############cancelStartCarByLoadId: 存入日志失败"); } @@ -703,6 +680,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseId+"取消到车"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), workNode,content ); } catch (Exception e) { log.warn("#############cancelArriveCarByLoadId: 存入日志失败"); } @@ -821,6 +812,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findUnloadByLoadIdAndWarehouseId(loadId,warehouseId); + + String content = "包件在 "+warehouseEntity.getName()+"卸车确认"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), node.getCode(),content ); + } catch (Exception e) { log.warn("###############unloadPackage: 存入异常列表记录失败"); } @@ -939,7 +943,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseEntity.getName()+"三方中转发车"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.TRIPARTITE_TRANSFER_DEPART.getCode(),content ); + } catch (Exception e) { log.warn("#############startCarByLoadId: 存入日志失败"); } @@ -1706,7 +1721,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl brands = this.baseMapper.fingPackageCodeByLoadId(loadId); // 查询详细地址为仓库的地址 - BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId); String warehouseAddress = null; if (ObjectUtil.isNotEmpty(warehouseEntity)) { warehouseAddress = "从【" + warehouseEntity.getName() + "】发出"; @@ -1722,6 +1736,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseEntity.getName()+"三方中转取消发车"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.CANCEL_TRIPARTITE_TRANSFER_DEPART.getCode(),content ); + } catch (Exception e) { log.warn("#############startCarByLoadId: 存入日志失败"); } @@ -1776,6 +1802,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); + + String content = "包件在 "+warehouseEntity.getName()+"三方中转到达"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.ARRICE_TRIPARTITE_TRANSFER_DEPART.getCode(),content ); + } catch (Exception e) { log.warn("#############startCarByLoadId: 存入日志失败"); } @@ -1826,6 +1864,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findSignListOrderPackageCodes(loadId); + + String content = "包件在"+warehouseEntity.getName()+"被三方中转整车签收"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART.getCode(),content); + }catch (Exception e){ + log.warn("###########存入日志失败"); + } + return R.success("签收成功"); } @@ -1935,6 +1990,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = new ArrayList<>(); + orderPackageCodes.add(orderPackageCode); + String content = "包件在 "+warehouseName+"装车,配载计划目的仓 "+carsLoadScanEntity.getFinalNodeName()+",数据来源仓库 "+fromWarehouseName; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseName, WorkNodeEnums.INITIAL_WAREHOUSE_LOADING.getCode(),content ); + trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, orderPackageCode, 1, 1, isData, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark); updateNumByLoadId(loadId); @@ -3416,6 +3486,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = new ArrayList<>(); + + orderPackageCodes.add(orderPackageCode); + String content = "包件在 "+warehouseEntity.getName()+"直发商家签收"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.SIGN_DIRECT_SHIPPER.getCode(),content ); + }catch (Exception e){ + log.warn("###########存入日志信息失败"); + } + return R.success("签收成功"); } @@ -3871,8 +3957,29 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl loadScanIds) { + public R signLoadScanByIds(List loadScanIds,Long warehouseId) { + + if(loadScanIds.isEmpty()){ + log.warn("############signLoadScanByIds: 数据id为空 loadScanIds={}",loadScanIds); + return R.fail(405,"数据id为空"); + } + + BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); + if(Objects.isNull(warehouseEntity)){ + log.warn("############signLoadScanByIds: 仓库信息不存在 warehouseId={}",warehouseId); + return R.fail(405,"仓库信息不存在"); + } trunklineCarsLoadScanService.updateScanStatus(loadScanIds, "3"); + + try{ + List orderPackageCodes = trunklineCarsLoadScanService.findSignListOrderPackageCodesByIds(loadScanIds); + + String content = "包件在"+warehouseEntity.getName()+"被三方中转签收"; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART.getCode(),content); + }catch (Exception e){ + log.warn("###########存入日志失败"); + } + return R.success("签收成功"); } @@ -4267,6 +4374,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = new ArrayList<>(); + orderPackageCodes.add(scanCode); + String content = "包件在 "+warehouseName+"取消装车,配载计划目的仓 "+carsLoadScanEntity.getFinalNodeName(); + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseName, WorkNodeEnums.CANCEL_INITIAL_WAREHOUSE_LOADING.getCode(),content ); + } else { if (StringUtil.isNotBlank(trayCode)) { trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, warehouseId, "零担解托"); @@ -4761,6 +4881,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = new ArrayList<>(); + + orderPackageCodes.add(orderPackageCode); + String content = "包件在 "+warehouseName+"卸车,卸车方式:"+ IncomingTypeEnum.getValue(incomingType); + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(),content ); + }catch (Exception e){ + log.warn("#########3卸车存入日志失败"); + } + return R.success("卸车成功"); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java index 8d5cc589c..427093bf5 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java @@ -1,14 +1,17 @@ package com.logpm.trunkline.service.impl; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.logpm.trunkline.entity.TrunklineWaybillPackageEntity; import com.logpm.trunkline.mapper.TrunklineWaybillPackageMapper; +import com.logpm.trunkline.service.IPackageTrackLogAsyncService; import com.logpm.trunkline.service.ITrunklineWaybillPackageService; import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO; import com.logpm.warehouse.entity.WarehouseWaybillEntity; 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.secure.utils.AuthUtil; +import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -18,16 +21,26 @@ import java.util.List; @Service @AllArgsConstructor public class TrunklineWaybillPackageServiceImpl extends BaseServiceImpl implements ITrunklineWaybillPackageService { + + private final IPackageTrackLogAsyncService packageTrackLogAsyncService; + @Override public void saveList(List list, WarehouseWaybillEntity waybillEntity) { + Long waybillId = waybillEntity.getId(); + String waybillNo = waybillEntity.getWaybillNo(); + Long departureWarehouseId = waybillEntity.getDepartureWarehouseId(); + String departureWarehouseName = waybillEntity.getDepartureWarehouseName(); + String destinationWarehouseName = waybillEntity.getDestinationWarehouseName(); + String destination = waybillEntity.getDestination(); + String content = "包件开单,运单号:"+waybillNo+",发站仓:"+departureWarehouseName+",目的仓:"+destinationWarehouseName+",到站:"+destination; + + List orderPackageCodes = new ArrayList<>(); List ls = new ArrayList<>(); for (TrunklineAdvanceDetailVO trunklineAdvanceDetailVO : list) { Long advanceDetailId = trunklineAdvanceDetailVO.getId(); Long advanceId = trunklineAdvanceDetailVO.getAdvanceId(); String orderCode = trunklineAdvanceDetailVO.getOrderCode(); String orderPackageCode = trunklineAdvanceDetailVO.getOrderPackageCode(); - Long waybillId = waybillEntity.getId(); - String waybillNo = waybillEntity.getWaybillNo(); TrunklineWaybillPackageEntity waybillPackageEntity = new TrunklineWaybillPackageEntity(); waybillPackageEntity.setWaybillId(waybillId); waybillPackageEntity.setWaybillNo(waybillNo); @@ -37,7 +50,10 @@ public class TrunklineWaybillPackageServiceImpl extends BaseServiceImpl packageTrackLogEntityList) { + warehousePackageTrackLogService.saveBatch(packageTrackLogEntityList); + } + + @Override + public List findPackageTrackList(String orderPackageCode) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("order_package_code",orderPackageCode) + .orderByAsc("create_time"); + return warehousePackageTrackLogService.list(queryWrapper); + } + + +} 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 new file mode 100644 index 000000000..ce0db12a3 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehousePackageTrackLogMapper.java @@ -0,0 +1,12 @@ +package com.logpm.warehouse.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface WarehousePackageTrackLogMapper extends BaseMapper { + + + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehousePackageTrackLogService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehousePackageTrackLogService.java new file mode 100644 index 000000000..05ae93520 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehousePackageTrackLogService.java @@ -0,0 +1,9 @@ +package com.logpm.warehouse.service; + +import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; +import org.springblade.core.mp.base.BaseService; +import org.springblade.core.tool.api.R; + +public interface IWarehousePackageTrackLogService extends BaseService { + R finaPackageTrackLogList(String orderPackageCode); +} 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 new file mode 100644 index 000000000..ed58b877c --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehousePackageTrackLogServiceImpl.java @@ -0,0 +1,26 @@ +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 lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Service; + +@Service +@AllArgsConstructor +@Slf4j +public class WarehousePackageTrackLogServiceImpl extends BaseServiceImpl implements IWarehousePackageTrackLogService { + + @Override + public R finaPackageTrackLogList(String orderPackageCode) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("order_package_code",orderPackageCode) + .orderByAsc("create_time"); + + return R.data(baseMapper.selectList(queryWrapper)); + } +}