Commit a062db1f authored by chenzhao's avatar chenzhao

检查项匹配规则变动 向上查询 包括父级节点

parent 0f4a8490
...@@ -24,6 +24,12 @@ public interface InputItemMapper extends BaseMapper { ...@@ -24,6 +24,12 @@ public interface InputItemMapper extends BaseMapper {
public List<InputItemVo> getInputItemInfoNew(InputItemPageParam param); public List<InputItemVo> getInputItemInfoNew(InputItemPageParam param);
Map<String,String> getEquipParentCode(String code);
Map<String,String> getEquipParent(String parentId);
/** /**
* 新接口 * 新接口
* */ * */
......
...@@ -238,8 +238,31 @@ public class InputItemServiceImpl implements IInputItemService { ...@@ -238,8 +238,31 @@ public class InputItemServiceImpl implements IInputItemService {
param.put("orgCode",orgCode); param.put("orgCode",orgCode);
param.put("bizOrgCode",companyBizOrgCode); param.put("bizOrgCode",companyBizOrgCode);
List<String> list = new ArrayList<>();
if(param.containsKey("equipmentType")){
list = getEquipParent(param.get("equipmentType").toString(),list);
list .add("-1");
param.put("equipmentType",list);
}
List<String> list1 = new ArrayList<>();
if(param.containsKey("facilitiesType")){
list1 = getEquipParent(param.get("facilitiesType").toString(),list1);
list1 .add("-1");
param.put("facilitiesType",list1);
}
List<PointInputItemVo> content = inputItemMapper.queryCustomInputItem(param); List<PointInputItemVo> content = inputItemMapper.queryCustomInputItem(param);
return content; return content;
} }
public List<String> getEquipParent(String code,List<String> objects){
Map<String, String> equipmentType = inputItemMapper.getEquipParentCode(code);
if (!equipmentType.containsKey("parent_id") ){
objects.add(code);
return objects;
}
objects.add(code);
Map<String, String> parent = inputItemMapper.getEquipParent(equipmentType.get("parent_id"));
return getEquipParent(parent.get("code"),objects);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment