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