| | |
| | | @Resource |
| | | private TDeviceService deviceService; |
| | | |
| | | @RequiresPermissions(value = {"/deviceManagement/list"}, logical = Logical.OR) |
| | | @RequiresPermissions(value = {"/deviceManagement/list", "/faultInformationList"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @GetMapping("/pageList") |
| | | @ApiOperation(value = "获取设备列表", tags = {"管理后台-设备管理"}) |
| | |
| | | if (!StringUtils.hasText(device.getDeviceName())) { |
| | | return AjaxResult.error("设备名称不能为空"); |
| | | } |
| | | if (!StringUtils.hasText(device.getSerialNo())) { |
| | | if (!StringUtils.hasText(device.getDeviceSerial())) { |
| | | return AjaxResult.error("设备序列号不能为空"); |
| | | } |
| | | if (!StringUtils.hasText(device.getEquipmentModel())) { |
| | | return AjaxResult.error("设备型号不能为空"); |
| | | if (device.getDeviceBrand() == null) { |
| | | return AjaxResult.error("设备品牌不能为空"); |
| | | } |
| | | if (!StringUtils.hasText(device.getValidateCode())) { |
| | | return AjaxResult.error("设备验证码不能为空"); |
| | | } |
| | | if (device.getChannelNo() == null || device.getChannelNo() < 1) { |
| | | return AjaxResult.error("通道号不能为空"); |
| | | } |
| | | if (device.getPartnerId() == null) { |
| | | return AjaxResult.error("合作商不能为空"); |
| | | } |
| | | if (deviceService.existsBySerialNo(device.getSerialNo(), excludeId)) { |
| | | return AjaxResult.error("设备序列号已存在"); |
| | | } |
| | | return null; |
| | | } |