台站运行管理模块查询台站监测数据信息返回内容过滤条件开始时间毫秒改为秒
人工交互模块gamma部分Spectrum新增方法读取phd文件内容 人工交互模块gamma部分Spectrum查看功能新增加tab页显示原phd文件内容
This commit is contained in:
parent
373b8a2b5b
commit
735d9a1c59
|
@ -4359,6 +4359,17 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
return ftpUtil.downloadFile(fromPath, "betaGamma");
|
||||
}
|
||||
|
||||
public List<String> readLine(String filePath) {
|
||||
List<String> allLines = new ArrayList<>();
|
||||
try {
|
||||
File file = new File(filePath);
|
||||
return FileUtils.readLines(file, "UTF-8");
|
||||
}catch (IOException e){
|
||||
e.printStackTrace();
|
||||
return allLines;
|
||||
}
|
||||
}
|
||||
|
||||
public String makeUpSpectrum(PHDFile phd) {
|
||||
StringBuilder spectrum = new StringBuilder();
|
||||
//PHD文本内容头部部分
|
||||
|
|
|
@ -4411,6 +4411,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
@Override
|
||||
public Result Spectrum(Integer sampleId, String fileName, HttpServletRequest request) {
|
||||
Result result = new Result();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String userName = JwtUtil.getUserNameByToken(request);
|
||||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName + StringPool.DASH + userName);
|
||||
|
@ -4419,8 +4420,13 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
return result;
|
||||
}
|
||||
String spectrum = gammaFileUtil.makeUpSpectrum(phd);
|
||||
map.put("Spectrum", spectrum);
|
||||
if(StringUtils.isNotBlank(phd.getTmpFilePath())) {
|
||||
List<String> lines = gammaFileUtil.readLine(phd.getTmpFilePath());
|
||||
map.put("phdSpectrum", lines);
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(spectrum);
|
||||
result.setResult(map);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -407,7 +407,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
|||
//根据缓存日期 得到开始查询时间
|
||||
LocalDateTime startDate = endDate.minusDays(cacheTime.intValue());
|
||||
//获取到开始时间的秒数
|
||||
long startMill = startDate.toInstant(ZoneOffset.UTC).toEpochMilli();
|
||||
long startMill = startDate.toInstant(ZoneOffset.UTC).toEpochMilli()/1000;
|
||||
//过滤出当前用户关注的台站信息
|
||||
List<StationData> stationDataList = new LinkedList<>();
|
||||
if (CollectionUtils.isNotEmpty(stationDataMap)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user