| | |
| | | package com.fgkj.services.history; |
| | | |
| | | import com.fgkj.dto.Batt_Maint_Dealarm; |
| | | import com.fgkj.dto.Batt_realdata; |
| | | import com.fgkj.dto.PageBean; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.mapper.impl.history.Batt_realdataMapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | private Batt_realdataMapper mapper; |
| | | |
| | | //按照时间倒序查出具体电池组的所有信息 |
| | | public ServiceModel serchByCondition(Batt_realdata realData) { |
| | | ServiceModel model=new ServiceModel(); |
| | | List list=mapper.serchByCondition(realData); |
| | | if(list!=null&&list.size()>0){ |
| | | public ServiceModel serchByCondition(Batt_realdata realData,int pageNum,int pageSize) { |
| | | //分页 |
| | | PageBean pageBean = new PageBean(); |
| | | pageBean.setPageSize(pageSize); |
| | | pageBean.setPageNum(pageNum); |
| | | PageHelper.startPage(pageBean.getPageNum(), pageBean.getPageSize(), true); |
| | | ServiceModel model = new ServiceModel(); |
| | | List<Batt_realdata> list = mapper.serchByCondition(realData); |
| | | if (list != null && list.size() > 0) { |
| | | PageInfo<Batt_realdata> pageInfo = new PageInfo<>(list); |
| | | model.setCode(1); |
| | | model.setData(list); |
| | | model.setData(pageInfo); |
| | | model.setMsg("查询成功!"); |
| | | }else{ |
| | | } else { |
| | | model.setCode(0); |
| | | model.setMsg("查询失败!"); |
| | | } |