|  | @@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  import java.util.Date;
 |  |  import java.util.Date;
 | 
												
													
														
															|  |  import java.util.List;
 |  |  import java.util.List;
 | 
												
													
														
															|  | 
 |  | +import java.util.Map;
 | 
												
													
														
															|  |  import java.util.UUID;
 |  |  import java.util.UUID;
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  /**
 |  |  /**
 | 
												
											
												
													
														
															|  | @@ -31,56 +32,74 @@ public class MonitorSystemController extends BaseController {
 | 
												
													
														
															|  |      @Autowired
 |  |      @Autowired
 | 
												
													
														
															|  |      private MonitorSystemService monitorSystemService;
 |  |      private MonitorSystemService monitorSystemService;
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | 
 |  | +    /**
 | 
												
													
														
															|  | 
 |  | +     * 首页-监测系统信息
 | 
												
													
														
															|  | 
 |  | +     *
 | 
												
													
														
															|  | 
 |  | +     * @param
 | 
												
													
														
															|  | 
 |  | +     * @return
 | 
												
													
														
															|  | 
 |  | +     */
 | 
												
													
														
															|  | 
 |  | +    @Log(title = "首页-监测系统信息", businessType = BusinessType.SELECT)
 | 
												
													
														
															|  | 
 |  | +    @PostMapping("/monitorSystem")
 | 
												
													
														
															|  | 
 |  | +    @ApiOperation(value = "首页-监测系统信息")
 | 
												
													
														
															|  | 
 |  | +    public AjaxResult monitorSystem() {
 | 
												
													
														
															|  | 
 |  | +        Map<String, Object> monitorSystem = monitorSystemService.monitorSystem();
 | 
												
													
														
															|  | 
 |  | +        return AjaxResult.success(monitorSystem);
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |      /**
 |  |      /**
 | 
												
													
														
															|  |       * 分页查询
 |  |       * 分页查询
 | 
												
													
														
															|  | 
 |  | +     *
 | 
												
													
														
															|  |       * @param
 |  |       * @param
 | 
												
													
														
															|  |       * @return
 |  |       * @return
 | 
												
													
														
															|  |       */
 |  |       */
 | 
												
													
														
															|  |      @Log(title = "监测系统-分页查询", businessType = BusinessType.SELECT)
 |  |      @Log(title = "监测系统-分页查询", businessType = BusinessType.SELECT)
 | 
												
													
														
															|  |      @PostMapping("/pageList")
 |  |      @PostMapping("/pageList")
 | 
												
													
														
															|  |      @ApiOperation(value = "监测系统分页查询")
 |  |      @ApiOperation(value = "监测系统分页查询")
 | 
												
													
														
															|  | -    public AjaxResult pageList(@RequestBody MonitorSystemVo monitorSystemVo){
 |  | 
 | 
												
													
														
															|  | -        IPage<MonitorSystemVo> page =  monitorSystemService.pageList(monitorSystemVo);
 |  | 
 | 
												
													
														
															|  | 
 |  | +    public AjaxResult pageList(@RequestBody MonitorSystemVo monitorSystemVo) {
 | 
												
													
														
															|  | 
 |  | +        IPage<MonitorSystemVo> page = monitorSystemService.pageList(monitorSystemVo);
 | 
												
													
														
															|  |          return AjaxResult.success(page);
 |  |          return AjaxResult.success(page);
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      /**
 |  |      /**
 | 
												
													
														
															|  |       * 监测系统名称查询
 |  |       * 监测系统名称查询
 | 
												
													
														
															|  | 
 |  | +     *
 | 
												
													
														
															|  |       * @param
 |  |       * @param
 | 
												
													
														
															|  |       * @return
 |  |       * @return
 | 
												
													
														
															|  |       */
 |  |       */
 | 
												
													
														
															|  |      @Log(title = "监测系统-监测系统名称查询", businessType = BusinessType.SELECT)
 |  |      @Log(title = "监测系统-监测系统名称查询", businessType = BusinessType.SELECT)
 | 
												
													
														
															|  |      @GetMapping("/list")
 |  |      @GetMapping("/list")
 | 
												
													
														
															|  |      @ApiOperation(value = "监测系统-监测系统名称查询")
 |  |      @ApiOperation(value = "监测系统-监测系统名称查询")
 | 
												
													
														
															|  | -    public AjaxResult list(){
 |  | 
 | 
												
													
														
															|  | 
 |  | +    public AjaxResult list() {
 | 
												
													
														
															|  |          LambdaQueryWrapper<MonitorSystem> wrapper = new LambdaQueryWrapper<MonitorSystem>();
 |  |          LambdaQueryWrapper<MonitorSystem> wrapper = new LambdaQueryWrapper<MonitorSystem>();
 | 
												
													
														
															|  | -        wrapper.eq(MonitorSystem::getStatus,1);
 |  | 
 | 
												
													
														
															|  | 
 |  | +        wrapper.eq(MonitorSystem::getStatus, 1);
 | 
												
													
														
															|  |          List<MonitorSystem> list = monitorSystemService.list(wrapper);
 |  |          List<MonitorSystem> list = monitorSystemService.list(wrapper);
 | 
												
													
														
															|  |          return AjaxResult.success(list);
 |  |          return AjaxResult.success(list);
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      /**
 |  |      /**
 | 
												
													
														
															|  |       * 详情查看
 |  |       * 详情查看
 | 
												
													
														
															|  | 
 |  | +     *
 | 
												
													
														
															|  |       * @param
 |  |       * @param
 | 
												
													
														
															|  |       * @return
 |  |       * @return
 | 
												
													
														
															|  |       */
 |  |       */
 | 
												
													
														
															|  |      @Log(title = "监测系统-详情查看", businessType = BusinessType.SELECT)
 |  |      @Log(title = "监测系统-详情查看", businessType = BusinessType.SELECT)
 | 
												
													
														
															|  |      @GetMapping("/{id}")
 |  |      @GetMapping("/{id}")
 | 
												
													
														
															|  |      @ApiOperation(value = "监测系统-详情查看")
 |  |      @ApiOperation(value = "监测系统-详情查看")
 | 
												
													
														
															|  | -    public AjaxResult detail(@PathVariable Long id){
 |  | 
 | 
												
													
														
															|  | 
 |  | +    public AjaxResult detail(@PathVariable Long id) {
 | 
												
													
														
															|  |          MonitorSystem monitorSystem = monitorSystemService.getMonitorSystem(id);
 |  |          MonitorSystem monitorSystem = monitorSystemService.getMonitorSystem(id);
 | 
												
													
														
															|  |          return AjaxResult.success(monitorSystem);
 |  |          return AjaxResult.success(monitorSystem);
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      /**
 |  |      /**
 | 
												
													
														
															|  |       * 新增
 |  |       * 新增
 | 
												
													
														
															|  | 
 |  | +     *
 | 
												
													
														
															|  |       * @param
 |  |       * @param
 | 
												
													
														
															|  |       * @return
 |  |       * @return
 | 
												
													
														
															|  |       */
 |  |       */
 | 
												
													
														
															|  |      @Log(title = "监测系统-新增", businessType = BusinessType.INSERT)
 |  |      @Log(title = "监测系统-新增", businessType = BusinessType.INSERT)
 | 
												
													
														
															|  |      @PostMapping("/add")
 |  |      @PostMapping("/add")
 | 
												
													
														
															|  |      @ApiOperation(value = "监测系统-新增")
 |  |      @ApiOperation(value = "监测系统-新增")
 | 
												
													
														
															|  | -    public AjaxResult add(@RequestBody MonitorSystem monitorSystem){
 |  | 
 | 
												
													
														
															|  | 
 |  | +    public AjaxResult add(@RequestBody MonitorSystem monitorSystem) {
 | 
												
													
														
															|  |          if (UserConstants.NOT_UNIQUE.equals(monitorSystemService.checkClientIdUnique(monitorSystem))) {
 |  |          if (UserConstants.NOT_UNIQUE.equals(monitorSystemService.checkClientIdUnique(monitorSystem))) {
 | 
												
													
														
															|  |              return error("监测系统新增'" + monitorSystem.getClientId() + "'失败,客户端编码已存在");
 |  |              return error("监测系统新增'" + monitorSystem.getClientId() + "'失败,客户端编码已存在");
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
											
												
													
														
															|  | @@ -90,26 +109,28 @@ public class MonitorSystemController extends BaseController {
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      /**
 |  |      /**
 | 
												
													
														
															|  |       * 删除
 |  |       * 删除
 | 
												
													
														
															|  | 
 |  | +     *
 | 
												
													
														
															|  |       * @param
 |  |       * @param
 | 
												
													
														
															|  |       * @return
 |  |       * @return
 | 
												
													
														
															|  |       */
 |  |       */
 | 
												
													
														
															|  |      @Log(title = "监测系统-删除", businessType = BusinessType.DELETE)
 |  |      @Log(title = "监测系统-删除", businessType = BusinessType.DELETE)
 | 
												
													
														
															|  |      @DeleteMapping("/{ids}")
 |  |      @DeleteMapping("/{ids}")
 | 
												
													
														
															|  |      @ApiOperation(value = "监测系统-删除")
 |  |      @ApiOperation(value = "监测系统-删除")
 | 
												
													
														
															|  | -    public AjaxResult delete(@PathVariable Long[] ids){
 |  | 
 | 
												
													
														
															|  | -         monitorSystemService.deleteByIds(ids);
 |  | 
 | 
												
													
														
															|  | -         return AjaxResult.success();
 |  | 
 | 
												
													
														
															|  | 
 |  | +    public AjaxResult delete(@PathVariable Long[] ids) {
 | 
												
													
														
															|  | 
 |  | +        monitorSystemService.deleteByIds(ids);
 | 
												
													
														
															|  | 
 |  | +        return AjaxResult.success();
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      /**
 |  |      /**
 | 
												
													
														
															|  |       * 修改
 |  |       * 修改
 | 
												
													
														
															|  | 
 |  | +     *
 | 
												
													
														
															|  |       * @param
 |  |       * @param
 | 
												
													
														
															|  |       * @return
 |  |       * @return
 | 
												
													
														
															|  |       */
 |  |       */
 | 
												
													
														
															|  |      @Log(title = "监测系统-修改", businessType = BusinessType.UPDATE)
 |  |      @Log(title = "监测系统-修改", businessType = BusinessType.UPDATE)
 | 
												
													
														
															|  |      @PutMapping
 |  |      @PutMapping
 | 
												
													
														
															|  |      @ApiOperation(value = "监测系统-修改")
 |  |      @ApiOperation(value = "监测系统-修改")
 | 
												
													
														
															|  | -    public AjaxResult update(@RequestBody MonitorSystem monitorSystem){
 |  | 
 | 
												
													
														
															|  | 
 |  | +    public AjaxResult update(@RequestBody MonitorSystem monitorSystem) {
 | 
												
													
														
															|  |          if (UserConstants.EXCEPTION.equals(monitorSystemService.checkSystemOnline(monitorSystem))) {
 |  |          if (UserConstants.EXCEPTION.equals(monitorSystemService.checkSystemOnline(monitorSystem))) {
 | 
												
													
														
															|  |              return error("监测系统修改'" + monitorSystem.getClientId() + "'失败,该系统正在使用中,无法修改");
 |  |              return error("监测系统修改'" + monitorSystem.getClientId() + "'失败,该系统正在使用中,无法修改");
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
											
												
													
														
															|  | @@ -120,15 +141,16 @@ public class MonitorSystemController extends BaseController {
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      /**
 |  |      /**
 | 
												
													
														
															|  |       * 生成密钥
 |  |       * 生成密钥
 | 
												
													
														
															|  | 
 |  | +     *
 | 
												
													
														
															|  |       * @param
 |  |       * @param
 | 
												
													
														
															|  |       * @return
 |  |       * @return
 | 
												
													
														
															|  |       */
 |  |       */
 | 
												
													
														
															|  |      @Log(title = "监测系统-生成密钥", businessType = BusinessType.SELECT)
 |  |      @Log(title = "监测系统-生成密钥", businessType = BusinessType.SELECT)
 | 
												
													
														
															|  |      @GetMapping("/getSecret")
 |  |      @GetMapping("/getSecret")
 | 
												
													
														
															|  |      @ApiOperation(value = "监测系统-生成密钥")
 |  |      @ApiOperation(value = "监测系统-生成密钥")
 | 
												
													
														
															|  | -    public AjaxResult getSecret(){
 |  | 
 | 
												
													
														
															|  | 
 |  | +    public AjaxResult getSecret() {
 | 
												
													
														
															|  |          UUID id = UUID.randomUUID();
 |  |          UUID id = UUID.randomUUID();
 | 
												
													
														
															|  |          String[] idd = id.toString().split("-");
 |  |          String[] idd = id.toString().split("-");
 | 
												
													
														
															|  | -        return AjaxResult.success(idd[0]+idd[1]+idd[2]);
 |  | 
 | 
												
													
														
															|  | 
 |  | +        return AjaxResult.success(idd[0] + idd[1] + idd[2]);
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |  }
 |  |  }
 |