rocketmq,收益管理,资源管理模块代码
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.system.config;
|
||||
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
/**
|
||||
* 自动生成数据表
|
||||
*/
|
||||
@Configuration
|
||||
@EnableScheduling
|
||||
public class TableScheduleConfig {
|
||||
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
|
||||
// 每月25号创建下月表
|
||||
@Scheduled(cron = "0 0 0 25 * ?")
|
||||
// @Scheduled(initialDelay = 5000, fixedDelay = Long.MAX_VALUE)
|
||||
public void createNextMonthTables() {
|
||||
epsInitialTrafficDataService.createNextMonthTables();
|
||||
}
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.EpsBusiness;
|
||||
import com.ruoyi.system.service.IEpsBusinessService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 业务信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/business")
|
||||
public class EpsBusinessController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsBusinessService epsBusinessService;
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:business:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsBusiness.getPageNum());
|
||||
pageDomain.setPageSize(epsBusiness.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsBusiness> list = epsBusinessService.selectEpsBusinessList(epsBusiness);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:business:list")
|
||||
@PostMapping("/getAllBusinessMsg")
|
||||
public AjaxResult getAllBusinessMsg(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
List<EpsBusiness> list = epsBusinessService.selectEpsBusinessList(epsBusiness);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出业务信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:business:export")
|
||||
@Log(title = "业务信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsBusiness epsBusiness)
|
||||
{
|
||||
List<EpsBusiness> list = epsBusinessService.selectEpsBusinessList(epsBusiness);
|
||||
ExcelUtil<EpsBusiness> util = new ExcelUtil<EpsBusiness>(EpsBusiness.class);
|
||||
util.showColumn(epsBusiness.getProperties());
|
||||
util.exportExcel(response, list, "业务信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:business:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(epsBusinessService.selectEpsBusinessById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务信息
|
||||
*/
|
||||
@RequiresPermissions("system:business:add")
|
||||
@Log(title = "业务信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
int rows = epsBusinessService.insertEpsBusiness(epsBusiness);
|
||||
if(-1==rows){
|
||||
return AjaxResult.error(500,"业务名称不可重复");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务信息
|
||||
*/
|
||||
@RequiresPermissions("system:business:edit")
|
||||
@Log(title = "业务信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
int rows = epsBusinessService.updateEpsBusiness(epsBusiness);
|
||||
if(-1==rows){
|
||||
return AjaxResult.error(500,"业务名称不可重复");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成12位唯一标识
|
||||
*/
|
||||
@RequiresPermissions("system:business:list")
|
||||
@GetMapping("/getBusinessCode")
|
||||
public String getBusinessCode()
|
||||
{
|
||||
long timestamp = System.currentTimeMillis() / 100; // 取前10位(精确到0.1秒)
|
||||
int random = new Random().nextInt(100); // 2位随机数(00~99)
|
||||
return String.format("%010d%02d", timestamp, random);
|
||||
}
|
||||
/**
|
||||
* 验证业务名称是否存在
|
||||
* @param epsBusiness
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("system:business:list")
|
||||
@PostMapping("/countByBusinessName")
|
||||
public AjaxResult countByBusinessName(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
int rows = epsBusinessService.countByBusinessName(epsBusiness);
|
||||
if(rows>0){
|
||||
return AjaxResult.error(500,"业务名称不可重复");
|
||||
}else {
|
||||
return AjaxResult.success("添加成功");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* EPS初始流量数据控制器
|
||||
* 提供流量数据的REST接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/eps-traffic-data")
|
||||
@RequiredArgsConstructor
|
||||
public class EpsInitialTrafficDataController {
|
||||
|
||||
private final EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
|
||||
/**
|
||||
* 保存单条流量数据
|
||||
* @param data 流量数据实体
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseEntity<Void> save(@RequestBody EpsInitialTrafficData data) {
|
||||
epsInitialTrafficDataService.save(data);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存流量数据
|
||||
* @param dataList 流量数据表
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/batch")
|
||||
public ResponseEntity<Void> saveBatch(@RequestBody EpsInitialTrafficData dataList) {
|
||||
epsInitialTrafficDataService.saveBatch(dataList);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
/**
|
||||
* 查询流量数据(POST方式)
|
||||
* @param queryParam 查询参数实体
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
@PostMapping("/query")
|
||||
public ResponseEntity<List<EpsInitialTrafficData>> query(@RequestBody EpsInitialTrafficData queryParam) {
|
||||
List<EpsInitialTrafficData> result = epsInitialTrafficDataService.query(queryParam);
|
||||
return ResponseEntity.ok(result);
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
import com.ruoyi.system.service.IEpsMethodChangeRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/record")
|
||||
public class EpsMethodChangeRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsMethodChangeRecordService epsMethodChangeRecordService;
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录列表
|
||||
*/
|
||||
@RequiresPermissions("system:record:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsMethodChangeRecord.getPageNum());
|
||||
pageDomain.setPageSize(epsMethodChangeRecord.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsMethodChangeRecord> list = epsMethodChangeRecordService.selectEpsMethodChangeRecordList(epsMethodChangeRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出收益方式修改记录列表
|
||||
*/
|
||||
@RequiresPermissions("system:record:export")
|
||||
@Log(title = "收益方式修改记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
List<EpsMethodChangeRecord> list = epsMethodChangeRecordService.selectEpsMethodChangeRecordList(epsMethodChangeRecord);
|
||||
ExcelUtil<EpsMethodChangeRecord> util = new ExcelUtil<EpsMethodChangeRecord>(EpsMethodChangeRecord.class);
|
||||
util.showColumn(epsMethodChangeRecord.getProperties());
|
||||
util.exportExcel(response, list, "收益方式修改记录数据");
|
||||
}
|
||||
|
||||
}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
import com.ruoyi.system.service.IEpsNodeBandwidthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 节点带宽信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bandwidth")
|
||||
public class EpsNodeBandwidthController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsNodeBandwidthService epsNodeBandwidthService;
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsNodeBandwidth.getPageNum());
|
||||
pageDomain.setPageSize(epsNodeBandwidth.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsNodeBandwidth> list = epsNodeBandwidthService.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出节点带宽信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:export")
|
||||
@Log(title = "节点带宽信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
List<EpsNodeBandwidth> list = epsNodeBandwidthService.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
ExcelUtil<EpsNodeBandwidth> util = new ExcelUtil<EpsNodeBandwidth>(EpsNodeBandwidth.class);
|
||||
util.showColumn(epsNodeBandwidth.getProperties());
|
||||
util.exportExcel(response, list, "节点带宽信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取节点带宽信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsNodeBandwidthService.selectEpsNodeBandwidthById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增节点带宽信息
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:add")
|
||||
@Log(title = "节点带宽信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
return toAjax(epsNodeBandwidthService.insertEpsNodeBandwidth(epsNodeBandwidth));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改节点带宽信息
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:edit")
|
||||
@Log(title = "节点带宽信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
return toAjax(epsNodeBandwidthService.updateEpsNodeBandwidth(epsNodeBandwidth));
|
||||
}
|
||||
/**
|
||||
* 重新计算
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "recalculate/{id}")
|
||||
public AjaxResult recalculate(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsNodeBandwidthService.selectEpsNodeBandwidthById(id));//TODO 待逻辑处理
|
||||
}
|
||||
|
||||
/**
|
||||
* 相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "relatedData/{id}")
|
||||
public AjaxResult relatedData(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsNodeBandwidthService.relatedData(id));
|
||||
}
|
||||
/**
|
||||
* 相关数据-月均日95值
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "getAvgDetailMsg/{id}")
|
||||
public AjaxResult getAvgDetailMsg(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsNodeBandwidthService.getAvgDetailMsg(id));
|
||||
}
|
||||
/**
|
||||
* 生成月均日95值
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:add")
|
||||
@Log(title = "节点带宽信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/calculateAvg")
|
||||
public AjaxResult calculateAvg(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
return toAjax(epsNodeBandwidthService.insertEpsNodeBandwidth(epsNodeBandwidth));
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import com.ruoyi.system.service.IEpsServerRevenueConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/revenueConfig")
|
||||
public class EpsServerRevenueConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsServerRevenueConfigService epsServerRevenueConfigService;
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置列表
|
||||
*/
|
||||
@RequiresPermissions("system:config:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsServerRevenueConfig.getPageNum());
|
||||
pageDomain.setPageSize(epsServerRevenueConfig.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsServerRevenueConfig> list = epsServerRevenueConfigService.selectEpsServerRevenueConfigList(epsServerRevenueConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出服务器收益方式配置列表
|
||||
*/
|
||||
@RequiresPermissions("system:config:export")
|
||||
@Log(title = "服务器收益方式配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
List<EpsServerRevenueConfig> list = epsServerRevenueConfigService.selectEpsServerRevenueConfigList(epsServerRevenueConfig);
|
||||
ExcelUtil<EpsServerRevenueConfig> util = new ExcelUtil<EpsServerRevenueConfig>(EpsServerRevenueConfig.class);
|
||||
util.showColumn(epsServerRevenueConfig.getProperties());
|
||||
util.exportExcel(response, list, "服务器收益方式配置数据");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改服务器收益方式配置
|
||||
*/
|
||||
@RequiresPermissions("system:config:edit")
|
||||
@Log(title = "服务器收益方式配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
return toAjax(epsServerRevenueConfigService.updateEpsServerRevenueConfig(epsServerRevenueConfig));
|
||||
}
|
||||
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.EpsTrafficData;
|
||||
import com.ruoyi.system.service.IEpsTrafficDataService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 流量相关数据Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data")
|
||||
public class EpsTrafficDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsTrafficDataService epsTrafficDataService;
|
||||
|
||||
/**
|
||||
* 查询流量相关数据列表
|
||||
*/
|
||||
@RequiresPermissions("system:data:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EpsTrafficData epsTrafficData)
|
||||
{
|
||||
startPage();
|
||||
List<EpsTrafficData> list = epsTrafficDataService.selectEpsTrafficDataList(epsTrafficData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出流量相关数据列表
|
||||
*/
|
||||
@RequiresPermissions("system:data:export")
|
||||
@Log(title = "流量相关数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsTrafficData epsTrafficData)
|
||||
{
|
||||
List<EpsTrafficData> list = epsTrafficDataService.selectEpsTrafficDataList(epsTrafficData);
|
||||
ExcelUtil<EpsTrafficData> util = new ExcelUtil<EpsTrafficData>(EpsTrafficData.class);
|
||||
util.exportExcel(response, list, "流量相关数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流量相关数据详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:data:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsTrafficDataService.selectEpsTrafficDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流量相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:data:add")
|
||||
@Log(title = "流量相关数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EpsTrafficData epsTrafficData)
|
||||
{
|
||||
return toAjax(epsTrafficDataService.insertEpsTrafficData(epsTrafficData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流量相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:data:edit")
|
||||
@Log(title = "流量相关数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsTrafficData epsTrafficData)
|
||||
{
|
||||
return toAjax(epsTrafficDataService.updateEpsTrafficData(epsTrafficData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流量相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:data:remove")
|
||||
@Log(title = "流量相关数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(epsTrafficDataService.deleteEpsTrafficDataByIds(ids));
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.KnowledgeBase;
|
||||
import com.ruoyi.system.service.IKnowledgeBaseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 知识库Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/knowledgebase")
|
||||
public class KnowledgeBaseController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IKnowledgeBaseService knowledgeBaseService;
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody KnowledgeBase knowledgeBase)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(knowledgeBase.getPageNum());
|
||||
pageDomain.setPageSize(knowledgeBase.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<KnowledgeBase> list = knowledgeBaseService.selectKnowledgeBaseList(knowledgeBase);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出知识库列表
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:export")
|
||||
@Log(title = "知识库", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, KnowledgeBase knowledgeBase)
|
||||
{
|
||||
List<KnowledgeBase> list = knowledgeBaseService.selectKnowledgeBaseList(knowledgeBase);
|
||||
ExcelUtil<KnowledgeBase> util = new ExcelUtil<KnowledgeBase>(KnowledgeBase.class);
|
||||
util.exportExcel(response, list, "知识库数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取知识库详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(knowledgeBaseService.selectKnowledgeBaseById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:add")
|
||||
@Log(title = "知识库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody KnowledgeBase knowledgeBase)
|
||||
{
|
||||
return toAjax(knowledgeBaseService.insertKnowledgeBase(knowledgeBase));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改知识库
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:edit")
|
||||
@Log(title = "知识库", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody KnowledgeBase knowledgeBase)
|
||||
{
|
||||
return toAjax(knowledgeBaseService.updateKnowledgeBase(knowledgeBase));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除知识库
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:remove")
|
||||
@Log(title = "知识库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(knowledgeBaseService.deleteKnowledgeBaseByIds(ids));
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.MtmMonitoringTemplate;
|
||||
import com.ruoyi.system.service.IMtmMonitoringTemplateService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 监控模板管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/template")
|
||||
public class MtmMonitoringTemplateController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMtmMonitoringTemplateService mtmMonitoringTemplateService;
|
||||
|
||||
/**
|
||||
* 查询监控模板管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:template:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
startPage();
|
||||
List<MtmMonitoringTemplate> list = mtmMonitoringTemplateService.selectMtmMonitoringTemplateList(mtmMonitoringTemplate);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出监控模板管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:template:export")
|
||||
@Log(title = "监控模板管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
List<MtmMonitoringTemplate> list = mtmMonitoringTemplateService.selectMtmMonitoringTemplateList(mtmMonitoringTemplate);
|
||||
ExcelUtil<MtmMonitoringTemplate> util = new ExcelUtil<MtmMonitoringTemplate>(MtmMonitoringTemplate.class);
|
||||
util.exportExcel(response, list, "监控模板管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控模板管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:template:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(mtmMonitoringTemplateService.selectMtmMonitoringTemplateById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控模板管理
|
||||
*/
|
||||
@RequiresPermissions("system:template:add")
|
||||
@Log(title = "监控模板管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
return toAjax(mtmMonitoringTemplateService.insertMtmMonitoringTemplate(mtmMonitoringTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控模板管理
|
||||
*/
|
||||
@RequiresPermissions("system:template:edit")
|
||||
@Log(title = "监控模板管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
return toAjax(mtmMonitoringTemplateService.updateMtmMonitoringTemplate(mtmMonitoringTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控模板管理
|
||||
*/
|
||||
@RequiresPermissions("system:template:remove")
|
||||
@Log(title = "监控模板管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(mtmMonitoringTemplateService.deleteMtmMonitoringTemplateByIds(ids));
|
||||
}
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.service.IRmEpsTopologyManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拓扑管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/management")
|
||||
public class RmEpsTopologyManagementController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmEpsTopologyManagementService rmEpsTopologyManagementService;
|
||||
|
||||
/**
|
||||
* 查询交换机/服务器名称
|
||||
*/
|
||||
@RequiresPermissions("system:management:list")
|
||||
@PostMapping ("/getNamesByResoureType")
|
||||
public List<RmEpsTopologyManagement> getNamesByResoureType(@RequestBody RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
List<RmEpsTopologyManagement> list = rmEpsTopologyManagementService.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 查询拓扑管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:management:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmEpsTopologyManagement.getPageNum());
|
||||
pageDomain.setPageSize(rmEpsTopologyManagement.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmEpsTopologyManagement> list = rmEpsTopologyManagementService.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出拓扑管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:management:export")
|
||||
@Log(title = "拓扑管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
List<RmEpsTopologyManagement> list = rmEpsTopologyManagementService.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
ExcelUtil<RmEpsTopologyManagement> util = new ExcelUtil<RmEpsTopologyManagement>(RmEpsTopologyManagement.class);
|
||||
util.showColumn(rmEpsTopologyManagement.getProperties());
|
||||
util.exportExcel(response, list, "拓扑管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取拓扑管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:management:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmEpsTopologyManagementService.selectRmEpsTopologyManagementById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增拓扑管理
|
||||
*/
|
||||
@RequiresPermissions("system:management:add")
|
||||
@Log(title = "拓扑管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
return toAjax(rmEpsTopologyManagementService.insertRmEpsTopologyManagement(rmEpsTopologyManagement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改拓扑管理
|
||||
*/
|
||||
@RequiresPermissions("system:management:edit")
|
||||
@Log(title = "拓扑管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
return toAjax(rmEpsTopologyManagementService.updateRmEpsTopologyManagement(rmEpsTopologyManagement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除拓扑管理
|
||||
*/
|
||||
@RequiresPermissions("system:management:remove")
|
||||
@Log(title = "拓扑管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmEpsTopologyManagementService.deleteRmEpsTopologyManagementByIds(ids));
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.RmResourceGroup;
|
||||
import com.ruoyi.system.service.IRmResourceGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资源分组Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/group")
|
||||
public class RmResourceGroupController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmResourceGroupService rmResourceGroupService;
|
||||
|
||||
/**
|
||||
* 查询资源分组列表
|
||||
*/
|
||||
@RequiresPermissions("system:group:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmResourceGroup.getPageNum());
|
||||
pageDomain.setPageSize(rmResourceGroup.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmResourceGroup> list = rmResourceGroupService.selectRmResourceGroupList(rmResourceGroup);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资源分组列表
|
||||
*/
|
||||
@RequiresPermissions("system:group:export")
|
||||
@Log(title = "资源分组", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
List<RmResourceGroup> list = rmResourceGroupService.selectRmResourceGroupList(rmResourceGroup);
|
||||
ExcelUtil<RmResourceGroup> util = new ExcelUtil<RmResourceGroup>(RmResourceGroup.class);
|
||||
util.showColumn(rmResourceGroup.getProperties());
|
||||
util.exportExcel(response, list, "资源分组数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资源分组详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:group:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmResourceGroupService.selectRmResourceGroupById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资源分组
|
||||
*/
|
||||
@RequiresPermissions("system:group:add")
|
||||
@Log(title = "资源分组", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
return toAjax(rmResourceGroupService.insertRmResourceGroup(rmResourceGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资源分组
|
||||
*/
|
||||
@RequiresPermissions("system:group:edit")
|
||||
@Log(title = "资源分组", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
return toAjax(rmResourceGroupService.updateRmResourceGroup(rmResourceGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资源分组
|
||||
*/
|
||||
@RequiresPermissions("system:group:remove")
|
||||
@Log(title = "资源分组", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmResourceGroupService.deleteRmResourceGroupByIds(ids));
|
||||
}
|
||||
}
|
||||
+61
-25
@@ -1,25 +1,21 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
import com.ruoyi.system.service.IRmResourceRegistrationService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源注册Controller
|
||||
@@ -38,10 +34,13 @@ public class RmResourceRegistrationController extends BaseController
|
||||
* 查询资源注册列表
|
||||
*/
|
||||
@RequiresPermissions("system:registration:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmResourceRegistration rmResourceRegistration)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmResourceRegistration.getPageNum());
|
||||
pageDomain.setPageSize(rmResourceRegistration.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmResourceRegistration> list = rmResourceRegistrationService.selectRmResourceRegistrationList(rmResourceRegistration);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@@ -55,7 +54,16 @@ public class RmResourceRegistrationController extends BaseController
|
||||
public void export(HttpServletResponse response, RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
List<RmResourceRegistration> list = rmResourceRegistrationService.selectRmResourceRegistrationList(rmResourceRegistration);
|
||||
for (RmResourceRegistration resourceRegistration : list) {
|
||||
// 根据端口类型导出端口名称
|
||||
if("1".equals(resourceRegistration.getResourcePort())){
|
||||
resourceRegistration.setResourcePort("162(SNMP)");
|
||||
}else{
|
||||
resourceRegistration.setResourcePort(resourceRegistration.getOtherPortName());
|
||||
}
|
||||
}
|
||||
ExcelUtil<RmResourceRegistration> util = new ExcelUtil<RmResourceRegistration>(RmResourceRegistration.class);
|
||||
util.showColumn(rmResourceRegistration.getProperties());
|
||||
util.exportExcel(response, list, "资源注册数据");
|
||||
}
|
||||
|
||||
@@ -77,7 +85,11 @@ public class RmResourceRegistrationController extends BaseController
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
return toAjax(rmResourceRegistrationService.insertRmResourceRegistration(rmResourceRegistration));
|
||||
int rows = rmResourceRegistrationService.insertRmResourceRegistration(rmResourceRegistration);
|
||||
if(-1==rows){
|
||||
return AjaxResult.error(500,"硬件SN不可重复");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,13 +104,37 @@ public class RmResourceRegistrationController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资源注册
|
||||
* 资源注册-注册
|
||||
*/
|
||||
@RequiresPermissions("system:registration:remove")
|
||||
@Log(title = "资源注册", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
@RequiresPermissions("system:registration:edit")
|
||||
@Log(title = "资源注册-注册", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/register")
|
||||
public AjaxResult register(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
return toAjax(rmResourceRegistrationService.deleteRmResourceRegistrationByIds(ids));
|
||||
return toAjax(rmResourceRegistrationService.register(rmResourceRegistration));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有资源名称(包含设备使用)
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
@RequiresPermissions("system:group:list")
|
||||
@GetMapping("/selectAllResourceName")
|
||||
public List<Map> selectAllResourceName()
|
||||
{
|
||||
List<Map> list = rmResourceRegistrationService.selectAllResourceName();
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 查询所有资源名称
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
@RequiresPermissions("system:group:list")
|
||||
@PostMapping("/selectAllResourceNameByType")
|
||||
public List<Map> selectAllResourceNameByType(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
List<Map> list = rmResourceRegistrationService.selectAllResourceNameByType(rmResourceRegistration);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 业务信息对象 eps_business
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public class EpsBusiness extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 业务代码(12位唯一标识) */
|
||||
private String id;
|
||||
|
||||
/** 业务名称 */
|
||||
@Excel(name = "业务名称")
|
||||
private String businessName;
|
||||
|
||||
/** 业务描述 */
|
||||
private String description;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName)
|
||||
{
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessName()
|
||||
{
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("businessName", getBusinessName())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("description", getDescription())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* EPS初始流量数据实体类
|
||||
* 用于存储设备的接收和发送流量数据
|
||||
* 支持按时间自动分表存储(每月分成3个表)
|
||||
*/
|
||||
@Data
|
||||
public class EpsInitialTrafficData {
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 动态表名
|
||||
* 格式:eps_traffic_[年]_[月]_[日期范围]
|
||||
* 示例:eps_traffic_2023_08_1_10
|
||||
*/
|
||||
private String tableName;
|
||||
|
||||
/** 流量统计开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/** 流量统计结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/** 接收流量(单位:MB) */
|
||||
private Double receiveTraffic;
|
||||
|
||||
/** 发送流量(单位:MB) */
|
||||
private Double sendTraffic;
|
||||
|
||||
/** 设备序列号 */
|
||||
private String deviceSn;
|
||||
/** 流量端口 */
|
||||
private String trafficPort;
|
||||
/** 业务代码 */
|
||||
private String businesId;
|
||||
|
||||
/** 数据创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/** 备用字段1 */
|
||||
private String remark1;
|
||||
|
||||
/** 备用字段2 */
|
||||
private String remark2;
|
||||
|
||||
/** 备用字段3 */
|
||||
private String remark3;
|
||||
|
||||
/** 备用字段4 */
|
||||
private String remark4;
|
||||
/** 批量插入集合 **/
|
||||
private List<EpsInitialTrafficData> dataList;
|
||||
|
||||
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录对象 eps_method_change_record
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public class EpsMethodChangeRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录ID */
|
||||
private Long id;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 修改内容 */
|
||||
@Excel(name = "修改内容")
|
||||
private String changeContent;
|
||||
|
||||
/** 硬件SN */
|
||||
@Excel(name = "硬件SN")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "修改人")
|
||||
private String creatBy;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName)
|
||||
{
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeName()
|
||||
{
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setChangeContent(String changeContent)
|
||||
{
|
||||
this.changeContent = changeContent;
|
||||
}
|
||||
|
||||
public String getChangeContent()
|
||||
{
|
||||
return changeContent;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setCreatBy(String creatBy)
|
||||
{
|
||||
this.creatBy = creatBy;
|
||||
}
|
||||
|
||||
public String getCreatBy()
|
||||
{
|
||||
return creatBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("nodeName", getNodeName())
|
||||
.append("changeContent", getChangeContent())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatBy", getCreatBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+405
@@ -0,0 +1,405 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 节点带宽信息对象 eps_node_bandwidth
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class EpsNodeBandwidth extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 硬件SN */
|
||||
@Excel(name = "硬件SN")
|
||||
private String hardwareSn;
|
||||
/** 带宽值类型
|
||||
* 1-95带宽值Mbps/日
|
||||
* 2-95带宽值Mbps/月
|
||||
* 3-包端带宽值Mbps/日
|
||||
* 4-月均日95值Mbps
|
||||
* 5-有效-95带宽值Mbps/日
|
||||
* 6-有效-95带宽值Mbps/月
|
||||
* 7-有效-月均日95值
|
||||
* */
|
||||
private String bandwidthType;
|
||||
|
||||
/** 带宽值结果 */
|
||||
private BigDecimal bandwidthResult;
|
||||
|
||||
/** 95带宽值Mbps/日 */
|
||||
@Excel(name = "95带宽值Mbps/日")
|
||||
private BigDecimal bandwidth95Daily;
|
||||
|
||||
/** 95带宽值Mbps/月 */
|
||||
@Excel(name = "95带宽值Mbps/月")
|
||||
private BigDecimal bandwidth95Monthly;
|
||||
|
||||
/** 月均日95值 */
|
||||
@Excel(name = "月均日95值")
|
||||
private BigDecimal avgMonthlyBandwidth95;
|
||||
|
||||
/** 包端带宽值Mbps/日 */
|
||||
@Excel(name = "包端带宽值Mbps/日")
|
||||
private BigDecimal packageBandwidthDaily;
|
||||
|
||||
/** 有效-95带宽值Mbps/日 */
|
||||
@Excel(name = "有效-95带宽值Mbps/日")
|
||||
private BigDecimal effectiveBandwidth95Daily;
|
||||
|
||||
/** 有效-95带宽值Mbps/月 */
|
||||
@Excel(name = "有效-95带宽值Mbps/月")
|
||||
private BigDecimal effectiveBandwidth95Monthly;
|
||||
|
||||
/** 有效-月均95值 */
|
||||
@Excel(name = "有效-月均95值")
|
||||
private BigDecimal effectiveAvgMonthlyBandwidth95;
|
||||
|
||||
/** 设备业务客户id */
|
||||
@Excel(name = "设备业务客户id")
|
||||
private String customerId;
|
||||
|
||||
/** 设备业务客户名称 */
|
||||
@Excel(name = "设备业务客户名称")
|
||||
private String customerName;
|
||||
|
||||
/** 业务号 */
|
||||
@Excel(name = "业务号")
|
||||
private String serviceNumber;
|
||||
|
||||
/** 上联交换机 */
|
||||
@Excel(name = "上联交换机")
|
||||
private String uplinkSwitch;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
@Excel(name = "创建人名称")
|
||||
private String creatorName;
|
||||
|
||||
/** remark1 */
|
||||
@Excel(name = "remark1")
|
||||
private String remark1;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String interfaceName;
|
||||
|
||||
/** 资源类型(1服务器,2交换机) */
|
||||
@Excel(name = "资源类型")
|
||||
private String resourceType;
|
||||
|
||||
/** 接口连接设备类型(1服务器,2机房出口) */
|
||||
@Excel(name = "接口连接设备类型")
|
||||
private String interfaceLinkDeviceType;
|
||||
/** 业务名称 */
|
||||
@Excel(name = "业务名称")
|
||||
private String businessName;
|
||||
|
||||
/** 业务代码 */
|
||||
@Excel(name = "业务代码")
|
||||
private String businessId;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
/** 月份 */
|
||||
@JsonFormat(pattern = "yyyy-MM")
|
||||
private LocalDate monthTime;
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public LocalDate getMonthTime() {
|
||||
return monthTime;
|
||||
}
|
||||
|
||||
public void setMonthTime(LocalDate monthTime) {
|
||||
this.monthTime = monthTime;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getResourceType() {
|
||||
return resourceType;
|
||||
}
|
||||
|
||||
public void setResourceType(String resourceType) {
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getInterfaceLinkDeviceType() {
|
||||
return interfaceLinkDeviceType;
|
||||
}
|
||||
|
||||
public void setInterfaceLinkDeviceType(String interfaceLinkDeviceType) {
|
||||
this.interfaceLinkDeviceType = interfaceLinkDeviceType;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName)
|
||||
{
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeName()
|
||||
{
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setBandwidth95Daily(BigDecimal bandwidth95Daily)
|
||||
{
|
||||
this.bandwidth95Daily = bandwidth95Daily;
|
||||
}
|
||||
|
||||
public BigDecimal getBandwidth95Daily()
|
||||
{
|
||||
return bandwidth95Daily;
|
||||
}
|
||||
|
||||
public void setBandwidth95Monthly(BigDecimal bandwidth95Monthly)
|
||||
{
|
||||
this.bandwidth95Monthly = bandwidth95Monthly;
|
||||
}
|
||||
|
||||
public BigDecimal getBandwidth95Monthly()
|
||||
{
|
||||
return bandwidth95Monthly;
|
||||
}
|
||||
|
||||
public void setPackageBandwidthDaily(BigDecimal packageBandwidthDaily)
|
||||
{
|
||||
this.packageBandwidthDaily = packageBandwidthDaily;
|
||||
}
|
||||
|
||||
public BigDecimal getPackageBandwidthDaily()
|
||||
{
|
||||
return packageBandwidthDaily;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName)
|
||||
{
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public String getCustomerName()
|
||||
{
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setServiceNumber(String serviceNumber)
|
||||
{
|
||||
this.serviceNumber = serviceNumber;
|
||||
}
|
||||
|
||||
public String getServiceNumber()
|
||||
{
|
||||
return serviceNumber;
|
||||
}
|
||||
|
||||
public void setUplinkSwitch(String uplinkSwitch)
|
||||
{
|
||||
this.uplinkSwitch = uplinkSwitch;
|
||||
}
|
||||
|
||||
public String getUplinkSwitch()
|
||||
{
|
||||
return uplinkSwitch;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setRemark1(String remark1)
|
||||
{
|
||||
this.remark1 = remark1;
|
||||
}
|
||||
|
||||
public String getRemark1()
|
||||
{
|
||||
return remark1;
|
||||
}
|
||||
|
||||
public String getInterfaceName() {
|
||||
return interfaceName;
|
||||
}
|
||||
|
||||
public void setInterfaceName(String interfaceName) {
|
||||
this.interfaceName = interfaceName;
|
||||
}
|
||||
|
||||
public String getBandwidthType() {
|
||||
return bandwidthType;
|
||||
}
|
||||
|
||||
public void setBandwidthType(String bandwidthType) {
|
||||
this.bandwidthType = bandwidthType;
|
||||
}
|
||||
|
||||
public BigDecimal getBandwidthResult() {
|
||||
return bandwidthResult;
|
||||
}
|
||||
|
||||
public void setBandwidthResult(BigDecimal bandwidthResult) {
|
||||
this.bandwidthResult = bandwidthResult;
|
||||
}
|
||||
|
||||
public BigDecimal getAvgMonthlyBandwidth95() {
|
||||
return avgMonthlyBandwidth95;
|
||||
}
|
||||
|
||||
public void setAvgMonthlyBandwidth95(BigDecimal avgMonthlyBandwidth95) {
|
||||
this.avgMonthlyBandwidth95 = avgMonthlyBandwidth95;
|
||||
}
|
||||
|
||||
public BigDecimal getEffectiveBandwidth95Daily() {
|
||||
return effectiveBandwidth95Daily;
|
||||
}
|
||||
|
||||
public void setEffectiveBandwidth95Daily(BigDecimal effectiveBandwidth95Daily) {
|
||||
this.effectiveBandwidth95Daily = effectiveBandwidth95Daily;
|
||||
}
|
||||
|
||||
public BigDecimal getEffectiveBandwidth95Monthly() {
|
||||
return effectiveBandwidth95Monthly;
|
||||
}
|
||||
|
||||
public void setEffectiveBandwidth95Monthly(BigDecimal effectiveBandwidth95Monthly) {
|
||||
this.effectiveBandwidth95Monthly = effectiveBandwidth95Monthly;
|
||||
}
|
||||
|
||||
public BigDecimal getEffectiveAvgMonthlyBandwidth95() {
|
||||
return effectiveAvgMonthlyBandwidth95;
|
||||
}
|
||||
|
||||
public void setEffectiveAvgMonthlyBandwidth95(BigDecimal effectiveAvgMonthlyBandwidth95) {
|
||||
this.effectiveAvgMonthlyBandwidth95 = effectiveAvgMonthlyBandwidth95;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("nodeName", getNodeName())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("bandwidth95Daily", getBandwidth95Daily())
|
||||
.append("bandwidth95Monthly", getBandwidth95Monthly())
|
||||
.append("packageBandwidthDaily", getPackageBandwidthDaily())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("customerName", getCustomerName())
|
||||
.append("serviceNumber", getServiceNumber())
|
||||
.append("uplinkSwitch", getUplinkSwitch())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("remark1", getRemark1())
|
||||
.append("interfaceName", getInterfaceName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置对象 eps_server_revenue_config
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public class EpsServerRevenueConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 唯一标识ID */
|
||||
private Long id;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 收益方式(1.流量,2包端) */
|
||||
@Excel(name = "收益方式(1.流量,2包端)")
|
||||
private String revenueMethod;
|
||||
|
||||
/** 硬件SN */
|
||||
@Excel(name = "硬件SN")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 流量网口 */
|
||||
@Excel(name = "流量网口")
|
||||
private String trafficPort;
|
||||
|
||||
/** 95带宽值(Mbps) */
|
||||
@Excel(name = "95带宽值(Mbps)")
|
||||
private BigDecimal bandwidth95;
|
||||
|
||||
/** 包端带宽值 */
|
||||
@Excel(name = "包端带宽值")
|
||||
private BigDecimal packageBandwidth;
|
||||
|
||||
/** 业务名称 */
|
||||
@Excel(name = "业务名称")
|
||||
private String businessName;
|
||||
|
||||
/** 业务代码(12位) */
|
||||
@Excel(name = "业务代码(12位)")
|
||||
private String businessCode;
|
||||
|
||||
/** 注册状态 */
|
||||
@Excel(name = "注册状态")
|
||||
private String registrationStatus;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName)
|
||||
{
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeName()
|
||||
{
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setRevenueMethod(String revenueMethod)
|
||||
{
|
||||
this.revenueMethod = revenueMethod;
|
||||
}
|
||||
|
||||
public String getRevenueMethod()
|
||||
{
|
||||
return revenueMethod;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setTrafficPort(String trafficPort)
|
||||
{
|
||||
this.trafficPort = trafficPort;
|
||||
}
|
||||
|
||||
public String getTrafficPort()
|
||||
{
|
||||
return trafficPort;
|
||||
}
|
||||
|
||||
public void setBandwidth95(BigDecimal bandwidth95)
|
||||
{
|
||||
this.bandwidth95 = bandwidth95;
|
||||
}
|
||||
|
||||
public BigDecimal getBandwidth95()
|
||||
{
|
||||
return bandwidth95;
|
||||
}
|
||||
|
||||
public void setPackageBandwidth(BigDecimal packageBandwidth)
|
||||
{
|
||||
this.packageBandwidth = packageBandwidth;
|
||||
}
|
||||
|
||||
public BigDecimal getPackageBandwidth()
|
||||
{
|
||||
return packageBandwidth;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName)
|
||||
{
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessName()
|
||||
{
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessCode(String businessCode)
|
||||
{
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
|
||||
public String getBusinessCode()
|
||||
{
|
||||
return businessCode;
|
||||
}
|
||||
|
||||
public void setRegistrationStatus(String registrationStatus)
|
||||
{
|
||||
this.registrationStatus = registrationStatus;
|
||||
}
|
||||
|
||||
public String getRegistrationStatus()
|
||||
{
|
||||
return registrationStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("nodeName", getNodeName())
|
||||
.append("revenueMethod", getRevenueMethod())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("trafficPort", getTrafficPort())
|
||||
.append("bandwidth95", getBandwidth95())
|
||||
.append("packageBandwidth", getPackageBandwidth())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("businessName", getBusinessName())
|
||||
.append("businessCode", getBusinessCode())
|
||||
.append("registrationStatus", getRegistrationStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 流量相关数据对象 eps_traffic_data
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class EpsTrafficData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 硬件SN */
|
||||
@Excel(name = "硬件SN")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 收益方式 */
|
||||
@Excel(name = "收益方式")
|
||||
private String revenueMethod;
|
||||
|
||||
/** 流量端口 */
|
||||
@Excel(name = "流量端口")
|
||||
private String trafficPort;
|
||||
|
||||
/** 发送流量值(bytes) */
|
||||
@Excel(name = "发送流量值", readConverterExp = "b=ytes")
|
||||
private Long txBytes;
|
||||
|
||||
/** 接收流量值(bytes) */
|
||||
@Excel(name = "接收流量值", readConverterExp = "b=ytes")
|
||||
private Long rxBytes;
|
||||
|
||||
/** 包端带宽值(Mbps) */
|
||||
@Excel(name = "包端带宽值", readConverterExp = "M=bps")
|
||||
private BigDecimal packageBandwidth;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
@Excel(name = "创建人名称")
|
||||
private String creatorName;
|
||||
|
||||
/** 修改人id */
|
||||
@Excel(name = "修改人id")
|
||||
private Long updaterId;
|
||||
|
||||
/** 修改人名称 */
|
||||
@Excel(name = "修改人名称")
|
||||
private String updaterName;
|
||||
/** 业务名称 */
|
||||
private String businessName;
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName)
|
||||
{
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeName()
|
||||
{
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setRevenueMethod(String revenueMethod)
|
||||
{
|
||||
this.revenueMethod = revenueMethod;
|
||||
}
|
||||
|
||||
public String getRevenueMethod()
|
||||
{
|
||||
return revenueMethod;
|
||||
}
|
||||
|
||||
public void setTrafficPort(String trafficPort)
|
||||
{
|
||||
this.trafficPort = trafficPort;
|
||||
}
|
||||
|
||||
public String getTrafficPort()
|
||||
{
|
||||
return trafficPort;
|
||||
}
|
||||
|
||||
public void setTxBytes(Long txBytes)
|
||||
{
|
||||
this.txBytes = txBytes;
|
||||
}
|
||||
|
||||
public Long getTxBytes()
|
||||
{
|
||||
return txBytes;
|
||||
}
|
||||
|
||||
public void setRxBytes(Long rxBytes)
|
||||
{
|
||||
this.rxBytes = rxBytes;
|
||||
}
|
||||
|
||||
public Long getRxBytes()
|
||||
{
|
||||
return rxBytes;
|
||||
}
|
||||
|
||||
public void setPackageBandwidth(BigDecimal packageBandwidth)
|
||||
{
|
||||
this.packageBandwidth = packageBandwidth;
|
||||
}
|
||||
|
||||
public BigDecimal getPackageBandwidth()
|
||||
{
|
||||
return packageBandwidth;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
|
||||
public void setUpdaterName(String updaterName)
|
||||
{
|
||||
this.updaterName = updaterName;
|
||||
}
|
||||
|
||||
public String getUpdaterName()
|
||||
{
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("nodeName", getNodeName())
|
||||
.append("revenueMethod", getRevenueMethod())
|
||||
.append("trafficPort", getTrafficPort())
|
||||
.append("txBytes", getTxBytes())
|
||||
.append("rxBytes", getRxBytes())
|
||||
.append("packageBandwidth", getPackageBandwidth())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("updaterName", getUpdaterName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 知识库对象 knowledge_base
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public class KnowledgeBase extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 标题 */
|
||||
@Excel(name = "标题")
|
||||
private String title;
|
||||
|
||||
/** 问题类型 */
|
||||
@Excel(name = "问题类型")
|
||||
private String issueType;
|
||||
|
||||
/** 解决方案 */
|
||||
@Excel(name = "解决方案")
|
||||
private String solution;
|
||||
|
||||
/** 创建人 */
|
||||
private String creatBy;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setIssueType(String issueType)
|
||||
{
|
||||
this.issueType = issueType;
|
||||
}
|
||||
|
||||
public String getIssueType()
|
||||
{
|
||||
return issueType;
|
||||
}
|
||||
|
||||
public void setSolution(String solution)
|
||||
{
|
||||
this.solution = solution;
|
||||
}
|
||||
|
||||
public String getSolution()
|
||||
{
|
||||
return solution;
|
||||
}
|
||||
|
||||
public void setCreatBy(String creatBy)
|
||||
{
|
||||
this.creatBy = creatBy;
|
||||
}
|
||||
|
||||
public String getCreatBy()
|
||||
{
|
||||
return creatBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("title", getTitle())
|
||||
.append("issueType", getIssueType())
|
||||
.append("solution", getSolution())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatBy", getCreatBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 监控模板管理对象 mtm_monitoring_template
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class MtmMonitoringTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 模板名称 */
|
||||
@Excel(name = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 项类型 */
|
||||
@Excel(name = "项类型")
|
||||
private String itemType;
|
||||
|
||||
/** 包含资源 */
|
||||
@Excel(name = "包含资源")
|
||||
private String includedResources;
|
||||
|
||||
/** 发现项类型 */
|
||||
@Excel(name = "发现项类型")
|
||||
private String discoveryItemType;
|
||||
|
||||
/** 项名 */
|
||||
@Excel(name = "项名")
|
||||
private String itemName;
|
||||
|
||||
/** 项描述 */
|
||||
@Excel(name = "项描述")
|
||||
private String itemDescription;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
@Excel(name = "创建人名称")
|
||||
private String creatorName;
|
||||
|
||||
/** 修改人id */
|
||||
@Excel(name = "修改人id")
|
||||
private Long updaterId;
|
||||
|
||||
/** 修改人名称 */
|
||||
@Excel(name = "修改人名称")
|
||||
private String updaterName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTemplateName(String templateName)
|
||||
{
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
public String getTemplateName()
|
||||
{
|
||||
return templateName;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setItemType(String itemType)
|
||||
{
|
||||
this.itemType = itemType;
|
||||
}
|
||||
|
||||
public String getItemType()
|
||||
{
|
||||
return itemType;
|
||||
}
|
||||
|
||||
public void setIncludedResources(String includedResources)
|
||||
{
|
||||
this.includedResources = includedResources;
|
||||
}
|
||||
|
||||
public String getIncludedResources()
|
||||
{
|
||||
return includedResources;
|
||||
}
|
||||
|
||||
public void setDiscoveryItemType(String discoveryItemType)
|
||||
{
|
||||
this.discoveryItemType = discoveryItemType;
|
||||
}
|
||||
|
||||
public String getDiscoveryItemType()
|
||||
{
|
||||
return discoveryItemType;
|
||||
}
|
||||
|
||||
public void setItemName(String itemName)
|
||||
{
|
||||
this.itemName = itemName;
|
||||
}
|
||||
|
||||
public String getItemName()
|
||||
{
|
||||
return itemName;
|
||||
}
|
||||
|
||||
public void setItemDescription(String itemDescription)
|
||||
{
|
||||
this.itemDescription = itemDescription;
|
||||
}
|
||||
|
||||
public String getItemDescription()
|
||||
{
|
||||
return itemDescription;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
|
||||
public void setUpdaterName(String updaterName)
|
||||
{
|
||||
this.updaterName = updaterName;
|
||||
}
|
||||
|
||||
public String getUpdaterName()
|
||||
{
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("templateName", getTemplateName())
|
||||
.append("description", getDescription())
|
||||
.append("itemType", getItemType())
|
||||
.append("includedResources", getIncludedResources())
|
||||
.append("discoveryItemType", getDiscoveryItemType())
|
||||
.append("itemName", getItemName())
|
||||
.append("itemDescription", getItemDescription())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("updaterName", getUpdaterName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 拓扑管理对象 rm_eps_topology_management
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class RmEpsTopologyManagement extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 交换机名称 */
|
||||
@Excel(name = "交换机名称")
|
||||
private String switchName;
|
||||
|
||||
/** 交换机硬件SN */
|
||||
@Excel(name = "交换机硬件SN")
|
||||
private String switchSn;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String interfaceName;
|
||||
|
||||
/** 接口连接设备类型 */
|
||||
@Excel(name = "接口连接设备类型",readConverterExp = "1=服务器,2=机房出口")
|
||||
private String connectedDeviceType;
|
||||
|
||||
/** 服务器名称 */
|
||||
@Excel(name = "服务器名称")
|
||||
private String serverName;
|
||||
|
||||
/** 服务器硬件SN */
|
||||
@Excel(name = "服务器硬件SN")
|
||||
private String serverSn;
|
||||
|
||||
/** 服务器网口 */
|
||||
@Excel(name = "服务器网口")
|
||||
private String serverPort;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 修改时间 */
|
||||
@Excel(name = "修改时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
/** 创建人id */
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
private String creatorName;
|
||||
|
||||
/** 修改人id */
|
||||
private Long updaterId;
|
||||
|
||||
/** 修改人名称 */
|
||||
private String updaterName;
|
||||
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSwitchName(String switchName)
|
||||
{
|
||||
this.switchName = switchName;
|
||||
}
|
||||
|
||||
public String getSwitchName()
|
||||
{
|
||||
return switchName;
|
||||
}
|
||||
|
||||
public void setSwitchSn(String switchSn)
|
||||
{
|
||||
this.switchSn = switchSn;
|
||||
}
|
||||
|
||||
public String getSwitchSn()
|
||||
{
|
||||
return switchSn;
|
||||
}
|
||||
|
||||
public void setInterfaceName(String interfaceName)
|
||||
{
|
||||
this.interfaceName = interfaceName;
|
||||
}
|
||||
|
||||
public String getInterfaceName()
|
||||
{
|
||||
return interfaceName;
|
||||
}
|
||||
|
||||
public void setConnectedDeviceType(String connectedDeviceType)
|
||||
{
|
||||
this.connectedDeviceType = connectedDeviceType;
|
||||
}
|
||||
|
||||
public String getConnectedDeviceType()
|
||||
{
|
||||
return connectedDeviceType;
|
||||
}
|
||||
|
||||
public void setServerName(String serverName)
|
||||
{
|
||||
this.serverName = serverName;
|
||||
}
|
||||
|
||||
public String getServerName()
|
||||
{
|
||||
return serverName;
|
||||
}
|
||||
|
||||
public void setServerSn(String serverSn)
|
||||
{
|
||||
this.serverSn = serverSn;
|
||||
}
|
||||
|
||||
public String getServerSn()
|
||||
{
|
||||
return serverSn;
|
||||
}
|
||||
|
||||
public void setServerPort(String serverPort)
|
||||
{
|
||||
this.serverPort = serverPort;
|
||||
}
|
||||
|
||||
public String getServerPort()
|
||||
{
|
||||
return serverPort;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
|
||||
public void setUpdaterName(String updaterName)
|
||||
{
|
||||
this.updaterName = updaterName;
|
||||
}
|
||||
|
||||
public String getUpdaterName()
|
||||
{
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("switchName", getSwitchName())
|
||||
.append("switchSn", getSwitchSn())
|
||||
.append("interfaceName", getInterfaceName())
|
||||
.append("connectedDeviceType", getConnectedDeviceType())
|
||||
.append("serverName", getServerName())
|
||||
.append("serverSn", getServerSn())
|
||||
.append("serverPort", getServerPort())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("updaterName", getUpdaterName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 资源分组对象 rm_resource_group
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class RmResourceGroup extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 组名 */
|
||||
@Excel(name = "组名")
|
||||
private String groupName;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 包含设备 */
|
||||
@Excel(name = "包含设备")
|
||||
private String includedDevices;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 修改时间 */
|
||||
@Excel(name = "修改时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/** 创建人id */
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
private String creatorName;
|
||||
|
||||
/** 修改人id */
|
||||
private Long updaterId;
|
||||
|
||||
/** 修改人名称 */
|
||||
private String updaterName;
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName)
|
||||
{
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getGroupName()
|
||||
{
|
||||
return groupName;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setIncludedDevices(String includedDevices)
|
||||
{
|
||||
this.includedDevices = includedDevices;
|
||||
}
|
||||
|
||||
public String getIncludedDevices()
|
||||
{
|
||||
return includedDevices;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
|
||||
public void setUpdaterName(String updaterName)
|
||||
{
|
||||
this.updaterName = updaterName;
|
||||
}
|
||||
|
||||
public String getUpdaterName()
|
||||
{
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("groupName", getGroupName())
|
||||
.append("description", getDescription())
|
||||
.append("includedDevices", getIncludedDevices())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("updaterName", getUpdaterName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+34
-12
@@ -24,7 +24,7 @@ public class RmResourceRegistration extends BaseEntity
|
||||
|
||||
/** 资源类型
|
||||
* 1 服务器,2 交换机*/
|
||||
@Excel(name = "资源类型")
|
||||
@Excel(name = "资源类型",readConverterExp = "1=服务器,2=交换机")
|
||||
private String resourceType;
|
||||
|
||||
/** 资源名称 */
|
||||
@@ -39,38 +39,44 @@ public class RmResourceRegistration extends BaseEntity
|
||||
@Excel(name = "端口")
|
||||
private String resourcePort;
|
||||
|
||||
/**其他端口名称 */
|
||||
private String otherPortName;
|
||||
|
||||
|
||||
/** 协议 1.TCP,2.UDP */
|
||||
@Excel(name = "协议")
|
||||
@Excel(name = "协议",readConverterExp = "1=TCP,2=UDP")
|
||||
private String protocol;
|
||||
|
||||
|
||||
/** 版本(1.SNMPv2,2.SNMPv3) */
|
||||
@Excel(name = "版本")
|
||||
@Excel(name = "版本",readConverterExp = "1=SNMPv2,2=SNMPv3")
|
||||
private String resourceVersion;
|
||||
|
||||
/** 读写权限(1.RW,2.ReadOnly) */
|
||||
@Excel(name = "读写权限")
|
||||
@Excel(name = "读写权限",readConverterExp = "1=RW,2=ReadOnly")
|
||||
private String rwPermission;
|
||||
|
||||
/** 安全级别(1.authPriv、2.authNoPriv,3.noAuthNoPriv) */
|
||||
@Excel(name = "安全级别")
|
||||
@Excel(name = "安全级别",readConverterExp = "1=authPriv,2=authNoPriv,3=noAuthNoPriv")
|
||||
private String securityLevel;
|
||||
|
||||
/** 加密方式 1.md5,2.SHA */
|
||||
@Excel(name = "加密方式")
|
||||
@Excel(name = "加密方式",readConverterExp = "1=MD5,2=SHA")
|
||||
private String encryption;
|
||||
|
||||
/** 密码 */
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String resourceUserName;
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String resourcePwd;
|
||||
|
||||
/** 注册状态 0-未注册,1-未注册 */
|
||||
@Excel(name = "注册状态")
|
||||
/** 注册状态 0-未注册,1-已注册 */
|
||||
@Excel(name = "注册状态",readConverterExp = "0=未注册,1=已注册")
|
||||
private String registrationStatus;
|
||||
|
||||
/** 在线状态 0-离线,1-在线 */
|
||||
@Excel(name = "在线状态")
|
||||
@Excel(name = "在线状态",readConverterExp = "0=离线,1=在线")
|
||||
private String onlineStatus;
|
||||
|
||||
/** 描述 */
|
||||
@@ -100,7 +106,15 @@ public class RmResourceRegistration extends BaseEntity
|
||||
/** 修改人名称 */
|
||||
private String updaterName;
|
||||
|
||||
public void setId(Long id)
|
||||
public String getOtherPortName() {
|
||||
return otherPortName;
|
||||
}
|
||||
|
||||
public void setOtherPortName(String otherPortName) {
|
||||
this.otherPortName = otherPortName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
@@ -320,9 +334,15 @@ public class RmResourceRegistration extends BaseEntity
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
public String getResourceUserName() {
|
||||
return resourceUserName;
|
||||
}
|
||||
|
||||
public void setResourceUserName(String resourceUserName) {
|
||||
this.resourceUserName = resourceUserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
@@ -331,12 +351,14 @@ public class RmResourceRegistration extends BaseEntity
|
||||
.append("resourceName", getResourceName())
|
||||
.append("ipAddress", getIpAddress())
|
||||
.append("resourcePort", getResourcePort())
|
||||
.append("otherPortName", getOtherPortName())
|
||||
.append("protocol", getProtocol())
|
||||
.append("resourceVersion", getResourceVersion())
|
||||
.append("rwPermission", getRwPermission())
|
||||
.append("securityLevel", getSecurityLevel())
|
||||
.append("encryption", getEncryption())
|
||||
.append("resourcePwd", getResourcePwd())
|
||||
.append("resourceUserName", getResourceName())
|
||||
.append("registrationStatus", getRegistrationStatus())
|
||||
.append("onlineStatus", getOnlineStatus())
|
||||
.append("description", getDescription())
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.EpsBusiness;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface EpsBusinessMapper
|
||||
{
|
||||
/**
|
||||
* 查询业务信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 业务信息
|
||||
*/
|
||||
public EpsBusiness selectEpsBusinessById(String id);
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 业务信息集合
|
||||
*/
|
||||
public List<EpsBusiness> selectEpsBusinessList(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 新增业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsBusiness(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 修改业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsBusiness(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 删除业务信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除业务信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 验证业务名称是否存在
|
||||
* @param epsBusiness
|
||||
* @return
|
||||
*/
|
||||
Integer countByBusinessName(EpsBusiness epsBusiness);
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EpsInitialTrafficDataMapper {
|
||||
/**
|
||||
* 创建指定名称的EPS流量表
|
||||
* @param tableName 表名
|
||||
*/
|
||||
void createEpsTrafficTable(@Param("tableName") String tableName);
|
||||
/**
|
||||
* 创建指定名称的EPS流量初始表
|
||||
* @param tableName 表名
|
||||
*/
|
||||
void createEpsInitialTrafficTable(@Param("tableName") String tableName);
|
||||
/**
|
||||
* 单条插入数据
|
||||
* @param data 流量数据
|
||||
*/
|
||||
void insert(EpsInitialTrafficData data);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
* @param epsInitialTrafficData 流量数据实体类
|
||||
*/
|
||||
void batchInsert(EpsInitialTrafficData epsInitialTrafficData);
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
* @param condition 查询条件实体
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
List<EpsInitialTrafficData> selectByCondition(EpsInitialTrafficData condition);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public interface EpsMethodChangeRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询收益方式修改记录
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 收益方式修改记录
|
||||
*/
|
||||
public EpsMethodChangeRecord selectEpsMethodChangeRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录列表
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 收益方式修改记录集合
|
||||
*/
|
||||
public List<EpsMethodChangeRecord> selectEpsMethodChangeRecordList(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 新增收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 修改收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 删除收益方式修改记录
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsMethodChangeRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除收益方式修改记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsMethodChangeRecordByIds(Long[] ids);
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 节点带宽信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface EpsNodeBandwidthMapper
|
||||
{
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public EpsNodeBandwidth selectEpsNodeBandwidthById(Long id);
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息列表
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息集合
|
||||
*/
|
||||
public List<EpsNodeBandwidth> selectEpsNodeBandwidthList(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 新增节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 修改节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 删除节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsNodeBandwidthById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除节点带宽信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsNodeBandwidthByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 计算月均日95值
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public EpsNodeBandwidth calculateAvg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
/**
|
||||
* 月均日95值-相关数据
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public List<EpsNodeBandwidth> getAvgDetailMsg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
/**
|
||||
* 查询月均日95值是否存在
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public int countByAvgMsg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public interface EpsServerRevenueConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询服务器收益方式配置
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
public EpsServerRevenueConfig selectEpsServerRevenueConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置列表
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 服务器收益方式配置集合
|
||||
*/
|
||||
public List<EpsServerRevenueConfig> selectEpsServerRevenueConfigList(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 新增服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 修改服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 删除服务器收益方式配置
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsServerRevenueConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除服务器收益方式配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsServerRevenueConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询该数据是否存在
|
||||
*
|
||||
* @param hardwareSn 服务器sn
|
||||
* @return 数据条数
|
||||
*/
|
||||
public int countBySn(@Param("hardwareSn") String hardwareSn);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsTrafficData;
|
||||
|
||||
/**
|
||||
* 流量相关数据Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface EpsTrafficDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询流量相关数据
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 流量相关数据
|
||||
*/
|
||||
public EpsTrafficData selectEpsTrafficDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询流量相关数据列表
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 流量相关数据集合
|
||||
*/
|
||||
public List<EpsTrafficData> selectEpsTrafficDataList(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 新增流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsTrafficData(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 修改流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsTrafficData(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 删除流量相关数据
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsTrafficDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除流量相关数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsTrafficDataByIds(Long[] ids);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.KnowledgeBase;
|
||||
|
||||
/**
|
||||
* 知识库Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public interface KnowledgeBaseMapper
|
||||
{
|
||||
/**
|
||||
* 查询知识库
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 知识库
|
||||
*/
|
||||
public KnowledgeBase selectKnowledgeBaseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 知识库集合
|
||||
*/
|
||||
public List<KnowledgeBase> selectKnowledgeBaseList(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertKnowledgeBase(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 修改知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateKnowledgeBase(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 删除知识库
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKnowledgeBaseById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除知识库
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKnowledgeBaseByIds(Long[] ids);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.MtmMonitoringTemplate;
|
||||
|
||||
/**
|
||||
* 监控模板管理Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface MtmMonitoringTemplateMapper
|
||||
{
|
||||
/**
|
||||
* 查询监控模板管理
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 监控模板管理
|
||||
*/
|
||||
public MtmMonitoringTemplate selectMtmMonitoringTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询监控模板管理列表
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 监控模板管理集合
|
||||
*/
|
||||
public List<MtmMonitoringTemplate> selectMtmMonitoringTemplateList(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 新增监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 修改监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 删除监控模板管理
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMtmMonitoringTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除监控模板管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMtmMonitoringTemplateByIds(Long[] ids);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
|
||||
/**
|
||||
* 拓扑管理Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface RmEpsTopologyManagementMapper
|
||||
{
|
||||
/**
|
||||
* 查询拓扑管理
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 拓扑管理
|
||||
*/
|
||||
public RmEpsTopologyManagement selectRmEpsTopologyManagementById(Long id);
|
||||
|
||||
/**
|
||||
* 查询拓扑管理列表
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 拓扑管理集合
|
||||
*/
|
||||
public List<RmEpsTopologyManagement> selectRmEpsTopologyManagementList(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 新增拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 修改拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 删除拓扑管理
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除拓扑管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementByIds(Long[] ids);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmResourceGroup;
|
||||
|
||||
/**
|
||||
* 资源分组Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface RmResourceGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询资源分组
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 资源分组
|
||||
*/
|
||||
public RmResourceGroup selectRmResourceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资源分组列表
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 资源分组集合
|
||||
*/
|
||||
public List<RmResourceGroup> selectRmResourceGroupList(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 新增资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmResourceGroup(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 修改资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmResourceGroup(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 删除资源分组
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除资源分组
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceGroupByIds(Long[] ids);
|
||||
}
|
||||
+20
-1
@@ -1,8 +1,10 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源注册Mapper接口
|
||||
*
|
||||
@@ -58,4 +60,21 @@ public interface RmResourceRegistrationMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceRegistrationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询所有资源名称([包含设备]功能使用)
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
public List<Map> selectAllResourceName();
|
||||
/**
|
||||
* 查询是否有此设备
|
||||
* @param hardwareSn 资源sn
|
||||
* @return 结果
|
||||
*/
|
||||
public int countBySn(String hardwareSn);
|
||||
/**
|
||||
* 查询所有资源名称
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
public List<Map> selectAllResourceNameByType(RmResourceRegistration resourceRegistration);
|
||||
}
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* EPS表创建服务接口
|
||||
* 定义定时创建分表的契约
|
||||
*/
|
||||
public interface EpsInitialTrafficDataService {
|
||||
|
||||
/**
|
||||
* 创建下个月的三张分表
|
||||
* 每月25日0点自动执行
|
||||
*/
|
||||
void createNextMonthTables();
|
||||
/**
|
||||
* 保存单条流量数据
|
||||
* @param data 流量数据
|
||||
*/
|
||||
void save(EpsInitialTrafficData data);
|
||||
|
||||
/**
|
||||
* 批量保存流量数据
|
||||
* @param dataList 流量数据列表
|
||||
*/
|
||||
void saveBatch(EpsInitialTrafficData dataList);
|
||||
|
||||
/**
|
||||
* 查询流量数据
|
||||
* @param queryParam 查询参数实体
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
List<EpsInitialTrafficData> query(EpsInitialTrafficData queryParam);
|
||||
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsBusiness;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface IEpsBusinessService
|
||||
{
|
||||
/**
|
||||
* 查询业务信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 业务信息
|
||||
*/
|
||||
public EpsBusiness selectEpsBusinessById(String id);
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 业务信息集合
|
||||
*/
|
||||
public List<EpsBusiness> selectEpsBusinessList(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 新增业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsBusiness(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 修改业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsBusiness(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 批量删除业务信息
|
||||
*
|
||||
* @param ids 需要删除的业务信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除业务信息信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessById(String id);
|
||||
|
||||
/**
|
||||
* 验证 业务名称是否存在
|
||||
* @param epsBusiness
|
||||
* @return
|
||||
*/
|
||||
Integer countByBusinessName(EpsBusiness epsBusiness);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public interface IEpsMethodChangeRecordService
|
||||
{
|
||||
/**
|
||||
* 查询收益方式修改记录
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 收益方式修改记录
|
||||
*/
|
||||
public EpsMethodChangeRecord selectEpsMethodChangeRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录列表
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 收益方式修改记录集合
|
||||
*/
|
||||
public List<EpsMethodChangeRecord> selectEpsMethodChangeRecordList(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 新增收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 修改收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 批量删除收益方式修改记录
|
||||
*
|
||||
* @param ids 需要删除的收益方式修改记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsMethodChangeRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除收益方式修改记录信息
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsMethodChangeRecordById(Long id);
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 节点带宽信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IEpsNodeBandwidthService
|
||||
{
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public EpsNodeBandwidth selectEpsNodeBandwidthById(Long id);
|
||||
|
||||
/**
|
||||
* 相关数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public List<EpsInitialTrafficData> relatedData(Long id);
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息列表
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息集合
|
||||
*/
|
||||
public List<EpsNodeBandwidth> selectEpsNodeBandwidthList(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 新增节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 修改节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 批量删除节点带宽信息
|
||||
*
|
||||
* @param ids 需要删除的节点带宽信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsNodeBandwidthByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除节点带宽信息信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsNodeBandwidthById(Long id);
|
||||
|
||||
/**
|
||||
* 计算月均日95值
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int calculateAvg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
List<EpsNodeBandwidth> getAvgDetailMsg(Long id);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public interface IEpsServerRevenueConfigService
|
||||
{
|
||||
/**
|
||||
* 查询服务器收益方式配置
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
public EpsServerRevenueConfig selectEpsServerRevenueConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置列表
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 服务器收益方式配置集合
|
||||
*/
|
||||
public List<EpsServerRevenueConfig> selectEpsServerRevenueConfigList(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 新增服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 修改服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 批量删除服务器收益方式配置
|
||||
*
|
||||
* @param ids 需要删除的服务器收益方式配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsServerRevenueConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除服务器收益方式配置信息
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsServerRevenueConfigById(Long id);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsTrafficData;
|
||||
|
||||
/**
|
||||
* 流量相关数据Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IEpsTrafficDataService
|
||||
{
|
||||
/**
|
||||
* 查询流量相关数据
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 流量相关数据
|
||||
*/
|
||||
public EpsTrafficData selectEpsTrafficDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询流量相关数据列表
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 流量相关数据集合
|
||||
*/
|
||||
public List<EpsTrafficData> selectEpsTrafficDataList(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 新增流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsTrafficData(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 修改流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsTrafficData(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 批量删除流量相关数据
|
||||
*
|
||||
* @param ids 需要删除的流量相关数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsTrafficDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除流量相关数据信息
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsTrafficDataById(Long id);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.KnowledgeBase;
|
||||
|
||||
/**
|
||||
* 知识库Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public interface IKnowledgeBaseService
|
||||
{
|
||||
/**
|
||||
* 查询知识库
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 知识库
|
||||
*/
|
||||
public KnowledgeBase selectKnowledgeBaseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 知识库集合
|
||||
*/
|
||||
public List<KnowledgeBase> selectKnowledgeBaseList(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertKnowledgeBase(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 修改知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateKnowledgeBase(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 批量删除知识库
|
||||
*
|
||||
* @param ids 需要删除的知识库主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKnowledgeBaseByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除知识库信息
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKnowledgeBaseById(Long id);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.MtmMonitoringTemplate;
|
||||
|
||||
/**
|
||||
* 监控模板管理Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IMtmMonitoringTemplateService
|
||||
{
|
||||
/**
|
||||
* 查询监控模板管理
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 监控模板管理
|
||||
*/
|
||||
public MtmMonitoringTemplate selectMtmMonitoringTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询监控模板管理列表
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 监控模板管理集合
|
||||
*/
|
||||
public List<MtmMonitoringTemplate> selectMtmMonitoringTemplateList(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 新增监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 修改监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 批量删除监控模板管理
|
||||
*
|
||||
* @param ids 需要删除的监控模板管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMtmMonitoringTemplateByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除监控模板管理信息
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMtmMonitoringTemplateById(Long id);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
|
||||
/**
|
||||
* 拓扑管理Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IRmEpsTopologyManagementService
|
||||
{
|
||||
/**
|
||||
* 查询拓扑管理
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 拓扑管理
|
||||
*/
|
||||
public RmEpsTopologyManagement selectRmEpsTopologyManagementById(Long id);
|
||||
|
||||
/**
|
||||
* 查询拓扑管理列表
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 拓扑管理集合
|
||||
*/
|
||||
public List<RmEpsTopologyManagement> selectRmEpsTopologyManagementList(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 新增拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 修改拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 批量删除拓扑管理
|
||||
*
|
||||
* @param ids 需要删除的拓扑管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除拓扑管理信息
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementById(Long id);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmResourceGroup;
|
||||
|
||||
/**
|
||||
* 资源分组Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IRmResourceGroupService
|
||||
{
|
||||
/**
|
||||
* 查询资源分组
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 资源分组
|
||||
*/
|
||||
public RmResourceGroup selectRmResourceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资源分组列表
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 资源分组集合
|
||||
*/
|
||||
public List<RmResourceGroup> selectRmResourceGroupList(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 新增资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmResourceGroup(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 修改资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmResourceGroup(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 批量删除资源分组
|
||||
*
|
||||
* @param ids 需要删除的资源分组主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceGroupByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除资源分组信息
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceGroupById(Long id);
|
||||
}
|
||||
+22
-1
@@ -1,8 +1,10 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源注册Service接口
|
||||
*
|
||||
@@ -43,6 +45,13 @@ public interface IRmResourceRegistrationService
|
||||
*/
|
||||
public int updateRmResourceRegistration(RmResourceRegistration rmResourceRegistration);
|
||||
|
||||
/**
|
||||
* 资源注册-注册
|
||||
* @param rmResourceRegistration
|
||||
* @return
|
||||
*/
|
||||
public int register(RmResourceRegistration rmResourceRegistration);
|
||||
|
||||
/**
|
||||
* 批量删除资源注册
|
||||
*
|
||||
@@ -58,4 +67,16 @@ public interface IRmResourceRegistrationService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceRegistrationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询所有资源名称(包含设备使用)
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
public List<Map> selectAllResourceName();
|
||||
/**
|
||||
* 查询所有资源名称
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
public List<Map> selectAllResourceNameByType(RmResourceRegistration resourceRegistration);
|
||||
|
||||
}
|
||||
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.EpsBusiness;
|
||||
import com.ruoyi.system.mapper.EpsBusinessMapper;
|
||||
import com.ruoyi.system.service.IEpsBusinessService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Service
|
||||
public class EpsBusinessServiceImpl implements IEpsBusinessService
|
||||
{
|
||||
@Autowired
|
||||
private EpsBusinessMapper epsBusinessMapper;
|
||||
|
||||
/**
|
||||
* 查询业务信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 业务信息
|
||||
*/
|
||||
@Override
|
||||
public EpsBusiness selectEpsBusinessById(String id)
|
||||
{
|
||||
return epsBusinessMapper.selectEpsBusinessById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 业务信息
|
||||
*/
|
||||
@Override
|
||||
public List<EpsBusiness> selectEpsBusinessList(EpsBusiness epsBusiness)
|
||||
{
|
||||
return epsBusinessMapper.selectEpsBusinessList(epsBusiness);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsBusiness(EpsBusiness epsBusiness)
|
||||
{
|
||||
epsBusiness.setCreateTime(DateUtils.getNowDate());
|
||||
// 查询业务名称是否存在
|
||||
Integer exits = epsBusinessMapper.countByBusinessName(epsBusiness);
|
||||
if(exits>0){
|
||||
return -1;
|
||||
}
|
||||
return epsBusinessMapper.insertEpsBusiness(epsBusiness);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsBusiness(EpsBusiness epsBusiness)
|
||||
{
|
||||
epsBusiness.setUpdateTime(DateUtils.getNowDate());
|
||||
// 查询业务名称是否存在
|
||||
Integer exits = epsBusinessMapper.countByBusinessName(epsBusiness);
|
||||
if(exits>0){
|
||||
return -1;
|
||||
}
|
||||
return epsBusinessMapper.updateEpsBusiness(epsBusiness);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务信息
|
||||
*
|
||||
* @param ids 需要删除的业务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsBusinessByIds(String[] ids)
|
||||
{
|
||||
return epsBusinessMapper.deleteEpsBusinessByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务信息信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsBusinessById(String id)
|
||||
{
|
||||
return epsBusinessMapper.deleteEpsBusinessById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证业务名称是否存在
|
||||
* @param epsBusiness
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Integer countByBusinessName(EpsBusiness epsBusiness) {
|
||||
// 查询业务名称是否存在
|
||||
Integer rows = epsBusinessMapper.countByBusinessName(epsBusiness);
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.mapper.EpsInitialTrafficDataMapper;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.util.TableRouterUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataMapper epsInitialTrafficDataMapper;
|
||||
@Override
|
||||
public void createNextMonthTables() {
|
||||
LocalDate nextMonth = LocalDate.now().plusMonths(1);
|
||||
// LocalDate nextMonth = LocalDate.now();
|
||||
int year = nextMonth.getYear();
|
||||
int month = nextMonth.getMonthValue();
|
||||
|
||||
// 创建流量详情表
|
||||
createTrafficDetailsTable(year, month);
|
||||
// 创建流量初始表
|
||||
createTrafficStatsTable(year, month);
|
||||
}
|
||||
|
||||
private void createTrafficDetailsTable(int year, int month) {
|
||||
createRangeTables(year, month, "eps_traffic_details", (tableName) -> {
|
||||
epsInitialTrafficDataMapper.createEpsTrafficTable(tableName);
|
||||
});
|
||||
}
|
||||
|
||||
private void createTrafficStatsTable(int year, int month) {
|
||||
createRangeTables(year, month, "initial_bandwidth_traffic", (tableName) -> {
|
||||
epsInitialTrafficDataMapper.createEpsInitialTrafficTable(tableName);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通用创建表方法
|
||||
* @param year 年份
|
||||
* @param month 月份
|
||||
* @param tablePrefix 表前缀
|
||||
* @param creator 表创建函数
|
||||
*/
|
||||
private void createRangeTables(int year, int month, String tablePrefix, Consumer<String> creator) {
|
||||
String[] ranges = {"1_10", "11_20", "21_31"};
|
||||
|
||||
for (String range : ranges) {
|
||||
String tableName = String.format("%s_%d_%02d_%s", tablePrefix, year, month, range);
|
||||
try {
|
||||
creator.accept(tableName);
|
||||
log.info("成功创建表: {}", tableName);
|
||||
} catch (Exception e) {
|
||||
log.error("创建表失败: {}", tableName, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 保存单条数据到对应分表
|
||||
* @param data 流量数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(EpsInitialTrafficData data) {
|
||||
if (data.getCreateTime() == null) {
|
||||
data.setCreateTime(LocalDateTime.now());
|
||||
}
|
||||
data.setTableName(TableRouterUtil.getTableName(data.getCreateTime()));
|
||||
epsInitialTrafficDataMapper.insert(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存数据到对应分表
|
||||
* @param epsInitialTrafficData 流量数据表
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveBatch(EpsInitialTrafficData epsInitialTrafficData) {
|
||||
if (epsInitialTrafficData == null) {
|
||||
return;
|
||||
}
|
||||
List<EpsInitialTrafficData> dataList = epsInitialTrafficData.getDataList();
|
||||
if (dataList.isEmpty()){
|
||||
return;
|
||||
}
|
||||
// 按表名分组批量插入
|
||||
Map<String, List<EpsInitialTrafficData>> groupedData = dataList.stream()
|
||||
.map(data -> {
|
||||
try {
|
||||
EpsInitialTrafficData processed = new EpsInitialTrafficData();
|
||||
BeanUtils.copyProperties(data,processed);
|
||||
if (data.getCreateTime() == null) {
|
||||
data.setCreateTime(LocalDateTime.now());
|
||||
}
|
||||
processed.setTableName(TableRouterUtil.getTableName(data.getCreateTime()));
|
||||
return processed;
|
||||
} catch (Exception e){
|
||||
log.error("数据处理失败",e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}).collect(Collectors.groupingBy(
|
||||
EpsInitialTrafficData::getTableName,
|
||||
LinkedHashMap::new, // 保持插入顺序
|
||||
Collectors.toList()));
|
||||
|
||||
groupedData.forEach((tableName, list) -> {
|
||||
try {
|
||||
EpsInitialTrafficData data = new EpsInitialTrafficData();
|
||||
BeanUtils.copyProperties(epsInitialTrafficData,data);
|
||||
data.setTableName(tableName);
|
||||
data.setDataList(list);
|
||||
epsInitialTrafficDataMapper.batchInsert(data);
|
||||
} catch (Exception e) {
|
||||
log.error("表{}插入失败", tableName, e);
|
||||
throw new RuntimeException("批量插入失败", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询流量数据
|
||||
*/
|
||||
@Override
|
||||
public List<EpsInitialTrafficData> query(EpsInitialTrafficData queryParam) {
|
||||
// 参数校验
|
||||
// if (StringUtils.isBlank(queryParam.getDeviceSn())) {
|
||||
// throw new IllegalArgumentException("设备序列号不能为空");
|
||||
// }
|
||||
|
||||
// 获取涉及的表名
|
||||
Set<String> tableNames = TableRouterUtil.getTableNamesBetween(queryParam.getStartTime(), queryParam.getEndTime());
|
||||
|
||||
// 并行查询各表
|
||||
return tableNames.parallelStream()
|
||||
.flatMap(tableName -> {
|
||||
EpsInitialTrafficData condition = new EpsInitialTrafficData();
|
||||
condition.setTableName(tableName);
|
||||
condition.setDeviceSn(queryParam.getDeviceSn());
|
||||
condition.setStartTime(queryParam.getStartTime());
|
||||
condition.setEndTime(queryParam.getEndTime());
|
||||
condition.setReceiveTraffic(queryParam.getReceiveTraffic());
|
||||
condition.setSendTraffic(queryParam.getSendTraffic());
|
||||
return epsInitialTrafficDataMapper.selectByCondition(condition).stream();
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.EpsMethodChangeRecordMapper;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
import com.ruoyi.system.service.IEpsMethodChangeRecordService;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
@Service
|
||||
public class EpsMethodChangeRecordServiceImpl implements IEpsMethodChangeRecordService
|
||||
{
|
||||
@Autowired
|
||||
private EpsMethodChangeRecordMapper epsMethodChangeRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 收益方式修改记录
|
||||
*/
|
||||
@Override
|
||||
public EpsMethodChangeRecord selectEpsMethodChangeRecordById(Long id)
|
||||
{
|
||||
return epsMethodChangeRecordMapper.selectEpsMethodChangeRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录列表
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 收益方式修改记录
|
||||
*/
|
||||
@Override
|
||||
public List<EpsMethodChangeRecord> selectEpsMethodChangeRecordList(EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
return epsMethodChangeRecordMapper.selectEpsMethodChangeRecordList(epsMethodChangeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
epsMethodChangeRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return epsMethodChangeRecordMapper.insertEpsMethodChangeRecord(epsMethodChangeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
epsMethodChangeRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
return epsMethodChangeRecordMapper.updateEpsMethodChangeRecord(epsMethodChangeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除收益方式修改记录
|
||||
*
|
||||
* @param ids 需要删除的收益方式修改记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsMethodChangeRecordByIds(Long[] ids)
|
||||
{
|
||||
return epsMethodChangeRecordMapper.deleteEpsMethodChangeRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收益方式修改记录信息
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsMethodChangeRecordById(Long id)
|
||||
{
|
||||
return epsMethodChangeRecordMapper.deleteEpsMethodChangeRecordById(id);
|
||||
}
|
||||
}
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
import com.ruoyi.system.mapper.EpsNodeBandwidthMapper;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.service.IEpsNodeBandwidthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.webjars.NotFoundException;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 节点带宽信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
{
|
||||
@Autowired
|
||||
private EpsNodeBandwidthMapper epsNodeBandwidthMapper;
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
@Override
|
||||
public EpsNodeBandwidth selectEpsNodeBandwidthById(Long id)
|
||||
{
|
||||
return epsNodeBandwidthMapper.selectEpsNodeBandwidthById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
@Override
|
||||
public List<EpsInitialTrafficData> relatedData(Long id)
|
||||
{
|
||||
// 1. 根据ID查询服务器信息
|
||||
EpsNodeBandwidth epsNodeBandwidth = epsNodeBandwidthMapper.selectEpsNodeBandwidthById(id);
|
||||
if (epsNodeBandwidth == null) {
|
||||
throw new NotFoundException("未找到ID为" + id + "的服务器信息");
|
||||
}
|
||||
|
||||
// 2. 设置查询条件
|
||||
EpsInitialTrafficData queryParams = new EpsInitialTrafficData();
|
||||
queryParams.setDeviceSn(epsNodeBandwidth.getHardwareSn());
|
||||
|
||||
// 3. 根据带宽类型设置时间范围
|
||||
LocalDateTime createTime = dateToLocalDateTime(epsNodeBandwidth.getCreateTime());
|
||||
setTimeRangeByBandwidthType(queryParams, epsNodeBandwidth.getBandwidthType(), createTime);
|
||||
|
||||
// 4. 查询并返回数据
|
||||
return epsInitialTrafficDataService.query(queryParams);
|
||||
}
|
||||
/**
|
||||
* 查询节点带宽信息列表
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
@Override
|
||||
public List<EpsNodeBandwidth> selectEpsNodeBandwidthList(EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
return epsNodeBandwidthMapper.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
epsNodeBandwidth.setCreateTime(DateUtils.getNowDate());
|
||||
return epsNodeBandwidthMapper.insertEpsNodeBandwidth(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
epsNodeBandwidth.setUpdateTime(DateUtils.getNowDate());
|
||||
return epsNodeBandwidthMapper.updateEpsNodeBandwidth(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除节点带宽信息
|
||||
*
|
||||
* @param ids 需要删除的节点带宽信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsNodeBandwidthByIds(Long[] ids)
|
||||
{
|
||||
return epsNodeBandwidthMapper.deleteEpsNodeBandwidthByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除节点带宽信息信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsNodeBandwidthById(Long id)
|
||||
{
|
||||
return epsNodeBandwidthMapper.deleteEpsNodeBandwidthById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算月均日95值
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int calculateAvg(EpsNodeBandwidth epsNodeBandwidth) {
|
||||
// 验证是否已经存在记录
|
||||
List<EpsNodeBandwidth> existingRecords = epsNodeBandwidthMapper.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
|
||||
EpsNodeBandwidth calculatedData = epsNodeBandwidthMapper.calculateAvg(epsNodeBandwidth);
|
||||
// 日95值总和
|
||||
BigDecimal sum95Daily = calculatedData.getBandwidth95Daily();
|
||||
// 日有效95值总和
|
||||
BigDecimal sumEffectiveBandwidth95Daily = calculatedData.getEffectiveBandwidth95Daily();
|
||||
// 计算当月天数并求平均值
|
||||
LocalDate monthTime = epsNodeBandwidth.getMonthTime();
|
||||
int daysInMonth = YearMonth.from(monthTime).lengthOfMonth();
|
||||
// 月均日95值
|
||||
BigDecimal avgMonthlyBandwidth95 = daysInMonth == 0 ? BigDecimal.ZERO :
|
||||
sum95Daily.divide(BigDecimal.valueOf(daysInMonth), 2, RoundingMode.HALF_UP);
|
||||
epsNodeBandwidth.setAvgMonthlyBandwidth95(avgMonthlyBandwidth95);
|
||||
// 有效-月均日95值
|
||||
BigDecimal effectiveAvgMonthlyBandwidth95 = daysInMonth == 0 ? BigDecimal.ZERO :
|
||||
sumEffectiveBandwidth95Daily.divide(BigDecimal.valueOf(daysInMonth), 2, RoundingMode.HALF_UP);
|
||||
epsNodeBandwidth.setEffectiveAvgMonthlyBandwidth95(effectiveAvgMonthlyBandwidth95);
|
||||
|
||||
// 根据是否存在记录执行更新或插入操作
|
||||
return existingRecords.isEmpty() ?
|
||||
epsNodeBandwidthMapper.insertEpsNodeBandwidth(epsNodeBandwidth) :
|
||||
epsNodeBandwidthMapper.updateEpsNodeBandwidth(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EpsNodeBandwidth> getAvgDetailMsg(Long id) {
|
||||
// 1. 根据ID查询服务器信息
|
||||
EpsNodeBandwidth epsNodeBandwidth = epsNodeBandwidthMapper.selectEpsNodeBandwidthById(id);
|
||||
if (epsNodeBandwidth == null) {
|
||||
throw new NotFoundException("未找到ID为" + id + "的服务器信息");
|
||||
}
|
||||
return epsNodeBandwidthMapper.getAvgDetailMsg(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* Date 类型 转为 LocalDateTime 类型
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime dateToLocalDateTime(Date date) {
|
||||
return date.toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDateTime();
|
||||
}
|
||||
/**
|
||||
* 根据带宽类型设置时间范围
|
||||
*/
|
||||
private void setTimeRangeByBandwidthType(EpsInitialTrafficData data, String bandwidthType, LocalDateTime baseTime) {
|
||||
switch (bandwidthType) {
|
||||
case "1":
|
||||
case "3":
|
||||
case "5": // 日带宽
|
||||
data.setStartTime(baseTime.with(LocalTime.MIN)); // 00:00:00
|
||||
data.setEndTime(baseTime.with(LocalTime.MAX).withNano(0)); // 23:59:59
|
||||
break;
|
||||
case "2":
|
||||
case "4":
|
||||
case "6":
|
||||
case "7": // 月带宽
|
||||
YearMonth month = YearMonth.from(baseTime);
|
||||
data.setStartTime(month.atDay(1).atStartOfDay()); // 当月第一天 00:00:00
|
||||
data.setEndTime(month.atEndOfMonth().atTime(23, 59, 59)); // 当月最后一天 23:59:59
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的带宽类型: " + bandwidthType);
|
||||
}
|
||||
}
|
||||
}
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import com.ruoyi.system.mapper.EpsServerRevenueConfigMapper;
|
||||
import com.ruoyi.system.service.IEpsServerRevenueConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@Service
|
||||
public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfigService
|
||||
{
|
||||
@Autowired
|
||||
private EpsServerRevenueConfigMapper epsServerRevenueConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
@Override
|
||||
public EpsServerRevenueConfig selectEpsServerRevenueConfigById(Long id)
|
||||
{
|
||||
return epsServerRevenueConfigMapper.selectEpsServerRevenueConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置列表
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
@Override
|
||||
public List<EpsServerRevenueConfig> selectEpsServerRevenueConfigList(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
return epsServerRevenueConfigMapper.selectEpsServerRevenueConfigList(epsServerRevenueConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
epsServerRevenueConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return epsServerRevenueConfigMapper.insertEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
epsServerRevenueConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
//原来的收益方式
|
||||
EpsServerRevenueConfig serverRevenueConfig = epsServerRevenueConfigMapper.selectEpsServerRevenueConfigById(epsServerRevenueConfig.getId());
|
||||
String revenueMethod = getMethodName(serverRevenueConfig.getRevenueMethod());
|
||||
//现在的收益方式
|
||||
String nowRevenueMethod = getMethodName(epsServerRevenueConfig.getRevenueMethod());
|
||||
// 修改条数
|
||||
int rows = epsServerRevenueConfigMapper.updateEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
if(rows>=0){
|
||||
EpsMethodChangeRecord epsMethodChangeRecord = new EpsMethodChangeRecord();
|
||||
// 节点名称
|
||||
epsMethodChangeRecord.setNodeName(epsServerRevenueConfig.getNodeName());
|
||||
// 硬件sn
|
||||
epsMethodChangeRecord.setHardwareSn(epsServerRevenueConfig.getHardwareSn());
|
||||
// 修改时间
|
||||
epsMethodChangeRecord.setCreateTime(DateUtils.getNowDate());
|
||||
// 修改人
|
||||
epsMethodChangeRecord.setCreatBy(SecurityUtils.getUsername());
|
||||
// 修改内容
|
||||
String content = "";
|
||||
if("流量".equals(nowRevenueMethod)){
|
||||
// 修改内容
|
||||
content = "收益方式变为【"+nowRevenueMethod+"】,流量网口设置为"+epsServerRevenueConfig.getTrafficPort()+
|
||||
",业务为"+epsServerRevenueConfig.getBusinessName();
|
||||
}
|
||||
if("包端".equals(nowRevenueMethod)){
|
||||
// 修改内容
|
||||
content = "收益方式变为【"+nowRevenueMethod+"】,流量网口设置为"+epsServerRevenueConfig.getTrafficPort()+
|
||||
",带宽值设置为"+epsServerRevenueConfig.getPackageBandwidth()+"Mbps,"+"业务为"+epsServerRevenueConfig.getBusinessName();
|
||||
}
|
||||
epsMethodChangeRecord.setChangeContent(content);
|
||||
// 添加操作记录
|
||||
epsServerRevenueConfigMapper.insertEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除服务器收益方式配置
|
||||
*
|
||||
* @param ids 需要删除的服务器收益方式配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsServerRevenueConfigByIds(Long[] ids)
|
||||
{
|
||||
return epsServerRevenueConfigMapper.deleteEpsServerRevenueConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务器收益方式配置信息
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsServerRevenueConfigById(Long id)
|
||||
{
|
||||
return epsServerRevenueConfigMapper.deleteEpsServerRevenueConfigById(id);
|
||||
}
|
||||
/**
|
||||
* 把收益方式转化为文字
|
||||
* @param method
|
||||
* @return
|
||||
*/
|
||||
public String getMethodName(String method){
|
||||
String revenueMethod = "";
|
||||
if("1".equals(method)){
|
||||
revenueMethod = "流量";
|
||||
}
|
||||
if("2".equals(method)){
|
||||
revenueMethod = "包端";
|
||||
}
|
||||
return revenueMethod;
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.EpsTrafficData;
|
||||
import com.ruoyi.system.mapper.EpsMethodChangeRecordMapper;
|
||||
import com.ruoyi.system.mapper.EpsTrafficDataMapper;
|
||||
import com.ruoyi.system.service.IEpsTrafficDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流量相关数据Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class EpsTrafficDataServiceImpl implements IEpsTrafficDataService
|
||||
{
|
||||
@Autowired
|
||||
private EpsTrafficDataMapper epsTrafficDataMapper;
|
||||
@Autowired
|
||||
private EpsMethodChangeRecordMapper epsMethodChangeRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询流量相关数据
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 流量相关数据
|
||||
*/
|
||||
@Override
|
||||
public EpsTrafficData selectEpsTrafficDataById(Long id)
|
||||
{
|
||||
return epsTrafficDataMapper.selectEpsTrafficDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流量相关数据列表
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 流量相关数据
|
||||
*/
|
||||
@Override
|
||||
public List<EpsTrafficData> selectEpsTrafficDataList(EpsTrafficData epsTrafficData)
|
||||
{
|
||||
return epsTrafficDataMapper.selectEpsTrafficDataList(epsTrafficData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsTrafficData(EpsTrafficData epsTrafficData)
|
||||
{
|
||||
epsTrafficData.setCreateTime(DateUtils.getNowDate());
|
||||
return epsTrafficDataMapper.insertEpsTrafficData(epsTrafficData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsTrafficData(EpsTrafficData epsTrafficData)
|
||||
{
|
||||
epsTrafficData.setUpdateTime(DateUtils.getNowDate());
|
||||
// 修改条数
|
||||
int rows = epsTrafficDataMapper.updateEpsTrafficData(epsTrafficData);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除流量相关数据
|
||||
*
|
||||
* @param ids 需要删除的流量相关数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsTrafficDataByIds(Long[] ids)
|
||||
{
|
||||
return epsTrafficDataMapper.deleteEpsTrafficDataByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流量相关数据信息
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsTrafficDataById(Long id)
|
||||
{
|
||||
return epsTrafficDataMapper.deleteEpsTrafficDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 把收益方式转化为文字
|
||||
* @param method
|
||||
* @return
|
||||
*/
|
||||
public String getMethodName(String method){
|
||||
String revenueMethod = "";
|
||||
if("1".equals(method)){
|
||||
revenueMethod = "流量";
|
||||
}
|
||||
if("2".equals(method)){
|
||||
revenueMethod = "包端";
|
||||
}
|
||||
return revenueMethod;
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.KnowledgeBaseMapper;
|
||||
import com.ruoyi.system.domain.KnowledgeBase;
|
||||
import com.ruoyi.system.service.IKnowledgeBaseService;
|
||||
|
||||
/**
|
||||
* 知识库Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
@Service
|
||||
public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService
|
||||
{
|
||||
@Autowired
|
||||
private KnowledgeBaseMapper knowledgeBaseMapper;
|
||||
|
||||
/**
|
||||
* 查询知识库
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 知识库
|
||||
*/
|
||||
@Override
|
||||
public KnowledgeBase selectKnowledgeBaseById(Long id)
|
||||
{
|
||||
return knowledgeBaseMapper.selectKnowledgeBaseById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 知识库
|
||||
*/
|
||||
@Override
|
||||
public List<KnowledgeBase> selectKnowledgeBaseList(KnowledgeBase knowledgeBase)
|
||||
{
|
||||
return knowledgeBaseMapper.selectKnowledgeBaseList(knowledgeBase);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertKnowledgeBase(KnowledgeBase knowledgeBase)
|
||||
{
|
||||
knowledgeBase.setCreateTime(DateUtils.getNowDate());
|
||||
return knowledgeBaseMapper.insertKnowledgeBase(knowledgeBase);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateKnowledgeBase(KnowledgeBase knowledgeBase)
|
||||
{
|
||||
knowledgeBase.setUpdateTime(DateUtils.getNowDate());
|
||||
return knowledgeBaseMapper.updateKnowledgeBase(knowledgeBase);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除知识库
|
||||
*
|
||||
* @param ids 需要删除的知识库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteKnowledgeBaseByIds(Long[] ids)
|
||||
{
|
||||
return knowledgeBaseMapper.deleteKnowledgeBaseByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除知识库信息
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteKnowledgeBaseById(Long id)
|
||||
{
|
||||
return knowledgeBaseMapper.deleteKnowledgeBaseById(id);
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.MtmMonitoringTemplateMapper;
|
||||
import com.ruoyi.system.domain.MtmMonitoringTemplate;
|
||||
import com.ruoyi.system.service.IMtmMonitoringTemplateService;
|
||||
|
||||
/**
|
||||
* 监控模板管理Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class MtmMonitoringTemplateServiceImpl implements IMtmMonitoringTemplateService
|
||||
{
|
||||
@Autowired
|
||||
private MtmMonitoringTemplateMapper mtmMonitoringTemplateMapper;
|
||||
|
||||
/**
|
||||
* 查询监控模板管理
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 监控模板管理
|
||||
*/
|
||||
@Override
|
||||
public MtmMonitoringTemplate selectMtmMonitoringTemplateById(Long id)
|
||||
{
|
||||
return mtmMonitoringTemplateMapper.selectMtmMonitoringTemplateById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询监控模板管理列表
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 监控模板管理
|
||||
*/
|
||||
@Override
|
||||
public List<MtmMonitoringTemplate> selectMtmMonitoringTemplateList(MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
return mtmMonitoringTemplateMapper.selectMtmMonitoringTemplateList(mtmMonitoringTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
mtmMonitoringTemplate.setCreateTime(DateUtils.getNowDate());
|
||||
return mtmMonitoringTemplateMapper.insertMtmMonitoringTemplate(mtmMonitoringTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
mtmMonitoringTemplate.setUpdateTime(DateUtils.getNowDate());
|
||||
return mtmMonitoringTemplateMapper.updateMtmMonitoringTemplate(mtmMonitoringTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除监控模板管理
|
||||
*
|
||||
* @param ids 需要删除的监控模板管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMtmMonitoringTemplateByIds(Long[] ids)
|
||||
{
|
||||
return mtmMonitoringTemplateMapper.deleteMtmMonitoringTemplateByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控模板管理信息
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMtmMonitoringTemplateById(Long id)
|
||||
{
|
||||
return mtmMonitoringTemplateMapper.deleteMtmMonitoringTemplateById(id);
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmEpsTopologyManagementMapper;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.service.IRmEpsTopologyManagementService;
|
||||
|
||||
/**
|
||||
* 拓扑管理Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class RmEpsTopologyManagementServiceImpl implements IRmEpsTopologyManagementService
|
||||
{
|
||||
@Autowired
|
||||
private RmEpsTopologyManagementMapper rmEpsTopologyManagementMapper;
|
||||
|
||||
/**
|
||||
* 查询拓扑管理
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 拓扑管理
|
||||
*/
|
||||
@Override
|
||||
public RmEpsTopologyManagement selectRmEpsTopologyManagementById(Long id)
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.selectRmEpsTopologyManagementById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询拓扑管理列表
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 拓扑管理
|
||||
*/
|
||||
@Override
|
||||
public List<RmEpsTopologyManagement> selectRmEpsTopologyManagementList(RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
rmEpsTopologyManagement.setCreateTime(DateUtils.getNowDate());
|
||||
return rmEpsTopologyManagementMapper.insertRmEpsTopologyManagement(rmEpsTopologyManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
rmEpsTopologyManagement.setUpdateTime(DateUtils.getNowDate());
|
||||
return rmEpsTopologyManagementMapper.updateRmEpsTopologyManagement(rmEpsTopologyManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除拓扑管理
|
||||
*
|
||||
* @param ids 需要删除的拓扑管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmEpsTopologyManagementByIds(Long[] ids)
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.deleteRmEpsTopologyManagementByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除拓扑管理信息
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmEpsTopologyManagementById(Long id)
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.deleteRmEpsTopologyManagementById(id);
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmResourceGroupMapper;
|
||||
import com.ruoyi.system.domain.RmResourceGroup;
|
||||
import com.ruoyi.system.service.IRmResourceGroupService;
|
||||
|
||||
/**
|
||||
* 资源分组Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class RmResourceGroupServiceImpl implements IRmResourceGroupService
|
||||
{
|
||||
@Autowired
|
||||
private RmResourceGroupMapper rmResourceGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询资源分组
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 资源分组
|
||||
*/
|
||||
@Override
|
||||
public RmResourceGroup selectRmResourceGroupById(Long id)
|
||||
{
|
||||
return rmResourceGroupMapper.selectRmResourceGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资源分组列表
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 资源分组
|
||||
*/
|
||||
@Override
|
||||
public List<RmResourceGroup> selectRmResourceGroupList(RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
return rmResourceGroupMapper.selectRmResourceGroupList(rmResourceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRmResourceGroup(RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
rmResourceGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return rmResourceGroupMapper.insertRmResourceGroup(rmResourceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRmResourceGroup(RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
rmResourceGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
return rmResourceGroupMapper.updateRmResourceGroup(rmResourceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资源分组
|
||||
*
|
||||
* @param ids 需要删除的资源分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmResourceGroupByIds(Long[] ids)
|
||||
{
|
||||
return rmResourceGroupMapper.deleteRmResourceGroupByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资源分组信息
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmResourceGroupById(Long id)
|
||||
{
|
||||
return rmResourceGroupMapper.deleteRmResourceGroupById(id);
|
||||
}
|
||||
}
|
||||
+79
-6
@@ -1,14 +1,17 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.system.mapper.SysDictDataMapper;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
import com.ruoyi.system.mapper.EpsServerRevenueConfigMapper;
|
||||
import com.ruoyi.system.mapper.RmResourceRegistrationMapper;
|
||||
import com.ruoyi.system.service.IRmResourceRegistrationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmResourceRegistrationMapper;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
import com.ruoyi.system.service.IRmResourceRegistrationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源注册Service业务层处理
|
||||
@@ -22,7 +25,7 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
@Autowired
|
||||
private RmResourceRegistrationMapper rmResourceRegistrationMapper;
|
||||
@Autowired
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
private EpsServerRevenueConfigMapper epsServerRevenueConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询资源注册
|
||||
@@ -61,6 +64,11 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
rmResourceRegistration.setCreatorId(SecurityUtils.getUserId());
|
||||
rmResourceRegistration.setCreatorName(SecurityUtils.getUsername());
|
||||
rmResourceRegistration.setCreateTime(DateUtils.getNowDate());
|
||||
// 查询此硬件sn是否已存在
|
||||
int exits = rmResourceRegistrationMapper.countBySn(rmResourceRegistration.getHardwareSn());
|
||||
if(exits>0){
|
||||
return -1;
|
||||
}
|
||||
return rmResourceRegistrationMapper.insertRmResourceRegistration(rmResourceRegistration);
|
||||
}
|
||||
|
||||
@@ -76,9 +84,63 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
rmResourceRegistration.setUpdateTime(DateUtils.getNowDate());
|
||||
rmResourceRegistration.setUpdaterId(SecurityUtils.getUserId());
|
||||
rmResourceRegistration.setUpdaterName(SecurityUtils.getUsername());
|
||||
// 禁止修改sn序列号
|
||||
rmResourceRegistration.setHardwareSn(null);
|
||||
// 已注册状态修改--仅可修改资源名称,描述
|
||||
if ("1".equals(rmResourceRegistration.getRegistrationStatus())){
|
||||
// 拿到需要修改的id
|
||||
Long id = rmResourceRegistration.getId();
|
||||
// 拿到需要修改的资源名称
|
||||
String resourceName = rmResourceRegistration.getResourceName();
|
||||
// 拿到需要修改的描述
|
||||
String description = rmResourceRegistration.getDescription();
|
||||
// 初始化
|
||||
rmResourceRegistration = new RmResourceRegistration();
|
||||
// id赋值
|
||||
rmResourceRegistration.setId(id);
|
||||
// 可修改资源名称
|
||||
rmResourceRegistration.setResourceName(resourceName);
|
||||
// 可修改描述
|
||||
rmResourceRegistration.setDescription(description);
|
||||
|
||||
}
|
||||
return rmResourceRegistrationMapper.updateRmResourceRegistration(rmResourceRegistration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 资源注册-注册
|
||||
*
|
||||
* @param rmResourceRegistration 资源注册
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int register(RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
rmResourceRegistration.setUpdateTime(DateUtils.getNowDate());
|
||||
rmResourceRegistration.setUpdaterId(SecurityUtils.getUserId());
|
||||
rmResourceRegistration.setUpdaterName(SecurityUtils.getUsername());
|
||||
if("1".equals(rmResourceRegistration.getResourceType())){
|
||||
// 注册服务器 添加到服务器收益配置表
|
||||
EpsServerRevenueConfig epsServerRevenueConfig = new EpsServerRevenueConfig();
|
||||
epsServerRevenueConfig.setHardwareSn(rmResourceRegistration.getHardwareSn());
|
||||
epsServerRevenueConfig.setNodeName(rmResourceRegistration.getResourceName());
|
||||
epsServerRevenueConfig.setCreateTime(DateUtils.getNowDate());
|
||||
// 新增前判断是否存在
|
||||
int exits = epsServerRevenueConfigMapper.countBySn(epsServerRevenueConfig.getHardwareSn());
|
||||
if(exits>0){
|
||||
// 存在 修改
|
||||
epsServerRevenueConfigMapper.updateEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
}else{
|
||||
// 不存在 新增
|
||||
epsServerRevenueConfigMapper.insertEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
}
|
||||
}
|
||||
// 仅注册
|
||||
RmResourceRegistration resourceRegistration = new RmResourceRegistration();
|
||||
resourceRegistration.setId(rmResourceRegistration.getId());
|
||||
resourceRegistration.setRegistrationStatus(rmResourceRegistration.getRegistrationStatus());
|
||||
return rmResourceRegistrationMapper.updateRmResourceRegistration(resourceRegistration);
|
||||
}
|
||||
/**
|
||||
* 批量删除资源注册
|
||||
*
|
||||
@@ -102,4 +164,15 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
{
|
||||
return rmResourceRegistrationMapper.deleteRmResourceRegistrationById(id);
|
||||
}
|
||||
@Override
|
||||
public List<Map> selectAllResourceName()
|
||||
{
|
||||
return rmResourceRegistrationMapper.selectAllResourceName();
|
||||
}
|
||||
@Override
|
||||
public List<Map> selectAllResourceNameByType(RmResourceRegistration resourceRegistration)
|
||||
{
|
||||
return rmResourceRegistrationMapper.selectAllResourceNameByType(resourceRegistration);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.ruoyi.system.util;
|
||||
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 获取表明util
|
||||
*/
|
||||
public class TableRouterUtil {
|
||||
|
||||
// 表名前缀
|
||||
private static final String TABLE_PREFIX = "eps_initial_traffic";
|
||||
|
||||
// 日期格式
|
||||
private static final DateTimeFormatter YEAR_MONTH_FORMAT =
|
||||
DateTimeFormatter.ofPattern("yyyy_MM");
|
||||
|
||||
/**
|
||||
* 根据创建时间获取表名
|
||||
* @param createTime 记录创建时间
|
||||
* @return 对应的分表名称
|
||||
* @throws IllegalArgumentException 如果createTime为null
|
||||
*
|
||||
* 示例:
|
||||
* 2023-08-05 14:30:00 → eps_initial_traffic_2023_08_1_10
|
||||
* 2023-08-15 09:15:00 → eps_initial_traffic_2023_08_11_20
|
||||
* 2023-08-25 18:45:00 → eps_initial_traffic_2023_08_21_31
|
||||
*/
|
||||
public static String getTableName(LocalDateTime createTime) {
|
||||
if (createTime == null) {
|
||||
throw new IllegalArgumentException("创建时间不能为null");
|
||||
}
|
||||
|
||||
String yearMonth = createTime.format(YEAR_MONTH_FORMAT);
|
||||
int day = createTime.getDayOfMonth();
|
||||
|
||||
return String.format("%s_%s_%s",
|
||||
TABLE_PREFIX,
|
||||
yearMonth,
|
||||
getDayRange(day));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取时间范围内涉及的所有表名
|
||||
* @param startTime 开始时间(包含)
|
||||
* @param endTime 结束时间(包含)
|
||||
* @return 按时间顺序排列的表名集合
|
||||
*/
|
||||
public static Set<String> getTableNamesBetween(LocalDateTime startTime, LocalDateTime endTime) {
|
||||
validateTimeRange(startTime, endTime);
|
||||
|
||||
Set<String> tableNames = new LinkedHashSet<>();
|
||||
LocalDateTime current = startTime.withHour(0).withMinute(0).withSecond(0);
|
||||
|
||||
while (!current.isAfter(endTime)) {
|
||||
tableNames.add(getTableName(current));
|
||||
current = current.plusDays(1);
|
||||
}
|
||||
|
||||
return tableNames;
|
||||
}
|
||||
|
||||
|
||||
// 获取日期区间
|
||||
private static String getDayRange(int day) {
|
||||
if (day < 1 || day > 31) {
|
||||
throw new IllegalArgumentException("日期必须在1-31之间");
|
||||
}
|
||||
|
||||
if (day <= 10) return "1_10";
|
||||
if (day <= 20) return "11_20";
|
||||
return "21_31";
|
||||
}
|
||||
|
||||
// 验证时间范围
|
||||
private static void validateTimeRange(LocalDateTime start, LocalDateTime end) {
|
||||
if (start == null || end == null) {
|
||||
throw new IllegalArgumentException("时间范围参数不能为null");
|
||||
}
|
||||
if (start.isAfter(end)) {
|
||||
throw new IllegalArgumentException("开始时间不能晚于结束时间");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user