81041
2019-01-07 e9deacbe85247d765fb242f26319fcbd02cc9716
修改
9个文件已添加
5个文件已修改
290 ■■■■■ 已修改文件
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/App_bts_battgroupAction.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl$1.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/App_bts_battgroup.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/App_bts_battgroupService.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/actions/App_bts_battgroupAction.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BaseDAO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dto/App_bts_battgroup.java 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/services/App_bts_battgroupService.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/App_bts_battgroupAction.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl$1.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/App_bts_battgroup.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/App_bts_battgroupService.class
Binary files differ
gx_tieta/src/com/fgkj/actions/App_bts_battgroupAction.java
New file
@@ -0,0 +1,32 @@
package com.fgkj.actions;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.App_bts_battgroupService;
import com.fgkj.services.App_bts_comm_taskService;
public class App_bts_battgroupAction extends ActionUtil{
    private App_bts_battgroupService service = new App_bts_battgroupService();
    private String json;
    private String result;
    //根据设备id查询(uid放在num中)
    public String serchByCondition(){
        BattInf binf=getGson("").fromJson(json, BattInf.class);
        /*User_inf uinf=(User_inf) getUser();
        binf.setNum(uinf.getUId());*/
        ServiceModel model=service.serchByCondition(binf);
        result=tojson(model);
        return SUCCESS;
    }
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
}
gx_tieta/src/com/fgkj/dao/BaseDAO.java
@@ -204,6 +204,8 @@
    
    public static final int  BATTINF_APPLY=100;
    
    public static final int  APP_BTS_BATTGROUP=101;
    public boolean add(Object obj); // 添加
    public boolean update(Object obj); // 更新
gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java
@@ -3,6 +3,7 @@
import com.fgkj.dao.impl.Alarm_paramImpl;
import com.fgkj.dao.impl.AnnounceImpl;
import com.fgkj.dao.impl.App_ParamImpl;
import com.fgkj.dao.impl.App_bts_battgroupImpl;
import com.fgkj.dao.impl.App_bts_comm_taskImpl;
import com.fgkj.dao.impl.BadBatt_monImpl;
import com.fgkj.dao.impl.BadBatt_mon_flagImpl;
@@ -210,6 +211,7 @@
            case 98:return new  Fbs9100_battparamImpl();
            case 99:return new  App_bts_comm_taskImpl();
            case 100:return new  Battinf_applyImpl();
            case 101:return new  App_bts_battgroupImpl();
            default :return null;
        }
    }
gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java
New file
@@ -0,0 +1,122 @@
package com.fgkj.dao.impl;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.CallBack;
import com.fgkj.dao.DAOHelper;
import com.fgkj.dao.LimitNumberFactory;
import com.fgkj.db.DBUtil;
import com.fgkj.dto.App_bts_battgroup;
import com.fgkj.dto.App_bts_comm_task;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Page;
public class App_bts_battgroupImpl implements BaseDAO,CallBack{
    @Override
    public List getResults(ResultSet rs) {
        // TODO Auto-generated method stub
        return null;
    }
    @Override
    public boolean add(Object obj) {
        // TODO Auto-generated method stub
        return false;
    }
    @Override
    public boolean update(Object obj) {
        // TODO Auto-generated method stub
        return false;
    }
    @Override
    public boolean del(Object obj) {
        // TODO Auto-generated method stub
        return false;
    }
    @Override
    public List searchAll() {
        // TODO Auto-generated method stub
        return null;
    }
    //根据设备id查询(uid放在num中)
    public List serchByCondition(Object obj) {
        BattInf binf=(BattInf) obj;
        Page page=binf.getPage();
        Connection conn=DBUtil.getConn();
        String numberSql=" SELECT FOUND_ROWS() number";
        String sql=" select SQL_CALC_FOUND_ROWS distinct dev_id,battgroup_id,battgroup_index,battgroup_mon_cnt " +
                "  ,stationName,stationName1,stationName2,stationName3,stationName5,StationId " +
                " from db_app_sys.tb_app_bts_battgroup " +
                " left outer join db_battinf.tb_battinf  on db_app_sys.tb_app_bts_battgroup.dev_id=db_battinf.tb_battinf.fBSDeviceId " +
                " where  ";
                //stationName1 like ? and stationName2 like ? and stationId like ? and stationName5 like ? " +
                /*"  and db_app_sys.tb_app_bts_comm_task.dev_id in (" +
                "  select distinct db_battinf.tb_battinf.fBSDeviceId  " +
                "  from db_battinf.tb_battinf " +
                "  left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.stationid=db_battinf.tb_battinf.stationid " +
                "  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=? and db_battinf.tb_battinf.station_install=1 ) "+*/
        //FBSDeviceId筛选
        String dev_idT=" db_app_sys.tb_app_bts_battgroup.dev_id=? ";
        String dev_idF=" db_app_sys.tb_app_bts_battgroup.dev_id!=? ";
        if(binf.getFBSDeviceId()==0){
            sql+=dev_idF;
        }else{
            sql+=dev_idT;
        }
        String orderSql="  order by dev_id limit ?,? ";
        sql+=orderSql;
        //System.out.println(sql);                                                    //"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationId()+"%","%"+binf.getStationName5()+"%",binf.getNum()
        List<App_bts_comm_task> list=DAOHelper.executeQueryLimit(sql, conn,new Object[]{binf.getFBSDeviceId(),(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                try {
                    while(rs.next()){
                        App_bts_battgroup  abattgroup=new App_bts_battgroup();
                        abattgroup.setDev_id(rs.getInt("dev_id"));
                        abattgroup.setBattgroup_id(rs.getInt("battgroup_id"));
                        abattgroup.setBattgroup_index(rs.getInt("battgroup_index"));
                        abattgroup.setBattgroup_mon_cnt(rs.getInt("battgroup_mon_cnt"));
                        abattgroup.setStationId(rs.getString("stationId"));
                        abattgroup.setStationName(rs.getString("stationName"));
                        abattgroup.setStationName1(rs.getString("stationName1"));
                        abattgroup.setStationName2(rs.getString("stationName2"));
                        abattgroup.setStationName3(rs.getString("stationName3"));
                        abattgroup.setStationName5(rs.getString("stationName5"));
                        list.add(abattgroup);
                    }
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                return list;
            }
        });
        //去掉limit条件后的总数
        int number=LimitNumberFactory.GetLimtitNumber(conn, numberSql);
        //System.out.println("number: "+number);
        if(list!=null&&list.size()>0){
            list.get(list.size()-1).setNum(number);
        }
        return list;
    }
    @Override
    public List serchByInfo(Object obj) {
        // TODO Auto-generated method stub
        return null;
    }
}
gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java
@@ -43,7 +43,7 @@
        // TODO Auto-generated method stub
        return null;
    }
    //根据省市区机房名称查询(uid放在num中)
    //根据设备id查询(uid放在num中)
    public List serchByCondition(Object obj) {
        BattInf binf=(BattInf) obj;
        Page page=binf.getPage();
gx_tieta/src/com/fgkj/dto/App_bts_battgroup.java
New file
@@ -0,0 +1,100 @@
package com.fgkj.dto;
import java.io.Serializable;
public class App_bts_battgroup implements Serializable{
    private int num;
    private int dev_id;
    private int battgroup_id;
    private int battgroup_index;
    private int battgroup_mon_cnt;
    private String stationName;
    private String stationName1;
    private String stationName2;
    private String stationName3;
    private String stationName5;
    private String stationId;
    private String note;
    public int getNum() {
        return num;
    }
    public void setNum(int num) {
        this.num = num;
    }
    public int getDev_id() {
        return dev_id;
    }
    public void setDev_id(int dev_id) {
        this.dev_id = dev_id;
    }
    public int getBattgroup_id() {
        return battgroup_id;
    }
    public void setBattgroup_id(int battgroup_id) {
        this.battgroup_id = battgroup_id;
    }
    public int getBattgroup_index() {
        return battgroup_index;
    }
    public void setBattgroup_index(int battgroup_index) {
        this.battgroup_index = battgroup_index;
    }
    public int getBattgroup_mon_cnt() {
        return battgroup_mon_cnt;
    }
    public void setBattgroup_mon_cnt(int battgroup_mon_cnt) {
        this.battgroup_mon_cnt = battgroup_mon_cnt;
    }
    public String getStationName() {
        return stationName;
    }
    public void setStationName(String stationName) {
        this.stationName = stationName;
    }
    public String getStationName1() {
        return stationName1;
    }
    public void setStationName1(String stationName1) {
        this.stationName1 = stationName1;
    }
    public String getStationName2() {
        return stationName2;
    }
    public void setStationName2(String stationName2) {
        this.stationName2 = stationName2;
    }
    public String getStationName3() {
        return stationName3;
    }
    public void setStationName3(String stationName3) {
        this.stationName3 = stationName3;
    }
    public String getStationName5() {
        return stationName5;
    }
    public void setStationName5(String stationName5) {
        this.stationName5 = stationName5;
    }
    public String getStationId() {
        return stationId;
    }
    public void setStationId(String stationId) {
        this.stationId = stationId;
    }
    public String getNote() {
        return note;
    }
    public void setNote(String note) {
        this.note = note;
    }
    @Override
    public String toString() {
        return "App_bts_battgroup [num=" + num + ", dev_id=" + dev_id + ", battgroup_id=" + battgroup_id
                + ", battgroup_index=" + battgroup_index + ", battgroup_mon_cnt=" + battgroup_mon_cnt + ", stationName="
                + stationName + ", stationName1=" + stationName1 + ", stationName2=" + stationName2 + ", stationName3="
                + stationName3 + ", stationName5=" + stationName5 + ", stationId=" + stationId + ", note=" + note + "]";
    }
}
gx_tieta/src/com/fgkj/services/App_bts_battgroupService.java
New file
@@ -0,0 +1,30 @@
package com.fgkj.services;
import java.util.List;
import com.fgkj.dao.BaseDAO;
import com.fgkj.dao.BaseDAOFactory;
import com.fgkj.dto.ServiceModel;
public class App_bts_battgroupService {
    private BaseDAO dao;
    private ServiceModel model;
    public App_bts_battgroupService() {
        super();
        dao=BaseDAOFactory.getBaseDAO(BaseDAO.APP_BTS_BATTGROUP);
        model=new ServiceModel();
    }
    //根据设备id查询(uid放在num中)
    public ServiceModel serchByCondition(Object obj){
        List list =dao.serchByCondition(obj);
        if(list!=null&&list.size()>0){
            model.setCode(1);
            model.setData(list);
            model.setMsg("查询成功!");
        }else{
            model.setCode(0);
            model.setMsg("查询失败!");
        }
        return model;
    }
}