9.24更新首页、设备类型、厂商、单台、多台设备信息接口

dev
YYD-YY 11 months ago
parent 852d952d77
commit 46cc70ac25
  1. 84
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquBaseController.java
  2. 53
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquManuController.java
  3. 110
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquSupplierController.java
  4. 52
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquTypeController.java
  5. 32
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquVlanController.java
  6. 39
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlertMessageController.java
  7. 27
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/intQuestion/LocalKnowledgeController.java
  8. 28
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/tool/EquInterfaceController.java
  9. 15
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/tool/EquRoutingController.java
  10. 16
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/tool/EquVeneerController.java
  11. 2
      ALOps_sys_backend/alops-framework/src/main/java/com/alops/framework/config/SecurityConfig.java
  12. 7
      ALOps_sys_backend/alops-system/pom.xml
  13. 47
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquManu.java
  14. 10
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquRouting.java
  15. 147
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquSupplier.java
  16. 30
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquType.java
  17. 9
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquVeneer.java
  18. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquVlan.java
  19. 22
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/AlertStatisticDto.java
  20. 5
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquBaseQueryDto.java
  21. 66
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquManuAddDto.java
  22. 72
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquManuUpdateDto.java
  23. 46
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquTypeAddDto.java
  24. 49
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquTypeUpdateDto.java
  25. 15
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorHistoryDto.java
  26. 37
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorLastDto.java
  27. 25
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorListDto.java
  28. 19
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorStatisticDto.java
  29. 25
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/vo/EquMonitorVO.java
  30. 64
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlarmRuleMapper.java
  31. 14
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlertMessageMapper.java
  32. 12
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquBaseMapper.java
  33. 4
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquInterfaceMapper.java
  34. 3
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquRoutingMapper.java
  35. 63
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquSupplierMapper.java
  36. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquVeneerMapper.java
  37. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquVlanMapper.java
  38. 65
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/FauStaMapper.java
  39. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlarmRuleService.java
  40. 9
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlertMessageService.java
  41. 33
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquBaseService.java
  42. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquInterfaceService.java
  43. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquRoutingService.java
  44. 61
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquSupplierService.java
  45. 1
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquVeneerService.java
  46. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquVlanService.java
  47. 98
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlarmRuleServiceImpl.java
  48. 44
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlertMessageServiceImpl.java
  49. 66
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquBaseServiceImpl.java
  50. 7
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquInterfaceServiceImpl.java
  51. 8
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquManuServiceImpl.java
  52. 15
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquRoutingServiceImpl.java
  53. 95
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquSupplierServiceImpl.java
  54. 5
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquTypeServiceImpl.java
  55. 12
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquVeneerServiceImpl.java
  56. 12
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquVlanServiceImpl.java
  57. 94
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/FauStaServiceImpl.java
  58. 110
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/AlarmRuleMapper.xml
  59. 54
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/AlertMessageMapper.xml
  60. 204
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml
  61. 9
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquInterfaceMapper.xml
  62. 2
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquManuMapper.xml
  63. 9
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquRoutingMapper.xml
  64. 86
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquSupplierMapper.xml
  65. 11
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquTypeMapper.xml
  66. 9
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquVeneerMapper.xml
  67. 10
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquVlanMapper.xml
  68. 44
      ALOps_sys_fe/alops-ui/src/api/system/supplier.js
  69. 287
      ALOps_sys_fe/alops-ui/src/views/system/supplier/index.vue
  70. 2
      ALOps_sys_fe/alops-ui/vue.config.js

