gx_tieta/src/com/fgkj/dao/impl/BattInf_RebuildImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
gx_tieta/src/com/fgkj/services/BattInf_RebuildService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
gx_tieta/src/com/fgkj/dao/impl/BattInf_RebuildImpl.java
@@ -1,6 +1,8 @@ package com.fgkj.dao.impl; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import com.fgkj.dao.BaseDAO; @@ -8,6 +10,7 @@ import com.fgkj.dao.DAOHelper; import com.fgkj.db.DBUtil; import com.fgkj.dto.BattInf_Rebuild; import com.mysql.fabric.xmlrpc.base.Array; public class BattInf_RebuildImpl implements BaseDAO,CallBack{ @@ -41,10 +44,29 @@ // TODO Auto-generated method stub return null; } //查询new_battgroupid,new_monum是否有被配组的记录 public List serchByCondition(Object obj) { // TODO Auto-generated method stub return null; BattInf_Rebuild br=(BattInf_Rebuild) obj; String sql="select * from db_battinf.tb_battinf_rebuild where new_battgroupid=? and new_monum=? and rebuild_clear_type=1 limit 1"; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[]{br.getNew_battgroupid(),br.getNew_monum()}, new CallBack() { public List getResults(ResultSet rs) { List list=new ArrayList(); try { while(rs.next()){ BattInf_Rebuild br=new BattInf_Rebuild(); br.setNew_battgroupid(rs.getInt("new_battgroupid")); br.setNew_monum(rs.getInt("new_monum")); list.add(br); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } public List serchByInfo(Object obj) { gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java
@@ -36,7 +36,10 @@ //查询机房实时状态 public List serchByCondition(Object obj) { Bts_station_state bs=(Bts_station_state) obj; String sql=""; String sql="select distinct station_id,dev_id,record_datetime,station_stat,station_poff_start_time,station_poff_tlong,station_fadian_start_time,station_fadian_tlong" + " ,station_diaozhan_start_time,station_diaozhan_tlong,station_temp,station_damp,station_dooropen_start_time,station_dooropen_tlong " + " from db_ram_db.tb_bts_station_station_state " + " where "; return null; } gx_tieta/src/com/fgkj/services/BattInf_RebuildService.java
@@ -1,5 +1,7 @@ package com.fgkj.services; import java.util.List; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.BaseDAOFactory; import com.fgkj.dto.ServiceModel; @@ -14,16 +16,14 @@ } //添加 public ServiceModel add(Object obj) { List list=dao.serchByCondition(obj); if(list!=null&&list.size()>0){ boolean b=dao.update(obj); if(b){ } boolean bl=dao.add(obj); if(bl){ model.setCode(1); model.setMsg("添加成功!"); }else{ model.setCode(0); model.setMsg("添加失败!"); } }else{ model.setCode(0); model.setMsg("添加失败!");