| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.Statistic.DeviceStateStic; |
| | | import com.whyc.mapper.DeviceStateMapper; |
| | | import com.whyc.pojo.db_batt_testdata.BatttestdataInf; |
| | | import com.whyc.pojo.db_ram_db.BattRtstate; |
| | | import com.whyc.pojo.db_ram_db.DeviceState; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class DeviceStateService { |
| | |
| | | DeviceState dev=mapper.selectOne(wrapper); |
| | | return dev; |
| | | } |
| | | //设备工作状态统计 |
| | | public Response getDeviceStateStatistic(DeviceStateStic stic) { |
| | | PageHelper.startPage(stic.getPageNum(),stic.getPageSize()); |
| | | List<DeviceState> list=mapper.getDeviceStateStatistic(stic); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"设备工作状态统计"); |
| | | } |
| | | } |