From 48927352e1a636e07f282dd667b89729594f693f Mon Sep 17 00:00:00 2001 From: x_z Date: Wed, 29 Jun 2022 15:58:45 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=B8=9A=E5=8A=A1=E5=8D=95=E6=8D=AE=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=BB=93=E6=9E=9C=E5=A2=9E=E5=8A=A0=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=92=8C=E5=BD=93=E5=89=8D=E5=88=86=E5=BA=93?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/StockOrderController.java | 2 ++ .../admin/res/inout/StockOrderResponse.java | 6 ++++++ .../api/admin/service/inout/OrderService.java | 7 +++++++ .../service/inout/impl/OrderServiceImpl.java | 18 ++++++++++++++++++ 4 files changed, 33 insertions(+) diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java index 2c6414ba..72577538 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java @@ -304,6 +304,8 @@ public class StockOrderController { //判断订单是否可以补单 List resultList = orderService.checkSupplementOrder(stockOrderEntityList); + //查询仓库名称 + orderService.queryInvName(resultList); resultList = orderService.checkSubmitOrder(resultList); PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); diff --git a/api-admin/src/main/java/com/glxp/api/admin/res/inout/StockOrderResponse.java b/api-admin/src/main/java/com/glxp/api/admin/res/inout/StockOrderResponse.java index 73caad20..1e2282d8 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/res/inout/StockOrderResponse.java +++ b/api-admin/src/main/java/com/glxp/api/admin/res/inout/StockOrderResponse.java @@ -15,4 +15,10 @@ public class StockOrderResponse extends StockOrderEntity { //单据导出状态 private Integer exportStatus; + //当前仓库名称 + private String locStorageName; + + //当前分库名称 + private String invWarehouseName; + } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java b/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java index 2eadc29d..39e60545 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java @@ -129,4 +129,11 @@ public interface OrderService { * @return */ boolean updateReplicateNo(String orderId, String replicateNo); + + /** + * 查询仓库名称 + * + * @param responseList + */ + void queryInvName(List responseList); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java index 079e342d..17425836 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java @@ -18,6 +18,7 @@ import com.glxp.api.admin.dao.inout.OrderDao; import com.glxp.api.admin.dao.inout.OrderDetailDao; import com.glxp.api.admin.dao.inventory.InvProductDao; import com.glxp.api.admin.dao.inventory.InvProductDetailDao; +import com.glxp.api.admin.dao.inventory.InvSubWarehouseDao; import com.glxp.api.admin.dao.inventory.InvWarehouseDao; import com.glxp.api.admin.entity.basic.BasicThirdSysBusApiEntity; import com.glxp.api.admin.entity.basic.BussinessTypeEntity; @@ -83,6 +84,8 @@ public class OrderServiceImpl implements OrderService { private StockOrderDetailDao stockOrderDetailDao; @Resource private OrderDetailDao orderDetailDao; + @Resource + private InvSubWarehouseDao invSubWarehouseDao; @Override public List listOrders(OrderQueryRequest orderQueryRequest) { @@ -462,6 +465,21 @@ public class OrderServiceImpl implements OrderService { return orderDao.updateReplicateNo(orderId, replicateNo); } + @Override + public void queryInvName(List responseList) { + if (CollUtil.isNotEmpty(responseList)) { + responseList.forEach(stockOrderResponse -> { + //查询仓库名称 + String locStorageName = invWarehouseDao.getNameByCode(stockOrderResponse.getLocStorageCode()); + //查询分库名称 + String invWarehouseName = invSubWarehouseDao.selectNameByCode(stockOrderResponse.getInvWarehouseCode()); + + stockOrderResponse.setLocStorageName(locStorageName); + stockOrderResponse.setInvWarehouseName(invWarehouseName); + }); + } + } + @Transactional(rollbackFor = Exception.class) @Override public void deleteOrders(List ids) {