提交桥机接口
This commit is contained in:
parent
b3590f3194
commit
2a0fb4bfd7
@ -361,15 +361,34 @@ public class HttpUtils {
|
||||
/**
|
||||
* 发送post的body方式返回JSONObject
|
||||
*
|
||||
* @param print
|
||||
* @param url
|
||||
* @param body
|
||||
* @param timeout
|
||||
* @param header
|
||||
* @param print 打印文字
|
||||
* @param url 请求url
|
||||
* @param body 请求body
|
||||
* @param timeout 请求超时时间(毫秒)
|
||||
* @param header 请求头
|
||||
* @return
|
||||
*/
|
||||
public static JSONObject sendPostBodyRtJo(String print, String url, JSONObject body, int timeout, JSONObject header) {
|
||||
String bodyStr = body.toJSONString();
|
||||
String result = sendPostBody(print, url, body, timeout, header);
|
||||
return JSONObject.parseObject(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送post的body方式返回String
|
||||
*
|
||||
* @param print 打印文字
|
||||
* @param url 请求url
|
||||
* @param body 请求body
|
||||
* @param timeout 请求超时时间(毫秒)
|
||||
* @param header 请求头
|
||||
* @return
|
||||
*/
|
||||
public static String sendPostBodyRtStr(String print, String url, JSONObject body, int timeout, JSONObject header) {
|
||||
return sendPostBody(print, url, body, timeout, header);
|
||||
}
|
||||
|
||||
private static String sendPostBody(String print, String url, JSONObject body, int timeout, JSONObject header) {
|
||||
String bodyStr = body != null ? body.toJSONString() : "{}";
|
||||
String headerStr = "";
|
||||
HttpRequest request = HttpRequest.post(url)
|
||||
.body(bodyStr)
|
||||
@ -384,6 +403,7 @@ public class HttpUtils {
|
||||
String result = request
|
||||
.execute().body();
|
||||
log.info(print + "结果:{}", result);
|
||||
return JSONObject.parseObject(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* @Description: 塔吊升降机标养室视频监控
|
||||
* @author: pds
|
||||
@ -30,24 +28,24 @@ public class BigDeviceVideo implements Serializable {
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@Excel(name = "设备编号", width = 15)
|
||||
@ApiModelProperty(value = "设备编号")
|
||||
private java.lang.String devSn;
|
||||
/**
|
||||
* 类型,1塔吊,2升降机,3标养室,4龙门吊,5扬尘,6架桥机,7汽车吊;8履带吊
|
||||
*/
|
||||
@Excel(name = "类型,1塔吊,2升降机,3标养室,4龙门吊,5扬尘,6架桥机,7汽车吊;8履带吊", width = 15)
|
||||
@ApiModelProperty(value = "类型,1塔吊,2升降机,3标养室,4龙门吊,5扬尘,6架桥机,7汽车吊;8履带吊")
|
||||
private java.lang.Integer type;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@Excel(name = "设备编号", width = 15)
|
||||
@ApiModelProperty(value = "设备编号")
|
||||
private java.lang.String devSn;
|
||||
/**
|
||||
* 类型,1塔吊,2升降机,3标养室,4龙门吊,5扬尘,6架桥机,7汽车吊;8履带吊;9桥机;
|
||||
*/
|
||||
@Excel(name = "类型,1塔吊,2升降机,3标养室,4龙门吊,5扬尘,6架桥机,7汽车吊;8履带吊;9桥机;", width = 15)
|
||||
@ApiModelProperty(value = "类型,1塔吊,2升降机,3标养室,4龙门吊,5扬尘,6架桥机,7汽车吊;8履带吊;9桥机;")
|
||||
private java.lang.Integer type;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* videoItemId
|
||||
*/
|
||||
|
||||
@ -1,14 +1,24 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceDriverRecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceDriverRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 塔吊升降机驾驶员记录
|
||||
* @author: pds
|
||||
* @date: 2020-12-16
|
||||
* @date: 2020-12-16
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IBigDeviceDriverRecordService extends IService<BigDeviceDriverRecord> {
|
||||
|
||||
/**
|
||||
* 保存塔吊升降机驾驶员记录
|
||||
*
|
||||
* @param driverList
|
||||
* @param bigDevId
|
||||
* @param projectSn
|
||||
* @param type
|
||||
*/
|
||||
void saveBigDeviceDriverRecord(List<BigDeviceDriverRecord> driverList, String bigDevId, String projectSn, int type);
|
||||
}
|
||||
|
||||
@ -1,14 +1,24 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceVideo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceVideo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 塔吊升降机视频监控
|
||||
* @author: pds
|
||||
* @date: 2020-12-16
|
||||
* @date: 2020-12-16
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IBigDeviceVideoService extends IService<BigDeviceVideo> {
|
||||
|
||||
/**
|
||||
* 保存塔吊升降机标养室视频监控等
|
||||
*
|
||||
* @param videoList
|
||||
* @param bigDevId
|
||||
* @param projectSn
|
||||
* @param type
|
||||
*/
|
||||
void saveBigDeviceVideo(List<BigDeviceVideo> videoList, String bigDevId, String projectSn, int type);
|
||||
}
|
||||
|
||||
@ -1,19 +1,36 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceDriverRecord;
|
||||
import com.zhgd.xmgl.modules.bigdevice.mapper.BigDeviceDriverRecordMapper;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IBigDeviceDriverRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 塔吊升降机驾驶员记录
|
||||
* @author: pds
|
||||
* @date: 2020-12-16
|
||||
* @date: 2020-12-16
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BigDeviceDriverRecordServiceImpl extends ServiceImpl<BigDeviceDriverRecordMapper, BigDeviceDriverRecord> implements IBigDeviceDriverRecordService {
|
||||
|
||||
@Override
|
||||
public void saveBigDeviceDriverRecord(List<BigDeviceDriverRecord> driverList, String bigDevId, String projectSn, int type) {
|
||||
QueryWrapper<BigDeviceDriverRecord> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(BigDeviceDriverRecord::getDevSn, bigDevId)
|
||||
.eq(BigDeviceDriverRecord::getProjectSn, projectSn)
|
||||
.eq(BigDeviceDriverRecord::getType, type);
|
||||
baseMapper.delete(queryWrapper);
|
||||
if (driverList != null && driverList.size() > 0) {
|
||||
for (BigDeviceDriverRecord deviceDriverRecord : driverList) {
|
||||
deviceDriverRecord.setProjectSn(projectSn);
|
||||
deviceDriverRecord.setType(type);
|
||||
deviceDriverRecord.setDevSn(bigDevId);
|
||||
baseMapper.insert(deviceDriverRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,36 @@
|
||||
package com.zhgd.xmgl.modules.bigdevice.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceVideo;
|
||||
import com.zhgd.xmgl.modules.bigdevice.mapper.BigDeviceVideoMapper;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IBigDeviceVideoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 塔吊升降机视频监控
|
||||
* @author: pds
|
||||
* @date: 2020-12-16
|
||||
* @date: 2020-12-16
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BigDeviceVideoServiceImpl extends ServiceImpl<BigDeviceVideoMapper, BigDeviceVideo> implements IBigDeviceVideoService {
|
||||
|
||||
@Override
|
||||
public void saveBigDeviceVideo(List<BigDeviceVideo> videoList, String bigDevId, String projectSn, int type) {
|
||||
QueryWrapper<BigDeviceVideo> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.lambda().eq(BigDeviceVideo::getDevSn, bigDevId)
|
||||
.eq(BigDeviceVideo::getProjectSn, projectSn)
|
||||
.eq(BigDeviceVideo::getType, type);
|
||||
this.remove(queryWrapper2);
|
||||
if (videoList != null && videoList.size() > 0) {
|
||||
for (BigDeviceVideo deviceVideo : videoList) {
|
||||
deviceVideo.setProjectSn(projectSn);
|
||||
deviceVideo.setType(type);
|
||||
deviceVideo.setDevSn(bigDevId);
|
||||
this.save(deviceVideo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,126 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneAlarm;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneAlarmDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneAlarmVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneAlarmService;
|
||||
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.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 桥机报警数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/bridgeCraneAlarm")
|
||||
@Slf4j
|
||||
@Api(tags = "桥机报警数据相关Api")
|
||||
public class BridgeCraneAlarmController {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneAlarmService bridgeCraneAlarmService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<BridgeCraneAlarmVo>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(bridgeCraneAlarmService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "桥机报警数据管理", operType = "列表查询", operDesc = "列表查询桥机报警数据信息")
|
||||
@ApiOperation(value = "列表查询桥机报警数据信息", notes = "列表查询桥机报警数据信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<BridgeCraneAlarmVo>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(bridgeCraneAlarmService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param bridgeCraneAlarmDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "桥机报警数据管理", operType = "添加", operDesc = "添加桥机报警数据信息")
|
||||
@ApiOperation(value = "添加桥机报警数据信息", notes = "添加桥机报警数据信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<BridgeCraneAlarmVo> add(@RequestBody @Validate BridgeCraneAlarmDto bridgeCraneAlarmDto) {
|
||||
bridgeCraneAlarmService.add(bridgeCraneAlarmDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param bridgeCraneAlarmDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "桥机报警数据管理", operType = "编辑", operDesc = "编辑桥机报警数据信息")
|
||||
@ApiOperation(value = "编辑桥机报警数据信息", notes = "编辑桥机报警数据信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<BridgeCraneAlarm> edit(@RequestBody BridgeCraneAlarmDto bridgeCraneAlarmDto) {
|
||||
bridgeCraneAlarmService.edit(bridgeCraneAlarmDto);
|
||||
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<BridgeCraneAlarm> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
bridgeCraneAlarmService.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<BridgeCraneAlarmVo> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(bridgeCraneAlarmService.queryById(id));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,220 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gexin.fastjson.JSON;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneDev;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.MockBridgeCraneDataConfig;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneDataDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDataVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneAlarmService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneDataService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneDevService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IMockBridgeCraneDataConfigService;
|
||||
import com.zhgd.xmgl.util.EntityUtils;
|
||||
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.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 桥机工作循环数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/bridgeCraneData")
|
||||
@Slf4j
|
||||
@Api(tags = "桥机工作循环数据相关Api")
|
||||
public class BridgeCraneDataController {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneDataService bridgeCraneDataService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IMockBridgeCraneDataConfigService mockBridgeCraneDataConfigService;
|
||||
|
||||
// /**
|
||||
// * 列表查询
|
||||
// * @return
|
||||
// */
|
||||
// @OperLog(operModul = "桥机工作循环数据管理", operType = "列表查询", operDesc = "列表查询桥机工作循环数据信息")
|
||||
// @ApiOperation(value = "列表查询桥机工作循环数据信息", notes = "列表查询桥机工作循环数据信息", httpMethod="GET")
|
||||
// @GetMapping(value = "/list")
|
||||
// public Result<List<BridgeCraneDataVo>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
// return Result.success(bridgeCraneDataService.queryList(param));
|
||||
// }
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneDevService bridgeCraneDevService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneAlarmService bridgeCraneAlarmService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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"),
|
||||
@ApiImplicitParam(name = "mockDesc", value = "1是模拟数据倒序", dataType = "Integer", paramType = "body", required = false),
|
||||
@ApiImplicitParam(name = "bridgeCraneDevId", value = "桥机设备主键id", dataType = "Integer", paramType = "body", required = false),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<BridgeCraneDataVo>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(bridgeCraneDataService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param bridgeCraneDataDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "桥机工作循环数据管理", operType = "添加", operDesc = "添加桥机工作循环数据信息")
|
||||
@ApiOperation(value = "添加桥机工作循环数据信息", notes = "添加桥机工作循环数据信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<BridgeCraneDataVo> add(@RequestBody @Validate BridgeCraneDataDto bridgeCraneDataDto) {
|
||||
log.info("添加桥机工作循环数据信息:{}", JSON.toJSONString(bridgeCraneDataDto));
|
||||
BridgeCraneDev dev = bridgeCraneDevService.getOne(new LambdaQueryWrapper<BridgeCraneDev>()
|
||||
.eq(BridgeCraneDev::getDevId, bridgeCraneDataDto.getDevId()));
|
||||
if (dev == null) {
|
||||
throw new OpenAlertException("设备编号不存在");
|
||||
}
|
||||
bridgeCraneDataDto.setProjectSn(dev.getProjectSn());
|
||||
bridgeCraneDataService.add(bridgeCraneDataDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param bridgeCraneDataDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "桥机工作循环数据管理", operType = "编辑", operDesc = "编辑桥机工作循环数据信息")
|
||||
@ApiOperation(value = "编辑桥机工作循环数据信息", notes = "编辑桥机工作循环数据信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<BridgeCraneData> edit(@RequestBody BridgeCraneDataDto bridgeCraneDataDto) {
|
||||
bridgeCraneDataService.edit(bridgeCraneDataDto);
|
||||
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<BridgeCraneData> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
bridgeCraneDataService.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<BridgeCraneDataVo> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(bridgeCraneDataService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "模拟生成数据", notes = "模拟生成数据", httpMethod = "POST")
|
||||
@PostMapping(value = "/mockData")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result mockData(@RequestBody MockBridgeCraneDataConfig config) {
|
||||
if (config.getStartTime() == null) {
|
||||
throw new OpenAlertException("开始时间不能为空");
|
||||
}
|
||||
if (config.getEndTime() == null) {
|
||||
throw new OpenAlertException("结束时间不能为空");
|
||||
}
|
||||
mockBridgeCraneDataConfigService.saveEntity(config);
|
||||
List<String> devIdList = StrUtil.split(config.getDevSns(), ",");
|
||||
ThreadLocalRandom random = ThreadLocalRandom.current();
|
||||
List<BridgeCraneData> datas = new ArrayList<>();
|
||||
for (String devId : devIdList) {
|
||||
for (int i = 0; i < config.getDevGenerateNum(); i++) {
|
||||
BridgeCraneData data = new BridgeCraneData();
|
||||
BeanUtil.copyProperties(config, data);
|
||||
data.setId(null);
|
||||
data.setDevId(devId);
|
||||
EntityUtils.setRandomInt(config.getOperatingCycleNumberBegin(), config.getOperatingCycleNumberEnd(), data::setOperatingCycleNumber, random);
|
||||
EntityUtils.setRandomFloatInt(config.getWorkTimeBegin(), config.getWorkTimeEnd(), data::setWorkTime, random);
|
||||
EntityUtils.setRandomFloatInt(config.getCumulativeWorkingTimeBegin(), config.getCumulativeWorkingTimeEnd(), data::setCumulativeWorkingTime, random);
|
||||
EntityUtils.setRandomFloatInt(config.getAcquisitionModulesNumberBegin(), config.getAcquisitionModulesNumberEnd(), data::setAcquisitionModulesNumber, random);
|
||||
EntityUtils.setRandomFloatInt(config.getNeiweight1Begin(), config.getNeiweight1End(), data::setNeiweight1, random);
|
||||
EntityUtils.setRandomFloatInt(config.getNeiweight2Begin(), config.getNeiweight2End(), data::setNeiweight2, random);
|
||||
EntityUtils.setRandomFloatInt(config.getNeiweight5Begin(), config.getNeiweight5End(), data::setNeiweight5, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance1Begin(), config.getDistance1End(), data::setDistance1, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance2Begin(), config.getDistance2End(), data::setDistance2, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance5Begin(), config.getDistance5End(), data::setDistance5, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance6Begin(), config.getDistance6End(), data::setDistance6, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance7Begin(), config.getDistance7End(), data::setDistance7, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance10Begin(), config.getDistance10End(), data::setDistance10, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance11Begin(), config.getDistance11End(), data::setDistance11, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance12Begin(), config.getDistance12End(), data::setDistance12, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance13Begin(), config.getDistance13End(), data::setDistance13, random);
|
||||
EntityUtils.setRandomFloatInt(config.getDistance14Begin(), config.getDistance14End(), data::setDistance14, random);
|
||||
EntityUtils.setRandomFloatInt(config.getSpeed1Begin(), config.getSpeed1End(), data::setSpeed1, random);
|
||||
EntityUtils.setRandomFloatInt(config.getSpeed2Begin(), config.getSpeed2End(), data::setSpeed2, random);
|
||||
data.setUploadTime(new Date(random.nextLong(config.getStartTime().getTime(), config.getEndTime().getTime() + 1)));
|
||||
datas.add(data);
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(datas)) {
|
||||
bridgeCraneDataService.saveBatch(datas);
|
||||
bridgeCraneAlarmService.saveAlarmBatch(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 {
|
||||
bridgeCraneDataService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
Result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,186 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneDev;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneDevDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDevVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneDevService;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 桥机设备
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/bridgeCraneDev")
|
||||
@Slf4j
|
||||
@Api(tags = "桥机设备相关Api")
|
||||
public class BridgeCraneDevController {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneDevService bridgeCraneDevService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<BridgeCraneDevVo>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(bridgeCraneDevService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "桥机设备管理", operType = "列表查询", operDesc = "列表查询桥机设备信息")
|
||||
@ApiOperation(value = "列表查询桥机设备信息", notes = "列表查询桥机设备信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<BridgeCraneDevVo>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(bridgeCraneDevService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param bridgeCraneDevDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "桥机设备管理", operType = "添加", operDesc = "添加桥机设备信息")
|
||||
@ApiOperation(value = "添加桥机设备信息", notes = "添加桥机设备信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<BridgeCraneDevVo> add(@RequestBody @Validate BridgeCraneDevDto bridgeCraneDevDto) {
|
||||
bridgeCraneDevService.add(bridgeCraneDevDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param bridgeCraneDevDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "桥机设备管理", operType = "编辑", operDesc = "编辑桥机设备信息")
|
||||
@ApiOperation(value = "编辑桥机设备信息", notes = "编辑桥机设备信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<BridgeCraneDev> edit(@RequestBody BridgeCraneDevDto bridgeCraneDevDto) {
|
||||
bridgeCraneDevService.edit(bridgeCraneDevDto);
|
||||
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<BridgeCraneDev> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
bridgeCraneDevService.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<BridgeCraneDevVo> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(bridgeCraneDevService.queryById(id));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "桥机工作循环数据管理", operType = "", operDesc = "修改桥机设备信息")
|
||||
@ApiOperation(value = "修改桥机设备信息", notes = "修改桥机设备信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/updateDevInfo")
|
||||
public Result updateDevInfo(@RequestBody UpdateDevInfo updateDevInfo) {
|
||||
log.info("修改桥机设备信息:{}", JSON.toJSONString(updateDevInfo));
|
||||
BridgeCraneDev dev = bridgeCraneDevService.getOne(new LambdaQueryWrapper<BridgeCraneDev>()
|
||||
.eq(BridgeCraneDev::getDevId, updateDevInfo.getDevId()));
|
||||
if (dev == null) {
|
||||
throw new OpenAlertException("设备编号不存在");
|
||||
}
|
||||
BeanUtil.copyProperties(updateDevInfo, dev);
|
||||
bridgeCraneDevService.updateById(dev);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改桥机设备信息
|
||||
*/
|
||||
@Data
|
||||
private class UpdateDevInfo {
|
||||
@ApiModelProperty(value = "设备编号id")
|
||||
private java.lang.String devId;
|
||||
/**
|
||||
* 额定起重量
|
||||
*/
|
||||
@ApiModelProperty(value = "额定起重量")
|
||||
private java.lang.String ratedLoad;
|
||||
/**
|
||||
* 控制电压(V)
|
||||
*/
|
||||
@ApiModelProperty(value = "控制电压(V)")
|
||||
private java.lang.String controlVoltage;
|
||||
/**
|
||||
* 起升高度(m/s)
|
||||
*/
|
||||
@ApiModelProperty(value = "起升高度(m/s)")
|
||||
private java.lang.String hoistingHeight;
|
||||
/**
|
||||
* 起升速度(m/s)
|
||||
*/
|
||||
@ApiModelProperty(value = "起升速度(m/s)")
|
||||
private java.lang.String getUpSpeed;
|
||||
/**
|
||||
* 运行速度(m/s)
|
||||
*/
|
||||
@ApiModelProperty(value = "运行速度(m/s)")
|
||||
private java.lang.String runningSpeed;
|
||||
/**
|
||||
* 跨度
|
||||
*/
|
||||
@ApiModelProperty(value = "跨度")
|
||||
private java.lang.String span;
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
@ApiModelProperty(value = "设备型号")
|
||||
private java.lang.String devModel;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,148 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.MockBridgeCraneDataConfig;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.MockBridgeCraneDataConfigDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.MockBridgeCraneDataConfigVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IMockBridgeCraneDataConfigService;
|
||||
import com.zhgd.xmgl.util.mysql.MysqlDataUtil;
|
||||
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.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 模拟桥机工作循环数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/mockBridgeCraneDataConfig")
|
||||
@Slf4j
|
||||
@Api(tags = "模拟桥机工作循环数据配置相关Api")
|
||||
public class MockBridgeCraneDataConfigController {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IMockBridgeCraneDataConfigService mockBridgeCraneDataConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<MockBridgeCraneDataConfigVo>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mockBridgeCraneDataConfigService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟桥机工作循环数据配置管理", operType = "列表查询", operDesc = "列表查询模拟桥机工作循环数据配置信息")
|
||||
@ApiOperation(value = "列表查询模拟桥机工作循环数据配置信息", notes = "列表查询模拟桥机工作循环数据配置信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<MockBridgeCraneDataConfigVo>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(mockBridgeCraneDataConfigService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param mockBridgeCraneDataConfigDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟桥机工作循环数据配置管理", operType = "添加", operDesc = "添加模拟桥机工作循环数据配置信息")
|
||||
@ApiOperation(value = "添加模拟桥机工作循环数据配置信息", notes = "添加模拟桥机工作循环数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<MockBridgeCraneDataConfigVo> add(@RequestBody @Validate MockBridgeCraneDataConfigDto mockBridgeCraneDataConfigDto) {
|
||||
mockBridgeCraneDataConfigService.add(mockBridgeCraneDataConfigDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param mockBridgeCraneDataConfigDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "模拟桥机工作循环数据配置管理", operType = "编辑", operDesc = "编辑模拟桥机工作循环数据配置信息")
|
||||
@ApiOperation(value = "编辑模拟桥机工作循环数据配置信息", notes = "编辑模拟桥机工作循环数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<MockBridgeCraneDataConfig> edit(@RequestBody MockBridgeCraneDataConfigDto mockBridgeCraneDataConfigDto) {
|
||||
mockBridgeCraneDataConfigService.edit(mockBridgeCraneDataConfigDto);
|
||||
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<MockBridgeCraneDataConfig> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
mockBridgeCraneDataConfigService.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<MockBridgeCraneDataConfigVo> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(mockBridgeCraneDataConfigService.queryById(id));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "模拟桥机工作循环数据配置管理", operType = "保存", operDesc = "保存模拟桥机工作循环数据配置信息")
|
||||
@ApiOperation(value = "保存模拟桥机工作循环数据配置信息", notes = "保存模拟桥机工作循环数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/save")
|
||||
public Result saveEntity(@RequestBody @Validate MockBridgeCraneDataConfig mockWorkerAttendanceConfig) {
|
||||
mockBridgeCraneDataConfigService.saveEntity(mockWorkerAttendanceConfig);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@OperLog(operModul = "模拟桥机工作循环数据配置管理", operType = "重置", operDesc = "重置模拟桥机工作循环数据配置信息")
|
||||
@ApiOperation(value = "重置模拟桥机工作循环数据配置信息", notes = "重置模拟桥机工作循环数据配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/reset")
|
||||
public Result reset(@RequestBody @Validate MockBridgeCraneDataConfig mockWorkerAttendanceConfig) {
|
||||
MockBridgeCraneDataConfig one = mockBridgeCraneDataConfigService.getOne(new LambdaQueryWrapper<MockBridgeCraneDataConfig>()
|
||||
.eq(MockBridgeCraneDataConfig::getProjectSn, mockWorkerAttendanceConfig.getProjectSn())
|
||||
);
|
||||
if (one != null) {
|
||||
MysqlDataUtil.setFieldsToNull(mockBridgeCraneDataConfigService, MockBridgeCraneDataConfig.class, one.getId());
|
||||
}
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 桥机报警数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bridge_crane_alarm")
|
||||
@ApiModel(value = "BridgeCraneAlarm实体类", description = "BridgeCraneAlarm")
|
||||
public class BridgeCraneAlarm 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;
|
||||
/**
|
||||
* 设备编号id
|
||||
*/
|
||||
@ApiModelProperty(value = "设备编号id")
|
||||
private java.lang.String devId;
|
||||
/**
|
||||
* 报警时间
|
||||
*/
|
||||
@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 alarmTime;
|
||||
/**
|
||||
* 监测参数代码,如: brbit0, li1bit0
|
||||
*/
|
||||
@ApiModelProperty(value = "监测参数代码,如: brbit0, li1bit0")
|
||||
private java.lang.String monitorParamCode;
|
||||
/**
|
||||
* 报警类型代码: 1:制动打开;2:限位到;3:超载报警;4:超速报警;5:偏斜报警;6:上升;7:下降;8:前移;9:后移;10:左移;11:右移;12:断开;
|
||||
*/
|
||||
@ApiModelProperty(value = "报警类型代码: 1:制动打开;2:限位到;3:超载报警;4:超速报警;5:偏斜报警;6:上升;7:下降;8:前移;9:后移;10:左移;11:右移;12:断开;")
|
||||
private java.lang.Integer alarmTypeCode;
|
||||
/**
|
||||
* 本次工作时间 单位:小时
|
||||
*/
|
||||
@ApiModelProperty(value = "本次工作时间 单位:小时")
|
||||
private java.lang.Float workTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
}
|
||||
@ -0,0 +1,323 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 桥机工作循环数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bridge_crane_data")
|
||||
@ApiModel(value = "BridgeCraneData实体类", description = "BridgeCraneData")
|
||||
public class BridgeCraneData 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;
|
||||
/**
|
||||
* 设备编号id
|
||||
*/
|
||||
@ApiModelProperty(value = "设备编号id")
|
||||
private java.lang.String devId;
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
private java.lang.String devType;
|
||||
/**
|
||||
* 本次工作时间 单位:小时
|
||||
*/
|
||||
@ApiModelProperty(value = "本次工作时间 单位:小时")
|
||||
private java.lang.Float workTime;
|
||||
/**
|
||||
* 累计工作时间 单位:小时
|
||||
*/
|
||||
@ApiModelProperty(value = "累计工作时间 单位:小时")
|
||||
private java.lang.Float cumulativeWorkingTime;
|
||||
/**
|
||||
* 工作循环次数 单位:次
|
||||
*/
|
||||
@ApiModelProperty(value = "工作循环次数 单位:次")
|
||||
private java.lang.Integer operatingCycleNumber;
|
||||
/**
|
||||
* 数采终端数量 单位:个
|
||||
*/
|
||||
@ApiModelProperty(value = "数采终端数量 单位:个")
|
||||
private java.lang.Float acquisitionModulesNumber;
|
||||
/**
|
||||
* 前天车吊钩重量 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩重量 单位:t")
|
||||
private java.lang.Float neiweight1;
|
||||
/**
|
||||
* 后天车吊钩重量 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩重量 单位:t")
|
||||
private java.lang.Float neiweight2;
|
||||
/**
|
||||
* 总重量 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "总重量 单位:t")
|
||||
private java.lang.Float neiweight5;
|
||||
/**
|
||||
* 前天车小车行程 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车小车行程 单位:m")
|
||||
private java.lang.Float distance1;
|
||||
/**
|
||||
* 后天车小车行程 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车小车行程 单位:m")
|
||||
private java.lang.Float distance2;
|
||||
/**
|
||||
* 前天车吊钩高度 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩高度 单位:m")
|
||||
private java.lang.Float distance5;
|
||||
/**
|
||||
* 后天车吊钩高度 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩高度 单位:m")
|
||||
private java.lang.Float distance6;
|
||||
/**
|
||||
* 大车行程 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "大车行程 单位:m")
|
||||
private java.lang.Float distance7;
|
||||
/**
|
||||
* 前天车前部安全距离 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车前部安全距离 单位:m")
|
||||
private java.lang.Float distance10;
|
||||
/**
|
||||
* 前天车后部安全距离 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车后部安全距离 单位:m")
|
||||
private java.lang.Float distance11;
|
||||
/**
|
||||
* 后天车前部安全距离 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车前部安全距离 单位:m")
|
||||
private java.lang.Float distance12;
|
||||
/**
|
||||
* 后天车后部安全距离 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车后部安全距离 单位:m")
|
||||
private java.lang.Float distance13;
|
||||
/**
|
||||
* 大车偏斜行程 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "大车偏斜行程 单位:m")
|
||||
private java.lang.Float distance14;
|
||||
/**
|
||||
* 前天车吊钩速度 单位:m/s
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩速度 单位:m/s")
|
||||
private java.lang.Float speed1;
|
||||
/**
|
||||
* 后天车吊钩速度 单位:m/s
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩速度 单位:m/s")
|
||||
private java.lang.Float speed2;
|
||||
/**
|
||||
* 前天车吊钩制动 0-制动关闭;1-制动打开
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩制动 0-制动关闭;1-制动打开")
|
||||
private java.lang.Integer brbit0;
|
||||
/**
|
||||
* 后天车吊钩制动 0-制动关闭;1-制动打开
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩制动 0-制动关闭;1-制动打开")
|
||||
private java.lang.Integer brbit2;
|
||||
/**
|
||||
* 前天车前限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车前限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit0;
|
||||
/**
|
||||
* 前天车后限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车后限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit1;
|
||||
/**
|
||||
* 后天车前限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车前限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit2;
|
||||
/**
|
||||
* 后天车后限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车后限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit3;
|
||||
/**
|
||||
* 前天车吊钩上限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩上限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit8;
|
||||
/**
|
||||
* 后天车吊钩上限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩上限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit10;
|
||||
/**
|
||||
* 大车左限 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "大车左限 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit12;
|
||||
/**
|
||||
* 大车右限 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "大车右限 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit13;
|
||||
/**
|
||||
* 司机室门限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "司机室门限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li2bit0;
|
||||
/**
|
||||
* 前天车吊钩超载 0-正常;1-超载报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩超载 0-正常;1-超载报警;")
|
||||
private java.lang.Integer al1bit0;
|
||||
/**
|
||||
* 后天车吊钩超载 0-正常;1-超载报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩超载 0-正常;1-超载报警;")
|
||||
private java.lang.Integer al1bit1;
|
||||
/**
|
||||
* 整车吊重超载 0-正常;1-超载报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "整车吊重超载 0-正常;1-超载报警;")
|
||||
private java.lang.Integer al1bit4;
|
||||
/**
|
||||
* 前天车吊钩超速报警 0-正常;1-超速报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩超速报警 0-正常;1-超速报警;")
|
||||
private java.lang.Integer al1bit12;
|
||||
/**
|
||||
* 后天车吊钩超速报警 0-正常;1-超速报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩超速报警 0-正常;1-超速报警;")
|
||||
private java.lang.Integer al1bit13;
|
||||
/**
|
||||
* 整车偏斜报警 0-正常;1-偏斜报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "整车偏斜报警 0-正常;1-偏斜报警;")
|
||||
private java.lang.Integer al2bit0;
|
||||
/**
|
||||
* 前天车上升 0-不动;1-上升
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车上升 0-不动;1-上升")
|
||||
private java.lang.Integer op1bit0;
|
||||
/**
|
||||
* 前天车下降 0-不动;1-下降
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车下降 0-不动;1-下降")
|
||||
private java.lang.Integer op1bit1;
|
||||
/**
|
||||
* 后天车上升 0-不动;1-上升
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车上升 0-不动;1-上升")
|
||||
private java.lang.Integer op1bit6;
|
||||
/**
|
||||
* 后天车下降 0-不动;1-下降
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车下降 0-不动;1-下降")
|
||||
private java.lang.Integer op1bit7;
|
||||
/**
|
||||
* 前天车前移 0-不动;1-前移
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车前移 0-不动;1-前移")
|
||||
private java.lang.Integer op2bit0;
|
||||
/**
|
||||
* 前天车后移 0-不动;1-后移
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车后移 0-不动;1-后移")
|
||||
private java.lang.Integer op2bit1;
|
||||
/**
|
||||
* 后天车前移 0-不动;1-前移
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车前移 0-不动;1-前移")
|
||||
private java.lang.Integer op2bit6;
|
||||
/**
|
||||
* 后天车后移 0-不动;1-后移
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车后移 0-不动;1-后移")
|
||||
private java.lang.Integer op2bit7;
|
||||
/**
|
||||
* 大车左移 0-不动;1-左移
|
||||
*/
|
||||
@ApiModelProperty(value = "大车左移 0-不动;1-左移")
|
||||
private java.lang.Integer op3bit0;
|
||||
/**
|
||||
* 大车右移 0-不动;1-右移
|
||||
*/
|
||||
@ApiModelProperty(value = "大车右移 0-不动;1-右移")
|
||||
private java.lang.Integer op3bit1;
|
||||
/**
|
||||
* 报警终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "报警终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit0;
|
||||
/**
|
||||
* 风速采集终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "风速采集终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit1;
|
||||
/**
|
||||
* 前天车数采终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车数采终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit4;
|
||||
/**
|
||||
* 后天车数采终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车数采终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit5;
|
||||
/**
|
||||
* 司机室数采终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "司机室数采终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit9;
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
@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 uploadTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@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 mockTime;
|
||||
}
|
||||
@ -0,0 +1,166 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 桥机设备
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bridge_crane_dev")
|
||||
@ApiModel(value = "BridgeCraneDev实体类", description = "BridgeCraneDev")
|
||||
public class BridgeCraneDev implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private java.lang.String name;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 设备编号id
|
||||
*/
|
||||
@ApiModelProperty(value = "设备编号id")
|
||||
private java.lang.String devId;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private java.lang.String devName;
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
@ApiModelProperty(value = "设备型号")
|
||||
private java.lang.String devModel;
|
||||
/**
|
||||
* 出厂日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "出厂日期")
|
||||
private java.util.Date manufactureDate;
|
||||
/**
|
||||
* 设备备案编号
|
||||
*/
|
||||
@ApiModelProperty(value = "设备备案编号")
|
||||
private java.lang.String devRegistrationNumber;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
private java.lang.String specificationsAndModel;
|
||||
/**
|
||||
* 产权单位
|
||||
*/
|
||||
@ApiModelProperty(value = "产权单位")
|
||||
private java.lang.String ownershipUnit;
|
||||
/**
|
||||
* 安装单位
|
||||
*/
|
||||
@ApiModelProperty(value = "安装单位")
|
||||
private java.lang.String installationUnit;
|
||||
/**
|
||||
* 制造厂家
|
||||
*/
|
||||
@ApiModelProperty(value = "制造厂家")
|
||||
private java.lang.String manufacturer;
|
||||
/**
|
||||
* 拆除单位
|
||||
*/
|
||||
@ApiModelProperty(value = "拆除单位")
|
||||
private java.lang.String removalUnit;
|
||||
/**
|
||||
* 控制电压(V)
|
||||
*/
|
||||
@ApiModelProperty(value = "控制电压(V)")
|
||||
private java.lang.String controlVoltage;
|
||||
/**
|
||||
* 起升高度(m/s)
|
||||
*/
|
||||
@ApiModelProperty(value = "起升高度(m/s)")
|
||||
private java.lang.String hoistingHeight;
|
||||
/**
|
||||
* 起升速度(m/s)
|
||||
*/
|
||||
@ApiModelProperty(value = "起升速度(m/s)")
|
||||
private java.lang.String getUpSpeed;
|
||||
/**
|
||||
* 运行速度(m/s)
|
||||
*/
|
||||
@ApiModelProperty(value = "运行速度(m/s)")
|
||||
private java.lang.String runningSpeed;
|
||||
/**
|
||||
* 跨度
|
||||
*/
|
||||
@ApiModelProperty(value = "跨度")
|
||||
private java.lang.String span;
|
||||
/**
|
||||
* 分包单位
|
||||
*/
|
||||
@ApiModelProperty(value = "分包单位")
|
||||
private java.lang.String subcontractor;
|
||||
/**
|
||||
* 安装时间
|
||||
*/
|
||||
@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 installationTime;
|
||||
/**
|
||||
* 报警推送人
|
||||
*/
|
||||
@ApiModelProperty(value = "报警推送人")
|
||||
private java.lang.String alarmActivator;
|
||||
/**
|
||||
* 绑定风速(m/s)
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定风速(m/s)")
|
||||
private java.lang.String boundWindSpeed;
|
||||
/**
|
||||
* 风力(级)
|
||||
*/
|
||||
@ApiModelProperty(value = "风力(级)")
|
||||
private java.lang.String windForce;
|
||||
/**
|
||||
* 安装照片
|
||||
*/
|
||||
@ApiModelProperty(value = "安装照片")
|
||||
private java.lang.String installationPhoto;
|
||||
/**
|
||||
* 额定起重量
|
||||
*/
|
||||
@ApiModelProperty(value = "额定起重量")
|
||||
private java.lang.String ratedLoad;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
}
|
||||
@ -0,0 +1,432 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 模拟桥机工作循环数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("mock_bridge_crane_data_config")
|
||||
@ApiModel(value = "MockBridgeCraneDataConfig实体类", description = "MockBridgeCraneDataConfig")
|
||||
public class MockBridgeCraneDataConfig 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 mockTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@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.Float workTimeBegin;
|
||||
/**
|
||||
* 本次工作时间结束 单位:小时
|
||||
*/
|
||||
@ApiModelProperty(value = "本次工作时间结束 单位:小时")
|
||||
private java.lang.Float workTimeEnd;
|
||||
/**
|
||||
* 累计工作时间开始 单位:小时
|
||||
*/
|
||||
@ApiModelProperty(value = "累计工作时间开始 单位:小时")
|
||||
private java.lang.Float cumulativeWorkingTimeBegin;
|
||||
/**
|
||||
* 累计工作时间结束 单位:小时
|
||||
*/
|
||||
@ApiModelProperty(value = "累计工作时间结束 单位:小时")
|
||||
private java.lang.Float cumulativeWorkingTimeEnd;
|
||||
/**
|
||||
* 工作循环次数开始 单位:次
|
||||
*/
|
||||
@ApiModelProperty(value = "工作循环次数开始 单位:次")
|
||||
private java.lang.Integer operatingCycleNumberBegin;
|
||||
/**
|
||||
* 工作循环次数结束 单位:次
|
||||
*/
|
||||
@ApiModelProperty(value = "工作循环次数结束 单位:次")
|
||||
private java.lang.Integer operatingCycleNumberEnd;
|
||||
/**
|
||||
* 数采终端数量开始 单位:个
|
||||
*/
|
||||
@ApiModelProperty(value = "数采终端数量开始 单位:个")
|
||||
private java.lang.Float acquisitionModulesNumberBegin;
|
||||
/**
|
||||
* 数采终端数量结束 单位:个
|
||||
*/
|
||||
@ApiModelProperty(value = "数采终端数量结束 单位:个")
|
||||
private java.lang.Float acquisitionModulesNumberEnd;
|
||||
/**
|
||||
* 前天车吊钩重量开始 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩重量开始 单位:t")
|
||||
private java.lang.Float neiweight1Begin;
|
||||
/**
|
||||
* 前天车吊钩重量结束 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩重量结束 单位:t")
|
||||
private java.lang.Float neiweight1End;
|
||||
/**
|
||||
* 后天车吊钩重量开始 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩重量开始 单位:t")
|
||||
private java.lang.Float neiweight2Begin;
|
||||
/**
|
||||
* 后天车吊钩重量结束 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩重量结束 单位:t")
|
||||
private java.lang.Float neiweight2End;
|
||||
/**
|
||||
* 总重量开始 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "总重量开始 单位:t")
|
||||
private java.lang.Float neiweight5Begin;
|
||||
/**
|
||||
* 总重量结束 单位:t
|
||||
*/
|
||||
@ApiModelProperty(value = "总重量结束 单位:t")
|
||||
private java.lang.Float neiweight5End;
|
||||
/**
|
||||
* 前天车小车行程开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车小车行程开始 单位:m")
|
||||
private java.lang.Float distance1Begin;
|
||||
/**
|
||||
* 前天车小车行程结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车小车行程结束 单位:m")
|
||||
private java.lang.Float distance1End;
|
||||
/**
|
||||
* 后天车小车行程开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车小车行程开始 单位:m")
|
||||
private java.lang.Float distance2Begin;
|
||||
/**
|
||||
* 后天车小车行程结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车小车行程结束 单位:m")
|
||||
private java.lang.Float distance2End;
|
||||
/**
|
||||
* 前天车吊钩高度开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩高度开始 单位:m")
|
||||
private java.lang.Float distance5Begin;
|
||||
/**
|
||||
* 前天车吊钩高度结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩高度结束 单位:m")
|
||||
private java.lang.Float distance5End;
|
||||
/**
|
||||
* 后天车吊钩高度开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩高度开始 单位:m")
|
||||
private java.lang.Float distance6Begin;
|
||||
/**
|
||||
* 后天车吊钩高度结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩高度结束 单位:m")
|
||||
private java.lang.Float distance6End;
|
||||
/**
|
||||
* 大车行程开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "大车行程开始 单位:m")
|
||||
private java.lang.Float distance7Begin;
|
||||
/**
|
||||
* 大车行程结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "大车行程结束 单位:m")
|
||||
private java.lang.Float distance7End;
|
||||
/**
|
||||
* 前天车前部安全距离开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车前部安全距离开始 单位:m")
|
||||
private java.lang.Float distance10Begin;
|
||||
/**
|
||||
* 前天车前部安全距离结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车前部安全距离结束 单位:m")
|
||||
private java.lang.Float distance10End;
|
||||
/**
|
||||
* 前天车后部安全距离开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车后部安全距离开始 单位:m")
|
||||
private java.lang.Float distance11Begin;
|
||||
/**
|
||||
* 前天车后部安全距离结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车后部安全距离结束 单位:m")
|
||||
private java.lang.Float distance11End;
|
||||
/**
|
||||
* 后天车前部安全距离开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车前部安全距离开始 单位:m")
|
||||
private java.lang.Float distance12Begin;
|
||||
/**
|
||||
* 后天车前部安全距离结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车前部安全距离结束 单位:m")
|
||||
private java.lang.Float distance12End;
|
||||
/**
|
||||
* 后天车后部安全距离开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车后部安全距离开始 单位:m")
|
||||
private java.lang.Float distance13Begin;
|
||||
/**
|
||||
* 后天车后部安全距离结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车后部安全距离结束 单位:m")
|
||||
private java.lang.Float distance13End;
|
||||
/**
|
||||
* 大车偏斜行程开始 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "大车偏斜行程开始 单位:m")
|
||||
private java.lang.Float distance14Begin;
|
||||
/**
|
||||
* 大车偏斜行程结束 单位:m
|
||||
*/
|
||||
@ApiModelProperty(value = "大车偏斜行程结束 单位:m")
|
||||
private java.lang.Float distance14End;
|
||||
/**
|
||||
* 前天车吊钩速度开始 单位:m/s
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩速度开始 单位:m/s")
|
||||
private java.lang.Float speed1Begin;
|
||||
/**
|
||||
* 前天车吊钩速度结束 单位:m/s
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩速度结束 单位:m/s")
|
||||
private java.lang.Float speed1End;
|
||||
/**
|
||||
* 后天车吊钩速度开始 单位:m/s
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩速度开始 单位:m/s")
|
||||
private java.lang.Float speed2Begin;
|
||||
/**
|
||||
* 后天车吊钩速度结束 单位:m/s
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩速度结束 单位:m/s")
|
||||
private java.lang.Float speed2End;
|
||||
/**
|
||||
* 前天车吊钩制动 0-制动关闭;1-制动打开
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩制动 0-制动关闭;1-制动打开")
|
||||
private java.lang.Integer brbit0;
|
||||
/**
|
||||
* 后天车吊钩制动 0-制动关闭;1-制动打开
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩制动 0-制动关闭;1-制动打开")
|
||||
private java.lang.Integer brbit2;
|
||||
/**
|
||||
* 前天车前限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车前限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit0;
|
||||
/**
|
||||
* 前天车后限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车后限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit1;
|
||||
/**
|
||||
* 后天车前限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车前限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit2;
|
||||
/**
|
||||
* 后天车后限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车后限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit3;
|
||||
/**
|
||||
* 前天车吊钩上限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩上限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit8;
|
||||
/**
|
||||
* 后天车吊钩上限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩上限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit10;
|
||||
/**
|
||||
* 大车左限 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "大车左限 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit12;
|
||||
/**
|
||||
* 大车右限 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "大车右限 0-正常;1-限位到;")
|
||||
private java.lang.Integer li1bit13;
|
||||
/**
|
||||
* 司机室门限位 0-正常;1-限位到;
|
||||
*/
|
||||
@ApiModelProperty(value = "司机室门限位 0-正常;1-限位到;")
|
||||
private java.lang.Integer li2bit0;
|
||||
/**
|
||||
* 前天车吊钩超载 0-正常;1-超载报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩超载 0-正常;1-超载报警;")
|
||||
private java.lang.Integer al1bit0;
|
||||
/**
|
||||
* 后天车吊钩超载 0-正常;1-超载报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩超载 0-正常;1-超载报警;")
|
||||
private java.lang.Integer al1bit1;
|
||||
/**
|
||||
* 整车吊重超载 0-正常;1-超载报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "整车吊重超载 0-正常;1-超载报警;")
|
||||
private java.lang.Integer al1bit4;
|
||||
/**
|
||||
* 前天车吊钩超速报警 0-正常;1-超速报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车吊钩超速报警 0-正常;1-超速报警;")
|
||||
private java.lang.Integer al1bit12;
|
||||
/**
|
||||
* 后天车吊钩超速报警 0-正常;1-超速报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车吊钩超速报警 0-正常;1-超速报警;")
|
||||
private java.lang.Integer al1bit13;
|
||||
/**
|
||||
* 整车偏斜报警 0-正常;1-偏斜报警;
|
||||
*/
|
||||
@ApiModelProperty(value = "整车偏斜报警 0-正常;1-偏斜报警;")
|
||||
private java.lang.Integer al2bit0;
|
||||
/**
|
||||
* 前天车上升 0-不动;1-上升
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车上升 0-不动;1-上升")
|
||||
private java.lang.Integer op1bit0;
|
||||
/**
|
||||
* 前天车下降 0-不动;1-下降
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车下降 0-不动;1-下降")
|
||||
private java.lang.Integer op1bit1;
|
||||
/**
|
||||
* 后天车上升 0-不动;1-上升
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车上升 0-不动;1-上升")
|
||||
private java.lang.Integer op1bit6;
|
||||
/**
|
||||
* 后天车下降 0-不动;1-下降
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车下降 0-不动;1-下降")
|
||||
private java.lang.Integer op1bit7;
|
||||
/**
|
||||
* 前天车前移 0-不动;1-前移
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车前移 0-不动;1-前移")
|
||||
private java.lang.Integer op2bit0;
|
||||
/**
|
||||
* 前天车后移 0-不动;1-后移
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车后移 0-不动;1-后移")
|
||||
private java.lang.Integer op2bit1;
|
||||
/**
|
||||
* 后天车前移 0-不动;1-前移
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车前移 0-不动;1-前移")
|
||||
private java.lang.Integer op2bit6;
|
||||
/**
|
||||
* 后天车后移 0-不动;1-后移
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车后移 0-不动;1-后移")
|
||||
private java.lang.Integer op2bit7;
|
||||
/**
|
||||
* 大车左移 0-不动;1-左移
|
||||
*/
|
||||
@ApiModelProperty(value = "大车左移 0-不动;1-左移")
|
||||
private java.lang.Integer op3bit0;
|
||||
/**
|
||||
* 大车右移 0-不动;1-右移
|
||||
*/
|
||||
@ApiModelProperty(value = "大车右移 0-不动;1-右移")
|
||||
private java.lang.Integer op3bit1;
|
||||
/**
|
||||
* 报警终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "报警终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit0;
|
||||
/**
|
||||
* 风速采集终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "风速采集终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit1;
|
||||
/**
|
||||
* 前天车数采终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "前天车数采终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit4;
|
||||
/**
|
||||
* 后天车数采终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "后天车数采终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit5;
|
||||
/**
|
||||
* 司机室数采终端 0-连接;1-断开
|
||||
*/
|
||||
@ApiModelProperty(value = "司机室数采终端 0-连接;1-断开")
|
||||
private java.lang.Integer ts1bit9;
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity.dto;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneAlarm;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "BridgeCraneAlarmDto实体类", description = "BridgeCraneAlarmDto实体类")
|
||||
public class BridgeCraneAlarmDto extends BridgeCraneAlarm {
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity.dto;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "BridgeCraneDataDto实体类", description = "BridgeCraneDataDto实体类")
|
||||
public class BridgeCraneDataDto extends BridgeCraneData {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity.dto;
|
||||
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceDriverRecord;
|
||||
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceVideo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneDev;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "BridgeCraneDevDto实体类", description = "BridgeCraneDevDto实体类")
|
||||
public class BridgeCraneDevDto extends BridgeCraneDev {
|
||||
@ApiModelProperty(value = "视频列表")
|
||||
private List<BigDeviceVideo> videoList;
|
||||
@ApiModelProperty(value = "司机列表")
|
||||
private List<BigDeviceDriverRecord> driverList;
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity.dto;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.MockBridgeCraneDataConfig;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "MockBridgeCraneDataConfigDto实体类", description = "MockBridgeCraneDataConfigDto实体类")
|
||||
public class MockBridgeCraneDataConfigDto extends MockBridgeCraneDataConfig {
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity.vo;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneAlarm;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "BridgeCraneAlarmVo实体类", description = "BridgeCraneAlarmVo实体类")
|
||||
public class BridgeCraneAlarmVo extends BridgeCraneAlarm {
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private java.lang.String devName;
|
||||
/**
|
||||
* 桥机设备主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "桥机设备主键id")
|
||||
private java.lang.String bridgeCraneDevId;
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity.vo;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "BridgeCraneDataVo实体类", description = "BridgeCraneDataVo实体类")
|
||||
public class BridgeCraneDataVo extends BridgeCraneData {
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private java.lang.String devName;
|
||||
/**
|
||||
* 桥机设备主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "桥机设备主键id")
|
||||
private java.lang.String bridgeCraneDevId;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity.vo;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneDev;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "BridgeCraneDevVo实体类", description = "BridgeCraneDevVo实体类")
|
||||
public class BridgeCraneDevVo extends BridgeCraneDev {
|
||||
@ApiModelProperty(value = "视频IDs")
|
||||
private java.lang.String videoItemIds;
|
||||
@ApiModelProperty(value = "劳务人员Ids")
|
||||
private java.lang.String workerIds;
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.entity.vo;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.MockBridgeCraneDataConfig;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "MockBridgeCraneDataConfigVo实体类", description = "MockBridgeCraneDataConfigVo实体类")
|
||||
public class MockBridgeCraneDataConfigVo extends MockBridgeCraneDataConfig {
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneAlarm;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneAlarmVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 桥机报警数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface BridgeCraneAlarmMapper extends BaseMapper<BridgeCraneAlarm> {
|
||||
|
||||
/**
|
||||
* 分页列表查询桥机报警数据信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<BridgeCraneAlarmVo> queryList(Page<BridgeCraneAlarmVo> page, @Param(Constants.WRAPPER) QueryWrapper<BridgeCraneAlarmVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询桥机报警数据信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<BridgeCraneAlarmVo> queryList(@Param(Constants.WRAPPER) QueryWrapper<BridgeCraneAlarmVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDataVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 桥机工作循环数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface BridgeCraneDataMapper extends BaseMapper<BridgeCraneData> {
|
||||
|
||||
/**
|
||||
* 分页列表查询桥机工作循环数据信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<BridgeCraneDataVo> queryList(Page<BridgeCraneDataVo> page, @Param(Constants.WRAPPER) QueryWrapper<BridgeCraneDataVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询桥机工作循环数据信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<BridgeCraneDataVo> queryList(@Param(Constants.WRAPPER) QueryWrapper<BridgeCraneDataVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneDev;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDevVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 桥机设备
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface BridgeCraneDevMapper extends BaseMapper<BridgeCraneDev> {
|
||||
|
||||
/**
|
||||
* 分页列表查询桥机设备信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<BridgeCraneDevVo> queryList(Page<BridgeCraneDevVo> page, @Param(Constants.WRAPPER) QueryWrapper<BridgeCraneDevVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询桥机设备信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<BridgeCraneDevVo> queryList(@Param(Constants.WRAPPER) QueryWrapper<BridgeCraneDevVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.MockBridgeCraneDataConfig;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.MockBridgeCraneDataConfigVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.MockBridgeCraneDataConfigDto;
|
||||
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-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MockBridgeCraneDataConfigMapper extends BaseMapper<MockBridgeCraneDataConfig> {
|
||||
|
||||
/**
|
||||
* 分页列表查询模拟桥机工作循环数据配置信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<MockBridgeCraneDataConfigVo> queryList(Page<MockBridgeCraneDataConfigVo> page, @Param(Constants.WRAPPER) QueryWrapper<MockBridgeCraneDataConfigVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询模拟桥机工作循环数据配置信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<MockBridgeCraneDataConfigVo> queryList(@Param(Constants.WRAPPER) QueryWrapper<MockBridgeCraneDataConfigVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
<?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.bridgeCrane.mapper.BridgeCraneAlarmMapper">
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneAlarmVo">
|
||||
select * from (
|
||||
select t.*
|
||||
,bcd.dev_name
|
||||
,group_concat(distinct bddr.worker_id) as worker_ids
|
||||
,group_concat(distinct bdv.video_item_id) as video_item_ids
|
||||
,bcd.id bridge_crane_dev_id
|
||||
from bridge_crane_alarm t
|
||||
join bridge_crane_dev bcd on t.dev_id=bcd.dev_id
|
||||
left join big_device_driver_record bddr on bddr.dev_sn=t.dev_id
|
||||
left join big_device_video bdv on t.dev_id=bdv.dev_sn
|
||||
group by t.id
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,14 @@
|
||||
<?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.bridgeCrane.mapper.BridgeCraneDataMapper">
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDataVo">
|
||||
select * from (
|
||||
select t.*
|
||||
,bcd.dev_name
|
||||
,bcd.id bridge_crane_dev_id
|
||||
from bridge_crane_data t
|
||||
join bridge_crane_dev bcd on t.dev_id=bcd.dev_id
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,11 @@
|
||||
<?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.bridgeCrane.mapper.BridgeCraneDevMapper">
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDevVo">
|
||||
select * from (
|
||||
select t.*
|
||||
from bridge_crane_dev t
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,11 @@
|
||||
<?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.bridgeCrane.mapper.MockBridgeCraneDataConfigMapper">
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.bridgeCrane.entity.vo.MockBridgeCraneDataConfigVo">
|
||||
select * from (
|
||||
select t.*
|
||||
from mock_bridge_crane_data_config t
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,74 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneAlarm;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneAlarmDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneAlarmVo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 桥机报警数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IBridgeCraneAlarmService extends IService<BridgeCraneAlarm> {
|
||||
/**
|
||||
* 分页列表查询桥机报警数据信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<BridgeCraneAlarmVo> queryPageList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询桥机报警数据信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<BridgeCraneAlarmVo> queryList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 添加桥机报警数据信息
|
||||
*
|
||||
* @param bridgeCraneAlarmDto 桥机报警数据
|
||||
* @return
|
||||
*/
|
||||
void add(BridgeCraneAlarmDto bridgeCraneAlarmDto);
|
||||
|
||||
/**
|
||||
* 编辑桥机报警数据信息
|
||||
*
|
||||
* @param bridgeCraneAlarmDto 桥机报警数据
|
||||
* @return
|
||||
*/
|
||||
void edit(BridgeCraneAlarmDto bridgeCraneAlarmDto);
|
||||
|
||||
/**
|
||||
* 根据id删除桥机报警数据信息
|
||||
*
|
||||
* @param id 桥机报警数据的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询桥机报警数据信息
|
||||
*
|
||||
* @param id 桥机报警数据的id
|
||||
* @return
|
||||
*/
|
||||
BridgeCraneAlarmVo queryById(String id);
|
||||
|
||||
/**
|
||||
* 保存报警数据
|
||||
*
|
||||
* @param datas
|
||||
*/
|
||||
void saveAlarmBatch(List<BridgeCraneData> datas);
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDataVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneDataDto;
|
||||
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-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IBridgeCraneDataService extends IService<BridgeCraneData> {
|
||||
/**
|
||||
* 分页列表查询桥机工作循环数据信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<BridgeCraneDataVo> queryPageList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询桥机工作循环数据信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<BridgeCraneDataVo> queryList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 添加桥机工作循环数据信息
|
||||
*
|
||||
* @param bridgeCraneDataDto 桥机工作循环数据
|
||||
* @return
|
||||
*/
|
||||
void add(BridgeCraneDataDto bridgeCraneDataDto);
|
||||
|
||||
/**
|
||||
* 编辑桥机工作循环数据信息
|
||||
*
|
||||
* @param bridgeCraneDataDto 桥机工作循环数据
|
||||
* @return
|
||||
*/
|
||||
void edit(BridgeCraneDataDto bridgeCraneDataDto);
|
||||
|
||||
/**
|
||||
* 根据id删除桥机工作循环数据信息
|
||||
*
|
||||
* @param id 桥机工作循环数据的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询桥机工作循环数据信息
|
||||
*
|
||||
* @param id 桥机工作循环数据的id
|
||||
* @return
|
||||
*/
|
||||
BridgeCraneDataVo queryById(String id);
|
||||
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneDev;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDevVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneDevDto;
|
||||
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-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IBridgeCraneDevService extends IService<BridgeCraneDev> {
|
||||
/**
|
||||
* 分页列表查询桥机设备信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<BridgeCraneDevVo> queryPageList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询桥机设备信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<BridgeCraneDevVo> queryList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 添加桥机设备信息
|
||||
*
|
||||
* @param bridgeCraneDevDto 桥机设备
|
||||
* @return
|
||||
*/
|
||||
void add(BridgeCraneDevDto bridgeCraneDevDto);
|
||||
|
||||
/**
|
||||
* 编辑桥机设备信息
|
||||
*
|
||||
* @param bridgeCraneDevDto 桥机设备
|
||||
* @return
|
||||
*/
|
||||
void edit(BridgeCraneDevDto bridgeCraneDevDto);
|
||||
|
||||
/**
|
||||
* 根据id删除桥机设备信息
|
||||
*
|
||||
* @param id 桥机设备的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询桥机设备信息
|
||||
*
|
||||
* @param id 桥机设备的id
|
||||
* @return
|
||||
*/
|
||||
BridgeCraneDevVo queryById(String id);
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.MockBridgeCraneDataConfig;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.MockBridgeCraneDataConfigDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.MockBridgeCraneDataConfigVo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 模拟桥机工作循环数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IMockBridgeCraneDataConfigService extends IService<MockBridgeCraneDataConfig> {
|
||||
/**
|
||||
* 分页列表查询模拟桥机工作循环数据配置信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<MockBridgeCraneDataConfigVo> queryPageList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询模拟桥机工作循环数据配置信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<MockBridgeCraneDataConfigVo> queryList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 添加模拟桥机工作循环数据配置信息
|
||||
*
|
||||
* @param mockBridgeCraneDataConfigDto 模拟桥机工作循环数据配置
|
||||
* @return
|
||||
*/
|
||||
void add(MockBridgeCraneDataConfigDto mockBridgeCraneDataConfigDto);
|
||||
|
||||
/**
|
||||
* 编辑模拟桥机工作循环数据配置信息
|
||||
*
|
||||
* @param mockBridgeCraneDataConfigDto 模拟桥机工作循环数据配置
|
||||
* @return
|
||||
*/
|
||||
void edit(MockBridgeCraneDataConfigDto mockBridgeCraneDataConfigDto);
|
||||
|
||||
/**
|
||||
* 根据id删除模拟桥机工作循环数据配置信息
|
||||
*
|
||||
* @param id 模拟桥机工作循环数据配置的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询模拟桥机工作循环数据配置信息
|
||||
*
|
||||
* @param id 模拟桥机工作循环数据配置的id
|
||||
* @return
|
||||
*/
|
||||
MockBridgeCraneDataConfigVo queryById(String id);
|
||||
|
||||
void saveEntity(MockBridgeCraneDataConfig config);
|
||||
}
|
||||
@ -0,0 +1,228 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneAlarm;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneAlarmDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneAlarmVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.mapper.BridgeCraneAlarmMapper;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneAlarmService;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 桥机报警数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BridgeCraneAlarmServiceImpl extends ServiceImpl<BridgeCraneAlarmMapper, BridgeCraneAlarm> implements IBridgeCraneAlarmService {
|
||||
@Autowired
|
||||
private BridgeCraneAlarmMapper bridgeCraneAlarmMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BridgeCraneAlarmVo> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneAlarmVo> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<BridgeCraneAlarmVo> page = PageUtil.getPage(param);
|
||||
IPage<BridgeCraneAlarmVo> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BridgeCraneAlarmVo> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneAlarmVo> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper, param));
|
||||
}
|
||||
|
||||
private QueryWrapper<BridgeCraneAlarmVo> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneAlarmVo> queryWrapper = QueryGenerator.initPageQueryWrapper(BridgeCraneAlarmVo.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(BridgeCraneAlarmVo::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<BridgeCraneAlarmVo> dealList(List<BridgeCraneAlarmVo> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(BridgeCraneAlarmDto bridgeCraneAlarmDto) {
|
||||
bridgeCraneAlarmDto.setId(null);
|
||||
baseMapper.insert(bridgeCraneAlarmDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(BridgeCraneAlarmDto bridgeCraneAlarmDto) {
|
||||
BridgeCraneAlarm oldBridgeCraneAlarm = baseMapper.selectById(bridgeCraneAlarmDto.getId());
|
||||
if (oldBridgeCraneAlarm == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(bridgeCraneAlarmDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
BridgeCraneAlarm bridgeCraneAlarm = baseMapper.selectById(id);
|
||||
if (bridgeCraneAlarm == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BridgeCraneAlarmVo queryById(String id) {
|
||||
List<BridgeCraneAlarmVo> list = this.queryList(new MapBuilder<String, Object>()
|
||||
.put("id", id)
|
||||
.build());
|
||||
BridgeCraneAlarmVo entity = CollUtil.getFirst(list);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAlarmBatch(List<BridgeCraneData> datas) {
|
||||
if (CollUtil.isNotEmpty(datas)) {
|
||||
List<BridgeCraneAlarm> alarmList = datas.stream().flatMap(d -> {
|
||||
List<BridgeCraneAlarm> alarms = new ArrayList<>();
|
||||
BridgeCraneAlarm alarm = new BridgeCraneAlarm();
|
||||
alarm.setProjectSn(d.getProjectSn());
|
||||
alarm.setDevId(d.getDevId());
|
||||
alarm.setAlarmTime(d.getUploadTime());
|
||||
alarm.setWorkTime(d.getWorkTime());
|
||||
if (Objects.equals(d.getBrbit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "brbit0", 1));
|
||||
}
|
||||
if (Objects.equals(d.getBrbit2(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "brbit2", 1));
|
||||
}
|
||||
if (Objects.equals(d.getLi1bit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li1bit0", 2));
|
||||
}
|
||||
if (Objects.equals(d.getLi1bit1(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li1bit1", 2));
|
||||
}
|
||||
if (Objects.equals(d.getLi1bit2(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li1bit2", 2));
|
||||
}
|
||||
if (Objects.equals(d.getLi1bit3(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li1bit3", 2));
|
||||
}
|
||||
if (Objects.equals(d.getLi1bit8(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li1bit8", 2));
|
||||
}
|
||||
if (Objects.equals(d.getLi1bit10(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li1bit10", 2));
|
||||
}
|
||||
if (Objects.equals(d.getLi1bit12(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li1bit12", 2));
|
||||
}
|
||||
if (Objects.equals(d.getLi1bit13(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li1bit13", 2));
|
||||
}
|
||||
if (Objects.equals(d.getLi2bit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "li2bit0", 2));
|
||||
}
|
||||
if (Objects.equals(d.getAl1bit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "al1bit0", 3));
|
||||
}
|
||||
if (Objects.equals(d.getAl1bit1(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "al1bit1", 3));
|
||||
}
|
||||
if (Objects.equals(d.getAl1bit4(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "al1bit4", 3));
|
||||
}
|
||||
if (Objects.equals(d.getAl1bit12(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "al1bit12", 4));
|
||||
}
|
||||
if (Objects.equals(d.getAl1bit13(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "al1bit13", 4));
|
||||
}
|
||||
if (Objects.equals(d.getAl2bit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "al2bit0", 5));
|
||||
}
|
||||
if (Objects.equals(d.getOp1bit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op1bit0", 6));
|
||||
}
|
||||
if (Objects.equals(d.getOp1bit1(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op1bit1", 7));
|
||||
}
|
||||
if (Objects.equals(d.getOp1bit6(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op1bit6", 6));
|
||||
}
|
||||
if (Objects.equals(d.getOp1bit7(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op1bit7", 7));
|
||||
}
|
||||
if (Objects.equals(d.getOp2bit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op2bit0", 8));
|
||||
}
|
||||
if (Objects.equals(d.getOp2bit1(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op2bit1", 9));
|
||||
}
|
||||
if (Objects.equals(d.getOp2bit6(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op2bit6", 8));
|
||||
}
|
||||
if (Objects.equals(d.getOp2bit7(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op2bit7", 9));
|
||||
}
|
||||
if (Objects.equals(d.getOp3bit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op3bit0", 10));
|
||||
}
|
||||
if (Objects.equals(d.getOp3bit1(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "op3bit1", 11));
|
||||
}
|
||||
if (Objects.equals(d.getTs1bit0(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "ts1bit0", 12));
|
||||
}
|
||||
if (Objects.equals(d.getTs1bit1(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "ts1bit1", 12));
|
||||
}
|
||||
if (Objects.equals(d.getTs1bit4(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "ts1bit4", 12));
|
||||
}
|
||||
if (Objects.equals(d.getTs1bit5(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "ts1bit5", 12));
|
||||
}
|
||||
if (Objects.equals(d.getTs1bit9(), 1)) {
|
||||
alarms.add(setParamCode(alarm, "ts1bit9", 12));
|
||||
}
|
||||
return alarms.stream();
|
||||
}).collect(Collectors.toList());
|
||||
this.saveBatch(alarmList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置监测参数和代码
|
||||
*
|
||||
* @param alarm
|
||||
* @param paramCode
|
||||
* @param alarmTypeCode 报警类型代码: 1:制动打开;2:限位到;3:超载报警;4:超速报警;5:偏斜报警;6:上升;7:下降;8:前移;9:后移;10:左移;11:右移;12:断开;
|
||||
* @return
|
||||
*/
|
||||
private BridgeCraneAlarm setParamCode(BridgeCraneAlarm alarm, String paramCode, int alarmTypeCode) {
|
||||
BridgeCraneAlarm clone = ObjUtil.clone(alarm);
|
||||
clone.setMonitorParamCode(paramCode);
|
||||
clone.setAlarmTypeCode(alarmTypeCode);
|
||||
return clone;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,111 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneDataDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDataVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.mapper.BridgeCraneDataMapper;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneAlarmService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneDataService;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 桥机工作循环数据
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BridgeCraneDataServiceImpl extends ServiceImpl<BridgeCraneDataMapper, BridgeCraneData> implements IBridgeCraneDataService {
|
||||
@Autowired
|
||||
private BridgeCraneDataMapper bridgeCraneDataMapper;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneAlarmService bridgeCraneAlarmService;
|
||||
|
||||
@Override
|
||||
public IPage<BridgeCraneDataVo> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneDataVo> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<BridgeCraneDataVo> page = PageUtil.getPage(param);
|
||||
IPage<BridgeCraneDataVo> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BridgeCraneDataVo> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneDataVo> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper, param));
|
||||
}
|
||||
|
||||
private QueryWrapper<BridgeCraneDataVo> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneDataVo> queryWrapper = QueryGenerator.initPageQueryWrapper(BridgeCraneDataVo.class, param, true);
|
||||
if (Objects.equals(MapUtils.getInteger(param, "mockDesc"), 1)) {
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(BridgeCraneDataVo::getMockTime));
|
||||
} else {
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(BridgeCraneDataVo::getId));
|
||||
}
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<BridgeCraneDataVo> dealList(List<BridgeCraneDataVo> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(BridgeCraneDataDto bridgeCraneDataDto) {
|
||||
bridgeCraneDataDto.setId(null);
|
||||
baseMapper.insert(bridgeCraneDataDto);
|
||||
List<BridgeCraneData> datas = new ArrayList<>();
|
||||
datas.add(bridgeCraneDataDto);
|
||||
bridgeCraneAlarmService.saveAlarmBatch(datas);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(BridgeCraneDataDto bridgeCraneDataDto) {
|
||||
BridgeCraneData oldBridgeCraneData = baseMapper.selectById(bridgeCraneDataDto.getId());
|
||||
if (oldBridgeCraneData == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(bridgeCraneDataDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
BridgeCraneData bridgeCraneData = baseMapper.selectById(id);
|
||||
if (bridgeCraneData == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BridgeCraneDataVo queryById(String id) {
|
||||
List<BridgeCraneDataVo> list = this.queryList(new MapBuilder<String, Object>()
|
||||
.put("id", id)
|
||||
.build());
|
||||
BridgeCraneDataVo entity = CollUtil.getFirst(list);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IBigDeviceDriverRecordService;
|
||||
import com.zhgd.xmgl.modules.bigdevice.service.IBigDeviceVideoService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneDev;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.BridgeCraneDevDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.BridgeCraneDevVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.mapper.BridgeCraneDevMapper;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneDevService;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 桥机设备
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BridgeCraneDevServiceImpl extends ServiceImpl<BridgeCraneDevMapper, BridgeCraneDev> implements IBridgeCraneDevService {
|
||||
@Autowired
|
||||
private BridgeCraneDevMapper bridgeCraneDevMapper;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBigDeviceVideoService bigDeviceVideoService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBigDeviceDriverRecordService bigDeviceDriverRecordService;
|
||||
|
||||
@Override
|
||||
public IPage<BridgeCraneDevVo> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneDevVo> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<BridgeCraneDevVo> page = PageUtil.getPage(param);
|
||||
IPage<BridgeCraneDevVo> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BridgeCraneDevVo> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneDevVo> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper, param));
|
||||
}
|
||||
|
||||
private QueryWrapper<BridgeCraneDevVo> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<BridgeCraneDevVo> queryWrapper = QueryGenerator.initPageQueryWrapper(BridgeCraneDevVo.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(BridgeCraneDevVo::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<BridgeCraneDevVo> dealList(List<BridgeCraneDevVo> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(BridgeCraneDevDto bridgeCraneDevDto) {
|
||||
bridgeCraneDevDto.setId(null);
|
||||
baseMapper.insert(bridgeCraneDevDto);
|
||||
bigDeviceVideoService.saveBigDeviceVideo(bridgeCraneDevDto.getVideoList(), bridgeCraneDevDto.getDevId(), bridgeCraneDevDto.getProjectSn(), 9);
|
||||
bigDeviceDriverRecordService.saveBigDeviceDriverRecord(bridgeCraneDevDto.getDriverList(), bridgeCraneDevDto.getDevId(), bridgeCraneDevDto.getProjectSn(), 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(BridgeCraneDevDto bridgeCraneDevDto) {
|
||||
BridgeCraneDev oldBridgeCraneDev = baseMapper.selectById(bridgeCraneDevDto.getId());
|
||||
if (oldBridgeCraneDev == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(bridgeCraneDevDto);
|
||||
bigDeviceVideoService.saveBigDeviceVideo(bridgeCraneDevDto.getVideoList(), bridgeCraneDevDto.getDevId(), bridgeCraneDevDto.getProjectSn(), 9);
|
||||
bigDeviceDriverRecordService.saveBigDeviceDriverRecord(bridgeCraneDevDto.getDriverList(), bridgeCraneDevDto.getDevId(), bridgeCraneDevDto.getProjectSn(), 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
BridgeCraneDev bridgeCraneDev = baseMapper.selectById(id);
|
||||
if (bridgeCraneDev == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BridgeCraneDevVo queryById(String id) {
|
||||
List<BridgeCraneDevVo> list = this.queryList(new MapBuilder<String, Object>()
|
||||
.put("id", id)
|
||||
.build());
|
||||
BridgeCraneDevVo entity = CollUtil.getFirst(list);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,111 @@
|
||||
package com.zhgd.xmgl.modules.bridgeCrane.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.MockBridgeCraneDataConfig;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.dto.MockBridgeCraneDataConfigDto;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.vo.MockBridgeCraneDataConfigVo;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.mapper.MockBridgeCraneDataConfigMapper;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IMockBridgeCraneDataConfigService;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import com.zhgd.xmgl.util.mysql.MysqlDataUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 模拟桥机工作循环数据配置
|
||||
* @author: pds
|
||||
* @date: 2025-09-13
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class MockBridgeCraneDataConfigServiceImpl extends ServiceImpl<MockBridgeCraneDataConfigMapper, MockBridgeCraneDataConfig> implements IMockBridgeCraneDataConfigService {
|
||||
@Autowired
|
||||
private MockBridgeCraneDataConfigMapper mockBridgeCraneDataConfigMapper;
|
||||
|
||||
@Override
|
||||
public IPage<MockBridgeCraneDataConfigVo> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockBridgeCraneDataConfigVo> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<MockBridgeCraneDataConfigVo> page = PageUtil.getPage(param);
|
||||
IPage<MockBridgeCraneDataConfigVo> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MockBridgeCraneDataConfigVo> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockBridgeCraneDataConfigVo> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper, param));
|
||||
}
|
||||
|
||||
private QueryWrapper<MockBridgeCraneDataConfigVo> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<MockBridgeCraneDataConfigVo> queryWrapper = QueryGenerator.initPageQueryWrapper(MockBridgeCraneDataConfigVo.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(MockBridgeCraneDataConfigVo::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<MockBridgeCraneDataConfigVo> dealList(List<MockBridgeCraneDataConfigVo> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(MockBridgeCraneDataConfigDto mockBridgeCraneDataConfigDto) {
|
||||
mockBridgeCraneDataConfigDto.setId(null);
|
||||
baseMapper.insert(mockBridgeCraneDataConfigDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(MockBridgeCraneDataConfigDto mockBridgeCraneDataConfigDto) {
|
||||
MockBridgeCraneDataConfig oldMockBridgeCraneDataConfig = baseMapper.selectById(mockBridgeCraneDataConfigDto.getId());
|
||||
if (oldMockBridgeCraneDataConfig == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(mockBridgeCraneDataConfigDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
MockBridgeCraneDataConfig mockBridgeCraneDataConfig = baseMapper.selectById(id);
|
||||
if (mockBridgeCraneDataConfig == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MockBridgeCraneDataConfigVo queryById(String id) {
|
||||
List<MockBridgeCraneDataConfigVo> list = this.queryList(new MapBuilder<String, Object>()
|
||||
.put("id", id)
|
||||
.build());
|
||||
MockBridgeCraneDataConfigVo entity = CollUtil.getFirst(list);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveEntity(MockBridgeCraneDataConfig config) {
|
||||
MockBridgeCraneDataConfig dbConfig = this.getOne(new LambdaQueryWrapper<MockBridgeCraneDataConfig>()
|
||||
.eq(MockBridgeCraneDataConfig::getProjectSn, config.getProjectSn()));
|
||||
if (dbConfig == null) {
|
||||
this.save(config);
|
||||
} else {
|
||||
config.setId(dbConfig.getId());
|
||||
this.updateById(config);
|
||||
}
|
||||
MysqlDataUtil.setFieldsToNull(this, config);
|
||||
}
|
||||
|
||||
}
|
||||
388
src/main/java/com/zhgd/xmgl/task/BridgeCraneTask.java
Normal file
388
src/main/java/com/zhgd/xmgl/task/BridgeCraneTask.java
Normal file
@ -0,0 +1,388 @@
|
||||
package com.zhgd.xmgl.task;
|
||||
|
||||
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.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.zhgd.jeecg.common.util.pass.HttpUtils;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneData;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.entity.BridgeCraneDev;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneAlarmService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneDataService;
|
||||
import com.zhgd.xmgl.modules.bridgeCrane.service.IBridgeCraneDevService;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.javacrumbs.shedlock.core.SchedulerLock;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("xmgl/task")
|
||||
public class BridgeCraneTask {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneDevService bridgeCraneDevService;
|
||||
/**
|
||||
* 睿郅盾的桥机token
|
||||
*/
|
||||
@Value("${rzdqjToken:}")
|
||||
private String rzdqjToken;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneDataService bridgeCraneDataService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBridgeCraneAlarmService bridgeCraneAlarmService;
|
||||
|
||||
/**
|
||||
* 获取睿郅盾的桥机实时数据
|
||||
*/
|
||||
@Scheduled(cron = "0 */5 * * * ?")
|
||||
@SchedulerLock(name = "getBridgeCraneDataTask", lockAtMostFor = 1000 * 60, lockAtLeastFor = 1000 * 60)
|
||||
@RequestMapping("getBridgeCraneDataTask")
|
||||
public void getBridgeCraneDataTask() {
|
||||
if (StrUtil.isBlank(rzdqjToken)) {
|
||||
return;
|
||||
}
|
||||
List<BridgeCraneData> addDatas = new ArrayList<>();
|
||||
Map<String, BridgeCraneDev> devMap = bridgeCraneDevService.list(new LambdaQueryWrapper<BridgeCraneDev>()).stream().collect(Collectors.toMap(BridgeCraneDev::getDevId, Function.identity(), (o1, o2) -> o1));
|
||||
String rqName = "睿郅盾请求桥机实时数据";
|
||||
String bodyRtStr = HttpUtils.sendPostBodyRtStr(rqName, "http://www.aqjkpt.com:26001/", null, 20000, null);
|
||||
List<RzdRspBody> rzdRspBodies = JSONArray.parseArray(bodyRtStr, RzdRspBody.class);
|
||||
for (RzdRspBody body : rzdRspBodies) {
|
||||
if (StrUtil.isNotBlank(body.getError())) {
|
||||
log.warn(rqName + "错误:{}", body.getError());
|
||||
return;
|
||||
}
|
||||
BridgeCraneDev dev = null;
|
||||
if (body.getCurrent() != null) {
|
||||
String devID = body.getCurrent().getDevID();
|
||||
dev = devMap.get(devID);
|
||||
if (dev != null) {
|
||||
BridgeCraneData data = buildData(body, dev.getProjectSn());
|
||||
addDatas.add(data);
|
||||
}
|
||||
}
|
||||
if (body.getMetadata() != null && dev != null) {
|
||||
RzdRspBody.Metadata metadata = body.getMetadata();
|
||||
dev.setDevModel(metadata.getDeviceModel());
|
||||
dev.setControlVoltage(Convert.toStr(metadata.getControlVoltage()));
|
||||
dev.setHoistingHeight(Convert.toStr(metadata.getHoistingHeight()));
|
||||
dev.setGetUpSpeed(Convert.toStr(metadata.getGetUpSpeed()));
|
||||
dev.setRunningSpeed(Convert.toStr(metadata.getRunningSpeed()));
|
||||
dev.setSpan(Convert.toStr(metadata.getSpan()));
|
||||
dev.setRatedLoad(Convert.toStr(metadata.getRatedLoad()));
|
||||
bridgeCraneDevService.updateById(dev);
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(addDatas)) {
|
||||
bridgeCraneDataService.saveBatch(addDatas);
|
||||
bridgeCraneAlarmService.saveAlarmBatch(addDatas);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 睿郅盾响应body构建data
|
||||
*
|
||||
* @param body
|
||||
* @param projectSn
|
||||
* @return
|
||||
*/
|
||||
private BridgeCraneData buildData(RzdRspBody body, String projectSn) {
|
||||
BridgeCraneData bridgeCraneData = new BridgeCraneData();
|
||||
bridgeCraneData.setProjectSn(projectSn);
|
||||
RzdRspBody.Current current = body.getCurrent();
|
||||
bridgeCraneData.setDevId(current.getDevID());
|
||||
bridgeCraneData.setDevType(current.getDevType());
|
||||
bridgeCraneData.setWorkTime(current.getWorkTime());
|
||||
bridgeCraneData.setCumulativeWorkingTime(current.getCumulativeWorkingTime());
|
||||
bridgeCraneData.setOperatingCycleNumber(current.getOperatingCycleNumber());
|
||||
bridgeCraneData.setAcquisitionModulesNumber(current.getAcquisitionModulesNumber());
|
||||
bridgeCraneData.setNeiweight1(current.getNeiweight1());
|
||||
bridgeCraneData.setNeiweight2(current.getNeiweight2());
|
||||
bridgeCraneData.setNeiweight5(current.getNeiweight5());
|
||||
bridgeCraneData.setDistance1(current.getDistance1());
|
||||
bridgeCraneData.setDistance2(current.getDistance2());
|
||||
bridgeCraneData.setDistance5(current.getDistance5());
|
||||
bridgeCraneData.setDistance6(current.getDistance6());
|
||||
bridgeCraneData.setDistance7(current.getDistance7());
|
||||
bridgeCraneData.setDistance10(current.getDistance10());
|
||||
bridgeCraneData.setDistance11(current.getDistance11());
|
||||
bridgeCraneData.setDistance12(current.getDistance12());
|
||||
bridgeCraneData.setDistance13(current.getDistance13());
|
||||
bridgeCraneData.setDistance14(current.getDistance14());
|
||||
bridgeCraneData.setSpeed1(current.getSpeed1());
|
||||
bridgeCraneData.setSpeed2(current.getSpeed2());
|
||||
bridgeCraneData.setBrbit0(current.getBrbit0());
|
||||
bridgeCraneData.setBrbit2(current.getBrbit2());
|
||||
bridgeCraneData.setLi1bit0(current.getLi1bit0());
|
||||
bridgeCraneData.setLi1bit1(current.getLi1bit1());
|
||||
bridgeCraneData.setLi1bit2(current.getLi1bit2());
|
||||
bridgeCraneData.setLi1bit3(current.getLi1bit3());
|
||||
bridgeCraneData.setLi1bit8(current.getLi1bit8());
|
||||
bridgeCraneData.setLi1bit10(current.getLi1bit10());
|
||||
bridgeCraneData.setLi1bit12(current.getLi1bit12());
|
||||
bridgeCraneData.setLi1bit13(current.getLi1bit13());
|
||||
bridgeCraneData.setLi2bit0(current.getLi2bit0());
|
||||
bridgeCraneData.setAl1bit0(current.getAl1bit0());
|
||||
bridgeCraneData.setAl1bit1(current.getAl1bit1());
|
||||
bridgeCraneData.setAl1bit4(current.getAl1bit4());
|
||||
bridgeCraneData.setAl1bit12(current.getAl1bit12());
|
||||
bridgeCraneData.setAl1bit13(current.getAl1bit13());
|
||||
bridgeCraneData.setAl2bit0(current.getAl2bit0());
|
||||
bridgeCraneData.setOp1bit0(current.getOp1bit0());
|
||||
bridgeCraneData.setOp1bit1(current.getOp1bit1());
|
||||
bridgeCraneData.setOp1bit6(current.getOp1bit6());
|
||||
bridgeCraneData.setOp1bit7(current.getOp1bit7());
|
||||
bridgeCraneData.setOp2bit0(current.getOp2bit0());
|
||||
bridgeCraneData.setOp2bit1(current.getOp2bit1());
|
||||
bridgeCraneData.setOp2bit6(current.getOp2bit6());
|
||||
bridgeCraneData.setOp2bit7(current.getOp2bit7());
|
||||
bridgeCraneData.setOp3bit0(current.getOp3bit0());
|
||||
bridgeCraneData.setOp3bit1(current.getOp3bit1());
|
||||
bridgeCraneData.setTs1bit0(current.getTs1bit0());
|
||||
bridgeCraneData.setTs1bit1(current.getTs1bit1());
|
||||
bridgeCraneData.setTs1bit4(current.getTs1bit4());
|
||||
bridgeCraneData.setTs1bit5(current.getTs1bit5());
|
||||
bridgeCraneData.setTs1bit9(current.getTs1bit9());
|
||||
bridgeCraneData.setUploadTime(DateUtil.parseDateTime(body.getTime()));
|
||||
return bridgeCraneData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 睿郅盾响应body
|
||||
*/
|
||||
@Data
|
||||
public static class RzdRspBody {
|
||||
private String error;
|
||||
private String DevUUID;
|
||||
/**
|
||||
* 设备标识
|
||||
*/
|
||||
private String uuid;
|
||||
/**
|
||||
* 数据采集时间, 格式yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String time;
|
||||
/**
|
||||
* 数据采集周期, 即下次数据上传间隔
|
||||
*/
|
||||
private String interval;
|
||||
/**
|
||||
* 实时数据
|
||||
*/
|
||||
private Current current;
|
||||
/**
|
||||
* 静态数据
|
||||
*/
|
||||
private Metadata metadata;
|
||||
|
||||
@Data
|
||||
public static class Current {
|
||||
|
||||
@JsonProperty("DevID")
|
||||
private String devID; // 设备ID 12位字符串
|
||||
|
||||
@JsonProperty("DevType")
|
||||
private String devType; // 设备类型 QJ
|
||||
|
||||
@JsonProperty("WorkTime")
|
||||
private Float workTime; // 本次工作时间 单位:0.1小时
|
||||
|
||||
@JsonProperty("CumulativeWorkingTime")
|
||||
private Float cumulativeWorkingTime; // 累计工作时间 单位:0.1小时
|
||||
|
||||
@JsonProperty("OperatingCycleNumber")
|
||||
private Integer operatingCycleNumber; // 工作循环次数 单位:次
|
||||
|
||||
@JsonProperty("AcquisitionModulesNumber")
|
||||
private Float acquisitionModulesNumber; // 数采终端数量 单位:个
|
||||
|
||||
@JsonProperty("Neiweight1")
|
||||
private Float neiweight1; // 前天车吊钩重量 单位:0.01t
|
||||
|
||||
@JsonProperty("Neiweight2")
|
||||
private Float neiweight2; // 后天车吊钩重量 单位:0.01t
|
||||
|
||||
@JsonProperty("Neiweight5")
|
||||
private Float neiweight5; // 总重量 单位:0.01t
|
||||
|
||||
@JsonProperty("Distance1")
|
||||
private Float distance1; // 前天车小车行程 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance2")
|
||||
private Float distance2; // 后天车小车行程 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance5")
|
||||
private Float distance5; // 前天车吊钩高度 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance6")
|
||||
private Float distance6; // 后天车吊钩高度 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance7")
|
||||
private Float distance7; // 大车行程 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance10")
|
||||
private Float distance10; // 前天车前部安全距离 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance11")
|
||||
private Float distance11; // 前天车后部安全距离 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance12")
|
||||
private Float distance12; // 后天车前部安全距离 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance13")
|
||||
private Float distance13; // 后天车后部安全距离 单位:0.01m
|
||||
|
||||
@JsonProperty("Distance14")
|
||||
private Float distance14; // 大车偏斜行程 单位:0.01m
|
||||
|
||||
@JsonProperty("Speed1")
|
||||
private Float speed1; // 前天车吊钩速度 单位:0.01m/s
|
||||
|
||||
@JsonProperty("Speed2")
|
||||
private Float speed2; // 后天车吊钩速度 单位:0.01m/s
|
||||
|
||||
// 位状态字段
|
||||
@JsonProperty("BRbit0")
|
||||
private Integer brbit0; // 前天车吊钩制动 0-制动关闭;1-制动打开
|
||||
|
||||
@JsonProperty("BRbit2")
|
||||
private Integer brbit2; // 后天车吊钩制动 0-制动关闭;1-制动打开
|
||||
|
||||
@JsonProperty("LI1bit0")
|
||||
private Integer li1bit0; // 前天车前限位 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("LI1bit1")
|
||||
private Integer li1bit1; // 前天车后限位 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("LI1bit2")
|
||||
private Integer li1bit2; // 后天车前限位 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("LI1bit3")
|
||||
private Integer li1bit3; // 后天车后限位 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("LI1bit8")
|
||||
private Integer li1bit8; // 前天车吊钩上限位 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("LI1bit10")
|
||||
private Integer li1bit10; // 后天车吊钩上限位 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("LI1bit12")
|
||||
private Integer li1bit12; // 大车左限 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("LI1bit13")
|
||||
private Integer li1bit13; // 大车右限 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("LI2bit0")
|
||||
private Integer li2bit0; // 司机室门限位 0-正常;1-限位到;
|
||||
|
||||
@JsonProperty("AL1bit0")
|
||||
private Integer al1bit0; // 前天车吊钩超载 0-正常;1-超载报警;
|
||||
|
||||
@JsonProperty("AL1bit1")
|
||||
private Integer al1bit1; // 后天车吊钩超载 0-正常;1-超载报警;
|
||||
|
||||
@JsonProperty("AL1bit4")
|
||||
private Integer al1bit4; // 整车吊重超载 0-正常;1-超载报警;
|
||||
|
||||
@JsonProperty("AL1bit12")
|
||||
private Integer al1bit12; // 前天车吊钩超速报警 0-正常;1-超速报警;
|
||||
|
||||
@JsonProperty("AL1bit13")
|
||||
private Integer al1bit13; // 后天车吊钩超速报警 0-正常;1-超速报警;
|
||||
|
||||
@JsonProperty("AL2bit0")
|
||||
private Integer al2bit0; // 整车偏斜报警 0-正常;1-偏斜报警;
|
||||
|
||||
@JsonProperty("OP1bit0")
|
||||
private Integer op1bit0; // 前天车上升 0-不动;1-上升
|
||||
|
||||
@JsonProperty("OP1bit1")
|
||||
private Integer op1bit1; // 前天车下降 0-不动;1-下降
|
||||
|
||||
@JsonProperty("OP1bit6")
|
||||
private Integer op1bit6; // 后天车上升 0-不动;1-上升
|
||||
|
||||
@JsonProperty("OP1bit7")
|
||||
private Integer op1bit7; // 后天车下降 0-不动;1-下降
|
||||
|
||||
@JsonProperty("OP2bit0")
|
||||
private Integer op2bit0; // 前天车前移 0-不动;1-前移
|
||||
|
||||
@JsonProperty("OP2bit1")
|
||||
private Integer op2bit1; // 前天车后移 0-不动;1-后移
|
||||
|
||||
@JsonProperty("OP2bit6")
|
||||
private Integer op2bit6; // 后天车前移 0-不动;1-前移
|
||||
|
||||
@JsonProperty("OP2bit7")
|
||||
private Integer op2bit7; // 后天车后移 0-不动;1-后移
|
||||
|
||||
@JsonProperty("OP3bit0")
|
||||
private Integer op3bit0; // 大车左移 0-不动;1-左移
|
||||
|
||||
@JsonProperty("OP3bit1")
|
||||
private Integer op3bit1; // 大车右移 0-不动;1-右移
|
||||
|
||||
// 可选的终端状态字段
|
||||
@JsonProperty("TS1bit0")
|
||||
private Integer ts1bit0; // 报警终端 0-连接;1-断开
|
||||
|
||||
@JsonProperty("TS1bit1")
|
||||
private Integer ts1bit1; // 风速采集终端 0-连接;1-断开
|
||||
|
||||
@JsonProperty("TS1bit4")
|
||||
private Integer ts1bit4; // 前天车数采终端 0-连接;1-断开
|
||||
|
||||
@JsonProperty("TS1bit5")
|
||||
private Integer ts1bit5; // 后天车数采终端 0-连接;1-断开
|
||||
|
||||
@JsonProperty("TS1bit9")
|
||||
private Integer ts1bit9; // 司机室数采终端 0-连接;1-断开
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Metadata {
|
||||
@JsonProperty("Name")
|
||||
private String name; // 设备昵称 厂商定义(必须)
|
||||
|
||||
@JsonProperty("DeviceModel")
|
||||
private String deviceModel; // 设备型号 厂商定义(必须)
|
||||
|
||||
@JsonProperty("RatedLoad")
|
||||
private Float ratedLoad; // 额定起重量 单位:T
|
||||
|
||||
@JsonProperty("ControlVoltage")
|
||||
private Integer controlVoltage; // 控制电压 单位:V
|
||||
|
||||
@JsonProperty("HoistingHeight")
|
||||
private Float hoistingHeight; // 起升高度 单位:0.01m
|
||||
|
||||
@JsonProperty("GetUpSpeed")
|
||||
private Float getUpSpeed; // 起升速度 单位:0.1m/s
|
||||
|
||||
@JsonProperty("RunningSpeed")
|
||||
private Float runningSpeed; // 运行速度 单位:0.1m/s
|
||||
|
||||
@JsonProperty("Span")
|
||||
private Float span; // 跨度 单位:0.01m
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user