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(); + } }