| | |
| | | String sql = "update db_battinf.tb_battinf set StationId='"+binf.getStationId()+"',StationName='"+binf.getStationName()+"',StationName1='"+binf.getStationName1()+"',StationName2='"+binf.getStationName2()+"',StationName3='"+binf.getStationName3()+"',StationName4='"+binf.getStationName4()+"',StationName5='"+binf.getStationName5()+"',StationIp='"+binf.getStationIp()+"',FBSDeviceId="+binf.getFBSDeviceId()+",FbsDeviceIp='"+binf.getFbsDeviceIp()+"',"
|
| | | + "FBSDeviceName='"+binf.getFBSDeviceName()+"',GroupIndexInFBSDevice="+binf.getGroupIndexInFBSDevice()+",BattGroupNum="+binf.getBattGroupNum()+",BattGroupName='"+binf.getBattGroupName()+"',FloatVolLevel="+binf.getFloatVolLevel()+",OfflineVolLevel="+binf.getOfflineVolLevel()+",BattFloatCurrent="+binf.getBattFloatCurrent()+"," +
|
| | | "MonCount="+binf.getMonCount()+",MonCapStd="+binf.getMonCapStd()+",monVolStd="+binf.getMonVolStd()+",monResStd="+binf.getMonResStd()+",MonSerStd="+binf.getMonSerStd()+",MonVolLowToAvg="+binf.getMonVolLowToAvg()+",BattProducer='"+binf.getBattProducer()+"',BattModel='"+binf.getBattModel()+"',BattProductDate='"+DAOHelper.sdf.format(binf.getBattProductDate())+"',BattInUseDate='"+DAOHelper.sdf.format(binf.getBattInUseDate())+"', "
|
| | | +" Load_curr="+binf.getLoad_curr()+",install_user="+binf.getInstall_user()+",DisCurrMax="+binf.getDisCurrMax()+",station_phone='"+binf.getStation_phone()+"' where battgroupId="+binf.getBattGroupId();
|
| | | +" Load_curr="+binf.getLoad_curr()+",install_user='"+binf.getInstall_user()+"',DisCurrMax="+binf.getDisCurrMax()+",station_phone='"+binf.getStation_phone()+"' where battgroupId="+binf.getBattGroupId();
|
| | | sql_str.add(sql);
|
| | | {
|
| | | String msg="修改"+binf.getStationName()+"机房"+binf.getBattGroupId()+"电池组的信息";
|
| | |
| | | return list;
|
| | | }
|
| | |
|
| | | //查设备总数
|
| | | //查设备总数(已经安装)
|
| | | /*public int serchByDeviceId(){
|
| | | String sql=" SELECT COUNT(DISTINCT fbsdeviceid) number FROM db_battinf.tb_battinf limit 1";
|
| | | List<BattInf> list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{}, new CallBack() {
|
| | |
| | | " left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId " +
|
| | | " left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " +
|
| | | " left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
| | | " where db_user.tb_user_inf.uid=? " +
|
| | | " where db_user.tb_user_inf.uid=? and db_battinf.tb_battinf.Station_install=1 " +
|
| | | " limit 1";
|
| | | List<BattInf> list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{uinf.getUId()}, new CallBack() {
|
| | | |
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()){
|
| | | BattInf binf=new BattInf();
|
| | | binf.setNum(rs.getInt("number"));
|
| | | list.add(binf);
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | }
|
| | | return list;
|
| | | }
|
| | | |
| | | });
|
| | | int number=0;//存放总数
|
| | | if(list!=null&&list.size()>0){
|
| | | number=list.get(list.size()-1).getNum();
|
| | | }
|
| | | return number;
|
| | | }
|
| | | //查询设备总数(全部)
|
| | | public int serchByDeviceId_all(Object obj){
|
| | | User_inf uinf=(User_inf) obj;
|
| | | String sql=" SELECT COUNT(DISTINCT fbsdeviceid) number FROM db_battinf.tb_battinf " +
|
| | | " left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId " +
|
| | | " left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " +
|
| | | " left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
| | | " where db_user.tb_user_inf.uid=? " +
|
| | | " limit 1";
|
| | | List<BattInf> list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{uinf.getUId()}, new CallBack() {
|
| | |
|
| | |
| | | });
|
| | | return list;
|
| | | }
|
| | | |
| | | //实时历史机历卡
|
| | | public List serchByBattgroupId(Object obj){
|
| | | BattInf binf=(BattInf)obj;
|
| | | String sql="select * from db_battinf.tb_battinf where battgroupid=?";
|
| | |
| | | batt.setSignalId(rs.getString("SignalId"));
|
| | |
|
| | | batt.setCInterFaceId(Integer.parseInt(rs.getString("CInterFaceId")));
|
| | | |
| | | batt.setInstall_user(rs.getString("install_user"));
|
| | | batt.setSignalName(rs.getString("SignalName"));
|
| | | int BattGuarantDayCount=rs.getInt("BattGuarantDayCount")-ActionUtil.daysBetween(rs.getDate("BattInUseDate"), new Date());//剩余保修天数
|
| | | batt.setBattGuarantDayCount(BattGuarantDayCount);
|