代码格式化
This commit is contained in:
parent
165dce6786
commit
3f7a11e890
|
|
@ -39,10 +39,14 @@ public class DataAnalysisController {
|
|||
*/
|
||||
@GetMapping("/getSampleMonitorResult")
|
||||
@ApiOperation(value = "样品监测结果回放", notes = "样品监测结果回放")
|
||||
public Result getSampleMonitorResult(String sampleType, Integer dataSource, @RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
public Result getSampleMonitorResult(String sampleType, Integer dataSource,
|
||||
@RequestParam("startDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
|
||||
return sampleStatAnalysisService.getSampleMonitorResult(sampleType, dataSource, startDate, endDate);
|
||||
return sampleStatAnalysisService.getSampleMonitorResult(sampleType, dataSource, startDate,
|
||||
endDate);
|
||||
}
|
||||
|
||||
/*** 样品统计分析
|
||||
|
|
@ -55,23 +59,30 @@ public class DataAnalysisController {
|
|||
*/
|
||||
@GetMapping("/getSampleStatAnalysis")
|
||||
@ApiOperation(value = "样品统计分析", notes = "样品统计分析")
|
||||
public Result getSampleStatAnalysis(String station, Integer dataSource, @RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
return sampleStatAnalysisService.getSampleStatAnalysis(station, dataSource, startDate, endDate);
|
||||
public Result getSampleStatAnalysis(String station, Integer dataSource,
|
||||
@RequestParam("startDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
return sampleStatAnalysisService.getSampleStatAnalysis(station, dataSource, startDate,
|
||||
endDate);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getNuclideActConcChartData")
|
||||
@ApiOperation(value = "样品统计分析-核素等级时序分析", notes = "样品统计分析-核素等级时序分析")
|
||||
public Result getNuclideActConcChartData(@RequestParam("sampleType")String sampleType,
|
||||
public Result<?> getNuclideActConcChartData(
|
||||
@RequestParam(value = "sampleType") String sampleType,
|
||||
@RequestParam("station") String station,
|
||||
@RequestParam("nuclideName") String nuclideName,
|
||||
@RequestParam("dataSource") Integer dataSource,
|
||||
@RequestParam("startDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) throws JsonProcessingException {
|
||||
return sampleStatAnalysisService.getNuclideActConcChartData(sampleType,station, nuclideName, dataSource, startDate, endDate);
|
||||
@RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate)
|
||||
throws JsonProcessingException {
|
||||
return sampleStatAnalysisService.getNuclideActConcChartData(sampleType, station,
|
||||
nuclideName, dataSource, startDate, endDate);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -86,9 +97,14 @@ public class DataAnalysisController {
|
|||
*/
|
||||
@GetMapping("/getSampleGradeAnalysis")
|
||||
@ApiOperation(value = "样品等级时序分析", notes = "样品等级时序分析")
|
||||
public Result getSampleGradeAnalysis(String sampleType, String station, Integer dataSource, @RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
Result result = sampleStatAnalysisService.getSampleGradeAnalysis(sampleType, station, startDate, endDate, dataSource);
|
||||
public Result getSampleGradeAnalysis(String sampleType, String station, Integer dataSource,
|
||||
@RequestParam("startDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
Result result =
|
||||
sampleStatAnalysisService.getSampleGradeAnalysis(sampleType, station, startDate,
|
||||
endDate, dataSource);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -105,10 +121,17 @@ public class DataAnalysisController {
|
|||
*/
|
||||
@GetMapping("/getActConcIntvlAnalysis")
|
||||
@ApiOperation(value = "样品活度浓度区间频率分析", notes = "样品活度浓度区间频率分析")
|
||||
public Result getSampleActConcIntvlAnalysis(String sampleType, String station, String nuclideName, Integer dataSource, @RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
public Result getSampleActConcIntvlAnalysis(String sampleType, String station,
|
||||
String nuclideName, Integer dataSource,
|
||||
@RequestParam("startDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
Date startDate,
|
||||
@RequestParam("endDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
Date endDate) {
|
||||
|
||||
return sampleStatAnalysisService.getSampleActConcIntvlAnalysis(sampleType, station, nuclideName, dataSource, startDate, endDate);
|
||||
return sampleStatAnalysisService.getSampleActConcIntvlAnalysis(sampleType, station,
|
||||
nuclideName, dataSource, startDate, endDate);
|
||||
}
|
||||
|
||||
/*** 样品活度浓度时序分析
|
||||
|
|
@ -123,10 +146,17 @@ public class DataAnalysisController {
|
|||
*/
|
||||
@GetMapping("/getActConcTimeSeqAnalysis")
|
||||
@ApiOperation(value = "样品活度浓度时序分析", notes = "样品活度浓度时序分析")
|
||||
public Result getSampleActConcTimeSeqAnalysis(String sampleType, String station, String nuclideName, Integer dataSource, @RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) throws JsonProcessingException {
|
||||
public Result getSampleActConcTimeSeqAnalysis(String sampleType, String station,
|
||||
String nuclideName, Integer dataSource,
|
||||
@RequestParam("startDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
Date startDate,
|
||||
@RequestParam("endDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
Date endDate) throws JsonProcessingException {
|
||||
//return sampleStatAnalysisService.getSampleActConcTimeSeqAnalysis(sampleType, station, nuclideName, dataSource, startDate, endDate);
|
||||
return sampleStatAnalysisService.getNuclideActConcChartData(sampleType, station, nuclideName, dataSource, startDate, endDate);
|
||||
return sampleStatAnalysisService.getNuclideActConcChartData(sampleType, station,
|
||||
nuclideName, dataSource, startDate, endDate);
|
||||
}
|
||||
|
||||
/*** 核素活度浓度对比分析
|
||||
|
|
@ -141,9 +171,16 @@ public class DataAnalysisController {
|
|||
*/
|
||||
@GetMapping("/getNuclideActivityConcAnalyze")
|
||||
@ApiOperation(value = "核素活度浓度对比分析", notes = "核素活度浓度对比分析")
|
||||
public Result getNuclideActivityConcAnalyze(String sampleType, Integer[] stationIds, String nuclideName, Integer dataSource, @RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||
@RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||
return sampleStatAnalysisService.getNuclideActivityConcAnalyze(sampleType, stationIds, nuclideName, dataSource, startDate, endDate);
|
||||
public Result getNuclideActivityConcAnalyze(String sampleType, Integer[] stationIds,
|
||||
String nuclideName, Integer dataSource,
|
||||
@RequestParam("startDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
Date startDate,
|
||||
@RequestParam("endDate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
Date endDate) {
|
||||
return sampleStatAnalysisService.getNuclideActivityConcAnalyze(sampleType, stationIds,
|
||||
nuclideName, dataSource, startDate, endDate);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +188,8 @@ public class DataAnalysisController {
|
|||
public Result findStationList(String systemType) {
|
||||
Result result = new Result();
|
||||
try {
|
||||
List<GardsStations> gardsStations = sampleStatAnalysisService.findStationListByMenuName(systemType);
|
||||
List<GardsStations> gardsStations =
|
||||
sampleStatAnalysisService.findStationListByMenuName(systemType);
|
||||
result.setCode(200);
|
||||
result.setSuccess(true);
|
||||
result.setResult(gardsStations);
|
||||
|
|
@ -166,7 +204,8 @@ public class DataAnalysisController {
|
|||
public Result findNuclideList(String systemType) {
|
||||
Result result = new Result();
|
||||
try {
|
||||
List<SysDefaultNuclide> defaultNuclides = sampleStatAnalysisService.findNuclideList(systemType);
|
||||
List<SysDefaultNuclide> defaultNuclides =
|
||||
sampleStatAnalysisService.findNuclideList(systemType);
|
||||
result.setCode(200);
|
||||
result.setSuccess(true);
|
||||
result.setResult(defaultNuclides);
|
||||
|
|
|
|||
|
|
@ -13,25 +13,32 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
|||
|
||||
List<GardsSampleData> getSampleStatAnalysis(String station, String startDate, String endDate);
|
||||
|
||||
List<ThresholdMetric> selectByStationIds(@Param("stationIds") List<String> stationIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<ThresholdMetric> selectByStationIds(@Param("stationIds") List<String> stationIds,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
//region 样品等级时序分析
|
||||
|
||||
|
||||
List<GardsSampleData> getSampleGradeAnalysis(String sampleType, String station,
|
||||
@Param("startTime") String startTime, @Param("endTime") String endTime, Integer dataSource);
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
Integer dataSource);
|
||||
|
||||
List<SampleLevelData> getRnAutoSampleGradeAnalysis(String sampleType, String station,
|
||||
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
List<SampleLevelData> getRnManSampleGradeAnalysis(String sampleType, String station,
|
||||
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
|
||||
List<NuclideActConcIntvl> getIdentifiedNuclides(@Param("schemaName") String schemaName ,@Param("nuclideName")String nuclideName, String station,
|
||||
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<NuclideActConcIntvl> getIdentifiedNuclides(@Param("schemaName") String schemaName,
|
||||
@Param("nuclideName") String nuclideName,
|
||||
String station,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
//endregion
|
||||
|
|
@ -43,18 +50,24 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
|||
* @param endTime 结束时间
|
||||
* @return 返回List<NuclideActConcIntvl>
|
||||
*/
|
||||
List<NuclideActConcIntvl> getSamplePNuclideActConcIntvl(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getSamplePNuclideActConcIntvl(String station,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
//region 获取样品的级别和阈值
|
||||
|
||||
List<SampleLevelData> getRnAutoSampleLevel(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<SampleLevelData> getRnAutoSampleLevel(String station, @Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
List<SampleLevelData> getRnManSampleLevel(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
|
||||
List<SampleLevelData> getNuclideTimeSeriesAnalysis (@Param("schemaName") String schemaName ,@Param("station")String station,@Param("nuclideName")String nuclideName, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<SampleLevelData> getRnManSampleLevel(String station, @Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
List<SampleLevelData> getNuclideTimeSeriesAnalysis(@Param("schemaName") String schemaName,
|
||||
@Param("station") String station,
|
||||
@Param("nuclideName") String nuclideName,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
//endregion
|
||||
|
|
@ -68,7 +81,10 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
|||
* @param endTime 结束时间
|
||||
* @return 返回List<NuclideActConcIntvl>
|
||||
*/
|
||||
List<NuclideActConcIntvl> getRnautoPNuclideActConcIntvl(String sampleType, String station, String nuclideName, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getRnautoPNuclideActConcIntvl(String sampleType, String station,
|
||||
String nuclideName,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/*** 获取样品中元素的浓度活度、MDC信息
|
||||
* 查询RNAUTO.GARDS_XE_RESULTS中的活度浓度、MDC信息
|
||||
|
|
@ -77,7 +93,19 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
|||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
List<NuclideActConcIntvl> getRnautoNuclideActConcIntvl(String sampleType, String station, String nuclideName, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getRnautoNuclideActConcIntvl(String sampleType, String station,
|
||||
String nuclideName,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param schemaName
|
||||
* @return
|
||||
*/
|
||||
List<NuclideActConcIntvl>getNuclideActConcIntvl(@Param("schemaName") String schemaName);
|
||||
|
||||
|
||||
|
||||
|
||||
//endregion
|
||||
|
|
@ -91,7 +119,10 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
|||
* @param endTime 结束时间
|
||||
* @return 返回List<NuclideActConcIntvl>
|
||||
*/
|
||||
List<NuclideActConcIntvl> getRnmanPNuclideActConcIntvl(String sampleType, String station, String nuclideName, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getRnmanPNuclideActConcIntvl(String sampleType, String station,
|
||||
String nuclideName,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/*** 获取样品中元素的浓度活度、MDC信息
|
||||
* 查询RNAUTO.GARDS_XE_RESULTS中的活度浓度、MDC信息
|
||||
|
|
@ -100,36 +131,46 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
|||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
List<NuclideActConcIntvl> getRnmanNuclideActConcIntvl(String sampleType, String station, String nuclideName, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getRnmanNuclideActConcIntvl(String sampleType, String station,
|
||||
String nuclideName,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
//endregion
|
||||
|
||||
|
||||
//region 样品统计分析
|
||||
|
||||
/**
|
||||
* RnAuto--获取样品中识别到的核素集合
|
||||
*/
|
||||
|
||||
List<NuclideActConcIntvl> getRnAutoIdentifiedNuclides(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getRnAutoIdentifiedNuclides(String station,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* RnAuto-- 核素等级时序分析
|
||||
*/
|
||||
|
||||
List<SampleLevelData> getRnAutoNuclideTimeSeriesAnalysis(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<SampleLevelData> getRnAutoNuclideTimeSeriesAnalysis(String station,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* RnMan--获取样品中识别到的核素集合
|
||||
*/
|
||||
List<NuclideActConcIntvl> getRnManIdentifiedNuclides(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getRnManIdentifiedNuclides(String station,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* RnMan--核素等级时序分析
|
||||
*
|
||||
* @return List<SampleLevelData>
|
||||
*/
|
||||
List<SampleLevelData> getRnManNuclideTimeSeriesAnalysis(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<SampleLevelData> getRnManNuclideTimeSeriesAnalysis(String station,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -213,20 +254,30 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
|||
|
||||
//endregion
|
||||
|
||||
|
||||
//region 核素活度浓度对比分析
|
||||
List<NuclideActConcIntvl> getRnAutoAnalyzeNuclideActivityConc(@Param("sampleType")String sampleType, @Param("nuclideName")String nuclideName, @Param("stationIds") Integer[] stationIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getRnAutoAnalyzeNuclideActivityConc(
|
||||
@Param("sampleType") String sampleType, @Param("nuclideName") String nuclideName,
|
||||
@Param("stationIds") Integer[] stationIds, @Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
List<NuclideActConcIntvl> getRnManAnalyzeNuclideActivityConc(@Param("sampleType")String sampleType, @Param("nuclideName")String nuclideName, @Param("stationIds") Integer[] stationIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<NuclideActConcIntvl> getRnManAnalyzeNuclideActivityConc(
|
||||
@Param("sampleType") String sampleType, @Param("nuclideName") String nuclideName,
|
||||
@Param("stationIds") Integer[] stationIds, @Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
//endregion
|
||||
|
||||
//region 样品监测结果
|
||||
List<StationInfoData> getRnAutoSampleResult( String sampleType, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<StationInfoData> getRnAutoSampleResult(String sampleType,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
List<StationInfoData> getRnManSampleResult(String sampleType, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<StationInfoData> getRnManSampleResult(String sampleType,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region 查询台站信息
|
||||
List<GardsStations> findStationListByMenuName(@Param("systemType") String systemType);
|
||||
//endregion
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collector;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
|
|
@ -57,7 +58,7 @@ public class SampleStatAnalysisService
|
|||
result.setCode(CommonConstant.SC_OK_200);
|
||||
//声明返回用的结果map
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
List<StationInfoData> StationInfoDataList = new ArrayList<>();
|
||||
List<StationInfoData> stationInfoDataList = new ArrayList<>();
|
||||
|
||||
//region 局部变量
|
||||
if (StringUtils.isBlank(sampleType)) {
|
||||
|
|
@ -78,26 +79,19 @@ public class SampleStatAnalysisService
|
|||
|
||||
switch (dataSource) {
|
||||
case 1:
|
||||
StationInfoDataList =
|
||||
stationInfoDataList =
|
||||
this.baseMapper.getRnAutoSampleResult(sampleType, startTime, endTime);
|
||||
|
||||
break;
|
||||
case 2:
|
||||
StationInfoDataList =
|
||||
stationInfoDataList =
|
||||
this.baseMapper.getRnManSampleResult(sampleType, startTime, endTime);
|
||||
|
||||
break;
|
||||
default:
|
||||
stationInfoDataList = new ArrayList<>();
|
||||
}
|
||||
//获取台站信息
|
||||
// Map<String, StationInfoVO> stationInfo =
|
||||
// StationInfoDataList.stream().collect(
|
||||
// Collectors.toMap(StationInfoData::getStationCode,
|
||||
// station ->
|
||||
// new StationInfoVO(station.getStationCode(), station.getLon(),station.getLat()),
|
||||
// (existing, replacement) -> existing)
|
||||
//
|
||||
// );
|
||||
Set<StationInfoVO> stationInfoSet = StationInfoDataList.stream()
|
||||
Set<StationInfoVO> stationInfoSet = stationInfoDataList.stream()
|
||||
.map(station -> new StationInfoVO(
|
||||
station.getStationCode(),
|
||||
station.getLon(),
|
||||
|
|
@ -106,22 +100,22 @@ public class SampleStatAnalysisService
|
|||
.collect(Collectors.toSet());
|
||||
|
||||
|
||||
List<StationInfoData> sortedList = StationInfoDataList.stream()
|
||||
List<StationInfoData> sortedList = stationInfoDataList.stream()
|
||||
.sorted(Comparator.comparing(station ->
|
||||
station.getCollectStop().toInstant()
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
.toLocalDate()
|
||||
))
|
||||
.collect(Collectors.toList());
|
||||
//时间段内有多少和台站
|
||||
//时间段内有多少台站
|
||||
Map<String, List<Map<String, Object>>> groupedByMonth =
|
||||
sortedList.stream()
|
||||
.filter(station -> station.getCollectStop() !=
|
||||
null) // 过滤 collectStop 为 null 的数据
|
||||
.filter(station -> station.getStationCode() !=
|
||||
null) // 过滤 stationCode 为 null 的数据
|
||||
.filter(station -> station.getCategory() !=
|
||||
null) // 过滤 category 为 null 的数据
|
||||
.filter(station -> station.getCollectStop()
|
||||
!= null) // 过滤 collectStop 为 null 的数据
|
||||
.filter(station -> station.getStationCode()
|
||||
!= null) // 过滤 stationCode 为 null 的数据
|
||||
.filter(station -> station.getCategory()
|
||||
!= null) // 过滤 category 为 null 的数据
|
||||
.collect(Collectors.groupingBy(
|
||||
station -> station.getCollectStop().toInstant()
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
|
|
@ -148,7 +142,7 @@ public class SampleStatAnalysisService
|
|||
// 统计 category 出现次数
|
||||
Map<Integer, Long> categoryCount =
|
||||
categories.stream()
|
||||
.filter(Objects::nonNull) // 再次过滤 null(防御性编程)
|
||||
.filter(Objects::nonNull) // 再次过滤 null
|
||||
.collect(
|
||||
Collectors.groupingBy(
|
||||
category -> category,
|
||||
|
|
@ -158,7 +152,8 @@ public class SampleStatAnalysisService
|
|||
new HashMap<>();
|
||||
categoryCount.forEach(
|
||||
(category, count) -> {
|
||||
String levelKey = "level" +
|
||||
String levelKey = "level"
|
||||
+
|
||||
category; // 例如:1 → "level1"
|
||||
levelCount.put(levelKey,
|
||||
count);
|
||||
|
|
@ -335,6 +330,11 @@ public class SampleStatAnalysisService
|
|||
List<Object[]> thresholdList = new ArrayList<>();
|
||||
Map<String, List<Object[]>> levelGroup = new HashMap<>();
|
||||
|
||||
levelGroup.put("category1", new ArrayList<>());
|
||||
levelGroup.put("category2", new ArrayList<>());
|
||||
levelGroup.put("category3", new ArrayList<>());
|
||||
//levelGroup.put("category4", new ArrayList<>());
|
||||
|
||||
for (NuclideActConcIntvl item : rawList) {
|
||||
String timeStr = sdf.format(item.getCollectStop());
|
||||
mdcList.add(new Object[] {timeStr, item.getMdc()});
|
||||
|
|
@ -344,9 +344,9 @@ public class SampleStatAnalysisService
|
|||
int cat = item.getCategory();
|
||||
String categoryStr = "category" + cat;
|
||||
levelGroup.putIfAbsent(categoryStr, new ArrayList<>());
|
||||
//double err = item.getConcErr() != null ? item.getConcErr() : 0;
|
||||
double err = item.getConcErr() != null ? item.getConcErr() : 0;
|
||||
//TODO 测试数据
|
||||
double err = 15;
|
||||
//double err = 15;
|
||||
levelGroup.get(categoryStr).add(new Object[] {timeStr, item.getConc(), err, err});
|
||||
// if (cat == 3) {
|
||||
// // 3级: 携带误差维度 [时间, 活度, ConcErr , $Conc+ConcErr]
|
||||
|
|
@ -3229,8 +3229,10 @@ public class SampleStatAnalysisService
|
|||
});
|
||||
|
||||
result.setSuccess(true);
|
||||
result.setResult(resultData);
|
||||
return resultData;
|
||||
//result.setResult(resultData);
|
||||
//return resultData;
|
||||
result.setResult(dataMap);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3309,7 +3311,6 @@ public class SampleStatAnalysisService
|
|||
* @return 返回样品活度浓度区间信息
|
||||
*/
|
||||
@Override
|
||||
|
||||
public Result getSampleActConcIntvlAnalysis(String sampleType, String station,
|
||||
String nuclideName, Integer dataSource,
|
||||
Date startDate, Date endDate) {
|
||||
|
|
@ -3342,48 +3343,43 @@ public class SampleStatAnalysisService
|
|||
return result;
|
||||
}
|
||||
String endTime = DateUtils.formatDate(endDate, "yyyy-MM-dd") + " 23:59:59";
|
||||
|
||||
String schemaName = dataSource == 1 ? "RNAUTO" : "RNMAN";
|
||||
//endregion
|
||||
|
||||
//根据数据源、样品类型查询样品的浓度
|
||||
switch (sampleType) {
|
||||
case "P":
|
||||
switch (dataSource) {
|
||||
//RNAUTO
|
||||
case 1:
|
||||
if (dataSource == 1) {
|
||||
nuclideActConcIntvls =
|
||||
this.baseMapper.getRnautoPNuclideActConcIntvl(sampleType,
|
||||
station, nuclideName, startTime, endTime);
|
||||
break;
|
||||
//RNMAN
|
||||
case 2:
|
||||
} else if (dataSource == 2) {
|
||||
nuclideActConcIntvls =
|
||||
this.baseMapper.getRnmanPNuclideActConcIntvl(sampleType,
|
||||
station, nuclideName, startTime, endTime);
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "B":
|
||||
switch (dataSource) {
|
||||
case 1:
|
||||
if (dataSource == 1) {
|
||||
nuclideActConcIntvls =
|
||||
this.baseMapper.getRnautoNuclideActConcIntvl(sampleType,
|
||||
station, nuclideName, startTime, endTime);
|
||||
break;
|
||||
case 2:
|
||||
} else if (dataSource == 2) {
|
||||
nuclideActConcIntvls =
|
||||
this.baseMapper.getRnmanNuclideActConcIntvl(sampleType, station,
|
||||
nuclideName, startTime, endTime);
|
||||
break;
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获取浓度出现的次数
|
||||
if (nuclideActConcIntvls.isEmpty()) {
|
||||
result.error500("查询数据为空");
|
||||
return result;
|
||||
}
|
||||
//获取浓度值集合
|
||||
List<Double> data =
|
||||
DistributionAnalysisToolkit.convertConcToDoubleList(nuclideActConcIntvls);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user