| | |
| | |
|
| | | import com.fgkj.dto.ServiceModel;
|
| | | import com.fgkj.dto.Stationtraffic;
|
| | | import com.fgkj.dto.User_inf;
|
| | | import com.fgkj.services.StationtrafficService;
|
| | |
|
| | |
|
| | |
| | | //统计基站流量
|
| | | public String serchByCondition() {
|
| | | Stationtraffic st=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Stationtraffic.class);
|
| | | User_inf uinf=(User_inf) getUser();
|
| | | st.setNote(uinf.getUId().toString());
|
| | | ServiceModel model=service.serchByCondition(st);
|
| | | result=tojson(model);
|
| | | return SUCCESS;
|
| | |
| | | " from db_battinf.tb_deverror_record,db_battinf.tb_battinf " +
|
| | | " where tb_deverror_record.stationid=tb_battinf.stationid " +
|
| | | " and tb_deverror_record.stationid like ? and stationname1 like ? and stationname2 like ? and stationname5 like ? " +
|
| | | " and tb_deverror_record.uid=? and error_en=0 " +
|
| | | " order by record_time desc " +
|
| | | " limit ?,? ";
|
| | | List<Deverror_record> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+binf.getStationId()+"%","%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%"
|
| | | " and tb_deverror_record.uid=? and error_en=0 " ;
|
| | | //用户管理
|
| | | String userSql=" and db_battinf.tb_battinf.StationId in(" +
|
| | | " select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id and db_user.tb_user_battgroup_baojigroup_usr.uId=? "+
|
| | | " ) ";
|
| | | sql+=userSql;
|
| | | |
| | | String orderSql=" order by record_time desc ";
|
| | | sql+=orderSql;
|
| | | String limitSql=" limit ?,? ";
|
| | | sql+=limitSql;
|
| | | List<Deverror_record> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+binf.getStationId()+"%","%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%",binf.getNum()
|
| | | ,binf.getNum(),(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | |
| | | import com.fgkj.dao.DAOHelper;
|
| | | import com.fgkj.db.DBUtil;
|
| | | import com.fgkj.dto.Stationtraffic;
|
| | | import com.sun.org.apache.bcel.internal.generic.IINC;
|
| | |
|
| | | public class StationtrafficImpl implements BaseDAO,CallBack{
|
| | |
|
| | |
| | | public List serchByCondition(Object obj) {
|
| | | final Stationtraffic straffic=(Stationtraffic) obj;
|
| | | String sql=" select distinct tb_stationtraffic.num,dev_id,record_time,dayflow,nowflow" +
|
| | | " ,tb_battinf.stationName,tb_battinf.stationName1,tb_battinf.stationName2,tb_battinf.stationName3,tb_battinf.stationName5 " +
|
| | | " ,tb_battinf.StationId,tb_battinf.stationName,tb_battinf.stationName1,tb_battinf.stationName2,tb_battinf.stationName3,tb_battinf.stationName5 " +
|
| | | " from web_site.tb_stationtraffic,db_battinf.tb_battinf " +
|
| | | " where web_site.tb_stationtraffic.dev_id=db_battinf.tb_battinf.fBSDeviceId " +
|
| | | " and record_time>? and record_time<? " +
|
| | | " and dev_id=? " +
|
| | | " order by dev_id,record_time asc ";
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{straffic.getRecord_time(),straffic.getRecord_time1(),straffic.getDev_id()}, new CallBack() {
|
| | | " and dev_id=? " ;
|
| | | //用户管理
|
| | | String userSql=" and db_battinf.tb_battinf.StationId in(" +
|
| | | " select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id and db_user.tb_user_battgroup_baojigroup_usr.uId=? "+
|
| | | " ) "; |
| | | sql+=userSql;
|
| | | String orderSql=" order by dev_id,record_time asc ";
|
| | | sql+=orderSql;
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{straffic.getRecord_time(),straffic.getRecord_time1(),straffic.getDev_id(),Integer.parseInt(straffic.getNote())}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | |
| | | Stationtraffic st=new Stationtraffic();
|
| | | st.setNum(3);
|
| | | st.setDev_id(910000001);
|
| | | st.setNote("1002");
|
| | | st.setRecord_time(ActionUtil.getSimpDate(date1));
|
| | | st.setRecord_time1(ActionUtil.getSimpDate(date2));
|
| | | List<Stationtraffic> list=simpl.serchByCondition(st);
|