| | |
| | | |
| | | @Autowired(required = false) |
| | | private InfoChangeService changeService; |
| | | |
| | | /*新建电池组(新的设备新的电池组) |
| | | * @param binf |
| | | * 1.在电源下新建设备,记录设备编号,devNum,设备名称为设备类型+devNum |
| | |
| | | dto.setUid(user.getId()); |
| | | PageHelper.startPage(dto.getPageNum(),dto.getPageSize()); |
| | | List<InfoDto> list=mapper.getInfo(dto); |
| | | for (InfoDto infoDto:list) { |
| | | //获取机房,电源,电池组变更记录 |
| | | List<StationInfChange> sinfChangeList=changeService.getSinfChange(infoDto.getStationId()); |
| | | infoDto.setSinfChangeList(sinfChangeList); |
| | | List<PowerInfChange> pinfChangeList=changeService.getPinfChange(infoDto.getPowerId()); |
| | | infoDto.setPinfChangeList(pinfChangeList); |
| | | List<BattInfChange> binfChangeList=changeService.getBinfChange(infoDto.getBattgroupId()); |
| | | infoDto.setBinfChangeList(binfChangeList); |
| | | } |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list!=null,pageInfo,"查询电池"); |
| | | } |
| | |
| | | wrapper.eq("battgroup_id",battgroupId); |
| | | wrapper.last("limit 1"); |
| | | BattInf binf=mapper.selectOne(wrapper); |
| | | List<BattInfChange> binfChangeList=changeService.getBinfChange(battgroupId); |
| | | binf.setBinfChangeList(binfChangeList); |
| | | return binf; |
| | | } |
| | | //当没有内助测试时初始内阻值为标称内阻 |
| | |
| | | return mapper.getBattgroupIdInf(battgroupId); |
| | | } |
| | | //查询电源下所有的电池组id |
| | | public List<Integer> getBattgroupIdListByPowerId(Integer powerId) { |
| | | public List<BattInf> getBattgroupIdListByPowerId(Integer powerId) { |
| | | return mapper.getBattgroupIdListByPowerId(powerId); |
| | | } |
| | | //查询设备下所有的电池组id |
| | | public List<Integer> getBattgroupIdListByDevId(Integer devId) { |
| | | public List<BattInf> getBattgroupIdListByDevId(Integer devId) { |
| | | return mapper.getBattgroupIdListByDevId(devId); |
| | | } |
| | | } |