From d74669bf02142dd7a46f8cfe32bb330cc7c59a0a Mon Sep 17 00:00:00 2001 From: han0 Date: Tue, 2 Jan 2024 11:12:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(material):=20=E6=96=B0=E5=A2=9E=E6=9D=90?= =?UTF-8?q?=E6=96=99=E7=BB=93=E6=9E=9C=E5=AE=8C=E6=95=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/MaterialResultController.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/mjkf/xinke/main/controller/MaterialResultController.java b/src/main/java/mjkf/xinke/main/controller/MaterialResultController.java index 7461196..35fc4e7 100644 --- a/src/main/java/mjkf/xinke/main/controller/MaterialResultController.java +++ b/src/main/java/mjkf/xinke/main/controller/MaterialResultController.java @@ -56,4 +56,20 @@ public class MaterialResultController { var result = materialResultService.getTrend(data, year, month, type); return FuHttpResponse.Builder().dataResponse(result).build(); } + + @ApiOperation("获取材料结果完整数据") + @GetMapping("/{id}/full-data") + public HttpResponse getFullData ( + @PathVariable String id, + @ApiParam("类型") @RequestParam("type") Integer type, + @ApiParam("年份") @RequestParam("year") Integer year, + @ApiParam("月份") @RequestParam(value="month") Integer month + ) throws Exception{ + var data = materialResultService.getById(id, type); + if (data == null) { + throw new NcHttpException(HttpErrorResponseEnum.MATERIAL_RESULT_NOT_FOUND); + } + var result = materialResultService.getTrend(data, year, month, type); + return FuHttpResponse.Builder().dataResponse(result).build(); + } }