@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Anonymous;
import com.alops.common.annotation.Log; import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController; import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult; import com.alops.common.core.domain.AjaxResult;
@ -13,6 +14,9 @@ import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquBase; import com.alops.system.domain.EquBase;
import com.alops.system.domain.dto.EquBaseQueryDto; import com.alops.system.domain.dto.EquBaseQueryDto;
import com.alops.system.domain.dto.MonitorListDto;
import com.alops.system.domain.dto.MonitorStatisticDto;
import com.alops.system.domain.vo.EquMonitorVO;
import com.alops.system.domain.vo.queryEquBaseVO; import com.alops.system.domain.vo.queryEquBaseVO;
import com.alops.system.service.IEquBaseService; import com.alops.system.service.IEquBaseService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -35,7 +39,7 @@ import org.springframework.web.bind.annotation.RestController;
* @date 2025-08-01 * @date 2025-08-01
*/ */
@RestController @RestController
@RequestMapping("/equipment") @RequestMapping("/device/files")
public class EquBaseController extends BaseController public class EquBaseController extends BaseController
{ {
@Autowired @Autowired
@ -44,7 +48,7 @@ public class EquBaseController extends BaseController
/** /**
* 查询设备基本信息列表 * 查询设备基本信息列表
*/ */
@PreAuthorize("@ss.hasPermi('equipment:base:queryByVO')") @PreAuthorize("@ss.hasPermi('device:files:queryByVO')")
@GetMapping("/queryByVO") @GetMapping("/queryByVO")
@ApiOperation("查询符合参数设备信息") @ApiOperation("查询符合参数设备信息")
public AjaxResult list(EquBaseQueryDto equBaseQueryDto ) { public AjaxResult list(EquBaseQueryDto equBaseQueryDto ) {
@ -57,42 +61,57 @@ public class EquBaseController extends BaseController
return AjaxResult.success("查询成功", data); return AjaxResult.success("查询成功", data);
} }
// @PreAuthorize("@ss.hasPermi('equipment:base:list')") /**查询设备监测信息列表(查询多台显示界面的单独信息)**/
// @GetMapping("/list") @PreAuthorize("@ss.hasPermi('device:files:query')")
// public TableDataInfo list(EquBase equBase) @GetMapping("/listMonitor")
// { @ApiOperation("查询设备监测信息列表(查询多台显示界面的单独信息)")
// startPage(); public AjaxResult listMonitorInfo(EquBaseQueryDto equBaseQueryDto)
// List<EquBase> list = equBaseService.selectEquBaseList(equBase); {
// return getDataTable(list); List<MonitorListDto> list = equBaseService.selectEquMonitorList(equBaseQueryDto);
// } return AjaxResult.success("查询成功", list);
}
/** /**
* 导出设备基本信息列表 * 获取设备最新时间的历史监控信息
* @param id 查询对象包含设备ID开始时间和结束时间
*/ */
// @PreAuthorize("@ss.hasPermi('equipment:base:export')") @PreAuthorize("@ss.hasPermi('device:files:query')")
// @Log(title = "设备档案", businessType = BusinessType.EXPORT) @GetMapping(value = "/latest/{id}") // URL清晰地表达了意图:获取历史监控信息
// @PostMapping("/export") @ApiOperation("获取设备最新时间的历史监控信息")
//// public void export(HttpServletResponse response, EquBaseQueryDto equBaseQueryDto) @Anonymous
//// { public AjaxResult getLastInfo(@PathVariable("id") String id) // 方法名也更清晰
//// List<EquBase> list = equBaseService.selectEquBaseList(equBaseQueryDto); {
//// ExcelUtil<EquBase> util = new ExcelUtil<EquBase>(EquBase.class); // 调用职责单一的 Service 方法
//// util.exportExcel(response, list, "设备基本信息数据"); return success(equBaseService.selectLatestEquMonitorInfo(id));
//// } }
/**
* 获取设备指定时间段内的历史监控信息
* @param equBaseQueryDto 查询对象包含设备ID开始时间和结束时间
*/
@PreAuthorize("@ss.hasPermi('device:files:query')")
@GetMapping(value = "/history") // URL清晰地表达了意图:获取历史监控信息
@ApiOperation("获取设备指定时间段内的历史监控信息")
@Anonymous
public AjaxResult getHistoricalInfo(EquBaseQueryDto equBaseQueryDto) {
// 这里直接返回单个对象,而不是List
return success(equBaseService.selectHistoricalEquMonitorInfo(equBaseQueryDto));
}
/** /**
* 获取设备基本信息详细信息 * 统计设备监测信息列表 - 按设备类型分类
*/ */
@PreAuthorize("@ss.hasPermi('equipment:base:query')") @PreAuthorize("@ss.hasPermi('device:files:statistic')")
@GetMapping(value = "/{id}") @GetMapping("/byEquType")
public AjaxResult getInfo(@PathVariable("id") String id) @ApiOperation("按设备类型分类统计设备信息")
{ public AjaxResult listMonitorInfoByType() {
return success(equBaseService.selectEquBaseById(id)); List<MonitorStatisticDto> list = equBaseService.selectEquStatisticByType();
return AjaxResult.success("查询成功", list);
} }
/** /**
* 新增设备基本信息 * 新增设备基本信息
*/ */
@PreAuthorize("@ss.hasPermi('equipment:base:add')") @PreAuthorize("@ss.hasPermi('device:files:add')")
@Log(title = "设备档案", businessType = BusinessType.INSERT) @Log(title = "设备档案", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ApiOperation("新增设备信息") @ApiOperation("新增设备信息")
@ -104,20 +123,23 @@ public class EquBaseController extends BaseController
/** /**
* 修改设备基本信息 * 修改设备基本信息
*/ */
@PreAuthorize("@ss.hasPermi('equipment:base:edit')") @PreAuthorize("@ss.hasPermi('device:files:modify')")
@Log(title = "设备档案", businessType = BusinessType.UPDATE) @Log(title = "设备档案", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping("/modify")
@ApiOperation("修改设备信息")
public AjaxResult edit(@RequestBody EquBase equBase) public AjaxResult edit(@RequestBody EquBase equBase)
{ {
return toAjax(equBaseService.updateEquBase(equBase)); return toAjax(equBaseService.updateEquBase(equBase));
} }
/** /**
* 删除设备基本信息 * 删除设备基本信息
*/ */
@PreAuthorize("@ss.hasPermi('equipment:base:remove')") @PreAuthorize("@ss.hasPermi('device:files:delete')")
@Log(title = "设备档案", businessType = BusinessType.DELETE) @Log(title = "设备档案", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除设备信息")
public AjaxResult remove(@PathVariable String[] ids) public AjaxResult remove(@PathVariable String[] ids)
{ {
return toAjax(equBaseService.deleteEquBaseByIds(ids)); return toAjax(equBaseService.deleteEquBaseByIds(ids));

@ -1,4 +1,5 @@
package com.alops.web.controller.equManagement; package com.alops.web.controller.equManagement;
import com.alops.system.domain.dto.EquManuAddDto;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -10,7 +11,9 @@ import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType; import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquManu; import com.alops.system.domain.EquManu;
import com.alops.system.domain.dto.EquManuUpdateDto;
import com.alops.system.service.IEquManuService; import com.alops.system.service.IEquManuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -30,7 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
* @date 2025-08-01 * @date 2025-08-01
*/ */
@RestController @RestController
@RequestMapping("/system/manu") @RequestMapping("/deviceManu")
public class EquManuController extends BaseController public class EquManuController extends BaseController
{ {
@Autowired @Autowired
@ -39,8 +42,9 @@ public class EquManuController extends BaseController
/** /**
* 查询设备厂商管理列表 * 查询设备厂商管理列表
*/ */
@PreAuthorize("@ss.hasPermi('system:manu:list')") @PreAuthorize("@ss.hasPermi('device:deviceManu:queryByVO')")
@GetMapping("/list") @GetMapping("/queryByVO")
@ApiOperation("查询设备厂商管理列表")
public TableDataInfo list(EquManu equManu) public TableDataInfo list(EquManu equManu)
{ {
startPage(); startPage();
@ -51,7 +55,7 @@ public class EquManuController extends BaseController
/** /**
* 导出设备厂商管理列表 * 导出设备厂商管理列表
*/ */
@PreAuthorize("@ss.hasPermi('system:manu:export')") @PreAuthorize("@ss.hasPermi('device:deviceManu:export')")
@Log(title = "设备厂商管理", businessType = BusinessType.EXPORT) @Log(title = "设备厂商管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, EquManu equManu) public void export(HttpServletResponse response, EquManu equManu)
@ -64,7 +68,7 @@ public class EquManuController extends BaseController
/** /**
* 获取设备厂商管理详细信息 * 获取设备厂商管理详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:manu:query')") @PreAuthorize("@ss.hasPermi('device:deviceManu:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
@ -74,31 +78,46 @@ public class EquManuController extends BaseController
/** /**
* 新增设备厂商管理 * 新增设备厂商管理
*/ */
@PreAuthorize("@ss.hasPermi('system:manu:add')") @PreAuthorize("@ss.hasPermi('device:deviceManu:add')")
@Log(title = "设备厂商管理", businessType = BusinessType.INSERT) @Log(title = "设备厂商管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping("/add")
public AjaxResult add(@RequestBody EquManu equManu) @ApiOperation("新增设备厂商管理列表")
{ public AjaxResult addByVo(@RequestBody EquManuAddDto dto) {
if (dto == null) {
return AjaxResult.error("请求参数为空");
}
EquManu equManu = EquManu.fromDto(dto);
return toAjax(equManuService.insertEquManu(equManu)); return toAjax(equManuService.insertEquManu(equManu));
} }
/** /**
* 修改设备厂商管理 * 修改设备厂商管理
*/ */
@PreAuthorize("@ss.hasPermi('system:manu:edit')") @PreAuthorize("@ss.hasPermi('device:deviceManu:modify')")
@Log(title = "设备厂商管理", businessType = BusinessType.UPDATE) @Log(title = "设备厂商管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping("/modify")
public AjaxResult edit(@RequestBody EquManu equManu) @ApiOperation("修改设备厂商管理列表")
{ public AjaxResult edit(@RequestBody EquManuUpdateDto dto) {
EquManu equManu = new EquManu();
equManu.setId(dto.getId());
equManu.setName(dto.getName());
equManu.setDescription(dto.getDescription());
equManu.setContactBy(dto.getContactBy());
equManu.setContactWay(dto.getContactWay());
if (dto.getStatus() != null) {
equManu.setStatus(dto.getStatus().longValue());
}
// ⚠ 注意:不要更新 createBy 和 createDate
return toAjax(equManuService.updateEquManu(equManu)); return toAjax(equManuService.updateEquManu(equManu));
} }
/** /**
* 删除设备厂商管理 * 删除设备厂商管理
*/ */
@PreAuthorize("@ss.hasPermi('system:manu:remove')") @PreAuthorize("@ss.hasPermi('device:deviceManu:delete')")
@Log(title = "设备厂商管理", businessType = BusinessType.DELETE) @Log(title = "设备厂商管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除设备厂商管理列表")
public AjaxResult remove(@PathVariable String[] ids) public AjaxResult remove(@PathVariable String[] ids)
{ {
return toAjax(equManuService.deleteEquManuByIds(ids)); return toAjax(equManuService.deleteEquManuByIds(ids));

@ -0,0 +1,110 @@
package com.alops.web.controller.equManagement;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.enums.BusinessType;
import com.alops.system.domain.EquSupplier;
import com.alops.system.service.IEquSupplierService;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.common.core.page.TableDataInfo;
/**
* 供应商功能Controller
*
* @author ruoyi
* @date 2025-09-20
*/
@RestController
@RequestMapping("/device/supplier")
public class EquSupplierController extends BaseController
{
@Autowired
private IEquSupplierService equSupplierService;
/**
* 查询供应商功能信息列表
*/
@PreAuthorize("@ss.hasPermi('device:supplier:query')")
@GetMapping("/query")
@ApiOperation("查询供应商功能信息列表")
public TableDataInfo list(EquSupplier equSupplier)
{
startPage();
List<EquSupplier> list = equSupplierService.selectEquSupplierList(equSupplier);
return getDataTable(list);
}
/**
* 导出供应商功能信息列表
*/
@PreAuthorize("@ss.hasPermi('device:supplier:export')")
@Log(title = "供应商功能信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquSupplier equSupplier)
{
List<EquSupplier> list = equSupplierService.selectEquSupplierList(equSupplier);
ExcelUtil<EquSupplier> util = new ExcelUtil<EquSupplier>(EquSupplier.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
* 获取供应商功能信息详细信息
*/
@PreAuthorize("@ss.hasPermi('device:supplier:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(equSupplierService.selectEquSupplierById(id));
}
/**
* 新增供应商功能信息
*/
@PreAuthorize("@ss.hasPermi('device:supplier:add')")
@Log(title = "供应商功能信息", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation("新增供应商功能信息列表")
public AjaxResult add(@RequestBody EquSupplier equSupplier)
{
return toAjax(equSupplierService.insertEquSupplier(equSupplier));
}
/**
* 修改供应商功能信息
*/
@PreAuthorize("@ss.hasPermi('device:supplier:edit')")
@Log(title = "供应商功能信息", businessType = BusinessType.UPDATE)
@PutMapping
@ApiOperation("修改供应商功能信息列表")
public AjaxResult edit(@RequestBody EquSupplier equSupplier)
{
return toAjax(equSupplierService.updateEquSupplier(equSupplier));
}
/**
* 删除供应商功能信息
*/
@PreAuthorize("@ss.hasPermi('device:supplier:delete')")
@Log(title = "供应商功能信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@ApiOperation("删除供应商功能信息列表")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(equSupplierService.deleteEquSupplierByIds(ids));
}
}

@ -10,7 +10,10 @@ import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType; import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquType; import com.alops.system.domain.EquType;
import com.alops.system.domain.dto.EquTypeAddDto;
import com.alops.system.domain.dto.EquTypeUpdateDto;
import com.alops.system.service.IEquTypeService; import com.alops.system.service.IEquTypeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -30,7 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
* @date 2025-08-01 * @date 2025-08-01
*/ */
@RestController @RestController
@RequestMapping("/system/type") @RequestMapping("/device/deviceType")
public class EquTypeController extends BaseController public class EquTypeController extends BaseController
{ {
@Autowired @Autowired
@ -39,8 +42,9 @@ public class EquTypeController extends BaseController
/** /**
* 查询设备类型管理列表 * 查询设备类型管理列表
*/ */
@PreAuthorize("@ss.hasPermi('system:type:list')") @PreAuthorize("@ss.hasPermi('device:deviceType:query')")
@GetMapping("/list") @GetMapping("/query")
@ApiOperation("查询设备类型管理列表")
public TableDataInfo list(EquType equType) public TableDataInfo list(EquType equType)
{ {
startPage(); startPage();
@ -51,7 +55,7 @@ public class EquTypeController extends BaseController
/** /**
* 导出设备类型管理列表 * 导出设备类型管理列表
*/ */
@PreAuthorize("@ss.hasPermi('system:type:export')") @PreAuthorize("@ss.hasPermi('device:deviceType:export')")
@Log(title = "设备类型管理", businessType = BusinessType.EXPORT) @Log(title = "设备类型管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, EquType equType) public void export(HttpServletResponse response, EquType equType)
@ -64,41 +68,55 @@ public class EquTypeController extends BaseController
/** /**
* 获取设备类型管理详细信息 * 获取设备类型管理详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:type:query')") @PreAuthorize("@ss.hasPermi('device:deviceType:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
return success(equTypeService.selectEquTypeById(id)); return success(equTypeService.selectEquTypeById(id));
} }
/** /**
* 新增设备类型管理 * 新增设备类型管理
*/ */
@PreAuthorize("@ss.hasPermi('system:type:add')") @PreAuthorize("@ss.hasPermi('device:deviceType:add')")
@Log(title = "设备类型管理", businessType = BusinessType.INSERT) @Log(title = "设备类型管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping("/add")
public AjaxResult add(@RequestBody EquType equType) @ApiOperation("新增设备类型管理列表")
{ public AjaxResult add(@RequestBody EquTypeAddDto dto) {
if (dto == null) {
return AjaxResult.error("请求参数为空");
}
EquType equType = EquType.fromDto(dto);
return toAjax(equTypeService.insertEquType(equType)); return toAjax(equTypeService.insertEquType(equType));
} }
/** /**
* 修改设备类型管理 * 修改设备类型管理
*/ */
@PreAuthorize("@ss.hasPermi('system:type:edit')") @PreAuthorize("@ss.hasPermi('device:deviceType:modify')")
@Log(title = "设备类型管理", businessType = BusinessType.UPDATE) @Log(title = "设备类型管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping("/modify")
public AjaxResult edit(@RequestBody EquType equType) @ApiOperation("修改设备类型管理列表")
{ public AjaxResult edit(@RequestBody EquTypeUpdateDto dto) {
EquType equType = new EquType();
equType.setId(dto.getId());
equType.setName(dto.getName());
equType.setDescription(dto.getDescription());
equType.setImage(dto.getImage());
// ⚠ 不修改 createBy 和 createDate,保持原值
return toAjax(equTypeService.updateEquType(equType)); return toAjax(equTypeService.updateEquType(equType));
} }
/** /**
* 删除设备类型管理 * 删除设备类型管理
*/ */
@PreAuthorize("@ss.hasPermi('system:type:remove')") @PreAuthorize("@ss.hasPermi('device:deviceType:delete')")
@Log(title = "设备类型管理", businessType = BusinessType.DELETE) @Log(title = "设备类型管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除设备类型管理列表")
public AjaxResult remove(@PathVariable String[] ids) public AjaxResult remove(@PathVariable String[] ids)
{ {
return toAjax(equTypeService.deleteEquTypeByIds(ids)); return toAjax(equTypeService.deleteEquTypeByIds(ids));

@ -11,6 +11,7 @@ import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquVlan; import com.alops.system.domain.EquVlan;
import com.alops.system.service.IEquVlanService; import com.alops.system.service.IEquVlanService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -23,13 +24,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
/** /**
* 请填写功能名称Controller * EquVlanController
* *
* @author ruoyi * @author ruoyi
* @date 2025-08-15 * @date 2025-08-15
*/ */
@RestController @RestController
@RequestMapping("/system/vlan") @RequestMapping("/device/vlan")
public class EquVlanController extends BaseController public class EquVlanController extends BaseController
{ {
@Autowired @Autowired
@ -38,8 +39,8 @@ public class EquVlanController extends BaseController
/** /**
* 查询请填写功能名称列表 * 查询请填写功能名称列表
*/ */
@PreAuthorize("@ss.hasPermi('system:vlan:list')") @PreAuthorize("@ss.hasPermi('device:vlan:query')")
@GetMapping("/list") @GetMapping("/query")
public TableDataInfo list(EquVlan equVlan) public TableDataInfo list(EquVlan equVlan)
{ {
startPage(); startPage();
@ -47,10 +48,23 @@ public class EquVlanController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询单台的vlan信息列表
*/
@PreAuthorize("@ss.hasPermi('device:vlan:queryByEquId')")
@GetMapping("/ByEquId/{equId}")
@ApiOperation("获取界面Vlan信息")
public TableDataInfo listByEquId(@PathVariable("equId") String equId)
{
startPage();
List<EquVlan> list = equVlanService.selectEquVlanListByEquId(equId);
return getDataTable(list);
}
/** /**
* 导出请填写功能名称列表 * 导出请填写功能名称列表
*/ */
@PreAuthorize("@ss.hasPermi('system:vlan:export')") @PreAuthorize("@ss.hasPermi('device:vlan:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, EquVlan equVlan) public void export(HttpServletResponse response, EquVlan equVlan)
@ -63,7 +77,7 @@ public class EquVlanController extends BaseController
/** /**
* 获取请填写功能名称详细信息 * 获取请填写功能名称详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:vlan:query')") @PreAuthorize("@ss.hasPermi('device:vlan:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
@ -73,7 +87,7 @@ public class EquVlanController extends BaseController
/** /**
* 新增请填写功能名称 * 新增请填写功能名称
*/ */
@PreAuthorize("@ss.hasPermi('system:vlan:add')") @PreAuthorize("@ss.hasPermi('device:vlan:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody EquVlan equVlan) public AjaxResult add(@RequestBody EquVlan equVlan)
@ -84,7 +98,7 @@ public class EquVlanController extends BaseController
/** /**
* 修改请填写功能名称 * 修改请填写功能名称
*/ */
@PreAuthorize("@ss.hasPermi('system:vlan:edit')") @PreAuthorize("@ss.hasPermi('device:vlan:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody EquVlan equVlan) public AjaxResult edit(@RequestBody EquVlan equVlan)
@ -95,7 +109,7 @@ public class EquVlanController extends BaseController
/** /**
* 删除请填写功能名称 * 删除请填写功能名称
*/ */
@PreAuthorize("@ss.hasPermi('system:vlan:remove')") @PreAuthorize("@ss.hasPermi('device:vlan:delete')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) public AjaxResult remove(@PathVariable String[] ids)

@ -10,7 +10,11 @@ import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType; import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.AlertMessage; import com.alops.system.domain.AlertMessage;
import com.alops.system.domain.AlertRule;
import com.alops.system.domain.EquInterface;
import com.alops.system.domain.dto.AlertStatisticDto;
import com.alops.system.service.IAlertMessageService; import com.alops.system.service.IAlertMessageService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -35,9 +39,6 @@ public class AlertMessageController extends BaseController
@Autowired @Autowired
private IAlertMessageService alertMessageService; private IAlertMessageService alertMessageService;
/** /**
* 查询预警信息统计列表 * 查询预警信息统计列表
*/ */
@ -50,6 +51,33 @@ public class AlertMessageController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询界面预警信息+++
*/
@PreAuthorize("@ss.hasPermi('inMonitoring:alertMessage:listByEquId')")
@GetMapping("/{equId}")
@ApiOperation("获取界面ALlertMessage信息")
public TableDataInfo listByEquId(@PathVariable("equId")Long equId)
{
startPage();
List<AlertMessage> list = alertMessageService.selectAlertMessageListByEquId(equId);
return getDataTable(list);
}
/**
* 统计预警次数信息
*/
@PreAuthorize("@ss.hasPermi('inMonitoring:alertMessage:statistic')")
@GetMapping("/times")
@ApiOperation("统计预警次数信息")
public AjaxResult getAlertStatistic() {
AlertStatisticDto dto = alertMessageService.statisticAlert();
return AjaxResult.success(dto);
}
/** /**
* 导出 预警信息列表 * 导出 预警信息列表
*/ */
@ -67,12 +95,13 @@ public class AlertMessageController extends BaseController
* 获取预警信息 * 获取预警信息
*/ */
@PreAuthorize("@ss.hasPermi('system:message:query')") @PreAuthorize("@ss.hasPermi('system:message:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/query")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(Long id)
{ {
return success(alertMessageService.selectAlertMessageById(id)); return success(alertMessageService.selectAlertMessageById(id));
} }
/** /**
* 新增预警信息 * 新增预警信息
*/ */

@ -11,6 +11,7 @@ import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.LocalKnowledge; import com.alops.system.domain.LocalKnowledge;
import com.alops.system.service.ILocalKnowledgeService; import com.alops.system.service.ILocalKnowledgeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -30,7 +31,7 @@ import org.springframework.web.bind.annotation.RestController;
* @date 2025-08-01 * @date 2025-08-01
*/ */
@RestController @RestController
@RequestMapping("/system/knowledge") @RequestMapping("/knowBase")
public class LocalKnowledgeController extends BaseController public class LocalKnowledgeController extends BaseController
{ {
@Autowired @Autowired
@ -39,8 +40,9 @@ public class LocalKnowledgeController extends BaseController
/** /**
* 查询专家知识库列表 * 查询专家知识库列表
*/ */
@PreAuthorize("@ss.hasPermi('system:knowledge:list')") @PreAuthorize("@ss.hasPermi('intelligent:knowledge:query')")
@GetMapping("/list") @GetMapping("/query")
@ApiOperation("查询专家知识库列表")
public TableDataInfo list(LocalKnowledge localKnowledge) public TableDataInfo list(LocalKnowledge localKnowledge)
{ {
startPage(); startPage();
@ -51,7 +53,7 @@ public class LocalKnowledgeController extends BaseController
/** /**
* 导出专家知识库列表 * 导出专家知识库列表
*/ */
@PreAuthorize("@ss.hasPermi('system:knowledge:export')") @PreAuthorize("@ss.hasPermi('intelligent:knowledge:export')")
@Log(title = "专家知识库", businessType = BusinessType.EXPORT) @Log(title = "专家知识库", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, LocalKnowledge localKnowledge) public void export(HttpServletResponse response, LocalKnowledge localKnowledge)
@ -64,7 +66,7 @@ public class LocalKnowledgeController extends BaseController
/** /**
* 获取专家知识库详细信息 * 获取专家知识库详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:knowledge:query')") @PreAuthorize("@ss.hasPermi('intelligent:knowledge:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
@ -74,9 +76,10 @@ public class LocalKnowledgeController extends BaseController
/** /**
* 新增专家知识库 * 新增专家知识库
*/ */
@PreAuthorize("@ss.hasPermi('system:knowledge:add')") @PreAuthorize("@ss.hasPermi('intelligent:knowledge:add')")
@Log(title = "专家知识库", businessType = BusinessType.INSERT) @Log(title = "专家知识库", businessType = BusinessType.INSERT)
@PostMapping @PostMapping("/add")
@ApiOperation("新增专家知识库列表")
public AjaxResult add(@RequestBody LocalKnowledge localKnowledge) public AjaxResult add(@RequestBody LocalKnowledge localKnowledge)
{ {
return toAjax(localKnowledgeService.insertLocalKnowledge(localKnowledge)); return toAjax(localKnowledgeService.insertLocalKnowledge(localKnowledge));
@ -85,9 +88,10 @@ public class LocalKnowledgeController extends BaseController
/** /**
* 修改专家知识库 * 修改专家知识库
*/ */
@PreAuthorize("@ss.hasPermi('system:knowledge:edit')") @PreAuthorize("@ss.hasPermi('intelligent:knowledge:modify')")
@Log(title = "专家知识库", businessType = BusinessType.UPDATE) @Log(title = "专家知识库", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping("/modify")
@ApiOperation("修改专家知识库列表")
public AjaxResult edit(@RequestBody LocalKnowledge localKnowledge) public AjaxResult edit(@RequestBody LocalKnowledge localKnowledge)
{ {
return toAjax(localKnowledgeService.updateLocalKnowledge(localKnowledge)); return toAjax(localKnowledgeService.updateLocalKnowledge(localKnowledge));
@ -96,9 +100,10 @@ public class LocalKnowledgeController extends BaseController
/** /**
* 删除专家知识库 * 删除专家知识库
*/ */
@PreAuthorize("@ss.hasPermi('system:knowledge:remove')") @PreAuthorize("@ss.hasPermi('intelligent:knowledge:delete')")
@Log(title = "专家知识库", businessType = BusinessType.DELETE) @Log(title = "专家知识库", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除专家知识库列表")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(localKnowledgeService.deleteLocalKnowledgeByIds(ids)); return toAjax(localKnowledgeService.deleteLocalKnowledgeByIds(ids));

@ -11,6 +11,7 @@ import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquInterface; import com.alops.system.domain.EquInterface;
import com.alops.system.service.IEquInterfaceService; import com.alops.system.service.IEquInterfaceService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -46,7 +47,17 @@ public class EquInterfaceController extends BaseController
List<EquInterface> list = equInterfaceService.selectEquInterfaceList(equInterface); List<EquInterface> list = equInterfaceService.selectEquInterfaceList(equInterface);
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询界面详细信息---
*/
// @PreAuthorize("@ss.hasPermi('system:interface:list')")
//@GetMapping("/list")
// public TableDataInfo listByEquID(String equID)
// {
// startPage();
// List<EquInterface> list = equInterfaceService.selectEquInterfaceListByEquID(equID);
// return getDataTable(list);
// }
/** /**
* 导出端口运行状态列表 * 导出端口运行状态列表
*/ */
@ -64,12 +75,25 @@ public class EquInterfaceController extends BaseController
* 获取端口运行状态详细信息 * 获取端口运行状态详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:interface:query')") @PreAuthorize("@ss.hasPermi('system:interface:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/query/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
return success(equInterfaceService.selectEquInterfaceById(id)); return success(equInterfaceService.selectEquInterfaceById(id));
} }
/**
* 查询界面详细信息----
*/
@PreAuthorize("@ss.hasPermi('device:interface:listByEquId')")
@GetMapping("/{equID}")
@ApiOperation("获取界面Interface接口信息")
public TableDataInfo listByEquID(@PathVariable("equID") String equID)
{
startPage();
List<EquInterface> list = equInterfaceService.selectEquInterfaceListByEquID(equID);
return getDataTable(list);
}
/** /**
* 新增端口运行状态 * 新增端口运行状态
*/ */

@ -11,6 +11,7 @@ import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquRouting; import com.alops.system.domain.EquRouting;
import com.alops.system.service.IEquRoutingService; import com.alops.system.service.IEquRoutingService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -47,6 +48,18 @@ public class EquRoutingController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询路由界面详细信息+++
*/
@PreAuthorize("@ss.hasPermi('device:routing:listByEquId')")
@GetMapping("/{equId}")
@ApiOperation("获取界面Routing信息")
public TableDataInfo listByEquId(@PathVariable("equId") String equId)
{
startPage();
List<EquRouting> list = equRoutingService.selectEquRoutingListByEquId(equId);
return getDataTable(list);
}
/** /**
* 导出路由信息列表 * 导出路由信息列表
*/ */
@ -64,7 +77,7 @@ public class EquRoutingController extends BaseController
* 获取路由信息详细信息 * 获取路由信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:routing:query')") @PreAuthorize("@ss.hasPermi('system:routing:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/query/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
return success(equRoutingService.selectEquRoutingById(id)); return success(equRoutingService.selectEquRoutingById(id));

@ -11,6 +11,7 @@ import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil; import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquVeneer; import com.alops.system.domain.EquVeneer;
import com.alops.system.service.IEquVeneerService; import com.alops.system.service.IEquVeneerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -47,6 +48,19 @@ public class EquVeneerController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询界面信息+++
*/
@PreAuthorize("@ss.hasPermi('device:veneer:listByEquId')")
@GetMapping("/{equID}")
@ApiOperation("获取界面Venerr信息")
public TableDataInfo listByEquId(@PathVariable("equID") String equID)
{
startPage();
List<EquVeneer> list = equVeneerService.selectEquVeneerListByEquId(equID);
return getDataTable(list);
}
/** /**
* 导出请填写功能名称列表 * 导出请填写功能名称列表
*/ */
@ -64,7 +78,7 @@ public class EquVeneerController extends BaseController
* 获取请填写功能名称详细信息 * 获取请填写功能名称详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:veneer:query')") @PreAuthorize("@ss.hasPermi('system:veneer:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/query/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
return success(equVeneerService.selectEquVeneerById(id)); return success(equVeneerService.selectEquVeneerById(id));

@ -114,7 +114,7 @@ public class SecurityConfig
requests.antMatchers("/login", "/register", "/captchaImage").permitAll() requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/swagger-ui/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated(); .anyRequest().authenticated();
}) })

@ -36,7 +36,12 @@
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
<version>2.5.15</version> <version>2.5.15</version>
</dependency> </dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.2</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>

@ -1,10 +1,12 @@
package com.alops.system.domain; package com.alops.system.domain;
import com.alops.system.domain.dto.EquManuAddDto;
import java.util.Date; import java.util.Date;
import com.alops.common.annotation.Excel; import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity; import com.alops.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@ -14,7 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author ruoyi * @author ruoyi
* @date 2025-08-01 * @date 2025-08-01
*/ */
public class EquManu extends BaseEntity public class EquManu
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -31,21 +33,47 @@ public class EquManu extends BaseEntity
/** 联系人ID */ /** 联系人ID */
@Excel(name = "联系人ID") @Excel(name = "联系人ID")
private Long contactBy; private String contactBy;
/** 联系方式 */ /** 联系方式 */
@Excel(name = "联系方式") @Excel(name = "联系方式")
private String contactWay; private String contactWay;
/** 添加日期 */ /** 添加日期 */
//@JsonIgnore
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDate; private Date createDate;
/** 状态(0-禁用,1-启用) */ /** 状态(0-禁用,1-启用) */
@Excel(name = "状态(0-禁用,1-启用)") @Excel(name = "状态(0-禁用,1-启用)")
private Long status; private Long status;
//@JsonIgnore
private String createBy; // 新增
public EquManu() {}
public static EquManu fromDto(EquManuAddDto dto) {
if (dto == null) {
return null;
}
EquManu equManu = new EquManu();
if (dto.getContactBy() != null) {
equManu.setContactBy(dto.getContactBy());
}
equManu.setContactWay(dto.getContactWay());
equManu.setDescription(dto.getDescription());
equManu.setName(dto.getName());
if (dto.getStatus() != null) {
equManu.setStatus(dto.getStatus().longValue());
}
return equManu;
}
public void setId(String id) public void setId(String id)
{ {
this.id = id; this.id = id;
@ -76,12 +104,12 @@ public class EquManu extends BaseEntity
return description; return description;
} }
public void setContactBy(Long contactBy) public void setContactBy(String contactBy)
{ {
this.contactBy = contactBy; this.contactBy = contactBy;
} }
public Long getContactBy() public String getContactBy()
{ {
return contactBy; return contactBy;
} }
@ -116,6 +144,14 @@ public class EquManu extends BaseEntity
return status; return status;
} }
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -129,4 +165,5 @@ public class EquManu extends BaseEntity
.append("status", getStatus()) .append("status", getStatus())
.toString(); .toString();
} }
} }

@ -20,6 +20,8 @@ public class EquRouting extends BaseEntity
/** 主键 */ /** 主键 */
private String id; private String id;
private String equId;
/** 设备采集id */ /** 设备采集id */
@Excel(name = "设备采集id") @Excel(name = "设备采集id")
private String equGatherId; private String equGatherId;
@ -46,6 +48,14 @@ public class EquRouting extends BaseEntity
return id; return id;
} }
public String getEquId() {
return equId;
}
public void setEquId(String equId) {
this.equId = equId;
}
public void setEquGatherId(String equGatherId) public void setEquGatherId(String equGatherId)
{ {
this.equGatherId = equGatherId; this.equGatherId = equGatherId;

@ -0,0 +1,147 @@
package com.alops.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 供应商功能 对象 equ_supplier
*
* @author ruoyi
* @date 2025-09-20
*/
public class EquSupplier
{
private static final long serialVersionUID = 1L;
/** 供应商id */
private String id;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String name;
/** 供应商简介 */
@Excel(name = "供应商简介")
private String description;
/** 联系人姓名 */
@Excel(name = "联系人姓名")
private String contactBy;
/** l联系方式 */
@Excel(name = "l联系方式")
private String contactWay;
/** 状态(0禁1启用) */
@Excel(name = "状态", readConverterExp = "0=禁1启用")
private Long status;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setContactBy(String contactBy)
{
this.contactBy = contactBy;
}
public String getContactBy()
{
return contactBy;
}
public void setContactWay(String contactWay)
{
this.contactWay = contactWay;
}
public String getContactWay()
{
return contactWay;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
public String getCreateBy()
{
return createBy;
}
public void setCreateBy(String createBy)
{
this.createBy = createBy;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("description", getDescription())
.append("contactBy", getContactBy())
.append("contactWay", getContactWay())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("status", getStatus())
.toString();
}
}

@ -5,6 +5,8 @@ import java.util.Date;
import com.alops.common.annotation.Excel; import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity; import com.alops.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@ -14,7 +16,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author ruoyi * @author ruoyi
* @date 2025-08-01 * @date 2025-08-01
*/ */
public class EquType extends BaseEntity @Data
public class EquType
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -34,10 +37,25 @@ public class EquType extends BaseEntity
private String image; private String image;
/** 添加日期 */ /** 添加日期 */
//@JsonIgnore
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDate; private Date createDate;
//@JsonIgnore
private String createBy;
public EquType() {}
// DTO → Entity 显式转换方法
public static EquType fromDto(com.alops.system.domain.dto.EquTypeAddDto dto) {
EquType equType = new EquType();
equType.setDescription(dto.getDescription());
equType.setImage(dto.getImage());
equType.setName(dto.getName());
return equType;
}
public void setId(String id) public void setId(String id)
{ {
this.id = id; this.id = id;
@ -88,7 +106,15 @@ public class EquType extends BaseEntity
return createDate; return createDate;
} }
@Override public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
@Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())

@ -23,6 +23,7 @@ public class EquVeneer extends BaseEntity
/** 设备的一个单板的运行id */ /** 设备的一个单板的运行id */
@Excel(name = "设备的一个单板的运行id") @Excel(name = "设备的一个单板的运行id")
private String veneerId; private String veneerId;
private String equId;
/** 单板运行状态校准值(Online/Offline/Fault) */ /** 单板运行状态校准值(Online/Offline/Fault) */
@Excel(name = "单板运行状态校准值", readConverterExp = "O=nline/Offline/Fault") @Excel(name = "单板运行状态校准值", readConverterExp = "O=nline/Offline/Fault")
@ -42,6 +43,14 @@ public class EquVeneer extends BaseEntity
return id; return id;
} }
public String getEquId() {
return equId;
}
public void setEquId(String equId) {
this.equId = equId;
}
public void setVeneerId(String veneerId) public void setVeneerId(String veneerId)
{ {
this.veneerId = veneerId; this.veneerId = veneerId;

@ -2,24 +2,31 @@ package com.alops.system.domain;
import com.alops.common.annotation.Excel; import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity; import com.alops.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
/** /**
* 请填写功能名称对象 equ_vlan * 对象 equ_vlan
* *
* @author ruoyi * @author ruoyi
* @date 2025-08-15 * @date 2025-08-15
*/ */
public class EquVlan extends BaseEntity public class EquVlan
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键 */ /** 主键 */
private String id; private String id;
/** 设备id */
@Excel(name = "设备id")
private String equId;
/** 采集ID */ /** 采集ID */
@Excel(name = "采集ID") @Excel(name = "采集ID")
private String equGatherId; private String equGatherId;
@ -40,6 +47,16 @@ public class EquVlan extends BaseEntity
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String vlanId; private String vlanId;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新者 */
private String updateBy;
public void setId(String id) public void setId(String id)
{ {
this.id = id; this.id = id;
@ -49,6 +66,15 @@ public class EquVlan extends BaseEntity
{ {
return id; return id;
} }
public void setEquId(String equId)
{
this.equId = equId;
}
public String getEquId()
{
return equId;
}
public void setEquGatherId(String equGatherId) public void setEquGatherId(String equGatherId)
{ {
@ -100,6 +126,38 @@ public class EquVlan extends BaseEntity
return vlanId; return vlanId;
} }
public String getCreateBy()
{
return createBy;
}
public void setCreateBy(String createBy)
{
this.createBy = createBy;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public String getUpdateBy()
{
return updateBy;
}
public void setUpdateBy(String updateBy)
{
this.updateBy = updateBy;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -0,0 +1,22 @@
package com.alops.system.domain.dto;
import lombok.Data;
import java.util.Map;
/**
* 预警统计 DTO
*/
@Data
public class AlertStatisticDto {
// 按设备类型统计
private Map<String, Integer> typeCount;
// 按等级统计
private Map<Integer, Integer> levelCount;
// 本年度预警次数
private Integer yearCount;
// 本月预警次数
private Integer monthCount;
}

@ -1,6 +1,7 @@
package com.alops.system.domain.dto; package com.alops.system.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -9,10 +10,13 @@ import java.util.Date;
/** /**
* 设备查询条件 DTO * 设备查询条件 DTO
*/ */
@Data
public class EquBaseQueryDto implements Serializable { public class EquBaseQueryDto implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String id;
/** 设备类型 (equ_type, varchar) */ /** 设备类型 (equ_type, varchar) */
private String equType; private String equType;
@ -41,7 +45,6 @@ public class EquBaseQueryDto implements Serializable {
/** 状态 (status, tinyint) */ /** 状态 (status, tinyint) */
private Integer status; private Integer status;
// ====== Getter 和 Setter ====== // ====== Getter 和 Setter ======
public String getEquType() { public String getEquType() {
return equType; return equType;

@ -0,0 +1,66 @@
package com.alops.system.domain.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("设备厂商新增DTO")
public class EquManuAddDto {
@ApiModelProperty("厂商名称")
private String name;
@ApiModelProperty("厂商描述")
private String description;
@ApiModelProperty("联系人名称")
private String contactBy ;
@ApiModelProperty("联系人方式,")
private String contactWay ;
@ApiModelProperty("状态")
private Integer status = 1;
// ===== Getter & Setter =====
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getContactBy() {
return contactBy;
}
public void setContactBy(String contactBy) {
this.contactBy = contactBy;
}
public String getContactWay() {
return contactWay;
}
public void setContactWay(String contactWay) {
this.contactWay = contactWay;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}

@ -0,0 +1,72 @@
package com.alops.system.domain.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("设备厂商修改DTO")
public class EquManuUpdateDto {
@ApiModelProperty("厂商ID")
private String id;
@ApiModelProperty("厂商名称")
private String name;
@ApiModelProperty("厂商描述")
private String description;
@ApiModelProperty("联系人名称")
private String contactBy;
@ApiModelProperty("联系人方式")
private String contactWay;
@ApiModelProperty("状态")
private Integer status;
// ===== Getter & Setter =====
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getContactBy() {
return contactBy;
}
public void setContactBy(String contactBy) {
this.contactBy = contactBy;
}
public String getContactWay() {
return contactWay;
}
public void setContactWay(String contactWay) {
this.contactWay = contactWay;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}

@ -0,0 +1,46 @@
package com.alops.system.domain.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("新增设备类型参数")
public class EquTypeAddDto {
@ApiModelProperty("设备类型简介")
private String description;
@ApiModelProperty("设备图片地址")
private String image;
@ApiModelProperty("设备类型名称")
private String name;
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,49 @@
package com.alops.system.domain.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("设备类型修改DTO")
public class EquTypeUpdateDto {
@ApiModelProperty("类型ID")
private String id;
@ApiModelProperty("设备类型名称")
private String name;
@ApiModelProperty("设备类型简介")
private String description;
@ApiModelProperty("设备图片存储地址")
private String image;
@ApiModelProperty("状态") // 如果EquType有status字段,可以加上
private Integer status;
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,15 @@
package com.alops.system.domain.dto;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class MonitorHistoryDto {
// 返回给前端的字段
private List<Float> temperatureList = new ArrayList<>();
private List<Float> involtageList = new ArrayList<>();
private List<Float> outvoltageList = new ArrayList<>();
private List<String> timeList = new ArrayList<>();
}

@ -0,0 +1,37 @@
package com.alops.system.domain.dto;
import lombok.Data;
import java.util.Date;
@Data
public class MonitorLastDto {
// equ_gather 表
private Integer contWorkPeriod;
private Float fanSpeed;
private Float cpuUtilization;
private Float memoryUtilization;
private String health;
// equ_base 表
private Long id;
private String name;
private String version;
private String deviceLevel;
private String ip;
private String location;
private Date installDate;
private String inCharge;
private Integer failureFrequency;
private Integer warranty;
// equ_type
private String equType;
// equ_manu
private String manufacture;
private String manufactureContactBy;
private String manufactureContactWay;
// equ_supplier
private String supplierId;
}

@ -0,0 +1,25 @@
package com.alops.system.domain.dto;
import lombok.Data;
import java.sql.Blob;
/**
* 显示多台设备监测信息单个的信息 DTO
*/
@Data
public class MonitorListDto {
private String id;
private String name;
private String version;
private String deviceLevel;
private String location;
private String status;
private Integer failureFrequency;
private Blob equImage;
// 监控指标
private Float cpuUtilization;
private String health;
private Integer fanSpeed;
}

@ -0,0 +1,19 @@
package com.alops.system.domain.dto;
import lombok.Data;
import java.util.List;
/**
* 按设备类型统计 DTO
*/
@Data
public class MonitorStatisticDto {
private String equTypeId; // 设备类型ID 或 名称
private String equTypeName; // 设备类型名称
private List<DeviceSimpleInfo> devices; // 属于该类型的设备列表
@Data
public static class DeviceSimpleInfo {
private String id;
private String name;
}
}

@ -0,0 +1,25 @@
package com.alops.system.domain.vo;
import com.alops.system.domain.*;
import lombok.Data;
import java.util.ArrayList;
@Data
public class EquMonitorVO extends EquBase {
/** 设备类型 */
/**风扇转速**/
private Float fanSpeed;
private Float cpuUtilization;
private String contWorkPeriod;
/**设备温度**/
private ArrayList<Float> temperatureList;
/**设备输入电压**/
private ArrayList<Float> involtageList;
/**设备输出电压**/
private ArrayList<Float> outvoltageList;
private Float health;
private Float aging;
private Float memoryUtilization;
}

@ -1,64 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.AlarmRule;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 预警规则Mapper接口
*
* @author ruoyi
* @date 2025-08-01
*/
@Mapper
public interface AlarmRuleMapper
{
/**
* 查询预警规则
*
* @param id 预警规则主键
* @return 预警规则
*/
public AlarmRule selectAlarmRuleById(Long id);
/**
* 查询预警规则列表
*
* @param alarmRule 预警规则
* @return 预警规则集合
*/
public List<AlarmRule> selectAlarmRuleList(AlarmRule alarmRule);
/**
* 新增预警规则
*
* @param alarmRule 预警规则
* @return 结果
*/
public int insertAlarmRule(AlarmRule alarmRule);
/**
* 修改预警规则
*
* @param alarmRule 预警规则
* @return 结果
*/
public int updateAlarmRule(AlarmRule alarmRule);
/**
* 删除预警规则
*
* @param id 预警规则主键
* @return 结果
*/
public int deleteAlarmRuleById(Long id);
/**
* 批量删除预警规则
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteAlarmRuleByIds(Long[] ids);
}

@ -2,9 +2,11 @@ package com.alops.system.mapper;
import com.alops.system.domain.AlertMessage; import com.alops.system.domain.AlertMessage;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param; import org.apache.ibatis.annotations.Param;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 故障统计Mapper接口 * 故障统计Mapper接口
@ -38,6 +40,16 @@ public interface AlertMessageMapper
* @return 故障统计集合 * @return 故障统计集合
*/ */
public List<AlertMessage> selectAlertMessageList(AlertMessage alertMessage); public List<AlertMessage> selectAlertMessageList(AlertMessage alertMessage);
public ArrayList<AlertMessage> selectAlertMessageByEquId(Long Equid);
/**
* 统计设备类型预警等级时间的预警次数
**/
List<Map<String, Object>> countByType();
List<Map<String, Object>> countByLevel();
int countByYear(@Param("year") int year);
int countByMonth(@Param("year") int year, @Param("month") int month);
/** /**
* 新增故障统计 * 新增故障统计

@ -1,12 +1,13 @@
package com.alops.system.mapper; package com.alops.system.mapper;
import com.alops.system.domain.EquBase; import com.alops.system.domain.EquBase;
import com.alops.system.domain.dto.EquBaseQueryDto; import com.alops.system.domain.dto.*;
import com.alops.system.domain.vo.queryEquBaseVO; import com.alops.system.domain.vo.queryEquBaseVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.Update;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
@ -38,6 +39,15 @@ public interface EquBaseMapper
*/ */
public EquBase selectEquBaseById(String id); public EquBase selectEquBaseById(String id);
/**查询界面具体信息 -YY**/
MonitorLastDto selectEquMonitorById(String id);
List<Map<String, Object>> selectEquMonitorByIdToList(EquBaseQueryDto queryDto);
List<MonitorListDto> selectEquMonitorList(EquBaseQueryDto equBaseQueryDto);
/**分类统计界面信息 -YY**/
List<MonitorStatisticDto> selectEquStatisticByType();
/** /**
* 查询设备基本信息和厂商信息 * 查询设备基本信息和厂商信息
* *

@ -3,6 +3,7 @@ package com.alops.system.mapper;
import com.alops.system.domain.EquInterface; import com.alops.system.domain.EquInterface;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -26,7 +27,8 @@ public interface EquInterfaceMapper
* @return 端口运行状态 * @return 端口运行状态
*/ */
public EquInterface selectEquInterfaceById(String id); public EquInterface selectEquInterfaceById(String id);
/**查询界面信息**/
public ArrayList<EquInterface> selectEquInterfaceByEquId(String equId);
/** /**
* 查询端口运行状态列表 * 查询端口运行状态列表
* *

@ -3,6 +3,7 @@ package com.alops.system.mapper;
import com.alops.system.domain.EquRouting; import com.alops.system.domain.EquRouting;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -23,6 +24,7 @@ public interface EquRoutingMapper
*/ */
public EquRouting selectEquRoutingById(String id); public EquRouting selectEquRoutingById(String id);
/** /**
* 查询路由信息列表 * 查询路由信息列表
* *
@ -31,6 +33,7 @@ public interface EquRoutingMapper
*/ */
public List<EquRouting> selectEquRoutingList(EquRouting equRouting); public List<EquRouting> selectEquRoutingList(EquRouting equRouting);
public ArrayList<EquRouting> selectEquRoutingListByEquId(String equId);
/** /**
* 新增路由信息 * 新增路由信息
* *

@ -0,0 +1,63 @@
package com.alops.system.mapper;
import java.util.List;
import com.alops.system.domain.EquSupplier;
import org.apache.ibatis.annotations.Mapper;
/**
* 请填写功能名称Mapper接口
*
* @author ruoyi
* @date 2025-09-20
*/
@Mapper
public interface EquSupplierMapper
{
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public EquSupplier selectEquSupplierById(String id);
/**
* 查询请填写功能名称列表
*
* @param equSupplier 请填写功能名称
* @return 请填写功能名称集合
*/
public List<EquSupplier> selectEquSupplierList(EquSupplier equSupplier);
/**
* 新增请填写功能名称
*
* @param equSupplier 请填写功能名称
* @return 结果
*/
public int insertEquSupplier(EquSupplier equSupplier);
/**
* 修改请填写功能名称
*
* @param equSupplier 请填写功能名称
* @return 结果
*/
public int updateEquSupplier(EquSupplier equSupplier);
/**
* 删除请填写功能名称
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteEquSupplierById(String id);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEquSupplierByIds(String[] ids);
}

@ -3,6 +3,7 @@ package com.alops.system.mapper;
import com.alops.system.domain.EquVeneer; import com.alops.system.domain.EquVeneer;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -31,6 +32,7 @@ public interface EquVeneerMapper
* @return 请填写功能名称集合 * @return 请填写功能名称集合
*/ */
public List<EquVeneer> selectEquVeneerList(EquVeneer equVeneer); public List<EquVeneer> selectEquVeneerList(EquVeneer equVeneer);
public ArrayList<EquVeneer> selectEquVeneerListByEquId(String equId);
/** /**
* 新增请填写功能名称 * 新增请填写功能名称

@ -32,7 +32,7 @@ public interface EquVlanMapper
* @return 请填写功能名称集合 * @return 请填写功能名称集合
*/ */
public List<EquVlan> selectEquVlanList(EquVlan equVlan); public List<EquVlan> selectEquVlanList(EquVlan equVlan);
public List<EquVlan> selectEquVlanListByEquId(String equId);
/** /**
* 新增请填写功能名称 * 新增请填写功能名称
* *

@ -1,65 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.FauSta;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 故障统计Mapper接口
*
* @author ruoyi
* @date 2025-08-01
*/
@Mapper
public interface FauStaMapper
{
/**
* 查询故障统计
*
* @param id 故障统计主键
* @return 故障统计
*/
public FauSta selectFauStaById(Long id);
/**
* 查询故障统计列表
*
* @param fauSta 故障统计
* @return 故障统计集合
*/
public List<FauSta> selectFauStaList(FauSta fauSta);
/**
* 新增故障统计
*
* @param fauSta 故障统计
* @return 结果
*/
public int insertFauSta(FauSta fauSta);
/**
* 修改故障统计
*
* @param fauSta 故障统计
* @return 结果
*/
public int updateFauSta(FauSta fauSta);
/**
* 删除故障统计
*
* @param id 故障统计主键
* @return 结果
*/
public int deleteFauStaById(Long id);
/**
* 批量删除故障统计
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteFauStaByIds(Long[] ids);
}

@ -1,62 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.AlarmRule;
import java.util.List;
/**
* 预警规则Service接口
*
* @author ruoyi
* @date 2025-08-01
*/
public interface IAlarmRuleService
{
/**
* 查询预警规则
*
* @param id 预警规则主键
* @return 预警规则
*/
public AlarmRule selectAlarmRuleById(Long id);
/**
* 查询预警规则列表
*
* @param alarmRule 预警规则
* @return 预警规则集合
*/
public List<AlarmRule> selectAlarmRuleList(AlarmRule alarmRule);
/**
* 新增预警规则
*
* @param alarmRule 预警规则
* @return 结果
*/
public int insertAlarmRule(AlarmRule alarmRule);
/**
* 修改预警规则
*
* @param alarmRule 预警规则
* @return 结果
*/
public int updateAlarmRule(AlarmRule alarmRule);
/**
* 批量删除预警规则
*
* @param ids 需要删除的预警规则主键集合
* @return 结果
*/
public int deleteAlarmRuleByIds(Long[] ids);
/**
* 删除预警规则信息
*
* @param id 预警规则主键
* @return 结果
*/
public int deleteAlarmRuleById(Long id);
}

@ -1,6 +1,7 @@
package com.alops.system.service; package com.alops.system.service;
import com.alops.system.domain.AlertMessage; import com.alops.system.domain.AlertMessage;
import com.alops.system.domain.dto.AlertStatisticDto;
import java.util.List; import java.util.List;
@ -20,6 +21,7 @@ public interface IAlertMessageService
*/ */
public AlertMessage selectAlertMessageById(Long id); public AlertMessage selectAlertMessageById(Long id);
/** /**
* 查询故障统计列表 * 查询故障统计列表
* *
@ -28,6 +30,13 @@ public interface IAlertMessageService
*/ */
public List<AlertMessage> selectAlertMessageList(AlertMessage alertMessage); public List<AlertMessage> selectAlertMessageList(AlertMessage alertMessage);
public List<AlertMessage> selectAlertMessageListByEquId(Long equId);
/**
* 统计设备类型预警等级时间的预警次数
**/
AlertStatisticDto statisticAlert();
/** /**
* 新增故障统计 * 新增故障统计
* *

@ -1,7 +1,7 @@
package com.alops.system.service; package com.alops.system.service;
import com.alops.system.domain.EquBase; import com.alops.system.domain.EquBase;
import com.alops.system.domain.dto.EquBaseQueryDto; import com.alops.system.domain.dto.*;
import com.alops.system.domain.vo.queryEquBaseVO; import com.alops.system.domain.vo.queryEquBaseVO;
import java.util.List; import java.util.List;
@ -21,7 +21,26 @@ public interface IEquBaseService
* @param id 设备基本信息主键 * @param id 设备基本信息主键
* @return 设备基本信息 * @return 设备基本信息
*/ */
public EquBase selectEquBaseById(String id); public EquBase selectEquBaseById(String id);
/**查询界面具体信息**/
// EquMonitorVO selectEquMonitorInfo(EquBaseQueryDto queryDto);
/**
* 获取设备最新的监控信息快照
*
* @param id 设备ID
* @return 包含最新单条监控数据的设备VO
*/
MonitorLastDto selectLatestEquMonitorInfo(String id);
/**
* 获取设备在指定时间段内的历史监控信息
*
* @param queryDto 包含设备ID和时间范围的查询参数
* @return 包含监控数据列表的设备VO
*/
MonitorHistoryDto selectHistoricalEquMonitorInfo(EquBaseQueryDto queryDto);
/** /**
* 查询设备基本信息列表 * 查询设备基本信息列表
@ -31,7 +50,12 @@ public interface IEquBaseService
*/ */
public List<queryEquBaseVO> selectEquBaseList(EquBaseQueryDto equBaseQueryDto); public List<queryEquBaseVO> selectEquBaseList(EquBaseQueryDto equBaseQueryDto);
/** public List<MonitorListDto> selectEquMonitorList(EquBaseQueryDto equBaseQueryDto);
/**分类统计信息**/
List<MonitorStatisticDto> selectEquStatisticByType();
/**
* 新增设备基本信息 * 新增设备基本信息
* *
* @param equBase 设备基本信息 * @param equBase 设备基本信息
@ -62,4 +86,5 @@ public interface IEquBaseService
* @return 结果 * @return 结果
*/ */
public int deleteEquBaseById(String id); public int deleteEquBaseById(String id);
}
}

@ -3,6 +3,7 @@ package com.alops.system.service;
import com.alops.system.domain.EquInterface; import com.alops.system.domain.EquInterface;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -30,6 +31,7 @@ public interface IEquInterfaceService
*/ */
public List<EquInterface> selectEquInterfaceList(EquInterface equInterface); public List<EquInterface> selectEquInterfaceList(EquInterface equInterface);
public List<EquInterface> selectEquInterfaceListByEquID(String equID);
/** /**
* 新增端口运行状态 * 新增端口运行状态
* *

@ -28,6 +28,8 @@ public interface IEquRoutingService
*/ */
public List<EquRouting> selectEquRoutingList(EquRouting equRouting); public List<EquRouting> selectEquRoutingList(EquRouting equRouting);
public List<EquRouting> selectEquRoutingListByEquId(String equId);
/** /**
* 新增路由信息 * 新增路由信息
* *

@ -0,0 +1,61 @@
package com.alops.system.service;
import java.util.List;
import com.alops.system.domain.EquSupplier;
/**
* 请填写功能名称Service接口
*
* @author ruoyi
* @date 2025-09-20
*/
public interface IEquSupplierService
{
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public EquSupplier selectEquSupplierById(String id);
/**
* 查询请填写功能名称列表
*
* @param equSupplier 请填写功能名称
* @return 请填写功能名称集合
*/
public List<EquSupplier> selectEquSupplierList(EquSupplier equSupplier);
/**
* 新增请填写功能名称
*
* @param equSupplier 请填写功能名称
* @return 结果
*/
public int insertEquSupplier(EquSupplier equSupplier);
/**
* 修改请填写功能名称
*
* @param equSupplier 请填写功能名称
* @return 结果
*/
public int updateEquSupplier(EquSupplier equSupplier);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键集合
* @return 结果
*/
public int deleteEquSupplierByIds(String[] ids);
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteEquSupplierById(String id);
}

@ -27,6 +27,7 @@ public interface IEquVeneerService
* @return 请填写功能名称集合 * @return 请填写功能名称集合
*/ */
public List<EquVeneer> selectEquVeneerList(EquVeneer equVeneer); public List<EquVeneer> selectEquVeneerList(EquVeneer equVeneer);
public List<EquVeneer> selectEquVeneerListByEquId(String equId);
/** /**
* 新增请填写功能名称 * 新增请填写功能名称

@ -27,7 +27,7 @@ public interface IEquVlanService
* @return 请填写功能名称集合 * @return 请填写功能名称集合
*/ */
public List<EquVlan> selectEquVlanList(EquVlan equVlan); public List<EquVlan> selectEquVlanList(EquVlan equVlan);
public List<EquVlan> selectEquVlanListByEquId(String equId);
/** /**
* 新增请填写功能名称 * 新增请填写功能名称
* *

@ -1,98 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.common.utils.DateUtils;
import com.alops.system.domain.AlarmRule;
import com.alops.system.mapper.AlarmRuleMapper;
import com.alops.system.service.IAlarmRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 预警规则Service业务层处理
*
* @author ruoyi
* @date 2025-08-01
*/
@Service
public class AlarmRuleServiceImpl implements IAlarmRuleService
{
@Autowired
private AlarmRuleMapper alarmRuleMapper;
/**
* 查询预警规则
*
* @param id 预警规则主键
* @return 预警规则
*/
@Override
public AlarmRule selectAlarmRuleById(Long id)
{
return alarmRuleMapper.selectAlarmRuleById(id);
}
/**
* 查询预警规则列表
*
* @param alarmRule 预警规则
* @return 预警规则
*/
@Override
public List<AlarmRule> selectAlarmRuleList(AlarmRule alarmRule)
{
return alarmRuleMapper.selectAlarmRuleList(alarmRule);
}
/**
* 新增预警规则
*
* @param alarmRule 预警规则
* @return 结果
*/
@Override
public int insertAlarmRule(AlarmRule alarmRule)
{
alarmRule.setCreateTime(DateUtils.getNowDate());
return alarmRuleMapper.insertAlarmRule(alarmRule);
}
/**
* 修改预警规则
*
* @param alarmRule 预警规则
* @return 结果
*/
@Override
public int updateAlarmRule(AlarmRule alarmRule)
{
return alarmRuleMapper.updateAlarmRule(alarmRule);
}
/**
* 批量删除预警规则
*
* @param ids 需要删除的预警规则主键
* @return 结果
*/
@Override
public int deleteAlarmRuleByIds(Long[] ids)
{
return alarmRuleMapper.deleteAlarmRuleByIds(ids);
}
/**
* 删除预警规则信息
*
* @param id 预警规则主键
* @return 结果
*/
@Override
public int deleteAlarmRuleById(Long id)
{
return alarmRuleMapper.deleteAlarmRuleById(id);
}
}

@ -1,8 +1,13 @@
package com.alops.system.service.impl; package com.alops.system.service.impl;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import com.alops.system.domain.AlertMessage; import com.alops.system.domain.AlertMessage;
import com.alops.system.domain.dto.AlertStatisticDto;
import com.alops.system.mapper.AlertMessageMapper; import com.alops.system.mapper.AlertMessageMapper;
import com.alops.system.service.IAlertMessageService; import com.alops.system.service.IAlertMessageService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -44,7 +49,46 @@ public class AlertMessageServiceImpl implements IAlertMessageService
return alertMessageMapper.selectAlertMessageList(alertMessage); return alertMessageMapper.selectAlertMessageList(alertMessage);
} }
@Override
public List<AlertMessage> selectAlertMessageListByEquId(Long equId)
{
ArrayList<AlertMessage> alertMessagelist = alertMessageMapper.selectAlertMessageByEquId(equId);
return alertMessagelist;
}
/** /**
* 统计设备类型预警等级时间的预警次数
**/
@Override
public AlertStatisticDto statisticAlert() {
AlertStatisticDto dto = new AlertStatisticDto();
// 按设备类型统计
Map<String, Integer> typeMap = new HashMap<>();
for (Map<String, Object> row : alertMessageMapper.countByType()) {
typeMap.put((String) row.get("equ_type"), ((Long) row.get("cnt")).intValue());
}
dto.setTypeCount(typeMap);
// 按等级统计
Map<Integer, Integer> levelMap = new HashMap<>();
for (Map<String, Object> row : alertMessageMapper.countByLevel()) {
levelMap.put(((Integer) row.get("level")), ((Long) row.get("cnt")).intValue());
}
dto.setLevelCount(levelMap);
// 年 / 月
LocalDate now = LocalDate.now();
int year = now.getYear();
int month = now.getMonthValue();
dto.setYearCount(alertMessageMapper.countByYear(year));
dto.setMonthCount(alertMessageMapper.countByMonth(year, month));
return dto;
}
/**
* 新增故障统计 * 新增故障统计
* *
* @param alertMessage 故障统计 * @param alertMessage 故障统计

@ -1,14 +1,17 @@
package com.alops.system.service.impl; package com.alops.system.service.impl;
import java.util.List; import java.util.List;
import java.util.Map;
import com.alops.system.domain.EquBase; import com.alops.system.domain.EquBase;
import com.alops.system.domain.dto.EquBaseQueryDto; import com.alops.system.domain.dto.*;
import com.alops.system.domain.vo.queryEquBaseVO; import com.alops.system.domain.vo.queryEquBaseVO;
import com.alops.system.mapper.EquBaseMapper; import com.alops.system.mapper.EquBaseMapper;
import com.alops.system.mapper.EquInterfaceMapper;
import com.alops.system.service.IEquBaseService; import com.alops.system.service.IEquBaseService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
/** /**
* 设备基本信息Service业务层处理 * 设备基本信息Service业务层处理
@ -22,6 +25,8 @@ public class EquBaseServiceImpl implements IEquBaseService
@Autowired @Autowired
private EquBaseMapper equBaseMapper; private EquBaseMapper equBaseMapper;
@Autowired
private EquInterfaceMapper interfaceMapper;
/** /**
* 查询设备基本信息 * 查询设备基本信息
* *
@ -31,9 +36,50 @@ public class EquBaseServiceImpl implements IEquBaseService
@Override @Override
public EquBase selectEquBaseById(String id) public EquBase selectEquBaseById(String id)
{ {
return equBaseMapper.selectEquBaseById(id); return equBaseMapper.selectEquBaseById(id);
} }
/**
* 实现 - 获取设备最新的监控信息快照
*/
@Override
public MonitorLastDto selectLatestEquMonitorInfo(String id) {
// 建议增加基础的参数校验
if (!StringUtils.hasText(id)) {
// 根据业务规则,可以返回null或抛出自定义异常
throw new IllegalArgumentException("查询最新设备信息时,设备ID不能为空。");
}
// EquMonitorVO monitorVO1 = equBaseMapper.selectEquMonitorById(id);
// return monitorVO1;
return equBaseMapper.selectEquMonitorById(id);
}
/**
* 实现 - 获取设备在指定时间段内的历史监控信息
*/
@Override
public MonitorHistoryDto selectHistoricalEquMonitorInfo(EquBaseQueryDto queryDto) {
if (queryDto == null || queryDto.getId() == null
|| queryDto.getMinTime() == null || queryDto.getMaxTime() == null) {
throw new IllegalArgumentException("查询历史数据需要提供设备ID和完整的时间范围。");
}
List<Map<String, Object>> rows = equBaseMapper.selectEquMonitorByIdToList(queryDto);
MonitorHistoryDto dto = new MonitorHistoryDto();
for (Map<String, Object> row : rows) {
dto.getTemperatureList().add(row.get("temperature_value") != null ? ((Number) row.get("temperature_value")).floatValue() : null);
dto.getInvoltageList().add(row.get("involtage_value") != null ? ((Number) row.get("involtage_value")).floatValue() : null);
dto.getOutvoltageList().add(row.get("outvoltage_value") != null ? ((Number) row.get("outvoltage_value")).floatValue() : null);
dto.getTimeList().add(row.get("gather_time").toString());
}
return dto;
}
/** /**
* 查询设备基本信息列表 * 查询设备基本信息列表
* *
@ -46,6 +92,24 @@ public class EquBaseServiceImpl implements IEquBaseService
return equBaseMapper.selectEquBaseList(equBaseQueryDto); return equBaseMapper.selectEquBaseList(equBaseQueryDto);
} }
/**
* 查询多台显示界面的单独信息
**/
@Override
public List<MonitorListDto> selectEquMonitorList(EquBaseQueryDto equBaseQueryDto) {
return equBaseMapper.selectEquMonitorList(equBaseQueryDto);
}
/**
* 设备类型分类统计信息
**/
@Override
public List<MonitorStatisticDto> selectEquStatisticByType() {
return equBaseMapper.selectEquStatisticByType();
}
/** /**
* 新增设备基本信息 * 新增设备基本信息
* *

@ -1,5 +1,6 @@
package com.alops.system.service.impl; package com.alops.system.service.impl;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.alops.system.domain.EquInterface; import com.alops.system.domain.EquInterface;
@ -44,6 +45,12 @@ public class EquInterfaceServiceImpl implements IEquInterfaceService
return equInterfaceMapper.selectEquInterfaceList(equInterface); return equInterfaceMapper.selectEquInterfaceList(equInterface);
} }
@Override
public List<EquInterface> selectEquInterfaceListByEquID(String equID) {
ArrayList<EquInterface> interfacesList = equInterfaceMapper.selectEquInterfaceByEquId(equID);
return interfacesList;
}
/** /**
* 新增端口运行状态 * 新增端口运行状态
* *

@ -1,8 +1,12 @@
package com.alops.system.service.impl; package com.alops.system.service.impl;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID;
import com.alops.common.utils.SecurityUtils;
import com.alops.system.domain.EquManu; import com.alops.system.domain.EquManu;
import com.alops.system.domain.EquType;
import com.alops.system.mapper.EquManuMapper; import com.alops.system.mapper.EquManuMapper;
import com.alops.system.service.IEquManuService; import com.alops.system.service.IEquManuService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -53,6 +57,9 @@ public class EquManuServiceImpl implements IEquManuService
@Override @Override
public int insertEquManu(EquManu equManu) public int insertEquManu(EquManu equManu)
{ {
equManu.setId(UUID.randomUUID().toString());
equManu.setCreateDate(new Date());
Long userId = SecurityUtils.getLoginUser().getUserId();
return equManuMapper.insertEquManu(equManu); return equManuMapper.insertEquManu(equManu);
} }
@ -65,6 +72,7 @@ public class EquManuServiceImpl implements IEquManuService
@Override @Override
public int updateEquManu(EquManu equManu) public int updateEquManu(EquManu equManu)
{ {
Long userId = SecurityUtils.getLoginUser().getUserId();
return equManuMapper.updateEquManu(equManu); return equManuMapper.updateEquManu(equManu);
} }

@ -1,7 +1,9 @@
package com.alops.system.service.impl; package com.alops.system.service.impl;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.alops.system.domain.EquInterface;
import com.alops.system.domain.EquRouting; import com.alops.system.domain.EquRouting;
import com.alops.system.mapper.EquRoutingMapper; import com.alops.system.mapper.EquRoutingMapper;
import com.alops.system.service.IEquRoutingService; import com.alops.system.service.IEquRoutingService;
@ -32,6 +34,7 @@ public class EquRoutingServiceImpl implements IEquRoutingService
return equRoutingMapper.selectEquRoutingById(id); return equRoutingMapper.selectEquRoutingById(id);
} }
/** /**
* 查询路由信息列表 * 查询路由信息列表
* *
@ -43,6 +46,18 @@ public class EquRoutingServiceImpl implements IEquRoutingService
{ {
return equRoutingMapper.selectEquRoutingList(equRouting); return equRoutingMapper.selectEquRoutingList(equRouting);
} }
/**
* 查询路由界面详细信息+++
*
* @param equId 路由信息主键
* @return 路由信息
*/
@Override
public List<EquRouting> selectEquRoutingListByEquId(String equId)
{
ArrayList<EquRouting> EquRoutingList = equRoutingMapper.selectEquRoutingListByEquId(equId);
return EquRoutingList ;
}
/** /**
* 新增路由信息 * 新增路由信息

@ -0,0 +1,95 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.alops.system.mapper.EquSupplierMapper;
import com.alops.system.domain.EquSupplier;
import com.alops.system.service.IEquSupplierService;
/**
* 请填写功能名称Service业务层处理
*
* @author ruoyi
* @date 2025-09-20
*/
@Service
public class EquSupplierServiceImpl implements IEquSupplierService
{
@Autowired
private EquSupplierMapper equSupplierMapper;
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
@Override
public EquSupplier selectEquSupplierById(String id)
{
return equSupplierMapper.selectEquSupplierById(id);
}
/**
* 查询请填写功能名称列表
*
* @param equSupplier 请填写功能名称
* @return 请填写功能名称
*/
@Override
public List<EquSupplier> selectEquSupplierList(EquSupplier equSupplier)
{
return equSupplierMapper.selectEquSupplierList(equSupplier);
}
/**
* 新增请填写功能名称
*
* @param equSupplier 请填写功能名称
* @return 结果
*/
@Override
public int insertEquSupplier(EquSupplier equSupplier)
{
equSupplier.setCreateTime(DateUtils.getNowDate());
return equSupplierMapper.insertEquSupplier(equSupplier);
}
/**
* 修改请填写功能名称
*
* @param equSupplier 请填写功能名称
* @return 结果
*/
@Override
public int updateEquSupplier(EquSupplier equSupplier)
{
return equSupplierMapper.updateEquSupplier(equSupplier);
}
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键
* @return 结果
*/
@Override
public int deleteEquSupplierByIds(String[] ids)
{
return equSupplierMapper.deleteEquSupplierByIds(ids);
}
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
@Override
public int deleteEquSupplierById(String id)
{
return equSupplierMapper.deleteEquSupplierById(id);
}
}

@ -1,7 +1,9 @@
package com.alops.system.service.impl; package com.alops.system.service.impl;
import java.util.List; import java.util.List;
import java.util.UUID;
import com.alops.common.utils.SecurityUtils;
import com.alops.system.domain.EquType; import com.alops.system.domain.EquType;
import com.alops.system.mapper.EquTypeMapper; import com.alops.system.mapper.EquTypeMapper;
import com.alops.system.service.IEquTypeService; import com.alops.system.service.IEquTypeService;
@ -53,6 +55,8 @@ public class EquTypeServiceImpl implements IEquTypeService
@Override @Override
public int insertEquType(EquType equType) public int insertEquType(EquType equType)
{ {
equType.setId(UUID.randomUUID().toString());
Long userId = SecurityUtils.getLoginUser().getUserId();
return equTypeMapper.insertEquType(equType); return equTypeMapper.insertEquType(equType);
} }
@ -65,6 +69,7 @@ public class EquTypeServiceImpl implements IEquTypeService
@Override @Override
public int updateEquType(EquType equType) public int updateEquType(EquType equType)
{ {
Long userId = SecurityUtils.getLoginUser().getUserId();
return equTypeMapper.updateEquType(equType); return equTypeMapper.updateEquType(equType);
} }

@ -1,7 +1,9 @@
package com.alops.system.service.impl; package com.alops.system.service.impl;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.alops.system.domain.EquInterface;
import com.alops.system.domain.EquVeneer; import com.alops.system.domain.EquVeneer;
import com.alops.system.mapper.EquVeneerMapper; import com.alops.system.mapper.EquVeneerMapper;
import com.alops.system.service.IEquVeneerService; import com.alops.system.service.IEquVeneerService;
@ -44,6 +46,16 @@ public class EquVeneerServiceImpl implements IEquVeneerService
return equVeneerMapper.selectEquVeneerList(equVeneer); return equVeneerMapper.selectEquVeneerList(equVeneer);
} }
/**
* 查询界面信息列表+++
*/
@Override
public List<EquVeneer> selectEquVeneerListByEquId(String equId)
{
ArrayList<EquVeneer> VeneerList = equVeneerMapper.selectEquVeneerListByEquId(equId);
return VeneerList;
}
/** /**
* 新增请填写功能名称 * 新增请填写功能名称
* *

@ -46,6 +46,18 @@ public class EquVlanServiceImpl implements IEquVlanService
return equVlanMapper.selectEquVlanList(equVlan); return equVlanMapper.selectEquVlanList(equVlan);
} }
/**
* 查询单台的vlan信息列表
*
* @param equId请填写功能名称
* @return 请填写功能名称
*/
@Override
public List<EquVlan> selectEquVlanListByEquId(String equId)
{
return equVlanMapper.selectEquVlanListByEquId(equId);
}
/** /**
* 新增请填写功能名称 * 新增请填写功能名称
* *

@ -1,94 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.system.domain.FauSta;
import com.alops.system.mapper.FauStaMapper;
import com.alops.system.service.IFauStaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 故障统计Service业务层处理
*
* @author ruoyi
* @date 2025-08-01
*/
@Service
public class FauStaServiceImpl implements IFauStaService
{
@Autowired
private FauStaMapper fauStaMapper;
/**
* 查询故障统计
*
* @param id 故障统计主键
* @return 故障统计
*/
@Override
public FauSta selectFauStaById(Long id)
{
return fauStaMapper.selectFauStaById(id);
}
/**
* 查询故障统计列表
*
* @param fauSta 故障统计
* @return 故障统计
*/
@Override
public List<FauSta> selectFauStaList(FauSta fauSta)
{
return fauStaMapper.selectFauStaList(fauSta);
}
/**
* 新增故障统计
*
* @param fauSta 故障统计
* @return 结果
*/
@Override
public int insertFauSta(FauSta fauSta)
{
return fauStaMapper.insertFauSta(fauSta);
}
/**
* 修改故障统计
*
* @param fauSta 故障统计
* @return 结果
*/
@Override
public int updateFauSta(FauSta fauSta)
{
return fauStaMapper.updateFauSta(fauSta);
}
/**
* 批量删除故障统计
*
* @param ids 需要删除的故障统计主键
* @return 结果
*/
@Override
public int deleteFauStaByIds(Long[] ids)
{
return fauStaMapper.deleteFauStaByIds(ids);
}
/**
* 删除故障统计信息
*
* @param id 故障统计主键
* @return 结果
*/
@Override
public int deleteFauStaById(Long id)
{
return fauStaMapper.deleteFauStaById(id);
}
}

@ -1,110 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.alops.system.mapper.AlarmRuleMapper">
<resultMap type="AlarmRule" id="AlarmRuleResult">
<result property="id" column="id" />
<result property="ruleName" column="rule_name" />
<result property="description" column="description" />
<result property="paramName" column="param_name" />
<result property="equType" column="equ_type" />
<result property="compareOperator" column="compare_operator" />
<result property="paramValue" column="param_value" />
<result property="alertLevel" column="alert_level" />
<result property="alertMessage" column="alert_message" />
<result property="roleId" column="role_id" />
<result property="notifyEmail" column="notify_email" />
<result property="ruleStatus" column="rule_status" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectAlarmRuleVo">
select id, rule_name, description, param_name, equ_type, compare_operator, param_value, alert_level, alert_message, role_id, notify_email, rule_status, create_time from alarm_rule
</sql>
<select id="selectAlarmRuleList" parameterType="AlarmRule" resultMap="AlarmRuleResult">
<include refid="selectAlarmRuleVo"/>
<where>
<if test="ruleName != null and ruleName != ''"> and rule_name like concat('%', #{ruleName}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="paramName != null and paramName != ''"> and param_name like concat('%', #{paramName}, '%')</if>
<if test="equType != null and equType != ''"> and equ_type = #{equType}</if>
<if test="compareOperator != null and compareOperator != ''"> and compare_operator = #{compareOperator}</if>
<if test="paramValue != null "> and param_value = #{paramValue}</if>
<if test="alertLevel != null "> and alert_level = #{alertLevel}</if>
<if test="alertMessage != null and alertMessage != ''"> and alert_message = #{alertMessage}</if>
<if test="roleId != null "> and role_id = #{roleId}</if>
<if test="notifyEmail != null and notifyEmail != ''"> and notify_email = #{notifyEmail}</if>
<if test="ruleStatus != null "> and rule_status = #{ruleStatus}</if>
</where>
</select>
<select id="selectAlarmRuleById" parameterType="Long" resultMap="AlarmRuleResult">
<include refid="selectAlarmRuleVo"/>
where id = #{id}
</select>
<insert id="insertAlarmRule" parameterType="AlarmRule" useGeneratedKeys="true" keyProperty="id">
insert into alarm_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">rule_name,</if>
<if test="description != null">description,</if>
<if test="paramName != null">param_name,</if>
<if test="equType != null">equ_type,</if>
<if test="compareOperator != null">compare_operator,</if>
<if test="paramValue != null">param_value,</if>
<if test="alertLevel != null">alert_level,</if>
<if test="alertMessage != null">alert_message,</if>
<if test="roleId != null">role_id,</if>
<if test="notifyEmail != null">notify_email,</if>
<if test="ruleStatus != null">rule_status,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">#{ruleName},</if>
<if test="description != null">#{description},</if>
<if test="paramName != null">#{paramName},</if>
<if test="equType != null">#{equType},</if>
<if test="compareOperator != null">#{compareOperator},</if>
<if test="paramValue != null">#{paramValue},</if>
<if test="alertLevel != null">#{alertLevel},</if>
<if test="alertMessage != null">#{alertMessage},</if>
<if test="roleId != null">#{roleId},</if>
<if test="notifyEmail != null">#{notifyEmail},</if>
<if test="ruleStatus != null">#{ruleStatus},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateAlarmRule" parameterType="AlarmRule">
update alarm_rule
<trim prefix="SET" suffixOverrides=",">
<if test="ruleName != null and ruleName != ''">rule_name = #{ruleName},</if>
<if test="description != null">description = #{description},</if>
<if test="paramName != null">param_name = #{paramName},</if>
<if test="equType != null">equ_type = #{equType},</if>
<if test="compareOperator != null">compare_operator = #{compareOperator},</if>
<if test="paramValue != null">param_value = #{paramValue},</if>
<if test="alertLevel != null">alert_level = #{alertLevel},</if>
<if test="alertMessage != null">alert_message = #{alertMessage},</if>
<if test="roleId != null">role_id = #{roleId},</if>
<if test="notifyEmail != null">notify_email = #{notifyEmail},</if>
<if test="ruleStatus != null">rule_status = #{ruleStatus},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAlarmRuleById" parameterType="Long">
delete from alarm_rule where id = #{id}
</delete>
<delete id="deleteAlarmRuleByIds" parameterType="String">
delete from alarm_rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="handler" column="handler" /> <result property="handler" column="handler" />
<result property="handleTime" column="handle_time" /> <result property="handleTime" column="handle_time" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="batch" column="batch" />
</resultMap> </resultMap>
@ -25,12 +26,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="batchInsert" parameterType="java.util.List"> <insert id="batchInsert" parameterType="java.util.List">
INSERT INTO alert_message INSERT INTO alert_message
(equ_id, description, type, equ_type, cause, solution, level, occur_time, reporter, handler, handle_time, status) (equ_id, description, type, equ_type, cause, solution, level, occur_time, reporter, handler, handle_time, status, batch)
VALUES VALUES
<foreach collection="list" item="msg" separator=","> <foreach collection="list" item="msg" separator=",">
(#{msg.equId}, #{msg.description}, #{msg.type}, #{msg.equType}, (#{msg.equId}, #{msg.description}, #{msg.type}, #{msg.equType},
#{msg.cause}, #{msg.solution}, #{msg.level}, #{msg.occurTime}, #{msg.cause}, #{msg.solution}, #{msg.level}, #{msg.occurTime},
#{msg.reporter}, #{msg.handler}, #{msg.handleTime}, #{msg.status}) #{msg.reporter}, #{msg.handler}, #{msg.handleTime}, #{msg.status},#{msg.batch}))
</foreach> </foreach>
</insert> </insert>
@ -38,7 +39,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectAlertMessageVo"> <sql id="selectAlertMessageVo">
select id, equ_id, description, type, equ_type, cause, solution, level, occur_time, reporter, handler, handle_time, status from alert_message select id, equ_id, type, equ_type, solution, level, occur_time, handler, handle_time, status,batch from alert_message
</sql>
<sql id="selectAlertMessageVoJoinGather">
select a.id, g.equ_id, type, equ_type solution, level, occur_time, handler, handle_time, status,batch from alert_message a LEFT JOIN equ_gather g ON a.equ_id = g.equ_id
</sql> </sql>
<select id="selectAlertMessageList" parameterType="AlertMessage" resultMap="AlertMessageResult"> <select id="selectAlertMessageList" parameterType="AlertMessage" resultMap="AlertMessageResult">
@ -56,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="handler != null "> and handler = #{handler}</if> <if test="handler != null "> and handler = #{handler}</if>
<if test="handleTime != null "> and handle_time = #{handleTime}</if> <if test="handleTime != null "> and handle_time = #{handleTime}</if>
<if test="status != null and status != ''"> and status = #{status}</if> <if test="status != null and status != ''"> and status = #{status}</if>
<if test="batch != null and batch != ''"> and batch = #{batch}</if>
</where> </where>
</select> </select>
@ -64,6 +70,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectAlertMessageByEquId" parameterType="Long" resultMap="AlertMessageResult">
<include refid="selectAlertMessageVoJoinGather"/>
where g.equ_id = #{equid}
AND a.batch = (
SELECT MAX(batch)
FROM alert_message
WHERE equ_id = #{equid}
)
GROUP BY a.id
</select>
<!-- 按设备类型统计 -->
<select id="countByType" resultType="map">
SELECT equ_type, COUNT(*) AS cnt
FROM alert_message
GROUP BY equ_type
</select>
<!-- 按预警等级统计 -->
<select id="countByLevel" resultType="map">
SELECT level, COUNT(*) AS cnt
FROM alert_message
GROUP BY level
</select>
<!-- 本年度预警次数 -->
<select id="countByYear" parameterType="int" resultType="int">
SELECT COUNT(*)
FROM alert_message
WHERE YEAR(occur_time) = #{year}
</select>
<!-- 本月预警次数 -->
<select id="countByMonth" parameterType="map" resultType="int">
SELECT COUNT(*)
FROM alert_message
WHERE YEAR(occur_time) = #{year}
AND MONTH(occur_time) = #{month}
</select>
<insert id="insertAlertMessage" parameterType="AlertMessage" useGeneratedKeys="true" keyProperty="id"> <insert id="insertAlertMessage" parameterType="AlertMessage" useGeneratedKeys="true" keyProperty="id">
insert into alert_message insert into alert_message
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -79,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="handler != null">handler,</if> <if test="handler != null">handler,</if>
<if test="handleTime != null">handle_time,</if> <if test="handleTime != null">handle_time,</if>
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="batch != null">batch,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="equId != null and equId != ''">#{equId},</if> <if test="equId != null and equId != ''">#{equId},</if>
@ -93,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="handler != null">#{handler},</if> <if test="handler != null">#{handler},</if>
<if test="handleTime != null">#{handleTime},</if> <if test="handleTime != null">#{handleTime},</if>
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="batch != null">#{batch},</if>
</trim> </trim>
</insert> </insert>

@ -27,10 +27,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="repairFrequency" column="repair_frequency" /> <result property="repairFrequency" column="repair_frequency" />
<result property="repairCost" column="repair_cost" /> <result property="repairCost" column="repair_cost" />
<result property="fanSpeed" column="fan_speed"/>
<result property="cpuUtilization" column="cpu_utilization"/>
<result property="memoryUtilization" column="memory_utilization"/>
<result property="health" column="health"/>
<result property="contWorkPeriod" column="cont_work_period"/>
<association property="manufactureVO" columnPrefix="equ_manu_" autoMapping="true" />
<association property="equTypeVO" columnPrefix="equ_type_" autoMapping="true" />
<collection property="temperatureList" javaType="java.util.ArrayList" ofType="java.lang.Float">
<result column="temperature_value"/>
</collection>
<collection property="involtageList" javaType="java.util.ArrayList" ofType="java.lang.Float">
<result column="involtage_value"/>
</collection>
<collection property="outvoltageList" javaType="java.util.ArrayList" ofType="java.lang.Float">
<result column="outvoltage_value"/>
</collection>
<!-- <association property="manufacture" columnPrefix="equ_manu_" autoMapping="true" />--> <!-- <association property="manufacture" columnPrefix="equ_manu_" autoMapping="true" />-->
</resultMap> </resultMap>
<resultMap id="EquMonitorResult" type="com.alops.system.domain.vo.EquMonitorVO">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="version" column="version" />
<result property="ip" column="ip" />
<result property="manufacture" column="manufacture" />
<result property="location" column="location" />
<result property="equType" column="equ_type" />
<result property="inCharge" column="in_charge" />
<result property="releaseDate" column="release_date" />
<result property="installDate" column="install_date" />
<result property="lifeCycle" column="life_cycle" />
<result property="serviceTime" column="service_time" />
<result property="warranty" column="warranty" />
<result property="createBy" column="create_by" />
<result property="createDate" column="create_date" />
<result property="updateBy" column="update_by" />
<result property="updateDate" column="update_date" />
<result property="status" column="status" />
<result property="failureFrequency" column="failure_frequency" />
<result property="repairFrequency" column="repair_frequency" />
<result property="repairCost" column="repair_cost" />
<result property="fanSpeed" column="fan_speed"/>
<result property="cpuUtilization" column="cpu_utilization"/>
<result property="memoryUtilization" column="memory_utilization"/>
<result property="health" column="health"/>
<result property="contWorkPeriod" column="cont_work_period"/>
<association property="manufactureVO" columnPrefix="equ_manu_" autoMapping="true" />
<association property="equTypeVO" columnPrefix="equ_type_" autoMapping="true" />
<collection property="temperatureList" ofType="java.lang.Float">
<result column="temperature_value"/>
</collection>
<collection property="involtageList" ofType="java.lang.Float">
<result column="involtage_value"/>
</collection>
<collection property="outvoltageList" ofType="java.lang.Float">
<result column="outvoltage_value"/>
</collection>
</resultMap>
<sql id="selectEquBaseVo"> <sql id="selectEquBaseVo">
select id, name, version, ip, manufacture, location, equ_type, in_charge, release_date, install_date, life_cycle, service_time, warranty, create_by, create_date, update_by, update_date, status, failure_frequency, repair_frequency, repair_cost from equ_base select id, name, version, ip, manufacture, location, equ_type, in_charge, release_date, install_date, life_cycle, service_time, warranty, create_by, create_date, update_by, update_date, status, failure_frequency, repair_frequency, repair_cost from equ_base
@ -46,25 +104,76 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
m.name as manuName, m.name as manuName,
b.location, b.location,
b.equ_type, b.equ_type,
t.name AS equTypeName,
b.in_charge, b.in_charge,
b.release_date, #b.release_date,
b.install_date, b.install_date,
b.life_cycle, b.life_cycle,
b.service_time, #b.service_time,
b.warranty, b.warranty,
b.create_by, b.create_by,
b.create_date, b.create_date,
b.update_by, #b.update_by,
b.update_date, #b.update_date,
b.device_level,
b.supplier_id,
b.status, b.status,
b.failure_frequency as failureFrequency, b.failure_frequency as failureFrequency,
b.repair_frequency as repairFrequency, #b.repair_frequency as repairFrequency,
b.repair_cost as repairCost, #b.repair_cost as repairCost,
g.health g.health
FROM equ_base b FROM equ_base b
LEFT JOIN equ_gather g ON b.id = g.equ_id LEFT JOIN equ_gather g ON b.id = g.equ_id
LEFT JOIN equ_manu m ON b.manufacture = m.id LEFT JOIN equ_manu m ON b.manufacture = m.id
LEFT JOIN equ_type t ON b.equ_type = t.id
<where>
<if test="equType != null and equType != ''">
AND b.equ_type = #{equType}
</if>
<if test="equName != null and equName != ''">
AND b.name LIKE concat('%', #{equName}, '%')
</if>
<if test="location != null and location != ''">
AND b.location = #{location}
</if>
<if test="manufacture != null and manufacture != ''">
AND b.manufacture = #{manufacture}
</if>
<if test="inCharge != null">
AND b.in_charge = #{inCharge}
</if>
<if test="status != null">
AND b.status = #{status}
</if>
<if test="minTime != null">
AND b.create_date <![CDATA[>=]]> #{minTime}
</if>
<if test="maxTime != null">
AND b.create_date <![CDATA[<=]]> #{maxTime}
</if>
<if test="health != null">
AND g.health <![CDATA[>=]]> #{health}
</if>
</where>
</select>
<select id="selectEquMonitorList" parameterType="EquBaseQueryDto" resultType="MonitorListDto">
SELECT
b.id,
b.name,
b.version,
b.device_level,
b.location,
b.status,
g.cpu_utilization,
g.health,
g.fan_speed,
b.failure_frequency,
b.equ_image
FROM equ_base b
LEFT JOIN equ_gather g ON b.id = g.equ_id
<where> <where>
g.cpu_utilization is not null
<if test="equType != null and equType != ''"> <if test="equType != null and equType != ''">
AND b.equ_type = #{equType} AND b.equ_type = #{equType}
</if> </if>
@ -93,8 +202,91 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND g.health <![CDATA[>=]]> #{health} AND g.health <![CDATA[>=]]> #{health}
</if> </if>
</where> </where>
ORDER BY g.gather_time desc limit 1
</select> </select>
<select id="selectEquMonitorById" parameterType="string" resultType="MonitorLastDto">
SELECT
g.cont_work_period,
b.id,
b.name,
b.version,
b.device_level,
t.name as equ_type,
m.name as manufacture,
s.name as supplier_id,
#b.release_date,
b.warranty,
m.contact_by as manufacture,
m.contact_way as manufacture,
b.ip,
b.location,
b.install_date,
#b.service_time,
b.in_charge,
b.failure_frequency,
#b.repair_frequency,
#b.service_time/warranty AS aging,
g.fan_speed,
g.cpu_utilization,
g.memory_utilization,
g.health
FROM equ_base b
LEFT JOIN equ_manu m ON b.manufacture = m.id
LEFT JOIN equ_type t ON b.equ_type = t.id
LEFT JOIN equ_supplier s ON b.supplier_id = s.id
LEFT JOIN equ_gather g ON b.id = g.equ_id
where g.cpu_utilization is not null
and b.id = #{id}
ORDER BY g.gather_time desc limit 1
</select>
<select id="selectEquMonitorByIdToList" parameterType="com.alops.system.domain.dto.EquBaseQueryDto" resultType="map"> SELECT
-- 从 equ_gather 表中获取需要填充到List中的数据
g.temperature AS temperature_value,
g.vol_in AS involtage_value,
g.vol_out AS outvoltage_value,
g.gather_time AS gather_time
FROM equ_base b
LEFT JOIN equ_manu m ON b.manufacture = m.id
LEFT JOIN equ_type t ON b.equ_type = t.id
LEFT JOIN equ_gather g ON b.id = g.equ_id
where g.cpu_utilization is not null
and b.id = #{id}
-- 添加时间范围约束
and g.gather_time BETWEEN #{minTime} AND #{maxTime}
ORDER BY g.gather_time desc
</select>
<resultMap id="EquStatisticResult" type="com.alops.system.domain.dto.MonitorStatisticDto">
<id property="equTypeId" column="equTypeId"/>
<result property="equTypeName" column="equTypeName"/>
<collection property="devices" ofType="com.alops.system.domain.dto.MonitorStatisticDto$DeviceSimpleInfo">
<id property="id" column="id"/>
<result property="name" column="name"/>
</collection>
</resultMap>
<select id="selectEquStatisticByType" resultMap="EquStatisticResult">
SELECT
b.equ_type AS equTypeId,
t.name AS equTypeName,
b.id AS id,
b.name AS name
FROM equ_base b
LEFT JOIN equ_type t ON b.equ_type = t.id
ORDER BY b.equ_type, b.id
</select>
<select id="findEquBaseList" resultMap="EquBaseResult"> <select id="findEquBaseList" resultMap="EquBaseResult">
<include refid="selectEquBaseVo"/> <include refid="selectEquBaseVo"/>
</select> </select>

@ -40,6 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, equ_id, gather_time, running, rate, commuicate_mode, out_flow, in_flow, in_bandwidth, loss_rate, error_rate, equ_gather_id, interface_id, out_bandwidth from equ_interface select id, equ_id, gather_time, running, rate, commuicate_mode, out_flow, in_flow, in_bandwidth, loss_rate, error_rate, equ_gather_id, interface_id, out_bandwidth from equ_interface
</sql> </sql>
<sql id="selectEquInterfaceVoJoinGather">
select i.id, g.equ_id, i.gather_time, running, rate, commuicate_mode, out_flow, in_flow, in_bandwidth, loss_rate, error_rate, equ_gather_id, interface_id, out_bandwidth from equ_interface i LEFT JOIN equ_gather g ON i.equ_gather_id = g.id
</sql>
<select id="selectEquInterfaceList" parameterType="EquInterface" resultMap="EquInterfaceResult"> <select id="selectEquInterfaceList" parameterType="EquInterface" resultMap="EquInterfaceResult">
<include refid="selectEquInterfaceVo"/> <include refid="selectEquInterfaceVo"/>
<where> <where>
@ -64,6 +68,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectEquInterfaceByEquId" parameterType="String" resultMap="EquInterfaceResult">
<include refid="selectEquInterfaceVoJoinGather"/>
where g.equ_id = #{equId}
</select>
<insert id="insertEquInterface" parameterType="EquInterface"> <insert id="insertEquInterface" parameterType="EquInterface">
insert into equ_interface insert into equ_interface
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

@ -68,8 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="contactBy != null">contact_by = #{contactBy},</if> <if test="contactBy != null">contact_by = #{contactBy},</if>
<if test="contactWay != null">contact_way = #{contactWay},</if> <if test="contactWay != null">contact_way = #{contactWay},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createDate != null">create_date = #{createDate},</if>
<if test="status != null">status = #{status},</if> <if test="status != null">status = #{status},</if>
create_date = create_date
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

@ -26,6 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, equ_gather_id, des_address, subnet_mask, next_hop from equ_routing select id, equ_gather_id, des_address, subnet_mask, next_hop from equ_routing
</sql> </sql>
<sql id="selectEquRoutingVoJoinGather">
select r.id, g.equ_id AS equId, equ_gather_id, des_address, subnet_mask, next_hop from equ_routing r JOIN equ_gather g ON r.equ_gather_id = g.id
</sql>
<select id="selectEquRoutingList" parameterType="EquRouting" resultMap="EquRoutingResult"> <select id="selectEquRoutingList" parameterType="EquRouting" resultMap="EquRoutingResult">
<include refid="selectEquRoutingVo"/> <include refid="selectEquRoutingVo"/>
<where> <where>
@ -41,6 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectEquRoutingListByEquId" parameterType="String" resultMap="EquRoutingResult">
<include refid="selectEquRoutingVoJoinGather"/>
where g.equ_id = #{equId}
</select>
<insert id="insertEquRouting" parameterType="EquRouting"> <insert id="insertEquRouting" parameterType="EquRouting">
insert into equ_routing insert into equ_routing
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.alops.system.mapper.EquSupplierMapper">
<resultMap type="EquSupplier" id="EquSupplierResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="description" column="description" />
<result property="contactBy" column="contact_by" />
<result property="contactWay" column="contact_way" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="status" column="status" />
</resultMap>
<sql id="selectEquSupplierVo">
select id, name, description, contact_by, contact_way, create_by, create_time, status from equ_supplier
</sql>
<select id="selectEquSupplierList" parameterType="EquSupplier" resultMap="EquSupplierResult">
<include refid="selectEquSupplierVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="contactBy != null and contactBy != ''"> and contact_by = #{contactBy}</if>
<if test="contactWay != null and contactWay != ''"> and contact_way = #{contactWay}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectEquSupplierById" parameterType="String" resultMap="EquSupplierResult">
<include refid="selectEquSupplierVo"/>
where id = #{id}
</select>
<insert id="insertEquSupplier" parameterType="EquSupplier">
insert into equ_supplier
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="name != null">name,</if>
<if test="description != null">description,</if>
<if test="contactBy != null">contact_by,</if>
<if test="contactWay != null">contact_way,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="status != null">status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="name != null">#{name},</if>
<if test="description != null">#{description},</if>
<if test="contactBy != null">#{contactBy},</if>
<if test="contactWay != null">#{contactWay},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="status != null">#{status},</if>
</trim>
</insert>
<update id="updateEquSupplier" parameterType="EquSupplier">
update equ_supplier
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="description != null">description = #{description},</if>
<if test="contactBy != null">contact_by = #{contactBy},</if>
<if test="contactWay != null">contact_way = #{contactWay},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="status != null">status = #{status},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquSupplierById" parameterType="String">
delete from equ_supplier where id = #{id}
</delete>
<delete id="deleteEquSupplierByIds" parameterType="String">
delete from equ_supplier where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -40,18 +40,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="description != null">description,</if> <if test="description != null">description,</if>
<if test="image != null">image,</if> <if test="image != null">image,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createDate != null">create_date,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
<if test="name != null and name != ''">#{name},</if> <if test="name != null and name != ''">#{name},</if>
<if test="description != null">#{description},</if> <if test="description != null">#{description},</if>
<if test="image != null">#{image},</if> <if test="image != null">#{image},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createDate != null">#{createDate},</if>
</trim> </trim>
</insert> </insert>
<update id="updateEquType" parameterType="EquType"> <update id="updateEquType" parameterType="EquType">
update equ_type update equ_type
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
@ -59,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="description != null">description = #{description},</if> <if test="description != null">description = #{description},</if>
<if test="image != null">image = #{image},</if> <if test="image != null">image = #{image},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createDate != null">create_date = #{createDate},</if> create_date = create_date
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

@ -26,6 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, veneer_id, veneer_status, equ_gather_id from equ_veneer select id, veneer_id, veneer_status, equ_gather_id from equ_veneer
</sql> </sql>
<sql id="selectEquVeneerVoJoinGather">
select v.id, g.equ_id AS equId, veneer_id, veneer_status, equ_gather_id FROM equ_veneer v LEFT JOIN equ_gather g ON v.equ_gather_id = g.id
</sql>
<select id="selectEquVeneerList" parameterType="EquVeneer" resultMap="EquVeneerResult"> <select id="selectEquVeneerList" parameterType="EquVeneer" resultMap="EquVeneerResult">
<include refid="selectEquVeneerVo"/> <include refid="selectEquVeneerVo"/>
<where> <where>
@ -40,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectEquVeneerListByEquId" parameterType="String" resultMap="EquVeneerResult">
<include refid="selectEquVeneerVoJoinGather"/>
where g.equ_id = #{equId}
</select>
<insert id="insertEquVeneer" parameterType="EquVeneer"> <insert id="insertEquVeneer" parameterType="EquVeneer">
insert into equ_veneer insert into equ_veneer
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

@ -28,10 +28,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) )
</foreach> </foreach>
</insert> </insert>
<sql id="selectEquVlanVo"> <sql id="selectEquVlanVo">
select id, equ_gather_id, main_id, ip_address, subnet_mask, create_time, update_by, vlan_id from equ_vlan select id, equ_gather_id, main_id, ip_address, subnet_mask, create_time, update_by, vlan_id from equ_vlan
</sql> </sql>
<sql id="selectEquVlanVoJoinGather">
select vl.id, g.equ_id, equ_gather_id, main_id, ip_address, subnet_mask, create_time, update_by, vlan_id from equ_vlan vl LEFT JOIN equ_gather g ON vl.equ_gather_id = g.id
</sql>
<select id="selectEquVlanList" parameterType="EquVlan" resultMap="EquVlanResult"> <select id="selectEquVlanList" parameterType="EquVlan" resultMap="EquVlanResult">
<include refid="selectEquVlanVo"/> <include refid="selectEquVlanVo"/>
<where> <where>
@ -48,6 +53,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectEquVlanListByEquId" parameterType="String" resultMap="EquVlanResult">
<include refid="selectEquVlanVoJoinGather"/>
where g.equ_id = #{equid}
</select>
<insert id="insertEquVlan" parameterType="EquVlan"> <insert id="insertEquVlan" parameterType="EquVlan">
insert into equ_vlan insert into equ_vlan
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询【请填写功能名称】列表
export function listSupplier(query) {
return request({
url: '/system/supplier/list',
method: 'get',
params: query
})
}
// 查询【请填写功能名称】详细
export function getSupplier(id) {
return request({
url: '/system/supplier/' + id,
method: 'get'
})
}
// 新增【请填写功能名称】
export function addSupplier(data) {
return request({
url: '/system/supplier',
method: 'post',
data: data
})
}
// 修改【请填写功能名称】
export function updateSupplier(data) {
return request({
url: '/system/supplier',
method: 'put',
data: data
})
}
// 删除【请填写功能名称】
export function delSupplier(id) {
return request({
url: '/system/supplier/' + id,
method: 'delete'
})
}

@ -0,0 +1,287 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="供应商名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入供应商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="联系人姓名" prop="contactBy">
<el-input
v-model="queryParams.contactBy"
placeholder="请输入联系人姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="l联系方式" prop="contactWay">
<el-input
v-model="queryParams.contactWay"
placeholder="请输入l联系方式"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:supplier:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:supplier:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:supplier:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:supplier:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="supplierList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="供应商id" align="center" prop="id" />
<el-table-column label="供应商名称" align="center" prop="name" />
<el-table-column label="供应商简介" align="center" prop="description" />
<el-table-column label="联系人姓名" align="center" prop="contactBy" />
<el-table-column label="l联系方式" align="center" prop="contactWay" />
<el-table-column label="状态" align="center" prop="status" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:supplier:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:supplier:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改请填写功能名称对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="供应商名称" prop="name">
<el-input v-model="form.name" placeholder="请输入供应商名称" />
</el-form-item>
<el-form-item label="供应商简介" prop="description">
<el-input v-model="form.description" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="联系人姓名" prop="contactBy">
<el-input v-model="form.contactBy" placeholder="请输入联系人姓名" />
</el-form-item>
<el-form-item label="l联系方式" prop="contactWay">
<el-input v-model="form.contactWay" placeholder="请输入l联系方式" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listSupplier, getSupplier, delSupplier, addSupplier, updateSupplier } from "@/api/system/supplier"
export default {
name: "Supplier",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
supplierList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
description: null,
contactBy: null,
contactWay: null,
status: null
},
//
form: {},
//
rules: {
createTime: [
{ required: true, message: "添加人日期不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询【请填写功能名称】列表 */
getList() {
this.loading = true
listSupplier(this.queryParams).then(response => {
this.supplierList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
name: null,
description: null,
contactBy: null,
contactWay: null,
createBy: null,
createTime: null,
status: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加【请填写功能名称】"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getSupplier(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改【请填写功能名称】"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateSupplier(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addSupplier(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项?').then(function() {
return delSupplier(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('system/supplier/export', {
...this.queryParams
}, `supplier_${new Date().getTime()}.xlsx`)
}
}
}
</script>

@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '中国烟草运维管理系统' // 网页标题 const name = process.env.VUE_APP_TITLE || '中国烟草运维管理系统' // 网页标题
const baseUrl = 'http://39.102.212.161:8080' // 后端接口 const baseUrl = 'http://localhost:8080' // 后端接口
const port = process.env.port || process.env.npm_config_port || 80 // 端口 const port = process.env.port || process.env.npm_config_port || 80 // 端口

Loading…
Cancel
Save