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 + + + + + +