| | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.PowerDto; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.Statistic.Pwr7Stic; |
| | | import com.whyc.dto.Statistic.StationStic; |
| | | import com.whyc.mapper.BaojigroupPowerMapper; |
| | | import com.whyc.mapper.BaojigroupUsrMapper; |
| | | import com.whyc.mapper.PowerInfMapper; |
| | | import com.whyc.mapper.StationInfMapper; |
| | | import com.whyc.pojo.db_station.BattInf; |
| | | import com.whyc.pojo.db_station.PowerInf; |
| | | import com.whyc.pojo.db_station.StationInf; |
| | | import com.whyc.pojo.db_user.BaojigroupPower; |
| | |
| | | List<String> list=mapper.getProtocolByUid(uid); |
| | | return new Response().setII(1,list.size()>0,list,"获取电源协议(下拉)"); |
| | | } |
| | | //获取电源信息 |
| | | public PowerInf getPowerInfById(Integer powerId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("power_id",powerId); |
| | | wrapper.last("limit 1"); |
| | | PowerInf pinf=mapper.selectOne(wrapper); |
| | | return pinf; |
| | | } |
| | | //电源信息统计 |
| | | public Response getPowerStatistic(StationStic stic) { |
| | | PageHelper.startPage(stic.getPageNum(),stic.getPageSize()); |
| | | List<PowerInf> list=mapper.getPowerStatistic(stic); |
| | | PageInfo<PowerInf> pageInfo=new PageInfo<>(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"电源信息统计"); |
| | | } |
| | | //优良电源数量统计(1.2.7) |
| | | public List<PowerInf> getPwr7Statistic(Pwr7Stic stic) { |
| | | return mapper.getPwr7Statistic(stic); |
| | | } |
| | | } |