| | |
| | | package com.sandu.ximon.admin.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.util.StringUtil; |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.common.util.SpringContextHolder; |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | * 客户列表 |
| | | */ |
| | | @GetMapping("/getClientList") |
| | | public ResponseVO<Object> getClientList() { |
| | | public ResponseVO<Object> getClientList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | LambdaQueryWrapper<Client> wrapper = Wrappers.lambdaQuery(Client.class); |
| | | //非超管只能看到自己下属的客户信息 |
| | | if (SecurityUtils.getClientId() != null) { |
| | | wrapper.eq(Client::getSuperiorId, SecurityUtils.getUserId()); |
| | | } |
| | | if (!StringUtil.isEmpty(keyword)) { |
| | | wrapper.eq(Client::getId, keyword).or(w -> { |
| | | w.eq(Client::getClientName, keyword); |
| | | }); |
| | | } |
| | | List<Client> list = SpringContextHolder.getBean(ClientService.class).list(wrapper); |
| | | |
| | |
| | | |
| | | @GetMapping("/getNledProgeamList") |
| | | public ResponseVO<Object> getNledProgeamList() { |
| | | List<LEDProgram> ledPrograms = ledProgramService.listProgram(null, null,null,null); |
| | | List<LEDProgram> ledPrograms = ledProgramService.listProgram(null, null, null, null); |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | | for (LEDProgram bean : ledPrograms) { |
| | |
| | | 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) { |