From 149e6ecb8d14f57277c9611fa154821696acfbd1 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 12 Sep 2024 18:05:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E8=BD=A6=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicdata/vo/BasicdataWarehouseVO.java | 5 + .../feign/IWarehouseConfigClient.java | 48 +++++ .../BasicdataWarehouseController.java | 11 -- .../service/IBasicdataWarehouseService.java | 6 - .../impl/BasicdataWarehouseServiceImpl.java | 20 +- .../DistributionDeliveryAppController.java | 18 +- .../DistributionSignforController.java | 11 ++ .../mapper/DistributionSignforMapper.java | 8 + .../mapper/DistributionSignforMapper.xml | 62 +++++- .../IDistributionDeliveryListService.java | 14 -- .../service/IDistributionSignforService.java | 7 + .../DistributionDeliveryListServiceImpl.java | 185 ++---------------- .../impl/DistributionSignforServiceImpl.java | 110 +++++++++-- .../controller/WarehouseConfigController.java | 38 ++++ .../feign/WarehouseConfigClient.java | 49 +++++ 15 files changed, 358 insertions(+), 234 deletions(-) create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseConfigClient.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseConfigClient.java diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataWarehouseVO.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataWarehouseVO.java index f835f3de3..d0c851b9f 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataWarehouseVO.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataWarehouseVO.java @@ -39,6 +39,11 @@ public class BasicdataWarehouseVO extends BasicdataWarehouseEntity { @ApiModelProperty(value = "仓库货区") private List children; + /** + * 是否严格装车 + */ + private boolean strictLoading = false; + diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseConfigClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseConfigClient.java new file mode 100644 index 000000000..234dca890 --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseConfigClient.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * ReWarehouse and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * ReWarehouses of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * ReWarehouses 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 Warehouse. + * 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.warehouse.feign; + +import com.logpm.warehouse.entity.WarehouseConfigEntity; +import com.logpm.warehouse.entity.WarehouseStockEntity; +import org.springblade.common.constant.ModuleNameConstant; +import org.springblade.core.mp.support.BladePage; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 备货扫描记录 Feign接口类 + * + * @author lmy + * @since 2023-08-24 + */ +@FeignClient( + value = ModuleNameConstant.APPLICATION_WAREHOUSE_NAME +) +public interface IWarehouseConfigClient { + + String API_PREFIX = "WarehouseConfig/client"; + String TOP = API_PREFIX + "/top"; + + /** + * 查询当前仓库扩展配置 + * @return BladePage + */ + @GetMapping(TOP) + WarehouseConfigEntity getWarehouseConfig(@RequestParam("warehouseId") Long warehouseId); + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java index 83d8d1be8..c9db23068 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java @@ -89,17 +89,6 @@ public class BasicdataWarehouseController extends BladeController { return R.data(detail); } - /** - * 仓库 详情 - */ - @GetMapping("/newDetail") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入warehouseWarehouse") - public R newDetail(@RequestParam Long id) { - BasicdataWarehouseVO detail = warehouseService.newDetail(id); - return R.data(detail); - } - /** * 查询部门下的仓库 */ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java index e0eeb27d5..16b4bc240 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java @@ -132,10 +132,4 @@ public interface IBasicdataWarehouseService extends BaseService selectAppDeliveryInventoryPackage(@Param("reservationId")Long reservationId); + + /** + * + * @param reservationId + * @param deliveryId + * @return + */ + List selectNewAbnormalPackageList(@Param("reservationId")Long reservationId,@Param("deliveryId") Long deliveryId); } 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 543848fa7..4db905b56 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 @@ -1126,11 +1126,11 @@ ldpl.id AS packageId FROM logpm_distribution_loadscan_abnormal AS ldla - LEFT JOIN logpm_distribution_loadscan AS ldl ON ldla.package_id = ldl.package_id + 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 = #{reservationId} and ldl.reservation_id = #{reservationId} and ldla.delivery_list_id = - #{deliveryListId} AND ldl.scan_status != 1 AND ldl.is_deleted = 0 AND ldla.is_deleted = 0 + ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = + #{deliveryListId} 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 e37a8b893..6a242718c 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,21 +527,7 @@ public interface IDistributionDeliveryListService extends BaseService logs = new ArrayList<>(); List pushDatas = new ArrayList<>(); //查询出原来配送信息的备货任务 @@ -4635,16 +4638,20 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl().lambda() .eq(DistributionDeliveryTripartiteEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) .set(DistributionDeliveryTripartiteEntity::getDepartureTime, format)); - isEnd = true;// + isEnd = true; } //处理最后一个司机进行发车 //判断是否是最后一个司机点发车 @@ -4665,7 +4672,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl abnormalEntityList = new ArrayList<>(); if (!distributionParcelListEntities.isEmpty()) { for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { - DistributionLoadscanAbnormalEntity packageLoadscanAbnormalEntity = createdPakcageAbnormal(distributionDeliveryList, distributionParcelListEntity, warehouseEntity); - abnormalEntityList.add(packageLoadscanAbnormalEntity); + if (OrderPackageLoadingStatusConstant.weizhuancghe.getValue().equals(distributionParcelListEntity.getOrderPackageLoadingStatus())){ + DistributionLoadscanAbnormalEntity packageLoadscanAbnormalEntity = createdPakcageAbnormal(distributionDeliveryList, distributionParcelListEntity, warehouseEntity); + abnormalEntityList.add(packageLoadscanAbnormalEntity); + } } } List disStockListDetailEntities = baseMapper.selectInventoryListByDeliveryListId(distributionDeliveryList.getId()); if (!disStockListDetailEntities.isEmpty()) { for (DisStockListDetailEntity disStockListDetailEntity : disStockListDetailEntities) { - DistributionLoadscanAbnormalEntity inventoryLoadscanAbnormalEntity = createdInventoryPakcageAbnormal(distributionDeliveryList, disStockListDetailEntity, warehouseEntity); - abnormalEntityList.add(inventoryLoadscanAbnormalEntity); + if (InventoryLoadingStatusConstant.weizhuangche.getValue().equals(disStockListDetailEntity.getStockLockingStatus())){ + DistributionLoadscanAbnormalEntity inventoryLoadscanAbnormalEntity = createdInventoryPakcageAbnormal(distributionDeliveryList, disStockListDetailEntity, warehouseEntity); + abnormalEntityList.add(inventoryLoadscanAbnormalEntity); + } } } //零担 @@ -4772,11 +4779,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl ids = Func.toLongList(distrilbutionloadingscanDTO.getPackageIds()); - //校验包件是否存在签收包件 - List parcelListEntities = distributionParcelListService.list(Wrappers.query().lambda() - .in(DistributionParcelListEntity::getId, ids) - .eq(DistributionParcelListEntity::getWarehouseId, myCurrentWarehouse.getId()) - ); - if (parcelListEntities.isEmpty()) { - log.error(method + "查询包件失败:packageIds:{}", ids); - return Resp.scanFail("包件数据错误,请联系管理员", "包件数据错误,请联系管理员"); - } - boolean isSignfor = parcelListEntities.stream().anyMatch(f -> OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())); - if (isSignfor) { - //存在签收包件 无法继续进行取消操作 - String errorOrderPackageCode = parcelListEntities.stream().filter(f -> OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())).map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(",")); - return Resp.fail("操作失败," + errorOrderPackageCode + "已签收"); - } - boolean isLoading = parcelListEntities.stream().anyMatch(f -> OrderPackageLoadingStatusConstant.weizhuancghe.getValue().equals(f.getOrderPackageLoadingStatus())); - if (isLoading) { - //存在签收包件 无法继续进行取消操作 - String errorOrderPackageCode = parcelListEntities.stream().filter(f -> OrderPackageLoadingStatusConstant.weizhuancghe.getValue().equals(f.getOrderPackageLoadingStatus())).map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(",")); - return Resp.fail("操作失败," + errorOrderPackageCode + "未装车"); - } - //进行装车取消 - distributionLoadscanService.remove(Wrappers.update().lambda() - .eq(DistributionLoadscanEntity::getDeliveryId, deliveryId) - .eq(DistributionLoadscanEntity::getReservationId, reservationId) - .in(DistributionLoadscanEntity::getPackageId, ids) - ); - //包件状态维护 - distributionParcelListService.update(Wrappers.update().lambda() - .in(DistributionParcelListEntity::getId, ids) - .set(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue()) - ); - //维护订单 - String orderCode = parcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).collect(Collectors.joining(",")); - distributionStockArticleService.maintenanceOrderInfo(orderCode, myCurrentWarehouse.getId()); - //增加日志 - List cancelPackageLogList = handleCancelPackagelog(parcelListEntities, myCurrentWarehouse, deliveryListEntity.getTrainNumber(), reservationEntity.getReservationCode()); - if (!cancelPackageLogList.isEmpty()) { - trunklinePackageTrackLogClient.addPackageTrackLog(cancelPackageLogList); - } - //扣减装车数量 - distributionSignforMapper.deductionLoadingPacjageNum(reservationId,deliveryId,parcelListEntities.size()); - break; - case 2: - //零担 - break; - case 3: - if (Objects.isNull(distrilbutionloadingscanDTO.getPackageIds())) { - log.error(method + "参数缺失PackageIds()"); - return Resp.fail("参数缺失,请联系管理员"); - } - List inventoryPackageIds = Func.toLongList(distrilbutionloadingscanDTO.getPackageIds()); - //查询库存品包件信息 - List disStockListDetailEntities = disStockListDetailService.listByIds(inventoryPackageIds); - if (!disStockListDetailEntities.isEmpty()) { - log.error(method + "查询库存品包件失败:inventoryPackageIds:{}", inventoryPackageIds); - return Resp.scanFail("库存品包件数据错误,请联系管理员", "库存品包件数据错误,请联系管理员"); - } - //查询是否存在签收 - boolean inventoryIsSignfor = disStockListDetailEntities.stream().anyMatch(f -> InventorySigningStatusConstant.yiqianshou.getValue().equals(f.getStockSignfoStatus())); - if (inventoryIsSignfor) { - String errorInventoryCode = disStockListDetailEntities.stream() - .filter(f -> InventorySigningStatusConstant.yiqianshou.getValue() - .equals(f.getStockSignfoStatus())).map(DisStockListDetailEntity::getStockPackageCode) - .collect(Collectors.joining(",")); - return Resp.fail("操作失败," + errorInventoryCode + "已签收"); - } - boolean inventoryIsLoading= disStockListDetailEntities.stream().anyMatch(f -> InventoryLoadingStatusConstant.weizhuangche.getValue().equals(f.getStockLockingStatus())); - if (inventoryIsLoading) { - String errorInventoryCode = disStockListDetailEntities.stream() - .filter(f -> InventoryLoadingStatusConstant.weizhuangche.getValue().equals(f.getStockLockingStatus())).map(DisStockListDetailEntity::getStockPackageCode) - .collect(Collectors.joining(",")); - return Resp.fail("操作失败," + errorInventoryCode + "未装车"); - } - //进行装车取消 - distributionLoadscaninvnService.remove(Wrappers.update().lambda() - .eq(DistributionLoadscaninvnEntity::getDeliveryId,deliveryId) - .eq(DistributionLoadscaninvnEntity::getReservationId,reservationId) - .in(DistributionLoadscaninvnEntity::getInventoryPackageId,inventoryPackageIds) - .set(DistributionLoadscaninvnEntity::getScanStatus,LoadingStatusConstant.quxiao.getValue()) - ); - //维护库存品包件状态 - disStockListDetailService.update(Wrappers.update().lambda() - .in(DisStockListDetailEntity::getId,inventoryPackageIds) - .set(DisStockListDetailEntity::getStockLockingStatus,InventoryLoadingStatusConstant.weizhuangche.getValue()) - ); - //装车数量扣减 - distributionSignforMapper.deductionLoadingPacjageNum(reservationId,deliveryId,inventoryPackageIds.size()); - //库存品 - break; - default: - log.error(method + "未知Type:{}", distrilbutionloadingscanDTO.getType()); - return Resp.scanFail("操作失败", "操作失败"); - } - //维护预约计划 - distributionReservationService.maintenanceReservationInfo(reservationId); - //维护配送计划 - this.maintenanceDeliveryInfo(deliveryId); - return Resp.scanSuccess("操作成功","操作成功"); - } private List handleCancelPackagelog(List parcelListEntities, BasicdataWarehouseEntity warehouse, String trainNumber, String reservationCode) { List packageLogList = new ArrayList<>(); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 3bff56ba3..3e2d96e69 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -7231,7 +7231,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImplupdate().lambda() - .in(DistributionParcelListEntity::getId, packageIdList) - .set(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()) - .set(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue()) - .set(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue()) - .set(DistributionParcelListEntity::getOrderPackageStockupStatus, OrderPackageStockupStatusConstant.daibeihuo.getValue()) - ); - } - //维护相关的订单信息 - distributionStockArticleService.maintenanceOrderInfoByIds(orderIds); +// if (yesOrNo) { +// //恢复包件数据 +// distributionParcelListService.update(Wrappers.update().lambda() +// .in(DistributionParcelListEntity::getId, packageIdList) +// .set(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()) +// .set(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue()) +// .set(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue()) +// .set(DistributionParcelListEntity::getOrderPackageStockupStatus, OrderPackageStockupStatusConstant.daibeihuo.getValue()) +// ); +// } +// //维护相关的订单信息 +// distributionStockArticleService.maintenanceOrderInfoByIds(orderIds); return R.success("异常驳回成功"); } @@ -8245,6 +8244,91 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl loadscanAbnormalVOS = baseMapper.selectNewAbnormalPackageList(signforEntity.getReservationId(), signforEntity.getDeliveryId()); + loadscanAbnormalVOS.forEach(p -> { + switch (p.getOrderPackageStatus()) { + case "10": + p.setOrderPackageStatusName(OrderPackageStatusConstant.weiruku.getName()); + break; + case "20": + p.setOrderPackageStatusName(OrderPackageStatusConstant.yiruku.getName()); + break; + case "30": + p.setOrderPackageStatusName(OrderPackageStatusConstant.zhongzhuanruku.getName()); + break; + case "40": + p.setOrderPackageStatusName(OrderPackageStatusConstant.zhiliu.getName()); + break; +// case "50": +// p.setOrderPackageStatusName(OrderPackageStatusConstant.yichuku.getName()); +// break; + case "60": + p.setOrderPackageStatusName(OrderPackageStatusConstant.yichuku.getName()); + break; + case "70": + p.setOrderPackageStatusName(OrderPackageStatusConstant.yiqianshou.getName()); + break; + default: + log.info("未知的包件状态 {}", p.getOrderPackageStatus()); + } + switch (p.getOrderPackageFreezeStatus()) { + case "10": + p.setOrderPackageFreezeStatusName(OrderPackageFreezeStatusConstant.weidongjie.getName()); + break; + case "20": + p.setOrderPackageFreezeStatusName(OrderPackageFreezeStatusConstant.yidongjie.getName()); + break; + default: + log.info("未知的包件冻结状态 {}", p.getOrderPackageFreezeStatus()); + } + switch (p.getOrderPackageLoadingStatus()) { + case "10": + p.setOrderPackageLoadingStatusName(OrderPackageLoadingStatusConstant.weizhuancghe.getName()); + break; + case "20": + p.setOrderPackageLoadingStatusName(OrderPackageLoadingStatusConstant.yizhuangche.getName()); + break; + default: + log.info("未知的包件装车状态 {}", p.getOrderPackageLoadingStatus()); + } + switch (p.getOrderPackageStockupStatus()) { + case "10": + p.setOrderPackageStockupStatusName(OrderPackageStockupStatusConstant.daibeihuo.getName()); + break; + case "20": + p.setOrderPackageStockupStatusName(OrderPackageStockupStatusConstant.yibeihu.getName()); + break; + default: + log.info("未知的包件备货状态 {}", p.getOrderPackageStockupStatus()); + } + switch (p.getOrderPackageReservationStatus()) { + case "10": + p.setOrderPackageReservationStatusName(OrderPackageReservationStatusConstant.daiyuyue.getName()); + break; + case "20": + p.setOrderPackageReservationStatusName(OrderPackageReservationStatusConstant.yiyueyue.getName()); + break; + default: + log.info("未知的包件预约状态 {}", p.getOrderPackageReservationStatus()); + } + + }); + return R.data(loadscanAbnormalVOS); + } + /** * 修改装车为签收数据 * @param loadscanEntity diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseConfigController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseConfigController.java index 0f6efe6a3..3d8788aa7 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseConfigController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseConfigController.java @@ -17,8 +17,12 @@ package com.logpm.warehouse.controller; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; +import com.logpm.warehouse.entity.WarehouseConfigEntity; import com.logpm.warehouse.entity.WarehouseStockEntity; +import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.excel.WarehouseStockExcel; import com.logpm.warehouse.service.IWarehouseConfigService; import com.logpm.warehouse.service.IWarehouseStockService; @@ -61,5 +65,39 @@ public class WarehouseConfigController extends BladeController { private final IWarehouseConfigService warehouseConfigService; + /** + * 运单表 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入warehouseWaybill") + public R save(@Valid @RequestBody WarehouseConfigEntity warehouseConfigEntity) { + return R.status(warehouseConfigService.save(warehouseConfigEntity)); + } + + + /** + * 仓库 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入warehouseWarehouse") + public R detail(@RequestParam Long warehouseId) { + WarehouseConfigEntity detail = warehouseConfigService.getOne(Wrappers.query().lambda() + .eq(WarehouseConfigEntity::getWarehouseId,warehouseId) + ); + return R.data(detail); + } + + + /** + * 运单表 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入warehouseWaybill") + public R update(@Valid @RequestBody WarehouseConfigEntity warehouseConfigEntity) { + return R.status(warehouseConfigService.updateById(warehouseConfigEntity)); + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseConfigClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseConfigClient.java new file mode 100644 index 000000000..9899e2ee3 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseConfigClient.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * ReWarehouse and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * ReWarehouses of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * ReWarehouses 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 Warehouse. + * 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.warehouse.feign; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.logpm.warehouse.entity.WarehouseConfigEntity; +import com.logpm.warehouse.entity.WarehouseStockEntity; +import com.logpm.warehouse.service.IWarehouseConfigService; +import com.logpm.warehouse.service.IWarehouseStockService; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +/** + * 备货扫描记录 Feign实现类 + * + * @author lmy + * @since 2023-08-24 + */ +@ApiIgnore() +@RestController +@AllArgsConstructor +public class WarehouseConfigClient implements IWarehouseConfigClient { + +private IWarehouseConfigService warehouseConfigService; + @Override + public WarehouseConfigEntity getWarehouseConfig(Long warehouseId) { + return warehouseConfigService.getOne(Wrappers.query().lambda().eq(WarehouseConfigEntity::getWarehouseId,warehouseId)); + } +}