Revert "snmp协议采集+预警规则增加+执行预警规则+数据库所有实体"

This reverts commit a3ea4d900c.
dev
xiaohuo 1 year ago
parent 173f94abd5
commit 2ee4007bd1
  1. 7
      ALOps_sys_backend/alops-admin/pom.xml
  2. 21
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquBaseController.java
  3. 106
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquOidController.java
  4. 105
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquVlanController.java
  5. 46
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/ScheduleRulesController.java
  6. 106
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlarmRuleController.java
  7. 105
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlertRuleConditionController.java
  8. 164
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlertRuleController.java
  9. 106
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/DictAlarmParamController.java
  10. 62
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/FauStaController.java
  11. 105
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/tool/EquGatherController.java
  12. 105
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/tool/EquInterfaceController.java
  13. 105
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/tool/EquRoutingController.java
  14. 105
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/tool/EquVeneerController.java
  15. 19
      ALOps_sys_backend/alops-admin/src/main/resources/application.yml
  16. 8
      ALOps_sys_backend/alops-system/pom.xml
  17. 205
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/AlarmRule.java
  18. 191
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/AlertRule.java
  19. 142
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/AlertRuleCondition.java
  20. 97
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/DictAlarmParam.java
  21. 88
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquBase.java
  22. 64
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquGather.java
  23. 87
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquInterface.java
  24. 236
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquOid.java
  25. 99
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquRouting.java
  26. 101
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquValn.java
  27. 84
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquVeneer.java
  28. 116
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquVlan.java
  29. 24
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/FauSta.java
  30. 83
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/InternalMessage.java
  31. 18
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/AlertRuleAddDto.java
  32. 17
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/vo/Code.java
  33. 20
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/vo/EquGatherInsertInfo.java
  34. 17
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/vo/EquGatherResult.java
  35. 20
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/vo/GatherEntities.java
  36. 295
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/vo/queryEquBaseVO.java
  37. 64
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlarmRuleMapper.java
  38. 73
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlertMessageMapper.java
  39. 72
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlertRuleConditionMapper.java
  40. 69
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlertRuleMapper.java
  41. 67
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/DictAlarmParamMapper.java
  42. 26
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquBaseMapper.java
  43. 73
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquGatherMapper.java
  44. 69
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquInterfaceMapper.java
  45. 72
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquOidMapper.java
  46. 67
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquRoutingMapper.java
  47. 66
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquVeneerMapper.java
  48. 67
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquVlanMapper.java
  49. 65
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/FauStaMapper.java
  50. 73
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/InternalMessageMapper.java
  51. 5
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/SysUserMapper.java
  52. 12
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/ConvertRawValueService.java
  53. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlarmRuleService.java
  54. 7
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlertLaunchService.java
  55. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlertRuleConditionService.java
  56. 65
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlertRuleService.java
  57. 7
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlertSenderService.java
  58. 64
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IDictAlarmParamService.java
  59. 3
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquBaseService.java
  60. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquGatherService.java
  61. 64
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquInterfaceService.java
  62. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquOidService.java
  63. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquRoutingService.java
  64. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquVeneerService.java
  65. 62
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquVlanService.java
  66. 24
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IFauStaService.java
  67. 8
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IScheduleRulesService.java
  68. 18
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/MemoryToolService.java
  69. 11
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/SnmpService.java
  70. 98
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlarmRuleServiceImpl.java
  71. 155
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlertLaunchServiceImpl.java
  72. 94
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlertMessageServiceImpl.java
  73. 94
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlertRuleConditionServiceImpl.java
  74. 312
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlertRuleServiceImpl.java
  75. 111
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlertSenderServiceImpl.java
  76. 68
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/ConvertRawValueServiceImpl.java
  77. 99
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/DictAlarmParamServiceImpl.java
  78. 3
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquBaseServiceImpl.java
  79. 94
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquGatherServiceImpl.java
  80. 94
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquInterfaceServiceImpl.java
  81. 98
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquOidServiceImpl.java
  82. 94
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquRoutingServiceImpl.java
  83. 94
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquVeneerServiceImpl.java
  84. 97
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquVlanServiceImpl.java
  85. 94
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/FauStaServiceImpl.java
  86. 297
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/MemoryToolServiceImpl.java
  87. 167
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/ScheduleRulesServiceImpl.java
  88. 299
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/SnmpServiceImpl.java
  89. 39
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/typeHandlers/StringToLongTypeHandler.java
  90. 110
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/AlarmRuleMapper.xml
  91. 93
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/AlertRuleConditionMapper.xml
  92. 131
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/AlertRuleMapper.xml
  93. 77
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/DictAlarmParamMapper.xml
  94. 49
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml
  95. 166
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquGatherMapper.xml
  96. 133
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquInterfaceMapper.xml
  97. 146
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquOidMapper.xml
  98. 83
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquRoutingMapper.xml
  99. 79
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquVeneerMapper.xml
  100. 99
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquVlanMapper.xml
  101. Some files were not shown because too many files have changed in this diff Show More

@ -76,13 +76,6 @@
<artifactId>alops-generator</artifactId>
</dependency>
<!-- 邮件工具-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>2.5.15</version>
</dependency>
</dependencies>
<build>

