| | |
| | | @GetMapping("/pageDept") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入equipment") |
| | | public R<IPage<EquipmentVO>> pageDept(EquipmentVO equipment, Query query, String pid, HttpServletResponse response) throws ParseException { |
| | | public R<IPage<EquipmentVO>> pageDept(EquipmentVO equipment, Query query, String pid,String dxtype, HttpServletResponse response) throws ParseException { |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials", "true"); |
| | | |
| | | IPage<EquipmentVO> page = equipmentService.selectDeptPages(Condition.getPage(query), equipment, pid); |
| | | IPage<EquipmentVO> page = equipmentService.selectDeptPages(Condition.getPage(query), equipment, pid,dxtype); |
| | | |
| | | for (int j = 0; j < page.getRecords().size(); j++) { |
| | | String expireTime = page.getRecords().get(j).getExpireTime(); |
| | |
| | | |
| | | List<EquipmentVO> selectEquipmentPage(IPage page, EquipmentVO equipment,List childList); |
| | | |
| | | List<EquipmentVO> selectDeptPages(IPage page, EquipmentVO equipment,List childList); |
| | | List<EquipmentVO> selectDeptPages(IPage page, EquipmentVO equipment,List childList,String dxtype); |
| | | |
| | | void s(Equipment equipment); |
| | | void updateOne(Equipment equipment); |
| | |
| | | and dtype=#{equipment.dtype} |
| | | </if> |
| | | |
| | | <if test="dxtype!=null"> |
| | | and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) |
| | | </if> |
| | | |
| | | <if test="childList!=null and childList.size>0"> |
| | | and deptId in |
| | | <foreach collection="childList" index="index" item="item" open="(" separator="," close=")"> |
| | |
| | | IPage<EquipmentVO> selectPage(IPage<EquipmentVO> page, EquipmentVO equipment,String pid); |
| | | |
| | | |
| | | IPage<EquipmentVO> selectDeptPages(IPage<EquipmentVO> page, EquipmentVO equipment,String pid); |
| | | IPage<EquipmentVO> selectDeptPages(IPage<EquipmentVO> page, EquipmentVO equipment,String pid,String dxtype); |
| | | |
| | | /** |
| | | * 树形结构 |
| | |
| | | |
| | | |
| | | @Override |
| | | public IPage<EquipmentVO> selectDeptPages(IPage<EquipmentVO> page, EquipmentVO equipment,String pid) { |
| | | public IPage<EquipmentVO> selectDeptPages(IPage<EquipmentVO> page, EquipmentVO equipment,String pid,String dxdype) { |
| | | |
| | | List deptIdList; |
| | | if (!pid.equals("")){ |
| | | if (pid != null && !pid.equals("")){ |
| | | deptIdList = SysCache.getDeptChildIds(Long.valueOf(pid)); |
| | | }else{ |
| | | deptIdList = SysCache.getDeptChildIds(null); |
| | | } |
| | | return page.setRecords(baseMapper.selectDeptPages(page,equipment,deptIdList)); |
| | | return page.setRecords(baseMapper.selectDeptPages(page,equipment,deptIdList,dxdype)); |
| | | } |
| | | |
| | | |