From 0b691a1a19b861dff7f475d183bf8d88bb068745 Mon Sep 17 00:00:00 2001 From: duwenyuan <15600000461@163.com> Date: Wed, 4 Feb 2026 13:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DataAnalysisController.java | 60 +++++-------------- 1 file changed, 16 insertions(+), 44 deletions(-) diff --git a/jeecg-module-data-analyze/src/main/java/org/jeecg/controller/DataAnalysisController.java b/jeecg-module-data-analyze/src/main/java/org/jeecg/controller/DataAnalysisController.java index 8d629de..0a1bed4 100644 --- a/jeecg-module-data-analyze/src/main/java/org/jeecg/controller/DataAnalysisController.java +++ b/jeecg-module-data-analyze/src/main/java/org/jeecg/controller/DataAnalysisController.java @@ -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, - endDate, dataSource); - - return result; + return sampleStatAnalysisService.getSampleGradeAnalysis(sampleType, station, startDate, + endDate, dataSource); } /*** 样品活度浓度区间频率分析 @@ -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 { - List gardsStations = - sampleStatAnalysisService.findStationListByMenuName(systemType); - result.setCode(200); - result.setSuccess(true); - result.setResult(gardsStations); - } catch (Exception e) { - result.setCode(500); - result.setSuccess(false); - } - return result; + public Result findStationList(String systemType) { + List gardsStations = + sampleStatAnalysisService.findStationListByMenuName(systemType); + return Result.OK(gardsStations); } @GetMapping("/findNuclideList") - public Result findNuclideList(String systemType) { - Result result = new Result(); - try { - List defaultNuclides = - sampleStatAnalysisService.findNuclideList(systemType); - result.setCode(200); - result.setSuccess(true); - result.setResult(defaultNuclides); - } catch (Exception e) { - result.setCode(500); - result.setSuccess(false); - } - return result; + public Result findNuclideList(String systemType) { + List defaultNuclides = + sampleStatAnalysisService.findNuclideList(systemType); + return Result.OK(defaultNuclides); } }