设备列表接口修改,根据部门id查询时修改为模糊查询
| | |
| | | |
| | | /** |
| | | * 自定义分页(部门挂接) |
| | | * @param dxtype ??? |
| | | * @param equipment 设备对象信息 |
| | | * @param query 查询参数 |
| | | * @param pid 组织机构Id |
| | | * @param response servlet 响应对象 |
| | | */ |
| | | @GetMapping("/pageDept") |
| | | @ApiOperationSupport(order = 3) |
| | |
| | | String[] split = page.getRecords().get(j).getDeptId().split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | StringBuffer deptNameBuiffer = new StringBuffer(); |
| | | //数据匹配封装 |
| | | for (String deptId:list) { |
| | | for (DeptVo deptVo:deptVos) { |
| | | if (deptId.equals(deptVo.getId().toString())){ |
| | |
| | | |
| | | List<EquipmentVO> selectEquipmentPage(IPage page, EquipmentVO equipment,List childList); |
| | | |
| | | List<EquipmentVO> selectDeptPages(IPage page, EquipmentVO equipment,List childList,String dxtype); |
| | | List<EquipmentVO> selectDeptPages(IPage page, EquipmentVO equipment,@Param("pid") String pid,String dxtype); |
| | | |
| | | void s(Equipment equipment); |
| | | void updateOne(Equipment equipment); |
| | |
| | | <if test="dxtype!=null and dxtype == 3"> |
| | | and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and state!=null |
| | | </if> |
| | | |
| | | <if test="childList!=null and childList.size>0"> |
| | | and deptId in |
| | | <foreach collection="childList" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | <if test="pid!=null and pid!=''"> |
| | | and deptId like concat('%',#{pid},'%') |
| | | </if> |
| | | |
| | | </select> |
| | |
| | | @Override |
| | | public IPage<EquipmentVO> selectDeptPages(IPage<EquipmentVO> page, EquipmentVO equipment,String pid,String dxdype) { |
| | | |
| | | List deptIdList; |
| | | if (pid != null && !pid.equals("")){ |
| | | deptIdList = SysCache.getDeptChildIds(Long.valueOf(pid)); |
| | | }else{ |
| | | deptIdList = SysCache.getDeptChildIds(null); |
| | | } |
| | | return page.setRecords(baseMapper.selectDeptPages(page,equipment,deptIdList,dxdype)); |
| | | // List deptIdList; |
| | | // if (pid != null && !pid.equals("")){ |
| | | // deptIdList = SysCache.getDeptChildIds(Long.valueOf(pid)); |
| | | // }else{ |
| | | // deptIdList = SysCache.getDeptChildIds(null); |
| | | // } |
| | | return page.setRecords(baseMapper.selectDeptPages(page,equipment,pid,dxdype)); |
| | | } |
| | | |
| | | |