From 10472f7815c23bba5db9a46ca2d52d1da840b2da Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Wed, 24 May 2023 14:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E9=AA=8C=E8=AF=81=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E=E5=8D=95=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/auth/LoginController.java | 6 +++- .../glxp/api/dao/auth/InvWarehouseDao.java | 9 ++++++ .../glxp/api/vo/inv/InvWarehouseTreeVo.java | 15 +++++++++ .../mybatis/mapper/auth/InvWarehouseDao.xml | 32 +++++++++++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/glxp/api/vo/inv/InvWarehouseTreeVo.java diff --git a/src/main/java/com/glxp/api/controller/auth/LoginController.java b/src/main/java/com/glxp/api/controller/auth/LoginController.java index 9f6780f5..82d3fc33 100644 --- a/src/main/java/com/glxp/api/controller/auth/LoginController.java +++ b/src/main/java/com/glxp/api/controller/auth/LoginController.java @@ -7,6 +7,7 @@ import com.glxp.api.constant.BusinessType; import com.glxp.api.constant.Constant; import com.glxp.api.controller.BaseController; import com.glxp.api.dao.auth.AuthLicenseDao; +import com.glxp.api.dao.auth.InvWarehouseDao; import com.glxp.api.entity.auth.*; import com.glxp.api.entity.system.CompanyEntity; import com.glxp.api.entity.system.SysPdaKeyEntity; @@ -24,6 +25,7 @@ import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.service.auth.*; import com.glxp.api.util.*; +import com.glxp.api.vo.inv.InvWarehouseTreeVo; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -308,6 +310,8 @@ public class LoginController extends BaseController { //------------------------------------------UDIMS接口----------------------------------------------------------- + @Autowired + private InvWarehouseDao invWarehouseDao; /** * 平台验证 * @@ -347,7 +351,7 @@ public class LoginController extends BaseController { } FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); filterInvWarehouseRequest.setSpUse(true); - List invList = invWarehouseService.findInvListByUser(filterInvWarehouseRequest); + List invList = invWarehouseDao.selectInvListTreeByUser(filterInvWarehouseRequest); Map res = new WeakHashMap<>(2); res.put("license", authLicense); res.put("invList", invList); diff --git a/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java b/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java index c3e631c8..309de92c 100644 --- a/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java +++ b/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java @@ -6,6 +6,7 @@ import com.glxp.api.entity.auth.InvWarehouseEntity; import com.glxp.api.req.auth.FilterInvSubWarehouseRequest; import com.glxp.api.req.auth.FilterInvWarehouseRequest; import com.glxp.api.res.auth.InvSubWarehouseResponse; +import com.glxp.api.vo.inv.InvWarehouseTreeVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -92,6 +93,14 @@ public interface InvWarehouseDao extends BaseMapperPlus selectInvListByUser(FilterInvWarehouseRequest filterInvWarehouseRequest); + /** + * 查询用户关联的仓库列表树,包含仓库单据,只查询仓库编码,名称,父ID字段 + * + * @param userId + * @return + */ + List selectInvListTreeByUser(FilterInvWarehouseRequest filterInvWarehouseRequest); + List selectInvById(@Param("InvList") List InvList); /** diff --git a/src/main/java/com/glxp/api/vo/inv/InvWarehouseTreeVo.java b/src/main/java/com/glxp/api/vo/inv/InvWarehouseTreeVo.java new file mode 100644 index 00000000..aa26b3c7 --- /dev/null +++ b/src/main/java/com/glxp/api/vo/inv/InvWarehouseTreeVo.java @@ -0,0 +1,15 @@ +package com.glxp.api.vo.inv; + +import com.glxp.api.entity.auth.InvWarehouseEntity; +import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class InvWarehouseTreeVo extends InvWarehouseEntity { + + List bussinessTypeList = new ArrayList<>(); + +} diff --git a/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml b/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml index b1fd31c8..c233d610 100644 --- a/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml +++ b/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml @@ -392,6 +392,38 @@ GROUP BY auth_warehouse.code + + + + + +