| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.*; |
| | | import com.whyc.pojo.PowerBattRt; |
| | | import com.whyc.pojo.PowerInf; |
| | | import com.whyc.pojo.PowerRealRt1; |
| | | import com.whyc.pojo.RtData; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | private PowerInfMapper mapper; |
| | | |
| | | @Autowired(required = false) |
| | | private PowerBattRtMapper powerRtmapper; |
| | | private RtDataMapper rtDataMapper; |
| | | |
| | | @Autowired(required = false) |
| | | private PowerRealRt1Mapper realRt1Mapper; |
| | |
| | | Integer devType=pinf.getDevType(); |
| | | map.put("devType",devType); |
| | | if(devType!=3){//第三种不包含单体实时 |
| | | List<PowerBattRt> list=getBattRt(powerId); |
| | | List<RtData> list=getBattRt(pinf.getBinfId()); |
| | | map.put("battRt",list); |
| | | } |
| | | Object obj=getRealRt(powerId,devType); |
| | |
| | | } |
| | | |
| | | //获取电源电池组信息 |
| | | private List<PowerBattRt> getBattRt(int powerId) { |
| | | private List<RtData> getBattRt(int binfId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("power_id",powerId); |
| | | List<PowerBattRt> list=mapper.selectList(wrapper); |
| | | wrapper.eq("binf_id",binfId); |
| | | List<RtData> list=rtDataMapper.selectList(wrapper); |
| | | return list; |
| | | } |
| | | } |