格式化代码
This commit is contained in:
parent
b75a05ae14
commit
0b691a1a19
|
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.util.DateUtils;
|
|
||||||
import org.jeecg.entity.GardsStations;
|
import org.jeecg.entity.GardsStations;
|
||||||
import org.jeecg.entity.SysDefaultNuclide;
|
import org.jeecg.entity.SysDefaultNuclide;
|
||||||
import org.jeecg.service.ISampleStatAnalysisService;
|
import org.jeecg.service.ISampleStatAnalysisService;
|
||||||
|
|
@ -16,11 +15,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("dataAnalysis")
|
@RequestMapping("dataAnalysis")
|
||||||
|
|
@ -39,12 +35,11 @@ public class DataAnalysisController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getSampleMonitorResult")
|
@GetMapping("/getSampleMonitorResult")
|
||||||
@ApiOperation(value = "样品监测结果回放", notes = "样品监测结果回放")
|
@ApiOperation(value = "样品监测结果回放", notes = "样品监测结果回放")
|
||||||
public Result getSampleMonitorResult(String sampleType, Integer dataSource,
|
public Result<?> getSampleMonitorResult(String sampleType, Integer dataSource,
|
||||||
@RequestParam("startDate")
|
@RequestParam("startDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||||
@RequestParam("endDate")
|
@RequestParam("endDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||||
|
|
||||||
return sampleStatAnalysisService.getSampleMonitorResult(sampleType, dataSource, startDate,
|
return sampleStatAnalysisService.getSampleMonitorResult(sampleType, dataSource, startDate,
|
||||||
endDate);
|
endDate);
|
||||||
}
|
}
|
||||||
|
|
@ -59,7 +54,7 @@ public class DataAnalysisController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getSampleStatAnalysis")
|
@GetMapping("/getSampleStatAnalysis")
|
||||||
@ApiOperation(value = "样品统计分析", notes = "样品统计分析")
|
@ApiOperation(value = "样品统计分析", notes = "样品统计分析")
|
||||||
public Result getSampleStatAnalysis(String station, Integer dataSource,
|
public Result<?> getSampleStatAnalysis(String station, Integer dataSource,
|
||||||
@RequestParam("startDate")
|
@RequestParam("startDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||||
@RequestParam("endDate")
|
@RequestParam("endDate")
|
||||||
|
|
@ -97,16 +92,13 @@ public class DataAnalysisController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getSampleGradeAnalysis")
|
@GetMapping("/getSampleGradeAnalysis")
|
||||||
@ApiOperation(value = "样品等级时序分析", notes = "样品等级时序分析")
|
@ApiOperation(value = "样品等级时序分析", notes = "样品等级时序分析")
|
||||||
public Result getSampleGradeAnalysis(String sampleType, String station, Integer dataSource,
|
public Result<?> getSampleGradeAnalysis(String sampleType, String station, Integer dataSource,
|
||||||
@RequestParam("startDate")
|
@RequestParam("startDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
||||||
@RequestParam("endDate")
|
@RequestParam("endDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
|
||||||
Result result =
|
return sampleStatAnalysisService.getSampleGradeAnalysis(sampleType, station, startDate,
|
||||||
sampleStatAnalysisService.getSampleGradeAnalysis(sampleType, station, startDate,
|
endDate, dataSource);
|
||||||
endDate, dataSource);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** 样品活度浓度区间频率分析
|
/*** 样品活度浓度区间频率分析
|
||||||
|
|
@ -121,7 +113,7 @@ public class DataAnalysisController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getActConcIntvlAnalysis")
|
@GetMapping("/getActConcIntvlAnalysis")
|
||||||
@ApiOperation(value = "样品活度浓度区间频率分析", notes = "样品活度浓度区间频率分析")
|
@ApiOperation(value = "样品活度浓度区间频率分析", notes = "样品活度浓度区间频率分析")
|
||||||
public Result getSampleActConcIntvlAnalysis(String sampleType, String station,
|
public Result<?> getSampleActConcIntvlAnalysis(String sampleType, String station,
|
||||||
String nuclideName, Integer dataSource,
|
String nuclideName, Integer dataSource,
|
||||||
@RequestParam("startDate")
|
@RequestParam("startDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
|
@ -129,7 +121,6 @@ public class DataAnalysisController {
|
||||||
@RequestParam("endDate")
|
@RequestParam("endDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
Date endDate) {
|
Date endDate) {
|
||||||
|
|
||||||
return sampleStatAnalysisService.getSampleActConcIntvlAnalysis(sampleType, station,
|
return sampleStatAnalysisService.getSampleActConcIntvlAnalysis(sampleType, station,
|
||||||
nuclideName, dataSource, startDate, endDate);
|
nuclideName, dataSource, startDate, endDate);
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +137,7 @@ public class DataAnalysisController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getActConcTimeSeqAnalysis")
|
@GetMapping("/getActConcTimeSeqAnalysis")
|
||||||
@ApiOperation(value = "样品活度浓度时序分析", notes = "样品活度浓度时序分析")
|
@ApiOperation(value = "样品活度浓度时序分析", notes = "样品活度浓度时序分析")
|
||||||
public Result getSampleActConcTimeSeqAnalysis(String sampleType, String station,
|
public Result<?> getSampleActConcTimeSeqAnalysis(String sampleType, String station,
|
||||||
String nuclideName, Integer dataSource,
|
String nuclideName, Integer dataSource,
|
||||||
@RequestParam("startDate")
|
@RequestParam("startDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
|
@ -154,7 +145,6 @@ public class DataAnalysisController {
|
||||||
@RequestParam("endDate")
|
@RequestParam("endDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
Date endDate) throws JsonProcessingException {
|
Date endDate) throws JsonProcessingException {
|
||||||
//return sampleStatAnalysisService.getSampleActConcTimeSeqAnalysis(sampleType, station, nuclideName, dataSource, startDate, endDate);
|
|
||||||
return sampleStatAnalysisService.getNuclideActConcChartData(sampleType, station,
|
return sampleStatAnalysisService.getNuclideActConcChartData(sampleType, station,
|
||||||
nuclideName, dataSource, startDate, endDate);
|
nuclideName, dataSource, startDate, endDate);
|
||||||
}
|
}
|
||||||
|
|
@ -171,7 +161,7 @@ public class DataAnalysisController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getNuclideActivityConcAnalyze")
|
@GetMapping("/getNuclideActivityConcAnalyze")
|
||||||
@ApiOperation(value = "核素活度浓度对比分析", notes = "核素活度浓度对比分析")
|
@ApiOperation(value = "核素活度浓度对比分析", notes = "核素活度浓度对比分析")
|
||||||
public Result getNuclideActivityConcAnalyze(String sampleType, Integer[] stationIds,
|
public Result<?> getNuclideActivityConcAnalyze(String sampleType, Integer[] stationIds,
|
||||||
String nuclideName, Integer dataSource,
|
String nuclideName, Integer dataSource,
|
||||||
@RequestParam("startDate")
|
@RequestParam("startDate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
|
@ -185,35 +175,17 @@ public class DataAnalysisController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/findStationList")
|
@GetMapping("/findStationList")
|
||||||
public Result findStationList(String systemType) {
|
public Result<?> findStationList(String systemType) {
|
||||||
Result result = new Result();
|
List<GardsStations> gardsStations =
|
||||||
try {
|
sampleStatAnalysisService.findStationListByMenuName(systemType);
|
||||||
List<GardsStations> gardsStations =
|
return Result.OK(gardsStations);
|
||||||
sampleStatAnalysisService.findStationListByMenuName(systemType);
|
|
||||||
result.setCode(200);
|
|
||||||
result.setSuccess(true);
|
|
||||||
result.setResult(gardsStations);
|
|
||||||
} catch (Exception e) {
|
|
||||||
result.setCode(500);
|
|
||||||
result.setSuccess(false);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/findNuclideList")
|
@GetMapping("/findNuclideList")
|
||||||
public Result findNuclideList(String systemType) {
|
public Result<?> findNuclideList(String systemType) {
|
||||||
Result result = new Result();
|
List<SysDefaultNuclide> defaultNuclides =
|
||||||
try {
|
sampleStatAnalysisService.findNuclideList(systemType);
|
||||||
List<SysDefaultNuclide> defaultNuclides =
|
return Result.OK(defaultNuclides);
|
||||||
sampleStatAnalysisService.findNuclideList(systemType);
|
|
||||||
result.setCode(200);
|
|
||||||
result.setSuccess(true);
|
|
||||||
result.setResult(defaultNuclides);
|
|
||||||
} catch (Exception e) {
|
|
||||||
result.setCode(500);
|
|
||||||
result.setSuccess(false);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user