新增加自建台站系统类型判断,根据sample文件名称可以通过系统类型查询到关联的det文件类型
新增加查询台站运行轨迹方法
This commit is contained in:
parent
84d6c4a5a2
commit
76acc20a7d
|
@ -13,7 +13,11 @@ public enum SystemType {
|
||||||
/**
|
/**
|
||||||
* γ
|
* γ
|
||||||
*/
|
*/
|
||||||
GAMMA("G");
|
GAMMA("G"),
|
||||||
|
/**
|
||||||
|
* 自建台站
|
||||||
|
*/
|
||||||
|
SELFSTATION("C");
|
||||||
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
|
|
@ -311,12 +311,29 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
||||||
map.put("qcFileName", qcphd);
|
map.put("qcFileName", qcphd);
|
||||||
map.put("qcFileStatus", qcStatus);
|
map.put("qcFileStatus", qcStatus);
|
||||||
map.put("sampleSystemType", sampleSystemType);
|
map.put("sampleSystemType", sampleSystemType);
|
||||||
} else {
|
} else if (sampleSystemType.equals(SystemType.GAMMA.getType()) || sampleSystemType.equals(SystemType.PARTICULATE.getType())) {
|
||||||
map.put("sampleFileName", sampleFileName);
|
map.put("sampleFileName", sampleFileName);
|
||||||
map.put("gasFileName", "");
|
map.put("gasFileName", "");
|
||||||
map.put("detFileName", "");
|
map.put("detFileName", "");
|
||||||
map.put("qcFileName", "");
|
map.put("qcFileName", "");
|
||||||
map.put("sampleSystemType", sampleSystemType);
|
map.put("sampleSystemType", sampleSystemType);
|
||||||
|
} else if (sampleSystemType.equals(SystemType.SELFSTATION.getType())) {
|
||||||
|
//加载并获取当前路径下所有的文件名称并进行名称格式化 仅需要格式化和sample文件同一个台站 名称格式化为最终名称
|
||||||
|
List<String> fileNames = phdFileUtil.FileNameByStandardForm(filePath, sampleFileName);
|
||||||
|
//匹配detFile
|
||||||
|
boolean detStatus = false;
|
||||||
|
String detaFileName = fileData.get("detaFileName");
|
||||||
|
String detphd = phdFileUtil.GetMatchFile(detaFileName, fileNames, DataTypeAbbr.DETBKPHD.getType());
|
||||||
|
if (StringUtils.isNotBlank(detphd)) {
|
||||||
|
detaFileName = detphd;
|
||||||
|
detStatus = true;
|
||||||
|
}
|
||||||
|
map.put("sampleFileName", sampleFileName);
|
||||||
|
map.put("gasFileName", "");
|
||||||
|
map.put("detFileName", detaFileName);
|
||||||
|
map.put("detFileStatus", detStatus);
|
||||||
|
map.put("qcFileName", "");
|
||||||
|
map.put("sampleSystemType", sampleSystemType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(map)) {
|
if (CollectionUtils.isNotEmpty(map)) {
|
||||||
|
|
|
@ -8,8 +8,10 @@ import org.jeecg.modules.entity.data.StationOperation;
|
||||||
import org.jeecg.modules.service.IStationOperationService;
|
import org.jeecg.modules.service.IStationOperationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -78,4 +80,11 @@ public class StationOperationController {
|
||||||
result.setResult(mapUrl);
|
result.setResult(mapUrl);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("getSelfStationGPS")
|
||||||
|
@ApiOperation(value = "查询自建台站运行轨迹", notes = "查询自建台站运行轨迹")
|
||||||
|
public Result getSelfStationGPS(String stationCode, @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate, @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||||
|
return stationOperationService.getSelfStationGPS(stationCode, startDate, endDate);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SelfStationGPSData implements Serializable {
|
||||||
|
|
||||||
|
private String stationCode;
|
||||||
|
|
||||||
|
private Double lon;
|
||||||
|
|
||||||
|
private Double lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间间隔 单位是秒
|
||||||
|
*/
|
||||||
|
private Integer timeSpan;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date recordDate;
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,14 @@
|
||||||
package org.jeecg.modules.mapper;
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.entity.data.SelfStationGPSData;
|
||||||
import org.jeecg.modules.entity.data.StationOperation;
|
import org.jeecg.modules.entity.data.StationOperation;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface StationOperationMapper extends BaseMapper<StationOperation> {
|
public interface StationOperationMapper extends BaseMapper<StationOperation> {
|
||||||
|
|
||||||
|
List<SelfStationGPSData> getSelfStationGPS(@Param(value = "stationCode") String stationCode, @Param(value = "startTime") String startTime, @Param(value = "endTime") String endTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?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="org.jeecg.modules.mapper.StationOperationMapper">
|
||||||
|
|
||||||
|
<select id="getSelfStationGPS" resultType="org.jeecg.modules.entity.data.SelfStationGPSData">
|
||||||
|
SELECT
|
||||||
|
STATION_CODE as stationCode,
|
||||||
|
LON as lon,
|
||||||
|
LAT as lat,
|
||||||
|
RECORD_TIME as recordDate,
|
||||||
|
TIME_SPAN as timeSpan
|
||||||
|
FROM
|
||||||
|
ORIGINAL.GARDS_GPS_DATA
|
||||||
|
WHERE
|
||||||
|
STATION_CODE = #{stationCode}
|
||||||
|
AND RECORD_TIME BETWEEN TO_DATE(#{startTime}, 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE(#{endTime}, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
|
ORDER BY
|
||||||
|
RECORD_TIME
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -5,6 +5,7 @@ import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.modules.entity.data.PointVo;
|
import org.jeecg.modules.entity.data.PointVo;
|
||||||
import org.jeecg.modules.entity.data.StationOperation;
|
import org.jeecg.modules.entity.data.StationOperation;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface IStationOperationService extends IService<StationOperation> {
|
public interface IStationOperationService extends IService<StationOperation> {
|
||||||
|
@ -46,7 +47,7 @@ public interface IStationOperationService extends IService<StationOperation> {
|
||||||
/**
|
/**
|
||||||
* 查询台站监测数据
|
* 查询台站监测数据
|
||||||
* @param userId
|
* @param userId
|
||||||
* @param stationId
|
* @param oneStationId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Result getDataReceivingStatus(String userId, String oneStationId);
|
Result getDataReceivingStatus(String userId, String oneStationId);
|
||||||
|
@ -57,4 +58,6 @@ public interface IStationOperationService extends IService<StationOperation> {
|
||||||
*/
|
*/
|
||||||
Result getDataProvisionEfficiency();
|
Result getDataProvisionEfficiency();
|
||||||
|
|
||||||
|
Result getSelfStationGPS(String stationCode, Date startDate, Date endDate);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.jeecg.modules.service.impl;
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
|
@ -14,6 +15,7 @@ import org.jeecg.common.CalculateStationData;
|
||||||
import org.jeecg.common.PointUtil;
|
import org.jeecg.common.PointUtil;
|
||||||
import org.jeecg.common.StationTypeUtil;
|
import org.jeecg.common.StationTypeUtil;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.util.DateUtils;
|
||||||
import org.jeecg.common.util.RedisUtil;
|
import org.jeecg.common.util.RedisUtil;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsDetectors;
|
import org.jeecg.modules.base.entity.configuration.GardsDetectors;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsNuclearfacility;
|
import org.jeecg.modules.base.entity.configuration.GardsNuclearfacility;
|
||||||
|
@ -585,4 +587,28 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
||||||
return Result.OK(stationInfoList);
|
return Result.OK(stationInfoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@DS("ora")
|
||||||
|
public Result getSelfStationGPS(String stationCode, Date startDate, Date endDate) {
|
||||||
|
Result result = new Result();
|
||||||
|
if (StringUtils.isBlank(stationCode)) {
|
||||||
|
result.error500("Station Code cannot be null");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if (Objects.isNull(startDate)){
|
||||||
|
result.error500("The start time cannot be empty");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
String startTime = DateUtils.formatDate(startDate, "yyyy-MM-dd") + " 00:00:00";
|
||||||
|
if (Objects.isNull(endDate)) {
|
||||||
|
result.error500("The end time cannot be empty");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
String endTime = DateUtils.formatDate(endDate, "yyyy-MM-dd") + " 23:59:59";
|
||||||
|
List<SelfStationGPSData> stationGPSDataList = this.baseMapper.getSelfStationGPS(stationCode, startTime, endTime);
|
||||||
|
result.setSuccess(true);
|
||||||
|
result.setResult(stationGPSDataList);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user