| | |
| | | int battgroupid = BattinfGroupFactory.searchMaxBattgroupId(); |
| | | int stationid = BattinfGroupFactory.searchStationId(); |
| | | // int dev_id=BattinfGroupFactory.searchmaxdev_id(); |
| | | // int dev_id=BattinfGroupFactory.searchmaxdev_id(list.get(0).getFbsDeviceId()); |
| | | // int dev_id=BattinfGroupFactory.searchmaxdev_id(list.get(0).getFbsDeviceId()); //TODO 方法名不一致 |
| | | for (int i = 0; i < list.size(); i++) { |
| | | BattInf binf = list.get(i); |
| | | if(!mapper.add(binf)){ |
| | |
| | | private Database_backupMapper backupmapper; |
| | | //修改电池信息配置(ip地址,掩码和网关) |
| | | public ServiceModel updateIp(BattInf binf) { |
| | | ServiceModel model = new ServiceModel(); |
| | | //更新数据库备份标志表的标志 |
| | | boolean flag = backupmapper.updateBackupEn("tb_battinf") > 0; |
| | | boolean b=mapper.updateIp(binf)>0; |
| | |
| | | if(list!=null&&list.size()>0){ |
| | | for (int i = 0; i < list.size(); i++) { |
| | | BattInf binf=list.get(i); |
| | | if (mapper.del(binf)>0) { |
| | | flag = true; |
| | | }else{ |
| | | flag = false; |
| | | try { |
| | | flag =mapper.del(binf)>0; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | dataSourceTransactionManager.rollback(transactionStatus); |
| | | model.setCode(0); |
| | | model.setMsg("删除失败!"); |
| | | return model; |
| | | } |
| | | { |
| | | String msg="删除"+binf.getStationName()+"机房"+binf.getBattGroupId()+"电池组的信息"; |