package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.pojo.db_data_history.PwrdevHistorydataId; import com.whyc.pojo.db_user.User; import com.whyc.service.*; import com.whyc.util.ActionUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; 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.text.ParseException; @RestController @Api(tags = "实时页面") @RequestMapping("real") public class RealContoller { @Autowired private PwrdevHistorydataIdService pwrdevHistorydataIdService; @Autowired private BattRealdataIdService battRealdataIdService; @Autowired private BatttestdataInfService tinfService; @Autowired private BatttestdataIdService tdataIdService; @ApiOperation(value = "系统概览获取前一百比时间间隔数据交流输入统计") @GetMapping("getPwrHisAcinData100") public Response getPwrHisAcinData100(@RequestParam Integer powerId) throws ParseException, InterruptedException { return pwrdevHistorydataIdService.getPwrHisAcinData100(powerId); } @ApiOperation(value = "系统概览获取前一百比时间间隔数据直流输出统计") @GetMapping("getPwrHisDcoutData100") public Response getPwrHisDcoutData100(@RequestParam Integer powerId) throws ParseException, InterruptedException { return pwrdevHistorydataIdService.getHalfHourPwrHisDcoutData(powerId); } @ApiOperation(value = "系统概览获取前一百比时间间隔数据核容设备信息") @GetMapping("getBattDevData100") public Response getBattDevData100(@RequestParam Integer powerId,@RequestParam Integer battgroupId) throws ParseException, InterruptedException { return battRealdataIdService.getBattDevData100(powerId,battgroupId); } @ApiOperation(value = "历史测试记录") @GetMapping("getBattTinf") public Response getBattTinf(@RequestParam Integer battgroupId){ return tinfService.getBattTinf(battgroupId); } @ApiOperation(value = "历史测试记录具体某一次放电数据详情") @GetMapping("getTinfDataWithTestRecordCount") public Response getTinfDataWithTestRecordCount(@RequestParam Integer battgroupId,@RequestParam Integer testRecordCount ,@RequestParam Integer recordNum,@RequestParam Integer granularity){ return tdataIdService.getTinfDataWithTestRecordCount(battgroupId,testRecordCount,recordNum,granularity); } @ApiOperation(value = "历史实时查询") @GetMapping("getBattRealDataHis") public Response getBattRealDataHis(@RequestParam Integer battgroupId,@RequestParam Integer granularity ,@RequestParam String startTime,@RequestParam String endTime) throws ParseException, InterruptedException { return battRealdataIdService.getBattRealDataHis(battgroupId,granularity,startTime,endTime); } }