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 9e15baf5c..591bb6d1e 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 @@ -72,6 +72,7 @@ public enum WorkNodeEnums implements Serializable { DISTRIBUTION_LOADING(302010, "配送装车"), DISTRIBUTION_ABNORMAL_LOADING(302020, "异常装车"), + DISTRIBUTION_ABNORMAL_REJECT(302025, "异常驳回"), DISTRIBUTION_CANCEL_LOADING(302030, "取消装车"), DISTRIBUTION_CAR_START(302040, "配送发车"), DISTRIBUTION_CAR_ARRIVED(302050, "配送到达"), @@ -80,7 +81,9 @@ public enum WorkNodeEnums implements Serializable { DISTRIBUTION_ABNORMAL_SIGN_FOR(302080, "异常签收"), DISTRIBUTION_FAIL(302090, "配送失败"), - CLERK_REVIEW(303010, "文员复核"); + CLERK_REVIEW(303010, "文员复核"), + + DELIVERY_COMPLETE(303020, "车次完成"); private Integer code; private String value; diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java index d83a09e72..83c024ba1 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java @@ -190,5 +190,10 @@ public class DistributionLoadscanAbnormalVO extends DistributionLoadscanAbnormal */ @ApiModelProperty(value = "装车状态") private String orderPackageLoadingStatusName; + /** + * 异常类型 + */ + @ApiModelProperty(value = "异常类型") + private String abnormalTypeName; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionRetentionScanVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionRetentionScanVO.java new file mode 100644 index 000000000..01672631e --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionRetentionScanVO.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.vo.app; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * 滞留扫描记录 视图实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +public class DistributionRetentionScanVO implements Serializable { + private static final long serialVersionUID = 1L; + + private Long id; + + private String taskCode; + + private String orderPackageCode; + + private String orderCode; + + private String vehicleNumber; + + private String trainNumber; + + private String reservationCode; + + private String deliveryType; + + private String retentionType; + + private String goodsName; + + private String retentionQuantity; + + + + +} diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java index 1123f6022..938edce96 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java @@ -261,4 +261,34 @@ public class WarehouseRetentionScanEntity extends TenantEntity { @ApiModelProperty(value = "运单Id") private String warehouseName; + /** + * 车牌号 + */ + @ApiModelProperty(value = "车牌号") + private String vehicleNumber; + + /** + * 配送类型 + */ + @ApiModelProperty(value = "配送类型 1-市配 2-商配") + private Integer deliveryType; + + /** + * 回库任务类型 + */ + @ApiModelProperty(value = "配送类型 1-新增 2-异常 3-取消签收") + private Integer retentionType; + + /** + * 是否回库 + */ + @ApiModelProperty(value = "是否确认回库 0否 1是") + private boolean confirmStatus; + + /** + * 回库任务编号 + */ + @ApiModelProperty(value = "回库任务编号") + private String taskCode; + } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java index 273f2ce38..2096fbbdd 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java @@ -16,6 +16,7 @@ */ package com.logpm.warehouse.feign; +import com.logpm.distribution.vo.app.DistributionRetentionScanVO; import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.mp.support.BladePage; @@ -64,4 +65,9 @@ public interface IWarehouseRetentionScanClient { @PostMapping(TOP+"/saveBatchRetentionScan") R saveBatchRetentionScan(@RequestBody List warehouseRetentionScanEntities); + @PostMapping(TOP+"/submitBatchRetentionScan") + R submitBatchRetentionScan(@RequestBody List warehouseRetentionScanEntities); + + @GetMapping(TOP+"/retentionScanEntityListByWarehouseId") + List getRetentionScanEntityListByWarehouseId(@RequestParam("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java index 203ed90b8..5e3f16c48 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java @@ -381,6 +381,17 @@ public class DistributionDeliveryAppController { } + /** + * 扫描查询配送任务下的包件信息 + */ + @GetMapping("/newRetentionScan") + @ApiOperationSupport(order = 11) + public R newRetentionScan() { + R r = distributionDeliveryListService.newRetentionScan(); + return r; + } + + /** * 扫描查询配送任务下的包件信息 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java index d3621ccdd..30f0e21ce 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java @@ -157,6 +157,18 @@ public class DistributionSignforController extends BladeController { } + /** + * 异常装车驳回 + */ + @GetMapping("/newLoadingAbnormalPackageListTurnDown") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入distributionSignfor") + public R newLoadingAbnormalPackageListTurnDown(@RequestParam("ids") String ids) { + R r = distributionSignforService.newLoadingAbnormalPackageListTurnDown(ids); + return r; + } + + /** * 签收管理 签收订单统计 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index 4db905b56..a90545c57 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -2250,8 +2250,8 @@ LEFT JOIN logpm_distribution_loadscan AS ldl ON ldla.loading_id = ldl.id LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldla.package_id = ldpl.id WHERE - ldla.reservation_id = 1834121310973964290 - AND ldla.delivery_list_id = 1834121296369397761 + ldla.reservation_id = #{reservationId} + AND ldla.delivery_list_id = #{deliveryId} AND ldla.is_deleted = 0 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index 6a242718c..9c000e2f0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java @@ -527,6 +527,13 @@ public interface IDistributionDeliveryListService extends BaseService selectDistributionDeliveryListPage(IPage page, DistributionDeliveryListDTO distributionDeliveryList) { //转换创建时间 @@ -9268,17 +9274,18 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl handleCancelPackagelog(List parcelListEntities, BasicdataWarehouseEntity warehouse, String trainNumber, String reservationCode) { - List packageLogList = new ArrayList<>(); - String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "取消装车,配送车次号:" + trainNumber + "预约任务号:" + reservationCode; - for (DistributionParcelListEntity parcelListEntity : parcelListEntities) { - JSONObject trunklinePackageTrackLog = handleLogJSONObject(warehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_CANCEL_LOADING.getCode()); - packageLogList.add(trunklinePackageTrackLog); + @Override + public R newRetentionScan() { + //查询包件 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if (Func.isEmpty(myCurrentWarehouse)) { + return Resp.scanFail("未授权!!!", "未授权!!!"); } + //查询所有的回库任务 + List retentionScanVOS = retentionScanClient.getRetentionScanEntityListByWarehouseId(myCurrentWarehouse.getId()); - return packageLogList; + return R.data(retentionScanVOS); } private void updateZeroLoadingEntity(DistributionLoadscanEntity loadscanEntity, DistributionParcelNumberDTO parcelListDTO, BasicdataWarehouseEntity myCurrentWarehouse, Map zeroPackageMap) { @@ -9797,7 +9804,30 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl signforEntities = baseMapper.selectSignforByDeliveryId(deliveryId); - return signforEntities.stream().allMatch(s -> SignforStatusConstant.yiqianshou.getValue().equals(s.getSigningStatus())); + boolean match = signforEntities.stream().allMatch(s -> SignforStatusConstant.yiqianshou.getValue().equals(s.getSigningStatus())); + if (match) { + DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(deliveryId); + if (!Objects.isNull(deliveryListEntity)){ + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByFinishDistributionTrainVO(deliveryListEntity,AuthUtil.getUser()); + distributionNodeWorkService.finishDistributionTrain(nodeFanoutMsg,AuthUtil.getUser()); + } + } + return match; + } + + private NodeFanoutMsg buildNodeFanoutMsgByFinishDistributionTrainVO(DistributionDeliveryListEntity deliveryListEntity, BladeUser user) { + NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); + nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); + nodeFanoutMsg.setNode(WorkNodeEnums.DELIVERY_COMPLETE); + nodeFanoutMsg.setWarehouse(deliveryListEntity.getWarehouseName()); + nodeFanoutMsg.setWarehouseId(deliveryListEntity.getWarehouseId()); + nodeFanoutMsg.setOperator(AuthUtil.getNickName()); + nodeFanoutMsg.setOperatorTime(new Date()); + nodeFanoutMsg.setTenantId(AuthUtil.getTenantId()); + FinishDistributionTrainVO finishDistributionTrainVO = new FinishDistributionTrainVO(); + finishDistributionTrainVO.setTrainNumber(deliveryListEntity.getTrainNumber()); + nodeFanoutMsg.setMain(finishDistributionTrainVO); + return nodeFanoutMsg; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index ad409bc81..e705af783 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -949,6 +949,30 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl selectDistributionSignforPage(IPage page, DistributionSignforVO distributionSignfor) { @@ -8329,6 +8333,122 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl list = Func.toLongList(ids); + List abnormalEntities = distributionLoadscanAbnormalService.listByIds(list); + if (abnormalEntities.isEmpty()){ + log.error(method + "查询异常列表数据错误,ids:{}", ids); + return R.fail("查询异常列表数据错误,请联系管理员"); + } + boolean isLoadingFlag = abnormalEntities.stream().anyMatch(a -> Objects.isNull(a.getLoadingId())); + if (isLoadingFlag) { + //存在驳回但是未进行装车数据 + String unLoadingPackageCode = abnormalEntities.stream().filter(a -> Objects.isNull(a.getLoadingId())).map(DistributionLoadscanAbnormalEntity::getPackageCode).collect(Collectors.joining(",")); + + log.error(method + "驳回出现,未进行装车的包件,unLoadingPackageCode:{}", unLoadingPackageCode); + return R.fail(unLoadingPackageCode+"未进行装车"); + } + List packageIds = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getPackageId).collect(Collectors.toList()); + List reservationId = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getReservationId).distinct().collect(Collectors.toList()); + List deliveryId = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getDeliveryListId).distinct().collect(Collectors.toList()); + if (reservationId.size() != 1) { + log.error(method + "当前异常驳回存在多个客户信息,reservationId:{}", reservationId); + return R.fail("查询包件装车信息错误"); + } + if (deliveryId.size() != 1) { + log.error(method + "当前异常驳回存在多个配送信息,deliveryId:{}", deliveryId); + return R.fail("查询包件装车信息错误"); + } + DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId.get(0)); + if (Objects.isNull(reservationEntity)){ + log.error(method + "当前异常驳回查询预约计划错误,reservationId:{}", reservationId.get(0)); + return R.fail("查询预约计划错误"); + } + DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(deliveryId.get(0)); + if (Objects.isNull(deliveryListEntity)){ + log.error(method + "当前异常驳回查询配送计划错误,deliveryId:{}", deliveryId.get(0)); + return R.fail("查询配送计划错误"); + } + List loadscanEntityList = distributionLoadscanService.list(Wrappers.query().lambda() + .in(DistributionLoadscanEntity::getPackageId, packageIds) + .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) + ); + if (loadscanEntityList.isEmpty()) { + log.error(method + "查询包件装车信息错误,packageIds:{}", packageIds); + return R.fail("查询包件装车信息错误"); + } + //进行异常驳回 + distributionLoadscanAbnormalService.update(Wrappers.update().lambda() + .in(DistributionLoadscanAbnormalEntity::getId,ids) + .set(DistributionLoadscanAbnormalEntity::getAuditingStatus,LoadingAbnormalAuditingStatusConstant.yichang.getValue()) + .set(DistributionLoadscanAbnormalEntity::getAuditingUser,AuthUtil.getNickName()) + .set(DistributionLoadscanAbnormalEntity::getAuditingTime,new Date()) + ); + List entityList = createdRetentionScanEntity(loadscanEntityList,myCurrentWarehouse,AuthUtil.getUser(),reservationEntity,deliveryListEntity); + if (!entityList.isEmpty()){ + //进行批量回库任务提交 + warehouseRetentionScanClient.saveBatchRetentionScan(entityList); + } + return R.success("操作成功"); + } + + private List createdRetentionScanEntity(List loadscanEntityList, BasicdataWarehouseEntity myCurrentWarehouse, BladeUser user, DistributionReservationEntity reservationEntity, DistributionDeliveryListEntity deliveryListEntity) { + List entityList = new ArrayList<>(); + List logList = new ArrayList<>(); + for (DistributionLoadscanEntity distributionLoadscanEntity : loadscanEntityList) { + //进行回库任务生成 + WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity(); + warehouseRetentionScanEntity.setWarehouseName(myCurrentWarehouse.getName()); + warehouseRetentionScanEntity.setTaskCode(distributionReservationService.retentionMa()); + warehouseRetentionScanEntity.setWarehouseId(myCurrentWarehouse.getId()); + warehouseRetentionScanEntity.setLoadingId(myCurrentWarehouse.getId()); + warehouseRetentionScanEntity.setDeliveryId(distributionLoadscanEntity.getDeliveryId()); + warehouseRetentionScanEntity.setReservationId(distributionLoadscanEntity.getReservationId()); + warehouseRetentionScanEntity.setConditions(1); + warehouseRetentionScanEntity.setReservationCode(reservationEntity.getReservationCode()); + warehouseRetentionScanEntity.setTrainNumber(deliveryListEntity.getTrainNumber()); + + //查询此包件 + DistributionParcelListEntity parcelListEntity = distributionParcelListService.selectByOrderPackageCode(distributionLoadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId()); + if (!Objects.isNull(parcelListEntity)){ + //订单运单信息填充 + warehouseRetentionScanEntity.setOrderCode(parcelListEntity.getOrderCode()); + warehouseRetentionScanEntity.setWaybillNumber(parcelListEntity.getWaybillNumber()); + warehouseRetentionScanEntity.setWaybillId(parcelListEntity.getWaybillId()); + warehouseRetentionScanEntity.setOrderId(parcelListEntity.getStockArticleId()); + warehouseRetentionScanEntity.setRetentionQuantity(parcelListEntity.getQuantity()); + //记录当前包件生成待回库任务 + String content = "包件在" + myCurrentWarehouse.getName() + "由" + user.getNickName() + "异常装车驳回生成待回库任务,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode(); + JSONObject jsonObject = handleLogJSONObject(myCurrentWarehouse, user, distributionLoadscanEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_ABNORMAL_REJECT.getCode(), deliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd()); + logList.add(jsonObject); + } + warehouseRetentionScanEntity.setOrderPackageCode(distributionLoadscanEntity.getOrderPackageCode()); + warehouseRetentionScanEntity.setOrderPackageId(distributionLoadscanEntity.getPackageId()); + warehouseRetentionScanEntity.setVehicleNumber(distributionLoadscanEntity.getVehicleName()); + warehouseRetentionScanEntity.setRetentionType(2); + warehouseRetentionScanEntity.setDeliveryType(Integer.parseInt(deliveryListEntity.getType())); + warehouseRetentionScanEntity.setConfirmStatus(false); + entityList.add(warehouseRetentionScanEntity); + } + if (!logList.isEmpty()) { + trunklinePackageTrackLogClient.addPackageTrackLog(logList); + } + return entityList; + } + /** * 修改装车为签收数据 * @param loadscanEntity @@ -8603,5 +8723,4 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl> newPage(WarehouseRetentionScanDTO warehouseRetentionScan, Query query) { + IPage pages = warehouseRetentionScanService.selectWarehouseRetentionRecordPage(Condition.getPage(query), warehouseRetentionScan); + return R.data(pages); + } + /** * 滞留扫描记录 新增 */ diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java index 47e8b3c48..8cab2157f 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java @@ -17,6 +17,7 @@ package com.logpm.warehouse.feign; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.vo.app.DistributionRetentionScanVO; import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.service.IWarehouseRetentionScanService; import lombok.AllArgsConstructor; @@ -64,8 +65,17 @@ public class WarehouseRetentionScanClient implements IWarehouseRetentionScanClie @Override public R saveBatchRetentionScan(List warehouseRetentionScanEntities) { - return warehouseRetentionRecordService.saveBatchRetentionList(warehouseRetentionScanEntities); } + @Override + public R submitBatchRetentionScan(List warehouseRetentionScanEntities) { + return R.status(warehouseRetentionScanService.saveBatch(warehouseRetentionScanEntities)); + } + + @Override + public List getRetentionScanEntityListByWarehouseId(Long warehouseId) { + return warehouseRetentionScanService.getRetentionScanEntityListByWarehouseId(warehouseId); + } + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java index 05bf92f2f..335709865 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java @@ -16,6 +16,7 @@ */ package com.logpm.warehouse.mapper; +import com.logpm.distribution.vo.app.DistributionRetentionScanVO; import com.logpm.warehouse.dto.WarehouseRetentionScanDTO; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; @@ -62,4 +63,10 @@ public interface WarehouseRetentionScanMapper extends BaseMapper getExportWarehouseRetentionScanList(@Param("param") WarehouseRetentionScanDTO warehouseRetentionScan); + /** + * 查询指定仓库所有回库任务 + * @param warehouseId + * @return + */ + List getRetentionScanEntityListByWarehouseId(@Param("warehouseId")Long warehouseId); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml index 87a07d2fb..31eede968 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml @@ -36,7 +36,7 @@ - + @@ -154,5 +154,43 @@ ORDER BY create_time DESC + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java index 1f81d27bc..17d40aede 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java @@ -17,6 +17,7 @@ package com.logpm.warehouse.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.logpm.distribution.vo.app.DistributionRetentionScanVO; import com.logpm.warehouse.dto.WarehouseRetentionRecordDTO; import com.logpm.warehouse.dto.WarehouseRetentionScanDTO; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; @@ -62,6 +63,13 @@ public interface IWarehouseRetentionScanService extends IService getExportWarehouseRetentionScanList(WarehouseRetentionScanDTO warehouseRetentionScan); + /** + * 查询所有回库任务 + * @param warehouseId + * @return + */ + List getRetentionScanEntityListByWarehouseId(Long warehouseId); + // R saveRetentionList(WarehouseRetentionRecordDTO warehouseRetentionRecordEntity); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java index 0e30509b9..9b500997d 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java @@ -18,6 +18,7 @@ package com.logpm.warehouse.service.impl; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; +import com.logpm.distribution.vo.app.DistributionRetentionScanVO; import com.logpm.warehouse.bean.Resp; import com.logpm.warehouse.dto.WarehouseRetentionRecordDTO; import com.logpm.warehouse.dto.WarehouseRetentionScanDTO; @@ -110,6 +111,11 @@ public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl getRetentionScanEntityListByWarehouseId(Long warehouseId) { + return baseMapper.getRetentionScanEntityListByWarehouseId(warehouseId); + } + // @Override // public R saveRetentionList(WarehouseRetentionRecordDTO warehouseRetentionRecordDTO) { // BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();