diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/SelfStationController.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/SelfStationController.java index f34fffec..e072f946 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/SelfStationController.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/SelfStationController.java @@ -1,5 +1,7 @@ package org.jeecg.modules.controller; +import com.google.gson.Gson; +import com.google.gson.JsonObject; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.jeecg.common.api.vo.Result; @@ -15,6 +17,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; @RestController @@ -51,8 +54,9 @@ public class SelfStationController { @PutMapping("updateROI") @ApiOperation(value = "更新ROI范围", notes = "更新ROI范围") - public Result updateROI(@RequestBody List roiParams, @RequestParam String sampleFileName, HttpServletRequest request) { - return selfStationService.updateROI(roiParams, sampleFileName, request); + public Result updateROI(@RequestParam String roiParams, @RequestParam String sampleFileName, HttpServletRequest request) { + ArrayList roiParamList = (ArrayList) new Gson().fromJson(roiParams, List.class); + return selfStationService.updateROI(roiParamList, sampleFileName, request); } @GetMapping("energyCalibration") @@ -281,6 +285,12 @@ public class SelfStationController { return selfStationService.fitting(fittingBody.getParamA(), fittingBody.getParamB(), fittingBody.getParamC(), fittingBody.getTempPoints(), fittingBody.getCount(), fittingBody.getSampleFileName(), fittingBody.getTabName(), fittingBody.isFittingBtn(), request); } + @GetMapping("getGammaGated") + @ApiOperation(value = "获取gamma对应count数据", notes = "获取gamma对应count数据") + public Result getGammaGated(Integer chartHeight, Integer channelWidth, Integer gammaChannel, Integer sampleId, String qcFileName, String sampleFileName, HttpServletRequest request) { + return selfStationService.getGammaGated(chartHeight, channelWidth, gammaChannel, sampleId, qcFileName, sampleFileName, request); + } + @GetMapping("NuclideLibrary") @ApiOperation(value = "查看Nuclide Library页面数据", notes = "查看Nuclide Library页面数据") public Result NuclideLibrary(Integer sampleId, String fileName, String editEnergy, double err, String libraryName, String nuclideName, HttpServletRequest request) { diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/ISelfStationService.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/ISelfStationService.java index dbecb3b0..39b0d5d9 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/ISelfStationService.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/ISelfStationService.java @@ -95,6 +95,8 @@ public interface ISelfStationService { Result fitting(Double paramA, Double paramB, Double paramC, List tempPointsArray, Integer count, String sampleFileName, String tabName, boolean fittingBtn, HttpServletRequest request); + Result getGammaGated(Integer chartHeight, Integer channelWidth, Integer gammaChannel, Integer sampleId, String qcFileName, String sampleFileName, HttpServletRequest request); + Result NuclideLibrary(Integer sampleId, String fileName, String editEnergy, double err, String libraryName, String nuclideName, HttpServletRequest request); Result configUserLibrary(Integer sampleId, String fileName, HttpServletRequest request);