@ -13,7 +13,6 @@ import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquBase;
import com.alops.system.domain.dto.EquBaseQueryDto;
import com.alops.system.domain.vo.queryEquBaseVO;
import com.alops.system.service.IEquBaseService;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@ -49,7 +48,7 @@ public class EquBaseController extends BaseController
@ApiOperation("查询符合参数设备信息")
public AjaxResult list(EquBaseQueryDto equBaseQueryDto ) {
startPage();
List<queryEquBaseVO> list = equBaseService.selectEquBaseList(equBaseQueryDto);
List<EquBase> list = equBaseService.selectEquBaseList(equBaseQueryDto);
TableDataInfo tableDataInfo = getDataTable(list);
Map<String, Object> data = new HashMap<>();
data.put("total", tableDataInfo.getTotal());
@ -69,15 +68,15 @@ public class EquBaseController extends BaseController
/**
* 导出设备基本信息列表
*/
// @PreAuthorize("@ss.hasPermi('equipment:base:export')")
// @Log(title = "设备档案", businessType = BusinessType.EXPORT)
// @PostMapping("/export")
//// public void export(HttpServletResponse response, EquBaseQueryDto equBaseQueryDto)
//// {
//// List<EquBase> list = equBaseService.selectEquBaseList(equBaseQueryDto);
//// ExcelUtil<EquBase> util = new ExcelUtil<EquBase>(EquBase.class);
//// util.exportExcel(response, list, "设备基本信息数据");
//// }
@PreAuthorize("@ss.hasPermi('equipment:base:export')")
@Log(title = "设备档案", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquBaseQueryDto equBaseQueryDto)
{
List<EquBase> list = equBaseService.selectEquBaseList(equBaseQueryDto);
ExcelUtil<EquBase> util = new ExcelUtil<EquBase>(EquBase.class);
util.exportExcel(response, list, "设备基本信息数据");
}
/**
* 获取设备基本信息详细信息

@ -1,106 +0,0 @@
package com.alops.web.controller.equManagement;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquOid;
import com.alops.system.service.IEquOidService;
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;
/**
* OID配置信息Controller
*
* @author ruoyi
* @date 2025-08-15
*/
@RestController
@RequestMapping("/system/oid")
public class EquOidController extends BaseController
{
@Autowired
private IEquOidService equOidService;
/**
* 查询OID配置信息列表
*
*/
@PreAuthorize("@ss.hasPermi('system:oid:list')")
@GetMapping("/list")
public TableDataInfo list(EquOid equOid)
{
startPage();
List<EquOid> list = equOidService.selectEquOidList(equOid);
return getDataTable(list);
}
/**
* 导出OID配置信息列表
*/
@PreAuthorize("@ss.hasPermi('system:oid:export')")
@Log(title = "OID配置信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquOid equOid)
{
List<EquOid> list = equOidService.selectEquOidList(equOid);
ExcelUtil<EquOid> util = new ExcelUtil<EquOid>(EquOid.class);
util.exportExcel(response, list, "OID配置信息数据");
}
/**
* 获取OID配置信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:oid:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(equOidService.selectEquOidById(id));
}
/**
* 新增OID配置信息
*/
@PreAuthorize("@ss.hasPermi('system:oid:add')")
@Log(title = "OID配置信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquOid equOid)
{
return toAjax(equOidService.insertEquOid(equOid));
}
/**
* 修改OID配置信息
*/
@PreAuthorize("@ss.hasPermi('system:oid:edit')")
@Log(title = "OID配置信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquOid equOid)
{
return toAjax(equOidService.updateEquOid(equOid));
}
/**
* 删除OID配置信息
*/
@PreAuthorize("@ss.hasPermi('system:oid:remove')")
@Log(title = "OID配置信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(equOidService.deleteEquOidByIds(ids));
}
}

@ -1,105 +0,0 @@
package com.alops.web.controller.equManagement;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquVlan;
import com.alops.system.service.IEquVlanService;
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;
/**
* 请填写功能名称Controller
*
* @author ruoyi
* @date 2025-08-15
*/
@RestController
@RequestMapping("/system/vlan")
public class EquVlanController extends BaseController
{
@Autowired
private IEquVlanService equVlanService;
/**
* 查询请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:vlan:list')")
@GetMapping("/list")
public TableDataInfo list(EquVlan equVlan)
{
startPage();
List<EquVlan> list = equVlanService.selectEquVlanList(equVlan);
return getDataTable(list);
}
/**
* 导出请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:vlan:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquVlan equVlan)
{
List<EquVlan> list = equVlanService.selectEquVlanList(equVlan);
ExcelUtil<EquVlan> util = new ExcelUtil<EquVlan>(EquVlan.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
* 获取请填写功能名称详细信息
*/
@PreAuthorize("@ss.hasPermi('system:vlan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(equVlanService.selectEquVlanById(id));
}
/**
* 新增请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:vlan:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquVlan equVlan)
{
return toAjax(equVlanService.insertEquVlan(equVlan));
}
/**
* 修改请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:vlan:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquVlan equVlan)
{
return toAjax(equVlanService.updateEquVlan(equVlan));
}
/**
* 删除请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:vlan:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(equVlanService.deleteEquVlanByIds(ids));
}
}

@ -1,7 +1,6 @@
package com.alops.web.controller.equManagement;
import java.util.List;
import java.util.concurrent.ExecutionException;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
@ -11,9 +10,7 @@ import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.ScheduleRules;
import com.alops.system.domain.vo.Code;
import com.alops.system.service.IScheduleRulesService;
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;
@ -32,37 +29,16 @@ import org.springframework.web.bind.annotation.RestController;
* @date 2025-08-03
*/
@RestController
@RequestMapping("/equipmentRule")
@RequestMapping("/system/rules")
public class ScheduleRulesController extends BaseController
{
@Autowired
private IScheduleRulesService scheduleRulesService;
/**
* 立即执行按钮
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:list')")
@GetMapping("/protoCollect")
@ApiOperation("立即执行")
public AjaxResult protoCollect() throws ExecutionException, InterruptedException {
// 调用 Service 层执行采集,返回业务状态码
int code = scheduleRulesService.executeImmediately();
// 根据返回码生成 AjaxResult
if(code == Code.SUCCESS){
return AjaxResult.success("采集完成");
} else if(code == Code.PARTIAL){
return AjaxResult.warn("部分设备采集失败");
} else {
return AjaxResult.error("采集失败");
}
}
/**
* 查询定时采集规则列表
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:list')")
@PreAuthorize("@ss.hasPermi('system:rules:list')")
@GetMapping("/list")
public TableDataInfo list(ScheduleRules scheduleRules)
{
@ -74,7 +50,7 @@ public class ScheduleRulesController extends BaseController
/**
* 导出定时采集规则列表
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:export')")
@PreAuthorize("@ss.hasPermi('system:rules:export')")
@Log(title = "定时采集规则", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ScheduleRules scheduleRules)
@ -87,19 +63,17 @@ public class ScheduleRulesController extends BaseController
/**
* 获取定时采集规则详细信息
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:query')")
@PreAuthorize("@ss.hasPermi('system:rules:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(scheduleRulesService.selectScheduleRulesById(id));
}
/**
* 新增定时采集规则
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:add')")
@PreAuthorize("@ss.hasPermi('system:rules:add')")
@Log(title = "定时采集规则", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ScheduleRules scheduleRules)
@ -107,12 +81,10 @@ public class ScheduleRulesController extends BaseController
return toAjax(scheduleRulesService.insertScheduleRules(scheduleRules));
}
/**
* 修改定时采集规则
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:edit')")
@PreAuthorize("@ss.hasPermi('system:rules:edit')")
@Log(title = "定时采集规则", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ScheduleRules scheduleRules)
@ -120,16 +92,14 @@ public class ScheduleRulesController extends BaseController
return toAjax(scheduleRulesService.updateScheduleRules(scheduleRules));
}
/**
* 删除定时采集规则
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:remove')")
@PreAuthorize("@ss.hasPermi('system:rules:remove')")
@Log(title = "定时采集规则", businessType = BusinessType.DELETE)
@DeleteMapping("rule/{ids}")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(scheduleRulesService.deleteScheduleRulesByIds(ids));
}
}

@ -0,0 +1,106 @@
package com.alops.web.controller.exceptionController;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.AlarmRule;
import com.alops.system.service.IAlarmRuleService;
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;
/**
* 预警规则Controller
*
* @author ruoyi
* @date 2025-08-01
*/
@RestController
@RequestMapping("/system/rule")
public class AlarmRuleController extends BaseController
{
@Autowired
private IAlarmRuleService alarmRuleService;
/**
* 查询预警规则列表
*/
@PreAuthorize("@ss.hasPermi('system:rule:list')")
@GetMapping("/list")
public TableDataInfo list(AlarmRule alarmRule)
{
startPage();
List<AlarmRule> list = alarmRuleService.selectAlarmRuleList(alarmRule);
return getDataTable(list);
}
/**
* 导出预警规则列表
*/
@PreAuthorize("@ss.hasPermi('system:rule:export')")
@Log(title = "预警规则", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AlarmRule alarmRule)
{
List<AlarmRule> list = alarmRuleService.selectAlarmRuleList(alarmRule);
ExcelUtil<AlarmRule> util = new ExcelUtil<AlarmRule>(AlarmRule.class);
util.exportExcel(response, list, "预警规则数据");
}
/**
* 获取预警规则详细信息
*/
@PreAuthorize("@ss.hasPermi('system:rule:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(alarmRuleService.selectAlarmRuleById(id));
}
/**
* 新增预警规则
*/
@PreAuthorize("@ss.hasPermi('system:rule:add')")
@Log(title = "预警规则", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AlarmRule alarmRule)
{
return toAjax(alarmRuleService.insertAlarmRule(alarmRule));
}
/**
* 修改预警规则
*/
@PreAuthorize("@ss.hasPermi('system:rule:edit')")
@Log(title = "预警规则", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AlarmRule alarmRule)
{
return toAjax(alarmRuleService.updateAlarmRule(alarmRule));
}
/**
* 删除预警规则
*/
@PreAuthorize("@ss.hasPermi('system:rule:remove')")
@Log(title = "预警规则", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(alarmRuleService.deleteAlarmRuleByIds(ids));
}
}

@ -1,105 +0,0 @@
package com.alops.web.controller.exceptionController;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.AlertRuleCondition;
import com.alops.system.service.IAlertRuleConditionService;
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;
/**
* 请填写功能名称Controller
*
* @author ruoyi
* @date 2025-09-04
*/
@RestController
@RequestMapping("/system/condition")
public class AlertRuleConditionController extends BaseController
{
@Autowired
private IAlertRuleConditionService alertRuleConditionService;
/**
* 查询请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:condition:list')")
@GetMapping("/list")
public TableDataInfo list(AlertRuleCondition alertRuleCondition)
{
startPage();
List<AlertRuleCondition> list = alertRuleConditionService.selectAlertRuleConditionList(alertRuleCondition);
return getDataTable(list);
}
/**
* 导出请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:condition:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AlertRuleCondition alertRuleCondition)
{
List<AlertRuleCondition> list = alertRuleConditionService.selectAlertRuleConditionList(alertRuleCondition);
ExcelUtil<AlertRuleCondition> util = new ExcelUtil<AlertRuleCondition>(AlertRuleCondition.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
* 获取请填写功能名称详细信息
*/
@PreAuthorize("@ss.hasPermi('system:condition:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(alertRuleConditionService.selectAlertRuleConditionById(id));
}
/**
* 新增请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:condition:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AlertRuleCondition alertRuleCondition)
{
return toAjax(alertRuleConditionService.insertAlertRuleCondition(alertRuleCondition));
}
/**
* 修改请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:condition:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AlertRuleCondition alertRuleCondition)
{
return toAjax(alertRuleConditionService.updateAlertRuleCondition(alertRuleCondition));
}
/**
* 删除请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:condition:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(alertRuleConditionService.deleteAlertRuleConditionByIds(ids));
}
}

@ -1,164 +0,0 @@
package com.alops.web.controller.exceptionController;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.AlertRule;
import com.alops.system.domain.dto.AlertRuleAddDto;
import com.alops.system.service.IAlertLaunchService;
import com.alops.system.service.IAlertRuleService;
import com.sun.jna.platform.win32.Winspool;
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;
/**
* 请填写功能名称Controller
*
* @author ruoyi
* @date 2025-09-04
*/
@RestController
@RequestMapping("/system/rule")
public class AlertRuleController extends BaseController
{
@Autowired
private IAlertRuleService alertRuleService;
@Autowired
private IAlertLaunchService iAlertLaunchService;
//增加预警规则,生成对应的sql语句存入方法(只能针对个体表,表之间不能共同构成预警,特殊符号的规则只能有一个查询条件)
//1.拿到 //预警名称,预警级别,预警对应的表格,预警方式,预警的到站方 预警规则,预警模版 内容描述 启用状态,创建人
//+好几个规则条件实体类
//2.生成sql语句
//如果是如果是equ_gather直接根据组成条件构成查询语句,
//如果是其他表格除去组成条件构成的语句+通过equ_garher_id关联到equ_gather表,搜索出实体外+设备id和设备类型
//3.然后存入预警规则和预警规则条件表
/**
* 新增预警规则
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:add')")
@ApiOperation("增加预警规则")
@PostMapping("/add")
public AjaxResult addRule(@RequestBody AlertRuleAddDto dto) {
try {
AlertRule alertRule = alertRuleService.saveRule(dto);
return AjaxResult.success("预警规则新增成功", alertRule);
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("新增预警规则失败: " + e.getMessage());
}
}
//立即预警方法
//1.拿到预警规则,拿到查询语句(如果是change执行change的方法)和预警规则表的东西,进行查询,查询组成一个内从实体
//2.根据每次预警模版,+进行对应填入,根据预警方式发送信息,再存入预警信息实体类
//{设备id:{} 报错:{预警名称} 返回实体{自己看} }
//3.批量存入预警信息数据库
/**
* 立即执行预警带规则 ID 列表
*/
@PreAuthorize("@ss.hasPermi('equipment:rules:execute')")
@ApiOperation("立即执行预警")
@PostMapping("/executeImmediate")
public AjaxResult executeImmediate(@RequestBody Map<String, List<Long>> paramMap) {
try {
List<Long> ruleIds = paramMap.get("ruleIds");
if (ruleIds == null || ruleIds.isEmpty()) {
return AjaxResult.error("请选择至少一条规则");
}
iAlertLaunchService.executeImmediateAlerts(ruleIds); // 调用 Service 执行
return AjaxResult.success("立即预警任务已触发,存入成功,请查看");
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("执行立即预警失败: " + e.getMessage());
}
}
/**
* 查询请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:rule:list')")
@GetMapping("/list")
public TableDataInfo list(AlertRule alertRule)
{
startPage();
List<AlertRule> list = alertRuleService.selectAlertRuleList(alertRule);
return getDataTable(list);
}
/**
* 导出请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:rule:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AlertRule alertRule)
{
List<AlertRule> list = alertRuleService.selectAlertRuleList(alertRule);
ExcelUtil<AlertRule> util = new ExcelUtil<AlertRule>(AlertRule.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
* 获取请填写功能名称详细信息
*/
@PreAuthorize("@ss.hasPermi('system:rule:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(alertRuleService.selectAlertRuleById(id));
}
/**
* 新增请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:rule:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AlertRule alertRule)
{
return toAjax(alertRuleService.insertAlertRule(alertRule));
}
/**
* 修改请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:rule:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AlertRule alertRule)
{
return toAjax(alertRuleService.updateAlertRule(alertRule));
}
/**
* 删除请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:rule:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(alertRuleService.deleteAlertRuleByIds(ids));
}
}

@ -1,106 +0,0 @@
package com.alops.web.controller.exceptionController;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.DictAlarmParam;
import com.alops.system.service.IDictAlarmParamService;
import io.swagger.annotations.ApiImplicitParam;
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.*;
/**
* 请填写功能名称Controller
*
* @author ruoyi
* @date 2025-09-05
*/
@RestController
@RequestMapping("/system/param")
public class DictAlarmParamController extends BaseController
{
@Autowired
private IDictAlarmParamService dictAlarmParamService;
@ApiOperation("获取预警参数")
@PreAuthorize("@ss.hasPermi('system:param:byTable')")
@GetMapping("/byTable")
public AjaxResult getParamsByTableName(@RequestParam String tableName) {
return AjaxResult.success("获取预警参数成功",dictAlarmParamService.getParamsByTableName(tableName));
}
/**
* 查询请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:param:list')")
@GetMapping("/list")
public TableDataInfo list(DictAlarmParam dictAlarmParam)
{
startPage();
List<DictAlarmParam> list = dictAlarmParamService.selectDictAlarmParamList(dictAlarmParam);
return getDataTable(list);
}
/**
* 导出请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:param:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DictAlarmParam dictAlarmParam)
{
List<DictAlarmParam> list = dictAlarmParamService.selectDictAlarmParamList(dictAlarmParam);
ExcelUtil<DictAlarmParam> util = new ExcelUtil<DictAlarmParam>(DictAlarmParam.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
* 获取请填写功能名称详细信息
*/
@PreAuthorize("@ss.hasPermi('system:param:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dictAlarmParamService.selectDictAlarmParamById(id));
}
/**
* 新增请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:param:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DictAlarmParam dictAlarmParam)
{
return toAjax(dictAlarmParamService.insertDictAlarmParam(dictAlarmParam));
}
/**
* 修改请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:param:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DictAlarmParam dictAlarmParam)
{
return toAjax(dictAlarmParamService.updateDictAlarmParam(dictAlarmParam));
}
/**
* 删除请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:param:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dictAlarmParamService.deleteDictAlarmParamByIds(ids));
}
}

@ -9,8 +9,8 @@ import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.AlertMessage;
import com.alops.system.service.IAlertMessageService;
import com.alops.system.domain.FauSta;
import com.alops.system.service.IFauStaService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -22,87 +22,85 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 故障统计Controller
*
* @author ruoyi
* @date 2025-09-04
* @date 2025-08-01
*/
@RestController
@RequestMapping("/system/message")
public class AlertMessageController extends BaseController
@RequestMapping("/system/sta")
public class FauStaController extends BaseController
{
@Autowired
private IAlertMessageService alertMessageService;
private IFauStaService fauStaService;
/**
* 查询预警信息统计列表
* 查询故障统计列表
*/
@PreAuthorize("@ss.hasPermi('system:message:list')")
@PreAuthorize("@ss.hasPermi('system:sta:list')")
@GetMapping("/list")
public TableDataInfo list(AlertMessage alertMessage)
public TableDataInfo list(FauSta fauSta)
{
startPage();
List<AlertMessage> list = alertMessageService.selectAlertMessageList(alertMessage);
List<FauSta> list = fauStaService.selectFauStaList(fauSta);
return getDataTable(list);
}
/**
* 导出 预警信息列表
* 导出故障统计列表
*/
@PreAuthorize("@ss.hasPermi('system:message:export')")
@PreAuthorize("@ss.hasPermi('system:sta:export')")
@Log(title = "故障统计", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AlertMessage alertMessage)
public void export(HttpServletResponse response, FauSta fauSta)
{
List<AlertMessage> list = alertMessageService.selectAlertMessageList(alertMessage);
ExcelUtil<AlertMessage> util = new ExcelUtil<AlertMessage>(AlertMessage.class);
List<FauSta> list = fauStaService.selectFauStaList(fauSta);
ExcelUtil<FauSta> util = new ExcelUtil<FauSta>(FauSta.class);
util.exportExcel(response, list, "故障统计数据");
}
/**
* 获取预警信息
* 获取故障统计详细信息
*/
@PreAuthorize("@ss.hasPermi('system:message:query')")
@PreAuthorize("@ss.hasPermi('system:sta:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(alertMessageService.selectAlertMessageById(id));
return success(fauStaService.selectFauStaById(id));
}
/**
* 新增预警信息
* 新增故障统计
*/
@PreAuthorize("@ss.hasPermi('system:message:add')")
@PreAuthorize("@ss.hasPermi('system:sta:add')")
@Log(title = "故障统计", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AlertMessage alertMessage)
public AjaxResult add(@RequestBody FauSta fauSta)
{
return toAjax(alertMessageService.insertAlertMessage(alertMessage));
return toAjax(fauStaService.insertFauSta(fauSta));
}
/**
* 修改预警信息
* 修改故障统计
*/
@PreAuthorize("@ss.hasPermi('system:message:edit')")
@PreAuthorize("@ss.hasPermi('system:sta:edit')")
@Log(title = "故障统计", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AlertMessage alertMessage)
public AjaxResult edit(@RequestBody FauSta fauSta)
{
return toAjax(alertMessageService.updateAlertMessage(alertMessage));
return toAjax(fauStaService.updateFauSta(fauSta));
}
/**
* 删除预警信息
* 删除故障统计
*/
@PreAuthorize("@ss.hasPermi('system:message:remove')")
@PreAuthorize("@ss.hasPermi('system:sta:remove')")
@Log(title = "故障统计", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(alertMessageService.deleteAlertMessageByIds(ids));
return toAjax(fauStaService.deleteFauStaByIds(ids));
}
}

@ -1,105 +0,0 @@
package com.alops.web.controller.tool;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquGather;
import com.alops.system.service.IEquGatherService;
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;
/**
* 设备采集信息Controller
*
* @author ruoyi
* @date 2025-08-15
*/
@RestController
@RequestMapping("/system/gather")
public class EquGatherController extends BaseController
{
@Autowired
private IEquGatherService equGatherService;
/**
* 查询设备采集信息列表
*/
@PreAuthorize("@ss.hasPermi('system:gather:list')")
@GetMapping("/list")
public TableDataInfo list(EquGather equGather)
{
startPage();
List<EquGather> list = equGatherService.selectEquGatherList(equGather);
return getDataTable(list);
}
/**
* 导出设备采集信息列表
*/
@PreAuthorize("@ss.hasPermi('system:gather:export')")
@Log(title = "设备采集信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquGather equGather)
{
List<EquGather> list = equGatherService.selectEquGatherList(equGather);
ExcelUtil<EquGather> util = new ExcelUtil<EquGather>(EquGather.class);
util.exportExcel(response, list, "设备采集信息数据");
}
/**
* 获取设备采集信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:gather:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(equGatherService.selectEquGatherById(id));
}
/**
* 新增设备采集信息
*/
@PreAuthorize("@ss.hasPermi('system:gather:add')")
@Log(title = "设备采集信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquGather equGather)
{
return toAjax(equGatherService.insertEquGather(equGather));
}
/**
* 修改设备采集信息
*/
@PreAuthorize("@ss.hasPermi('system:gather:edit')")
@Log(title = "设备采集信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquGather equGather)
{
return toAjax(equGatherService.updateEquGather(equGather));
}
/**
* 删除设备采集信息
*/
@PreAuthorize("@ss.hasPermi('system:gather:remove')")
@Log(title = "设备采集信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(equGatherService.deleteEquGatherByIds(ids));
}
}

@ -1,105 +0,0 @@
package com.alops.web.controller.tool;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquInterface;
import com.alops.system.service.IEquInterfaceService;
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;
/**
* 端口运行状态Controller
*
* @author ruoyi
* @date 2025-08-20
*/
@RestController
@RequestMapping("/system/interface")
public class EquInterfaceController extends BaseController
{
@Autowired
private IEquInterfaceService equInterfaceService;
/**
* 查询端口运行状态列表
*/
@PreAuthorize("@ss.hasPermi('system:interface:list')")
@GetMapping("/list")
public TableDataInfo list(EquInterface equInterface)
{
startPage();
List<EquInterface> list = equInterfaceService.selectEquInterfaceList(equInterface);
return getDataTable(list);
}
/**
* 导出端口运行状态列表
*/
@PreAuthorize("@ss.hasPermi('system:interface:export')")
@Log(title = "端口运行状态", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquInterface equInterface)
{
List<EquInterface> list = equInterfaceService.selectEquInterfaceList(equInterface);
ExcelUtil<EquInterface> util = new ExcelUtil<EquInterface>(EquInterface.class);
util.exportExcel(response, list, "端口运行状态数据");
}
/**
* 获取端口运行状态详细信息
*/
@PreAuthorize("@ss.hasPermi('system:interface:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(equInterfaceService.selectEquInterfaceById(id));
}
/**
* 新增端口运行状态
*/
@PreAuthorize("@ss.hasPermi('system:interface:add')")
@Log(title = "端口运行状态", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquInterface equInterface)
{
return toAjax(equInterfaceService.insertEquInterface(equInterface));
}
/**
* 修改端口运行状态
*/
@PreAuthorize("@ss.hasPermi('system:interface:edit')")
@Log(title = "端口运行状态", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquInterface equInterface)
{
return toAjax(equInterfaceService.updateEquInterface(equInterface));
}
/**
* 删除端口运行状态
*/
@PreAuthorize("@ss.hasPermi('system:interface:remove')")
@Log(title = "端口运行状态", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(equInterfaceService.deleteEquInterfaceByIds(ids));
}
}

@ -1,105 +0,0 @@
package com.alops.web.controller.tool;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquRouting;
import com.alops.system.service.IEquRoutingService;
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;
/**
* 路由信息Controller
*
* @author ruoyi
* @date 2025-08-15
*/
@RestController
@RequestMapping("/system/routing")
public class EquRoutingController extends BaseController
{
@Autowired
private IEquRoutingService equRoutingService;
/**
* 查询路由信息列表
*/
@PreAuthorize("@ss.hasPermi('system:routing:list')")
@GetMapping("/list")
public TableDataInfo list(EquRouting equRouting)
{
startPage();
List<EquRouting> list = equRoutingService.selectEquRoutingList(equRouting);
return getDataTable(list);
}
/**
* 导出路由信息列表
*/
@PreAuthorize("@ss.hasPermi('system:routing:export')")
@Log(title = "路由信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquRouting equRouting)
{
List<EquRouting> list = equRoutingService.selectEquRoutingList(equRouting);
ExcelUtil<EquRouting> util = new ExcelUtil<EquRouting>(EquRouting.class);
util.exportExcel(response, list, "路由信息数据");
}
/**
* 获取路由信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:routing:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(equRoutingService.selectEquRoutingById(id));
}
/**
* 新增路由信息
*/
@PreAuthorize("@ss.hasPermi('system:routing:add')")
@Log(title = "路由信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquRouting equRouting)
{
return toAjax(equRoutingService.insertEquRouting(equRouting));
}
/**
* 修改路由信息
*/
@PreAuthorize("@ss.hasPermi('system:routing:edit')")
@Log(title = "路由信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquRouting equRouting)
{
return toAjax(equRoutingService.updateEquRouting(equRouting));
}
/**
* 删除路由信息
*/
@PreAuthorize("@ss.hasPermi('system:routing:remove')")
@Log(title = "路由信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(equRoutingService.deleteEquRoutingByIds(ids));
}
}

@ -1,105 +0,0 @@
package com.alops.web.controller.tool;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alops.common.annotation.Log;
import com.alops.common.core.controller.BaseController;
import com.alops.common.core.domain.AjaxResult;
import com.alops.common.core.page.TableDataInfo;
import com.alops.common.enums.BusinessType;
import com.alops.common.utils.poi.ExcelUtil;
import com.alops.system.domain.EquVeneer;
import com.alops.system.service.IEquVeneerService;
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;
/**
* 请填写功能名称Controller
*
* @author ruoyi
* @date 2025-08-15
*/
@RestController
@RequestMapping("/system/veneer")
public class EquVeneerController extends BaseController
{
@Autowired
private IEquVeneerService equVeneerService;
/**
* 查询请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:veneer:list')")
@GetMapping("/list")
public TableDataInfo list(EquVeneer equVeneer)
{
startPage();
List<EquVeneer> list = equVeneerService.selectEquVeneerList(equVeneer);
return getDataTable(list);
}
/**
* 导出请填写功能名称列表
*/
@PreAuthorize("@ss.hasPermi('system:veneer:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquVeneer equVeneer)
{
List<EquVeneer> list = equVeneerService.selectEquVeneerList(equVeneer);
ExcelUtil<EquVeneer> util = new ExcelUtil<EquVeneer>(EquVeneer.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
* 获取请填写功能名称详细信息
*/
@PreAuthorize("@ss.hasPermi('system:veneer:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(equVeneerService.selectEquVeneerById(id));
}
/**
* 新增请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:veneer:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquVeneer equVeneer)
{
return toAjax(equVeneerService.insertEquVeneer(equVeneer));
}
/**
* 修改请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:veneer:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquVeneer equVeneer)
{
return toAjax(equVeneerService.updateEquVeneer(equVeneer));
}
/**
* 删除请填写功能名称
*/
@PreAuthorize("@ss.hasPermi('system:veneer:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(equVeneerService.deleteEquVeneerByIds(ids));
}
}

@ -48,19 +48,7 @@ user:
lockTime: 10
# Spring配置
Spring:
# 邮件信息
mail:
host: smtp.qq.com
port: 465
username: 2028008386@qq.com
password: qdcptuazfndybjdd
protocol: smtp
properties:
mail.smtp.auth: true
mail.smtp.ssl.enable: true # QQ邮箱用 SSL
mail.smtp.starttls.enable: true
mail.smtp.starttls.required: true
spring:
# 资源信息
messages:
# 国际化资源文件路径
@ -101,10 +89,6 @@ Spring:
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
#邮件信息
# token配置
token:
@ -146,4 +130,3 @@ xss:
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*

@ -29,16 +29,8 @@
<dependency>
<groupId>com.alops</groupId>
<artifactId>alops-common</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>2.5.15</version>
</dependency>
</dependencies>
</project>

@ -0,0 +1,205 @@
package com.alops.system.domain;
import java.math.BigDecimal;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 预警规则对象 alarm_rule
*
* @author ruoyi
* @date 2025-08-01
*/
public class AlarmRule extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 规则ID */
private Long id;
/** 预警名称 */
@Excel(name = "预警名称")
private String ruleName;
/** 预警简述 */
@Excel(name = "预警简述")
private String description;
/** 设备参数(如:temperature/cpu_usage) */
@Excel(name = "设备参数(如:temperature/cpu_usage)")
private String paramName;
/** 对应的设备类型 */
@Excel(name = "对应的设备类型")
private String equType;
/** 比较运算符(>/=/<) */
@Excel(name = "比较运算符(>/=/<)")
private String compareOperator;
/** 触发阈值 */
@Excel(name = "触发阈值")
private BigDecimal paramValue;
/** 预警级别(1-5) */
@Excel(name = "预警级别(1-5)")
private Long alertLevel;
/** 预警消息模板 */
@Excel(name = "预警消息模板")
private String alertMessage;
/** 处理角色ID */
@Excel(name = "处理角色ID")
private Long roleId;
/** 通知邮箱 */
@Excel(name = "通知邮箱")
private String notifyEmail;
/** 启用状态(0-禁用,1-启用) */
@Excel(name = "启用状态(0-禁用,1-启用)")
private Long ruleStatus;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setRuleName(String ruleName)
{
this.ruleName = ruleName;
}
public String getRuleName()
{
return ruleName;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setParamName(String paramName)
{
this.paramName = paramName;
}
public String getParamName()
{
return paramName;
}
public void setEquType(String equType)
{
this.equType = equType;
}
public String getEquType()
{
return equType;
}
public void setCompareOperator(String compareOperator)
{
this.compareOperator = compareOperator;
}
public String getCompareOperator()
{
return compareOperator;
}
public void setParamValue(BigDecimal paramValue)
{
this.paramValue = paramValue;
}
public BigDecimal getParamValue()
{
return paramValue;
}
public void setAlertLevel(Long alertLevel)
{
this.alertLevel = alertLevel;
}
public Long getAlertLevel()
{
return alertLevel;
}
public void setAlertMessage(String alertMessage)
{
this.alertMessage = alertMessage;
}
public String getAlertMessage()
{
return alertMessage;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
public Long getRoleId()
{
return roleId;
}
public void setNotifyEmail(String notifyEmail)
{
this.notifyEmail = notifyEmail;
}
public String getNotifyEmail()
{
return notifyEmail;
}
public void setRuleStatus(Long ruleStatus)
{
this.ruleStatus = ruleStatus;
}
public Long getRuleStatus()
{
return ruleStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("ruleName", getRuleName())
.append("description", getDescription())
.append("paramName", getParamName())
.append("equType", getEquType())
.append("compareOperator", getCompareOperator())
.append("paramValue", getParamValue())
.append("alertLevel", getAlertLevel())
.append("alertMessage", getAlertMessage())
.append("roleId", getRoleId())
.append("notifyEmail", getNotifyEmail())
.append("ruleStatus", getRuleStatus())
.append("createTime", getCreateTime())
.toString();
}
}

@ -1,191 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 请填写功能名称对象 alert_rule
*
* @author ruoyi
* @date 2025-09-05
*/
public class AlertRule extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 预警规则名称 */
@Excel(name = "预警规则名称")
private String ruleName;
/** 预警级别 */
@Excel(name = "预警级别")
private Long severity;
/** 预警方式(email/message) */
@Excel(name = "预警方式(email/message)")
private String alertWay;
/** 预警到站方 */
@Excel(name = "预警到站方")
private String alertStation;
/** 预警规则内容描述 */
@Excel(name = "预警规则内容描述")
private String description;
/** 启用状态(0为启用) */
@Excel(name = "启用状态", readConverterExp = "0=为启用")
private Integer enable;
/** 表格名称 */
@Excel(name = "表格名称")
private String tableName;
/** 预警sql语句查询 */
@Excel(name = "预警sql语句查询")
private String alertSql;
/** 预警模版(参数用数据库命名法) */
@Excel(name = "预警模版", readConverterExp = "参=数用数据库命名法")
private String alertTemplate;
/** 预警类型 */
@Excel(name = "预警类型")
private String type;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setRuleName(String ruleName)
{
this.ruleName = ruleName;
}
public String getRuleName()
{
return ruleName;
}
public void setSeverity(Long severity)
{
this.severity = severity;
}
public Long getSeverity()
{
return severity;
}
public void setAlertWay(String alertWay)
{
this.alertWay = alertWay;
}
public String getAlertWay()
{
return alertWay;
}
public void setAlertStation(String alertStation)
{
this.alertStation = alertStation;
}
public String getAlertStation()
{
return alertStation;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setEnable(Integer enable)
{
this.enable = enable;
}
public Integer getEnable()
{
return enable;
}
public void setTableName(String tableName)
{
this.tableName = tableName;
}
public String getTableName()
{
return tableName;
}
public void setAlertSql(String alertSql)
{
this.alertSql = alertSql;
}
public String getAlertSql()
{
return alertSql;
}
public void setAlertTemplate(String alertTemplate)
{
this.alertTemplate = alertTemplate;
}
public String getAlertTemplate()
{
return alertTemplate;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("ruleName", getRuleName())
.append("severity", getSeverity())
.append("alertWay", getAlertWay())
.append("alertStation", getAlertStation())
.append("description", getDescription())
.append("enable", getEnable())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("tableName", getTableName())
.append("alertSql", getAlertSql())
.append("alertTemplate", getAlertTemplate())
.append("type", getType())
.toString();
}
}

@ -1,142 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 请填写功能名称对象 alert_rule_condition
*
* @author ruoyi
* @date 2025-09-04
*/
public class AlertRuleCondition extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 预警规则id */
@Excel(name = "预警规则id")
private Long alertRuleId;
/** 参数名称 */
@Excel(name = "参数名称")
private String paramName;
/** 比较符号 */
@Excel(name = "比较符号")
private String operator;
/** 比较值 */
@Excel(name = "比较值")
private String compareValue;
/** 与下一个条件的逻辑符号 */
@Excel(name = "与下一个条件的逻辑符号")
private String logicOperator;
/** 条件顺序 */
@Excel(name = "条件顺序")
private Long orderNo;
/** 比较值的类型 */
@Excel(name = "比较值的类型")
private String valueType;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setAlertRuleId(Long alertRuleId)
{
this.alertRuleId = alertRuleId;
}
public Long getAlertRuleId()
{
return alertRuleId;
}
public void setParamName(String paramName)
{
this.paramName = paramName;
}
public String getParamName()
{
return paramName;
}
public void setOperator(String operator)
{
this.operator = operator;
}
public String getOperator()
{
return operator;
}
public void setCompareValue(String compareValue)
{
this.compareValue = compareValue;
}
public String getCompareValue()
{
return compareValue;
}
public void setLogicOperator(String logicOperator)
{
this.logicOperator = logicOperator;
}
public String getLogicOperator()
{
return logicOperator;
}
public void setOrderNo(Long orderNo)
{
this.orderNo = orderNo;
}
public Long getOrderNo()
{
return orderNo;
}
public void setValueType(String valueType)
{
this.valueType = valueType;
}
public String getValueType()
{
return valueType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("alertRuleId", getAlertRuleId())
.append("paramName", getParamName())
.append("operator", getOperator())
.append("compareValue", getCompareValue())
.append("logicOperator", getLogicOperator())
.append("orderNo", getOrderNo())
.append("valueType", getValueType())
.toString();
}
}

@ -1,97 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 请填写功能名称对象 dict_alarm_param
*
* @author ruoyi
* @date 2025-09-05
*/
public class DictAlarmParam extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 参数名称 */
@Excel(name = "参数名称")
private String paramName;
/** 表名 */
@Excel(name = "表名")
private String tableName;
/** 参数名 */
@Excel(name = "参数名")
private String columnName;
/** 参数类型 */
@Excel(name = "参数类型")
private String paramType;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setParamName(String paramName)
{
this.paramName = paramName;
}
public String getParamName()
{
return paramName;
}
public void setTableName(String tableName)
{
this.tableName = tableName;
}
public String getTableName()
{
return tableName;
}
public void setColumnName(String columnName)
{
this.columnName = columnName;
}
public String getColumnName()
{
return columnName;
}
public void setParamType(String paramType)
{
this.paramType = paramType;
}
public String getParamType()
{
return paramType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("paramName", getParamName())
.append("tableName", getTableName())
.append("columnName", getColumnName())
.append("paramType", getParamType())
.toString();
}
}

@ -36,8 +36,8 @@ public class EquBase extends BaseEntity
private String ip;
/** 设备厂商 */
@Excel(name = "设备厂商id ")
private String manufacture;
@Excel(name = "设备厂商 ")
private EquManu manufacture;
/** 安装位置 id */
@Excel(name = "安装位置 id")
@ -73,6 +73,17 @@ public class EquBase extends BaseEntity
@Excel(name = "质保时间(年)")
private Long warranty;
/** 累积故障次数 */
@Excel(name = "累积故障次数")
private Long failureFrequency;
/** 累积维修次数 */
@Excel(name = "累积维修次数")
private Long repairFrequency;
/** 累积维修金额(元) */
@Excel(name = "累积维修金额(元)")
private BigDecimal repairCost;
/** 添加日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ -87,17 +98,6 @@ public class EquBase extends BaseEntity
/** 启用状态 */
@Excel(name = "启用状态")
private Long status;
/** 累积故障次数 */
@Excel(name = "累积故障次数")
private Long failureFrequency;
/** 累积维修次数 */
@Excel(name = "累积维修次数")
private Long repairFrequency;
/** 累积维修金额(元) */
@Excel(name = "累积维修金额(元)")
private BigDecimal repairCost;
public void setId(String id)
{
@ -139,12 +139,12 @@ public class EquBase extends BaseEntity
return ip;
}
public void setManufacture(String manufacture)
public void setManufacture(EquManu manufacture)
{
this.manufacture = manufacture;
}
public String getManufacture()
public EquManu getManufacture()
{
return manufacture;
}
@ -229,65 +229,64 @@ public class EquBase extends BaseEntity
return warranty;
}
public void setCreateDate(Date createDate)
public void setFailureFrequency(Long failureFrequency)
{
this.createDate = createDate;
this.failureFrequency = failureFrequency;
}
public Date getCreateDate()
public Long getFailureFrequency()
{
return createDate;
return failureFrequency;
}
public void setUpdateDate(Date updateDate)
public void setRepairFrequency(Long repairFrequency)
{
this.updateDate = updateDate;
this.repairFrequency = repairFrequency;
}
public Date getUpdateDate()
public Long getRepairFrequency()
{
return updateDate;
return repairFrequency;
}
public void setStatus(Long status)
public void setRepairCost(BigDecimal repairCost)
{
this.status = status;
this.repairCost = repairCost;
}
public Long getStatus()
public BigDecimal getRepairCost()
{
return status;
return repairCost;
}
public void setFailureFrequency(Long failureFrequency)
public void setCreateDate(Date createDate)
{
this.failureFrequency = failureFrequency;
this.createDate = createDate;
}
public Long getFailureFrequency()
public Date getCreateDate()
{
return failureFrequency;
return createDate;
}
public void setRepairFrequency(Long repairFrequency)
public void setUpdateDate(Date updateDate)
{
this.repairFrequency = repairFrequency;
this.updateDate = updateDate;
}
public Long getRepairFrequency()
public Date getUpdateDate()
{
return repairFrequency;
return updateDate;
}
public void setRepairCost(BigDecimal repairCost)
public void setStatus(Long status)
{
this.repairCost = repairCost;
this.status = status;
}
public BigDecimal getRepairCost()
public Long getStatus()
{
return repairCost;
return status;
}
@Override
@ -306,15 +305,14 @@ public class EquBase extends BaseEntity
.append("lifeCycle", getLifeCycle())
.append("serviceTime", getServiceTime())
.append("warranty", getWarranty())
.append("failureFrequency", getFailureFrequency())
.append("repairFrequency", getRepairFrequency())
.append("repairCost", getRepairCost())
.append("createBy", getCreateBy())
.append("createDate", getCreateDate())
.append("updateBy", getUpdateBy())
.append("updateDate", getUpdateDate())
.append("status", getStatus())
.append("failureFrequency", getFailureFrequency())
.append("repairFrequency", getRepairFrequency())
.append("repairCost", getRepairCost())
.toString();
}
}

@ -8,15 +8,13 @@ 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.ToStringStyle;
import org.apache.ibatis.annotations.Mapper;
/**
* 设备采集信息对象 equ_gather
*
* @author ruoyi
* @date 2025-08-15
* @date 2025-08-01
*/
public class EquGather extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -77,22 +75,6 @@ public class EquGather extends BaseEntity
@Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date gatherTime;
/** 输入电压状态(Normal/UnderVoltage) */
@Excel(name = "输入电压状态(Normal/UnderVoltage)")
private String volInStatus;
/** 输出电压状态(Normal/UnderVoltage) */
@Excel(name = "输出电压状态(Normal/UnderVoltage)")
private String volOutStatus;
/** 风扇转速状态(Normal/Abnormal) */
@Excel(name = "风扇转速状态(Normal/Abnormal)")
private String fanSpeedStatus;
/** 设备持续运行时长(如365天12小时) */
@Excel(name = "设备持续运行时长(如365天12小时)")
private String contWorkPeriod;
public void setId(String id)
{
this.id = id;
@ -233,46 +215,6 @@ public class EquGather extends BaseEntity
return gatherTime;
}
public void setVolInStatus(String volInStatus)
{
this.volInStatus = volInStatus;
}
public String getVolInStatus()
{
return volInStatus;
}
public void setVolOutStatus(String volOutStatus)
{
this.volOutStatus = volOutStatus;
}
public String getVolOutStatus()
{
return volOutStatus;
}
public void setFanSpeedStatus(String fanSpeedStatus)
{
this.fanSpeedStatus = fanSpeedStatus;
}
public String getFanSpeedStatus()
{
return fanSpeedStatus;
}
public void setContWorkPeriod(String contWorkPeriod)
{
this.contWorkPeriod = contWorkPeriod;
}
public String getContWorkPeriod()
{
return contWorkPeriod;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -290,10 +232,6 @@ public class EquGather extends BaseEntity
.append("logOnline", getLogOnline())
.append("logSys", getLogSys())
.append("gatherTime", getGatherTime())
.append("volInStatus", getVolInStatus())
.append("volOutStatus", getVolOutStatus())
.append("fanSpeedStatus", getFanSpeedStatus())
.append("contWorkPeriod", getContWorkPeriod())
.toString();
}
}

@ -10,16 +10,16 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 端口运行状态对象 equ_interface
* 设备接口信息对象 equ_interface
*
* @author ruoyi
* @date 2025-08-20
* @date 2025-08-01
*/
public class EquInterface extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
/** 接口 id */
private String id;
/** 设备 ID */
@ -31,17 +31,17 @@ public class EquInterface extends BaseEntity
@Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date gatherTime;
/** 端口运行与否(UP/DOWN(true/false)) */
@Excel(name = "端口运行与否(UP/DOWN(true/false))")
private String running;
/** 端口运行与否(UP/DOWN) */
@Excel(name = "端口运行与否(UP/DOWN)")
private Integer running;
/** 传输速率(Mbps) */
@Excel(name = "传输速率(Mbps)")
private Long rate;
/** 通信模式字典值(null/half/auto) */
@Excel(name = "通信模式字典值(null/half/auto)")
private String commuicateMode;
/** 通信模式字典值(0/1/2) */
@Excel(name = "通信模式字典值(0/1/2)")
private Long commuicateMode;
/** 出方向流量(bps) */
@Excel(name = "出方向流量(bps)")
@ -51,9 +51,9 @@ public class EquInterface extends BaseEntity
@Excel(name = "入方向流量(bps)")
private Long inFlow;
/** 入方向带宽占有率(%) */
@Excel(name = "入方向带宽占有率(%)")
private BigDecimal inBandwidth;
/** 带宽占有率(%) */
@Excel(name = "带宽占有率(%)")
private BigDecimal bandwidth;
/** 丢包率(%) */
@Excel(name = "丢包率(%)")
@ -63,18 +63,6 @@ public class EquInterface extends BaseEntity
@Excel(name = "错包率(%)")
private BigDecimal errorRate;
/** 采集关联外键 */
@Excel(name = "采集关联外键")
private String equGatherId;
/** 接口id */
@Excel(name = "接口id")
private String interfaceId;
/** 出方向带宽占有率(%) */
@Excel(name = "出方向带宽占有率(%)")
private BigDecimal outBandwidth;
public void setId(String id)
{
this.id = id;
@ -105,12 +93,12 @@ public class EquInterface extends BaseEntity
return gatherTime;
}
public void setRunning(String running)
public void setRunning(Integer running)
{
this.running = running;
}
public String getRunning()
public Integer getRunning()
{
return running;
}
@ -125,12 +113,12 @@ public class EquInterface extends BaseEntity
return rate;
}
public void setCommuicateMode(String commuicateMode)
public void setCommuicateMode(Long commuicateMode)
{
this.commuicateMode = commuicateMode;
}
public String getCommuicateMode()
public Long getCommuicateMode()
{
return commuicateMode;
}
@ -155,14 +143,14 @@ public class EquInterface extends BaseEntity
return inFlow;
}
public void setInBandwidth(BigDecimal inBandwidth)
public void setBandwidth(BigDecimal bandwidth)
{
this.inBandwidth = inBandwidth;
this.bandwidth = bandwidth;
}
public BigDecimal getInBandwidth()
public BigDecimal getBandwidth()
{
return inBandwidth;
return bandwidth;
}
public void setLossRate(BigDecimal lossRate)
@ -185,36 +173,6 @@ public class EquInterface extends BaseEntity
return errorRate;
}
public void setEquGatherId(String equGatherId)
{
this.equGatherId = equGatherId;
}
public String getEquGatherId()
{
return equGatherId;
}
public void setInterfaceId(String interfaceId)
{
this.interfaceId = interfaceId;
}
public String getInterfaceId()
{
return interfaceId;
}
public void setOutBandwidth(BigDecimal outBandwidth)
{
this.outBandwidth = outBandwidth;
}
public BigDecimal getOutBandwidth()
{
return outBandwidth;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -226,12 +184,9 @@ public class EquInterface extends BaseEntity
.append("commuicateMode", getCommuicateMode())
.append("outFlow", getOutFlow())
.append("inFlow", getInFlow())
.append("inBandwidth", getInBandwidth())
.append("bandwidth", getBandwidth())
.append("lossRate", getLossRate())
.append("errorRate", getErrorRate())
.append("equGatherId", getEquGatherId())
.append("interfaceId", getInterfaceId())
.append("outBandwidth", getOutBandwidth())
.toString();
}
}

@ -1,236 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.ibatis.annotations.Mapper;
/**
* OID配置信息对象 equ_oid
*
* @author ruoyi
* @date 2025-08-15
*/
public class EquOid extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 实际的OID值 */
@Excel(name = "实际的OID值")
private String oid;
/** OID参数名称(唯一业务标识) */
@Excel(name = "OID参数名称", readConverterExp = "唯=一业务标识")
private String param;
/** 存储表名 */
@Excel(name = "存储表名")
private String storeTable;
/** 单个计算规则表达式 */
@Excel(name = "单个计算规则表达式")
private String convertRule;
/** 合成组名,多个OID合成字段时相同 */
@Excel(name = "合成组名,多个OID合成字段时相同")
private String combineGroup;
/** 是否是高位字段,合成64位时用,高为1 */
@Excel(name = "是否是高位字段,合成64位时用,高为1")
private Integer isHighPart;
/** 厂商ID */
@Excel(name = "厂商ID")
private String manufacturerId;
/** 截取方式规则(1最后一个非 0 值2 方式 2:每行索引 + 最后词 方式 3:单值 4 路由专用) */
@Excel(name = "截取方式规则", readConverterExp = "1=最后一个非,0=,值=2,方=式,2=:每行索引,+=,最=后词,方=式,3=:单值,4=,路=由专用")
private String cutRule;
/** 是否一个OID对应多个参数 */
@Excel(name = "是否一个OID对应多个参数")
private Integer multiParam;
/** 子参数组合组标识 */
@Excel(name = "子参数组合组标识")
private String subParamGroup;
/** 描述说明 */
@Excel(name = "描述说明")
private String description;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 是否启用及启用方式 */
@Excel(name = "是否启用及启用方式")
private Integer enabled;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setOid(String oid)
{
this.oid = oid;
}
public String getOid()
{
return oid;
}
public void setParam(String param)
{
this.param = param;
}
public String getParam()
{
return param;
}
public void setStoreTable(String storeTable)
{
this.storeTable = storeTable;
}
public String getStoreTable()
{
return storeTable;
}
public void setConvertRule(String convertRule)
{
this.convertRule = convertRule;
}
public String getConvertRule()
{
return convertRule;
}
public void setCombineGroup(String combineGroup)
{
this.combineGroup = combineGroup;
}
public String getCombineGroup()
{
return combineGroup;
}
public void setIsHighPart(Integer isHighPart)
{
this.isHighPart = isHighPart;
}
public Integer getIsHighPart()
{
return isHighPart;
}
public void setManufacturerId(String manufacturerId)
{
this.manufacturerId = manufacturerId;
}
public String getManufacturerId()
{
return manufacturerId;
}
public void setCutRule(String cutRule)
{
this.cutRule = cutRule;
}
public String getCutRule()
{
return cutRule;
}
public void setMultiParam(Integer multiParam)
{
this.multiParam = multiParam;
}
public Integer getMultiParam()
{
return multiParam;
}
public void setSubParamGroup(String subParamGroup)
{
this.subParamGroup = subParamGroup;
}
public String getSubParamGroup()
{
return subParamGroup;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setUnit(String unit)
{
this.unit = unit;
}
public String getUnit()
{
return unit;
}
public void setEnabled(Integer enabled)
{
this.enabled = enabled;
}
public Integer getEnabled()
{
return enabled;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("oid", getOid())
.append("param", getParam())
.append("storeTable", getStoreTable())
.append("convertRule", getConvertRule())
.append("combineGroup", getCombineGroup())
.append("isHighPart", getIsHighPart())
.append("manufacturerId", getManufacturerId())
.append("cutRule", getCutRule())
.append("multiParam", getMultiParam())
.append("subParamGroup", getSubParamGroup())
.append("description", getDescription())
.append("unit", getUnit())
.append("enabled", getEnabled())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -1,99 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.ibatis.annotations.Mapper;
/**
* 路由信息对象 equ_routing
*
* @author ruoyi
* @date 2025-08-15
*/
public class EquRouting extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private String id;
/** 设备采集id */
@Excel(name = "设备采集id")
private String equGatherId;
/** 目的地址 (ipv4/ipv6网段) */
@Excel(name = "目的地址 (ipv4/ipv6网段)")
private String desAddress;
/** 子网掩码 */
@Excel(name = "子网掩码")
private String subnetMask;
/** 下一跳地址 (ipv4/ipv6网段) */
@Excel(name = "下一跳地址 (ipv4/ipv6网段)")
private String nextHop;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setEquGatherId(String equGatherId)
{
this.equGatherId = equGatherId;
}
public String getEquGatherId()
{
return equGatherId;
}
public void setDesAddress(String desAddress)
{
this.desAddress = desAddress;
}
public String getDesAddress()
{
return desAddress;
}
public void setSubnetMask(String subnetMask)
{
this.subnetMask = subnetMask;
}
public String getSubnetMask()
{
return subnetMask;
}
public void setNextHop(String nextHop)
{
this.nextHop = nextHop;
}
public String getNextHop()
{
return nextHop;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("equGatherId", getEquGatherId())
.append("desAddress", getDesAddress())
.append("subnetMask", getSubnetMask())
.append("nextHop", getNextHop())
.toString();
}
}

@ -1,101 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.ibatis.annotations.Mapper;
/**
* 网络配置对象 equ_valn
*
* @author ruoyi
* @date 2025-08-09
*/
public class EquValn extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 设备id */
@Excel(name = "设备id")
private String equId;
/** VLan管理id */
@Excel(name = "VLan管理id")
private String mainId;
/** ipv4地址 */
@Excel(name = "ipv4地址")
private String ipAddress;
/** 子网掩码 */
@Excel(name = "子网掩码")
private String subnetMask;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setEquId(String equId)
{
this.equId = equId;
}
public String getEquId()
{
return equId;
}
public void setMainId(String mainId)
{
this.mainId = mainId;
}
public String getMainId()
{
return mainId;
}
public void setIpAddress(String ipAddress)
{
this.ipAddress = ipAddress;
}
public String getIpAddress()
{
return ipAddress;
}
public void setSubnetMask(String subnetMask)
{
this.subnetMask = subnetMask;
}
public String getSubnetMask()
{
return subnetMask;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("equId", getEquId())
.append("mainId", getMainId())
.append("ipAddress", getIpAddress())
.append("subnetMask", getSubnetMask())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.toString();
}
}

@ -1,84 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.ibatis.annotations.Mapper;
/**
* 请填写功能名称对象 equ_veneer
*
* @author ruoyi
* @date 2025-08-15
*/
public class EquVeneer extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private String id;
/** 设备的一个单板的运行id */
@Excel(name = "设备的一个单板的运行id")
private String veneerId;
/** 单板运行状态校准值(Online/Offline/Fault) */
@Excel(name = "单板运行状态校准值", readConverterExp = "O=nline/Offline/Fault")
private String veneerStatus;
/** 采集id */
@Excel(name = "采集id")
private String equGatherId;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setVeneerId(String veneerId)
{
this.veneerId = veneerId;
}
public String getVeneerId()
{
return veneerId;
}
public void setVeneerStatus(String veneerStatus)
{
this.veneerStatus = veneerStatus;
}
public String getVeneerStatus()
{
return veneerStatus;
}
public void setEquGatherId(String equGatherId)
{
this.equGatherId = equGatherId;
}
public String getEquGatherId()
{
return equGatherId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("veneerId", getVeneerId())
.append("veneerStatus", getVeneerStatus())
.append("equGatherId", getEquGatherId())
.toString();
}
}

@ -1,116 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.ibatis.annotations.Mapper;
/**
* 请填写功能名称对象 equ_vlan
*
* @author ruoyi
* @date 2025-08-15
*/
public class EquVlan extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private String id;
/** 采集ID */
@Excel(name = "采集ID")
private String equGatherId;
/** vlan的ip地址 */
@Excel(name = "vlan的ip地址")
private String mainId;
/** IPv4地址 */
@Excel(name = "IPv4地址")
private String ipAddress;
/** 掩码格式 */
@Excel(name = "掩码格式")
private String subnetMask;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String vlanId;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setEquGatherId(String equGatherId)
{
this.equGatherId = equGatherId;
}
public String getEquGatherId()
{
return equGatherId;
}
public void setMainId(String mainId)
{
this.mainId = mainId;
}
public String getMainId()
{
return mainId;
}
public void setIpAddress(String ipAddress)
{
this.ipAddress = ipAddress;
}
public String getIpAddress()
{
return ipAddress;
}
public void setSubnetMask(String subnetMask)
{
this.subnetMask = subnetMask;
}
public String getSubnetMask()
{
return subnetMask;
}
public void setVlanId(String vlanId)
{
this.vlanId = vlanId;
}
public String getVlanId()
{
return vlanId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("equGatherId", getEquGatherId())
.append("mainId", getMainId())
.append("ipAddress", getIpAddress())
.append("subnetMask", getSubnetMask())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("vlanId", getVlanId())
.toString();
}
}

@ -9,29 +9,29 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 故障统计对象 alert_message
* 故障统计对象 fau_sta
*
* @author ruoyi
* @date 2025-09-04
* @date 2025-08-01
*/
public class AlertMessage extends BaseEntity
public class FauSta extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
/** 故障ID */
private Long id;
/** 设备ID */
@Excel(name = "设备ID")
private String equId;
/** 预警现象简述 */
@Excel(name = "预警现象简述")
/** 故障现象简述 */
@Excel(name = "故障现象简述")
private String description;
/** 预警类型(枚举表名) */
@Excel(name = "预警类型(枚举表名)")
private String type;
/** 故障类型(枚举) */
@Excel(name = "故障类型(枚举)")
private Long type;
/** 设备类型 */
@Excel(name = "设备类型")
@ -46,7 +46,7 @@ public class AlertMessage extends BaseEntity
private String solution;
/** 故障级别(1-5级) */
@Excel(name = "预警级别(1-5级)")
@Excel(name = "故障级别(1-5级)")
private Long level;
/** 发生时间 */
@ -101,12 +101,12 @@ public class AlertMessage extends BaseEntity
return description;
}
public void setType(String type)
public void setType(Long type)
{
this.type = type;
}
public String getType()
public Long getType()
{
return type;
}

@ -1,83 +0,0 @@
package com.alops.system.domain;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 站内信对象 internal_message
*
* @author ruoyi
* @date 2025-09-04
*/
public class InternalMessage extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 接收用户ID */
@Excel(name = "接收用户ID")
private Long userId;
/** 消息内容 */
@Excel(name = "消息内容")
private String content;
/** 消息状态(unread/read) */
@Excel(name = "消息状态(unread/read)")
private String status;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("userId", getUserId())
.append("content", getContent())
.append("status", getStatus())
.append("createTime", getCreateTime())
.toString();
}
}

@ -1,18 +0,0 @@
package com.alops.system.domain.dto;
import com.alops.system.domain.AlertRule;
import com.alops.system.domain.AlertRuleCondition;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AlertRuleAddDto {
private AlertRule alertRule;
private List<AlertRuleCondition> alertRuleConditionList;
}

@ -1,17 +0,0 @@
package com.alops.system.domain.vo;
public class Code {
// 通用状态
public static final int SUCCESS = 200; // 成功
public static final int FAIL = 500; // 失败
public static final int PARTIAL = 206; // 部分成功
// 业务相关状态码(可扩展)
public static final int DEVICE_NOT_FOUND = 1001;
public static final int SNMP_QUERY_FAIL = 1002;
public static final int DB_INSERT_FAIL = 1003;
//后续业务码都放这里
}

@ -1,20 +0,0 @@
package com.alops.system.domain.vo;
import com.alops.system.domain.EquOid;
import java.util.List;
import java.util.Map;
public class EquGatherInsertInfo {
private Map<String, List<EquOid>> oidsByTable; // List 表格 OID 分组
private String equGatherId; // 主表主键,作为外键使用
public EquGatherInsertInfo(Map<String, List<EquOid>> oidsByTable, String equGatherId) {
this.oidsByTable = oidsByTable;
this.equGatherId = equGatherId;
}
public Map<String, List<EquOid>> getOidsByTable() { return oidsByTable; }
public String getEquGatherId() { return equGatherId; }
}

@ -1,17 +0,0 @@
package com.alops.system.domain.vo;
import com.alops.system.domain.EquGather;
import com.alops.system.domain.EquInterface;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EquGatherResult {
private EquGather gather;
private List<EquInterface> interfaces;
}

@ -1,20 +0,0 @@
package com.alops.system.domain.vo;
import com.alops.system.domain.EquGather;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GatherEntities {
private EquGather equGather; // 主表
private Map<String, List<Object>> subEntities = new HashMap<>();
}

@ -1,295 +0,0 @@
package com.alops.system.domain.vo;
import com.alops.common.annotation.Excel;
import com.alops.common.core.domain.BaseEntity;
import com.alops.system.domain.EquManu;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class queryEquBaseVO extends BaseEntity {
/**
* 设备基本信息对象 equ_base
*
* @author ruoyi
* @date 2025-08-01
*/
private static final long serialVersionUID = 1L;
/** 设备唯一标识 */
private String id;
/** 设备名称 */
@Excel(name = "设备名称")
private String name;
/** 设备版本 */
@Excel(name = "设备版本")
private String version;
/** 带外管理 IP */
@Excel(name = "带外管理 IP")
private String ip;
// /** 设备厂商 */
// @Excel(name = "设备厂商 ")
// private EquManu manufacture;
/** 设备厂商 */
@Excel(name = "设备厂商id ")
private String manuId;
/** 设备厂商 */
@Excel(name = "设备厂商名称 ")
private String manuName;
/** 安装位置 id */
@Excel(name = "安装位置 id")
private String location;
/** 设备类型 id */
@Excel(name = "设备类型 id")
private String equType;
/** 设备管理员 id */
@Excel(name = "设备管理员 id")
private Long inCharge;
/** 出厂日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date releaseDate;
/** 安装日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date installDate;
/** 预计年限(年) */
@Excel(name = "预计年限(年)")
private Long lifeCycle;
/** 服役年限(年) */
@Excel(name = "服役年限(年)")
private Long serviceTime;
/** 质保时间(年) */
@Excel(name = "质保时间(年)")
private Long warranty;
/** 添加日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDate;
/** 最后修改日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后修改日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateDate;
/** 启用状态 */
@Excel(name = "启用状态")
private Long status;
/** 累积故障次数 */
@Excel(name = "累积故障次数")
private Long failureFrequency;
/** 累积维修次数 */
@Excel(name = "累积维修次数")
private Long repairFrequency;
/** 累积维修金额(元) */
@Excel(name = "累积维修金额(元)")
private BigDecimal repairCost;
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 setVersion(String version)
{
this.version = version;
}
public String getVersion()
{
return version;
}
public void setIp(String ip)
{
this.ip = ip;
}
public String getIp()
{
return ip;
}
public void setLocation(String location)
{
this.location = location;
}
public String getLocation()
{
return location;
}
public void setEquType(String equType)
{
this.equType = equType;
}
public String getEquType()
{
return equType;
}
public void setInCharge(Long inCharge)
{
this.inCharge = inCharge;
}
public Long getInCharge()
{
return inCharge;
}
public void setReleaseDate(Date releaseDate)
{
this.releaseDate = releaseDate;
}
public Date getReleaseDate()
{
return releaseDate;
}
public void setInstallDate(Date installDate)
{
this.installDate = installDate;
}
public Date getInstallDate()
{
return installDate;
}
public void setLifeCycle(Long lifeCycle)
{
this.lifeCycle = lifeCycle;
}
public Long getLifeCycle()
{
return lifeCycle;
}
public void setServiceTime(Long serviceTime)
{
this.serviceTime = serviceTime;
}
public Long getServiceTime()
{
return serviceTime;
}
public void setWarranty(Long warranty)
{
this.warranty = warranty;
}
public Long getWarranty()
{
return warranty;
}
public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}
public Date getCreateDate()
{
return createDate;
}
public void setUpdateDate(Date updateDate)
{
this.updateDate = updateDate;
}
public Date getUpdateDate()
{
return updateDate;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("version", getVersion())
.append("ip", getIp())
.append("manuId", getManuId())
.append("manuName", getManuName())
.append("location", getLocation())
.append("equType", getEquType())
.append("inCharge", getInCharge())
.append("releaseDate", getReleaseDate())
.append("installDate", getInstallDate())
.append("lifeCycle", getLifeCycle())
.append("serviceTime", getServiceTime())
.append("warranty", getWarranty())
.append("createBy", getCreateBy())
.append("createDate", getCreateDate())
.append("updateBy", getUpdateBy())
.append("updateDate", getUpdateDate())
.append("status", getStatus())
.append("failureFrequency", getFailureFrequency())
.append("repairFrequency", getRepairFrequency())
.append("repairCost", getRepairCost())
.toString();
}
}

@ -0,0 +1,64 @@
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);
}

@ -1,73 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.AlertMessage;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* 故障统计Mapper接口
*
* @author ruoyi
* @date 2025-09-04
*/
@Mapper
public interface AlertMessageMapper
{
/**
* 批量插入预警消息
* @param messages 消息列表
* @return 受影响行数
*/
int batchInsert(List<AlertMessage> messages);
;
/**
* 查询故障统计
*
* @param id 故障统计主键
* @return 故障统计
*/
public AlertMessage selectAlertMessageById(Long id);
/**
* 查询故障统计列表
*
* @param alertMessage 故障统计
* @return 故障统计集合
*/
public List<AlertMessage> selectAlertMessageList(AlertMessage alertMessage);
/**
* 新增故障统计
*
* @param alertMessage 故障统计
* @return 结果
*/
public int insertAlertMessage(AlertMessage alertMessage);
/**
* 修改故障统计
*
* @param alertMessage 故障统计
* @return 结果
*/
public int updateAlertMessage(AlertMessage alertMessage);
/**
* 删除故障统计
*
* @param id 故障统计主键
* @return 结果
*/
public int deleteAlertMessageById(Long id);
/**
* 批量删除故障统计
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteAlertMessageByIds(Long[] ids);
}

@ -1,72 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.AlertRuleCondition;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* 请填写功能名称Mapper接口
*
* @author ruoyi
* @date 2025-09-04
*/
@Mapper
public interface AlertRuleConditionMapper
{
/**
* 根据预警规则ID查询对应的规则条件
* @param ruleId 预警规则ID整型
* @return AlertRuleCondition 列表
*/
List<AlertRuleCondition> findByRuleId(@Param("ruleId") Long ruleId);
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public AlertRuleCondition selectAlertRuleConditionById(Long id);
/**
* 查询请填写功能名称列表
*
* @param alertRuleCondition 请填写功能名称
* @return 请填写功能名称集合
*/
public List<AlertRuleCondition> selectAlertRuleConditionList(AlertRuleCondition alertRuleCondition);
/**
* 新增请填写功能名称
*
* @param alertRuleCondition 请填写功能名称
* @return 结果
*/
public int insertAlertRuleCondition(AlertRuleCondition alertRuleCondition);
/**
* 修改请填写功能名称
*
* @param alertRuleCondition 请填写功能名称
* @return 结果
*/
public int updateAlertRuleCondition(AlertRuleCondition alertRuleCondition);
/**
* 删除请填写功能名称
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteAlertRuleConditionById(Long id);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteAlertRuleConditionByIds(Long[] ids);
}

@ -1,69 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.AlertRule;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* 请填写功能名称Mapper接口
*
* @author ruoyi
* @date 2025-09-05
*/
@Mapper
public interface AlertRuleMapper
{
//根据id组,批量返回
// Mapper 接口
List<AlertRule> selectByIds(@Param("list") List<Long> ids);
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public AlertRule selectAlertRuleById(Long id);
/**
* 查询请填写功能名称列表
*
* @param alertRule 请填写功能名称
* @return 请填写功能名称集合
*/
public List<AlertRule> selectAlertRuleList(AlertRule alertRule);
/**
* 新增请填写功能名称
*
* @param alertRule 请填写功能名称
* @return 结果
*/
public int insertAlertRule(AlertRule alertRule);
/**
* 修改请填写功能名称
*
* @param alertRule 请填写功能名称
* @return 结果
*/
public int updateAlertRule(AlertRule alertRule);
/**
* 删除请填写功能名称
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteAlertRuleById(Long id);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteAlertRuleByIds(Long[] ids);
}

@ -1,67 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.DictAlarmParam;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* 请填写功能名称Mapper接口
*
* @author ruoyi
* @date 2025-09-05
*/
@Mapper
public interface DictAlarmParamMapper
{
List<DictAlarmParam> selectByTableName(@Param("tableName") String tableName);
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public DictAlarmParam selectDictAlarmParamById(Long id);
/**
* 查询请填写功能名称列表
*
* @param dictAlarmParam 请填写功能名称
* @return 请填写功能名称集合
*/
public List<DictAlarmParam> selectDictAlarmParamList(DictAlarmParam dictAlarmParam);
/**
* 新增请填写功能名称
*
* @param dictAlarmParam 请填写功能名称
* @return 结果
*/
public int insertDictAlarmParam(DictAlarmParam dictAlarmParam);
/**
* 修改请填写功能名称
*
* @param dictAlarmParam 请填写功能名称
* @return 结果
*/
public int updateDictAlarmParam(DictAlarmParam dictAlarmParam);
/**
* 删除请填写功能名称
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteDictAlarmParamById(Long id);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDictAlarmParamByIds(Long[] ids);
}

@ -2,9 +2,7 @@ package com.alops.system.mapper;
import com.alops.system.domain.EquBase;
import com.alops.system.domain.dto.EquBaseQueryDto;
import com.alops.system.domain.vo.queryEquBaseVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import java.util.List;
@ -18,18 +16,6 @@ import java.util.List;
@Mapper
public interface EquBaseMapper
{
@Update("DELETE FROM equ_interface")
void deleteEquInterface();
@Update("DELETE FROM equ_routing")
void deleteEquRouting();
@Update("DELETE FROM equ_veneer")
void deleteEquVeneer();
@Update("DELETE FROM equ_vlan")
void deleteEquVlan();
/**
* 查询设备基本信息
*
@ -39,20 +25,12 @@ public interface EquBaseMapper
public EquBase selectEquBaseById(String id);
/**
* 查询设备基本信息和厂商信息
* 查询设备基本信息列表
*
* @param equBaseQueryDto 设备基本信息
* @return 设备基本信息集合
*/
public List<queryEquBaseVO> selectEquBaseList(EquBaseQueryDto equBaseQueryDto);
/**
* 查询设备基本信息列表
*
*
*/
public List<EquBase> findEquBaseList();
public List<EquBase> selectEquBaseList(EquBaseQueryDto equBaseQueryDto);
/**
* 新增设备基本信息

@ -1,73 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.EquGather;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* 设备采集信息Mapper接口
*
* @author ruoyi
* @date 2025-08-15
*/
@Mapper
public interface EquGatherMapper
{
// 更新 health 字段
int updateHealth(String collectId, Double totalHealth);
/**
* 查询设备采集信息
*
* @param id 设备采集信息主键
* @return 设备采集信息
*/
public EquGather selectEquGatherById(String id);
/**
* 批量插入 EquGather 记录
*/
int batchInsertEquGather(@Param("list") List<EquGather> list);
/**
* 查询设备采集信息列表
*
* @param equGather 设备采集信息
* @return 设备采集信息集合
*/
public List<EquGather> selectEquGatherList(EquGather equGather);
/**
* 新增设备采集信息
*
* @param equGather 设备采集信息
* @return 结果
*/
public int insertEquGather(EquGather equGather);
/**
* 修改设备采集信息
*
* @param equGather 设备采集信息
* @return 结果
*/
public int updateEquGather(EquGather equGather);
/**
* 删除设备采集信息
*
* @param id 设备采集信息主键
* @return 结果
*/
public int deleteEquGatherById(String id);
/**
* 批量删除设备采集信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEquGatherByIds(String[] ids);
}

@ -1,69 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.EquInterface;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 端口运行状态Mapper接口
*
* @author ruoyi
* @date 2025-08-20
*/
@Mapper
public interface EquInterfaceMapper
{
/**
* 批量插入 PortsEntity
*/
void insertBatch(List<EquInterface> list);
/**
* 查询端口运行状态
*
* @param id 端口运行状态主键
* @return 端口运行状态
*/
public EquInterface selectEquInterfaceById(String id);
/**
* 查询端口运行状态列表
*
* @param equInterface 端口运行状态
* @return 端口运行状态集合
*/
public List<EquInterface> selectEquInterfaceList(EquInterface equInterface);
/**
* 新增端口运行状态
*
* @param equInterface 端口运行状态
* @return 结果
*/
public int insertEquInterface(EquInterface equInterface);
/**
* 修改端口运行状态
*
* @param equInterface 端口运行状态
* @return 结果
*/
public int updateEquInterface(EquInterface equInterface);
/**
* 删除端口运行状态
*
* @param id 端口运行状态主键
* @return 结果
*/
public int deleteEquInterfaceById(String id);
/**
* 批量删除端口运行状态
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEquInterfaceByIds(String[] ids);
}

@ -1,72 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.EquOid;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* OID配置信息Mapper接口
*
* @author ruoyi
* @date 2025-08-15
*/
@Mapper
public interface EquOidMapper
{
/**
* 根据厂商ID和启用状态查询OID列表
* @param manufacturerId 厂商ID
* @return OID列表
*/
List<EquOid> findByManuIdAndStatus(@Param("manufacturerId") String manufacturerId);
/**
* 查询OID配置信息
*
* @param id OID配置信息主键
* @return OID配置信息
*/
public EquOid selectEquOidById(Long id);
/**
* 查询OID配置信息列表
*
* @param equOid OID配置信息
* @return OID配置信息集合
*/
public List<EquOid> selectEquOidList(EquOid equOid);
/**
* 新增OID配置信息
*
* @param equOid OID配置信息
* @return 结果
*/
public int insertEquOid(EquOid equOid);
/**
* 修改OID配置信息
*
* @param equOid OID配置信息
* @return 结果
*/
public int updateEquOid(EquOid equOid);
/**
* 删除OID配置信息
*
* @param id OID配置信息主键
* @return 结果
*/
public int deleteEquOidById(Long id);
/**
* 批量删除OID配置信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEquOidByIds(Long[] ids);
}

@ -1,67 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.EquRouting;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 路由信息Mapper接口
*
* @author ruoyi
* @date 2025-08-15
*/
@Mapper
public interface EquRoutingMapper
{
void insertBatchRouting(List<EquRouting> list);
/**
* 查询路由信息
*
* @param id 路由信息主键
* @return 路由信息
*/
public EquRouting selectEquRoutingById(String id);
/**
* 查询路由信息列表
*
* @param equRouting 路由信息
* @return 路由信息集合
*/
public List<EquRouting> selectEquRoutingList(EquRouting equRouting);
/**
* 新增路由信息
*
* @param equRouting 路由信息
* @return 结果
*/
public int insertEquRouting(EquRouting equRouting);
/**
* 修改路由信息
*
* @param equRouting 路由信息
* @return 结果
*/
public int updateEquRouting(EquRouting equRouting);
/**
* 删除路由信息
*
* @param id 路由信息主键
* @return 结果
*/
public int deleteEquRoutingById(String id);
/**
* 批量删除路由信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEquRoutingByIds(String[] ids);
}

@ -1,66 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.EquVeneer;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 请填写功能名称Mapper接口
*
* @author ruoyi
* @date 2025-08-15
*/
@Mapper
public interface EquVeneerMapper
{
void insertBatchVeneer(List<EquVeneer> list);
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public EquVeneer selectEquVeneerById(String id);
/**
* 查询请填写功能名称列表
*
* @param equVeneer 请填写功能名称
* @return 请填写功能名称集合
*/
public List<EquVeneer> selectEquVeneerList(EquVeneer equVeneer);
/**
* 新增请填写功能名称
*
* @param equVeneer 请填写功能名称
* @return 结果
*/
public int insertEquVeneer(EquVeneer equVeneer);
/**
* 修改请填写功能名称
*
* @param equVeneer 请填写功能名称
* @return 结果
*/
public int updateEquVeneer(EquVeneer equVeneer);
/**
* 删除请填写功能名称
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteEquVeneerById(String id);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEquVeneerByIds(String[] ids);
}

@ -1,67 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.EquVlan;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 请填写功能名称Mapper接口
*
* @author ruoyi
* @date 2025-08-15
*/
@Mapper
public interface EquVlanMapper
{
void insertBatchVlan(List<EquVlan> list);
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public EquVlan selectEquVlanById(String id);
/**
* 查询请填写功能名称列表
*
* @param equVlan 请填写功能名称
* @return 请填写功能名称集合
*/
public List<EquVlan> selectEquVlanList(EquVlan equVlan);
/**
* 新增请填写功能名称
*
* @param equVlan 请填写功能名称
* @return 结果
*/
public int insertEquVlan(EquVlan equVlan);
/**
* 修改请填写功能名称
*
* @param equVlan 请填写功能名称
* @return 结果
*/
public int updateEquVlan(EquVlan equVlan);
/**
* 删除请填写功能名称
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteEquVlanById(String id);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEquVlanByIds(String[] ids);
}

@ -0,0 +1,65 @@
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,73 +0,0 @@
package com.alops.system.mapper;
import com.alops.system.domain.InternalMessage;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* 站内信Mapper接口
*
* @author ruoyi
* @date 2025-09-04
*/
@Mapper
public interface InternalMessageMapper
{
/**
* 批量插入消息
* @param messages 消息列表
* @return 受影响行数
*/
int batchInsert(@Param("messages") List<InternalMessage> messages);
/**
* 查询站内信
*
* @param id 站内信主键
* @return 站内信
*/
public InternalMessage selectInternalMessageById(Long id);
/**
* 查询站内信列表
*
* @param internalMessage 站内信
* @return 站内信集合
*/
public List<InternalMessage> selectInternalMessageList(InternalMessage internalMessage);
/**
* 新增站内信
*
* @param internalMessage 站内信
* @return 结果
*/
public int insertInternalMessage(InternalMessage internalMessage);
/**
* 修改站内信
*
* @param internalMessage 站内信
* @return 结果
*/
public int updateInternalMessage(InternalMessage internalMessage);
/**
* 删除站内信
*
* @param id 站内信主键
* @return 结果
*/
public int deleteInternalMessageById(Long id);
/**
* 批量删除站内信
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteInternalMessageByIds(Long[] ids);
}

@ -13,11 +13,6 @@ import com.alops.common.core.domain.entity.SysUser;
*/@Mapper
public interface SysUserMapper
{
/**
* 根据角色ID查询用户列表多对多
*/
List<SysUser> selectByRoleId(@Param("roleId") Long roleId);
/**
* 根据条件分页查询用户列表
*

@ -1,12 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquOid;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
public interface ConvertRawValueService {
public String convertValue(String rule, String val);
}

@ -0,0 +1,62 @@
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,7 +0,0 @@
package com.alops.system.service;
import java.util.List;
public interface IAlertLaunchService {
public void executeImmediateAlerts(List<Long> ruleIds);
}

@ -1,62 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.AlertRuleCondition;
import java.util.List;
/**
* 请填写功能名称Service接口
*
* @author ruoyi
* @date 2025-09-04
*/
public interface IAlertRuleConditionService
{
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public AlertRuleCondition selectAlertRuleConditionById(Long id);
/**
* 查询请填写功能名称列表
*
* @param alertRuleCondition 请填写功能名称
* @return 请填写功能名称集合
*/
public List<AlertRuleCondition> selectAlertRuleConditionList(AlertRuleCondition alertRuleCondition);
/**
* 新增请填写功能名称
*
* @param alertRuleCondition 请填写功能名称
* @return 结果
*/
public int insertAlertRuleCondition(AlertRuleCondition alertRuleCondition);
/**
* 修改请填写功能名称
*
* @param alertRuleCondition 请填写功能名称
* @return 结果
*/
public int updateAlertRuleCondition(AlertRuleCondition alertRuleCondition);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键集合
* @return 结果
*/
public int deleteAlertRuleConditionByIds(Long[] ids);
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteAlertRuleConditionById(Long id);
}

@ -1,65 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.AlertRule;
import com.alops.system.domain.dto.AlertRuleAddDto;
import java.util.List;
/**
* 请填写功能名称Service接口
*
* @author ruoyi
* @date 2025-09-04
*/
public interface IAlertRuleService
{
public AlertRule saveRule(AlertRuleAddDto dto);
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public AlertRule selectAlertRuleById(Long id);
/**
* 查询请填写功能名称列表
*
* @param alertRule 请填写功能名称
* @return 请填写功能名称集合
*/
public List<AlertRule> selectAlertRuleList(AlertRule alertRule);
/**
* 新增请填写功能名称
*
* @param alertRule 请填写功能名称
* @return 结果
*/
public int insertAlertRule(AlertRule alertRule);
/**
* 修改请填写功能名称
*
* @param alertRule 请填写功能名称
* @return 结果
*/
public int updateAlertRule(AlertRule alertRule);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键集合
* @return 结果
*/
public int deleteAlertRuleByIds(Long[] ids);
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteAlertRuleById(Long id);
}

@ -1,7 +0,0 @@
package com.alops.system.service;
import java.util.List;
public interface IAlertSenderService {
public void sendAlert(List<String> alertMessage, String alertWay, String target);
}

@ -1,64 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.DictAlarmParam;
import java.util.List;
/**
* 请填写功能名称Service接口
*
* @author ruoyi
* @date 2025-09-05
*/
public interface IDictAlarmParamService
{
List<DictAlarmParam> getParamsByTableName(String tableName);
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public DictAlarmParam selectDictAlarmParamById(Long id);
/**
* 查询请填写功能名称列表
*
* @param dictAlarmParam 请填写功能名称
* @return 请填写功能名称集合
*/
public List<DictAlarmParam> selectDictAlarmParamList(DictAlarmParam dictAlarmParam);
/**
* 新增请填写功能名称
*
* @param dictAlarmParam 请填写功能名称
* @return 结果
*/
public int insertDictAlarmParam(DictAlarmParam dictAlarmParam);
/**
* 修改请填写功能名称
*
* @param dictAlarmParam 请填写功能名称
* @return 结果
*/
public int updateDictAlarmParam(DictAlarmParam dictAlarmParam);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键集合
* @return 结果
*/
public int deleteDictAlarmParamByIds(Long[] ids);
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteDictAlarmParamById(Long id);
}

@ -2,7 +2,6 @@ package com.alops.system.service;
import com.alops.system.domain.EquBase;
import com.alops.system.domain.dto.EquBaseQueryDto;
import com.alops.system.domain.vo.queryEquBaseVO;
import java.util.List;
@ -29,7 +28,7 @@ public interface IEquBaseService
* @param equBaseQueryDto 设备基本信息
* @return 设备基本信息集合
*/
public List<queryEquBaseVO> selectEquBaseList(EquBaseQueryDto equBaseQueryDto);
public List<EquBase> selectEquBaseList(EquBaseQueryDto equBaseQueryDto);
/**
* 新增设备基本信息

@ -1,62 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquGather;
import java.util.List;
/**
* 设备采集信息Service接口
*
* @author ruoyi
* @date 2025-08-15
*/
public interface IEquGatherService
{
/**
* 查询设备采集信息
*
* @param id 设备采集信息主键
* @return 设备采集信息
*/
public EquGather selectEquGatherById(String id);
/**
* 查询设备采集信息列表
*
* @param equGather 设备采集信息
* @return 设备采集信息集合
*/
public List<EquGather> selectEquGatherList(EquGather equGather);
/**
* 新增设备采集信息
*
* @param equGather 设备采集信息
* @return 结果
*/
public int insertEquGather(EquGather equGather);
/**
* 修改设备采集信息
*
* @param equGather 设备采集信息
* @return 结果
*/
public int updateEquGather(EquGather equGather);
/**
* 批量删除设备采集信息
*
* @param ids 需要删除的设备采集信息主键集合
* @return 结果
*/
public int deleteEquGatherByIds(String[] ids);
/**
* 删除设备采集信息信息
*
* @param id 设备采集信息主键
* @return 结果
*/
public int deleteEquGatherById(String id);
}

@ -1,64 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquInterface;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 端口运行状态Service接口
*
* @author ruoyi
* @date 2025-08-20
*/
public interface IEquInterfaceService
{
/**
* 查询端口运行状态
*
* @param id 端口运行状态主键
* @return 端口运行状态
*/
public EquInterface selectEquInterfaceById(String id);
/**
* 查询端口运行状态列表
*
* @param equInterface 端口运行状态
* @return 端口运行状态集合
*/
public List<EquInterface> selectEquInterfaceList(EquInterface equInterface);
/**
* 新增端口运行状态
*
* @param equInterface 端口运行状态
* @return 结果
*/
public int insertEquInterface(EquInterface equInterface);
/**
* 修改端口运行状态
*
* @param equInterface 端口运行状态
* @return 结果
*/
public int updateEquInterface(EquInterface equInterface);
/**
* 批量删除端口运行状态
*
* @param ids 需要删除的端口运行状态主键集合
* @return 结果
*/
public int deleteEquInterfaceByIds(String[] ids);
/**
* 删除端口运行状态信息
*
* @param id 端口运行状态主键
* @return 结果
*/
public int deleteEquInterfaceById(String id);
}

@ -1,62 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquOid;
import java.util.List;
/**
* OID配置信息Service接口
*
* @author ruoyi
* @date 2025-08-15
*/
public interface IEquOidService
{
/**
* 查询OID配置信息
*
* @param id OID配置信息主键
* @return OID配置信息
*/
public EquOid selectEquOidById(Long id);
/**
* 查询OID配置信息列表
*
* @param equOid OID配置信息
* @return OID配置信息集合
*/
public List<EquOid> selectEquOidList(EquOid equOid);
/**
* 新增OID配置信息
*
* @param equOid OID配置信息
* @return 结果
*/
public int insertEquOid(EquOid equOid);
/**
* 修改OID配置信息
*
* @param equOid OID配置信息
* @return 结果
*/
public int updateEquOid(EquOid equOid);
/**
* 批量删除OID配置信息
*
* @param ids 需要删除的OID配置信息主键集合
* @return 结果
*/
public int deleteEquOidByIds(Long[] ids);
/**
* 删除OID配置信息信息
*
* @param id OID配置信息主键
* @return 结果
*/
public int deleteEquOidById(Long id);
}

@ -1,62 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquRouting;
import java.util.List;
/**
* 路由信息Service接口
*
* @author ruoyi
* @date 2025-08-15
*/
public interface IEquRoutingService
{
/**
* 查询路由信息
*
* @param id 路由信息主键
* @return 路由信息
*/
public EquRouting selectEquRoutingById(String id);
/**
* 查询路由信息列表
*
* @param equRouting 路由信息
* @return 路由信息集合
*/
public List<EquRouting> selectEquRoutingList(EquRouting equRouting);
/**
* 新增路由信息
*
* @param equRouting 路由信息
* @return 结果
*/
public int insertEquRouting(EquRouting equRouting);
/**
* 修改路由信息
*
* @param equRouting 路由信息
* @return 结果
*/
public int updateEquRouting(EquRouting equRouting);
/**
* 批量删除路由信息
*
* @param ids 需要删除的路由信息主键集合
* @return 结果
*/
public int deleteEquRoutingByIds(String[] ids);
/**
* 删除路由信息信息
*
* @param id 路由信息主键
* @return 结果
*/
public int deleteEquRoutingById(String id);
}

@ -1,62 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquVeneer;
import java.util.List;
/**
* 请填写功能名称Service接口
*
* @author ruoyi
* @date 2025-08-15
*/
public interface IEquVeneerService
{
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public EquVeneer selectEquVeneerById(String id);
/**
* 查询请填写功能名称列表
*
* @param equVeneer 请填写功能名称
* @return 请填写功能名称集合
*/
public List<EquVeneer> selectEquVeneerList(EquVeneer equVeneer);
/**
* 新增请填写功能名称
*
* @param equVeneer 请填写功能名称
* @return 结果
*/
public int insertEquVeneer(EquVeneer equVeneer);
/**
* 修改请填写功能名称
*
* @param equVeneer 请填写功能名称
* @return 结果
*/
public int updateEquVeneer(EquVeneer equVeneer);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键集合
* @return 结果
*/
public int deleteEquVeneerByIds(String[] ids);
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteEquVeneerById(String id);
}

@ -1,62 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquVlan;
import java.util.List;
/**
* 请填写功能名称Service接口
*
* @author ruoyi
* @date 2025-08-15
*/
public interface IEquVlanService
{
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public EquVlan selectEquVlanById(String id);
/**
* 查询请填写功能名称列表
*
* @param equVlan 请填写功能名称
* @return 请填写功能名称集合
*/
public List<EquVlan> selectEquVlanList(EquVlan equVlan);
/**
* 新增请填写功能名称
*
* @param equVlan 请填写功能名称
* @return 结果
*/
public int insertEquVlan(EquVlan equVlan);
/**
* 修改请填写功能名称
*
* @param equVlan 请填写功能名称
* @return 结果
*/
public int updateEquVlan(EquVlan equVlan);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键集合
* @return 结果
*/
public int deleteEquVlanByIds(String[] ids);
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteEquVlanById(String id);
}

@ -1,6 +1,6 @@
package com.alops.system.service;
import com.alops.system.domain.AlertMessage;
import com.alops.system.domain.FauSta;
import java.util.List;
@ -8,9 +8,9 @@ import java.util.List;
* 故障统计Service接口
*
* @author ruoyi
* @date 2025-09-04
* @date 2025-08-01
*/
public interface IAlertMessageService
public interface IFauStaService
{
/**
* 查询故障统计
@ -18,31 +18,31 @@ public interface IAlertMessageService
* @param id 故障统计主键
* @return 故障统计
*/
public AlertMessage selectAlertMessageById(Long id);
public FauSta selectFauStaById(Long id);
/**
* 查询故障统计列表
*
* @param alertMessage 故障统计
* @param fauSta 故障统计
* @return 故障统计集合
*/
public List<AlertMessage> selectAlertMessageList(AlertMessage alertMessage);
public List<FauSta> selectFauStaList(FauSta fauSta);
/**
* 新增故障统计
*
* @param alertMessage 故障统计
* @param fauSta 故障统计
* @return 结果
*/
public int insertAlertMessage(AlertMessage alertMessage);
public int insertFauSta(FauSta fauSta);
/**
* 修改故障统计
*
* @param alertMessage 故障统计
* @param fauSta 故障统计
* @return 结果
*/
public int updateAlertMessage(AlertMessage alertMessage);
public int updateFauSta(FauSta fauSta);
/**
* 批量删除故障统计
@ -50,7 +50,7 @@ public interface IAlertMessageService
* @param ids 需要删除的故障统计主键集合
* @return 结果
*/
public int deleteAlertMessageByIds(Long[] ids);
public int deleteFauStaByIds(Long[] ids);
/**
* 删除故障统计信息
@ -58,5 +58,5 @@ public interface IAlertMessageService
* @param id 故障统计主键
* @return 结果
*/
public int deleteAlertMessageById(Long id);
public int deleteFauStaById(Long id);
}

@ -1,11 +1,8 @@
package com.alops.system.service;
import com.alops.common.core.domain.AjaxResult;
import com.alops.system.domain.ScheduleRules;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.concurrent.ExecutionException;
/**
@ -14,13 +11,8 @@ import java.util.concurrent.ExecutionException;
* @author ruoyi
* @date 2025-08-03
*/
public interface IScheduleRulesService
{
public int executeImmediately() throws ExecutionException, InterruptedException;
/**
* 查询定时采集规则
*

@ -1,18 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquBase;
import com.alops.system.domain.EquOid;
import com.alops.system.domain.vo.EquGatherInsertInfo;
import com.alops.system.domain.vo.GatherEntities;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public interface MemoryToolService {
public GatherEntities buildAndInsertEntity(
EquBase device,
Map<String, Object> snmpResults);
public int persistAll(List<GatherEntities> allEntities);
}

@ -1,11 +0,0 @@
package com.alops.system.service;
import com.alops.system.domain.EquOid;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public interface SnmpService {
public Map<String, Object> query(String ip, List<EquOid> oids);
}

@ -0,0 +1,98 @@
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,155 +0,0 @@
package com.alops.system.service.impl;
import com.alops.system.domain.AlertMessage;
import com.alops.system.domain.AlertRule;
import com.alops.system.domain.AlertRuleCondition;
import com.alops.system.mapper.AlertMessageMapper;
import com.alops.system.mapper.AlertRuleConditionMapper;
import com.alops.system.mapper.AlertRuleMapper;
import com.alops.system.service.IAlertLaunchService;
import com.alops.system.service.IAlertSenderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@Service
public class AlertLaunchServiceImpl implements IAlertLaunchService {
@Autowired
private AlertRuleMapper alertRuleMapper;
@Autowired
private AlertRuleConditionMapper alertRuleConditionMapper;
@Autowired
private AlertMessageMapper alertMessageMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
private IAlertSenderService alertSender; // 发送通知
private final ExecutorService executor = Executors.newFixedThreadPool(5);
/**
* 执行立即预警
*/
@Override
public void executeImmediateAlerts(List<Long> ruleIds) {
List<AlertRule> rules = alertRuleMapper.selectByIds(ruleIds);
//每个规则开一个线程
for (AlertRule rule : rules) {
executor.submit(() -> processRule(rule));
}
}
/**
* 同步插入消息
*/
@Transactional
public void sendInternalMessages(List<AlertMessage> messages) {
if (messages == null || messages.isEmpty()) {
return;
}
int rows = alertMessageMapper.batchInsert(messages);
if (rows != messages.size()) {
throw new RuntimeException("部分消息未插入成功");
}
}
/**
* 处理单条预警规则
*/
private void processRule(AlertRule rule) {
try {
//1.一次预警规则的所有预警信息实体存一块
List<AlertMessage> messages = new ArrayList<>();
List<String> msgs=new ArrayList<>();
//2.判断是否特殊符号
boolean isChangedRule = "CHANGED".equalsIgnoreCase(rule.getAlertSql());
//3.一个预警规则查询的所有行数据
List<Map<String, Object>> queryResults;
if (isChangedRule) {
queryResults = handleChangedRule(rule);
} else {
queryResults = jdbcTemplate.queryForList(rule.getAlertSql());
}
//构建预警信息实体和预警信息内容
for (Map<String, Object> row : queryResults) {
AlertMessage msg = new AlertMessage();
String msgdes=null;
msg.setLevel(rule.getSeverity());
msg.setType(rule.getType());
msg.setOccurTime(new Date());
msg.setStatus("open");
msg.setEquId(row.get("equ_id") != null ? row.get("equ_id").toString() : null);
msg.setEquType(row.get("equ_type") != null ? row.get("equ_type").toString() : null);
msgdes=fillTemplate(rule.getAlertTemplate(), row, rule);
msg.setDescription(msgdes);
messages.add(msg);
msgs.add(msgdes);
}
if (!messages.isEmpty()) {
alertSender.sendAlert(msgs,rule.getAlertWay(), rule.getAlertStation());
sendInternalMessages(messages);
}
} catch (Exception e) {
e.printStackTrace();
}
}
private String fillTemplate(String template, Map<String, Object> row, AlertRule rule) {
String msg = template;
Map<String, Object> ruleMap = convertRuleToMap(rule);
//从预警规则中获取 预警规则名称,级别,方式,到站方 预警规则内容描述,预警规则创新时间,表格名称
for (Map.Entry<String, Object> entry : ruleMap.entrySet()) {
msg = msg.replace("{" + entry.getKey() + "}", entry.getValue() != null ? entry.getValue().toString() : "");
}
//设备id,设备类型,你要查参数 ,针对表格内容具体id,
for (Map.Entry<String, Object> entry : row.entrySet()) {
msg = msg.replace("{" + entry.getKey() + "}", entry.getValue() != null ? entry.getValue().toString() : "");
}
return msg;
}
private Map<String, Object> convertRuleToMap(AlertRule rule) {
Map<String, Object> map = new HashMap<>();
map.put("rule_name", rule.getRuleName());
map.put("alert_way", rule.getAlertWay());
map.put("alert_station", rule.getAlertStation());
map.put("severity", rule.getSeverity());
map.put("description", rule.getDescription());
map.put("create_time", rule.getCreateTime());
map.put("table_name", rule.getTableName());
return map;
}
private List<Map<String, Object>> handleChangedRule(AlertRule rule) {
List<AlertRuleCondition> conditions = alertRuleConditionMapper.findByRuleId(rule.getId());
if (conditions.isEmpty() || conditions.get(0).getParamName() == null) {
return new ArrayList<>();
}
String col = conditions.get(0).getParamName();
String sql = "SELECT g1.* FROM equ_gather g1 " +
"JOIN equ_gather g2 ON g1.equ_id = g2.equ_id " +
"AND g1.gather_time > g2.gather_time " +
"AND NOT EXISTS (" +
" SELECT 1 FROM equ_gather g3 " +
" WHERE g3.equ_id = g1.equ_id " +
" AND g3.gather_time > g2.gather_time " +
" AND g3.gather_time < g1.gather_time" +
") " +
"WHERE (g1.`" + col + "` <> g2.`" + col + "`)";
return jdbcTemplate.queryForList(sql);
}
}

@ -1,94 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.system.domain.AlertMessage;
import com.alops.system.mapper.AlertMessageMapper;
import com.alops.system.service.IAlertMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 故障统计Service业务层处理
*
* @author ruoyi
* @date 2025-09-04
*/
@Service
public class AlertMessageServiceImpl implements IAlertMessageService
{
@Autowired
private AlertMessageMapper alertMessageMapper;
/**
* 查询故障统计
*
* @param id 故障统计主键
* @return 故障统计
*/
@Override
public AlertMessage selectAlertMessageById(Long id)
{
return alertMessageMapper.selectAlertMessageById(id);
}
/**
* 查询故障统计列表
*
* @param alertMessage 故障统计
* @return 故障统计
*/
@Override
public List<AlertMessage> selectAlertMessageList(AlertMessage alertMessage)
{
return alertMessageMapper.selectAlertMessageList(alertMessage);
}
/**
* 新增故障统计
*
* @param alertMessage 故障统计
* @return 结果
*/
@Override
public int insertAlertMessage(AlertMessage alertMessage)
{
return alertMessageMapper.insertAlertMessage(alertMessage);
}
/**
* 修改故障统计
*
* @param alertMessage 故障统计
* @return 结果
*/
@Override
public int updateAlertMessage(AlertMessage alertMessage)
{
return alertMessageMapper.updateAlertMessage(alertMessage);
}
/**
* 批量删除故障统计
*
* @param ids 需要删除的故障统计主键
* @return 结果
*/
@Override
public int deleteAlertMessageByIds(Long[] ids)
{
return alertMessageMapper.deleteAlertMessageByIds(ids);
}
/**
* 删除故障统计信息
*
* @param id 故障统计主键
* @return 结果
*/
@Override
public int deleteAlertMessageById(Long id)
{
return alertMessageMapper.deleteAlertMessageById(id);
}
}

@ -1,94 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.system.domain.AlertRuleCondition;
import com.alops.system.mapper.AlertRuleConditionMapper;
import com.alops.system.service.IAlertRuleConditionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 请填写功能名称Service业务层处理
*
* @author ruoyi
* @date 2025-09-04
*/
@Service
public class AlertRuleConditionServiceImpl implements IAlertRuleConditionService
{
@Autowired
private AlertRuleConditionMapper alertRuleConditionMapper;
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
@Override
public AlertRuleCondition selectAlertRuleConditionById(Long id)
{
return alertRuleConditionMapper.selectAlertRuleConditionById(id);
}
/**
* 查询请填写功能名称列表
*
* @param alertRuleCondition 请填写功能名称
* @return 请填写功能名称
*/
@Override
public List<AlertRuleCondition> selectAlertRuleConditionList(AlertRuleCondition alertRuleCondition)
{
return alertRuleConditionMapper.selectAlertRuleConditionList(alertRuleCondition);
}
/**
* 新增请填写功能名称
*
* @param alertRuleCondition 请填写功能名称
* @return 结果
*/
@Override
public int insertAlertRuleCondition(AlertRuleCondition alertRuleCondition)
{
return alertRuleConditionMapper.insertAlertRuleCondition(alertRuleCondition);
}
/**
* 修改请填写功能名称
*
* @param alertRuleCondition 请填写功能名称
* @return 结果
*/
@Override
public int updateAlertRuleCondition(AlertRuleCondition alertRuleCondition)
{
return alertRuleConditionMapper.updateAlertRuleCondition(alertRuleCondition);
}
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键
* @return 结果
*/
@Override
public int deleteAlertRuleConditionByIds(Long[] ids)
{
return alertRuleConditionMapper.deleteAlertRuleConditionByIds(ids);
}
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
@Override
public int deleteAlertRuleConditionById(Long id)
{
return alertRuleConditionMapper.deleteAlertRuleConditionById(id);
}
}

@ -1,312 +0,0 @@
package com.alops.system.service.impl;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import com.alops.common.utils.DateUtils;
import com.alops.system.domain.AlertRule;
import com.alops.system.domain.AlertRuleCondition;
import com.alops.system.domain.dto.AlertRuleAddDto;
import com.alops.system.mapper.AlertRuleConditionMapper;
import com.alops.system.mapper.AlertRuleMapper;
import com.alops.system.service.IAlertRuleService;
import org.apache.commons.lang3.StringEscapeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 请填写功能名称Service业务层处理
*
* @author ruoyi
* @date 2025-09-04
*/
@Service
public class AlertRuleServiceImpl implements IAlertRuleService
{
@Autowired
private AlertRuleMapper alertRuleMapper;
@Autowired
private AlertRuleConditionMapper alertRuleConditionMapper;
//生成预警规则
/**
* 保存预警规则及条件同时生成 SQL
*/
@Override
public AlertRule saveRule(AlertRuleAddDto dto) {
AlertRule rule = dto.getAlertRule();
List<AlertRuleCondition> conditions = dto.getAlertRuleConditionList();
System.out.println(conditions);
// 生成 SQL,先判断是否是 CHANGED
String sql;
if (conditions != null
&& conditions.size() == 1
&& "CHANGED".equalsIgnoreCase(conditions.get(0).getOperator())) {
sql = "CHANGED";
} else {
sql = buildSql(rule, conditions);
}
rule.setAlertSql(sql);
// 插入规则
alertRuleMapper.insertAlertRule(rule);
// 插入条件
if (conditions != null) {
for (AlertRuleCondition c : conditions) {
c.setAlertRuleId(rule.getId());
alertRuleConditionMapper.insertAlertRuleCondition(c);
}
}
return rule;
}
/**
* 根据规则和条件生成 SQL
*/
public String buildSql(AlertRule rule, List<AlertRuleCondition> conditions) {
if (conditions == null || conditions.isEmpty()) return "";
System.out.println(conditions);
conditions.sort(Comparator.comparing(AlertRuleCondition::getOrderNo));
StringBuilder sql = new StringBuilder("SELECT ");
if ("equ_gather".equalsIgnoreCase(rule.getTableName())) {
// equ_gather 表直接拼接条件
sql.append("g.*, b.equ_type FROM equ_gather g ")
.append("JOIN equ_base b ON g.equ_id = b.id ")
.append("WHERE ");
sql.append(buildConditionsSql(conditions));
} else {
// 其他表关联 equ_gather 和 equ_base
sql.append("t.*, g.equ_id, b.equ_type FROM ")
.append(rule.getTableName()).append(" t ")
.append("JOIN equ_gather g ON t.equ_gather_id = g.id ")
.append("JOIN equ_base b ON g.equ_id = b.id ")
.append("WHERE ");
sql.append(buildConditionsSql(conditions));
}
return sql.toString();
}
/**
* 拼接条件 SQL
*/
private String buildConditionsSql(List<AlertRuleCondition> conditions) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < conditions.size(); i++) {
AlertRuleCondition c = conditions.get(i);
System.out.println("第"+i+"个"+c);
// 跳过 CHANGED,因为已经单独处理
if ("CHANGED".equalsIgnoreCase(c.getOperator())) {
continue;
}
sb.append(buildConditionSql(c));
if (i < conditions.size() - 1) {
String logicOp = c.getLogicOperator();
if (logicOp == null || logicOp.trim().isEmpty()) {
logicOp = "and"; // 默认逻辑运算符,可改成 "or"
}
sb.append(" ").append(logicOp).append(" ");
}
}
return sb.toString();
}
/**
* 单个条件生成 SQL 片段
*/
private String buildConditionSql(AlertRuleCondition c) {
String column = c.getParamName();
String op = normalizeOperator(c.getOperator());
String value = c.getCompareValue();
String valueType = c.getValueType(); // 新增字段
switch (op) {
case "=": case "!=": case "<": case "<=": case ">": case ">=":
return column + " " + op + " " + formatValue(value, valueType);
case "contains":
return column + " LIKE '%" + escapeLike(value) + "%'";
case "not contains":
return column + " NOT LIKE '%" + escapeLike(value) + "%'";
case "starts with":
return column + " LIKE '" + escapeLike(value) + "%'";
case "not starts with":
return column + " NOT LIKE '" + escapeLike(value) + "%'";
case "ends with":
return column + " LIKE '%" + escapeLike(value) + "'";
case "not ends with":
return column + " NOT LIKE '%" + escapeLike(value) + "'";
case "is null":
return column + " IS NULL";
case "is not null":
return column + " IS NOT NULL";
case "is empty":
return "(" + column + " = '' OR " + column + " IS NULL)";
case "is not empty":
return "(" + column + " <> '' AND " + column + " IS NOT NULL)";
case "between":
case "not between":
String[] vals = value.split(",");
if (vals.length != 2) {
throw new IllegalArgumentException(op + " 运算符需要两个值: " + value);
}
String range = formatValue(vals[0].trim(), valueType) + " AND " + formatValue(vals[1].trim(), valueType);
return column + (op.equals("between") ? " BETWEEN " : " NOT BETWEEN ") + range;
case "in":
case "not in":
return column + (op.equals("in") ? " IN " : " NOT IN ") + "(" + wrapInList(value, valueType) + ")";
default:
throw new UnsupportedOperationException("未知运算符: " + op);
}
}
/**
* 格式化单个值根据类型决定是否加引号
*/
private String formatValue(String raw, String valueType) {
if (raw == null) return "NULL";
raw = raw.trim();
if ("number".equalsIgnoreCase(valueType)) {
return raw;
} else if ("date".equalsIgnoreCase(valueType)) {
return "'" + raw + "'"; // 也可以这里加 TO_DATE 之类
} else {
return "'" + raw.replace("'", "''") + "'"; // 默认当字符串
}
}
/**
* IN 列表格式化
*/
private String wrapInList(String value, String valueType) {
return Arrays.stream(value.split(","))
.map(String::trim)
.map(v -> formatValue(v, valueType))
.collect(Collectors.joining(","));
}
/**
* 统一处理 HTML 转义后的运算符
*/
private String normalizeOperator(String op) {
System.out.println("原始 operator: '" + op + "'");
if (op == null || op.trim().isEmpty()) {
throw new IllegalArgumentException("条件运算符不能为空");
}
op = op.replace("&lt;", "<")
.replace("&gt;", ">")
.replace("&amp;", "&")
.replace("&quot;", "\"")
.replace("&apos;", "'")
.replace("&#61;", "=")
.replace("&#33;&#61;", "!=")
.trim()
// 去掉多余空格
.replaceAll("\\s+", "");
return op.toLowerCase();
}
/**
* LIKE 值转义避免 % _ 误伤
*/
private String escapeLike(String value) {
return value.replace("'", "''"); // 仅处理 SQL 注入风险
}
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
@Override
public AlertRule selectAlertRuleById(Long id)
{
return alertRuleMapper.selectAlertRuleById(id);
}
/**
* 查询请填写功能名称列表
*
* @param alertRule 请填写功能名称
* @return 请填写功能名称
*/
@Override
public List<AlertRule> selectAlertRuleList(AlertRule alertRule)
{
return alertRuleMapper.selectAlertRuleList(alertRule);
}
/**
* 新增请填写功能名称
*
* @param alertRule 请填写功能名称
* @return 结果
*/
@Override
public int insertAlertRule(AlertRule alertRule)
{
alertRule.setCreateTime(DateUtils.getNowDate());
return alertRuleMapper.insertAlertRule(alertRule);
}
/**
* 修改请填写功能名称
*
* @param alertRule 请填写功能名称
* @return 结果
*/
@Override
public int updateAlertRule(AlertRule alertRule)
{
alertRule.setUpdateTime(DateUtils.getNowDate());
return alertRuleMapper.updateAlertRule(alertRule);
}
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键
* @return 结果
*/
@Override
public int deleteAlertRuleByIds(Long[] ids)
{
return alertRuleMapper.deleteAlertRuleByIds(ids);
}
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
@Override
public int deleteAlertRuleById(Long id)
{
return alertRuleMapper.deleteAlertRuleById(id);
}
}

@ -1,111 +0,0 @@
package com.alops.system.service.impl;
import com.alops.common.core.domain.entity.SysUser;
import com.alops.system.domain.AlertMessage;
import com.alops.system.domain.InternalMessage;
import com.alops.system.mapper.InternalMessageMapper;
import com.alops.system.mapper.SysUserMapper;
import com.alops.system.service.IAlertSenderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
public class AlertSenderServiceImpl implements IAlertSenderService {
@Autowired
private JavaMailSender mailSender; // Spring Boot 邮件服务
@Autowired
private SysUserMapper userMapper; // 用户 Mapper
@Autowired
private InternalMessageMapper messageMapper; // 站内信 Mapper
@Value("${spring.mail.username}")
private String from;
/**
* 发送预警消息
*
* @param alertWay "email" "message"
* @param target 预警目标邮箱或角色ID
*/
@Override
public void sendAlert(List<String> alertMessages, String alertWay, String target) {
if (alertMessages == null || alertMessages.isEmpty()) return;
// 将多条消息合并成一条
String combinedMessage = String.join("\n", alertMessages);
System.out.println(alertWay);
if ("email".equalsIgnoreCase(alertWay)) {
sendEmail(combinedMessage, target);
} else if ("message".equalsIgnoreCase(alertWay)) {
sendInternalMessage(combinedMessage, target);
} else {
throw new IllegalArgumentException("未知预警方式:" + alertWay);
}
}
/**
* 邮件发送
*/
private void sendEmail(String content, String emails) {
String[] emailArr = emails.split(",");
for (String email : emailArr) {
try {
SimpleMailMessage message = new SimpleMailMessage();
message.setFrom(from); // 发件人(必须是 spring.mail.username)
message.setTo(email.trim()); // 收件人(必须写完整的 qq 邮箱,如 123456@qq.com)
message.setSubject("预警通知"); // 邮件标题
message.setText(content); // 邮件正文
mailSender.send(message);
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* 站内信发送
*/
private void sendInternalMessage(String content, String roleIdStr) {
long roleId = Long.parseLong(roleIdStr);
List<SysUser> users = userMapper.selectByRoleId(roleId);
if (users == null || users.isEmpty()) return;
List<InternalMessage> messages = new ArrayList<>();
for (SysUser user : users) {
InternalMessage msg = new InternalMessage();
msg.setUserId(user.getUserId());
msg.setContent(content); // 一次插入整条合并后的消息
msg.setCreateTime(new Date());
msg.setStatus("unread");
messages.add(msg);
}
if (!messages.isEmpty()) {
insertMessages(messages);
}
}
@Transactional(rollbackFor = Exception.class)
public void insertMessages(List<InternalMessage> messages) {
if (messages == null || messages.isEmpty()) {
return;
}
int rows = messageMapper.batchInsert(messages); // 返回插入行数
if (rows != messages.size()) {
throw new RuntimeException("部分消息未插入成功,事务回滚");
}
}
}

@ -1,68 +0,0 @@
package com.alops.system.service.impl;
import com.alops.system.domain.EquOid;
import com.alops.system.service.ConvertRawValueService;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
public class ConvertRawValueServiceImpl implements ConvertRawValueService {
@Override
public String convertValue(String rule, String val) {
if (rule == null) return val; // 没规则就原样返回
switch (rule) {
case "veneer_status":
// Fan board → Fault,其它 → Online
if ("Fan board".equalsIgnoreCase(val)) {
return "Fault";
} else {
return "Online";
}
case "fan_speed_status":
// 1 → Normal, 0 → Abnormal
if ("1".equals(val)) {
return "Normal";
} else if ("0".equals(val)) {
return "Abnormal";
}
break;
case "vol_in_status":
case "vol_out_status":
// 1 → Normal, 0 → UnderVoltage
if ("1".equals(val)) {
return "Normal";
} else if ("0".equals(val)) {
return "UnderVoltage";
}
break;
case "running":
// 1 → true, 2 → false
if ("1".equals(val)) {
return "true";
} else if ("2".equals(val)) {
return "false";
}
break;
case "commuicate_mode":
// 1 → Full, 2 → Half
if ("1".equals(val)) {
return "Full";
} else if ("2".equals(val)) {
return "Half";
}
break;
default:
return val; // 默认返回原值
}
return val;
}
}

@ -1,99 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.system.domain.DictAlarmParam;
import com.alops.system.mapper.DictAlarmParamMapper;
import com.alops.system.service.IDictAlarmParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 请填写功能名称Service业务层处理
*
* @author ruoyi
* @date 2025-09-05
*/
@Service
public class DictAlarmParamServiceImpl implements IDictAlarmParamService
{
@Override
public List<DictAlarmParam> getParamsByTableName(String tableName) {
return dictAlarmParamMapper.selectByTableName(tableName);
}
@Autowired
private DictAlarmParamMapper dictAlarmParamMapper;
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
@Override
public DictAlarmParam selectDictAlarmParamById(Long id)
{
return dictAlarmParamMapper.selectDictAlarmParamById(id);
}
/**
* 查询请填写功能名称列表
*
* @param dictAlarmParam 请填写功能名称
* @return 请填写功能名称
*/
@Override
public List<DictAlarmParam> selectDictAlarmParamList(DictAlarmParam dictAlarmParam)
{
return dictAlarmParamMapper.selectDictAlarmParamList(dictAlarmParam);
}
/**
* 新增请填写功能名称
*
* @param dictAlarmParam 请填写功能名称
* @return 结果
*/
@Override
public int insertDictAlarmParam(DictAlarmParam dictAlarmParam)
{
return dictAlarmParamMapper.insertDictAlarmParam(dictAlarmParam);
}
/**
* 修改请填写功能名称
*
* @param dictAlarmParam 请填写功能名称
* @return 结果
*/
@Override
public int updateDictAlarmParam(DictAlarmParam dictAlarmParam)
{
return dictAlarmParamMapper.updateDictAlarmParam(dictAlarmParam);
}
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键
* @return 结果
*/
@Override
public int deleteDictAlarmParamByIds(Long[] ids)
{
return dictAlarmParamMapper.deleteDictAlarmParamByIds(ids);
}
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
@Override
public int deleteDictAlarmParamById(Long id)
{
return dictAlarmParamMapper.deleteDictAlarmParamById(id);
}
}

@ -4,7 +4,6 @@ import java.util.List;
import com.alops.system.domain.EquBase;
import com.alops.system.domain.dto.EquBaseQueryDto;
import com.alops.system.domain.vo.queryEquBaseVO;
import com.alops.system.mapper.EquBaseMapper;
import com.alops.system.service.IEquBaseService;
import org.springframework.beans.factory.annotation.Autowired;
@ -41,7 +40,7 @@ public class EquBaseServiceImpl implements IEquBaseService
* @return 设备基本信息
*/
@Override
public List<queryEquBaseVO> selectEquBaseList(EquBaseQueryDto equBaseQueryDto)
public List<EquBase> selectEquBaseList(EquBaseQueryDto equBaseQueryDto)
{
return equBaseMapper.selectEquBaseList(equBaseQueryDto);
}

@ -1,94 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.system.domain.EquGather;
import com.alops.system.mapper.EquGatherMapper;
import com.alops.system.service.IEquGatherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 设备采集信息Service业务层处理
*
* @author ruoyi
* @date 2025-08-15
*/
@Service
public class EquGatherServiceImpl implements IEquGatherService
{
@Autowired
private EquGatherMapper equGatherMapper;
/**
* 查询设备采集信息
*
* @param id 设备采集信息主键
* @return 设备采集信息
*/
@Override
public EquGather selectEquGatherById(String id)
{
return equGatherMapper.selectEquGatherById(id);
}
/**
* 查询设备采集信息列表
*
* @param equGather 设备采集信息
* @return 设备采集信息
*/
@Override
public List<EquGather> selectEquGatherList(EquGather equGather)
{
return equGatherMapper.selectEquGatherList(equGather);
}
/**
* 新增设备采集信息
*
* @param equGather 设备采集信息
* @return 结果
*/
@Override
public int insertEquGather(EquGather equGather)
{
return equGatherMapper.insertEquGather(equGather);
}
/**
* 修改设备采集信息
*
* @param equGather 设备采集信息
* @return 结果
*/
@Override
public int updateEquGather(EquGather equGather)
{
return equGatherMapper.updateEquGather(equGather);
}
/**
* 批量删除设备采集信息
*
* @param ids 需要删除的设备采集信息主键
* @return 结果
*/
@Override
public int deleteEquGatherByIds(String[] ids)
{
return equGatherMapper.deleteEquGatherByIds(ids);
}
/**
* 删除设备采集信息信息
*
* @param id 设备采集信息主键
* @return 结果
*/
@Override
public int deleteEquGatherById(String id)
{
return equGatherMapper.deleteEquGatherById(id);
}
}

@ -1,94 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.system.domain.EquInterface;
import com.alops.system.mapper.EquInterfaceMapper;
import com.alops.system.service.IEquInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 端口运行状态Service业务层处理
*
* @author ruoyi
* @date 2025-08-20
*/
@Service
public class EquInterfaceServiceImpl implements IEquInterfaceService
{
@Autowired
private EquInterfaceMapper equInterfaceMapper;
/**
* 查询端口运行状态
*
* @param id 端口运行状态主键
* @return 端口运行状态
*/
@Override
public EquInterface selectEquInterfaceById(String id)
{
return equInterfaceMapper.selectEquInterfaceById(id);
}
/**
* 查询端口运行状态列表
*
* @param equInterface 端口运行状态
* @return 端口运行状态
*/
@Override
public List<EquInterface> selectEquInterfaceList(EquInterface equInterface)
{
return equInterfaceMapper.selectEquInterfaceList(equInterface);
}
/**
* 新增端口运行状态
*
* @param equInterface 端口运行状态
* @return 结果
*/
@Override
public int insertEquInterface(EquInterface equInterface)
{
return equInterfaceMapper.insertEquInterface(equInterface);
}
/**
* 修改端口运行状态
*
* @param equInterface 端口运行状态
* @return 结果
*/
@Override
public int updateEquInterface(EquInterface equInterface)
{
return equInterfaceMapper.updateEquInterface(equInterface);
}
/**
* 批量删除端口运行状态
*
* @param ids 需要删除的端口运行状态主键
* @return 结果
*/
@Override
public int deleteEquInterfaceByIds(String[] ids)
{
return equInterfaceMapper.deleteEquInterfaceByIds(ids);
}
/**
* 删除端口运行状态信息
*
* @param id 端口运行状态主键
* @return 结果
*/
@Override
public int deleteEquInterfaceById(String id)
{
return equInterfaceMapper.deleteEquInterfaceById(id);
}
}

@ -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.EquOid;
import com.alops.system.mapper.EquOidMapper;
import com.alops.system.service.IEquOidService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* OID配置信息Service业务层处理
*
* @author ruoyi
* @date 2025-08-15
*/
@Service
public class EquOidServiceImpl implements IEquOidService
{
@Autowired
private EquOidMapper equOidMapper;
/**
* 查询OID配置信息
*
* @param id OID配置信息主键
* @return OID配置信息
*/
@Override
public EquOid selectEquOidById(Long id)
{
return equOidMapper.selectEquOidById(id);
}
/**
* 查询OID配置信息列表
*
* @param equOid OID配置信息
* @return OID配置信息
*/
@Override
public List<EquOid> selectEquOidList(EquOid equOid)
{
return equOidMapper.selectEquOidList(equOid);
}
/**
* 新增OID配置信息
*
* @param equOid OID配置信息
* @return 结果
*/
@Override
public int insertEquOid(EquOid equOid)
{
equOid.setCreateTime(DateUtils.getNowDate());
return equOidMapper.insertEquOid(equOid);
}
/**
* 修改OID配置信息
*
* @param equOid OID配置信息
* @return 结果
*/
@Override
public int updateEquOid(EquOid equOid)
{
equOid.setUpdateTime(DateUtils.getNowDate());
return equOidMapper.updateEquOid(equOid);
}
/**
* 批量删除OID配置信息
*
* @param ids 需要删除的OID配置信息主键
* @return 结果
*/
@Override
public int deleteEquOidByIds(Long[] ids)
{
return equOidMapper.deleteEquOidByIds(ids);
}
/**
* 删除OID配置信息信息
*
* @param id OID配置信息主键
* @return 结果
*/
@Override
public int deleteEquOidById(Long id)
{
return equOidMapper.deleteEquOidById(id);
}
}

@ -1,94 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.system.domain.EquRouting;
import com.alops.system.mapper.EquRoutingMapper;
import com.alops.system.service.IEquRoutingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 路由信息Service业务层处理
*
* @author ruoyi
* @date 2025-08-15
*/
@Service
public class EquRoutingServiceImpl implements IEquRoutingService
{
@Autowired
private EquRoutingMapper equRoutingMapper;
/**
* 查询路由信息
*
* @param id 路由信息主键
* @return 路由信息
*/
@Override
public EquRouting selectEquRoutingById(String id)
{
return equRoutingMapper.selectEquRoutingById(id);
}
/**
* 查询路由信息列表
*
* @param equRouting 路由信息
* @return 路由信息
*/
@Override
public List<EquRouting> selectEquRoutingList(EquRouting equRouting)
{
return equRoutingMapper.selectEquRoutingList(equRouting);
}
/**
* 新增路由信息
*
* @param equRouting 路由信息
* @return 结果
*/
@Override
public int insertEquRouting(EquRouting equRouting)
{
return equRoutingMapper.insertEquRouting(equRouting);
}
/**
* 修改路由信息
*
* @param equRouting 路由信息
* @return 结果
*/
@Override
public int updateEquRouting(EquRouting equRouting)
{
return equRoutingMapper.updateEquRouting(equRouting);
}
/**
* 批量删除路由信息
*
* @param ids 需要删除的路由信息主键
* @return 结果
*/
@Override
public int deleteEquRoutingByIds(String[] ids)
{
return equRoutingMapper.deleteEquRoutingByIds(ids);
}
/**
* 删除路由信息信息
*
* @param id 路由信息主键
* @return 结果
*/
@Override
public int deleteEquRoutingById(String id)
{
return equRoutingMapper.deleteEquRoutingById(id);
}
}

@ -1,94 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.system.domain.EquVeneer;
import com.alops.system.mapper.EquVeneerMapper;
import com.alops.system.service.IEquVeneerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 请填写功能名称Service业务层处理
*
* @author ruoyi
* @date 2025-08-15
*/
@Service
public class EquVeneerServiceImpl implements IEquVeneerService
{
@Autowired
private EquVeneerMapper equVeneerMapper;
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
@Override
public EquVeneer selectEquVeneerById(String id)
{
return equVeneerMapper.selectEquVeneerById(id);
}
/**
* 查询请填写功能名称列表
*
* @param equVeneer 请填写功能名称
* @return 请填写功能名称
*/
@Override
public List<EquVeneer> selectEquVeneerList(EquVeneer equVeneer)
{
return equVeneerMapper.selectEquVeneerList(equVeneer);
}
/**
* 新增请填写功能名称
*
* @param equVeneer 请填写功能名称
* @return 结果
*/
@Override
public int insertEquVeneer(EquVeneer equVeneer)
{
return equVeneerMapper.insertEquVeneer(equVeneer);
}
/**
* 修改请填写功能名称
*
* @param equVeneer 请填写功能名称
* @return 结果
*/
@Override
public int updateEquVeneer(EquVeneer equVeneer)
{
return equVeneerMapper.updateEquVeneer(equVeneer);
}
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键
* @return 结果
*/
@Override
public int deleteEquVeneerByIds(String[] ids)
{
return equVeneerMapper.deleteEquVeneerByIds(ids);
}
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
@Override
public int deleteEquVeneerById(String id)
{
return equVeneerMapper.deleteEquVeneerById(id);
}
}

@ -1,97 +0,0 @@
package com.alops.system.service.impl;
import java.util.List;
import com.alops.common.utils.DateUtils;
import com.alops.system.domain.EquVlan;
import com.alops.system.mapper.EquVlanMapper;
import com.alops.system.service.IEquVlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 请填写功能名称Service业务层处理
*
* @author ruoyi
* @date 2025-08-15
*/
@Service
public class EquVlanServiceImpl implements IEquVlanService
{
@Autowired
private EquVlanMapper equVlanMapper;
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
@Override
public EquVlan selectEquVlanById(String id)
{
return equVlanMapper.selectEquVlanById(id);
}
/**
* 查询请填写功能名称列表
*
* @param equVlan 请填写功能名称
* @return 请填写功能名称
*/
@Override
public List<EquVlan> selectEquVlanList(EquVlan equVlan)
{
return equVlanMapper.selectEquVlanList(equVlan);
}
/**
* 新增请填写功能名称
*
* @param equVlan 请填写功能名称
* @return 结果
*/
@Override
public int insertEquVlan(EquVlan equVlan)
{
equVlan.setCreateTime(DateUtils.getNowDate());
return equVlanMapper.insertEquVlan(equVlan);
}
/**
* 修改请填写功能名称
*
* @param equVlan 请填写功能名称
* @return 结果
*/
@Override
public int updateEquVlan(EquVlan equVlan)
{
return equVlanMapper.updateEquVlan(equVlan);
}
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键
* @return 结果
*/
@Override
public int deleteEquVlanByIds(String[] ids)
{
return equVlanMapper.deleteEquVlanByIds(ids);
}
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
@Override
public int deleteEquVlanById(String id)
{
return equVlanMapper.deleteEquVlanById(id);
}
}

@ -0,0 +1,94 @@
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,297 +0,0 @@
package com.alops.system.service.impl;
import com.alops.system.domain.*;
import com.alops.system.domain.vo.Code;
import com.alops.system.domain.vo.EquGatherInsertInfo;
import com.alops.system.domain.vo.GatherEntities;
import com.alops.system.mapper.*;
import com.alops.system.service.ConvertRawValueService;
import com.alops.system.service.MemoryToolService;
import org.springframework.beans.factory.annotation.Autowired;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@Service
//建造实体类的工具
public class MemoryToolServiceImpl implements MemoryToolService {
@Autowired
private EquGatherMapper equGatherMapper;
@Autowired
private EquInterfaceMapper equInterfaceMapper;
@Autowired
private EquRoutingMapper equRoutingMapper;
@Autowired
private EquVeneerMapper equVeneerMapper;
@Autowired
private EquVlanMapper equVlanMapper;
private static final Logger log = LoggerFactory.getLogger(MemoryToolServiceImpl.class);
//生成实体类和存入数据库
public GatherEntities buildAndInsertEntity(
EquBase device,
Map<String, Object> snmpResults) {
// 1. 创建主表实体
EquGather equGather = new EquGather();
String gatherId = UUID.randomUUID().toString();
equGather.setId(gatherId);
equGather.setEquId(device.getId());
equGather.setGatherTime(new Date());
// 2. 临时存放单值字段
Map<String, String> equGatherFields = new HashMap<>();
// 3. 遍历 snmpResults
Map<String, List<Object>> listEntitiesMap = new HashMap<>(); // key: 表名, value: 实体列表
for (Map.Entry<String, Object> entry : snmpResults.entrySet()) {
String param = entry.getKey();
Object value = entry.getValue();
if (value instanceof List) {
// 处理 List 类型,转换成实体对象,表名直接用 param
List<Map<String, Object>> rows = (List<Map<String, Object>>) value;
List<Object> entities = new ArrayList<>();
for (Map<String, Object> row : rows) {
// 生成实体
Object entity = createEntityForTable(param, row);
if (entity != null) {
// 生成主键 UUID 并填入实体
String rowId = UUID.randomUUID().toString();
fillField(entity, param, "id", rowId);
// 关联设备ID
// fillField(entity, param, "device_id", device.getId());
// 如果需要关联主表 gatherId,也填进去
fillField(entity, param, "equ_gather_id", gatherId);
entities.add(entity);
}
}
listEntitiesMap.put(param, entities);
// 直接批量插入数据库
// insertEntityList(param, entities);
} else {
// 单值字段,直接存 equGather
equGatherFields.put(param, value != null ? value.toString() : null);
}
}
// 4. 填充单值字段到主表实体
equGatherFields.forEach((k, v) -> fillField(equGather, "equ_gather", k, v));
// 5. 插入主表
// equGatherMapper.insertEquGather(equGather);
// 5. 封装返回
GatherEntities result = new GatherEntities();
result.setEquGather(equGather);
result.getSubEntities().putAll(listEntitiesMap);
return result;
}
/**
* 批量落库主表和子表
*
* @param allEntities 待插入的实体列表
* @return 状态码Code.SUCCESS 成功Code.FAIL 失败
*/
public int persistAll(List<GatherEntities> allEntities) {
// 1. 空检查
if (allEntities == null || allEntities.isEmpty()) {
log.warn("待插入实体为空");
return Code.FAIL;
}
try {
// ===== 2. 主表批量插入 =====
List<EquGather> gatherList = allEntities.stream()
.map(GatherEntities::getEquGather)
.collect(Collectors.toList());
if (!gatherList.isEmpty()) {
// 如果 Mapper 批量方法返回 void,异常会在失败时抛出
equGatherMapper.batchInsertEquGather(gatherList);
}
// ===== 3. 子表按表名分组批量插入 =====
Map<String, List<Object>> groupedSubEntities = new HashMap<>();
for (GatherEntities g : allEntities) {
g.getSubEntities().forEach((table, list) ->
groupedSubEntities.computeIfAbsent(table, k -> new ArrayList<>()).addAll(list)
);
}
for (Map.Entry<String, List<Object>> entry : groupedSubEntities.entrySet()) {
String tableName = entry.getKey();
List<Object> list = entry.getValue();
if (!list.isEmpty()) {
// 子表插入,如果失败抛异常
insertEntityList(tableName, list);
}
}
// ===== 4. 全部成功 =====
return Code.SUCCESS;
} catch (Exception e) {
log.error("批量落库失败", e);
return Code.FAIL;
}
}
/**
* 根据表名和字段生成对应实体对象
*/
private Object createEntityForTable(String tableName, Map<String, Object> rowData) {
switch (tableName) {
case "equ_interface":
EquInterface equInterface=new EquInterface();
rowData.forEach((k, v) -> fillField(equInterface, tableName, k, v != null ? v.toString() : null));
return equInterface;
case "equ_routing":
EquRouting equRouting=new EquRouting();
rowData.forEach((k, v) -> fillField(equRouting, tableName, k, v != null ? v.toString() : null));
return equRouting;
case "equ_veneer":
EquVeneer equVeneer=new EquVeneer();
rowData.forEach((k, v) -> fillField(equVeneer, tableName, k, v != null ? v.toString() : null));
return equVeneer;
case "equ_vlan":
EquVlan equVlan=new EquVlan();
rowData.forEach((k, v) -> fillField(equVlan, tableName, k, v != null ? v.toString() : null));
return equVlan;
// 可以继续加其他表
default:
return null;
}
}
/**
* 批量插入数据库按表名分发到对应 Mapper
*/
private void insertEntityList(String tableName, List<Object> entities) {
if (entities.isEmpty()) return;
switch (tableName) {
case "equ_interface":
equInterfaceMapper.insertBatch((List<EquInterface>)(List<?>) entities);
break;
case "equ_routing":
equRoutingMapper.insertBatchRouting((List<EquRouting>)(List<?>) entities);
break;
case "equ_veneer":
equVeneerMapper.insertBatchVeneer((List<EquVeneer>)(List<?>) entities);
break;
case "equ_vlan":
equVlanMapper.insertBatchVlan((List<EquVlan>)(List<?>) entities);
break;
// 其他表继续添加
}
}
/**
* 根据表名和字段名给实体赋值
*
* @param entity 要赋值的实体对象
* @param tableName 表名可选可用于日志或扩展
* @param fieldName 字段名对应实体的属性名
* @param value 要赋的值String 类型可根据属性类型转换
*/
public void fillField(Object entity, String tableName, String fieldName, String value) {
if (entity == null || fieldName == null || value == null) {
return;
}
try {
Field field = null;
Class<?> clazz = entity.getClass();
try {
// 先尝试直接找(比如字段名本来就是一致的情况)
field = clazz.getDeclaredField(fieldName);
} catch (NoSuchFieldException e) {
// 如果找不到,尝试下划线转驼峰
String camelName = toCamelCase(fieldName);
try {
field = clazz.getDeclaredField(camelName);
} catch (NoSuchFieldException ignored) {
log.warn("实体 {} 没有字段 {}(驼峰:{}),表名 {}",
clazz.getSimpleName(), fieldName, camelName, tableName);
return; // 找不到就直接返回
}
}
field.setAccessible(true); // 设置可访问
Class<?> type = field.getType();
// 类型转换
if (type == String.class) {
field.set(entity, value);
} else if (type == int.class || type == Integer.class) {
field.set(entity, Integer.parseInt(value));
} else if (type == long.class || type == Long.class) {
field.set(entity, (long) Double.parseDouble(value)); // 改这里
} else if (type == double.class || type == Double.class) {
field.set(entity, Double.parseDouble(value));
} else if (type == boolean.class || type == Boolean.class) {
field.set(entity, Boolean.parseBoolean(value));
} else if (type == Date.class) {
field.set(entity, Timestamp.valueOf(value));
} else if (type == BigDecimal.class) {
field.set(entity, new BigDecimal(value));
} else {
field.set(entity, value);
}
} catch (Exception e) {
log.error("实体 {} 字段 {} 赋值失败: {}", entity.getClass().getSimpleName(), fieldName, e.getMessage(), e);
}
}
/**
* 下划线转驼峰例如 des_address -> desAddress
*/
private String toCamelCase(String columnName) {
StringBuilder result = new StringBuilder();
boolean upperCaseNext = false;
for (char c : columnName.toCharArray()) {
if (c == '_') {
upperCaseNext = true;
} else {
if (upperCaseNext) {
result.append(Character.toUpperCase(c));
upperCaseNext = false;
} else {
result.append(Character.toLowerCase(c));
}
}
}
return result.toString();
}
}

@ -1,34 +1,12 @@
package com.alops.system.service.impl;
import java.math.BigDecimal;
import java.sql.SQLOutput;
import java.sql.Timestamp;
import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.stream.Collectors;
import java.util.List;
import com.alops.common.core.domain.AjaxResult;
import com.alops.system.domain.*;
import com.alops.system.domain.vo.Code;
import com.alops.system.domain.vo.EquGatherResult;
import com.alops.system.domain.vo.GatherEntities;
import com.alops.system.mapper.*;
import com.alops.system.domain.ScheduleRules;
import com.alops.system.mapper.ScheduleRulesMapper;
import com.alops.system.service.IScheduleRulesService;
import com.alops.system.service.MemoryToolService;
import com.alops.system.service.SnmpService;
import org.apache.poi.ss.formula.functions.Now;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import static java.lang.Long.parseLong;
import static javax.xml.bind.DatatypeConverter.parseDecimal;
/**
* 定时采集规则Service业务层处理
@ -37,143 +15,10 @@ import static javax.xml.bind.DatatypeConverter.parseDecimal;
* @date 2025-08-03
*/
@Service
public class ScheduleRulesServiceImpl implements IScheduleRulesService {
public class ScheduleRulesServiceImpl implements IScheduleRulesService
{
@Autowired
private ScheduleRulesMapper scheduleRulesMapper;
@Autowired
private EquBaseMapper equBaseMapper;
@Autowired
private EquOidMapper equOidMapper;
@Autowired
private SnmpService snmpService;
@Autowired
private EquGatherMapper equGatherMapper;
@Autowired
private MemoryToolService memoryToolService;
private static final Logger log = LoggerFactory.getLogger(ScheduleRulesServiceImpl.class);
/**
* 删除所有设备相关表数据保证事务一致性
*/
@Transactional(rollbackFor = Exception.class)
public void deleteAllEquipmentData() {
equBaseMapper.deleteEquInterface();
equBaseMapper.deleteEquRouting();
equBaseMapper.deleteEquVeneer();
equBaseMapper.deleteEquVlan();
}
@Override
public int executeImmediately() throws ExecutionException, InterruptedException {
//删除之前的信息
deleteAllEquipmentData();
// 1.收集设备信息
List<EquBase> devices = equBaseMapper.findEquBaseList();
if (devices.isEmpty()) {
return Code.FAIL;
}
// 2.根据厂商ip收集 OID
Map<String, List<EquOid>> oidMap = new HashMap<>();
for (EquBase dev : devices) {
String key = dev.getManufacture();
List<EquOid> oids = equOidMapper.findByManuIdAndStatus(key);
oidMap.put(key, oids);
}
ExecutorService executor = Executors.newFixedThreadPool(10);
List<Future<GatherEntities>> futures = new ArrayList<>();
for (EquBase device : devices) {
futures.add(executor.submit(() -> {
try {
long start = System.currentTimeMillis();
List<EquOid> oids = oidMap.getOrDefault(device.getManufacture(), Collections.emptyList());
Map<String, Object> snmpResults = snmpService.query(device.getIp(), oids);
long afterSnmp = System.currentTimeMillis();
System.out.println("SNMP查询耗时: " + (afterSnmp - start) + " ms");
GatherEntities entities = memoryToolService.buildAndInsertEntity(device, snmpResults);
long afterBuild = System.currentTimeMillis();
System.out.println("buildAndInsertEntity构建实体类耗时: " + (afterBuild - afterSnmp) + " ms");
if (entities != null && entities.getEquGather() != null) {
Double temperature = parseDouble(snmpResults.get("temperature")); // 温度
Double cpuUsage = parseDouble(snmpResults.get("cpu_utilization"));
Double memUsage = parseDouble(snmpResults.get("memory_utilization"));
double tempHealth = calculateTemperatureHealth(temperature);
double humidityHealth = 1;
double cpuHealth = calculateCpuHealth(cpuUsage);
double memHealth = calculateMemoryHealth(memUsage);
double totalHealth = Math.max(
Math.max(tempHealth, humidityHealth),
Math.max(cpuHealth, memHealth)
);
entities.getEquGather().setHealth(BigDecimal.valueOf(totalHealth));
return entities;
}
return null;
} catch (Exception e) {
e.printStackTrace();
log.error("设备采集失败,设备ID: {}, IP: {}, 原因: {}", device.getId(), device.getIp(), e.getMessage(), e);
return null;
}
}));
}
List<GatherEntities> allEntities = new ArrayList<>();
for (Future<GatherEntities> f : futures) {
GatherEntities g = f.get();
if (g != null) allEntities.add(g);
}
long persistStart = System.currentTimeMillis();
// 统一批量落库
int result=memoryToolService.persistAll(allEntities);
long persistEnd = System.currentTimeMillis();
System.out.println("批量落库耗时: " + (persistEnd - persistStart) + " ms");
return result;
}
// 健康度计算函数示例
private int calculateTemperatureHealth(Double temp) {
if (temp == null) return 4; // 无数据视为需维护
if (temp >= 25 && temp <= 45) return 1;
if ((temp >= 20 && temp < 25) || (temp > 45 && temp <= 50)) return 2;
if ((temp >= 16 && temp < 20) || (temp > 50 && temp <= 55)) return 3;
return 4;
}
private int calculateCpuHealth(Double cpu) {
if (cpu == null) return 4;
if (cpu <= 80) return 1;
if (cpu <= 90) return 2;
if (cpu <= 95) return 3;
return 4;
}
private int calculateMemoryHealth(Double mem) {
if (mem == null) return 4;
if (mem <= 80) return 1;
if (mem <= 90) return 2;
if (mem <= 95) return 3;
return 4;
}
private Double parseDouble(Object obj) {
if (obj == null) return null;
try {
return Double.parseDouble(obj.toString());
} catch (NumberFormatException e) {
return null;
}
}
/**
* 查询定时采集规则
@ -181,7 +26,6 @@ public class ScheduleRulesServiceImpl implements IScheduleRulesService {
* @param id 定时采集规则主键
* @return 定时采集规则
*/
@Override
public ScheduleRules selectScheduleRulesById(Long id)
{
@ -248,4 +92,3 @@ public class ScheduleRulesServiceImpl implements IScheduleRulesService {
return scheduleRulesMapper.deleteScheduleRulesById(id);
}
}

@ -1,299 +0,0 @@
package com.alops.system.service.impl;
import com.alops.system.domain.EquOid;
import com.alops.system.service.ConvertRawValueService;
import com.alops.system.service.SnmpService;
import org.snmp4j.CommunityTarget;
import org.snmp4j.Snmp;
import org.snmp4j.mp.SnmpConstants;
import org.snmp4j.smi.*;
import org.snmp4j.transport.DefaultUdpTransportMapping;
import org.snmp4j.util.DefaultPDUFactory;
import org.snmp4j.util.TreeEvent;
import org.snmp4j.util.TreeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.*;
//根据截取方式生成结果
@Service
public class SnmpServiceImpl implements SnmpService {
@Autowired
private ConvertRawValueService convertRawValueService;
@Override
public Map<String, Object> query(String ip, List<EquOid> oids) {
Map<String, Object> result = new HashMap<>();
// 保存 param(多表表名) -> 动态字段名(对应id)
Map<String, String> paramDynamicKeyMap = new HashMap<>();
try {
Address targetAddress = GenericAddress.parse("udp:" + ip + "/161");
CommunityTarget target = new CommunityTarget();
target.setCommunity(new OctetString("publicswitch"));
target.setAddress(targetAddress);
target.setRetries(2);
target.setTimeout(1500);
target.setVersion(SnmpConstants.version2c);
Snmp snmp = new Snmp(new DefaultUdpTransportMapping());
snmp.listen();
Map<String, Map<String, Map<String, String>>> highTemp = new HashMap<>();
Map<String, Map<String, Map<String, String>>> lowTemp = new HashMap<>();
// 存放每个 param 的 mergedMap
Map<String, Map<String, Map<String, String>>> mergedMaps = new HashMap<>();
for (EquOid oid : oids) {
System.out.println(oid.getDescription()+"请求===="+System.currentTimeMillis());
String way = oid.getCutRule(); // 截取方式
OID rootOid = new OID(oid.getOid());
TreeUtils treeUtils = new TreeUtils(snmp, new DefaultPDUFactory());
List<TreeEvent> events = treeUtils.getSubtree(target, rootOid);
System.out.println(oid.getDescription()+"返回===="+System.currentTimeMillis());
if (events == null || events.isEmpty()) {
result.put(oid.getParam(), null);
continue;
}
switch (way) {
case "1":
// 最后一个非 0 值
String lastNonZero = null;
for (TreeEvent event : events) {
if (event == null || event.isError()) continue;
VariableBinding[] vbs = event.getVariableBindings();
if (vbs == null) continue;
for (VariableBinding vb : vbs) {
String val = vb.getVariable().toString();
if (!"0".equals(val)) {
lastNonZero = val;
}
}
}
// 调用自定义转换函数
// String value1 = convertRawValueService.convertValue( oid.getConvertRule(),lastNonZero);
result.put(oid.getParam(),lastNonZero);
break;
case "2":
String[] keys2 = (oid.getSubParamGroup() != null) ? oid.getSubParamGroup().split(",") : new String[0];
// 如果之前已经有这个 param,就用它的内容继续合并
Map<String, Map<String, String>> mergedMap =
mergedMaps.getOrDefault(oid.getParam(), new LinkedHashMap<>());
for (TreeEvent event : events) {
if (event == null || event.isError()) continue;
VariableBinding[] vbs = event.getVariableBindings();
if (vbs == null) continue;
for (VariableBinding vb : vbs) {
String oidStr = vb.getOid().toString();
String index = oidStr.substring(oidStr.lastIndexOf(".") + 1);
String val = vb.getVariable().toString();
// 判断是否高低位
if (oid.getCombineGroup() != null && !oid.getCombineGroup().isEmpty()) {
String param = oid.getParam();
String group = oid.getCombineGroup();
if (oid.getIsHighPart() != null && oid.getIsHighPart().intValue() != 0) {
highTemp.computeIfAbsent(param, k -> new HashMap<>())
.computeIfAbsent(group, k -> new HashMap<>())
.put(index, val);
} else {
lowTemp.computeIfAbsent(param, k -> new HashMap<>())
.computeIfAbsent(group, k -> new HashMap<>())
.put(index, val);
}
continue;
}
// 普通字段 convertRawValueService.convertValue(oid.getConvertRule(), val)
Map<String, String> entry = mergedMap.getOrDefault(index, new HashMap<>());
if (keys2.length > 0) {
entry.put(keys2[0], index);
paramDynamicKeyMap.put(oid.getParam(), keys2[0]);}
if (keys2.length > 1) entry.put(keys2[1], val);
mergedMap.put(index, entry);
}
}
mergedMaps.put(oid.getParam(), mergedMap);
break;
case "3":
// 单值
String singleValue = null;
outerLoop:
for (TreeEvent event : events) {
if (event == null || event.isError()) continue;
VariableBinding[] vbs = event.getVariableBindings();
if (vbs == null) continue;
for (VariableBinding vb : vbs) {
singleValue = vb.getVariable().toString();
break outerLoop; // 只取第一个
}
}
// String value3 = convertRawValueService.convertValue(oid.getConvertRule(),singleValue );
result.put(oid.getParam(), singleValue);
break;
case "4":
// 目的地址 + 掩码 + 下一跳,动态 key
List<Map<String, String>> routeList = new ArrayList<>();
String[] keys4 = (oid.getSubParamGroup() != null)
? oid.getSubParamGroup().split(",")
: new String[0];
for (TreeEvent event : events) {
if (event == null || event.isError()) continue;
VariableBinding[] vbs = event.getVariableBindings();
if (vbs == null) continue;
for (VariableBinding vb : vbs) {
String oidStr = vb.getOid().toString();
String prefix = "1.3.6.1.2.1.4.24.7.1.9.1.4";
if (!oidStr.startsWith(prefix)) continue;
String suffix = oidStr.substring(prefix.length());
String[] parts = suffix.split("\\.");
if (parts.length < 8) continue;
Map<String, String> route = new HashMap<>();
// 遍历 keys4
for (int i = 0; i < keys4.length; i++) {
if (i == 0) {
// // 第一个字段:目的地址作为id
String destIp = parts[1] + "." + parts[2] + "." + parts[3] + "." + parts[4];
route.put(keys4[i], destIp);
} else if (i == 1) {
// 第二个字段:子网掩码
int maskInt = Integer.parseInt(parts[5]);
route.put(keys4[i], convertMask(maskInt));
} else if (i == 2) {
// 第三个字段:下一跳
String nextHop = parts[parts.length - 4] + "." +
parts[parts.length - 3] + "." +
parts[parts.length - 2] + "." +
parts[parts.length - 1];
route.put(keys4[i], nextHop);
}
}
routeList.add(route);
}
}
result.put(oid.getParam(), routeList);
break;
case "5":
// 取最后两行数据的最后一个值,两个都是1则返回1,否则0
List<String> lastTwoValues = new ArrayList<>();
for (TreeEvent event : events) {
if (event == null || event.isError()) continue;
VariableBinding[] vbs = event.getVariableBindings();
if (vbs == null || vbs.length == 0) continue;
lastTwoValues.add(vbs[vbs.length - 1].getVariable().toString());
}
String value5 = "0";
if (lastTwoValues.size() >= 2) {
String val1 = lastTwoValues.get(lastTwoValues.size() - 2);
String val2 = lastTwoValues.get(lastTwoValues.size() - 1);
if ("1".equals(val1) && "1".equals(val2)) {
value5 = "1";
}
}
// value5 = convertRawValueService.convertValue(oid.getConvertRule(), value5);
result.put(oid.getParam(), value5);
break;
case "6":
// 取最后一行的最后一个值
String lastValue = null;
for (TreeEvent event : events) {
if (event == null || event.isError()) continue;
VariableBinding[] vbs = event.getVariableBindings();
if (vbs == null || vbs.length == 0) continue;
lastValue = vbs[vbs.length - 1].getVariable().toString();
}
// String value6 = convertRawValueService.convertValue(oid.getConvertRule(), lastValue);
result.put(oid.getParam(), lastValue);
break;
default:
result.put(oid.getParam(), null);
}
}
snmp.close();
// 对于非高低位的普通字段
for (String param : mergedMaps.keySet()) {
if (!highTemp.containsKey(param)) { // 不是高低位的
Map<String, Map<String, String>> map = mergedMaps.get(param);
if (map != null && !map.isEmpty()) {
result.put(param, new ArrayList<>(map.values()));
}
}
}
// 全局高低位统一合并
for (String param : highTemp.keySet()) {
Map<String, Map<String, String>> highGroups = highTemp.get(param);
Map<String, Map<String, String>> lowGroups = lowTemp.getOrDefault(param, new HashMap<>());
Map<String, Map<String, String>> mergedMap = mergedMaps.getOrDefault(param, new LinkedHashMap<>());
for (String group : highGroups.keySet()) {
Map<String, String> highValues = highGroups.get(group);
Map<String, String> lowValues = lowGroups.getOrDefault(group, new HashMap<>());
for (String index : highValues.keySet()) {
int high = Integer.parseInt(highValues.get(index));
int low = Integer.parseInt(lowValues.getOrDefault(index, "0"));
long combined = ((long) high << 32) + (long) low;
Map<String, String> entry = mergedMap.getOrDefault(index, new HashMap<>());
String dynamicKey = paramDynamicKeyMap.getOrDefault(param, "index");
entry.put(dynamicKey, index);
entry.put(group, String.valueOf(combined));
mergedMap.put(index, entry);
}
}
result.put(param, new ArrayList<>(mergedMap.values()));
}
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
// CIDR 转掩码
private String convertMask(int cidr) throws UnknownHostException {
int mask = 0xffffffff << (32 - cidr);
byte[] bytes = new byte[]{
(byte) (mask >>> 24),
(byte) (mask >> 16 & 0xff),
(byte) (mask >> 8 & 0xff),
(byte) (mask & 0xff)
};
InetAddress netAddr = InetAddress.getByAddress(bytes);
return netAddr.getHostAddress();
}
}

@ -1,39 +0,0 @@
package com.alops.system.typeHandlers;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedJdbcTypes;
import org.apache.ibatis.type.MappedTypes;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
@MappedTypes(String.class)
@MappedJdbcTypes(JdbcType.BIGINT)
public class StringToLongTypeHandler extends BaseTypeHandler<String> {
@Override
public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType) throws SQLException {
ps.setLong(i, Long.parseLong(parameter));
}
@Override
public String getNullableResult(ResultSet rs, String columnName) throws SQLException {
long value = rs.getLong(columnName);
return rs.wasNull() ? null : String.valueOf(value);
}
@Override
public String getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
long value = rs.getLong(columnIndex);
return rs.wasNull() ? null : String.valueOf(value);
}
@Override
public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
long value = cs.getLong(columnIndex);
return cs.wasNull() ? null : String.valueOf(value);
}
}

@ -0,0 +1,110 @@
<?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>

@ -1,93 +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.AlertRuleConditionMapper">
<resultMap type="AlertRuleCondition" id="AlertRuleConditionResult">
<result property="id" column="id" />
<result property="alertRuleId" column="alert_rule_id" />
<result property="paramName" column="param_name" />
<result property="operator" column="operator" />
<result property="compareValue" column="compare_value" />
<result property="logicOperator" column="logic_operator" />
<result property="orderNo" column="order_no" />
<result property="valueType" column="value_type" />
</resultMap>
<select id="findByRuleId" resultMap="AlertRuleConditionResult">
SELECT *
FROM alert_rule_condition
WHERE alert_rule_id = #{ruleId}
ORDER BY order_no ASC
</select>
<sql id="selectAlertRuleConditionVo">
select id, alert_rule_id, param_name, operator, compare_value, logic_operator, order_no, value_type from alert_rule_condition
</sql>
<select id="selectAlertRuleConditionList" parameterType="AlertRuleCondition" resultMap="AlertRuleConditionResult">
<include refid="selectAlertRuleConditionVo"/>
<where>
<if test="alertRuleId != null "> and alert_rule_id = #{alertRuleId}</if>
<if test="paramName != null and paramName != ''"> and param_name like concat('%', #{paramName}, '%')</if>
<if test="operator != null and operator != ''"> and operator = #{operator}</if>
<if test="compareValue != null and compareValue != ''"> and compare_value = #{compareValue}</if>
<if test="logicOperator != null and logicOperator != ''"> and logic_operator = #{logicOperator}</if>
<if test="orderNo != null "> and order_no = #{orderNo}</if>
<if test="valueType != null and valueType != ''"> and value_type = #{valueType}</if>
</where>
</select>
<select id="selectAlertRuleConditionById" parameterType="Long" resultMap="AlertRuleConditionResult">
<include refid="selectAlertRuleConditionVo"/>
where id = #{id}
</select>
<insert id="insertAlertRuleCondition" parameterType="AlertRuleCondition" useGeneratedKeys="true" keyProperty="id">
insert into alert_rule_condition
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="alertRuleId != null">alert_rule_id,</if>
<if test="paramName != null">param_name,</if>
<if test="operator != null">operator,</if>
<if test="compareValue != null">compare_value,</if>
<if test="logicOperator != null">logic_operator,</if>
<if test="orderNo != null">order_no,</if>
<if test="valueType != null">value_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="alertRuleId != null">#{alertRuleId},</if>
<if test="paramName != null">#{paramName},</if>
<if test="operator != null">#{operator},</if>
<if test="compareValue != null">#{compareValue},</if>
<if test="logicOperator != null">#{logicOperator},</if>
<if test="orderNo != null">#{orderNo},</if>
<if test="valueType != null">#{valueType},</if>
</trim>
</insert>
<update id="updateAlertRuleCondition" parameterType="AlertRuleCondition">
update alert_rule_condition
<trim prefix="SET" suffixOverrides=",">
<if test="alertRuleId != null">alert_rule_id = #{alertRuleId},</if>
<if test="paramName != null">param_name = #{paramName},</if>
<if test="operator != null">operator = #{operator},</if>
<if test="compareValue != null">compare_value = #{compareValue},</if>
<if test="logicOperator != null">logic_operator = #{logicOperator},</if>
<if test="orderNo != null">order_no = #{orderNo},</if>
<if test="valueType != null">value_type = #{valueType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAlertRuleConditionById" parameterType="Long">
delete from alert_rule_condition where id = #{id}
</delete>
<delete id="deleteAlertRuleConditionByIds" parameterType="String">
delete from alert_rule_condition where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,131 +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.AlertRuleMapper">
<resultMap type="AlertRule" id="AlertRuleResult">
<result property="id" column="id" />
<result property="ruleName" column="rule_name" />
<result property="severity" column="severity" />
<result property="alertWay" column="alert_way" />
<result property="alertStation" column="alert_station" />
<result property="description" column="description" />
<result property="enable" column="enable" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="tableName" column="table_name" />
<result property="alertSql" column="alert_sql" />
<result property="alertTemplate" column="alert_template" />
<result property="type" column="type" />
</resultMap>
<!-- 根据 id 列表查询 AlertRule -->
<select id="selectByIds" resultMap="AlertRuleResult" parameterType="java.util.List">
SELECT *
FROM alert_rule
WHERE id IN
<foreach collection="list" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<sql id="selectAlertRuleVo">
select id, rule_name, severity, alert_way, alert_station, description, enable, create_time, update_time, create_by, update_by, table_name, alert_sql, alert_template, type from alert_rule
</sql>
<select id="selectAlertRuleList" parameterType="AlertRule" resultMap="AlertRuleResult">
<include refid="selectAlertRuleVo"/>
<where>
<if test="ruleName != null and ruleName != ''"> and rule_name like concat('%', #{ruleName}, '%')</if>
<if test="severity != null "> and severity = #{severity}</if>
<if test="alertWay != null and alertWay != ''"> and alert_way = #{alertWay}</if>
<if test="alertStation != null and alertStation != ''"> and alert_station = #{alertStation}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="enable != null "> and enable = #{enable}</if>
<if test="tableName != null and tableName != ''"> and table_name like concat('%', #{tableName}, '%')</if>
<if test="alertSql != null and alertSql != ''"> and alert_sql = #{alertSql}</if>
<if test="alertTemplate != null and alertTemplate != ''"> and alert_template = #{alertTemplate}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
</where>
</select>
<select id="selectAlertRuleById" parameterType="Long" resultMap="AlertRuleResult">
<include refid="selectAlertRuleVo"/>
where id = #{id}
</select>
<insert id="insertAlertRule" parameterType="AlertRule" useGeneratedKeys="true" keyProperty="id">
insert into alert_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ruleName != null">rule_name,</if>
<if test="severity != null">severity,</if>
<if test="alertWay != null">alert_way,</if>
<if test="alertStation != null">alert_station,</if>
<if test="description != null">description,</if>
<if test="enable != null">enable,</if>
create_time,
update_time,
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="tableName != null">table_name,</if>
<if test="alertSql != null">alert_sql,</if>
<if test="alertTemplate != null">alert_template,</if>
<if test="type != null">type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ruleName != null">#{ruleName},</if>
<if test="severity != null">#{severity},</if>
<if test="alertWay != null">#{alertWay},</if>
<if test="alertStation != null">#{alertStation},</if>
<if test="description != null">#{description},</if>
<if test="enable != null">#{enable},</if>
<choose>
<when test="createTime != null">#{createTime}</when>
<otherwise>NOW()</otherwise>
</choose>,
<choose>
<when test="updateTime != null">#{updateTime}</when>
<otherwise>NOW()</otherwise>
</choose>,
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="tableName != null">#{tableName},</if>
<if test="alertSql != null">#{alertSql},</if>
<if test="alertTemplate != null">#{alertTemplate},</if>
<if test="type != null">#{type},</if>
</trim>
</insert>
<update id="updateAlertRule" parameterType="AlertRule">
update alert_rule
<trim prefix="SET" suffixOverrides=",">
<if test="ruleName != null">rule_name = #{ruleName},</if>
<if test="severity != null">severity = #{severity},</if>
<if test="alertWay != null">alert_way = #{alertWay},</if>
<if test="alertStation != null">alert_station = #{alertStation},</if>
<if test="description != null">description = #{description},</if>
<if test="enable != null">enable = #{enable},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="tableName != null">table_name = #{tableName},</if>
<if test="alertSql != null">alert_sql = #{alertSql},</if>
<if test="alertTemplate != null">alert_template = #{alertTemplate},</if>
<if test="type != null">type = #{type},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAlertRuleById" parameterType="Long">
delete from alert_rule where id = #{id}
</delete>
<delete id="deleteAlertRuleByIds" parameterType="String">
delete from alert_rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,77 +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.DictAlarmParamMapper">
<resultMap type="DictAlarmParam" id="DictAlarmParamResult">
<result property="id" column="id" />
<result property="paramName" column="param_name" />
<result property="tableName" column="table_name" />
<result property="columnName" column="column_name" />
<result property="paramType" column="param_type" />
</resultMap>
<select id="selectByTableName" resultMap="DictAlarmParamResult">
SELECT id, param_name, table_name, column_name, param_type
FROM dict_alarm_param
WHERE table_name = #{tableName}
</select>
<sql id="selectDictAlarmParamVo">
select id, param_name, table_name, column_name, param_type from dict_alarm_param
</sql>
<select id="selectDictAlarmParamList" parameterType="DictAlarmParam" resultMap="DictAlarmParamResult">
<include refid="selectDictAlarmParamVo"/>
<where>
<if test="paramName != null and paramName != ''"> and param_name like concat('%', #{paramName}, '%')</if>
<if test="tableName != null and tableName != ''"> and table_name like concat('%', #{tableName}, '%')</if>
<if test="columnName != null and columnName != ''"> and column_name like concat('%', #{columnName}, '%')</if>
<if test="paramType != null and paramType != ''"> and param_type = #{paramType}</if>
</where>
</select>
<select id="selectDictAlarmParamById" parameterType="Long" resultMap="DictAlarmParamResult">
<include refid="selectDictAlarmParamVo"/>
where id = #{id}
</select>
<insert id="insertDictAlarmParam" parameterType="DictAlarmParam" useGeneratedKeys="true" keyProperty="id">
insert into dict_alarm_param
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="paramName != null and paramName != ''">param_name,</if>
<if test="tableName != null">table_name,</if>
<if test="columnName != null">column_name,</if>
<if test="paramType != null">param_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="paramName != null and paramName != ''">#{paramName},</if>
<if test="tableName != null">#{tableName},</if>
<if test="columnName != null">#{columnName},</if>
<if test="paramType != null">#{paramType},</if>
</trim>
</insert>
<update id="updateDictAlarmParam" parameterType="DictAlarmParam">
update dict_alarm_param
<trim prefix="SET" suffixOverrides=",">
<if test="paramName != null and paramName != ''">param_name = #{paramName},</if>
<if test="tableName != null">table_name = #{tableName},</if>
<if test="columnName != null">column_name = #{columnName},</if>
<if test="paramType != null">param_type = #{paramType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDictAlarmParamById" parameterType="Long">
delete from dict_alarm_param where id = #{id}
</delete>
<delete id="deleteDictAlarmParamByIds" parameterType="String">
delete from dict_alarm_param where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -9,7 +9,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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" />
@ -18,32 +17,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="lifeCycle" column="life_cycle" />
<result property="serviceTime" column="service_time" />
<result property="warranty" column="warranty" />
<result property="failureFrequency" column="failure_frequency" />
<result property="repairFrequency" column="repair_frequency" />
<result property="repairCost" column="repair_cost" />
<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" />
<!-- <association property="manufacture" columnPrefix="equ_manu_" autoMapping="true" />-->
<association property="manufacture" columnPrefix="equ_manu_" autoMapping="true" />
</resultMap>
<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, failure_frequency, repair_frequency, repair_cost, create_by, create_date, update_by, update_date, status from equ_base
</sql>
<select id="selectEquBaseList" parameterType="EquBaseQueryDto" resultType="com.alops.system.domain.vo.queryEquBaseVO">
<select id="selectEquBaseList" parameterType="EquBaseQueryDto" resultMap="EquBaseResult">
SELECT
b.id,
b.name,
b.version,
b.ip,
m.id as manuId,
m.name as manuName,
m.id as equ_manu_id,
m.name as equ_manu_name,
b.location,
b.equ_type,
b.in_charge,
@ -52,14 +50,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.life_cycle,
b.service_time,
b.warranty,
b.failure_frequency,
b.repair_frequency,
b.repair_cost,
b.create_by,
b.create_date,
b.update_by,
b.update_date,
b.status,
b.failure_frequency as failureFrequency,
b.repair_frequency as repairFrequency,
b.repair_cost as repairCost,
g.health
FROM equ_base b
LEFT JOIN equ_gather g ON b.id = g.equ_id
@ -95,9 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="findEquBaseList" resultMap="EquBaseResult">
<include refid="selectEquBaseVo"/>
</select>
<select id="selectEquBaseById" parameterType="String" resultMap="EquBaseResult">
<include refid="selectEquBaseVo"/>
where id = #{id}
@ -119,15 +115,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lifeCycle != null">life_cycle,</if>
<if test="serviceTime != null">service_time,</if>
<if test="warranty != null">warranty,</if>
<if test="failureFrequency != null">failure_frequency,</if>
<if test="repairFrequency != null">repair_frequency,</if>
<if test="repairCost != null">repair_cost,</if>
<if test="createBy != null">create_by,</if>
<if test="createDate != null">create_date,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateDate != null">update_date,</if>
<if test="status != null">status,</if>
<if test="failureFrequency != null">failure_frequency,</if>
<if test="repairFrequency != null">repair_frequency,</if>
<if test="repairCost != null">repair_cost,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -143,15 +138,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lifeCycle != null">#{lifeCycle},</if>
<if test="serviceTime != null">#{serviceTime},</if>
<if test="warranty != null">#{warranty},</if>
<if test="failureFrequency != null">#{failureFrequency},</if>
<if test="repairFrequency != null">#{repairFrequency},</if>
<if test="repairCost != null">#{repairCost},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createDate != null">#{createDate},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateDate != null">#{updateDate},</if>
<if test="status != null">#{status},</if>
<if test="failureFrequency != null">#{failureFrequency},</if>
<if test="repairFrequency != null">#{repairFrequency},</if>
<if test="repairCost != null">#{repairCost},</if>
</trim>
</insert>
@ -170,15 +164,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lifeCycle != null">life_cycle = #{lifeCycle},</if>
<if test="serviceTime != null">service_time = #{serviceTime},</if>
<if test="warranty != null">warranty = #{warranty},</if>
<if test="failureFrequency != null">failure_frequency = #{failureFrequency},</if>
<if test="repairFrequency != null">repair_frequency = #{repairFrequency},</if>
<if test="repairCost != null">repair_cost = #{repairCost},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createDate != null">create_date = #{createDate},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateDate != null">update_date = #{updateDate},</if>
<if test="status != null">status = #{status},</if>
<if test="failureFrequency != null">failure_frequency = #{failureFrequency},</if>
<if test="repairFrequency != null">repair_frequency = #{repairFrequency},</if>
<if test="repairCost != null">repair_cost = #{repairCost},</if>
</trim>
where id = #{id}
</update>

@ -1,166 +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.EquGatherMapper">
<resultMap type="EquGather" id="EquGatherResult">
<result property="id" column="id" />
<result property="equId" column="equ_id" />
<result property="health" column="health" />
<result property="temperature" column="temperature" />
<result property="humidity" column="humidity" />
<result property="cpuUtilization" column="cpu_utilization" />
<result property="memoryUtilization" column="memory_utilization" />
<result property="fanSpeed" column="fan_speed" />
<result property="volIn" column="vol_in" />
<result property="volOut" column="vol_out" />
<result property="alarmInfo" column="alarm_info" />
<result property="logOnline" column="log_online" />
<result property="logSys" column="log_sys" />
<result property="gatherTime" column="gather_time" />
<result property="volInStatus" column="vol_in_status" />
<result property="volOutStatus" column="vol_out_status" />
<result property="fanSpeedStatus" column="fan_speed_status" />
<result property="contWorkPeriod" column="cont_work_period" />
</resultMap>
<!-- updateHealth 方法 -->
<update id="updateHealth">
UPDATE equ_gather
SET health = #{param2}
WHERE id = #{param1}
</update>
<sql id="selectEquGatherVo">
select id, equ_id, health, temperature, humidity, cpu_utilization, memory_utilization, fan_speed, vol_in, vol_out, alarm_info, log_online, log_sys, gather_time, vol_in_status, vol_out_status, fan_speed_status, cont_work_period from equ_gather
</sql>
<select id="selectEquGatherList" parameterType="EquGather" resultMap="EquGatherResult">
<include refid="selectEquGatherVo"/>
<where>
<if test="equId != null and equId != ''"> and equ_id = #{equId}</if>
<if test="health != null "> and health = #{health}</if>
<if test="temperature != null "> and temperature = #{temperature}</if>
<if test="humidity != null "> and humidity = #{humidity}</if>
<if test="cpuUtilization != null "> and cpu_utilization = #{cpuUtilization}</if>
<if test="memoryUtilization != null "> and memory_utilization = #{memoryUtilization}</if>
<if test="fanSpeed != null "> and fan_speed = #{fanSpeed}</if>
<if test="volIn != null "> and vol_in = #{volIn}</if>
<if test="volOut != null "> and vol_out = #{volOut}</if>
<if test="alarmInfo != null and alarmInfo != ''"> and alarm_info = #{alarmInfo}</if>
<if test="logOnline != null and logOnline != ''"> and log_online = #{logOnline}</if>
<if test="logSys != null and logSys != ''"> and log_sys = #{logSys}</if>
<if test="gatherTime != null "> and gather_time = #{gatherTime}</if>
<if test="volInStatus != null and volInStatus != ''"> and vol_in_status = #{volInStatus}</if>
<if test="volOutStatus != null and volOutStatus != ''"> and vol_out_status = #{volOutStatus}</if>
<if test="fanSpeedStatus != null and fanSpeedStatus != ''"> and fan_speed_status = #{fanSpeedStatus}</if>
<if test="contWorkPeriod != null and contWorkPeriod != ''"> and cont_work_period = #{contWorkPeriod}</if>
</where>
</select>
<select id="selectEquGatherById" parameterType="String" resultMap="EquGatherResult">
<include refid="selectEquGatherVo"/>
where id = #{id}
</select>
<!-- 批量插入 -->
<insert id="batchInsertEquGather" parameterType="java.util.List">
insert into equ_gather (
id, equ_id, health, temperature, humidity,
cpu_utilization, memory_utilization, fan_speed,
vol_in, vol_out, alarm_info, log_online, log_sys,
gather_time, vol_in_status, vol_out_status,
fan_speed_status, cont_work_period
)
values
<foreach collection="list" item="item" separator=",">
(
#{item.id}, #{item.equId}, #{item.health}, #{item.temperature}, #{item.humidity},
#{item.cpuUtilization}, #{item.memoryUtilization}, #{item.fanSpeed},
#{item.volIn}, #{item.volOut}, #{item.alarmInfo}, #{item.logOnline}, #{item.logSys},
#{item.gatherTime}, #{item.volInStatus}, #{item.volOutStatus},
#{item.fanSpeedStatus}, #{item.contWorkPeriod}
)
</foreach>
</insert>
<insert id="insertEquGather" parameterType="EquGather">
insert into equ_gather
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="equId != null">equ_id,</if>
<if test="health != null">health,</if>
<if test="temperature != null">temperature,</if>
<if test="humidity != null">humidity,</if>
<if test="cpuUtilization != null">cpu_utilization,</if>
<if test="memoryUtilization != null">memory_utilization,</if>
<if test="fanSpeed != null">fan_speed,</if>
<if test="volIn != null">vol_in,</if>
<if test="volOut != null">vol_out,</if>
<if test="alarmInfo != null">alarm_info,</if>
<if test="logOnline != null">log_online,</if>
<if test="logSys != null">log_sys,</if>
<if test="gatherTime != null">gather_time,</if>
<if test="volInStatus != null">vol_in_status,</if>
<if test="volOutStatus != null">vol_out_status,</if>
<if test="fanSpeedStatus != null">fan_speed_status,</if>
<if test="contWorkPeriod != null">cont_work_period,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="equId != null">#{equId},</if>
<if test="health != null">#{health},</if>
<if test="temperature != null">#{temperature},</if>
<if test="humidity != null">#{humidity},</if>
<if test="cpuUtilization != null">#{cpuUtilization},</if>
<if test="memoryUtilization != null">#{memoryUtilization},</if>
<if test="fanSpeed != null">#{fanSpeed},</if>
<if test="volIn != null">#{volIn},</if>
<if test="volOut != null">#{volOut},</if>
<if test="alarmInfo != null">#{alarmInfo},</if>
<if test="logOnline != null">#{logOnline},</if>
<if test="logSys != null">#{logSys},</if>
<if test="gatherTime != null">#{gatherTime},</if>
<if test="volInStatus != null">#{volInStatus},</if>
<if test="volOutStatus != null">#{volOutStatus},</if>
<if test="fanSpeedStatus != null">#{fanSpeedStatus},</if>
<if test="contWorkPeriod != null">#{contWorkPeriod},</if>
</trim>
</insert>
<update id="updateEquGather" parameterType="EquGather">
update equ_gather
<trim prefix="SET" suffixOverrides=",">
<if test="equId != null">equ_id = #{equId},</if>
<if test="health != null">health = #{health},</if>
<if test="temperature != null">temperature = #{temperature},</if>
<if test="humidity != null">humidity = #{humidity},</if>
<if test="cpuUtilization != null">cpu_utilization = #{cpuUtilization},</if>
<if test="memoryUtilization != null">memory_utilization = #{memoryUtilization},</if>
<if test="fanSpeed != null">fan_speed = #{fanSpeed},</if>
<if test="volIn != null">vol_in = #{volIn},</if>
<if test="volOut != null">vol_out = #{volOut},</if>
<if test="alarmInfo != null">alarm_info = #{alarmInfo},</if>
<if test="logOnline != null">log_online = #{logOnline},</if>
<if test="logSys != null">log_sys = #{logSys},</if>
<if test="gatherTime != null">gather_time = #{gatherTime},</if>
<if test="volInStatus != null">vol_in_status = #{volInStatus},</if>
<if test="volOutStatus != null">vol_out_status = #{volOutStatus},</if>
<if test="fanSpeedStatus != null">fan_speed_status = #{fanSpeedStatus},</if>
<if test="contWorkPeriod != null">cont_work_period = #{contWorkPeriod},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquGatherById" parameterType="String">
delete from equ_gather where id = #{id}
</delete>
<delete id="deleteEquGatherByIds" parameterType="String">
delete from equ_gather where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,133 +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.EquInterfaceMapper">
<resultMap type="EquInterface" id="EquInterfaceResult">
<result property="id" column="id" />
<result property="equId" column="equ_id" />
<result property="gatherTime" column="gather_time" />
<result property="running" column="running" />
<result property="rate" column="rate" />
<result property="commuicateMode" column="commuicate_mode" />
<result property="outFlow" column="out_flow" />
<result property="inFlow" column="in_flow" />
<result property="inBandwidth" column="in_bandwidth" />
<result property="lossRate" column="loss_rate" />
<result property="errorRate" column="error_rate" />
<result property="equGatherId" column="equ_gather_id" />
<result property="interfaceId" column="interface_id" />
<result property="outBandwidth" column="out_bandwidth" />
</resultMap>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO equ_interface (
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
)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.equId}, #{item.gatherTime}, #{item.running}, #{item.rate},
#{item.commuicateMode}, #{item.outFlow}, #{item.inFlow}, #{item.inBandwidth},
#{item.lossRate}, #{item.errorRate}, #{item.equGatherId}, #{item.interfaceId},
#{item.outBandwidth})
</foreach>
</insert>
<sql id="selectEquInterfaceVo">
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>
<select id="selectEquInterfaceList" parameterType="EquInterface" resultMap="EquInterfaceResult">
<include refid="selectEquInterfaceVo"/>
<where>
<if test="equId != null and equId != ''"> and equ_id = #{equId}</if>
<if test="gatherTime != null "> and gather_time = #{gatherTime}</if>
<if test="running != null and running != ''"> and running = #{running}</if>
<if test="rate != null "> and rate = #{rate}</if>
<if test="commuicateMode != null and commuicateMode != ''"> and commuicate_mode = #{commuicateMode}</if>
<if test="outFlow != null "> and out_flow = #{outFlow}</if>
<if test="inFlow != null "> and in_flow = #{inFlow}</if>
<if test="inBandwidth != null "> and in_bandwidth = #{inBandwidth}</if>
<if test="lossRate != null "> and loss_rate = #{lossRate}</if>
<if test="errorRate != null "> and error_rate = #{errorRate}</if>
<if test="equGatherId != null and equGatherId != ''"> and equ_gather_id = #{equGatherId}</if>
<if test="interfaceId != null and interfaceId != ''"> and interface_id = #{interfaceId}</if>
<if test="outBandwidth != null "> and out_bandwidth = #{outBandwidth}</if>
</where>
</select>
<select id="selectEquInterfaceById" parameterType="String" resultMap="EquInterfaceResult">
<include refid="selectEquInterfaceVo"/>
where id = #{id}
</select>
<insert id="insertEquInterface" parameterType="EquInterface">
insert into equ_interface
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="equId != null">equ_id,</if>
<if test="gatherTime != null">gather_time,</if>
<if test="running != null">running,</if>
<if test="rate != null">rate,</if>
<if test="commuicateMode != null">commuicate_mode,</if>
<if test="outFlow != null">out_flow,</if>
<if test="inFlow != null">in_flow,</if>
<if test="inBandwidth != null">in_bandwidth,</if>
<if test="lossRate != null">loss_rate,</if>
<if test="errorRate != null">error_rate,</if>
<if test="equGatherId != null">equ_gather_id,</if>
<if test="interfaceId != null">interface_id,</if>
<if test="outBandwidth != null">out_bandwidth,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="equId != null">#{equId},</if>
<if test="gatherTime != null">#{gatherTime},</if>
<if test="running != null">#{running},</if>
<if test="rate != null">#{rate},</if>
<if test="commuicateMode != null">#{commuicateMode},</if>
<if test="outFlow != null">#{outFlow},</if>
<if test="inFlow != null">#{inFlow},</if>
<if test="inBandwidth != null">#{inBandwidth},</if>
<if test="lossRate != null">#{lossRate},</if>
<if test="errorRate != null">#{errorRate},</if>
<if test="equGatherId != null">#{equGatherId},</if>
<if test="interfaceId != null">#{interfaceId},</if>
<if test="outBandwidth != null">#{outBandwidth},</if>
</trim>
</insert>
<update id="updateEquInterface" parameterType="EquInterface">
update equ_interface
<trim prefix="SET" suffixOverrides=",">
<if test="equId != null">equ_id = #{equId},</if>
<if test="gatherTime != null">gather_time = #{gatherTime},</if>
<if test="running != null">running = #{running},</if>
<if test="rate != null">rate = #{rate},</if>
<if test="commuicateMode != null">commuicate_mode = #{commuicateMode},</if>
<if test="outFlow != null">out_flow = #{outFlow},</if>
<if test="inFlow != null">in_flow = #{inFlow},</if>
<if test="inBandwidth != null">in_bandwidth = #{inBandwidth},</if>
<if test="lossRate != null">loss_rate = #{lossRate},</if>
<if test="errorRate != null">error_rate = #{errorRate},</if>
<if test="equGatherId != null">equ_gather_id = #{equGatherId},</if>
<if test="interfaceId != null">interface_id = #{interfaceId},</if>
<if test="outBandwidth != null">out_bandwidth = #{outBandwidth},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquInterfaceById" parameterType="String">
delete from equ_interface where id = #{id}
</delete>
<delete id="deleteEquInterfaceByIds" parameterType="String">
delete from equ_interface where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,146 +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.EquOidMapper">
<resultMap type="EquOid" id="EquOidResult">
<result property="id" column="id" />
<result property="oid" column="oid" />
<result property="param" column="param" />
<result property="storeTable" column="store_table" />
<result property="convertRule" column="convert_rule" />
<result property="combineGroup" column="combine_group" />
<result property="isHighPart" column="is_high_part" />
<result property="manufacturerId" column="manufacturer_id" />
<result property="cutRule" column="cut_rule" />
<result property="multiParam" column="multi_param" />
<result property="subParamGroup" column="sub_param_group" />
<result property="description" column="description" />
<result property="unit" column="unit" />
<result property="enabled" column="enabled" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectEquOidVo">
select id, oid, param, store_table, convert_rule, combine_group, is_high_part, manufacturer_id, cut_rule, multi_param, sub_param_group, description, unit, enabled, create_time, update_time from equ_oid
</sql>
<select id="selectEquOidList" parameterType="EquOid" resultMap="EquOidResult">
<include refid="selectEquOidVo"/>
<where>
<if test="oid != null and oid != ''"> and oid = #{oid}</if>
<if test="param != null and param != ''"> and param = #{param}</if>
<if test="storeTable != null and storeTable != ''"> and store_table = #{storeTable}</if>
<if test="convertRule != null and convertRule != ''"> and convert_rule = #{convertRule}</if>
<if test="combineGroup != null and combineGroup != ''"> and combine_group = #{combineGroup}</if>
<if test="isHighPart != null "> and is_high_part = #{isHighPart}</if>
<if test="manufacturerId != null and manufacturerId != ''"> and manufacturer_id = #{manufacturerId}</if>
<if test="cutRule != null and cutRule != ''"> and cut_rule = #{cutRule}</if>
<if test="multiParam != null "> and multi_param = #{multiParam}</if>
<if test="subParamGroup != null and subParamGroup != ''"> and sub_param_group = #{subParamGroup}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="enabled != null "> and enabled = #{enabled}</if>
</where>
</select>
<select id="findByManuIdAndStatus" parameterType="string" resultType="com.alops.system.domain.EquOid">
SELECT
id,
oid,
param,
store_table AS storeTable,
convert_rule AS convertRule,
combine_group AS combineGroup,
is_high_part AS isHighPart,
manufacturer_id AS manufacturerId,
cut_rule AS cutRule,
multi_param AS multiParam,
sub_param_group AS subParamGroup,
description,
unit,
enabled,
create_time AS createTime,
update_time AS updateTime
FROM equ_oid
WHERE manufacturer_id = #{manufacturerId}
AND enabled = 2
ORDER BY id
</select>
<select id="selectEquOidById" parameterType="Long" resultMap="EquOidResult">
<include refid="selectEquOidVo"/>
where id = #{id}
</select>
<insert id="insertEquOid" parameterType="EquOid" useGeneratedKeys="true" keyProperty="id">
insert into equ_oid
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="oid != null">oid,</if>
<if test="param != null and param != ''">param,</if>
<if test="storeTable != null and storeTable != ''">store_table,</if>
<if test="convertRule != null">convert_rule,</if>
<if test="combineGroup != null">combine_group,</if>
<if test="isHighPart != null">is_high_part,</if>
<if test="manufacturerId != null">manufacturer_id,</if>
<if test="cutRule != null">cut_rule,</if>
<if test="multiParam != null">multi_param,</if>
<if test="subParamGroup != null">sub_param_group,</if>
<if test="description != null">description,</if>
<if test="unit != null">unit,</if>
<if test="enabled != null">enabled,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="oid != null">#{oid},</if>
<if test="param != null and param != ''">#{param},</if>
<if test="storeTable != null and storeTable != ''">#{storeTable},</if>
<if test="convertRule != null">#{convertRule},</if>
<if test="combineGroup != null">#{combineGroup},</if>
<if test="isHighPart != null">#{isHighPart},</if>
<if test="manufacturerId != null">#{manufacturerId},</if>
<if test="cutRule != null">#{cutRule},</if>
<if test="multiParam != null">#{multiParam},</if>
<if test="subParamGroup != null">#{subParamGroup},</if>
<if test="description != null">#{description},</if>
<if test="unit != null">#{unit},</if>
<if test="enabled != null">#{enabled},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquOid" parameterType="EquOid">
update equ_oid
<trim prefix="SET" suffixOverrides=",">
<if test="oid != null">oid = #{oid},</if>
<if test="param != null and param != ''">param = #{param},</if>
<if test="storeTable != null and storeTable != ''">store_table = #{storeTable},</if>
<if test="convertRule != null">convert_rule = #{convertRule},</if>
<if test="combineGroup != null">combine_group = #{combineGroup},</if>
<if test="isHighPart != null">is_high_part = #{isHighPart},</if>
<if test="manufacturerId != null">manufacturer_id = #{manufacturerId},</if>
<if test="cutRule != null">cut_rule = #{cutRule},</if>
<if test="multiParam != null">multi_param = #{multiParam},</if>
<if test="subParamGroup != null">sub_param_group = #{subParamGroup},</if>
<if test="description != null">description = #{description},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="enabled != null">enabled = #{enabled},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquOidById" parameterType="Long">
delete from equ_oid where id = #{id}
</delete>
<delete id="deleteEquOidByIds" parameterType="String">
delete from equ_oid where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,83 +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.EquRoutingMapper">
<resultMap type="EquRouting" id="EquRoutingResult">
<result property="id" column="id" />
<result property="equGatherId" column="equ_gather_id" />
<result property="desAddress" column="des_address" />
<result property="subnetMask" column="subnet_mask" />
<result property="nextHop" column="next_hop" />
</resultMap>
<!-- EquRouting 批量插入 -->
<insert id="insertBatchRouting" parameterType="java.util.List">
INSERT INTO equ_routing (id, equ_gather_id, des_address, subnet_mask, next_hop)
VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.id}, #{item.equGatherId}, #{item.desAddress}, #{item.subnetMask}, #{item.nextHop}
)
</foreach>
</insert>
<sql id="selectEquRoutingVo">
select id, equ_gather_id, des_address, subnet_mask, next_hop from equ_routing
</sql>
<select id="selectEquRoutingList" parameterType="EquRouting" resultMap="EquRoutingResult">
<include refid="selectEquRoutingVo"/>
<where>
<if test="equGatherId != null and equGatherId != ''"> and equ_gather_id = #{equGatherId}</if>
<if test="desAddress != null and desAddress != ''"> and des_address = #{desAddress}</if>
<if test="subnetMask != null and subnetMask != ''"> and subnet_mask = #{subnetMask}</if>
<if test="nextHop != null and nextHop != ''"> and next_hop = #{nextHop}</if>
</where>
</select>
<select id="selectEquRoutingById" parameterType="String" resultMap="EquRoutingResult">
<include refid="selectEquRoutingVo"/>
where id = #{id}
</select>
<insert id="insertEquRouting" parameterType="EquRouting">
insert into equ_routing
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="equGatherId != null and equGatherId != ''">equ_gather_id,</if>
<if test="desAddress != null">des_address,</if>
<if test="subnetMask != null">subnet_mask,</if>
<if test="nextHop != null">next_hop,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="equGatherId != null and equGatherId != ''">#{equGatherId},</if>
<if test="desAddress != null">#{desAddress},</if>
<if test="subnetMask != null">#{subnetMask},</if>
<if test="nextHop != null">#{nextHop},</if>
</trim>
</insert>
<update id="updateEquRouting" parameterType="EquRouting">
update equ_routing
<trim prefix="SET" suffixOverrides=",">
<if test="equGatherId != null and equGatherId != ''">equ_gather_id = #{equGatherId},</if>
<if test="desAddress != null">des_address = #{desAddress},</if>
<if test="subnetMask != null">subnet_mask = #{subnetMask},</if>
<if test="nextHop != null">next_hop = #{nextHop},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquRoutingById" parameterType="String">
delete from equ_routing where id = #{id}
</delete>
<delete id="deleteEquRoutingByIds" parameterType="String">
delete from equ_routing where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,79 +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.EquVeneerMapper">
<resultMap type="EquVeneer" id="EquVeneerResult">
<result property="id" column="id" />
<result property="veneerId" column="veneer_id" />
<result property="veneerStatus" column="veneer_status" />
<result property="equGatherId" column="equ_gather_id" />
</resultMap>
<!-- EquVeneer 批量插入 -->
<insert id="insertBatchVeneer" parameterType="java.util.List">
INSERT INTO equ_veneer (id, veneer_id, veneer_status, equ_gather_id)
VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.id}, #{item.veneerId}, #{item.veneerStatus}, #{item.equGatherId}
)
</foreach>
</insert>
<sql id="selectEquVeneerVo">
select id, veneer_id, veneer_status, equ_gather_id from equ_veneer
</sql>
<select id="selectEquVeneerList" parameterType="EquVeneer" resultMap="EquVeneerResult">
<include refid="selectEquVeneerVo"/>
<where>
<if test="veneerId != null and veneerId != ''"> and veneer_id = #{veneerId}</if>
<if test="veneerStatus != null and veneerStatus != ''"> and veneer_status = #{veneerStatus}</if>
<if test="equGatherId != null and equGatherId != ''"> and equ_gather_id = #{equGatherId}</if>
</where>
</select>
<select id="selectEquVeneerById" parameterType="String" resultMap="EquVeneerResult">
<include refid="selectEquVeneerVo"/>
where id = #{id}
</select>
<insert id="insertEquVeneer" parameterType="EquVeneer">
insert into equ_veneer
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="veneerId != null and veneerId != ''">veneer_id,</if>
<if test="veneerStatus != null and veneerStatus != ''">veneer_status,</if>
<if test="equGatherId != null and equGatherId != ''">equ_gather_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="veneerId != null and veneerId != ''">#{veneerId},</if>
<if test="veneerStatus != null and veneerStatus != ''">#{veneerStatus},</if>
<if test="equGatherId != null and equGatherId != ''">#{equGatherId},</if>
</trim>
</insert>
<update id="updateEquVeneer" parameterType="EquVeneer">
update equ_veneer
<trim prefix="SET" suffixOverrides=",">
<if test="veneerId != null and veneerId != ''">veneer_id = #{veneerId},</if>
<if test="veneerStatus != null and veneerStatus != ''">veneer_status = #{veneerStatus},</if>
<if test="equGatherId != null and equGatherId != ''">equ_gather_id = #{equGatherId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquVeneerById" parameterType="String">
delete from equ_veneer where id = #{id}
</delete>
<delete id="deleteEquVeneerByIds" parameterType="String">
delete from equ_veneer where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,99 +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.EquVlanMapper">
<resultMap type="EquVlan" id="EquVlanResult">
<result property="id" column="id" />
<result property="equGatherId" column="equ_gather_id" />
<result property="mainId" column="main_id" />
<result property="ipAddress" column="ip_address" />
<result property="subnetMask" column="subnet_mask" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="vlanId" column="vlan_id" />
</resultMap>
<!-- EquVlan 批量插入 -->
<insert id="insertBatchVlan" parameterType="java.util.List">
INSERT INTO equ_vlan (
id, equ_gather_id, main_id, ip_address, subnet_mask,
vlan_id
)
VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.id}, #{item.equGatherId}, #{item.mainId}, #{item.ipAddress}, #{item.subnetMask},
#{item.vlanId}
)
</foreach>
</insert>
<sql id="selectEquVlanVo">
select id, equ_gather_id, main_id, ip_address, subnet_mask, create_time, update_by, vlan_id from equ_vlan
</sql>
<select id="selectEquVlanList" parameterType="EquVlan" resultMap="EquVlanResult">
<include refid="selectEquVlanVo"/>
<where>
<if test="equGatherId != null and equGatherId != ''"> and equ_gather_id = #{equGatherId}</if>
<if test="mainId != null and mainId != ''"> and main_id = #{mainId}</if>
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
<if test="subnetMask != null and subnetMask != ''"> and subnet_mask = #{subnetMask}</if>
<if test="vlanId != null and vlanId != ''"> and vlan_id = #{vlanId}</if>
</where>
</select>
<select id="selectEquVlanById" parameterType="String" resultMap="EquVlanResult">
<include refid="selectEquVlanVo"/>
where id = #{id}
</select>
<insert id="insertEquVlan" parameterType="EquVlan">
insert into equ_vlan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="equGatherId != null and equGatherId != ''">equ_gather_id,</if>
<if test="mainId != null">main_id,</if>
<if test="ipAddress != null">ip_address,</if>
<if test="subnetMask != null">subnet_mask,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="vlanId != null">vlan_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="equGatherId != null and equGatherId != ''">#{equGatherId},</if>
<if test="mainId != null">#{mainId},</if>
<if test="ipAddress != null">#{ipAddress},</if>
<if test="subnetMask != null">#{subnetMask},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="vlanId != null">#{vlanId},</if>
</trim>
</insert>
<update id="updateEquVlan" parameterType="EquVlan">
update equ_vlan
<trim prefix="SET" suffixOverrides=",">
<if test="equGatherId != null and equGatherId != ''">equ_gather_id = #{equGatherId},</if>
<if test="mainId != null">main_id = #{mainId},</if>
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
<if test="subnetMask != null">subnet_mask = #{subnetMask},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="vlanId != null">vlan_id = #{vlanId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquVlanById" parameterType="String">
delete from equ_vlan where id = #{id}
</delete>
<delete id="deleteEquVlanByIds" parameterType="String">
delete from equ_vlan where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save