From 896f22f3497b8c48e63889421dcbeff9675cca19 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080> Date: Fri, 1 Dec 2023 11:33:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DistributionStockupController.java | 8 ++------ .../service/IDistributionStockupService.java | 3 ++- .../service/impl/DistributionStockupServiceImpl.java | 10 ++++++++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java index 0d1c0868c..289555e5c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java @@ -18,6 +18,7 @@ package com.logpm.distribution.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.distribution.entity.DistributionStockupEntity; import com.logpm.distribution.excel.DistributionCityExcel; @@ -203,13 +204,8 @@ public class DistributionStockupController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "查询备货人员信息", notes = "传入distributionStockup") public R> listUser() { - //获取当前登录用户 - BladeUser user = AuthUtil.getUser(); - //查询备货岗位 - - - List cc = distributionStockupService.getRoleList(user.getDeptId(), user.getTenantId()); + List cc = distributionStockupService.getRoleList(); // List cc = distributionStockupService.getRoleList(user.getDeptId(), user.getTenantId(), "叉车"); return R.data(cc); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java index 60002f6b2..d51151e78 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java @@ -216,9 +216,10 @@ public interface IDistributionStockupService extends BaseService getLocationMarketSelectionOrder(StockupDTO stockupDTO); /** + * 查询备货人员 * @return */ - List getRoleList(String deptId, String tenantId); + List getRoleList(); /** * 修改备货任务的备货区 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index 9b99a089b..d0b8d81f3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -2318,20 +2318,26 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl getRoleList(String deptId, String tenantId) { + public List getRoleList() { + //获取当前登录用户 + BladeUser user = AuthUtil.getUser(); + String tenantId = user.getTenantId(); +// String deptId = user.getDeptId(); + //查询备货岗位 List warehouseType = DictBizCache.getList("stock_personnel"); if (warehouseType.isEmpty()) { throw new ServiceException("注意,注意!拣货人员字典未配置!请配置!"); } else { List stringList = new ArrayList<>(); warehouseType.stream().forEach(i -> { + //查询这个角色ID R roleId = sysClient.getRoleIds(tenantId, i.getDictValue()); if (ObjectUtils.isNotNull(roleId.getData())) { stringList.add(roleId.getData()); } }); String roleIds = stringList.stream().collect(Collectors.joining(",")); - R> listR = userSearchClient.listByRole(roleIds); + R> listR = userSearchClient.listByRole(roleIds); //查询角色下的所有人员数据 BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); //有没有选择仓库信息 if (ObjectUtils.isNotNull(myCurrentWarehouse)) { From 15b7c66bde00cb8586eed39598d603b46c17cfb0 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 1 Dec 2023 15:19:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=87=E8=B4=A7SQL=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistributionStockupServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index d0b8d81f3..5730bbed6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -2956,6 +2956,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImplquery().lambda() .eq(DistributionStockListEntity::getIncomingBatch, byId.getOrderCode()) .eq(DistributionStockListEntity::getWarehouseId,myCurrentWarehouse.getId()) + .eq(DistributionStockListEntity::getCargoNumber,stockupDTO.getCargoNumber()) ); if(ObjectUtils.isNull(distributionStockListEntity)){ return R.fail("该包件不是库存品!");