Compare commits
No commits in common. "8bc91b3bac10270af6ef32086c521cc6b32455af" and "952b5dec28c038c18fe9f5748152110df2adf28d" have entirely different histories.
8bc91b3bac
...
952b5dec28
@ -1,72 +0,0 @@
|
|||||||
package com.imdroid.secapi.dto;
|
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GNSS状态消息,每个工作周期开始时上报一次
|
|
||||||
*
|
|
||||||
* @author LiGang
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName(value = "surface_incline_data")
|
|
||||||
public class SurfaceInclineData {
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
@ExcelIgnore
|
|
||||||
Long id;
|
|
||||||
|
|
||||||
@ExcelProperty("租户id")
|
|
||||||
Integer tenantid;
|
|
||||||
|
|
||||||
@ExcelProperty("上报时间")
|
|
||||||
LocalDateTime createtime;
|
|
||||||
|
|
||||||
@ExcelProperty("设备编号")
|
|
||||||
String deviceid;
|
|
||||||
|
|
||||||
@ExcelProperty("传感器号")
|
|
||||||
Short sensorid;
|
|
||||||
|
|
||||||
@ExcelProperty("倾角X")
|
|
||||||
Float anglex;
|
|
||||||
|
|
||||||
@ExcelProperty("倾角Y")
|
|
||||||
Float angley;
|
|
||||||
|
|
||||||
@ExcelProperty("倾角Z")
|
|
||||||
Float anglez;
|
|
||||||
|
|
||||||
@ExcelProperty("加速度X")
|
|
||||||
Float accx;
|
|
||||||
|
|
||||||
@ExcelProperty("加速度Y")
|
|
||||||
Float accy;
|
|
||||||
|
|
||||||
@ExcelProperty("加速度Z")
|
|
||||||
Float accz;
|
|
||||||
|
|
||||||
@ExcelProperty("MaxX")
|
|
||||||
Float maxaccx;
|
|
||||||
|
|
||||||
@ExcelProperty("MaxY")
|
|
||||||
Float maxaccy;
|
|
||||||
|
|
||||||
@ExcelProperty("MaxZ")
|
|
||||||
Float maxaccz;
|
|
||||||
|
|
||||||
@ExcelProperty("MinX")
|
|
||||||
Float minaccx;
|
|
||||||
|
|
||||||
@ExcelProperty("MinY")
|
|
||||||
Float minaccy;
|
|
||||||
|
|
||||||
@ExcelProperty("MinZ")
|
|
||||||
Float minaccz;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
package com.imdroid.secapi.dto;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface SurfaceInclineDataMapper extends BaseMapper<SurfaceInclineData> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,161 +0,0 @@
|
|||||||
package com.imdroid.beidou_fwd.task;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.imdroid.beidou_fwd.entity.XFZData;
|
|
||||||
import com.imdroid.beidou_fwd.service.TCPClient;
|
|
||||||
import com.imdroid.common.util.GsonUtil;
|
|
||||||
import com.imdroid.common.util.NumberUtils;
|
|
||||||
import com.imdroid.secapi.dto.GnssCalcData;
|
|
||||||
import com.imdroid.secapi.dto.ResendRecord;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@Configuration
|
|
||||||
@EnableScheduling
|
|
||||||
public class GXJS10mForwarder extends GXXfzForwarder{
|
|
||||||
private final String FORWARDER_NAME = "广西新发展10分钟推送";
|
|
||||||
@Value("${xfz.server.host}")
|
|
||||||
private String host;
|
|
||||||
|
|
||||||
@Value("${xfz.server.port}")
|
|
||||||
private int port;
|
|
||||||
private boolean enabled=true;
|
|
||||||
|
|
||||||
@PostConstruct
|
|
||||||
void registerMe(){
|
|
||||||
init(FORWARDER_NAME, "TCP "+host+":"+port,1,FWD_DEVICE_ID,10);
|
|
||||||
xfzTcpClient = new TCPClient();
|
|
||||||
xfzTcpClient.init(host, port,listener);
|
|
||||||
if(!enabled) return;
|
|
||||||
|
|
||||||
xfzTcpClient.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 每半小时转发GNSS解算结果
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0 0/10 * * * ?") // 每10分钟执行一次
|
|
||||||
private void forwardGnss() {
|
|
||||||
if(!enabled) return;
|
|
||||||
logger.debug("gxjs forwardGnss");
|
|
||||||
forwardCurrentGnss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int send(String projectId, List<GnssCalcData> records, LocalDateTime sentTime){
|
|
||||||
int batchNum = 0;
|
|
||||||
int sendNum = 0;
|
|
||||||
if(records.size() == 0) return 0;
|
|
||||||
|
|
||||||
XFZData xfzTcpMessage = new XFZData();
|
|
||||||
xfzTcpMessage.setProjectID(projectId);
|
|
||||||
xfzTcpMessage.setWorkPointID(projectId);
|
|
||||||
|
|
||||||
List<XFZData.Data> dataList = new ArrayList<>(records.size());
|
|
||||||
xfzTcpMessage.setData(dataList);
|
|
||||||
|
|
||||||
for(GnssCalcData locationRecord: records) {
|
|
||||||
XFZData.Data data = new XFZData.Data();
|
|
||||||
dataList.add(data);
|
|
||||||
data.setDataTime(locationRecord.getCreatetime().format(formatter));
|
|
||||||
data.setDevNum(locationRecord.getDeviceid());
|
|
||||||
data.setDevtype("GNSS");
|
|
||||||
// 单位由mm转化为m
|
|
||||||
data.setX(NumberUtils.scale(locationRecord.getRpose() * 0.001, 5));
|
|
||||||
data.setY(NumberUtils.scale(locationRecord.getRposn() * 0.001, 5));
|
|
||||||
data.setZ(NumberUtils.scale(locationRecord.getRposd() * 0.001, 5));
|
|
||||||
// 经纬度
|
|
||||||
data.setDevLng(locationRecord.getR9250e());
|
|
||||||
data.setDevLat(locationRecord.getR9250n());
|
|
||||||
|
|
||||||
if(projectId!=null && projectId.equals("20257071")) {
|
|
||||||
//倾角
|
|
||||||
XFZData.Data data2 = new XFZData.Data();
|
|
||||||
dataList.add(data2);
|
|
||||||
data2.setDataTime(locationRecord.getCreatetime().format(formatter));
|
|
||||||
data2.setDevNum(locationRecord.getDeviceid() + "_qj");
|
|
||||||
data2.setDevtype("InclinoMeter");
|
|
||||||
// 角度
|
|
||||||
data2.setX(NumberUtils.scale(locationRecord.getAuxe(), 3));
|
|
||||||
data2.setY(NumberUtils.scale(locationRecord.getAuxn(), 3));
|
|
||||||
data2.setZ(NumberUtils.scale(locationRecord.getAuxd(), 3));
|
|
||||||
// 经纬度
|
|
||||||
data2.setDevLng(locationRecord.getR9250e());
|
|
||||||
data2.setDevLat(locationRecord.getR9250n());
|
|
||||||
}
|
|
||||||
// 发送
|
|
||||||
batchNum++;
|
|
||||||
|
|
||||||
if(batchNum==20){
|
|
||||||
String json = "#" + GsonUtil.toJson(xfzTcpMessage) + "!";
|
|
||||||
//logger.debug("project {}: forwad {} gnss records to {}",projectId, dataList.size(),fwdGroupId);
|
|
||||||
//logger.debug(json);
|
|
||||||
try {
|
|
||||||
listener.clear();
|
|
||||||
xfzTcpClient.writeAndFlush(json);
|
|
||||||
//等待应答
|
|
||||||
if(checkResult()) sendNum += batchNum;
|
|
||||||
} catch (Exception e1) {
|
|
||||||
logger.error(e1.toString());
|
|
||||||
}
|
|
||||||
batchNum = 0;
|
|
||||||
dataList.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(batchNum>0){
|
|
||||||
String json = "#" + GsonUtil.toJson(xfzTcpMessage) + "!";
|
|
||||||
logger.debug("project {}: forwad {} gnss records to {}",projectId, dataList.size(),fwdGroupId);
|
|
||||||
logger.debug(json);
|
|
||||||
try {
|
|
||||||
listener.clear();
|
|
||||||
xfzTcpClient.writeAndFlush(json);
|
|
||||||
//等待应答
|
|
||||||
if(checkResult()) sendNum += batchNum;
|
|
||||||
} catch (Exception e1) {
|
|
||||||
logger.error(e1.toString());
|
|
||||||
}
|
|
||||||
dataList.clear();
|
|
||||||
}
|
|
||||||
return sendNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
void forwardHistoryGnss(){
|
|
||||||
// 1.从转发记录表里检索待补传记录时间表,含设备Id,时间段
|
|
||||||
QueryWrapper<ResendRecord> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("fwd_group_id",fwdGroupId);
|
|
||||||
queryWrapper.eq("state",ResendRecord.STATE_BREAK_POINT);
|
|
||||||
queryWrapper.ge("createtime", LocalDateTime.now().minusDays(30));
|
|
||||||
List<ResendRecord> resendRecordsList = resendRecordMapper.selectList(queryWrapper);
|
|
||||||
|
|
||||||
if(resendRecordsList!=null && resendRecordsList.size()>0){
|
|
||||||
//修改状态
|
|
||||||
UpdateWrapper<ResendRecord> updateWrapper = new UpdateWrapper<>();
|
|
||||||
updateWrapper.eq("fwd_group_id",fwdGroupId);
|
|
||||||
updateWrapper.eq("state",ResendRecord.STATE_BREAK_POINT);
|
|
||||||
updateWrapper.ge("createtime", LocalDateTime.now().minusDays(30));
|
|
||||||
updateWrapper.set("state",ResendRecord.STATE_FWDING);
|
|
||||||
int updateNum = resendRecordMapper.update(null, updateWrapper);
|
|
||||||
logger.debug("{} forward history records: {}, update {}",fwdGroupId, resendRecordsList.size(),updateNum);
|
|
||||||
// 2.检索这个这个时间段的解算结果,如果有数据则单个终端转发,标志记录为已补传
|
|
||||||
for(ResendRecord record:resendRecordsList){
|
|
||||||
if(record.getProjectid()!=null)
|
|
||||||
logger.debug("{} forward history {}",fwdGroupId, record.getProjectid());
|
|
||||||
forwardBatchGnssRecords(record);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -17,7 +17,6 @@ import org.springframework.stereotype.Component;
|
|||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@ -25,8 +24,6 @@ import java.util.List;
|
|||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
public class GXJSForwarder extends GXXfzForwarder{
|
public class GXJSForwarder extends GXXfzForwarder{
|
||||||
private final String FORWARDER_NAME = "广西新发展";
|
private final String FORWARDER_NAME = "广西新发展";
|
||||||
private final String inclineProjects = "20257071,20251131";
|
|
||||||
private HashSet<String> inclineProjectSet = new HashSet<>();
|
|
||||||
@Value("${xfz.server.host}")
|
@Value("${xfz.server.host}")
|
||||||
private String host;
|
private String host;
|
||||||
|
|
||||||
@ -42,12 +39,6 @@ public class GXJSForwarder extends GXXfzForwarder{
|
|||||||
if(!enabled) return;
|
if(!enabled) return;
|
||||||
|
|
||||||
xfzTcpClient.start();
|
xfzTcpClient.start();
|
||||||
|
|
||||||
// incline devices
|
|
||||||
String[] inclineDeviceList = inclineProjects.split(",");
|
|
||||||
for(String s:inclineDeviceList){
|
|
||||||
inclineProjectSet.add(s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -87,7 +78,7 @@ public class GXJSForwarder extends GXXfzForwarder{
|
|||||||
data.setDevLng(locationRecord.getR9250e());
|
data.setDevLng(locationRecord.getR9250e());
|
||||||
data.setDevLat(locationRecord.getR9250n());
|
data.setDevLat(locationRecord.getR9250n());
|
||||||
|
|
||||||
if(projectId!=null && inclineProjectSet.contains(projectId)) {
|
if(projectId!=null && projectId.equals("20257071")) {
|
||||||
//倾角
|
//倾角
|
||||||
XFZData.Data data2 = new XFZData.Data();
|
XFZData.Data data2 = new XFZData.Data();
|
||||||
dataList.add(data2);
|
dataList.add(data2);
|
||||||
|
|||||||
@ -1,42 +0,0 @@
|
|||||||
package com.imdroid.beidou_fwd.task;
|
|
||||||
|
|
||||||
import com.imdroid.beidou_fwd.service.TCPClient;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@Configuration
|
|
||||||
@EnableScheduling
|
|
||||||
public class GZB10mForwarder extends GXXfzForwarder{
|
|
||||||
private final String FORWARDER_NAME = "葛洲坝10分钟";
|
|
||||||
@Value("${gzb.server.host}")
|
|
||||||
private String host;
|
|
||||||
|
|
||||||
@Value("${gzb.server.port}")
|
|
||||||
private int port;
|
|
||||||
private boolean enabled=true;
|
|
||||||
|
|
||||||
@PostConstruct
|
|
||||||
void registerMe(){
|
|
||||||
init(FORWARDER_NAME, "TCP "+host+":"+port,1,FWD_DEVICE_ID,10);
|
|
||||||
xfzTcpClient = new TCPClient();
|
|
||||||
xfzTcpClient.init(host, port,listener);
|
|
||||||
if(!enabled) return;
|
|
||||||
xfzTcpClient.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 每半小时转发GNSS解算结果
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0 0/10 * * * ?") // 每10分钟执行一次
|
|
||||||
private void forwardGnss() {
|
|
||||||
if(!enabled) return;
|
|
||||||
logger.debug("gzb forwardGnss");
|
|
||||||
forwardCurrentGnss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -67,7 +67,7 @@ public class GZYMQTTForwarder extends Forwarder {
|
|||||||
logger.debug("gzy mqtt forwardGnss");
|
logger.debug("gzy mqtt forwardGnss");
|
||||||
if(mqttClient.isConnected()) {
|
if(mqttClient.isConnected()) {
|
||||||
forwardCurrentGnss();
|
forwardCurrentGnss();
|
||||||
forwardAngleData();
|
//forwardAngleData();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
try{
|
try{
|
||||||
@ -130,7 +130,6 @@ public class GZYMQTTForwarder extends Forwarder {
|
|||||||
|
|
||||||
GZYMQTTAngle tranData = new GZYMQTTAngle();
|
GZYMQTTAngle tranData = new GZYMQTTAngle();
|
||||||
tranData.setDeviceSn(msg.getDeviceid());
|
tranData.setDeviceSn(msg.getDeviceid());
|
||||||
tranData.setDeviceType(8);
|
|
||||||
tranData.setCollectTime(msg.getCreatetime().format(formatter));
|
tranData.setCollectTime(msg.getCreatetime().format(formatter));
|
||||||
float x = msg.getRoll()==null?0:msg.getRoll();
|
float x = msg.getRoll()==null?0:msg.getRoll();
|
||||||
float y = msg.getPitch()==null?0:msg.getPitch();
|
float y = msg.getPitch()==null?0:msg.getPitch();
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import java.util.List;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
public class GZYMqttTestForwarder extends Forwarder {
|
public class GZYMqttTestForwarder extends Forwarder {
|
||||||
static final String FORWARDER_NAME = "贵州交勘院MQTT测试平台";
|
static final String FORWARDER_NAME = "贵州交勘院MQTT";
|
||||||
@Value("${gzymqtttest.server.brokerUrl}")
|
@Value("${gzymqtttest.server.brokerUrl}")
|
||||||
private String brokerUrl;
|
private String brokerUrl;
|
||||||
@Value("${gzymqtttest.server.username}")
|
@Value("${gzymqtttest.server.username}")
|
||||||
|
|||||||
@ -1,160 +0,0 @@
|
|||||||
package com.imdroid.beidou_fwd.task;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.imdroid.beidou_fwd.entity.XFZData;
|
|
||||||
import com.imdroid.beidou_fwd.service.TCPClient;
|
|
||||||
import com.imdroid.common.util.GsonUtil;
|
|
||||||
import com.imdroid.common.util.NumberUtils;
|
|
||||||
import com.imdroid.secapi.dto.GnssCalcData;
|
|
||||||
import com.imdroid.secapi.dto.ResendRecord;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@Configuration
|
|
||||||
@EnableScheduling
|
|
||||||
public class GZYZForwarder extends GXXfzForwarder{
|
|
||||||
private final String FORWARDER_NAME = "广州英卓";
|
|
||||||
@Value("${gzyz.server.host}")
|
|
||||||
private String host;
|
|
||||||
|
|
||||||
@Value("${gzyz.server.port}")
|
|
||||||
private int port;
|
|
||||||
private boolean enabled=true;
|
|
||||||
|
|
||||||
@PostConstruct
|
|
||||||
void registerMe(){
|
|
||||||
init(FORWARDER_NAME, "TCP "+host+":"+port,14,FWD_DEVICE_ID,30);
|
|
||||||
xfzTcpClient = new TCPClient();
|
|
||||||
xfzTcpClient.init(host, port,listener);
|
|
||||||
if(!enabled) return;
|
|
||||||
|
|
||||||
xfzTcpClient.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 每半小时转发GNSS解算结果
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0 0/30 * * * ?") // 每30分钟执行一次
|
|
||||||
private void forwardGnss() {
|
|
||||||
if(!enabled) return;
|
|
||||||
logger.debug("gzyz forwardGnss");
|
|
||||||
forwardCurrentGnss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int send(String projectId, List<GnssCalcData> records, LocalDateTime sentTime){
|
|
||||||
int batchNum = 0;
|
|
||||||
int sendNum = 0;
|
|
||||||
if(records.size() == 0) return 0;
|
|
||||||
|
|
||||||
XFZData xfzTcpMessage = new XFZData();
|
|
||||||
xfzTcpMessage.setProjectID(projectId);
|
|
||||||
xfzTcpMessage.setWorkPointID(projectId);
|
|
||||||
|
|
||||||
List<XFZData.Data> dataList = new ArrayList<>(records.size());
|
|
||||||
xfzTcpMessage.setData(dataList);
|
|
||||||
|
|
||||||
for(GnssCalcData locationRecord: records) {
|
|
||||||
XFZData.Data data = new XFZData.Data();
|
|
||||||
dataList.add(data);
|
|
||||||
data.setDataTime(locationRecord.getCreatetime().format(formatter));
|
|
||||||
data.setDevNum(locationRecord.getDeviceid());
|
|
||||||
data.setDevtype("GNSS");
|
|
||||||
// 单位由mm转化为m
|
|
||||||
data.setX(NumberUtils.scale(locationRecord.getRpose() * 0.001, 5));
|
|
||||||
data.setY(NumberUtils.scale(locationRecord.getRposn() * 0.001, 5));
|
|
||||||
data.setZ(NumberUtils.scale(locationRecord.getRposd() * 0.001, 5));
|
|
||||||
// 经纬度
|
|
||||||
data.setDevLng(locationRecord.getR9250e());
|
|
||||||
data.setDevLat(locationRecord.getR9250n());
|
|
||||||
|
|
||||||
//倾角
|
|
||||||
XFZData.Data data2 = new XFZData.Data();
|
|
||||||
dataList.add(data2);
|
|
||||||
data2.setDataTime(locationRecord.getCreatetime().format(formatter));
|
|
||||||
data2.setDevNum(locationRecord.getDeviceid() + "_qj");
|
|
||||||
data2.setDevtype("InclinoMeter");
|
|
||||||
// 角度
|
|
||||||
data2.setX(NumberUtils.scale(locationRecord.getAuxe(), 3));
|
|
||||||
data2.setY(NumberUtils.scale(locationRecord.getAuxn(), 3));
|
|
||||||
data2.setZ(NumberUtils.scale(locationRecord.getAuxd(), 3));
|
|
||||||
// 经纬度
|
|
||||||
data2.setDevLng(locationRecord.getR9250e());
|
|
||||||
data2.setDevLat(locationRecord.getR9250n());
|
|
||||||
|
|
||||||
// 发送
|
|
||||||
batchNum++;
|
|
||||||
|
|
||||||
if(batchNum==20){
|
|
||||||
String json = "#" + GsonUtil.toJson(xfzTcpMessage) + "!";
|
|
||||||
//logger.debug("project {}: forwad {} gnss records to {}",projectId, dataList.size(),fwdGroupId);
|
|
||||||
//logger.debug(json);
|
|
||||||
try {
|
|
||||||
listener.clear();
|
|
||||||
xfzTcpClient.writeAndFlush(json);
|
|
||||||
//等待应答
|
|
||||||
if(checkResult()) sendNum += batchNum;
|
|
||||||
} catch (Exception e1) {
|
|
||||||
logger.error(e1.toString());
|
|
||||||
}
|
|
||||||
batchNum = 0;
|
|
||||||
dataList.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(batchNum>0){
|
|
||||||
String json = "#" + GsonUtil.toJson(xfzTcpMessage) + "!";
|
|
||||||
logger.debug("project {}: forwad {} gnss records to {}",projectId, dataList.size(),fwdGroupId);
|
|
||||||
logger.debug(json);
|
|
||||||
try {
|
|
||||||
listener.clear();
|
|
||||||
xfzTcpClient.writeAndFlush(json);
|
|
||||||
//等待应答
|
|
||||||
if(checkResult()) sendNum += batchNum;
|
|
||||||
} catch (Exception e1) {
|
|
||||||
logger.error(e1.toString());
|
|
||||||
}
|
|
||||||
dataList.clear();
|
|
||||||
}
|
|
||||||
return sendNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
void forwardHistoryGnss(){
|
|
||||||
// 1.从转发记录表里检索待补传记录时间表,含设备Id,时间段
|
|
||||||
QueryWrapper<ResendRecord> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("fwd_group_id",fwdGroupId);
|
|
||||||
queryWrapper.eq("state",ResendRecord.STATE_BREAK_POINT);
|
|
||||||
queryWrapper.ge("createtime", LocalDateTime.now().minusDays(30));
|
|
||||||
List<ResendRecord> resendRecordsList = resendRecordMapper.selectList(queryWrapper);
|
|
||||||
|
|
||||||
if(resendRecordsList!=null && resendRecordsList.size()>0){
|
|
||||||
//修改状态
|
|
||||||
UpdateWrapper<ResendRecord> updateWrapper = new UpdateWrapper<>();
|
|
||||||
updateWrapper.eq("fwd_group_id",fwdGroupId);
|
|
||||||
updateWrapper.eq("state",ResendRecord.STATE_BREAK_POINT);
|
|
||||||
updateWrapper.ge("createtime", LocalDateTime.now().minusDays(30));
|
|
||||||
updateWrapper.set("state",ResendRecord.STATE_FWDING);
|
|
||||||
int updateNum = resendRecordMapper.update(null, updateWrapper);
|
|
||||||
logger.debug("{} forward history records: {}, update {}",fwdGroupId, resendRecordsList.size(),updateNum);
|
|
||||||
// 2.检索这个这个时间段的解算结果,如果有数据则单个终端转发,标志记录为已补传
|
|
||||||
for(ResendRecord record:resendRecordsList){
|
|
||||||
if(record.getProjectid()!=null)
|
|
||||||
logger.debug("{} forward history {}",fwdGroupId, record.getProjectid());
|
|
||||||
forwardBatchGnssRecords(record);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -37,11 +37,6 @@ public class Gga {
|
|||||||
private int quality=0;
|
private int quality=0;
|
||||||
private int satellitesInUsed=0;
|
private int satellitesInUsed=0;
|
||||||
|
|
||||||
/**
|
|
||||||
* 大地水准面相对椭球面的高度
|
|
||||||
*/
|
|
||||||
private double geoidSeparation = 0;
|
|
||||||
|
|
||||||
public Gga() {
|
public Gga() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,8 +94,8 @@ public class Gga {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ggaStr != null){
|
if(ggaStr != null){
|
||||||
String[] params = ggaStr.split(",", 14);
|
String[] params = ggaStr.split(",",11);
|
||||||
if(params.length >= 12){
|
if(params.length == 11){
|
||||||
Gga gga = new Gga();
|
Gga gga = new Gga();
|
||||||
try {
|
try {
|
||||||
gga.setLatitude(transGGAPos(Double.parseDouble(params[2])));
|
gga.setLatitude(transGGAPos(Double.parseDouble(params[2])));
|
||||||
@ -108,7 +103,6 @@ public class Gga {
|
|||||||
gga.setAltitude(Double.parseDouble(params[9]));
|
gga.setAltitude(Double.parseDouble(params[9]));
|
||||||
gga.setQuality(Integer.parseInt(params[6]));
|
gga.setQuality(Integer.parseInt(params[6]));
|
||||||
gga.setSatellitesInUsed(Integer.parseInt(params[7]));
|
gga.setSatellitesInUsed(Integer.parseInt(params[7]));
|
||||||
gga.setGeoidSeparation(Double.parseDouble(params[11]));
|
|
||||||
return gga;
|
return gga;
|
||||||
}
|
}
|
||||||
catch (Exception e){
|
catch (Exception e){
|
||||||
|
|||||||
@ -116,10 +116,10 @@ public class D331RtcmMessageExecutor implements Executor<D331RtcmMessage, Void>
|
|||||||
deviceBs.setLatitude(gga.getLatitude());
|
deviceBs.setLatitude(gga.getLatitude());
|
||||||
deviceBs.setLongitude(gga.getLongitude());
|
deviceBs.setLongitude(gga.getLongitude());
|
||||||
deviceBs.setAltitude(gga.getAltitude());
|
deviceBs.setAltitude(gga.getAltitude());
|
||||||
deviceBs.setGeoidSeparation(gga.getGeoidSeparation());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加NTRIP处理
|
// 添加NTRIP处理
|
||||||
|
|
||||||
if(deviceBs.getForwardToNtrip()) {
|
if(deviceBs.getForwardToNtrip()) {
|
||||||
byte[] srcdata = message.getSrcData();
|
byte[] srcdata = message.getSrcData();
|
||||||
String rtcm = ByteUtil.bytesToHexString(srcdata);
|
String rtcm = ByteUtil.bytesToHexString(srcdata);
|
||||||
|
|||||||
@ -1,47 +0,0 @@
|
|||||||
package com.imdroid.sideslope.executor;
|
|
||||||
|
|
||||||
import com.imdroid.common.util.ThreadManager;
|
|
||||||
import com.imdroid.secapi.dto.*;
|
|
||||||
import com.imdroid.sideslope.message.D350SurfaceInclineMessage;
|
|
||||||
import com.imdroid.sideslope.service.Device;
|
|
||||||
import com.imdroid.sideslope.service.DeviceService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Layton
|
|
||||||
* @date 2023/2/2 20:40
|
|
||||||
* 1、回ACK,以便终端判断是否连接上服务器后台
|
|
||||||
* 2、同步参数
|
|
||||||
* 3、判断是否发冷启动指令
|
|
||||||
* 4、保存状态信息,判断是否有低电压等告警,清除离线告警
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
public class D350SurfaceInclineMessageExecutor implements Executor<D350SurfaceInclineMessage, Void> {
|
|
||||||
@Autowired
|
|
||||||
SurfaceInclineDataMapper dataMapper;
|
|
||||||
@Autowired
|
|
||||||
private DeviceService deviceService;
|
|
||||||
@Override
|
|
||||||
public Void execute(D350SurfaceInclineMessage message) {
|
|
||||||
Device device = deviceService.findByDeviceId(message.getId());
|
|
||||||
if(device == null) return null;
|
|
||||||
// 补齐tenantId
|
|
||||||
message.getInclineData().setTenantid(device.getTenantId());
|
|
||||||
|
|
||||||
ThreadManager.getFixedThreadPool().submit(() -> {
|
|
||||||
|
|
||||||
//保存状态信息,判断是否有低电压等告警,清除离线告警
|
|
||||||
dataMapper.insert(message.getInclineData());
|
|
||||||
});
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Class<?> getMessageType() {
|
|
||||||
return D350SurfaceInclineMessage.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.imdroid.sideslope.executor;
|
||||||
|
|
||||||
|
import com.imdroid.sideslope.message.D350TestMessage;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Layton
|
||||||
|
* @date 2023/2/2 20:40
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class D350TestMessageExecutor implements Executor<D350TestMessage, Void> {
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Void execute(D350TestMessage message) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("device {} max acc(g) in 1s: x={},y={},z={}",message.getId(),
|
||||||
|
message.getAccX(),message.getAccY(),message.getAccZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getMessageType() {
|
||||||
|
return D350TestMessage.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -36,7 +36,7 @@ public class MessageParser {
|
|||||||
types.put((short)0xd31A, D31xConfigAckMessage.class);//DTU配置应答
|
types.put((short)0xd31A, D31xConfigAckMessage.class);//DTU配置应答
|
||||||
types.put((short)0xd31B, D31xConfigAckMessage.class);//LORA配置应答
|
types.put((short)0xd31B, D31xConfigAckMessage.class);//LORA配置应答
|
||||||
types.put((short)0xd320, D31xConfigAckMessage.class);//v3.2 DTU配置应答
|
types.put((short)0xd320, D31xConfigAckMessage.class);//v3.2 DTU配置应答
|
||||||
types.put((short)0xd350, D350SurfaceInclineMessage.class);//ACC上报
|
types.put((short)0xd350, D350TestMessage.class);//ACC上报
|
||||||
types.put((short)0xd314, D314PingMessage.class);//ping
|
types.put((short)0xd314, D314PingMessage.class);//ping
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,50 +0,0 @@
|
|||||||
package com.imdroid.sideslope.message;
|
|
||||||
|
|
||||||
import com.imdroid.secapi.dto.SurfaceInclineData;
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自检消息
|
|
||||||
*
|
|
||||||
* @author Layton
|
|
||||||
* @date 2023/2/2 20:38
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper=true)
|
|
||||||
@Data
|
|
||||||
public class D350SurfaceInclineMessage extends BaseMessage {
|
|
||||||
|
|
||||||
SurfaceInclineData inclineData = new SurfaceInclineData();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void decodeBody(ByteBuf src) {
|
|
||||||
// d3 50 length(2bytes) device_id(4bytes) seq(2bytes) data
|
|
||||||
this.len = src.readableBytes(); // total length
|
|
||||||
this.header = src.readUnsignedShort();// flag
|
|
||||||
src.readUnsignedShort();// d342 length
|
|
||||||
this.id = String.valueOf(src.readUnsignedInt());//id
|
|
||||||
this.seq = src.readUnsignedShort();
|
|
||||||
|
|
||||||
inclineData.setDeviceid(getId());
|
|
||||||
inclineData.setCreatetime(createTime);
|
|
||||||
|
|
||||||
inclineData.setSensorid(src.readUnsignedByte());
|
|
||||||
inclineData.setAnglex(src.readFloat());
|
|
||||||
inclineData.setAngley(src.readFloat());
|
|
||||||
inclineData.setAnglez(src.readFloat());
|
|
||||||
inclineData.setAccx(src.readFloat());
|
|
||||||
inclineData.setAccy(src.readFloat());
|
|
||||||
inclineData.setAccz(src.readFloat());
|
|
||||||
inclineData.setMaxaccx(src.readFloat());
|
|
||||||
inclineData.setMaxaccy(src.readFloat());
|
|
||||||
inclineData.setMaxaccz(src.readFloat());
|
|
||||||
inclineData.setMinaccx(src.readFloat());
|
|
||||||
inclineData.setMinaccy(src.readFloat());
|
|
||||||
inclineData.setMinaccz(src.readFloat());
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public boolean shouldDecodeHeader() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package com.imdroid.sideslope.message;
|
||||||
|
|
||||||
|
import com.imdroid.sideslope.bd.Gga;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Layton
|
||||||
|
* @date 2023/2/2 20:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper=true)
|
||||||
|
public class D350TestMessage extends BaseMessage {
|
||||||
|
double accX;
|
||||||
|
double accY;
|
||||||
|
double accZ;
|
||||||
|
Gga gga;
|
||||||
|
@Override
|
||||||
|
public void decodeBody(ByteBuf src) {
|
||||||
|
accX = src.readFloat();
|
||||||
|
accY = src.readFloat();
|
||||||
|
accZ = src.readFloat();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -62,12 +62,6 @@ public class Device {
|
|||||||
Double latitude;
|
Double latitude;
|
||||||
Double longitude;
|
Double longitude;
|
||||||
Double altitude;
|
Double altitude;
|
||||||
|
|
||||||
// 大地水准面相对椭球面的高度差
|
|
||||||
// 博通 GGA 此处可能非零,影响 RTK 运算,故需通过此属性判断。
|
|
||||||
Double geoidSeparation = 0.0;
|
|
||||||
|
|
||||||
|
|
||||||
Double ecefx;
|
Double ecefx;
|
||||||
Double ecefy;
|
Double ecefy;
|
||||||
Double ecefz;
|
Double ecefz;
|
||||||
@ -75,7 +69,6 @@ public class Device {
|
|||||||
Double iPose;
|
Double iPose;
|
||||||
Double iPosn;
|
Double iPosn;
|
||||||
Double iPosd;
|
Double iPosd;
|
||||||
|
|
||||||
private BigDecimal remaining;
|
private BigDecimal remaining;
|
||||||
private BigDecimal total;
|
private BigDecimal total;
|
||||||
private BigDecimal used;
|
private BigDecimal used;
|
||||||
@ -85,10 +78,10 @@ public class Device {
|
|||||||
LocalDateTime lastD3f2Time;
|
LocalDateTime lastD3f2Time;
|
||||||
short noFixedAndFloatResult=0;
|
short noFixedAndFloatResult=0;
|
||||||
|
|
||||||
|
// 日志记录控制
|
||||||
Short loggingmode;// 日志记录控制
|
Short loggingmode;
|
||||||
Boolean forwardToNtrip = false;// NtripCaster 推送控制
|
// NtripCaster 推送控制
|
||||||
|
Boolean forwardToNtrip = false;
|
||||||
int lastRxHead = 0;
|
int lastRxHead = 0;
|
||||||
|
|
||||||
int fixedNum = 0;
|
int fixedNum = 0;
|
||||||
|
|||||||
@ -1,75 +0,0 @@
|
|||||||
package com.imdroid.beidou.controller;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.imdroid.beidou.service.CommonExcelService;
|
|
||||||
import com.imdroid.secapi.dto.*;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.Model;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态消息 控制器
|
|
||||||
*
|
|
||||||
* @author LiGang
|
|
||||||
* @date 2024/1/6 14:37
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class SurfaceInclineController extends BasicController implements CommonExcelService<SurfaceInclineData, SurfaceInclineData> {
|
|
||||||
@Autowired
|
|
||||||
SurfaceInclineDataMapper dataMapper;
|
|
||||||
|
|
||||||
@RequestMapping("/page/surface_incline_data")
|
|
||||||
public String surfaceInclineData(Model m, HttpSession session) {
|
|
||||||
initModel(m, session);
|
|
||||||
return "/page/surface_incline_data";
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping("/surface_incline/data/list")
|
|
||||||
@ResponseBody
|
|
||||||
public JSONObject listData(HttpSession session, Integer page, Integer limit, String searchParams) {
|
|
||||||
return this.pageList(session, page, limit, searchParams);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出excel
|
|
||||||
*
|
|
||||||
* @param session HttpSession
|
|
||||||
* @param request HttpServletRequest
|
|
||||||
* @param response HttpServletResponse
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@RequestMapping("/surface_incline/data/export")
|
|
||||||
@ResponseBody
|
|
||||||
public void exportData(HttpSession session, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
||||||
this.export(session, request, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取实体类的class
|
|
||||||
*
|
|
||||||
* @return 实体类的class
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Class<SurfaceInclineData> getEntityClass() {
|
|
||||||
return SurfaceInclineData.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取实体类对应的mybatis mapper
|
|
||||||
*
|
|
||||||
* @return 实体类对应的mybatis mapper
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BaseMapper<SurfaceInclineData> getMapper() {
|
|
||||||
return dataMapper;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -403,27 +403,3 @@ CREATE TABLE IF NOT EXISTS `traffic_records` (
|
|||||||
KEY `idx_iccid` (`iccid`),
|
KEY `idx_iccid` (`iccid`),
|
||||||
KEY `idx_recordtime` (`recordtime`)
|
KEY `idx_recordtime` (`recordtime`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='流量使用记录表';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='流量使用记录表';
|
||||||
|
|
||||||
/***
|
|
||||||
倾角计
|
|
||||||
*/
|
|
||||||
CREATE TABLE IF NOT EXISTS `surface_incline_data` (
|
|
||||||
`id` bigint AUTO_INCREMENT,
|
|
||||||
`tenantid` int NOT NULL,
|
|
||||||
`createtime` datetime DEFAULT NULL,
|
|
||||||
`deviceid` varchar(20) NOT NULL,
|
|
||||||
`sensorid` smallint DEFAULT NULL,
|
|
||||||
`anglex` float DEFAULT NULL,
|
|
||||||
`angley` float DEFAULT NULL,
|
|
||||||
`anglez` float DEFAULT NULL,
|
|
||||||
`accx` float DEFAULT NULL,
|
|
||||||
`accy` float DEFAULT NULL,
|
|
||||||
`accz` float DEFAULT NULL,
|
|
||||||
`maxaccx` float DEFAULT NULL,
|
|
||||||
`maxaccy` float DEFAULT NULL,
|
|
||||||
`maxaccz` float DEFAULT NULL,
|
|
||||||
`minaccx` float DEFAULT NULL,
|
|
||||||
`minaccy` float DEFAULT NULL,
|
|
||||||
`minaccz` float DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"href": "page/device_overview"
|
"href": "page/device_overview"
|
||||||
},
|
},
|
||||||
"logoInfo": {
|
"logoInfo": {
|
||||||
"title": "地质监测平台",
|
"title": "北斗管理平台",
|
||||||
"image": "images/logo.png",
|
"image": "images/logo.png",
|
||||||
"href": ""
|
"href": ""
|
||||||
},
|
},
|
||||||
@ -41,6 +41,12 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"title": "解算结果",
|
||||||
|
"href": "page/gnss_data_calc",
|
||||||
|
"icon": "fa fa-calculator",
|
||||||
|
"target": "_self"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"title": "配置管理",
|
"title": "配置管理",
|
||||||
"href": "",
|
"href": "",
|
||||||
@ -76,32 +82,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "监测数据",
|
|
||||||
"icon": "fa fa-address-book",
|
|
||||||
"href": "",
|
|
||||||
"target": "_self",
|
|
||||||
"child": [
|
|
||||||
{
|
|
||||||
"title": "北斗",
|
|
||||||
"href": "page/gnss_data_calc",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "倾角计",
|
|
||||||
"href": "page/surface_incline_data",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "测斜仪",
|
|
||||||
"href": "",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -4,7 +4,7 @@
|
|||||||
"href": "page/device_overview"
|
"href": "page/device_overview"
|
||||||
},
|
},
|
||||||
"logoInfo": {
|
"logoInfo": {
|
||||||
"title": "地质监测平台",
|
"title": "北斗管理平台",
|
||||||
"image": "images/logo.png",
|
"image": "images/logo.png",
|
||||||
"href": ""
|
"href": ""
|
||||||
},
|
},
|
||||||
@ -53,6 +53,12 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"title": "解算结果",
|
||||||
|
"href": "page/gnss_data_calc",
|
||||||
|
"icon": "fa fa-calculator",
|
||||||
|
"target": "_self"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"title": "日志",
|
"title": "日志",
|
||||||
"href": "page/gnss_single_data",
|
"href": "page/gnss_single_data",
|
||||||
@ -171,32 +177,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"title": "监测数据",
|
|
||||||
"icon": "fa fa-address-book",
|
|
||||||
"href": "",
|
|
||||||
"target": "_self",
|
|
||||||
"child": [
|
|
||||||
{
|
|
||||||
"title": "北斗",
|
|
||||||
"href": "page/gnss_data_calc",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "倾角计",
|
|
||||||
"href": "page/surface_incline_data",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "测斜仪",
|
|
||||||
"href": "",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"title": "系统管理",
|
"title": "系统管理",
|
||||||
"icon": "fa fa-lemon-o",
|
"icon": "fa fa-lemon-o",
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"href": "page/device_overview"
|
"href": "page/device_overview"
|
||||||
},
|
},
|
||||||
"logoInfo": {
|
"logoInfo": {
|
||||||
"title": "地质监测平台",
|
"title": "北斗管理平台",
|
||||||
"image": "images/logo.png",
|
"image": "images/logo.png",
|
||||||
"href": ""
|
"href": ""
|
||||||
},
|
},
|
||||||
@ -47,6 +47,12 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"title": "解算结果",
|
||||||
|
"href": "page/gnss_data_calc",
|
||||||
|
"icon": "fa fa-calculator",
|
||||||
|
"target": "_self"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"title": "配置管理",
|
"title": "配置管理",
|
||||||
"href": "",
|
"href": "",
|
||||||
@ -129,32 +135,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"title": "监测数据",
|
|
||||||
"icon": "fa fa-address-book",
|
|
||||||
"href": "",
|
|
||||||
"target": "_self",
|
|
||||||
"child": [
|
|
||||||
{
|
|
||||||
"title": "北斗",
|
|
||||||
"href": "page/gnss_data_calc",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "倾角计",
|
|
||||||
"href": "page/surface_incline_data",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "测斜仪",
|
|
||||||
"href": "",
|
|
||||||
"icon": "fa fa-calculator",
|
|
||||||
"target": "_self"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"title": "系统管理",
|
"title": "系统管理",
|
||||||
"icon": "fa fa-lemon-o",
|
"icon": "fa fa-lemon-o",
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>地质监测平台</title>
|
<title>北斗管理系统</title>
|
||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<meta http-equiv="Access-Control-Allow-Origin" content="*">
|
<meta http-equiv="Access-Control-Allow-Origin" content="*">
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
<div class="main-body">
|
<div class="main-body">
|
||||||
<div class="login-main">
|
<div class="login-main">
|
||||||
<div class="login-top">
|
<div class="login-top">
|
||||||
<span>地质监测系统登录</span>
|
<span>北斗管理系统登录</span>
|
||||||
<span class="bg1"></span>
|
<span class="bg1"></span>
|
||||||
<span class="bg2"></span>
|
<span class="bg2"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -24,18 +24,6 @@
|
|||||||
<input type="text" name="s_deviceid" autocomplete="off" class="layui-input">
|
<input type="text" name="s_deviceid" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">电压小于</label>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="number" name="nlt_voltage" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">湿度大于</label>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="number" name="ngt_humidity" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">内置电池</label>
|
<label class="layui-form-label">内置电池</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
|
|||||||
@ -1,138 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>倾角计</title>
|
|
||||||
<meta name="renderer" content="webkit">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
||||||
<link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css" media="all">
|
|
||||||
<link rel="stylesheet" href="../css/public.css" media="all">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="layuimini-container">
|
|
||||||
<div class="layuimini-main">
|
|
||||||
|
|
||||||
<fieldset class="table-search-fieldset">
|
|
||||||
<legend>搜索信息</legend>
|
|
||||||
<div style="margin: 10px 10px 10px 10px">
|
|
||||||
<form class="layui-form layui-form-pane" action="" id="searchFrm">
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">设备号</label>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="s_deviceid" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">传感器号</label>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="s_sensorid" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">范围</label>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="dgt_createtime" autocomplete="off" id="ID-laydate-start-date" class="layui-input" placeholder="开始日期">
|
|
||||||
</div>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="dlt_createtime" autocomplete="off" id="ID-laydate-end-date" class="layui-input" placeholder="结束日期">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
|
|
||||||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-export-btn"><i class="layui-icon"></i>导出</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
|
|
||||||
<script th:inline="javascript">
|
|
||||||
layui.use(['form', 'table', 'laydate'], function () {
|
|
||||||
var $ = layui.$;
|
|
||||||
var form = layui.form,
|
|
||||||
table = layui.table,
|
|
||||||
laydate = layui.laydate;
|
|
||||||
|
|
||||||
var cfg_cols = [
|
|
||||||
{field: 'deviceid', title: '设备号', width: 100, fixed: "left"},
|
|
||||||
{field: 'sensorid', title: '传感器号', width: 15, fixed: "left"},
|
|
||||||
{field: 'createtime', title: '上报时间', fixed: "left", templet: "<div>{{layui.util.toDateString(d.createtime, 'yyyy-MM-dd HH:mm:ss')}}</div>"},
|
|
||||||
{field: 'anglex', title: '倾角X', templet: "<div>{{d.anglex.toFixed(3)}}</div>"},
|
|
||||||
{field: 'angley', title: '倾角Y', templet: "<div>{{d.angley.toFixed(3)}}</div>"},
|
|
||||||
{field: 'anglez', title: '倾角Z', templet: "<div>{{d.anglez.toFixed(3)}}</div>"},
|
|
||||||
{field: 'accx', title: '加速度X', templet: "<div>{{d.accx.toFixed(3)}}</div>"},
|
|
||||||
{field: 'accy', title: '加速度Y', templet: "<div>{{d.accy.toFixed(3)}}</div>"},
|
|
||||||
{field: 'accz', title: '加速度Z', templet: "<div>{{d.accz.toFixed(3)}}</div>"},
|
|
||||||
{field: 'maxaccx', title: 'MaxX', templet: "<div>{{d.maxaccx.toFixed(3)}}</div>"},
|
|
||||||
{field: 'maxaccy', title: 'MaxY', templet: "<div>{{d.maxaccy.toFixed(3)}}</div>"},
|
|
||||||
{field: 'maxaccz', title: 'MaxZ', templet: "<div>{{d.maxaccz.toFixed(3)}}</div>"},
|
|
||||||
{field: 'minaccx', title: 'MinX', templet: "<div>{{d.minaccx.toFixed(3)}}</div>"},
|
|
||||||
{field: 'minaccy', title: 'MinY', templet: "<div>{{d.minaccy.toFixed(3)}}</div>"},
|
|
||||||
{field: 'minaccz', title: 'MinZ', templet: "<div>{{d.minaccz.toFixed(3)}}</div>"},
|
|
||||||
|
|
||||||
];
|
|
||||||
/**
|
|
||||||
* 初始化表单,要加上,不然刷新部分组件可能会不加载
|
|
||||||
*/
|
|
||||||
form.render();
|
|
||||||
|
|
||||||
laydate.render({
|
|
||||||
elem: '#ID-laydate-start-date',
|
|
||||||
type: 'datetime'
|
|
||||||
});
|
|
||||||
laydate.render({
|
|
||||||
elem: '#ID-laydate-end-date',
|
|
||||||
type: 'datetime'
|
|
||||||
});
|
|
||||||
|
|
||||||
table.render({
|
|
||||||
elem: '#currentTableId',
|
|
||||||
url: '/surface_incline/data/list',
|
|
||||||
toolbar: '#toolbarDemo',//开启头部工具栏
|
|
||||||
defaultToolbar: ['filter'],
|
|
||||||
cols: [
|
|
||||||
cfg_cols
|
|
||||||
],
|
|
||||||
limits: [10, 50, 100, 200],
|
|
||||||
limit: 10,
|
|
||||||
page: true,
|
|
||||||
skin: 'line'
|
|
||||||
});
|
|
||||||
|
|
||||||
// 监听搜索操作
|
|
||||||
form.on('submit(data-search-btn)', function (data) {
|
|
||||||
var result = JSON.stringify(data.field);
|
|
||||||
|
|
||||||
//执行搜索重载
|
|
||||||
table.reload('currentTableId', {
|
|
||||||
page: {
|
|
||||||
curr: 1
|
|
||||||
}
|
|
||||||
, where: {
|
|
||||||
searchParams: result
|
|
||||||
}
|
|
||||||
}, 'data');
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 监听导出操作
|
|
||||||
form.on('submit(data-export-btn)', function (data) {
|
|
||||||
var result = $('#searchFrm').serialize();
|
|
||||||
var u = "/surface_incline/data/export?" + result;
|
|
||||||
window.open(u, "_blank");
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user