物资类型管理--新增父级查询子级tree树形下拉框API
This commit is contained in:
parent
0d3f737406
commit
398c450268
|
|
@ -64,6 +64,17 @@ public class TypeController extends BaseController {
|
|||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据物资类型ID查询所属下拉列表
|
||||
*/
|
||||
@ApiOperation(value = "根据物资类型ID查询所属下拉列表")
|
||||
@RequiresPermissions("ma:type:list")
|
||||
@GetMapping("/selectMaTypeListByTypeId")
|
||||
public AjaxResult selectMaTypeListByTypeId(@NotNull(message = "物资类型ID不能为空") Long typeId) {
|
||||
List<MaTypeSelectVo> list = typeService.getMaTypeSelectVoListByParentId(typeId);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据左列表类型id查询右表格 --- 暂未启用,代码有问题!!
|
||||
* TODO: 待完善
|
||||
|
|
|
|||
|
|
@ -36,7 +36,11 @@ public interface TypeMapper {
|
|||
|
||||
List<Type> getListByTypeName(@Param("typeId") Long typeId, @Param("typeName") String typeName);
|
||||
|
||||
List<MaTypeSelectVo> getMaTypeSelectVoListByParentId(@Param("typeId") Long typeId);
|
||||
/**
|
||||
* 查询物资类型下拉树结构--根据上级ID
|
||||
* @param parentId 父级ID
|
||||
*/
|
||||
List<MaTypeSelectVo> getMaTypeSelectVoListByParentId(@Param("parentId") Long parentId);
|
||||
|
||||
/**
|
||||
* 物资类型树形结构
|
||||
|
|
|
|||
|
|
@ -26,6 +26,12 @@ public interface ITypeService {
|
|||
|
||||
List<Type> getListByParentId(Long typeId, String typeName);
|
||||
|
||||
/**
|
||||
* 查询物资类型下拉树结构--根据上级ID
|
||||
* @param parentId 父级id
|
||||
*/
|
||||
List<MaTypeSelectVo> getMaTypeSelectVoListByParentId(Long parentId);
|
||||
|
||||
/**
|
||||
* 查询物资类型列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -64,6 +64,11 @@ public class TypeServiceImpl implements ITypeService {
|
|||
return typeMapper.getListByTypeName(typeId, typeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaTypeSelectVo> getMaTypeSelectVoListByParentId(Long parentId) {
|
||||
return typeMapper.getMaTypeSelectVoListByParentId(parentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物资类型管理列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -316,4 +316,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where
|
||||
wh_house_set.house_id = #{mouseId} and wh_house_set.del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getMaTypeSelectVoListByParentId" resultType="com.bonus.material.ma.vo.MaTypeSelectVo">
|
||||
select
|
||||
type_id,
|
||||
type_name,
|
||||
parent_id,
|
||||
level
|
||||
from
|
||||
ma_type
|
||||
where
|
||||
parent_id = #{typeId} and del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue