| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.BattTestDataCalcDTO; |
| | | import com.whyc.dto.BattTestDataDTO; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.pojo.BatttestdataInf; |
| | | import com.whyc.service.BattTestDataInf2Service; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("battTestData") |
| | | @Api(tags = "在线监测-历史数据管理") |
| | | public class BattTestDataInf2Controller { |
| | | public class BattTestDataInf2Controller extends BaseController{ |
| | | |
| | | @Autowired |
| | | private BattTestDataInf2Service service; |
| | | |
| | | @PostMapping("calcTestData") |
| | | @ApiOperation(value = "电池组的历史测试数据查询并计算落后单体",notes = "原接口:BattTest_ResAction!serchByCondition") |
| | | public Response<PageInfo<BattTestDataCalcDTO>> calcTestData(@RequestBody BattTestDataDTO paramDto, |
| | | @ApiOperation(value = "电池组的历史测试数据查询并统计可能存在的落后单体",notes = "原接口:BattTest_ResAction!serchByCondition") |
| | | public Response<PageInfo<BatttestdataInf>> calcTestData(@RequestBody BattTestDataDTO paramDto, |
| | | @RequestParam Integer pageNum, |
| | | @RequestParam Integer pageSize){ |
| | | PageInfo<BattTestDataCalcDTO> page = service.calcTestData(paramDto,pageNum,pageSize); |
| | | return new Response().set(1,page); |
| | | paramDto.setUId(ActionUtil.getUser().getUId()); |
| | | PageInfo<BatttestdataInf> page = service.calcTestData(paramDto,pageNum,pageSize); |
| | | return new Response<PageInfo<BatttestdataInf>>().set(1,page); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation(value = "维护区查询") |
| | | public Response<List<String>> getStationName1(){ |
| | | UserInf user = ActionUtil.getUser(); |
| | | List<String> stationName1List = service.getStationName1(user.getUId()); |
| | | return new Response<List<String>>().set(1,stationName1List); |
| | | @PostMapping("delete") |
| | | @ApiOperation(value = "删除") |
| | | public Response<Boolean> delete(@RequestParam Integer num, |
| | | @RequestParam Integer battGroupId, |
| | | @RequestParam Integer testRecordCount, |
| | | @RequestParam Integer testType){ |
| | | boolean res = service.delete(num,battGroupId,testRecordCount,testType); |
| | | return new Response<Boolean>().setII(1,res,null,"删除成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |