diff --git a/ALOps_sys_backend/alops-admin/pom.xml b/ALOps_sys_backend/alops-admin/pom.xml index 047441bb..8a8c1b4c 100644 --- a/ALOps_sys_backend/alops-admin/pom.xml +++ b/ALOps_sys_backend/alops-admin/pom.xml @@ -18,6 +18,13 @@ + + org.snmp4j + snmp4j + 3.9.6 + + + org.springframework.boot diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquBaseController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquBaseController.java new file mode 100644 index 00000000..50cecfb1 --- /dev/null +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquBaseController.java @@ -0,0 +1,124 @@ +package com.alops.web.controller.equManagement; + +import java.util.HashMap; +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.EquBase; +import com.alops.system.domain.dto.EquBaseQueryDto; +import com.alops.system.service.IEquBaseService; +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-08-01 + */ +@RestController +@RequestMapping("/equipment") +public class EquBaseController extends BaseController +{ + @Autowired + private IEquBaseService equBaseService; + + /** + * 查询设备基本信息列表 + */ + @PreAuthorize("@ss.hasPermi('equipment:base:queryByVO')") + @GetMapping("/queryByVO") + @ApiOperation("查询符合参数设备信息") + public AjaxResult list(EquBaseQueryDto equBaseQueryDto ) { + startPage(); + List list = equBaseService.selectEquBaseList(equBaseQueryDto); + TableDataInfo tableDataInfo = getDataTable(list); + Map data = new HashMap<>(); + data.put("total", tableDataInfo.getTotal()); + data.put("rows", tableDataInfo.getRows()); + return AjaxResult.success("查询成功", data); + } + +// @PreAuthorize("@ss.hasPermi('equipment:base:list')") +// @GetMapping("/list") +// public TableDataInfo list(EquBase equBase) +// { +// startPage(); +// List list = equBaseService.selectEquBaseList(equBase); +// return getDataTable(list); +// } + + /** + * 导出设备基本信息列表 + */ + @PreAuthorize("@ss.hasPermi('equipment:base:export')") + @Log(title = "设备档案", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EquBaseQueryDto equBaseQueryDto) + { + List list = equBaseService.selectEquBaseList(equBaseQueryDto); + ExcelUtil util = new ExcelUtil(EquBase.class); + util.exportExcel(response, list, "设备基本信息数据"); + } + + /** + * 获取设备基本信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('equipment:base:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(equBaseService.selectEquBaseById(id)); + } + + /** + * 新增设备基本信息 + */ + @PreAuthorize("@ss.hasPermi('equipment:base:add')") + @Log(title = "设备档案", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ApiOperation("新增设备信息") + public AjaxResult add(@RequestBody EquBase equBase) + { + return toAjax(equBaseService.insertEquBase(equBase)); + } + + /** + * 修改设备基本信息 + */ + @PreAuthorize("@ss.hasPermi('equipment:base:edit')") + @Log(title = "设备档案", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EquBase equBase) + { + return toAjax(equBaseService.updateEquBase(equBase)); + } + + /** + * 删除设备基本信息 + */ + @PreAuthorize("@ss.hasPermi('equipment:base:remove')") + @Log(title = "设备档案", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(equBaseService.deleteEquBaseByIds(ids)); + } +} diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquManuController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquManuController.java new file mode 100644 index 00000000..3f548e76 --- /dev/null +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquManuController.java @@ -0,0 +1,106 @@ +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.EquManu; +import com.alops.system.service.IEquManuService; +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/manu") +public class EquManuController extends BaseController +{ + @Autowired + private IEquManuService equManuService; + + /** + * 查询设备厂商管理列表 + */ + @PreAuthorize("@ss.hasPermi('system:manu:list')") + @GetMapping("/list") + public TableDataInfo list(EquManu equManu) + { + startPage(); + List list = equManuService.selectEquManuList(equManu); + return getDataTable(list); + } + + /** + * 导出设备厂商管理列表 + */ + @PreAuthorize("@ss.hasPermi('system:manu:export')") + @Log(title = "设备厂商管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EquManu equManu) + { + List list = equManuService.selectEquManuList(equManu); + ExcelUtil util = new ExcelUtil(EquManu.class); + util.exportExcel(response, list, "设备厂商管理数据"); + } + + /** + * 获取设备厂商管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:manu:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(equManuService.selectEquManuById(id)); + } + + /** + * 新增设备厂商管理 + */ + @PreAuthorize("@ss.hasPermi('system:manu:add')") + @Log(title = "设备厂商管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EquManu equManu) + { + return toAjax(equManuService.insertEquManu(equManu)); + } + + /** + * 修改设备厂商管理 + */ + @PreAuthorize("@ss.hasPermi('system:manu:edit')") + @Log(title = "设备厂商管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EquManu equManu) + { + return toAjax(equManuService.updateEquManu(equManu)); + } + + /** + * 删除设备厂商管理 + */ + @PreAuthorize("@ss.hasPermi('system:manu:remove')") + @Log(title = "设备厂商管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(equManuService.deleteEquManuByIds(ids)); + } +} diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquTypeController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquTypeController.java new file mode 100644 index 00000000..d03a8c5f --- /dev/null +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquTypeController.java @@ -0,0 +1,106 @@ +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.EquType; +import com.alops.system.service.IEquTypeService; +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/type") +public class EquTypeController extends BaseController +{ + @Autowired + private IEquTypeService equTypeService; + + /** + * 查询设备类型管理列表 + */ + @PreAuthorize("@ss.hasPermi('system:type:list')") + @GetMapping("/list") + public TableDataInfo list(EquType equType) + { + startPage(); + List list = equTypeService.selectEquTypeList(equType); + return getDataTable(list); + } + + /** + * 导出设备类型管理列表 + */ + @PreAuthorize("@ss.hasPermi('system:type:export')") + @Log(title = "设备类型管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EquType equType) + { + List list = equTypeService.selectEquTypeList(equType); + ExcelUtil util = new ExcelUtil(EquType.class); + util.exportExcel(response, list, "设备类型管理数据"); + } + + /** + * 获取设备类型管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:type:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(equTypeService.selectEquTypeById(id)); + } + + /** + * 新增设备类型管理 + */ + @PreAuthorize("@ss.hasPermi('system:type:add')") + @Log(title = "设备类型管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EquType equType) + { + return toAjax(equTypeService.insertEquType(equType)); + } + + /** + * 修改设备类型管理 + */ + @PreAuthorize("@ss.hasPermi('system:type:edit')") + @Log(title = "设备类型管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EquType equType) + { + return toAjax(equTypeService.updateEquType(equType)); + } + + /** + * 删除设备类型管理 + */ + @PreAuthorize("@ss.hasPermi('system:type:remove')") + @Log(title = "设备类型管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(equTypeService.deleteEquTypeByIds(ids)); + } +} diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/ScheduleRulesController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/ScheduleRulesController.java new file mode 100644 index 00000000..85f5b72c --- /dev/null +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/ScheduleRulesController.java @@ -0,0 +1,105 @@ +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.ScheduleRules; +import com.alops.system.service.IScheduleRulesService; +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-03 + */ +@RestController +@RequestMapping("/system/rules") +public class ScheduleRulesController extends BaseController +{ + @Autowired + private IScheduleRulesService scheduleRulesService; + + /** + * 查询定时采集规则列表 + */ + @PreAuthorize("@ss.hasPermi('system:rules:list')") + @GetMapping("/list") + public TableDataInfo list(ScheduleRules scheduleRules) + { + startPage(); + List list = scheduleRulesService.selectScheduleRulesList(scheduleRules); + return getDataTable(list); + } + + /** + * 导出定时采集规则列表 + */ + @PreAuthorize("@ss.hasPermi('system:rules:export')") + @Log(title = "定时采集规则", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ScheduleRules scheduleRules) + { + List list = scheduleRulesService.selectScheduleRulesList(scheduleRules); + ExcelUtil util = new ExcelUtil(ScheduleRules.class); + util.exportExcel(response, list, "定时采集规则数据"); + } + + /** + * 获取定时采集规则详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:rules:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(scheduleRulesService.selectScheduleRulesById(id)); + } + + /** + * 新增定时采集规则 + */ + @PreAuthorize("@ss.hasPermi('system:rules:add')") + @Log(title = "定时采集规则", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ScheduleRules scheduleRules) + { + return toAjax(scheduleRulesService.insertScheduleRules(scheduleRules)); + } + + /** + * 修改定时采集规则 + */ + @PreAuthorize("@ss.hasPermi('system:rules:edit')") + @Log(title = "定时采集规则", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ScheduleRules scheduleRules) + { + return toAjax(scheduleRulesService.updateScheduleRules(scheduleRules)); + } + + /** + * 删除定时采集规则 + */ + @PreAuthorize("@ss.hasPermi('system:rules:remove')") + @Log(title = "定时采集规则", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(scheduleRulesService.deleteScheduleRulesByIds(ids)); + } +} diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlarmRuleController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlarmRuleController.java new file mode 100644 index 00000000..a89e5ea9 --- /dev/null +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlarmRuleController.java @@ -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 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 list = alarmRuleService.selectAlarmRuleList(alarmRule); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/FauStaController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/FauStaController.java new file mode 100644 index 00000000..e11d327a --- /dev/null +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/FauStaController.java @@ -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.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; +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/sta") +public class FauStaController extends BaseController +{ + @Autowired + private IFauStaService fauStaService; + + /** + * 查询故障统计列表 + */ + @PreAuthorize("@ss.hasPermi('system:sta:list')") + @GetMapping("/list") + public TableDataInfo list(FauSta fauSta) + { + startPage(); + List list = fauStaService.selectFauStaList(fauSta); + return getDataTable(list); + } + + /** + * 导出故障统计列表 + */ + @PreAuthorize("@ss.hasPermi('system:sta:export')") + @Log(title = "故障统计", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, FauSta fauSta) + { + List list = fauStaService.selectFauStaList(fauSta); + ExcelUtil util = new ExcelUtil(FauSta.class); + util.exportExcel(response, list, "故障统计数据"); + } + + /** + * 获取故障统计详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:sta:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(fauStaService.selectFauStaById(id)); + } + + /** + * 新增故障统计 + */ + @PreAuthorize("@ss.hasPermi('system:sta:add')") + @Log(title = "故障统计", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody FauSta fauSta) + { + return toAjax(fauStaService.insertFauSta(fauSta)); + } + + /** + * 修改故障统计 + */ + @PreAuthorize("@ss.hasPermi('system:sta:edit')") + @Log(title = "故障统计", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody FauSta fauSta) + { + return toAjax(fauStaService.updateFauSta(fauSta)); + } + + /** + * 删除故障统计 + */ + @PreAuthorize("@ss.hasPermi('system:sta:remove')") + @Log(title = "故障统计", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(fauStaService.deleteFauStaByIds(ids)); + } +} diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/intQuestion/LocalKnowledgeController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/intQuestion/LocalKnowledgeController.java new file mode 100644 index 00000000..a23b786a --- /dev/null +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/intQuestion/LocalKnowledgeController.java @@ -0,0 +1,106 @@ +package com.alops.web.controller.intQuestion; + +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.LocalKnowledge; +import com.alops.system.service.ILocalKnowledgeService; +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/knowledge") +public class LocalKnowledgeController extends BaseController +{ + @Autowired + private ILocalKnowledgeService localKnowledgeService; + + /** + * 查询专家知识库列表 + */ + @PreAuthorize("@ss.hasPermi('system:knowledge:list')") + @GetMapping("/list") + public TableDataInfo list(LocalKnowledge localKnowledge) + { + startPage(); + List list = localKnowledgeService.selectLocalKnowledgeList(localKnowledge); + return getDataTable(list); + } + + /** + * 导出专家知识库列表 + */ + @PreAuthorize("@ss.hasPermi('system:knowledge:export')") + @Log(title = "专家知识库", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, LocalKnowledge localKnowledge) + { + List list = localKnowledgeService.selectLocalKnowledgeList(localKnowledge); + ExcelUtil util = new ExcelUtil(LocalKnowledge.class); + util.exportExcel(response, list, "专家知识库数据"); + } + + /** + * 获取专家知识库详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:knowledge:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(localKnowledgeService.selectLocalKnowledgeById(id)); + } + + /** + * 新增专家知识库 + */ + @PreAuthorize("@ss.hasPermi('system:knowledge:add')") + @Log(title = "专家知识库", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody LocalKnowledge localKnowledge) + { + return toAjax(localKnowledgeService.insertLocalKnowledge(localKnowledge)); + } + + /** + * 修改专家知识库 + */ + @PreAuthorize("@ss.hasPermi('system:knowledge:edit')") + @Log(title = "专家知识库", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody LocalKnowledge localKnowledge) + { + return toAjax(localKnowledgeService.updateLocalKnowledge(localKnowledge)); + } + + /** + * 删除专家知识库 + */ + @PreAuthorize("@ss.hasPermi('system:knowledge:remove')") + @Log(title = "专家知识库", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(localKnowledgeService.deleteLocalKnowledgeByIds(ids)); + } +} diff --git a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/system/SysUserController.java b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/system/SysUserController.java index 8b622faf..104428af 100644 --- a/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/system/SysUserController.java +++ b/ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/system/SysUserController.java @@ -3,6 +3,8 @@ package com.alops.web.controller.system; import java.util.List; import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -47,11 +49,14 @@ public class SysUserController extends BaseController { // @Autowired // private ISysPostService postService; + + /** * 获取用户列表 */ @PreAuthorize("@ss.hasPermi('system:user:list')") @GetMapping("/list") + @ApiOperation("获取用户列表的接口") public TableDataInfo list(SysUser user) { startPage(); List list = userService.selectUserList(user); diff --git a/ALOps_sys_backend/alops-admin/src/main/resources/application.yml b/ALOps_sys_backend/alops-admin/src/main/resources/application.yml index 2b123e16..c1dbf108 100644 --- a/ALOps_sys_backend/alops-admin/src/main/resources/application.yml +++ b/ALOps_sys_backend/alops-admin/src/main/resources/application.yml @@ -129,3 +129,4 @@ xss: excludes: /system/notice # 匹配链接 urlPatterns: /system/*,/monitor/*,/tool/* + diff --git a/ALOps_sys_backend/alops-common/pom.xml b/ALOps_sys_backend/alops-common/pom.xml index 0dae87c9..3dc91834 100644 --- a/ALOps_sys_backend/alops-common/pom.xml +++ b/ALOps_sys_backend/alops-common/pom.xml @@ -17,6 +17,12 @@ + + + org.snmp4j + snmp4j + 3.9.6 + diff --git a/ALOps_sys_backend/alops-framework/pom.xml b/ALOps_sys_backend/alops-framework/pom.xml index b5599c19..03d53379 100644 --- a/ALOps_sys_backend/alops-framework/pom.xml +++ b/ALOps_sys_backend/alops-framework/pom.xml @@ -17,6 +17,7 @@ + @@ -59,6 +60,10 @@ com.alops alops-system + + org.snmp4j + snmp4j + diff --git a/ALOps_sys_backend/alops-generator/pom.xml b/ALOps_sys_backend/alops-generator/pom.xml index 9afa11de..22c1df8e 100644 --- a/ALOps_sys_backend/alops-generator/pom.xml +++ b/ALOps_sys_backend/alops-generator/pom.xml @@ -17,6 +17,12 @@ + + + org.snmp4j + snmp4j + 3.9.6 + diff --git a/ALOps_sys_backend/alops-quartz/pom.xml b/ALOps_sys_backend/alops-quartz/pom.xml index 1c396d07..d2dde9a2 100644 --- a/ALOps_sys_backend/alops-quartz/pom.xml +++ b/ALOps_sys_backend/alops-quartz/pom.xml @@ -17,6 +17,12 @@ + + + org.snmp4j + snmp4j + 3.9.6 + diff --git a/ALOps_sys_backend/alops-system/pom.xml b/ALOps_sys_backend/alops-system/pom.xml index e2ae739a..19822654 100644 --- a/ALOps_sys_backend/alops-system/pom.xml +++ b/ALOps_sys_backend/alops-system/pom.xml @@ -18,6 +18,12 @@ + + + org.snmp4j + snmp4j + 3.9.6 + diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/AlarmRule.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/AlarmRule.java new file mode 100644 index 00000000..acd3eb23 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/AlarmRule.java @@ -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(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquBase.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquBase.java new file mode 100644 index 00000000..65748d39 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquBase.java @@ -0,0 +1,318 @@ +package com.alops.system.domain; + +import java.math.BigDecimal; +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + + +/** + * 设备基本信息对象 equ_base + * + * @author ruoyi + * @date 2025-08-01 + */ +public class EquBase extends BaseEntity +{ + 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; + + /** 安装位置 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; + + /** 累积故障次数 */ + @Excel(name = "累积故障次数") + private Long failureFrequency; + + /** 累积维修次数 */ + @Excel(name = "累积维修次数") + private Long repairFrequency; + + /** 累积维修金额(元) */ + @Excel(name = "累积维修金额(元)") + private BigDecimal repairCost; + + /** 添加日期 */ + @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; + + 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 setManufacture(EquManu manufacture) + { + this.manufacture = manufacture; + } + + public EquManu getManufacture() + { + return manufacture; + } + + 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 setFailureFrequency(Long failureFrequency) + { + this.failureFrequency = failureFrequency; + } + + public Long getFailureFrequency() + { + return failureFrequency; + } + + public void setRepairFrequency(Long repairFrequency) + { + this.repairFrequency = repairFrequency; + } + + public Long getRepairFrequency() + { + return repairFrequency; + } + + public void setRepairCost(BigDecimal repairCost) + { + this.repairCost = repairCost; + } + + public BigDecimal getRepairCost() + { + return repairCost; + } + + 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("manufacture", getManufacture()) + .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("failureFrequency", getFailureFrequency()) + .append("repairFrequency", getRepairFrequency()) + .append("repairCost", getRepairCost()) + .append("createBy", getCreateBy()) + .append("createDate", getCreateDate()) + .append("updateBy", getUpdateBy()) + .append("updateDate", getUpdateDate()) + .append("status", getStatus()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquGather.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquGather.java new file mode 100644 index 00000000..1e445065 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquGather.java @@ -0,0 +1,237 @@ +package com.alops.system.domain; + +import java.math.BigDecimal; +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + +/** + * 设备采集信息对象 equ_gather + * + * @author ruoyi + * @date 2025-08-01 + */ +public class EquGather extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private String id; + + /** 设备 ID */ + @Excel(name = "设备 ID") + private String equId; + + /** 综合计算的健康度指标(%) */ + @Excel(name = "综合计算的健康度指标(%)") + private BigDecimal health; + + /** 设备温度 */ + @Excel(name = "设备温度") + private BigDecimal temperature; + + /** 设备湿度(%) */ + @Excel(name = "设备湿度(%)") + private BigDecimal humidity; + + /** CPU 使用率(%) */ + @Excel(name = "CPU 使用率(%)") + private BigDecimal cpuUtilization; + + /** 内存使用率(%) */ + @Excel(name = "内存使用率(%)") + private BigDecimal memoryUtilization; + + /** 风扇转速(rpm) */ + @Excel(name = "风扇转速(rpm)") + private Long fanSpeed; + + /** 输入电压(V) */ + @Excel(name = "输入电压(V)") + private BigDecimal volIn; + + /** 输出电压(V) */ + @Excel(name = "输出电压(V)") + private BigDecimal volOut; + + /** 协议采集的结构化告警信息,6 级最高,1 级最低 */ + @Excel(name = "协议采集的结构化告警信息,6 级最高,1 级最低") + private String alarmInfo; + + /** 上下线日志事件 */ + @Excel(name = "上下线日志事件") + private String logOnline; + + /** 包含事件类型、级别的结构化日志 */ + @Excel(name = "包含事件类型、级别的结构化日志") + private String logSys; + + /** 采集时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date gatherTime; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setEquId(String equId) + { + this.equId = equId; + } + + public String getEquId() + { + return equId; + } + + public void setHealth(BigDecimal health) + { + this.health = health; + } + + public BigDecimal getHealth() + { + return health; + } + + public void setTemperature(BigDecimal temperature) + { + this.temperature = temperature; + } + + public BigDecimal getTemperature() + { + return temperature; + } + + public void setHumidity(BigDecimal humidity) + { + this.humidity = humidity; + } + + public BigDecimal getHumidity() + { + return humidity; + } + + public void setCpuUtilization(BigDecimal cpuUtilization) + { + this.cpuUtilization = cpuUtilization; + } + + public BigDecimal getCpuUtilization() + { + return cpuUtilization; + } + + public void setMemoryUtilization(BigDecimal memoryUtilization) + { + this.memoryUtilization = memoryUtilization; + } + + public BigDecimal getMemoryUtilization() + { + return memoryUtilization; + } + + public void setFanSpeed(Long fanSpeed) + { + this.fanSpeed = fanSpeed; + } + + public Long getFanSpeed() + { + return fanSpeed; + } + + public void setVolIn(BigDecimal volIn) + { + this.volIn = volIn; + } + + public BigDecimal getVolIn() + { + return volIn; + } + + public void setVolOut(BigDecimal volOut) + { + this.volOut = volOut; + } + + public BigDecimal getVolOut() + { + return volOut; + } + + public void setAlarmInfo(String alarmInfo) + { + this.alarmInfo = alarmInfo; + } + + public String getAlarmInfo() + { + return alarmInfo; + } + + public void setLogOnline(String logOnline) + { + this.logOnline = logOnline; + } + + public String getLogOnline() + { + return logOnline; + } + + public void setLogSys(String logSys) + { + this.logSys = logSys; + } + + public String getLogSys() + { + return logSys; + } + + public void setGatherTime(Date gatherTime) + { + this.gatherTime = gatherTime; + } + + public Date getGatherTime() + { + return gatherTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("equId", getEquId()) + .append("health", getHealth()) + .append("temperature", getTemperature()) + .append("humidity", getHumidity()) + .append("cpuUtilization", getCpuUtilization()) + .append("memoryUtilization", getMemoryUtilization()) + .append("fanSpeed", getFanSpeed()) + .append("volIn", getVolIn()) + .append("volOut", getVolOut()) + .append("alarmInfo", getAlarmInfo()) + .append("logOnline", getLogOnline()) + .append("logSys", getLogSys()) + .append("gatherTime", getGatherTime()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquInterface.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquInterface.java new file mode 100644 index 00000000..caf22db5 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquInterface.java @@ -0,0 +1,192 @@ +package com.alops.system.domain; + +import java.math.BigDecimal; +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + +/** + * 设备接口信息对象 equ_interface + * + * @author ruoyi + * @date 2025-08-01 + */ +public class EquInterface extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 接口 id */ + private String id; + + /** 设备 ID */ + @Excel(name = "设备 ID") + private String equId; + + /** 采集时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date gatherTime; + + /** 端口运行与否(UP/DOWN) */ + @Excel(name = "端口运行与否(UP/DOWN)") + private Integer running; + + /** 传输速率(Mbps) */ + @Excel(name = "传输速率(Mbps)") + private Long rate; + + /** 通信模式字典值(0/1/2) */ + @Excel(name = "通信模式字典值(0/1/2)") + private Long commuicateMode; + + /** 出方向流量(bps) */ + @Excel(name = "出方向流量(bps)") + private Long outFlow; + + /** 入方向流量(bps) */ + @Excel(name = "入方向流量(bps)") + private Long inFlow; + + /** 带宽占有率(%) */ + @Excel(name = "带宽占有率(%)") + private BigDecimal bandwidth; + + /** 丢包率(%) */ + @Excel(name = "丢包率(%)") + private BigDecimal lossRate; + + /** 错包率(%) */ + @Excel(name = "错包率(%)") + private BigDecimal errorRate; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setEquId(String equId) + { + this.equId = equId; + } + + public String getEquId() + { + return equId; + } + + public void setGatherTime(Date gatherTime) + { + this.gatherTime = gatherTime; + } + + public Date getGatherTime() + { + return gatherTime; + } + + public void setRunning(Integer running) + { + this.running = running; + } + + public Integer getRunning() + { + return running; + } + + public void setRate(Long rate) + { + this.rate = rate; + } + + public Long getRate() + { + return rate; + } + + public void setCommuicateMode(Long commuicateMode) + { + this.commuicateMode = commuicateMode; + } + + public Long getCommuicateMode() + { + return commuicateMode; + } + + public void setOutFlow(Long outFlow) + { + this.outFlow = outFlow; + } + + public Long getOutFlow() + { + return outFlow; + } + + public void setInFlow(Long inFlow) + { + this.inFlow = inFlow; + } + + public Long getInFlow() + { + return inFlow; + } + + public void setBandwidth(BigDecimal bandwidth) + { + this.bandwidth = bandwidth; + } + + public BigDecimal getBandwidth() + { + return bandwidth; + } + + public void setLossRate(BigDecimal lossRate) + { + this.lossRate = lossRate; + } + + public BigDecimal getLossRate() + { + return lossRate; + } + + public void setErrorRate(BigDecimal errorRate) + { + this.errorRate = errorRate; + } + + public BigDecimal getErrorRate() + { + return errorRate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("equId", getEquId()) + .append("gatherTime", getGatherTime()) + .append("running", getRunning()) + .append("rate", getRate()) + .append("commuicateMode", getCommuicateMode()) + .append("outFlow", getOutFlow()) + .append("inFlow", getInFlow()) + .append("bandwidth", getBandwidth()) + .append("lossRate", getLossRate()) + .append("errorRate", getErrorRate()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquManu.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquManu.java new file mode 100644 index 00000000..cec17ff2 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquManu.java @@ -0,0 +1,132 @@ +package com.alops.system.domain; + +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + +/** + * 设备厂商管理对象 equ_manu + * + * @author ruoyi + * @date 2025-08-01 + */ +public class EquManu extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 厂商ID */ + private String id; + + /** 厂商名称 */ + @Excel(name = "厂商名称") + private String name; + + /** 厂商简介 */ + @Excel(name = "厂商简介") + private String description; + + /** 联系人ID */ + @Excel(name = "联系人ID") + private Long contactBy; + + /** 联系方式 */ + @Excel(name = "联系方式") + private String contactWay; + + /** 添加日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date createDate; + + /** 状态(0-禁用,1-启用) */ + @Excel(name = "状态(0-禁用,1-启用)") + private Long status; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public void setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + + public void setContactBy(Long contactBy) + { + this.contactBy = contactBy; + } + + public Long getContactBy() + { + return contactBy; + } + + public void setContactWay(String contactWay) + { + this.contactWay = contactWay; + } + + public String getContactWay() + { + return contactWay; + } + + public void setCreateDate(Date createDate) + { + this.createDate = createDate; + } + + public Date getCreateDate() + { + return createDate; + } + + 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("description", getDescription()) + .append("contactBy", getContactBy()) + .append("contactWay", getContactWay()) + .append("createBy", getCreateBy()) + .append("createDate", getCreateDate()) + .append("status", getStatus()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquType.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquType.java new file mode 100644 index 00000000..ebe585c3 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquType.java @@ -0,0 +1,102 @@ +package com.alops.system.domain; + +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + +/** + * 设备类型管理对象 equ_type + * + * @author ruoyi + * @date 2025-08-01 + */ +public class EquType extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 类型ID */ + private String id; + + /** 设备类型名称 */ + @Excel(name = "设备类型名称") + private String name; + + /** 设备类型简介 */ + @Excel(name = "设备类型简介") + private String description; + + /** 设备图片存储地址 */ + @Excel(name = "设备图片存储地址") + private String image; + + /** 添加日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "添加日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date createDate; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public void setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + + public void setImage(String image) + { + this.image = image; + } + + public String getImage() + { + return image; + } + + public void setCreateDate(Date createDate) + { + this.createDate = createDate; + } + + public Date getCreateDate() + { + return createDate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("description", getDescription()) + .append("image", getImage()) + .append("createBy", getCreateBy()) + .append("createDate", getCreateDate()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/FauSta.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/FauSta.java new file mode 100644 index 00000000..4fb9bce5 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/FauSta.java @@ -0,0 +1,222 @@ +package com.alops.system.domain; + +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + +/** + * 故障统计对象 fau_sta + * + * @author ruoyi + * @date 2025-08-01 + */ +public class FauSta extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 故障ID */ + private Long id; + + /** 设备ID */ + @Excel(name = "设备ID") + private String equId; + + /** 故障现象简述 */ + @Excel(name = "故障现象简述") + private String description; + + /** 故障类型(枚举) */ + @Excel(name = "故障类型(枚举)") + private Long type; + + /** 设备类型 */ + @Excel(name = "设备类型") + private String equType; + + /** 可能原因 */ + @Excel(name = "可能原因") + private String cause; + + /** 解决方案 */ + @Excel(name = "解决方案") + private String solution; + + /** 故障级别(1-5级) */ + @Excel(name = "故障级别(1-5级)") + private Long level; + + /** 发生时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date occurTime; + + /** 报告人ID */ + @Excel(name = "报告人ID") + private Long reporter; + + /** 处理人ID */ + @Excel(name = "处理人ID") + private Long handler; + + /** 解决时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "解决时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date handleTime; + + /** 处理状态(open、in_progress_closed) */ + @Excel(name = "处理状态", readConverterExp = "o=pen、in_progress_closed") + private String status; + + 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 setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + + public void setType(Long type) + { + this.type = type; + } + + public Long getType() + { + return type; + } + + public void setEquType(String equType) + { + this.equType = equType; + } + + public String getEquType() + { + return equType; + } + + public void setCause(String cause) + { + this.cause = cause; + } + + public String getCause() + { + return cause; + } + + public void setSolution(String solution) + { + this.solution = solution; + } + + public String getSolution() + { + return solution; + } + + public void setLevel(Long level) + { + this.level = level; + } + + public Long getLevel() + { + return level; + } + + public void setOccurTime(Date occurTime) + { + this.occurTime = occurTime; + } + + public Date getOccurTime() + { + return occurTime; + } + + public void setReporter(Long reporter) + { + this.reporter = reporter; + } + + public Long getReporter() + { + return reporter; + } + + public void setHandler(Long handler) + { + this.handler = handler; + } + + public Long getHandler() + { + return handler; + } + + public void setHandleTime(Date handleTime) + { + this.handleTime = handleTime; + } + + public Date getHandleTime() + { + return handleTime; + } + + 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("equId", getEquId()) + .append("description", getDescription()) + .append("type", getType()) + .append("equType", getEquType()) + .append("cause", getCause()) + .append("solution", getSolution()) + .append("level", getLevel()) + .append("occurTime", getOccurTime()) + .append("reporter", getReporter()) + .append("handler", getHandler()) + .append("handleTime", getHandleTime()) + .append("status", getStatus()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/LocalKnowledge.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/LocalKnowledge.java new file mode 100644 index 00000000..4bb01842 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/LocalKnowledge.java @@ -0,0 +1,162 @@ +package com.alops.system.domain; + +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + +/** + * 专家知识库对象 local_knowledge + * + * @author ruoyi + * @date 2025-08-01 + */ +public class LocalKnowledge extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 知识ID */ + private Long id; + + /** 文档标题 */ + @Excel(name = "文档标题") + private String docTitle; + + /** 文档简介 */ + @Excel(name = "文档简介") + private String docDescription; + + /** 文件存储路径 */ + @Excel(name = "文件存储路径") + private String fileUrl; + + /** 创建人ID */ + @Excel(name = "创建人ID") + private Long createdBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createDate; + + /** 最后修改人 */ + @Excel(name = "最后修改人") + private Long updatedBy; + + /** 最后修改时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后修改时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date updateDate; + + /** 状态(0-下架,1-发布) */ + @Excel(name = "状态(0-下架,1-发布)") + private Long docStatus; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setDocTitle(String docTitle) + { + this.docTitle = docTitle; + } + + public String getDocTitle() + { + return docTitle; + } + + public void setDocDescription(String docDescription) + { + this.docDescription = docDescription; + } + + public String getDocDescription() + { + return docDescription; + } + + public void setFileUrl(String fileUrl) + { + this.fileUrl = fileUrl; + } + + public String getFileUrl() + { + return fileUrl; + } + + public void setCreatedBy(Long createdBy) + { + this.createdBy = createdBy; + } + + public Long getCreatedBy() + { + return createdBy; + } + + public void setCreateDate(Date createDate) + { + this.createDate = createDate; + } + + public Date getCreateDate() + { + return createDate; + } + + public void setUpdatedBy(Long updatedBy) + { + this.updatedBy = updatedBy; + } + + public Long getUpdatedBy() + { + return updatedBy; + } + + public void setUpdateDate(Date updateDate) + { + this.updateDate = updateDate; + } + + public Date getUpdateDate() + { + return updateDate; + } + + public void setDocStatus(Long docStatus) + { + this.docStatus = docStatus; + } + + public Long getDocStatus() + { + return docStatus; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("docTitle", getDocTitle()) + .append("docDescription", getDocDescription()) + .append("fileUrl", getFileUrl()) + .append("createdBy", getCreatedBy()) + .append("createDate", getCreateDate()) + .append("updatedBy", getUpdatedBy()) + .append("updateDate", getUpdateDate()) + .append("docStatus", getDocStatus()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/QaHistory.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/QaHistory.java new file mode 100644 index 00000000..65b3646b --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/QaHistory.java @@ -0,0 +1,131 @@ +package com.alops.system.domain; + +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + +/** + * 问答历史记录对象 qa_history + * + * @author ruoyi + * @date 2025-08-01 + */ +public class QaHistory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 记录ID */ + private Long id; + + /** 用户问题 */ + @Excel(name = "用户问题") + private String userQuestion; + + /** 系统回答 */ + @Excel(name = "系统回答") + private String systemAnswer; + + /** 来源(web/app等) */ + @Excel(name = "来源(web/app等)") + private String sourceOrigin; + + /** 用户ID */ + @Excel(name = "用户ID") + private Long createdBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createDate; + + /** 状态(0-删除,1-正常) */ + @Excel(name = "状态(0-删除,1-正常)") + private Long recordStatus; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setUserQuestion(String userQuestion) + { + this.userQuestion = userQuestion; + } + + public String getUserQuestion() + { + return userQuestion; + } + + public void setSystemAnswer(String systemAnswer) + { + this.systemAnswer = systemAnswer; + } + + public String getSystemAnswer() + { + return systemAnswer; + } + + public void setSourceOrigin(String sourceOrigin) + { + this.sourceOrigin = sourceOrigin; + } + + public String getSourceOrigin() + { + return sourceOrigin; + } + + public void setCreatedBy(Long createdBy) + { + this.createdBy = createdBy; + } + + public Long getCreatedBy() + { + return createdBy; + } + + public void setCreateDate(Date createDate) + { + this.createDate = createDate; + } + + public Date getCreateDate() + { + return createDate; + } + + public void setRecordStatus(Long recordStatus) + { + this.recordStatus = recordStatus; + } + + public Long getRecordStatus() + { + return recordStatus; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("userQuestion", getUserQuestion()) + .append("systemAnswer", getSystemAnswer()) + .append("sourceOrigin", getSourceOrigin()) + .append("createdBy", getCreatedBy()) + .append("createDate", getCreateDate()) + .append("recordStatus", getRecordStatus()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/ScheduleRules.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/ScheduleRules.java new file mode 100644 index 00000000..e2138fda --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/ScheduleRules.java @@ -0,0 +1,225 @@ +package com.alops.system.domain; + +import java.util.Date; + +import com.alops.common.annotation.Excel; +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; + +/** + * 定时采集规则对象 schedule_rules + * + * @author ruoyi + * @date 2025-08-03 + */ +public class ScheduleRules extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 规则名称 */ + @Excel(name = "规则名称") + private String ruleName; + + /** 规则类型: 0-间隔采集, 1-固定时间采集 */ + @Excel(name = "规则类型: 0-间隔采集, 1-固定时间采集") + private Long ruleType; + + /** 采集频率(当rule_type=0时有效),如"5分钟" */ + @Excel(name = "采集频率(当rule_type=0时有效)") + private String frequency; + + /** 固定采集时间(当rule_type=1时有效) */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "固定采集时间(当rule_type=1时有效)", width = 30, dateFormat = "yyyy-MM-dd") + private Date fixedTime; + + /** 是否启用时间限制 */ + @Excel(name = "是否启用时间限制") + private Integer timeLimitEnabled; + + /** 采集开始时间(当time_limit_enabled=TRUE时有效) */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "采集开始时间(当time_limit_enabled=TRUE时有效)", width = 30, dateFormat = "yyyy-MM-dd") + private Date startTime; + + /** 采集结束时间(当time_limit_enabled=TRUE时有效) */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "采集结束时间(当time_limit_enabled=TRUE时有效)", width = 30, dateFormat = "yyyy-MM-dd") + private Date endTime; + + /** 是否启用该规则 */ + @Excel(name = "是否启用该规则") + private Integer isActive; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdAt; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date updatedAt; + + /** 创建人 */ + @Excel(name = "创建人") + private Long createdBy; + + /** 更新人 */ + @Excel(name = "更新人") + private Long updatedBy; + + 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 setRuleType(Long ruleType) + { + this.ruleType = ruleType; + } + + public Long getRuleType() + { + return ruleType; + } + + public void setFrequency(String frequency) + { + this.frequency = frequency; + } + + public String getFrequency() + { + return frequency; + } + + public void setFixedTime(Date fixedTime) + { + this.fixedTime = fixedTime; + } + + public Date getFixedTime() + { + return fixedTime; + } + + public void setTimeLimitEnabled(Integer timeLimitEnabled) + { + this.timeLimitEnabled = timeLimitEnabled; + } + + public Integer getTimeLimitEnabled() + { + return timeLimitEnabled; + } + + public void setStartTime(Date startTime) + { + this.startTime = startTime; + } + + public Date getStartTime() + { + return startTime; + } + + public void setEndTime(Date endTime) + { + this.endTime = endTime; + } + + public Date getEndTime() + { + return endTime; + } + + public void setIsActive(Integer isActive) + { + this.isActive = isActive; + } + + public Integer getIsActive() + { + return isActive; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + public void setUpdatedAt(Date updatedAt) + { + this.updatedAt = updatedAt; + } + + public Date getUpdatedAt() + { + return updatedAt; + } + + public void setCreatedBy(Long createdBy) + { + this.createdBy = createdBy; + } + + public Long getCreatedBy() + { + return createdBy; + } + + public void setUpdatedBy(Long updatedBy) + { + this.updatedBy = updatedBy; + } + + public Long getUpdatedBy() + { + return updatedBy; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("ruleName", getRuleName()) + .append("ruleType", getRuleType()) + .append("frequency", getFrequency()) + .append("fixedTime", getFixedTime()) + .append("timeLimitEnabled", getTimeLimitEnabled()) + .append("startTime", getStartTime()) + .append("endTime", getEndTime()) + .append("isActive", getIsActive()) + .append("createdAt", getCreatedAt()) + .append("updatedAt", getUpdatedAt()) + .append("createdBy", getCreatedBy()) + .append("updatedBy", getUpdatedBy()) + .toString(); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquBaseQueryDto.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquBaseQueryDto.java new file mode 100644 index 00000000..99343bc8 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquBaseQueryDto.java @@ -0,0 +1,117 @@ +package com.alops.system.domain.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 设备查询条件 DTO + */ +public class EquBaseQueryDto implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 设备类型 (equ_type, varchar) */ + private String equType; + + /** 设备名称 (name, varchar) */ + private String equName; + + /** 安装位置 ID (location, varchar) */ + private String location; + + /** 厂商 ID (manufacture, varchar) */ + private String manufacture; + + /** 设备管理员 ID (in_charge, bigint) */ + private Long inCharge; + + /** 健康度 (额外查询条件,int 或百分比) */ + private Integer health; + + /** 起始时间 (min_time) */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date minTime; + + /** 截止时间 (max_time) */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date maxTime; + + /** 状态 (status, tinyint) */ + private Integer status; + + // ====== Getter 和 Setter ====== + public String getEquType() { + return equType; + } + + public void setEquType(String equType) { + this.equType = equType; + } + + public String getEquName() { + return equName; + } + + public void setEquName(String equName) { + this.equName = equName; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getManufacture() { + return manufacture; + } + + public void setManufacture(String manufacture) { + this.manufacture = manufacture; + } + + public Long getInCharge() { + return inCharge; + } + + public void setInCharge(Long inCharge) { + this.inCharge = inCharge; + } + + public Integer getHealth() { + return health; + } + + public void setHealth(Integer health) { + this.health = health; + } + + public Date getMinTime() { + return minTime; + } + + public void setMinTime(Date minTime) { + this.minTime = minTime; + } + + public Date getMaxTime() { + return maxTime; + } + + public void setMaxTime(Date maxTime) { + this.maxTime = maxTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlarmRuleMapper.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlarmRuleMapper.java new file mode 100644 index 00000000..5d0c5009 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/AlarmRuleMapper.java @@ -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 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); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquBaseMapper.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquBaseMapper.java new file mode 100644 index 00000000..7643d8d2 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquBaseMapper.java @@ -0,0 +1,66 @@ +package com.alops.system.mapper; + +import com.alops.system.domain.EquBase; +import com.alops.system.domain.dto.EquBaseQueryDto; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + + +/** + * 设备基本信息Mapper接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +@Mapper +public interface EquBaseMapper +{ + /** + * 查询设备基本信息 + * + * @param id 设备基本信息主键 + * @return 设备基本信息 + */ + public EquBase selectEquBaseById(String id); + + /** + * 查询设备基本信息列表 + * + * @param equBaseQueryDto 设备基本信息 + * @return 设备基本信息集合 + */ + public List selectEquBaseList(EquBaseQueryDto equBaseQueryDto); + + /** + * 新增设备基本信息 + * + * @param equBase 设备基本信息 + * @return 结果 + */ + public int insertEquBase(EquBase equBase); + + /** + * 修改设备基本信息 + * + * @param equBase 设备基本信息 + * @return 结果 + */ + public int updateEquBase(EquBase equBase); + + /** + * 删除设备基本信息 + * + * @param id 设备基本信息主键 + * @return 结果 + */ + public int deleteEquBaseById(String id); + + /** + * 批量删除设备基本信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEquBaseByIds(String[] ids); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquManuMapper.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquManuMapper.java new file mode 100644 index 00000000..07917328 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquManuMapper.java @@ -0,0 +1,64 @@ +package com.alops.system.mapper; + +import com.alops.system.domain.EquManu; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 设备厂商管理Mapper接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +@Mapper +public interface EquManuMapper +{ + /** + * 查询设备厂商管理 + * + * @param id 设备厂商管理主键 + * @return 设备厂商管理 + */ + public EquManu selectEquManuById(String id); + + /** + * 查询设备厂商管理列表 + * + * @param equManu 设备厂商管理 + * @return 设备厂商管理集合 + */ + public List selectEquManuList(EquManu equManu); + + /** + * 新增设备厂商管理 + * + * @param equManu 设备厂商管理 + * @return 结果 + */ + public int insertEquManu(EquManu equManu); + + /** + * 修改设备厂商管理 + * + * @param equManu 设备厂商管理 + * @return 结果 + */ + public int updateEquManu(EquManu equManu); + + /** + * 删除设备厂商管理 + * + * @param id 设备厂商管理主键 + * @return 结果 + */ + public int deleteEquManuById(String id); + + /** + * 批量删除设备厂商管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEquManuByIds(String[] ids); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquTypeMapper.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquTypeMapper.java new file mode 100644 index 00000000..408fefa3 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/EquTypeMapper.java @@ -0,0 +1,64 @@ +package com.alops.system.mapper; + +import com.alops.system.domain.EquType; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 设备类型管理Mapper接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +@Mapper +public interface EquTypeMapper +{ + /** + * 查询设备类型管理 + * + * @param id 设备类型管理主键 + * @return 设备类型管理 + */ + public EquType selectEquTypeById(String id); + + /** + * 查询设备类型管理列表 + * + * @param equType 设备类型管理 + * @return 设备类型管理集合 + */ + public List selectEquTypeList(EquType equType); + + /** + * 新增设备类型管理 + * + * @param equType 设备类型管理 + * @return 结果 + */ + public int insertEquType(EquType equType); + + /** + * 修改设备类型管理 + * + * @param equType 设备类型管理 + * @return 结果 + */ + public int updateEquType(EquType equType); + + /** + * 删除设备类型管理 + * + * @param id 设备类型管理主键 + * @return 结果 + */ + public int deleteEquTypeById(String id); + + /** + * 批量删除设备类型管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEquTypeByIds(String[] ids); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/FauStaMapper.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/FauStaMapper.java new file mode 100644 index 00000000..c461a6de --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/FauStaMapper.java @@ -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 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); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/LocalKnowledgeMapper.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/LocalKnowledgeMapper.java new file mode 100644 index 00000000..b45ac10e --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/LocalKnowledgeMapper.java @@ -0,0 +1,64 @@ +package com.alops.system.mapper; + +import com.alops.system.domain.LocalKnowledge; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 专家知识库Mapper接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +@Mapper +public interface LocalKnowledgeMapper +{ + /** + * 查询专家知识库 + * + * @param id 专家知识库主键 + * @return 专家知识库 + */ + public LocalKnowledge selectLocalKnowledgeById(Long id); + + /** + * 查询专家知识库列表 + * + * @param localKnowledge 专家知识库 + * @return 专家知识库集合 + */ + public List selectLocalKnowledgeList(LocalKnowledge localKnowledge); + + /** + * 新增专家知识库 + * + * @param localKnowledge 专家知识库 + * @return 结果 + */ + public int insertLocalKnowledge(LocalKnowledge localKnowledge); + + /** + * 修改专家知识库 + * + * @param localKnowledge 专家知识库 + * @return 结果 + */ + public int updateLocalKnowledge(LocalKnowledge localKnowledge); + + /** + * 删除专家知识库 + * + * @param id 专家知识库主键 + * @return 结果 + */ + public int deleteLocalKnowledgeById(Long id); + + /** + * 批量删除专家知识库 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteLocalKnowledgeByIds(Long[] ids); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/ScheduleRulesMapper.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/ScheduleRulesMapper.java new file mode 100644 index 00000000..26ad3528 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/mapper/ScheduleRulesMapper.java @@ -0,0 +1,64 @@ +package com.alops.system.mapper; + +import com.alops.system.domain.ScheduleRules; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 定时采集规则Mapper接口 + * + * @author ruoyi + * @date 2025-08-03 + */ +@Mapper +public interface ScheduleRulesMapper +{ + /** + * 查询定时采集规则 + * + * @param id 定时采集规则主键 + * @return 定时采集规则 + */ + public ScheduleRules selectScheduleRulesById(Long id); + + /** + * 查询定时采集规则列表 + * + * @param scheduleRules 定时采集规则 + * @return 定时采集规则集合 + */ + public List selectScheduleRulesList(ScheduleRules scheduleRules); + + /** + * 新增定时采集规则 + * + * @param scheduleRules 定时采集规则 + * @return 结果 + */ + public int insertScheduleRules(ScheduleRules scheduleRules); + + /** + * 修改定时采集规则 + * + * @param scheduleRules 定时采集规则 + * @return 结果 + */ + public int updateScheduleRules(ScheduleRules scheduleRules); + + /** + * 删除定时采集规则 + * + * @param id 定时采集规则主键 + * @return 结果 + */ + public int deleteScheduleRulesById(Long id); + + /** + * 批量删除定时采集规则 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteScheduleRulesByIds(Long[] ids); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlarmRuleService.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlarmRuleService.java new file mode 100644 index 00000000..47cd49b8 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IAlarmRuleService.java @@ -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 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); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquBaseService.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquBaseService.java new file mode 100644 index 00000000..0bac6c95 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquBaseService.java @@ -0,0 +1,64 @@ +package com.alops.system.service; + +import com.alops.system.domain.EquBase; +import com.alops.system.domain.dto.EquBaseQueryDto; + +import java.util.List; + + +/** + * 设备基本信息Service接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +public interface IEquBaseService +{ + /** + * 查询设备基本信息 + * + * @param id 设备基本信息主键 + * @return 设备基本信息 + */ + public EquBase selectEquBaseById(String id); + + /** + * 查询设备基本信息列表 + * + * @param equBaseQueryDto 设备基本信息 + * @return 设备基本信息集合 + */ + public List selectEquBaseList(EquBaseQueryDto equBaseQueryDto); + + /** + * 新增设备基本信息 + * + * @param equBase 设备基本信息 + * @return 结果 + */ + public int insertEquBase(EquBase equBase); + + /** + * 修改设备基本信息 + * + * @param equBase 设备基本信息 + * @return 结果 + */ + public int updateEquBase(EquBase equBase); + + /** + * 批量删除设备基本信息 + * + * @param ids 需要删除的设备基本信息主键集合 + * @return 结果 + */ + public int deleteEquBaseByIds(String[] ids); + + /** + * 删除设备基本信息信息 + * + * @param id 设备基本信息主键 + * @return 结果 + */ + public int deleteEquBaseById(String id); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquManuService.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquManuService.java new file mode 100644 index 00000000..37ae09e6 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquManuService.java @@ -0,0 +1,62 @@ +package com.alops.system.service; + +import com.alops.system.domain.EquManu; + +import java.util.List; + +/** + * 设备厂商管理Service接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +public interface IEquManuService +{ + /** + * 查询设备厂商管理 + * + * @param id 设备厂商管理主键 + * @return 设备厂商管理 + */ + public EquManu selectEquManuById(String id); + + /** + * 查询设备厂商管理列表 + * + * @param equManu 设备厂商管理 + * @return 设备厂商管理集合 + */ + public List selectEquManuList(EquManu equManu); + + /** + * 新增设备厂商管理 + * + * @param equManu 设备厂商管理 + * @return 结果 + */ + public int insertEquManu(EquManu equManu); + + /** + * 修改设备厂商管理 + * + * @param equManu 设备厂商管理 + * @return 结果 + */ + public int updateEquManu(EquManu equManu); + + /** + * 批量删除设备厂商管理 + * + * @param ids 需要删除的设备厂商管理主键集合 + * @return 结果 + */ + public int deleteEquManuByIds(String[] ids); + + /** + * 删除设备厂商管理信息 + * + * @param id 设备厂商管理主键 + * @return 结果 + */ + public int deleteEquManuById(String id); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquTypeService.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquTypeService.java new file mode 100644 index 00000000..5303057a --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IEquTypeService.java @@ -0,0 +1,62 @@ +package com.alops.system.service; + +import com.alops.system.domain.EquType; + +import java.util.List; + +/** + * 设备类型管理Service接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +public interface IEquTypeService +{ + /** + * 查询设备类型管理 + * + * @param id 设备类型管理主键 + * @return 设备类型管理 + */ + public EquType selectEquTypeById(String id); + + /** + * 查询设备类型管理列表 + * + * @param equType 设备类型管理 + * @return 设备类型管理集合 + */ + public List selectEquTypeList(EquType equType); + + /** + * 新增设备类型管理 + * + * @param equType 设备类型管理 + * @return 结果 + */ + public int insertEquType(EquType equType); + + /** + * 修改设备类型管理 + * + * @param equType 设备类型管理 + * @return 结果 + */ + public int updateEquType(EquType equType); + + /** + * 批量删除设备类型管理 + * + * @param ids 需要删除的设备类型管理主键集合 + * @return 结果 + */ + public int deleteEquTypeByIds(String[] ids); + + /** + * 删除设备类型管理信息 + * + * @param id 设备类型管理主键 + * @return 结果 + */ + public int deleteEquTypeById(String id); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IFauStaService.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IFauStaService.java new file mode 100644 index 00000000..7a167f0f --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IFauStaService.java @@ -0,0 +1,62 @@ +package com.alops.system.service; + +import com.alops.system.domain.FauSta; + +import java.util.List; + +/** + * 故障统计Service接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +public interface IFauStaService +{ + /** + * 查询故障统计 + * + * @param id 故障统计主键 + * @return 故障统计 + */ + public FauSta selectFauStaById(Long id); + + /** + * 查询故障统计列表 + * + * @param fauSta 故障统计 + * @return 故障统计集合 + */ + public List selectFauStaList(FauSta fauSta); + + /** + * 新增故障统计 + * + * @param fauSta 故障统计 + * @return 结果 + */ + public int insertFauSta(FauSta fauSta); + + /** + * 修改故障统计 + * + * @param fauSta 故障统计 + * @return 结果 + */ + public int updateFauSta(FauSta fauSta); + + /** + * 批量删除故障统计 + * + * @param ids 需要删除的故障统计主键集合 + * @return 结果 + */ + public int deleteFauStaByIds(Long[] ids); + + /** + * 删除故障统计信息 + * + * @param id 故障统计主键 + * @return 结果 + */ + public int deleteFauStaById(Long id); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/ILocalKnowledgeService.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/ILocalKnowledgeService.java new file mode 100644 index 00000000..7f3e9b4f --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/ILocalKnowledgeService.java @@ -0,0 +1,62 @@ +package com.alops.system.service; + +import com.alops.system.domain.LocalKnowledge; + +import java.util.List; + +/** + * 专家知识库Service接口 + * + * @author ruoyi + * @date 2025-08-01 + */ +public interface ILocalKnowledgeService +{ + /** + * 查询专家知识库 + * + * @param id 专家知识库主键 + * @return 专家知识库 + */ + public LocalKnowledge selectLocalKnowledgeById(Long id); + + /** + * 查询专家知识库列表 + * + * @param localKnowledge 专家知识库 + * @return 专家知识库集合 + */ + public List selectLocalKnowledgeList(LocalKnowledge localKnowledge); + + /** + * 新增专家知识库 + * + * @param localKnowledge 专家知识库 + * @return 结果 + */ + public int insertLocalKnowledge(LocalKnowledge localKnowledge); + + /** + * 修改专家知识库 + * + * @param localKnowledge 专家知识库 + * @return 结果 + */ + public int updateLocalKnowledge(LocalKnowledge localKnowledge); + + /** + * 批量删除专家知识库 + * + * @param ids 需要删除的专家知识库主键集合 + * @return 结果 + */ + public int deleteLocalKnowledgeByIds(Long[] ids); + + /** + * 删除专家知识库信息 + * + * @param id 专家知识库主键 + * @return 结果 + */ + public int deleteLocalKnowledgeById(Long id); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IScheduleRulesService.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IScheduleRulesService.java new file mode 100644 index 00000000..2a9e7a3b --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/IScheduleRulesService.java @@ -0,0 +1,63 @@ +package com.alops.system.service; + +import com.alops.system.domain.ScheduleRules; + +import java.util.List; + + +/** + * 定时采集规则Service接口 + * + * @author ruoyi + * @date 2025-08-03 + */ +public interface IScheduleRulesService +{ + /** + * 查询定时采集规则 + * + * @param id 定时采集规则主键 + * @return 定时采集规则 + */ + public ScheduleRules selectScheduleRulesById(Long id); + + /** + * 查询定时采集规则列表 + * + * @param scheduleRules 定时采集规则 + * @return 定时采集规则集合 + */ + public List selectScheduleRulesList(ScheduleRules scheduleRules); + + /** + * 新增定时采集规则 + * + * @param scheduleRules 定时采集规则 + * @return 结果 + */ + public int insertScheduleRules(ScheduleRules scheduleRules); + + /** + * 修改定时采集规则 + * + * @param scheduleRules 定时采集规则 + * @return 结果 + */ + public int updateScheduleRules(ScheduleRules scheduleRules); + + /** + * 批量删除定时采集规则 + * + * @param ids 需要删除的定时采集规则主键集合 + * @return 结果 + */ + public int deleteScheduleRulesByIds(Long[] ids); + + /** + * 删除定时采集规则信息 + * + * @param id 定时采集规则主键 + * @return 结果 + */ + public int deleteScheduleRulesById(Long id); +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlarmRuleServiceImpl.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlarmRuleServiceImpl.java new file mode 100644 index 00000000..1b58d14f --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/AlarmRuleServiceImpl.java @@ -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 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); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquBaseServiceImpl.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquBaseServiceImpl.java new file mode 100644 index 00000000..580671e1 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquBaseServiceImpl.java @@ -0,0 +1,95 @@ +package com.alops.system.service.impl; + +import java.util.List; + +import com.alops.system.domain.EquBase; +import com.alops.system.domain.dto.EquBaseQueryDto; +import com.alops.system.mapper.EquBaseMapper; +import com.alops.system.service.IEquBaseService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 设备基本信息Service业务层处理 + * + * @author ruoyi + * @date 2025-08-01 + */ +@Service +public class EquBaseServiceImpl implements IEquBaseService +{ + @Autowired + private EquBaseMapper equBaseMapper; + + /** + * 查询设备基本信息 + * + * @param id 设备基本信息主键 + * @return 设备基本信息 + */ + @Override + public EquBase selectEquBaseById(String id) + { + return equBaseMapper.selectEquBaseById(id); + } + + /** + * 查询设备基本信息列表 + * + * @param equBaseQueryDto 设备基本信息 + * @return 设备基本信息 + */ + @Override + public List selectEquBaseList(EquBaseQueryDto equBaseQueryDto) + { + return equBaseMapper.selectEquBaseList(equBaseQueryDto); + } + + /** + * 新增设备基本信息 + * + * @param equBase 设备基本信息 + * @return 结果 + */ + @Override + public int insertEquBase(EquBase equBase) + { + return equBaseMapper.insertEquBase(equBase); + } + + /** + * 修改设备基本信息 + * + * @param equBase 设备基本信息 + * @return 结果 + */ + @Override + public int updateEquBase(EquBase equBase) + { + return equBaseMapper.updateEquBase(equBase); + } + + /** + * 批量删除设备基本信息 + * + * @param ids 需要删除的设备基本信息主键 + * @return 结果 + */ + @Override + public int deleteEquBaseByIds(String[] ids) + { + return equBaseMapper.deleteEquBaseByIds(ids); + } + + /** + * 删除设备基本信息信息 + * + * @param id 设备基本信息主键 + * @return 结果 + */ + @Override + public int deleteEquBaseById(String id) + { + return equBaseMapper.deleteEquBaseById(id); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquManuServiceImpl.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquManuServiceImpl.java new file mode 100644 index 00000000..5d098d19 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquManuServiceImpl.java @@ -0,0 +1,94 @@ +package com.alops.system.service.impl; + +import java.util.List; + +import com.alops.system.domain.EquManu; +import com.alops.system.mapper.EquManuMapper; +import com.alops.system.service.IEquManuService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 设备厂商管理Service业务层处理 + * + * @author ruoyi + * @date 2025-08-01 + */ +@Service +public class EquManuServiceImpl implements IEquManuService +{ + @Autowired + private EquManuMapper equManuMapper; + + /** + * 查询设备厂商管理 + * + * @param id 设备厂商管理主键 + * @return 设备厂商管理 + */ + @Override + public EquManu selectEquManuById(String id) + { + return equManuMapper.selectEquManuById(id); + } + + /** + * 查询设备厂商管理列表 + * + * @param equManu 设备厂商管理 + * @return 设备厂商管理 + */ + @Override + public List selectEquManuList(EquManu equManu) + { + return equManuMapper.selectEquManuList(equManu); + } + + /** + * 新增设备厂商管理 + * + * @param equManu 设备厂商管理 + * @return 结果 + */ + @Override + public int insertEquManu(EquManu equManu) + { + return equManuMapper.insertEquManu(equManu); + } + + /** + * 修改设备厂商管理 + * + * @param equManu 设备厂商管理 + * @return 结果 + */ + @Override + public int updateEquManu(EquManu equManu) + { + return equManuMapper.updateEquManu(equManu); + } + + /** + * 批量删除设备厂商管理 + * + * @param ids 需要删除的设备厂商管理主键 + * @return 结果 + */ + @Override + public int deleteEquManuByIds(String[] ids) + { + return equManuMapper.deleteEquManuByIds(ids); + } + + /** + * 删除设备厂商管理信息 + * + * @param id 设备厂商管理主键 + * @return 结果 + */ + @Override + public int deleteEquManuById(String id) + { + return equManuMapper.deleteEquManuById(id); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquTypeServiceImpl.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquTypeServiceImpl.java new file mode 100644 index 00000000..1a2045a1 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquTypeServiceImpl.java @@ -0,0 +1,94 @@ +package com.alops.system.service.impl; + +import java.util.List; + +import com.alops.system.domain.EquType; +import com.alops.system.mapper.EquTypeMapper; +import com.alops.system.service.IEquTypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 设备类型管理Service业务层处理 + * + * @author ruoyi + * @date 2025-08-01 + */ +@Service +public class EquTypeServiceImpl implements IEquTypeService +{ + @Autowired + private EquTypeMapper equTypeMapper; + + /** + * 查询设备类型管理 + * + * @param id 设备类型管理主键 + * @return 设备类型管理 + */ + @Override + public EquType selectEquTypeById(String id) + { + return equTypeMapper.selectEquTypeById(id); + } + + /** + * 查询设备类型管理列表 + * + * @param equType 设备类型管理 + * @return 设备类型管理 + */ + @Override + public List selectEquTypeList(EquType equType) + { + return equTypeMapper.selectEquTypeList(equType); + } + + /** + * 新增设备类型管理 + * + * @param equType 设备类型管理 + * @return 结果 + */ + @Override + public int insertEquType(EquType equType) + { + return equTypeMapper.insertEquType(equType); + } + + /** + * 修改设备类型管理 + * + * @param equType 设备类型管理 + * @return 结果 + */ + @Override + public int updateEquType(EquType equType) + { + return equTypeMapper.updateEquType(equType); + } + + /** + * 批量删除设备类型管理 + * + * @param ids 需要删除的设备类型管理主键 + * @return 结果 + */ + @Override + public int deleteEquTypeByIds(String[] ids) + { + return equTypeMapper.deleteEquTypeByIds(ids); + } + + /** + * 删除设备类型管理信息 + * + * @param id 设备类型管理主键 + * @return 结果 + */ + @Override + public int deleteEquTypeById(String id) + { + return equTypeMapper.deleteEquTypeById(id); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/FauStaServiceImpl.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/FauStaServiceImpl.java new file mode 100644 index 00000000..a8ff0010 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/FauStaServiceImpl.java @@ -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 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); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/LocalKnowledgeServiceImpl.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/LocalKnowledgeServiceImpl.java new file mode 100644 index 00000000..6f60e13a --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/LocalKnowledgeServiceImpl.java @@ -0,0 +1,95 @@ +package com.alops.system.service.impl; + +import java.util.List; + +import com.alops.system.domain.LocalKnowledge; +import com.alops.system.mapper.LocalKnowledgeMapper; +import com.alops.system.service.ILocalKnowledgeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +/** + * 专家知识库Service业务层处理 + * + * @author ruoyi + * @date 2025-08-01 + */ +@Service +public class LocalKnowledgeServiceImpl implements ILocalKnowledgeService +{ + @Autowired + private LocalKnowledgeMapper localKnowledgeMapper; + + /** + * 查询专家知识库 + * + * @param id 专家知识库主键 + * @return 专家知识库 + */ + @Override + public LocalKnowledge selectLocalKnowledgeById(Long id) + { + return localKnowledgeMapper.selectLocalKnowledgeById(id); + } + + /** + * 查询专家知识库列表 + * + * @param localKnowledge 专家知识库 + * @return 专家知识库 + */ + @Override + public List selectLocalKnowledgeList(LocalKnowledge localKnowledge) + { + return localKnowledgeMapper.selectLocalKnowledgeList(localKnowledge); + } + + /** + * 新增专家知识库 + * + * @param localKnowledge 专家知识库 + * @return 结果 + */ + @Override + public int insertLocalKnowledge(LocalKnowledge localKnowledge) + { + return localKnowledgeMapper.insertLocalKnowledge(localKnowledge); + } + + /** + * 修改专家知识库 + * + * @param localKnowledge 专家知识库 + * @return 结果 + */ + @Override + public int updateLocalKnowledge(LocalKnowledge localKnowledge) + { + return localKnowledgeMapper.updateLocalKnowledge(localKnowledge); + } + + /** + * 批量删除专家知识库 + * + * @param ids 需要删除的专家知识库主键 + * @return 结果 + */ + @Override + public int deleteLocalKnowledgeByIds(Long[] ids) + { + return localKnowledgeMapper.deleteLocalKnowledgeByIds(ids); + } + + /** + * 删除专家知识库信息 + * + * @param id 专家知识库主键 + * @return 结果 + */ + @Override + public int deleteLocalKnowledgeById(Long id) + { + return localKnowledgeMapper.deleteLocalKnowledgeById(id); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/ScheduleRulesServiceImpl.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/ScheduleRulesServiceImpl.java new file mode 100644 index 00000000..10eac15f --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/ScheduleRulesServiceImpl.java @@ -0,0 +1,94 @@ +package com.alops.system.service.impl; + +import java.util.List; + +import com.alops.system.domain.ScheduleRules; +import com.alops.system.mapper.ScheduleRulesMapper; +import com.alops.system.service.IScheduleRulesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 定时采集规则Service业务层处理 + * + * @author ruoyi + * @date 2025-08-03 + */ +@Service +public class ScheduleRulesServiceImpl implements IScheduleRulesService +{ + @Autowired + private ScheduleRulesMapper scheduleRulesMapper; + + /** + * 查询定时采集规则 + * + * @param id 定时采集规则主键 + * @return 定时采集规则 + */ + @Override + public ScheduleRules selectScheduleRulesById(Long id) + { + return scheduleRulesMapper.selectScheduleRulesById(id); + } + + /** + * 查询定时采集规则列表 + * + * @param scheduleRules 定时采集规则 + * @return 定时采集规则 + */ + @Override + public List selectScheduleRulesList(ScheduleRules scheduleRules) + { + return scheduleRulesMapper.selectScheduleRulesList(scheduleRules); + } + + /** + * 新增定时采集规则 + * + * @param scheduleRules 定时采集规则 + * @return 结果 + */ + @Override + public int insertScheduleRules(ScheduleRules scheduleRules) + { + return scheduleRulesMapper.insertScheduleRules(scheduleRules); + } + + /** + * 修改定时采集规则 + * + * @param scheduleRules 定时采集规则 + * @return 结果 + */ + @Override + public int updateScheduleRules(ScheduleRules scheduleRules) + { + return scheduleRulesMapper.updateScheduleRules(scheduleRules); + } + + /** + * 批量删除定时采集规则 + * + * @param ids 需要删除的定时采集规则主键 + * @return 结果 + */ + @Override + public int deleteScheduleRulesByIds(Long[] ids) + { + return scheduleRulesMapper.deleteScheduleRulesByIds(ids); + } + + /** + * 删除定时采集规则信息 + * + * @param id 定时采集规则主键 + * @return 结果 + */ + @Override + public int deleteScheduleRulesById(Long id) + { + return scheduleRulesMapper.deleteScheduleRulesById(id); + } +} diff --git a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/AlarmRuleMapper.xml b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/AlarmRuleMapper.xml new file mode 100644 index 00000000..3c715944 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/AlarmRuleMapper.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into alarm_rule + + rule_name, + description, + param_name, + equ_type, + compare_operator, + param_value, + alert_level, + alert_message, + role_id, + notify_email, + rule_status, + create_time, + + + #{ruleName}, + #{description}, + #{paramName}, + #{equType}, + #{compareOperator}, + #{paramValue}, + #{alertLevel}, + #{alertMessage}, + #{roleId}, + #{notifyEmail}, + #{ruleStatus}, + #{createTime}, + + + + + update alarm_rule + + rule_name = #{ruleName}, + description = #{description}, + param_name = #{paramName}, + equ_type = #{equType}, + compare_operator = #{compareOperator}, + param_value = #{paramValue}, + alert_level = #{alertLevel}, + alert_message = #{alertMessage}, + role_id = #{roleId}, + notify_email = #{notifyEmail}, + rule_status = #{ruleStatus}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from alarm_rule where id = #{id} + + + + delete from alarm_rule where id in + + #{id} + + + \ No newline at end of file diff --git a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml new file mode 100644 index 00000000..89670822 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + insert into equ_base + + 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, + + + #{id}, + #{name}, + #{version}, + #{ip}, + #{manufacture}, + #{location}, + #{equType}, + #{inCharge}, + #{releaseDate}, + #{installDate}, + #{lifeCycle}, + #{serviceTime}, + #{warranty}, + #{failureFrequency}, + #{repairFrequency}, + #{repairCost}, + #{createBy}, + #{createDate}, + #{updateBy}, + #{updateDate}, + #{status}, + + + + + update equ_base + + name = #{name}, + version = #{version}, + ip = #{ip}, + manufacture = #{manufacture}, + location = #{location}, + equ_type = #{equType}, + in_charge = #{inCharge}, + release_date = #{releaseDate}, + install_date = #{installDate}, + life_cycle = #{lifeCycle}, + service_time = #{serviceTime}, + warranty = #{warranty}, + failure_frequency = #{failureFrequency}, + repair_frequency = #{repairFrequency}, + repair_cost = #{repairCost}, + create_by = #{createBy}, + create_date = #{createDate}, + update_by = #{updateBy}, + update_date = #{updateDate}, + status = #{status}, + + where id = #{id} + + + + delete from equ_base where id = #{id} + + + + delete from equ_base where id in + + #{id} + + + \ No newline at end of file diff --git a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquManuMapper.xml b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquManuMapper.xml new file mode 100644 index 00000000..a25a2e7f --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquManuMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + select id, name, description, contact_by, contact_way, create_by, create_date, status from equ_manu + + + + + + + + insert into equ_manu + + id, + name, + description, + contact_by, + contact_way, + create_by, + create_date, + status, + + + #{id}, + #{name}, + #{description}, + #{contactBy}, + #{contactWay}, + #{createBy}, + #{createDate}, + #{status}, + + + + + update equ_manu + + name = #{name}, + description = #{description}, + contact_by = #{contactBy}, + contact_way = #{contactWay}, + create_by = #{createBy}, + create_date = #{createDate}, + status = #{status}, + + where id = #{id} + + + + delete from equ_manu where id = #{id} + + + + delete from equ_manu where id in + + #{id} + + + \ No newline at end of file diff --git a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquTypeMapper.xml b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquTypeMapper.xml new file mode 100644 index 00000000..1b554f22 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquTypeMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + select id, name, description, image, create_by, create_date from equ_type + + + + + + + + insert into equ_type + + id, + name, + description, + image, + create_by, + create_date, + + + #{id}, + #{name}, + #{description}, + #{image}, + #{createBy}, + #{createDate}, + + + + + update equ_type + + name = #{name}, + description = #{description}, + image = #{image}, + create_by = #{createBy}, + create_date = #{createDate}, + + where id = #{id} + + + + delete from equ_type where id = #{id} + + + + delete from equ_type where id in + + #{id} + + + \ No newline at end of file diff --git a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/FauStaMapper.xml b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/FauStaMapper.xml new file mode 100644 index 00000000..5ea9513f --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/FauStaMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + select id, equ_id, description, type, equ_type, cause, solution, level, occur_time, reporter, handler, handle_time, status from fau_sta + + + + + + + + insert into fau_sta + + equ_id, + description, + type, + equ_type, + cause, + solution, + level, + occur_time, + reporter, + handler, + handle_time, + status, + + + #{equId}, + #{description}, + #{type}, + #{equType}, + #{cause}, + #{solution}, + #{level}, + #{occurTime}, + #{reporter}, + #{handler}, + #{handleTime}, + #{status}, + + + + + update fau_sta + + equ_id = #{equId}, + description = #{description}, + type = #{type}, + equ_type = #{equType}, + cause = #{cause}, + solution = #{solution}, + level = #{level}, + occur_time = #{occurTime}, + reporter = #{reporter}, + handler = #{handler}, + handle_time = #{handleTime}, + status = #{status}, + + where id = #{id} + + + + delete from fau_sta where id = #{id} + + + + delete from fau_sta where id in + + #{id} + + + \ No newline at end of file diff --git a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/LocalKnowledgeMapper.xml b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/LocalKnowledgeMapper.xml new file mode 100644 index 00000000..82f32d89 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/LocalKnowledgeMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + select id, doc_title, doc_description, file_url, created_by, create_date, updated_by, update_date, doc_status from local_knowledge + + + + + + + + insert into local_knowledge + + doc_title, + doc_description, + file_url, + created_by, + create_date, + updated_by, + update_date, + doc_status, + + + #{docTitle}, + #{docDescription}, + #{fileUrl}, + #{createdBy}, + #{createDate}, + #{updatedBy}, + #{updateDate}, + #{docStatus}, + + + + + update local_knowledge + + doc_title = #{docTitle}, + doc_description = #{docDescription}, + file_url = #{fileUrl}, + created_by = #{createdBy}, + create_date = #{createDate}, + updated_by = #{updatedBy}, + update_date = #{updateDate}, + doc_status = #{docStatus}, + + where id = #{id} + + + + delete from local_knowledge where id = #{id} + + + + delete from local_knowledge where id in + + #{id} + + + \ No newline at end of file diff --git a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/ScheduleRulesMapper.xml b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/ScheduleRulesMapper.xml new file mode 100644 index 00000000..7be008c5 --- /dev/null +++ b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/ScheduleRulesMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + select id, rule_name, rule_type, frequency, fixed_time, time_limit_enabled, start_time, end_time, is_active, created_at, updated_at, created_by, updated_by from schedule_rules + + + + + + + + insert into schedule_rules + + rule_name, + rule_type, + frequency, + fixed_time, + time_limit_enabled, + start_time, + end_time, + is_active, + created_at, + updated_at, + created_by, + updated_by, + + + #{ruleName}, + #{ruleType}, + #{frequency}, + #{fixedTime}, + #{timeLimitEnabled}, + #{startTime}, + #{endTime}, + #{isActive}, + #{createdAt}, + #{updatedAt}, + #{createdBy}, + #{updatedBy}, + + + + + update schedule_rules + + rule_name = #{ruleName}, + rule_type = #{ruleType}, + frequency = #{frequency}, + fixed_time = #{fixedTime}, + time_limit_enabled = #{timeLimitEnabled}, + start_time = #{startTime}, + end_time = #{endTime}, + is_active = #{isActive}, + created_at = #{createdAt}, + updated_at = #{updatedAt}, + created_by = #{createdBy}, + updated_by = #{updatedBy}, + + where id = #{id} + + + + delete from schedule_rules where id = #{id} + + + + delete from schedule_rules where id in + + #{id} + + + \ No newline at end of file diff --git a/ALOps_sys_backend/lib/mina-core-2.2.3.jar b/ALOps_sys_backend/lib/mina-core-2.2.3.jar new file mode 100644 index 00000000..1b1e3f10 Binary files /dev/null and b/ALOps_sys_backend/lib/mina-core-2.2.3.jar differ diff --git a/ALOps_sys_backend/pom.xml b/ALOps_sys_backend/pom.xml index 32d4acc0..83d33dc9 100644 --- a/ALOps_sys_backend/pom.xml +++ b/ALOps_sys_backend/pom.xml @@ -41,6 +41,25 @@ + + org.snmp4j + snmp4j + 3.9.6 + + + + org.slf4j + slf4j-api + + + + + org.apache.mina + mina-core + 2.2.3 + + + org.springframework @@ -254,6 +273,7 @@ true +