平台验证接口增加返回单据类型

pro
wj 2 years ago
parent c7adf7bbb4
commit 10472f7815

@ -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<InvWarehouseEntity> invList = invWarehouseService.findInvListByUser(filterInvWarehouseRequest);
List<InvWarehouseTreeVo> invList = invWarehouseDao.selectInvListTreeByUser(filterInvWarehouseRequest);
Map<String, Object> res = new WeakHashMap<>(2);
res.put("license", authLicense);
res.put("invList", invList);

@ -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<InvWarehouseDao, InvWare
*/
List<InvWarehouseEntity> selectInvListByUser(FilterInvWarehouseRequest filterInvWarehouseRequest);
/**
* ID
*
* @param userId
* @return
*/
List<InvWarehouseTreeVo> selectInvListTreeByUser(FilterInvWarehouseRequest filterInvWarehouseRequest);
List<InvWarehouseEntity> selectInvById(@Param("InvList") List<String> InvList);
/**

@ -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<WarehouseBussinessTypeEntity> bussinessTypeList = new ArrayList<>();
}

@ -392,6 +392,38 @@
</where>
GROUP BY auth_warehouse.code
</select>
<resultMap id="selectInvListTreeByUser" type="com.glxp.api.vo.inv.InvWarehouseTreeVo" autoMapping="true">
<collection property="bussinessTypeList" autoMapping="true" ofType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity"
column="code" select="com.glxp.api.dao.auth.WarehouseBussinessTypeDao.selectListByAction"/>
</resultMap>
<select id="selectInvListTreeByUser" resultType="com.glxp.api.vo.inv.InvWarehouseTreeVo">
select auth_warehouse.code,
auth_warehouse.name,
auth_warehouse.parentId,
auth_warehouse.parentCode,
auth_dept.name warehouseName,
auth_warehouse.advanceType
from auth_warehouse
inner join auth_dept on auth_warehouse.parentId = auth_dept.code
LEFT join auth_warehouse_user on auth_warehouse.code = auth_warehouse_user.code
<where>
<if test="userId != null">
AND auth_warehouse_user.userId = #{userId}
</if>
<if test="pcode != null and pcode != ''">
AND auth_warehouse.parentId = #{pcode}
</if>
<if test="advanceType != null">
AND auth_warehouse.advanceType = #{advanceType}
</if>
<if test="spUse != null">
AND auth_warehouse.spUse = #{spUse}
</if>
</where>
GROUP BY auth_warehouse.code
</select>
<select id="selectParentIdByCode" resultType="java.lang.String">
select parentId

Loading…
Cancel
Save