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); + } }