| | |
| | | package com.whyc.service; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.BattTestData; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BatttestdataMapper; |
| | | import com.whyc.pojo.BatttestdataId; |
| | |
| | | private BatttestdataMapper mapper; |
| | | |
| | | //查询历史数据 |
| | | public Response findhistory(int battGroupId,int testRecordCount) { |
| | | BatttestdataId btd=mapper.serchMaxAndMintime(battGroupId,testRecordCount); |
| | | int number=btd.getRecordNum();//总数 |
| | | int roteN=0; |
| | | int endN= BattTestData.RC_NUM_PARAM;//总笔数 |
| | | public Response findhistory(int battGroupId, int testRecordCount, int dataNew) { |
| | | BatttestdataId btd = mapper.serchMaxAndMintime(battGroupId, testRecordCount); |
| | | int number = btd.getRecordNum();//总数 |
| | | int roteN = 0; |
| | | //int endN= BattTestData.RC_NUM_PARAM;//总笔数 |
| | | int endN = dataNew;//总笔数 |
| | | //去除筛选,将全部数据取出 |
| | | if(number<=endN){ |
| | | roteN=1; |
| | | }else{ |
| | | /*if(number%endN==0){ |
| | | roteN=number/endN; |
| | | }else{ |
| | | roteN=number/endN+1; |
| | | }*/ |
| | | roteN=1; |
| | | if (number <= endN) { |
| | | roteN = 1; |
| | | } else { |
| | | if (number % endN == 0) { |
| | | roteN = number / endN; |
| | | } else { |
| | | roteN = number / endN + 1; |
| | | } |
| | | //roteN = 1; |
| | | } |
| | | List list=mapper.findhistory(battGroupId,testRecordCount,roteN,btd.getNum().intValue(),btd.getTestType()); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().set(1,pageInfo); |
| | | List list = mapper.findhistory(battGroupId, testRecordCount, roteN, btd.getNum().intValue(), btd.getTestType()); |
| | | PageInfo pageInfo = new PageInfo(list); |
| | | return new Response().set(1, pageInfo); |
| | | } |
| | | |
| | | |