package com.whyc.controller;
|
|
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 javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
import java.util.Map;
|
|
@RestController
|
@Api(tags = "测试管理")
|
@RequestMapping("tinf")
|
public class BatttestdataInfController {
|
@Autowired
|
private BatttestdataInfService service;
|
|
@Autowired
|
private ExcelExportService exportService;
|
|
@ApiOperation(value = "测试统计本年/本月")
|
@GetMapping("getDevTinfByYearMonth")
|
public Map<String, Object> getDevTinfByYearMonth(@RequestParam Integer uid){
|
return service.getDevTinfByYearMonth(uid);
|
}
|
|
@ApiOperation(value = "测试统计本周")
|
@GetMapping("getDevTinfByWeek")
|
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);
|
}
|
|
}
|
}
|