From d7473dc7a84db30ad15640addaece76c42df3786 Mon Sep 17 00:00:00 2001 From: x_z Date: Thu, 30 Jun 2022 11:36:04 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=92=8C=E5=88=86=E4=BB=93=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=AD=97=E6=AE=B5=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/admin/controller/auth/LoginController.java | 3 ++- .../admin/service/inventory/InvSubWarehouseService.java | 8 ++++++++ .../api/admin/service/inventory/InvWarehouseService.java | 8 ++++++++ .../inventory/impl/InvSubWarehouseServiceImpl.java | 9 +++++++++ .../service/inventory/impl/InvWarehouseServiceImpl.java | 9 +++++++++ 5 files changed, 36 insertions(+), 1 deletion(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/auth/LoginController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/auth/LoginController.java index 78a29e2a..3a86cd68 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/auth/LoginController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/auth/LoginController.java @@ -216,7 +216,8 @@ public class LoginController { LoginUserInfoResponse loginUserInfoResponse = new LoginUserInfoResponse(); BeanUtils.copyProperties(authAdmin, loginUserInfoResponse); loginUserInfoResponse.setAuthRules(authRules); - + loginUserInfoResponse.setLocInvName(invWarehouseService.getInvName(loginUserInfoResponse.getLocInvCode())); + loginUserInfoResponse.setLocSubInvName(invSubWarehouseService.getSubInvName(loginUserInfoResponse.getLocSubInvCode())); return ResultVOUtils.success(loginUserInfoResponse); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvSubWarehouseService.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvSubWarehouseService.java index 44b9336f..679657c2 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvSubWarehouseService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvSubWarehouseService.java @@ -30,4 +30,12 @@ public interface InvSubWarehouseService { boolean deleteByParentCode(String code); public boolean checkDuplicateName(String parentId, String name); + + /** + * 根据分库编码,查询分库名称 + * + * @param subInvCode + * @return + */ + String getSubInvName(String subInvCode); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvWarehouseService.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvWarehouseService.java index a397f5eb..a055a966 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvWarehouseService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvWarehouseService.java @@ -62,4 +62,12 @@ public interface InvWarehouseService { * @return */ List getThirdSysDetail(FilterBasicThirdSysRequest request, Integer id); + + /** + * 通过仓库编码,查询仓库名称 + * + * @param code + * @return + */ + String getInvName(String code); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvSubWarehouseServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvSubWarehouseServiceImpl.java index ec4dd8a2..12ff6060 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvSubWarehouseServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvSubWarehouseServiceImpl.java @@ -1,6 +1,7 @@ package com.glxp.api.admin.service.inventory.impl; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageHelper; import com.glxp.api.admin.dao.inventory.InvSubWarehouseDao; import com.glxp.api.admin.entity.inventory.InvSubWarehouseEntity; @@ -109,4 +110,12 @@ public class InvSubWarehouseServiceImpl implements InvSubWarehouseService { } return false; } + + @Override + public String getSubInvName(String subInvCode) { + if (StrUtil.isBlank(subInvCode)) { + return ""; + } + return invSubWarehouseDao.selectNameByCode(subInvCode); + } } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvWarehouseServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvWarehouseServiceImpl.java index f8fe061e..5cd05bcc 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvWarehouseServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvWarehouseServiceImpl.java @@ -2,6 +2,7 @@ package com.glxp.api.admin.service.inventory.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ReflectUtil; +import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageHelper; import com.glxp.api.admin.dao.basic.BasicThirdSysDao; import com.glxp.api.admin.dao.inventory.InvWarehouseDao; @@ -215,4 +216,12 @@ public class InvWarehouseServiceImpl implements InvWarehouseService { } return result; } + + @Override + public String getInvName(String code) { + if (StrUtil.isBlank(code)) { + return ""; + } + return invWarehouseDao.getNameByCode(code); + } }