模拟数据生成
This commit is contained in:
parent
368265541a
commit
bbfc593bff
@ -0,0 +1,157 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerAlarmConfig;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IMockTowerAlarmConfigService;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 模拟塔机报警数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/mockTowerAlarmConfig")
|
||||
@Slf4j
|
||||
@Api(tags = "模拟塔机报警数据配置相关Api")
|
||||
public class MockTowerAlarmConfigController {
|
||||
@Autowired
|
||||
private IMockTowerAlarmConfigService mockTowerAlarmConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔机报警数据配置管理", operType = "分页查询", operDesc = "分页列表查询模拟塔机报警数据配置信息")
|
||||
@ApiOperation(value = "分页列表查询模拟塔机报警数据配置信息", notes = "分页列表查询模拟塔机报警数据配置信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<MockTowerAlarmConfig>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mockTowerAlarmConfigService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔机报警数据配置管理", operType = "列表查询", operDesc = "列表查询模拟塔机报警数据配置信息")
|
||||
@ApiOperation(value = "列表查询模拟塔机报警数据配置信息", notes = "列表查询模拟塔机报警数据配置信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<MockTowerAlarmConfig>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mockTowerAlarmConfigService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param mockTowerAlarmConfig
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔机报警数据配置管理", operType = "添加", operDesc = "添加模拟塔机报警数据配置信息")
|
||||
@ApiOperation(value = "添加模拟塔机报警数据配置信息", notes = "添加模拟塔机报警数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<MockTowerAlarmConfig> add(@RequestBody @Validate MockTowerAlarmConfig mockTowerAlarmConfig) {
|
||||
mockTowerAlarmConfigService.add(mockTowerAlarmConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param mockTowerAlarmConfig
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔机报警数据配置管理", operType = "编辑", operDesc = "编辑模拟塔机报警数据配置信息")
|
||||
@ApiOperation(value = "编辑模拟塔机报警数据配置信息", notes = "编辑模拟塔机报警数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<MockTowerAlarmConfig> edit(@RequestBody MockTowerAlarmConfig mockTowerAlarmConfig) {
|
||||
mockTowerAlarmConfigService.edit(mockTowerAlarmConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔机报警数据配置管理", operType = "删除", operDesc = "删除模拟塔机报警数据配置信息")
|
||||
@ApiOperation(value = "删除模拟塔机报警数据配置信息", notes = "删除模拟塔机报警数据配置信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "模拟塔机报警数据配置ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<MockTowerAlarmConfig> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
mockTowerAlarmConfigService.delete(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔机报警数据配置管理", operType = "通过id查询", operDesc = "通过id查询模拟塔机报警数据配置信息")
|
||||
@ApiOperation(value = "通过id查询模拟塔机报警数据配置信息", notes = "通过id查询模拟塔机报警数据配置信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "模拟塔机报警数据配置ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<MockTowerAlarmConfig> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(mockTowerAlarmConfigService.queryById(id));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "模拟塔机报警数据配置管理", operType = "保存", operDesc = "保存模拟塔机报警数据配置信息")
|
||||
@ApiOperation(value = "保存模拟塔机报警数据配置信息", notes = "保存模拟塔机报警数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/save")
|
||||
public Result<MockTowerAlarmConfig> saveEntity(@RequestBody MockTowerAlarmConfig mockTowerAlarmConfig) {
|
||||
mockTowerAlarmConfigService.saveEntity(mockTowerAlarmConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,156 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerCurrentDataConfig;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IMockTowerCurrentDataConfigService;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 模拟塔基实时数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/mockTowerCurrentDataConfig")
|
||||
@Slf4j
|
||||
@Api(tags = "模拟塔基实时数据配置相关Api")
|
||||
public class MockTowerCurrentDataConfigController {
|
||||
@Autowired
|
||||
private IMockTowerCurrentDataConfigService mockTowerCurrentDataConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔基实时数据配置管理", operType = "分页查询", operDesc = "分页列表查询模拟塔基实时数据配置信息")
|
||||
@ApiOperation(value = "分页列表查询模拟塔基实时数据配置信息", notes = "分页列表查询模拟塔基实时数据配置信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<MockTowerCurrentDataConfig>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mockTowerCurrentDataConfigService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔基实时数据配置管理", operType = "列表查询", operDesc = "列表查询模拟塔基实时数据配置信息")
|
||||
@ApiOperation(value = "列表查询模拟塔基实时数据配置信息", notes = "列表查询模拟塔基实时数据配置信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<MockTowerCurrentDataConfig>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mockTowerCurrentDataConfigService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param mockTowerCurrentDataConfig
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔基实时数据配置管理", operType = "添加", operDesc = "添加模拟塔基实时数据配置信息")
|
||||
@ApiOperation(value = "添加模拟塔基实时数据配置信息", notes = "添加模拟塔基实时数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<MockTowerCurrentDataConfig> add(@RequestBody @Validate MockTowerCurrentDataConfig mockTowerCurrentDataConfig) {
|
||||
mockTowerCurrentDataConfigService.add(mockTowerCurrentDataConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param mockTowerCurrentDataConfig
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔基实时数据配置管理", operType = "编辑", operDesc = "编辑模拟塔基实时数据配置信息")
|
||||
@ApiOperation(value = "编辑模拟塔基实时数据配置信息", notes = "编辑模拟塔基实时数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<MockTowerCurrentDataConfig> edit(@RequestBody MockTowerCurrentDataConfig mockTowerCurrentDataConfig) {
|
||||
mockTowerCurrentDataConfigService.edit(mockTowerCurrentDataConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔基实时数据配置管理", operType = "删除", operDesc = "删除模拟塔基实时数据配置信息")
|
||||
@ApiOperation(value = "删除模拟塔基实时数据配置信息", notes = "删除模拟塔基实时数据配置信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "模拟塔基实时数据配置ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<MockTowerCurrentDataConfig> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
mockTowerCurrentDataConfigService.delete(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟塔基实时数据配置管理", operType = "通过id查询", operDesc = "通过id查询模拟塔基实时数据配置信息")
|
||||
@ApiOperation(value = "通过id查询模拟塔基实时数据配置信息", notes = "通过id查询模拟塔基实时数据配置信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "模拟塔基实时数据配置ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<MockTowerCurrentDataConfig> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(mockTowerCurrentDataConfigService.queryById(id));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "模拟塔基实时数据配置管理", operType = "保存", operDesc = "保存模拟塔基实时数据配置信息")
|
||||
@ApiOperation(value = "保存模拟塔基实时数据配置信息", notes = "保存模拟塔基实时数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/save")
|
||||
public Result<MockTowerCurrentDataConfig> saveEntity(@RequestBody MockTowerCurrentDataConfig mockTowerCurrentDataConfig) {
|
||||
mockTowerCurrentDataConfigService.saveEntity(mockTowerCurrentDataConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
@ -2,18 +2,23 @@ package com.zhgd.xmgl.modules.bigdevice.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerAlarmConfig;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.Tower;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.TowerAlarm;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.vo.AlarmsDistinguishedNumberByAlarmType;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.vo.DriverTowerAbnormalCountVo;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IMockTowerAlarmConfigService;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.ITowerAlarmService;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.ITowerService;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -21,16 +26,19 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
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 springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -46,13 +54,15 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@Api(tags = "塔机报警数据表")
|
||||
public class TowerAlarmController {
|
||||
@Autowired
|
||||
ISystemUserService systemUserService;
|
||||
@Autowired
|
||||
private ITowerAlarmService towerAlarmService;
|
||||
@Autowired
|
||||
private ITowerService towerService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
ISystemUserService systemUserService;
|
||||
|
||||
private IMockTowerAlarmConfigService mockTowerAlarmConfigService;
|
||||
|
||||
@ApiOperation(value = "分页列表查询塔机报警数据表信息", notes = "分页列表查询塔机报警数据表信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ -90,7 +100,6 @@ public class TowerAlarmController {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
@ -107,7 +116,6 @@ public class TowerAlarmController {
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "列表查询塔机间碰撞报警", notes = "列表查询塔机间碰撞报警", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "opType", value = "类型,1当日,2本周,默认当日", dataType = "String", paramType = "body", required = true),
|
||||
@ -118,7 +126,6 @@ public class TowerAlarmController {
|
||||
return Result.success(towerAlarmService.selectCollideAlarmList(map));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "列表查询塔机间碰撞设备的运行数据", notes = "列表查询塔机间碰撞设备的运行数据", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间2021-01-07 10:10:05", dataType = "String", paramType = "body", required = true),
|
||||
@ -228,7 +235,6 @@ public class TowerAlarmController {
|
||||
return Result.success(towerAlarmService.selectTowerAlarmRingRatioCount(map));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询企业下一级塔机今日报警统计", notes = "查询企业下一级塔机今日报警统计", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "sn", value = "企业或项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ -355,4 +361,109 @@ public class TowerAlarmController {
|
||||
return Result.success(towerAlarmService.queryAlarmsDistinguishedNumberByAlarmType(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "生成塔机报警数据", notes = "生成塔机报警数据", httpMethod = "POST")
|
||||
@PostMapping(value = "/mockData")
|
||||
public Result mockData(@RequestBody MockTowerAlarmConfig config) {
|
||||
if (config.getStartTime() == null) {
|
||||
throw new OpenAlertException("开始时间不能为空");
|
||||
}
|
||||
if (config.getEndTime() == null) {
|
||||
throw new OpenAlertException("结束时间不能为空");
|
||||
}
|
||||
mockTowerAlarmConfigService.saveEntity(config);
|
||||
List<String> devIdList = StrUtil.split(config.getDevSns(), ",");
|
||||
ThreadLocalRandom random = ThreadLocalRandom.current();
|
||||
List<TowerAlarm> datas = new ArrayList<>();
|
||||
Map<String, Tower> devSnMap = towerService.list(new LambdaQueryWrapper<Tower>()
|
||||
.eq(Tower::getProjectSn, config.getProjectSn())).stream().collect(Collectors.toMap(Tower::getDevSn, Function.identity(), (o1, o2) -> o1));
|
||||
for (String devId : devIdList) {
|
||||
for (int i = 0; i < config.getDevGenerateNum(); i++) {
|
||||
TowerAlarm data = new TowerAlarm();
|
||||
data.setDevSn(devId);
|
||||
data.setDevName(Optional.ofNullable(devSnMap.get(devId)).map(m -> m.getDevName()).orElse(null));
|
||||
data.setProjectSn(config.getProjectSn());
|
||||
data.setAlarmType(1);
|
||||
Date date1 = new Date(random.nextLong(config.getStartTime().getTime(), config.getEndTime().getTime() + 1));
|
||||
Date date2 = new Date(random.nextLong(config.getStartTime().getTime(), config.getEndTime().getTime() + 1));
|
||||
data.setStartTime(DateUtil.formatDateTime(date1.compareTo(date2) >= 0 ? date2 : date1));
|
||||
data.setEndTime(DateUtil.formatDateTime(date1.compareTo(date2) <= 0 ? date2 : date1));
|
||||
data.setAddTime(DateUtil.parseDateTime(data.getEndTime()));
|
||||
data.setDriverName(config.getDriverName());
|
||||
data.setDriverIdCard(config.getDriverIdCard());
|
||||
data.setCertification(config.getCertification());
|
||||
data.setStandardHighAlarmDev(config.getStandardHighAlarmDev());
|
||||
|
||||
if (StrUtil.isNotBlank(config.getMomentAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getMomentAlarms(), ",");
|
||||
data.setMomentAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getWindSpeedAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getWindSpeedAlarms(), ",");
|
||||
data.setWindSpeedAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getHeightAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getHeightAlarms(), ",");
|
||||
data.setHeightAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getHeightLowerAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getHeightLowerAlarms(), ",");
|
||||
data.setHeightLowerAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getMinRangeAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getMinRangeAlarms(), ",");
|
||||
data.setMinRangeAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getMaxRangeAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getMaxRangeAlarms(), ",");
|
||||
data.setMaxRangeAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getPosAngleAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getPosAngleAlarms(), ",");
|
||||
data.setPosAngleAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getNegAngleAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getNegAngleAlarms(), ",");
|
||||
data.setNegAngleAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getObliguityAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getObliguityAlarms(), ",");
|
||||
data.setObliguityAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getEnvironmentAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getEnvironmentAlarms(), ",");
|
||||
data.setEnvironmentAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getMultiAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getMultiAlarms(), ",");
|
||||
data.setMultiAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getStandardHighAlarms())) {
|
||||
List<String> split = StrUtil.split(config.getStandardHighAlarms(), ",");
|
||||
data.setStandardHighAlarm(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
datas.add(data);
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(datas)) {
|
||||
towerAlarmService.saveBatch(datas);
|
||||
}
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "批量删除塔机报警数据", notes = "批量删除塔机报警数据", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "ids", value = "塔机报警数据ID字符串(多个以,分割)", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result deleteBatch(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
String ids = MapUtils.getString(paramMap, "ids");
|
||||
Result result = new Result<>();
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
result.error500("参数不识别!");
|
||||
} else {
|
||||
towerAlarmService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
Result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,26 +2,29 @@ package com.zhgd.xmgl.modules.bigdevice.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerCurrentDataConfig;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.Tower;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.TowerCurrentData;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IMockTowerCurrentDataConfigService;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.ITowerCurrentDataService;
|
||||
import com.zhgd.xmgl.modules.environment.entity.DustNoiseData;
|
||||
import com.zhgd.xmgl.modules.environment.entity.MockDustNoiseDataConfig;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.ITowerService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -29,6 +32,9 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -45,6 +51,12 @@ import java.util.*;
|
||||
public class TowerCurrentDataController {
|
||||
@Autowired
|
||||
private ITowerCurrentDataService towerCurrentDataService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IMockTowerCurrentDataConfigService mockTowerCurrentDataConfigService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private ITowerService towerService;
|
||||
|
||||
@ApiOperation(value = "获取最新一条数据", notes = "获取最新一条数据", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ -125,7 +137,6 @@ public class TowerCurrentDataController {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询塔机设备最新一条实时数据", notes = "查询塔机设备最新一条实时数据", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "devSn", value = "塔机设备编号", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/getNewestTowerCurrentData")
|
||||
@ -175,97 +186,104 @@ public class TowerCurrentDataController {
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// @ApiOperation(value = "生成临边防护(无网)-数据", notes = "生成临边防护(无网)-数据", httpMethod = "POST")
|
||||
// @PostMapping(value = "/mockData")
|
||||
// public Result mockData(@RequestBody MockDustNoiseDataConfig config) {
|
||||
// if (StrUtil.isBlank(config.getDeviceIds())) {
|
||||
// throw new OpenAlertException("请选择设备");
|
||||
// }
|
||||
// if (config.getStartTime() == null) {
|
||||
// throw new OpenAlertException("开始时间不能为空");
|
||||
// }
|
||||
// if (config.getEndTime() == null) {
|
||||
// throw new OpenAlertException("结束时间不能为空");
|
||||
// }
|
||||
// List<String> winddirections = new ArrayList<>();
|
||||
// if (StrUtil.isNotBlank(config.getWinddirections())) {
|
||||
// winddirections = StrUtil.split(config.getWinddirections(), ",");
|
||||
// }
|
||||
// mockDustNoiseDataConfigService.saveEntity(config);
|
||||
// List<String> devIdList = StrUtil.split(config.getDeviceIds(), ",");
|
||||
// ThreadLocalRandom random = ThreadLocalRandom.current();
|
||||
// List<DustNoiseData> datas = new ArrayList<>();
|
||||
// for (String devId : devIdList) {
|
||||
// for (int i = 0; i < config.getDevGenerateNum(); i++) {
|
||||
// DustNoiseData data = new DustNoiseData();
|
||||
// data.setProjectSn(config.getProjectSn());
|
||||
// data.setDeviceId(devId);
|
||||
// data.setUploadDate(DateUtil.formatDateTime(new Date(random.nextLong(config.getStartTime().getTime(), config.getEndTime().getTime() + 1))));
|
||||
// if (config.getPm10Begin() != null && config.getPm10End() != null) {
|
||||
// data.setPm10(random.nextDouble(config.getPm10Begin(), Math.nextUp(config.getPm10End())));
|
||||
// }
|
||||
// if (config.getPm25Begin() != null && config.getPm25End() != null) {
|
||||
// data.setPm25(random.nextDouble(config.getPm25Begin(), Math.nextUp(config.getPm25End())));
|
||||
// }
|
||||
// if (config.getNoiseBegin() != null && config.getNoiseEnd() != null) {
|
||||
// data.setNoise(random.nextDouble(config.getNoiseBegin(), Math.nextUp(config.getNoiseEnd())));
|
||||
// }
|
||||
// if (config.getTspBegin() != null && config.getTspEnd() != null) {
|
||||
// data.setTsp(random.nextDouble(config.getTspBegin(), Math.nextUp(config.getTspEnd())));
|
||||
// }
|
||||
// if (config.getTemperatureBegin() != null && config.getTemperatureEnd() != null) {
|
||||
// data.setTemperature(random.nextDouble(config.getTemperatureBegin(), Math.nextUp(config.getTemperatureEnd())));
|
||||
// }
|
||||
// if (config.getHumidityBegin() != null && config.getHumidityEnd() != null) {
|
||||
// data.setHumidity(random.nextDouble(config.getHumidityBegin(), Math.nextUp(config.getHumidityEnd())));
|
||||
// }
|
||||
// if (config.getWindspeedBegin() != null && config.getWindspeedEnd() != null) {
|
||||
// data.setWindspeed(random.nextDouble(config.getWindspeedBegin(), Math.nextUp(config.getWindspeedEnd())));
|
||||
// }
|
||||
// if (winddirections.size() != 0) {
|
||||
// data.setWinddirection(winddirections.get(random.nextInt(winddirections.size())));
|
||||
// }
|
||||
// if (config.getPressureBegin() != null && config.getPressureEnd() != null) {
|
||||
// data.setPressure(random.nextDouble(config.getPressureBegin(), Math.nextUp(config.getPressureEnd())));
|
||||
// }
|
||||
// if (config.getVoltageBegin() != null && config.getVoltageEnd() != null) {
|
||||
// data.setVoltage(random.nextDouble(config.getVoltageBegin(), Math.nextUp(config.getVoltageEnd())));
|
||||
// }
|
||||
// if (config.getPlateTemperatureBegin() != null && config.getPlateTemperatureEnd() != null) {
|
||||
// data.setPlateTemperature(random.nextDouble(config.getPlateTemperatureBegin(), Math.nextUp(config.getPlateTemperatureEnd())));
|
||||
// }
|
||||
// if (config.getPlateHumidityBegin() != null && config.getPlateHumidityEnd() != null) {
|
||||
// data.setPlateHumidity(random.nextDouble(config.getPlateHumidityBegin(), Math.nextUp(config.getPlateHumidityEnd())));
|
||||
// }
|
||||
// datas.add(data);
|
||||
// }
|
||||
// }
|
||||
// if (CollUtil.isNotEmpty(datas)) {
|
||||
// dustNoiseDataService.saveBatch(datas);
|
||||
// }
|
||||
// return Result.ok();
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// @ApiOperation(value = "批量删除临边防护(无网)-数据", notes = "批量删除临边防护(无网)-数据", httpMethod = "POST")
|
||||
// @ApiImplicitParam(name = "ids", value = "临边防护(无网)-数据ID字符串(多个以,分割)", paramType = "body", required = true, dataType = "String")
|
||||
// @PostMapping(value = "/deleteBatch")
|
||||
// public Result deleteBatch(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
// String ids = MapUtils.getString(paramMap, "ids");
|
||||
// Result result = new Result<>();
|
||||
// if (ids == null || "".equals(ids.trim())) {
|
||||
// result.error500("参数不识别!");
|
||||
// } else {
|
||||
// vehiclePositionAlarmService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
// Result.success("删除成功!");
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
@ApiOperation(value = "生成塔吊数据", notes = "生成塔吊数据", httpMethod = "POST")
|
||||
@PostMapping(value = "/mockData")
|
||||
public Result mockData(@RequestBody MockTowerCurrentDataConfig config) {
|
||||
if (config.getReciveTimeBegin() == null) {
|
||||
throw new OpenAlertException("上传时间开始不能为空");
|
||||
}
|
||||
if (config.getReciveTimeEnd() == null) {
|
||||
throw new OpenAlertException("上传时间结束不能为空");
|
||||
}
|
||||
mockTowerCurrentDataConfigService.saveEntity(config);
|
||||
List<String> devIdList = StrUtil.split(config.getDevSns(), ",");
|
||||
ThreadLocalRandom random = ThreadLocalRandom.current();
|
||||
List<TowerCurrentData> datas = new ArrayList<>();
|
||||
Map<String, Tower> devSnMap = towerService.list(new LambdaQueryWrapper<Tower>()
|
||||
.eq(Tower::getProjectSn, config.getProjectSn())).stream().collect(Collectors.toMap(Tower::getDevSn, Function.identity(), (o1, o2) -> o1));
|
||||
for (String devId : devIdList) {
|
||||
for (int i = 0; i < config.getDevGenerateNum(); i++) {
|
||||
TowerCurrentData data = new TowerCurrentData();
|
||||
BeanUtils.copyProperties(config, data);
|
||||
data.setDevSn(devId);
|
||||
data.setDevName(Optional.ofNullable(devSnMap.get(devId)).map(m -> m.getDevName()).orElse(null));
|
||||
data.setProjectSn(config.getProjectSn());
|
||||
data.setReciveTime(new Date(random.nextLong(config.getReciveTimeBegin().getTime(), config.getReciveTimeEnd().getTime() + 1)));
|
||||
if (config.getStartTimeBegin() != null && config.getStartTimeEnd() != null) {
|
||||
data.setStartTime(new Date(random.nextLong(config.getStartTimeBegin().getTime(), config.getStartTimeEnd().getTime() + 1)));
|
||||
}
|
||||
if (config.getLoadingBegin() != null && config.getLoadingEnd() != null) {
|
||||
data.setLoading(random.nextDouble(Convert.toDouble(config.getLoadingBegin()), Math.nextUp(Convert.toDouble(config.getLoadingEnd()))) + "");
|
||||
}
|
||||
if (config.getLoadRatioBegin() != null && config.getLoadRatioEnd() != null) {
|
||||
data.setLoadRatio(random.nextDouble(Convert.toDouble(config.getLoadRatioBegin()), Math.nextUp(Convert.toDouble(config.getLoadRatioEnd()))) + "");
|
||||
}
|
||||
if (config.getTorqueBegin() != null && config.getTorqueEnd() != null) {
|
||||
data.setTorque(random.nextDouble(Convert.toDouble(config.getTorqueBegin()), Math.nextUp(Convert.toDouble(config.getTorqueEnd()))) + "");
|
||||
}
|
||||
if (config.getTorqueRatioBegin() != null && config.getTorqueRatioEnd() != null) {
|
||||
data.setTorqueRatio(random.nextDouble(Convert.toDouble(config.getTorqueRatioBegin()), Math.nextUp(Convert.toDouble(config.getTorqueRatioEnd()))) + "");
|
||||
}
|
||||
if (config.getAngleBegin() != null && config.getAngleEnd() != null) {
|
||||
data.setAngle(random.nextDouble(Convert.toDouble(config.getAngleBegin()), Math.nextUp(Convert.toDouble(config.getAngleEnd()))) + "");
|
||||
}
|
||||
if (config.getRangerBegin() != null && config.getRangerEnd() != null) {
|
||||
data.setRanger(random.nextDouble(Convert.toDouble(config.getRangerBegin()), Math.nextUp(Convert.toDouble(config.getRangerEnd()))) + "");
|
||||
}
|
||||
if (config.getHeightBegin() != null && config.getHeightEnd() != null) {
|
||||
data.setHeight(random.nextDouble(Convert.toDouble(config.getHeightBegin()), Math.nextUp(Convert.toDouble(config.getHeightEnd()))) + "");
|
||||
}
|
||||
if (config.getWindspeedBegin() != null && config.getWindspeedEnd() != null) {
|
||||
data.setWindspeed(random.nextDouble(Convert.toDouble(config.getWindspeedBegin()), Math.nextUp(Convert.toDouble(config.getWindspeedEnd()))) + "");
|
||||
}
|
||||
if (config.getObliguityBegin() != null && config.getObliguityEnd() != null) {
|
||||
data.setObliguity(random.nextDouble(Convert.toDouble(config.getObliguityBegin()), Math.nextUp(Convert.toDouble(config.getObliguityEnd()))) + "");
|
||||
}
|
||||
if (config.getRateBegin() != null && config.getRateEnd() != null) {
|
||||
data.setRate(random.nextDouble(Convert.toDouble(config.getRateBegin()), Math.nextUp(Convert.toDouble(config.getRateEnd()))) + "");
|
||||
}
|
||||
if (config.getObliguityXBegin() != null && config.getObliguityXEnd() != null) {
|
||||
data.setObliguityX(random.nextDouble(Convert.toDouble(config.getObliguityXBegin()), Math.nextUp(Convert.toDouble(config.getObliguityXEnd()))) + "");
|
||||
}
|
||||
if (config.getObliguityYBegin() != null && config.getObliguityYEnd() != null) {
|
||||
data.setObliguityY(random.nextDouble(Convert.toDouble(config.getObliguityYBegin()), Math.nextUp(Convert.toDouble(config.getObliguityYEnd()))) + "");
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getHeightDirections())) {
|
||||
List<String> split = StrUtil.split(config.getHeightDirections(), ",");
|
||||
data.setHeightDirection(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getRangeDirections())) {
|
||||
List<String> split = StrUtil.split(config.getRangeDirections(), ",");
|
||||
data.setRangeDirection(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getAngleDirections())) {
|
||||
List<String> split = StrUtil.split(config.getAngleDirections(), ",");
|
||||
data.setAngleDirection(Integer.valueOf(split.get(random.nextInt(split.size()))));
|
||||
}
|
||||
datas.add(data);
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(datas)) {
|
||||
towerCurrentDataService.saveBatch(datas);
|
||||
}
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "批量删除塔吊数据", notes = "批量删除塔吊数据", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "ids", value = "塔吊数据ID字符串(多个以,分割)", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result deleteBatch(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
String ids = MapUtils.getString(paramMap, "ids");
|
||||
Result result = new Result<>();
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
result.error500("参数不识别!");
|
||||
} else {
|
||||
towerCurrentDataService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
Result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,157 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: 模拟塔机报警数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("mock_tower_alarm_config")
|
||||
@ApiModel(value = "MockTowerAlarmConfig实体类", description = "MockTowerAlarmConfig")
|
||||
public class MockTowerAlarmConfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 所属项目SN
|
||||
*/
|
||||
@ApiModelProperty(value = "所属项目SN")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 设备sn(多个,分隔)
|
||||
*/
|
||||
@ApiModelProperty(value = "设备sn(多个,分隔)")
|
||||
private java.lang.String devSns;
|
||||
/**
|
||||
* 每个设备随机生成数量
|
||||
*/
|
||||
@ApiModelProperty(value = "每个设备随机生成数量")
|
||||
private java.lang.Integer devGenerateNum;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private java.util.Date startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private java.util.Date endTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
/**
|
||||
* 司机姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "司机姓名")
|
||||
private java.lang.String driverName;
|
||||
/**
|
||||
* 司机身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "司机身份证号")
|
||||
private java.lang.String driverIdCard;
|
||||
/**
|
||||
* 特种作业号
|
||||
*/
|
||||
@ApiModelProperty(value = "特种作业号")
|
||||
private java.lang.String certification;
|
||||
/**
|
||||
* 力矩报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "力矩报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String momentAlarms;
|
||||
/**
|
||||
* 风速报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "风速报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String windSpeedAlarms;
|
||||
/**
|
||||
* 高度上限位报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "高度上限位报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String heightAlarms;
|
||||
/**
|
||||
* 高度下限位报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "高度下限位报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String heightLowerAlarms;
|
||||
/**
|
||||
* 幅度内限位报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "幅度内限位报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String minRangeAlarms;
|
||||
/**
|
||||
* 幅度外限位报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "幅度外限位报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String maxRangeAlarms;
|
||||
/**
|
||||
* 顺时针回转限位报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "顺时针回转限位报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String posAngleAlarms;
|
||||
/**
|
||||
* 逆时针回转限位报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "逆时针回转限位报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String negAngleAlarms;
|
||||
/**
|
||||
* 倾角报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String obliguityAlarms;
|
||||
/**
|
||||
* 环境防撞报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "环境防撞报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String environmentAlarms;
|
||||
/**
|
||||
* 多机防撞报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "多机防撞报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String multiAlarms;
|
||||
/**
|
||||
* 塔机间竖向高度报警 0: 正常 1:报警 2:预警(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "塔机间竖向高度报警 0: 正常 1:报警 2:预警(多个数字,分割)")
|
||||
private java.lang.String standardHighAlarms;
|
||||
/**
|
||||
* 产生塔机间竖向高度报警的设备识别码 例如:当前塔吊和2号塔吊产生此报警。则此处穿2号塔吊的设备识别码。
|
||||
*/
|
||||
@ApiModelProperty(value = "产生塔机间竖向高度报警的设备识别码 例如:当前塔吊和2号塔吊产生此报警。则此处穿2号塔吊的设备识别码。")
|
||||
private java.lang.String standardHighAlarmDev;
|
||||
}
|
||||
@ -0,0 +1,436 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: 模拟塔基实时数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("mock_tower_current_data_config")
|
||||
@ApiModel(value = "MockTowerCurrentDataConfig实体类", description = "MockTowerCurrentDataConfig")
|
||||
public class MockTowerCurrentDataConfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 所属项目SN
|
||||
*/
|
||||
@ApiModelProperty(value = "所属项目SN")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 设备sn(多个,分隔)
|
||||
*/
|
||||
@ApiModelProperty(value = "设备sn(多个,分隔)")
|
||||
private java.lang.String devSns;
|
||||
/**
|
||||
* 每个设备随机生成数量
|
||||
*/
|
||||
@ApiModelProperty(value = "每个设备随机生成数量")
|
||||
private java.lang.Integer devGenerateNum;
|
||||
/**
|
||||
* 上传时间开始
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "上传时间开始")
|
||||
private java.util.Date reciveTimeBegin;
|
||||
/**
|
||||
* 上传时间结束
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "上传时间结束")
|
||||
private java.util.Date reciveTimeEnd;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
/**
|
||||
* 运行时间开始
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "运行时间开始")
|
||||
private java.util.Date startTimeBegin;
|
||||
/**
|
||||
* 运行时间结束
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "运行时间结束")
|
||||
private java.util.Date startTimeEnd;
|
||||
/**
|
||||
* 司机姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "司机姓名")
|
||||
private java.lang.String driverName;
|
||||
/**
|
||||
* 司机身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "司机身份证号")
|
||||
private java.lang.String driverIdCard;
|
||||
/**
|
||||
* 载重 ,单位kg开始
|
||||
*/
|
||||
@ApiModelProperty(value = "载重 ,单位kg开始")
|
||||
private java.lang.String loadingBegin;
|
||||
/**
|
||||
* 载重 ,单位kg结束
|
||||
*/
|
||||
@ApiModelProperty(value = "载重 ,单位kg结束")
|
||||
private java.lang.String loadingEnd;
|
||||
/**
|
||||
* 载重比开始
|
||||
*/
|
||||
@ApiModelProperty(value = "载重比开始")
|
||||
private java.lang.String loadRatioBegin;
|
||||
/**
|
||||
* 载重比结束
|
||||
*/
|
||||
@ApiModelProperty(value = "载重比结束")
|
||||
private java.lang.String loadRatioEnd;
|
||||
/**
|
||||
* 力矩开始
|
||||
*/
|
||||
@ApiModelProperty(value = "力矩开始")
|
||||
private java.lang.String torqueBegin;
|
||||
/**
|
||||
* 力矩结束
|
||||
*/
|
||||
@ApiModelProperty(value = "力矩结束")
|
||||
private java.lang.String torqueEnd;
|
||||
/**
|
||||
* 力矩比开始
|
||||
*/
|
||||
@ApiModelProperty(value = "力矩比开始")
|
||||
private java.lang.String torqueRatioBegin;
|
||||
/**
|
||||
* 力矩比结束
|
||||
*/
|
||||
@ApiModelProperty(value = "力矩比结束")
|
||||
private java.lang.String torqueRatioEnd;
|
||||
/**
|
||||
* 角度 必传参数开始
|
||||
*/
|
||||
@ApiModelProperty(value = "角度 必传参数开始")
|
||||
private java.lang.String angleBegin;
|
||||
/**
|
||||
* 角度 必传参数结束
|
||||
*/
|
||||
@ApiModelProperty(value = "角度 必传参数结束")
|
||||
private java.lang.String angleEnd;
|
||||
/**
|
||||
* 幅度 必传参数开始
|
||||
*/
|
||||
@ApiModelProperty(value = "幅度 必传参数开始")
|
||||
private java.lang.String rangerBegin;
|
||||
/**
|
||||
* 幅度 必传参数结束
|
||||
*/
|
||||
@ApiModelProperty(value = "幅度 必传参数结束")
|
||||
private java.lang.String rangerEnd;
|
||||
/**
|
||||
* 高度 必传参数开始
|
||||
*/
|
||||
@ApiModelProperty(value = "高度 必传参数开始")
|
||||
private java.lang.String heightBegin;
|
||||
/**
|
||||
* 高度 必传参数结束
|
||||
*/
|
||||
@ApiModelProperty(value = "高度 必传参数结束")
|
||||
private java.lang.String heightEnd;
|
||||
/**
|
||||
* 风速(m/s)开始
|
||||
*/
|
||||
@ApiModelProperty(value = "风速(m/s)开始")
|
||||
private java.lang.String windspeedBegin;
|
||||
/**
|
||||
* 风速(m/s)结束
|
||||
*/
|
||||
@ApiModelProperty(value = "风速(m/s)结束")
|
||||
private java.lang.String windspeedEnd;
|
||||
/**
|
||||
* 倾角开始
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角开始")
|
||||
private java.lang.String obliguityBegin;
|
||||
/**
|
||||
* 倾角结束
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角结束")
|
||||
private java.lang.String obliguityEnd;
|
||||
/**
|
||||
* 倍率 必传参数开始
|
||||
*/
|
||||
@ApiModelProperty(value = "倍率 必传参数开始")
|
||||
private java.lang.String rateBegin;
|
||||
/**
|
||||
* 倍率 必传参数结束
|
||||
*/
|
||||
@ApiModelProperty(value = "倍率 必传参数结束")
|
||||
private java.lang.String rateEnd;
|
||||
/**
|
||||
* 垂直度偏差开始
|
||||
*/
|
||||
@ApiModelProperty(value = "垂直度偏差开始")
|
||||
private java.lang.String verticalDeviationBegin;
|
||||
/**
|
||||
* 垂直度偏差结束
|
||||
*/
|
||||
@ApiModelProperty(value = "垂直度偏差结束")
|
||||
private java.lang.String verticalDeviationEnd;
|
||||
/**
|
||||
* 倾角X开始
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角X开始")
|
||||
private java.lang.String obliguityXBegin;
|
||||
/**
|
||||
* 倾角X结束
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角X结束")
|
||||
private java.lang.String obliguityXEnd;
|
||||
/**
|
||||
* 倾角Y开始
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角Y开始")
|
||||
private java.lang.String obliguityYBegin;
|
||||
/**
|
||||
* 倾角Y结束
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角Y结束")
|
||||
private java.lang.String obliguityYEnd;
|
||||
/**
|
||||
* 无任何外设故障 0:有外设故障 1无任何外设故障
|
||||
*/
|
||||
@ApiModelProperty(value = "无任何外设故障 0:有外设故障 1无任何外设故障")
|
||||
private java.lang.Integer noError;
|
||||
/**
|
||||
* 载重传感器故障 0:无故障 1:有故障
|
||||
*/
|
||||
@ApiModelProperty(value = "载重传感器故障 0:无故障 1:有故障")
|
||||
private java.lang.Integer weightError;
|
||||
/**
|
||||
* 风速传感器故障 0:无故障 1:有故障
|
||||
*/
|
||||
@ApiModelProperty(value = "风速传感器故障 0:无故障 1:有故障")
|
||||
private java.lang.Integer windSpeedError;
|
||||
/**
|
||||
* 幅度传感器故障 0:无故障 1:有故障
|
||||
*/
|
||||
@ApiModelProperty(value = "幅度传感器故障 0:无故障 1:有故障")
|
||||
private java.lang.Integer rangeError;
|
||||
/**
|
||||
* 高度传感器故障 0:无故障 1:有故障
|
||||
*/
|
||||
@ApiModelProperty(value = "高度传感器故障 0:无故障 1:有故障")
|
||||
private java.lang.Integer heightError;
|
||||
/**
|
||||
* 角度传感器故障 0:无故障 1:有故障
|
||||
*/
|
||||
@ApiModelProperty(value = "角度传感器故障 0:无故障 1:有故障")
|
||||
private java.lang.Integer angleError;
|
||||
/**
|
||||
* 倾角传感器故障 0:无故障 1:有故障
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角传感器故障 0:无故障 1:有故障")
|
||||
private java.lang.Integer obliguityError;
|
||||
/**
|
||||
* GPS故障 0:无故障 1:有故障
|
||||
*/
|
||||
@ApiModelProperty(value = "GPS故障 0:无故障 1:有故障")
|
||||
private java.lang.Integer gpsError;
|
||||
/**
|
||||
* 身份识别模块故障 0:无故障 1:有故障
|
||||
*/
|
||||
@ApiModelProperty(value = "身份识别模块故障 0:无故障 1:有故障")
|
||||
private java.lang.Integer idError;
|
||||
/**
|
||||
* 无任何报警 0:有报警 1无任何报警
|
||||
*/
|
||||
@ApiModelProperty(value = "无任何报警 0:有报警 1无任何报警")
|
||||
private java.lang.Integer noAlarm;
|
||||
/**
|
||||
* 力矩报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "力矩报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer momentAlarm;
|
||||
/**
|
||||
* 风速报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "风速报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer windSpeedAlarm;
|
||||
/**
|
||||
* 高度上限位报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "高度上限位报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer heightAlarm;
|
||||
/**
|
||||
* 高度下限位报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "高度下限位报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer heightLowerAlarm;
|
||||
/**
|
||||
* 幅度内限位报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "幅度内限位报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer minRangeAlarm;
|
||||
/**
|
||||
* 幅度外限位报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "幅度外限位报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer maxRangeAlarm;
|
||||
/**
|
||||
* 顺时针回转限位报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "顺时针回转限位报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer posAngleAlarm;
|
||||
/**
|
||||
* 逆时针回转限位报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "逆时针回转限位报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer negAngleAlarm;
|
||||
/**
|
||||
* 倾角报警 0:正常 1:报警2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角报警 0:正常 1:报警2:预警")
|
||||
private java.lang.Integer obliguityAlarm;
|
||||
/**
|
||||
* 禁入区报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "禁入区报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidEntryAlarm;
|
||||
/**
|
||||
* A类禁吊区域报警 0:正常 1~5:1~5区域报警
|
||||
*/
|
||||
@ApiModelProperty(value = "A类禁吊区域报警 0:正常 1~5:1~5区域报警")
|
||||
private java.lang.Integer forbidSuspend2Alarm;
|
||||
/**
|
||||
* B类禁吊区域报警 0:正常 1~5:1~5区域报警
|
||||
*/
|
||||
@ApiModelProperty(value = "B类禁吊区域报警 0:正常 1~5:1~5区域报警")
|
||||
private java.lang.Integer forbidSuspend4Alarm;
|
||||
/**
|
||||
* 多机防撞报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "多机防撞报警 0:正常 1:报警")
|
||||
private java.lang.Integer multiAlarmAll;
|
||||
/**
|
||||
* 禁入区右转报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "禁入区右转报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidEntryPosAlarm;
|
||||
/**
|
||||
* 禁入区左转报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "禁入区左转报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidEntryNegAlarm;
|
||||
/**
|
||||
* A类禁吊区右转报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "A类禁吊区右转报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidSuspend2PosAlarm;
|
||||
/**
|
||||
* A类禁吊区左转报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "A类禁吊区左转报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidSuspend2NegAlarm;
|
||||
/**
|
||||
* A类禁吊区向外变幅报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "A类禁吊区向外变幅报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidSuspend2OutAlarm;
|
||||
/**
|
||||
* B类禁吊区右转报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "B类禁吊区右转报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidSuspend4PosAlarm;
|
||||
/**
|
||||
* B类禁吊区左转报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "B类禁吊区左转报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidSuspend4NegAlarm;
|
||||
/**
|
||||
* B类禁吊区向外变幅报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "B类禁吊区向外变幅报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidSuspend4OutAlarm;
|
||||
/**
|
||||
* B类禁吊区向内变幅报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "B类禁吊区向内变幅报警 0:正常 1:报警")
|
||||
private java.lang.Integer forbidSuspend4BackAlarm;
|
||||
/**
|
||||
* 多机防撞右转报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "多机防撞右转报警 0:正常 1:报警")
|
||||
private java.lang.Integer multiPosAlarm;
|
||||
/**
|
||||
* 多机防撞左转报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "多机防撞左转报警 0:正常 1:报警")
|
||||
private java.lang.Integer multiNegAlarm;
|
||||
/**
|
||||
* 多机防撞向外变幅报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "多机防撞向外变幅报警 0:正常 1:报警")
|
||||
private java.lang.Integer multiOutAlarm;
|
||||
/**
|
||||
* 多机防撞向内变幅报警 0:正常 1:报警
|
||||
*/
|
||||
@ApiModelProperty(value = "多机防撞向内变幅报警 0:正常 1:报警")
|
||||
private java.lang.Integer multiBackAlarm;
|
||||
/**
|
||||
* 倾角X报警 0:正常 1:报警 2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角X报警 0:正常 1:报警 2:预警")
|
||||
private java.lang.Integer obliguityXAlarm;
|
||||
/**
|
||||
* 倾角Y报警 0:正常 1:报警 2:预警
|
||||
*/
|
||||
@ApiModelProperty(value = "倾角Y报警 0:正常 1:报警 2:预警")
|
||||
private java.lang.Integer obliguityYAlarm;
|
||||
/**
|
||||
* 起升状态 0:停止升降 1:向下落勾 2:向上起勾(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "起升状态 0:停止升降 1:向下落勾 2:向上起勾(多个数字,分割)")
|
||||
private java.lang.String heightDirections;
|
||||
/**
|
||||
* 变幅状态 0:停止变幅 1:向外变幅 2:向内变幅(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "变幅状态 0:停止变幅 1:向外变幅 2:向内变幅(多个数字,分割)")
|
||||
private java.lang.String rangeDirections;
|
||||
/**
|
||||
* 回转状态 0:停止回转 1:向右回转 2:向左回转(多个数字,分割)
|
||||
*/
|
||||
@ApiModelProperty(value = "回转状态 0:停止回转 1:向右回转 2:向左回转(多个数字,分割)")
|
||||
private java.lang.String angleDirections;
|
||||
}
|
||||
@ -175,7 +175,7 @@ public class TowerAlarm implements Serializable {
|
||||
|
||||
@Excel(name = "产生塔机间竖向高度报警的设备识别码 例如:当前塔吊和2号塔吊产生此报警。则此处穿2号塔吊的设备识别码。", width = 15)
|
||||
@ApiModelProperty(value = "产生塔机间竖向高度报警的设备识别码 例如:当前塔吊和2号塔吊产生此报警。则此处穿2号塔吊的设备识别码。")
|
||||
private java.lang.Integer standardHighAlarmDev;
|
||||
private java.lang.String standardHighAlarmDev;
|
||||
|
||||
/**
|
||||
* 整改状态 1 代发起 2 待整改 3已整改
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerAlarmConfig;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 模拟塔机报警数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MockTowerAlarmConfigMapper extends BaseMapper<MockTowerAlarmConfig> {
|
||||
|
||||
/**
|
||||
* 分页列表查询模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<MockTowerAlarmConfig> queryList(Page<MockTowerAlarmConfig> page, @Param(Constants.WRAPPER) QueryWrapper<MockTowerAlarmConfig> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<MockTowerAlarmConfig> queryList(@Param(Constants.WRAPPER) QueryWrapper<MockTowerAlarmConfig> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
MockTowerAlarmConfig queryById(String id);
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerCurrentDataConfig;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 模拟塔基实时数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MockTowerCurrentDataConfigMapper extends BaseMapper<MockTowerCurrentDataConfig> {
|
||||
|
||||
/**
|
||||
* 分页列表查询模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<MockTowerCurrentDataConfig> queryList(Page<MockTowerCurrentDataConfig> page, @Param(Constants.WRAPPER) QueryWrapper<MockTowerCurrentDataConfig> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<MockTowerCurrentDataConfig> queryList(@Param(Constants.WRAPPER) QueryWrapper<MockTowerCurrentDataConfig> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
MockTowerCurrentDataConfig queryById(String id);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.bigdevice.mapper.MockTowerAlarmConfigMapper">
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.bigdevice.entity.MockTowerAlarmConfig">
|
||||
select * from (
|
||||
select t.*
|
||||
from mock_tower_alarm_config t
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.bigdevice.entity.MockTowerAlarmConfig">
|
||||
select * from (
|
||||
select t.*
|
||||
from mock_tower_alarm_config t
|
||||
)t
|
||||
where t.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.bigdevice.mapper.MockTowerCurrentDataConfigMapper">
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.bigdevice.entity.MockTowerCurrentDataConfig">
|
||||
select * from (
|
||||
select t.*
|
||||
from mock_tower_current_data_config t
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.bigdevice.entity.MockTowerCurrentDataConfig">
|
||||
select * from (
|
||||
select t.*
|
||||
from mock_tower_current_data_config t
|
||||
)t
|
||||
where t.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,66 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerAlarmConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 模拟塔机报警数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IMockTowerAlarmConfigService extends IService<MockTowerAlarmConfig> {
|
||||
/**
|
||||
* 分页列表查询模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<MockTowerAlarmConfig> queryPageList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<MockTowerAlarmConfig> queryList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 添加模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param mockTowerAlarmConfig 模拟塔机报警数据配置
|
||||
* @return
|
||||
*/
|
||||
void add(MockTowerAlarmConfig mockTowerAlarmConfig);
|
||||
|
||||
/**
|
||||
* 编辑模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param mockTowerAlarmConfig 模拟塔机报警数据配置
|
||||
* @return
|
||||
*/
|
||||
void edit(MockTowerAlarmConfig mockTowerAlarmConfig);
|
||||
|
||||
/**
|
||||
* 根据id删除模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param id 模拟塔机报警数据配置的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询模拟塔机报警数据配置信息
|
||||
*
|
||||
* @param id 模拟塔机报警数据配置的id
|
||||
* @return
|
||||
*/
|
||||
MockTowerAlarmConfig queryById(String id);
|
||||
|
||||
void saveEntity(MockTowerAlarmConfig config);
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerCurrentDataConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 模拟塔基实时数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IMockTowerCurrentDataConfigService extends IService<MockTowerCurrentDataConfig> {
|
||||
/**
|
||||
* 分页列表查询模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<MockTowerCurrentDataConfig> queryPageList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<MockTowerCurrentDataConfig> queryList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 添加模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param mockTowerCurrentDataConfig 模拟塔基实时数据配置
|
||||
* @return
|
||||
*/
|
||||
void add(MockTowerCurrentDataConfig mockTowerCurrentDataConfig);
|
||||
|
||||
/**
|
||||
* 编辑模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param mockTowerCurrentDataConfig 模拟塔基实时数据配置
|
||||
* @return
|
||||
*/
|
||||
void edit(MockTowerCurrentDataConfig mockTowerCurrentDataConfig);
|
||||
|
||||
/**
|
||||
* 根据id删除模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param id 模拟塔基实时数据配置的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询模拟塔基实时数据配置信息
|
||||
*
|
||||
* @param id 模拟塔基实时数据配置的id
|
||||
* @return
|
||||
*/
|
||||
MockTowerCurrentDataConfig queryById(String id);
|
||||
|
||||
void saveEntity(MockTowerCurrentDataConfig config);
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerAlarmConfig;
|
||||
import com.zhgd.xmgl.modules.bigdevice.mapper.MockTowerAlarmConfigMapper;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IMockTowerAlarmConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 模拟塔机报警数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class MockTowerAlarmConfigServiceImpl extends ServiceImpl<MockTowerAlarmConfigMapper, MockTowerAlarmConfig> implements IMockTowerAlarmConfigService {
|
||||
@Autowired
|
||||
private MockTowerAlarmConfigMapper mockTowerAlarmConfigMapper;
|
||||
|
||||
@Override
|
||||
public IPage<MockTowerAlarmConfig> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockTowerAlarmConfig> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<MockTowerAlarmConfig> page = PageUtil.getPage(param);
|
||||
IPage<MockTowerAlarmConfig> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MockTowerAlarmConfig> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockTowerAlarmConfig> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper, param));
|
||||
}
|
||||
|
||||
private QueryWrapper<MockTowerAlarmConfig> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockTowerAlarmConfig> queryWrapper = QueryGenerator.initPageQueryWrapper(MockTowerAlarmConfig.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(MockTowerAlarmConfig::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<MockTowerAlarmConfig> dealList(List<MockTowerAlarmConfig> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(MockTowerAlarmConfig mockTowerAlarmConfig) {
|
||||
mockTowerAlarmConfig.setId(null);
|
||||
baseMapper.insert(mockTowerAlarmConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(MockTowerAlarmConfig mockTowerAlarmConfig) {
|
||||
MockTowerAlarmConfig oldMockTowerAlarmConfig = baseMapper.selectById(mockTowerAlarmConfig.getId());
|
||||
if (oldMockTowerAlarmConfig == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(mockTowerAlarmConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
MockTowerAlarmConfig mockTowerAlarmConfig = baseMapper.selectById(id);
|
||||
if (mockTowerAlarmConfig == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MockTowerAlarmConfig queryById(String id) {
|
||||
MockTowerAlarmConfig entity = baseMapper.queryById(id);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveEntity(MockTowerAlarmConfig config) {
|
||||
MockTowerAlarmConfig dbConfig = this.getOne(new LambdaQueryWrapper<MockTowerAlarmConfig>()
|
||||
.eq(MockTowerAlarmConfig::getProjectSn, config.getProjectSn()));
|
||||
if (dbConfig == null) {
|
||||
this.add(config);
|
||||
} else {
|
||||
config.setId(dbConfig.getId());
|
||||
this.edit(config);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.MockTowerCurrentDataConfig;
|
||||
import com.zhgd.xmgl.modules.bigdevice.mapper.MockTowerCurrentDataConfigMapper;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IMockTowerCurrentDataConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 模拟塔基实时数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-05-14
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class MockTowerCurrentDataConfigServiceImpl extends ServiceImpl<MockTowerCurrentDataConfigMapper, MockTowerCurrentDataConfig> implements IMockTowerCurrentDataConfigService {
|
||||
@Autowired
|
||||
private MockTowerCurrentDataConfigMapper mockTowerCurrentDataConfigMapper;
|
||||
|
||||
@Override
|
||||
public IPage<MockTowerCurrentDataConfig> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockTowerCurrentDataConfig> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<MockTowerCurrentDataConfig> page = PageUtil.getPage(param);
|
||||
IPage<MockTowerCurrentDataConfig> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MockTowerCurrentDataConfig> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockTowerCurrentDataConfig> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper, param));
|
||||
}
|
||||
|
||||
private QueryWrapper<MockTowerCurrentDataConfig> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockTowerCurrentDataConfig> queryWrapper = QueryGenerator.initPageQueryWrapper(MockTowerCurrentDataConfig.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(MockTowerCurrentDataConfig::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<MockTowerCurrentDataConfig> dealList(List<MockTowerCurrentDataConfig> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(MockTowerCurrentDataConfig mockTowerCurrentDataConfig) {
|
||||
mockTowerCurrentDataConfig.setId(null);
|
||||
baseMapper.insert(mockTowerCurrentDataConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(MockTowerCurrentDataConfig mockTowerCurrentDataConfig) {
|
||||
MockTowerCurrentDataConfig oldMockTowerCurrentDataConfig = baseMapper.selectById(mockTowerCurrentDataConfig.getId());
|
||||
if (oldMockTowerCurrentDataConfig == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(mockTowerCurrentDataConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
MockTowerCurrentDataConfig mockTowerCurrentDataConfig = baseMapper.selectById(id);
|
||||
if (mockTowerCurrentDataConfig == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MockTowerCurrentDataConfig queryById(String id) {
|
||||
MockTowerCurrentDataConfig entity = baseMapper.queryById(id);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveEntity(MockTowerCurrentDataConfig config) {
|
||||
MockTowerCurrentDataConfig dbConfig = this.getOne(new LambdaQueryWrapper<MockTowerCurrentDataConfig>()
|
||||
.eq(MockTowerCurrentDataConfig::getProjectSn, config.getProjectSn()));
|
||||
if (dbConfig == null) {
|
||||
this.add(config);
|
||||
} else {
|
||||
config.setId(dbConfig.getId());
|
||||
this.edit(config);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -397,7 +397,7 @@ public class TowerAlarmServiceImpl extends ServiceImpl<TowerAlarmMapper, TowerAl
|
||||
// 塔机间竖向高度报警
|
||||
towerService.sendLifterAlarm(tower, towerAlarm, "塔机间竖向高度报警");
|
||||
}
|
||||
if (null != towerAlarm.getStandardHighAlarmDev() && towerAlarm.getStandardHighAlarmDev() == 1) {
|
||||
if (null != towerAlarm.getStandardHighAlarmDev() && !towerAlarm.getStandardHighAlarmDev().equals("")) {
|
||||
// 产生塔机间竖向高度报警的设备识别码
|
||||
towerService.sendLifterAlarm(tower, towerAlarm, "产生塔机间竖向高度报警的设备识别码");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user