物资类型删除
This commit is contained in:
parent
86cec30880
commit
9f9641ae7e
|
|
@ -61,11 +61,11 @@ public class TypeController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "根据左列表类型id查询右表格")
|
||||
@GetMapping("/getListByMaType")
|
||||
public AjaxResult getListByMaType(Type type) {
|
||||
public AjaxResult getListByMaType(MaTypeListVo type) {
|
||||
List<Integer> parentIds = typeService.selectParentId(type);
|
||||
List<MaTypeListVo> listByMaType = new ArrayList<>();
|
||||
for (Integer parentId : parentIds) {
|
||||
listByMaType.addAll(typeService.getListByParentId(parentId.longValue(), type.getTypeName()));
|
||||
listByMaType.addAll(typeService.getListByParentId(parentId.longValue(), type));
|
||||
}
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
|
|
|
|||
|
|
@ -160,6 +160,8 @@ public class Type extends BaseEntity {
|
|||
@ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码")
|
||||
private String intelligentCode;
|
||||
|
||||
private String keyword;
|
||||
|
||||
/** 子节点 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<Type> children = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public interface TypeMapper {
|
|||
* 根据level层级和typeID 查询父级ID
|
||||
* @param type
|
||||
*/
|
||||
List<Integer> selectParentId(Type type);
|
||||
List<Integer> selectParentId(MaTypeListVo type);
|
||||
|
||||
/**
|
||||
* 根据物资仓库的ID查询物资类型列表
|
||||
|
|
@ -37,7 +37,7 @@ public interface TypeMapper {
|
|||
*/
|
||||
List<MaTypeSelectVo> selectMaTypeListByHouseId(Long houseId);
|
||||
|
||||
List<MaTypeListVo> getListByTypeName(@Param("typeId") Long typeId, @Param("typeName") String typeName);
|
||||
List<MaTypeListVo> getListByTypeName(@Param("typeId") Long typeId, @Param("type") MaTypeListVo type);
|
||||
|
||||
/**
|
||||
* 查询物资类型下拉树结构--根据上级ID
|
||||
|
|
|
|||
|
|
@ -23,13 +23,13 @@ public interface ITypeService {
|
|||
*/
|
||||
Type selectTypeByTypeId(Long typeId);
|
||||
|
||||
List<Integer> selectParentId(Type type);
|
||||
List<Integer> selectParentId(MaTypeListVo type);
|
||||
|
||||
List<Type> getEquipmentType(Long typeId, String typeName);
|
||||
|
||||
List<MaTypeSelectVo> selectMaTypeListByHouseId(Long houseId);
|
||||
|
||||
List<MaTypeListVo> getListByParentId(Long typeId, String typeName);
|
||||
List<MaTypeListVo> getListByParentId(Long typeId, MaTypeListVo type);
|
||||
|
||||
/**
|
||||
* 查询物资类型下拉树结构--根据上级ID
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class TypeServiceImpl implements ITypeService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> selectParentId(Type type) {
|
||||
public List<Integer> selectParentId(MaTypeListVo type) {
|
||||
return typeMapper.selectParentId(type);
|
||||
}
|
||||
|
||||
|
|
@ -100,11 +100,11 @@ public class TypeServiceImpl implements ITypeService {
|
|||
* 根据组织树parent_id查询结果
|
||||
*
|
||||
* @param typeId 父级id
|
||||
* @param typeName 名称筛选
|
||||
* @param type 名称筛选
|
||||
*/
|
||||
@Override
|
||||
public List<MaTypeListVo> getListByParentId(Long typeId, String typeName) {
|
||||
return typeMapper.getListByTypeName(typeId, typeName);
|
||||
public List<MaTypeListVo> getListByParentId(Long typeId, MaTypeListVo type) {
|
||||
return typeMapper.getListByTypeName(typeId, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -436,8 +436,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type m3 ON m2.parent_id = m3.type_id
|
||||
and m3.del_flag = '0'
|
||||
WHERE m.parent_id = #{typeId} and m.del_flag = '0'
|
||||
<if test="typeName != null and typeName !=''">
|
||||
AND m.type_name like concat('%',#{typeName},'%')
|
||||
<if test="keyword != null and keyword !=''">
|
||||
AND (m.type_name like concat('%',#{keyword},'%')
|
||||
or m1.type_name like concat('%',#{keyword},'%')
|
||||
or m2.type_name like concat('%',#{keyword},'%')
|
||||
or m3.type_name like concat('%',#{keyword},'%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryByName" resultType="com.bonus.material.ma.domain.Type">
|
||||
|
|
|
|||
Loading…
Reference in New Issue