| | |
| | | // int insert(BroadcastTerminalV2Entity b); |
| | | |
| | | List<BroadcastTerminalV2EntityBo> getBroadcastTerminalList(String keyword, Long userid, int bindingState); |
| | | |
| | | List<BroadcastTerminalV2EntityBo> newListTerminalOnBind(Long userid,String keyword); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | List<MonitorBo> listMonitorByIds(List<String> list, int equipmentState); |
| | | |
| | | List<MonitorBo> listMonitorDeviceSerial1(Long userid, String keyword, int bindingState,String orderBy); |
| | | List<MonitorBo> listMonitorDeviceSerial1(Long userid, String keyword, int bindingState, String orderBy); |
| | | |
| | | List<MonitorBo> newListMonitorOnBind(Long userid, String keyword); |
| | | } |
| | | |
| | | |
| | |
| | | ,terminal_name,streetlight_id, |
| | | bind_states,exist |
| | | </sql> |
| | | <select id="newListTerminalOnBind" parameterType="java.lang.String"> |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name |
| | | FROM |
| | | broadcast_v2_terminal t1 |
| | | LEFT JOIN pole_binding t2 ON t1.id = t2.device_code |
| | | AND t2.device_type = 5 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | <where> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND t1.id LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.terminal_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | </if> |
| | | <if test="userid != null"> |
| | | AND (t3.user_id = #{userid} OR t3.client_id = #{userid}) |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | <select id="listAll" resultType="com.sandu.ximon.dao.domain.BroadcastTerminalV2Entity"> |
| | | SELECT |
| | | t1.*, t3.pole_name |
| | |
| | | </select> |
| | | |
| | | <select id="getBroadcastTerminalList" resultType="com.sandu.ximon.dao.bo.BroadcastTerminalV2EntityBo"> |
| | | |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name |
| | |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="netAddress" column="net_address" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | <select id="newListMonitorOnBind" resultType="com.sandu.ximon.dao.bo.MonitorBo"> |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name, t3.province,t3.city,t3.region,t3.address |
| | | FROM |
| | | monitor t1 |
| | | LEFT JOIN pole_binding t2 ON t1.device_serial = t2.device_code |
| | | AND t2.device_type = 7 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | <where> |
| | | <if test="userid != null"> |
| | | AND (t3.user_id = #{userid} OR t3.client_id = #{userid}) |
| | | </if> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND ( |
| | | t1.device_serial LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.note LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.id LIKE CONCAT(CONCAT('%', #{keyword}), '%')) |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <select id="listMonitorByIds" resultType="com.sandu.ximon.dao.bo.MonitorBo"> |
| | | SELECT |
| | |
| | | private final MonitorMapper monitorMapper; |
| | | |
| | | @GetMapping("/getMonitorList") |
| | | public ResponseVO<Object> getMonitorList() { |
| | | public ResponseVO<Object> getMonitorList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | List<MonitorBo> monitorBos; |
| | | //超管 |
| | | if (SecurityUtils.getClientId() == null) { |
| | | monitorBos = monitorMapper.listMonitorDeviceSerial1(null, null, 2, null); |
| | | monitorBos = monitorMapper.newListMonitorOnBind(null, keyword); |
| | | } else { |
| | | monitorBos = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), null, 2, null); |
| | | monitorBos = monitorMapper.newListMonitorOnBind(SecurityUtils.getUserId(), keyword); |
| | | } |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | |
| | | private final IpVolumeService ipVolumeService; |
| | | |
| | | @GetMapping("/getIpVolumeList") |
| | | public ResponseVO<Object> getIpVolumeList() { |
| | | public ResponseVO<Object> getIpVolumeList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | BroadcastTerminalV2Param param = new BroadcastTerminalV2Param(); |
| | | param.setBindingState(2); |
| | | param.setKeyword(null); |
| | | param.setWorkState(2); |
| | | List<BroadcastTerminalV2EntityBo> broadcastTerminalList = ipVolumeService.getBroadcastTerminalList(null, null, null, param); |
| | | List<BroadcastTerminalV2EntityBo> broadcastTerminalList = ipVolumeService.newIpTerminalList(keyword); |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | | for (BroadcastTerminalV2EntityBo bean : broadcastTerminalList) { |
| | |
| | | private final IpVolumeFileService ipVolumeFileService; |
| | | |
| | | @GetMapping("/getIpFileList") |
| | | public ResponseVO<Object> getIpFileList() { |
| | | List<IpVolumeFile> ipVolumeFiles = ipVolumeFileService.listFiles(); |
| | | public ResponseVO<Object> getIpFileList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | List<IpVolumeFile> ipVolumeFiles = ipVolumeFileService.listFiles(keyword); |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | | for (IpVolumeFile bean : ipVolumeFiles) { |
| | |
| | | package com.sandu.ximon.admin.service; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alipay.service.schema.util.StringUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | |
| | | return list; |
| | | } |
| | | |
| | | public List<IpVolumeFile> listFiles() { |
| | | public List<IpVolumeFile> listFiles(String keyword) { |
| | | LambdaQueryWrapper<IpVolumeFile> wrapper = Wrappers.lambdaQuery(IpVolumeFile.class); |
| | | |
| | | //不是超管 |
| | |
| | | file.eq(IpVolumeFile::getUserId, SecurityUtils.getUserId()); |
| | | }); |
| | | } |
| | | if (keyword != null && !StringUtil.isEmpty(keyword)) { |
| | | wrapper.like(IpVolumeFile::getFileName, keyword); |
| | | } |
| | | return list(wrapper); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public List<BroadcastTerminalV2EntityBo> newIpTerminalList(String keyword) { |
| | | |
| | | List<BroadcastTerminalV2EntityBo> broadcastTerminalV2EntityBos = broadcastTerminalV2EntityMapper.newListTerminalOnBind(SecurityUtils.getClientId(), keyword); |
| | | |
| | | |
| | | List<TerminalVO> list = TerminalAPIUtils.getTerminalList(); |
| | | for (BroadcastTerminalV2EntityBo bean : broadcastTerminalV2EntityBos) { |
| | | for (TerminalVO terminalVO : list) { |
| | | if (bean.getId().equals(terminalVO.getId())) { |
| | | bean.setStatus(terminalVO.getStatus()); |
| | | bean.setIp(terminalVO.getIp()); |
| | | bean.setVolumn(terminalVO.getVolumn()); |
| | | bean.setDefaultVolumn(terminalVO.getDefaultVolumn()); |
| | | bean.setPower(terminalVO.getPower()); |
| | | bean.setDefaultPower(terminalVO.getDefaultPower()); |
| | | bean.setLast(terminalVO.getLast()); |
| | | bean.setTaskType(terminalVO.getTaskType()); |
| | | bean.setTaskID(terminalVO.getTaskID()); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return broadcastTerminalV2EntityBos; |
| | | } |
| | | |
| | | /** |
| | | * 修改设备绑定状态 |
| | | * |