| | |
| | | import com.whyc.mapper.DevInfMapper; |
| | | import com.whyc.pojo.db_alarm.DevalarmDataYear; |
| | | import com.whyc.pojo.db_lithium_ram_db.DevInf; |
| | | import com.whyc.pojo.db_user.UserInf; |
| | | import com.whyc.service.DevInfService; |
| | | import com.whyc.service.SubTablePageInfoService; |
| | | import com.whyc.service.UserInfService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | private SubTablePageInfoService service; |
| | | |
| | | @Autowired(required = false) |
| | | private DevInfMapper dinfMapper; |
| | | private DevInfService dinfService; |
| | | |
| | | @Autowired(required = false) |
| | | private UserInfService uinfService; |
| | | |
| | | /**按年份表分页查询*/ |
| | | public PageInfo<Object> getPageInfo(int pageNum,int pageSize, |
| | |
| | | List<DevalarmDataYear> list = service.getListDevAlm(dto); |
| | | for (DevalarmDataYear year:list) { |
| | | int devId=year.getDevId(); |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | | wrapper.last("limit 1"); |
| | | DevInf dinf=dinfMapper.selectOne(wrapper); |
| | | int uid=year.getConfirmedUid(); |
| | | DevInf dinf=dinfService.getDinfByDevId(devId); |
| | | UserInf uinf=uinfService.getUinfByUId(uid); |
| | | year.setDevInf(dinf); |
| | | year.setConfirmedUname(uinf!=null?uinf.getUname():""); |
| | | } |
| | | dataList.addAll(list); |
| | | } |