feat(material): 新增材料结果完整数据

This commit is contained in:
han0
2024-01-02 11:12:01 +08:00
parent 618ce45db2
commit d74669bf02

View File

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