From e9deacbe85247d765fb242f26319fcbd02cc9716 Mon Sep 17 00:00:00 2001 From: 81041 <81041@DESKTOP-025NVD9> Date: 星期一, 07 一月 2019 14:41:48 +0800 Subject: [PATCH] 修改 --- gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/App_bts_battgroup.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl$1.class | 0 gx_tieta/src/com/fgkj/actions/App_bts_battgroupAction.java | 32 ++++++ gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/App_bts_battgroupAction.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class | 0 gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java | 2 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/App_bts_battgroupService.class | 0 gx_tieta/src/com/fgkj/dao/BaseDAO.java | 2 gx_tieta/src/com/fgkj/services/App_bts_battgroupService.java | 30 ++++++ gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java | 2 gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java | 122 ++++++++++++++++++++++++ gx_tieta/src/com/fgkj/dto/App_bts_battgroup.java | 100 ++++++++++++++++++++ gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class | 0 14 files changed, 289 insertions(+), 1 deletions(-) diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/App_bts_battgroupAction.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/App_bts_battgroupAction.class new file mode 100644 index 0000000..fbe868e --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/App_bts_battgroupAction.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class index 0e4b77e..27960d9 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class index 462be93..adc4a25 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl$1.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl$1.class new file mode 100644 index 0000000..0a69d65 --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl$1.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class new file mode 100644 index 0000000..69c93f4 --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/App_bts_battgroup.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/App_bts_battgroup.class new file mode 100644 index 0000000..0e9dd0c --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/App_bts_battgroup.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/App_bts_battgroupService.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/App_bts_battgroupService.class new file mode 100644 index 0000000..52db84e --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/App_bts_battgroupService.class Binary files differ diff --git a/gx_tieta/src/com/fgkj/actions/App_bts_battgroupAction.java b/gx_tieta/src/com/fgkj/actions/App_bts_battgroupAction.java new file mode 100644 index 0000000..a7ed6d6 --- /dev/null +++ b/gx_tieta/src/com/fgkj/actions/App_bts_battgroupAction.java @@ -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; + } + + + +} diff --git a/gx_tieta/src/com/fgkj/dao/BaseDAO.java b/gx_tieta/src/com/fgkj/dao/BaseDAO.java index 2793c0c..65cfc4e 100644 --- a/gx_tieta/src/com/fgkj/dao/BaseDAO.java +++ b/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); // 鏇存柊 diff --git a/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java b/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java index 13eebce..6c83c04 100644 --- a/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java +++ b/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; } } diff --git a/gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java b/gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java new file mode 100644 index 0000000..e08d26e --- /dev/null +++ b/gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java @@ -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; + } + +} diff --git a/gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java b/gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java index b16cab1..ef9d2fc 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/App_bts_comm_taskImpl.java +++ b/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(); diff --git a/gx_tieta/src/com/fgkj/dto/App_bts_battgroup.java b/gx_tieta/src/com/fgkj/dto/App_bts_battgroup.java new file mode 100644 index 0000000..2dd9220 --- /dev/null +++ b/gx_tieta/src/com/fgkj/dto/App_bts_battgroup.java @@ -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 + "]"; + } + + + +} diff --git a/gx_tieta/src/com/fgkj/services/App_bts_battgroupService.java b/gx_tieta/src/com/fgkj/services/App_bts_battgroupService.java new file mode 100644 index 0000000..418d59d --- /dev/null +++ b/gx_tieta/src/com/fgkj/services/App_bts_battgroupService.java @@ -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; + } +} -- Gitblit v1.9.1