From 4fc7909358cc62231c81b8e871749fc1b3fa69bd Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期一, 25 十一月 2024 14:10:26 +0800 Subject: [PATCH] 测试提交(无用) --- src/main/java/com/whyc/controller/BatttestdataInfController.java | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/whyc/controller/BatttestdataInfController.java b/src/main/java/com/whyc/controller/BatttestdataInfController.java index a9ae1ea..612731c 100644 --- a/src/main/java/com/whyc/controller/BatttestdataInfController.java +++ b/src/main/java/com/whyc/controller/BatttestdataInfController.java @@ -3,15 +3,18 @@ import com.whyc.dto.Response; import com.whyc.service.BattgroupBaojigroupService; import com.whyc.service.BatttestdataInfService; +import com.whyc.service.ExcelExportService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpRequest; import org.springframework.web.bind.annotation.GetMapping; 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 javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.Map; @RestController @@ -21,6 +24,8 @@ @Autowired private BatttestdataInfService service; + @Autowired + private ExcelExportService exportService; @ApiOperation(value = "娴嬭瘯缁熻鏈勾/鏈湀") @GetMapping("getDevTinfByYearMonth") @@ -33,9 +38,28 @@ public Map<String, Object> getDevTinfByWeek(@RequestParam Integer uid){ return service.getDevTinfByWeek(uid); } + @ApiOperation(value = "鑾峰彇璁惧鐨勫厖鏀剧數璁板綍") @GetMapping("getTinfById") public Response getTinfById(@RequestParam Integer devId){ return service.getTinfById(devId); } + + @ApiOperation(value = "鑾峰彇璁惧鏌愭璁板綍璇︾粏鐨勫崟浣撴斁鐢佃繃绋�") + @GetMapping("getTdataById") + public Response getTdataById(@RequestParam Integer devId,@RequestParam Integer testRecordCount){ + return service.getTdataById(devId,testRecordCount); + } + + @ApiOperation(value = "瀵煎嚭鏌愭璁板綍璇︾粏鐨勫崟浣撴斁鐢佃褰�") + @GetMapping("exportData") + public void exportData(@RequestParam Integer devId, @RequestParam Integer testRecordCount + , HttpServletResponse resp){ + if(devId/100000000==1){ + exportService.exportExcelA200(devId,testRecordCount,resp); + }else{ + exportService.exportExcelActm(devId,testRecordCount,resp); + } + + } } \ No newline at end of file -- Gitblit v1.9.1