package com.whyc.service;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.github.pagehelper.PageInfo;
|
import com.whyc.dto.BattTestData;
|
import com.whyc.dto.Response;
|
import com.whyc.mapper.Ld9testdataMapper;
|
import com.whyc.pojo.Ld9testdata;
|
import com.whyc.pojo.Ld9testdataInf;
|
import org.springframework.stereotype.Service;
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
@Service
|
public class Ld9testdataService {
|
@Resource
|
private Ld9testdataMapper mapper;
|
|
//查询LD9单体测试数据
|
public Response serchByCondition(int recordNum, int testRecordCount, int battGroupId,int testMonNum) {
|
int number=recordNum;//总数
|
int roteN=0;
|
int endN= BattTestData.RC_NUM_PARAM;//总笔数
|
if(number<=endN){
|
roteN=1;
|
}else{
|
if(number%endN==0){
|
roteN=number/endN;
|
}else{
|
roteN=number/endN+1;
|
}
|
}
|
List<Ld9testdata> list=mapper.serchByCondition(roteN,testRecordCount,battGroupId,testMonNum);
|
PageInfo pageInfo=new PageInfo(list);
|
return new Response().set(1,pageInfo);
|
}
|
//根据电池组id和test_record_count查询出整组的放电记录
|
public List<Ld9testdata> getLD9AllGroupByTestRecordCount(Ld9testdataInf ld9inf) {
|
List<Ld9testdata> list=mapper.getLD9AllGroupByTestRecordCount(ld9inf);
|
return list;
|
}
|
}
|