| | |
| | | import com.sandu.ximon.admin.vo.PoleBindVO; |
| | | import com.sandu.ximon.dao.bo.*; |
| | | import com.sandu.ximon.dao.domain.*; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import com.sandu.ximon.dao.mapper.PoleMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | BroadcastTerminalV2Param broadcastTerminalV2Param = new BroadcastTerminalV2Param(); |
| | | broadcastTerminalV2Param.setBindingState(2); |
| | | broadcastTerminalV2Param.setWorkState(2); |
| | | List<BroadcastTerminalV2EntityBo> broadcastTerminalList = SpringContextHolder.getBean(IpVolumeService.class).getBroadcastTerminalList(null, broadcastTerminalV2Param); |
| | | List<BroadcastTerminalV2EntityBo> broadcastTerminalList = SpringContextHolder.getBean(IpVolumeService.class).getBroadcastTerminalList(null, null, null, broadcastTerminalV2Param); |
| | | for (BroadcastTerminalV2EntityBo bean : broadcastTerminalList) { |
| | | if (bean.getStatus() == 1 || bean.getStatus() == 0) { |
| | | number++; |
| | |
| | | MonitorParam monitorParam = new MonitorParam(); |
| | | monitorParam.setEquipmentState(2); |
| | | monitorParam.setBindingState(2); |
| | | List<MonitorBo> monitorBos = SpringContextHolder.getBean(MonitorService.class).listMonitorByKeyword(null, monitorParam).getList(); |
| | | List<MonitorBo> monitorBos = SpringContextHolder.getBean(MonitorService.class).listMonitorByKeyword(null,null,null, monitorParam).getList(); |
| | | monitorParam.setEquipmentState(1); |
| | | List<MonitorBo> online = SpringContextHolder.getBean(MonitorService.class).listMonitorByKeyword(null, monitorParam).getList(); |
| | | List<MonitorBo> online = SpringContextHolder.getBean(MonitorService.class).listMonitorByKeyword(null,null,null, monitorParam).getList(); |
| | | result.put("monitorOnlineCount", online.size()); |
| | | result.put("monitorTotalCount", monitorBos.size()); |
| | | |
| | |
| | | return result; |
| | | } |
| | | |
| | | public CommonPage queryAllStatesAndList(Integer pageNo, Integer pageSize, PoleStatesParam param) { |
| | | public CommonPage queryAllStatesAndList(Integer pageNo, Integer pageSize, PoleStatesParam param, Integer order, Integer seq) { |
| | | if (param == null) { |
| | | param = new PoleStatesParam(); |
| | | } |
| | | System.out.println(param); |
| | | |
| | | //排序字段 |
| | | String orderByResult = OrderByEnums.POLE_ID.getCode(); |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.POLE_NAME.getCode(); |
| | | break; |
| | | case 2: |
| | | orderByResult = OrderByEnums.POLE_ID.getCode(); |
| | | break; |
| | | case 3: |
| | | orderByResult = OrderByEnums.POLE_CREATE_TIME.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = OrderByEnums.ASC.getCode(); |
| | | break; |
| | | case 2: |
| | | orderBySeq = OrderByEnums.DESC.getCode(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = "t1." + orderByResult + " " + orderBySeq; |
| | | |
| | | List<Pole> poleList; |
| | | if (SecurityUtils.getClientId() == null) { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(null, param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword()); |
| | | poleList = poleMapper.queryPoleOnLineStatesList(null, param.getIsTrue(), |
| | | param.getBingStates(), param.getGroupid(), param.getKeyword(), orderBy); |
| | | } else { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword()); |
| | | poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), |
| | | param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword(), orderBy); |
| | | } |
| | | |
| | | List<Pole> PoleResult = isOnLine(poleList, param); |