| | |
| | | import com.fgkj.dto.Page;
|
| | | import com.fgkj.dto.User_inf;
|
| | | import com.fgkj.dto.User_log;
|
| | | import com.fgkj.dto.ram.FBS9100;
|
| | | import com.fgkj.dto.ram.Fbs9100_state;
|
| | | import com.fgkj.services.User_logService;
|
| | |
|
| | | public class Battinf_applyImpl implements BaseDAO,CallBack{
|
| | |
| | | return false;
|
| | | }
|
| | | }
|
| | | //申请表中已审批通过的设备连接数
|
| | | public List devCommNum() {
|
| | | String sql=" select distinct db_battinf.tb_battinf_apply.FbsDeviceId,dev_commcount " +
|
| | | " from db_battinf.tb_battinf_apply,db_ram_db.tb_fbs9100_state " +
|
| | | " where apply_en=1 and db_battinf.tb_battinf_apply.FbsDeviceId=db_ram_db.tb_fbs9100_state.dev_id "
|
| | | + " order by apply_date desc" ;
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
|
| | |
|
| | | @Override
|
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()) {
|
| | | Fbs9100_state fbs=new Fbs9100_state();
|
| | | fbs.setDev_id(rs.getInt("FbsDeviceId"));
|
| | | fbs.setDev_commcount(rs.getInt("dev_commcount"));
|
| | | list.add(fbs);
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | }
|
| | | return list;
|
| | | }
|
| | | });
|
| | | return list;
|
| | | |
| | | }
|
| | | public static void main(String[] args) throws ParseException {
|
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
| | | Date date1 = sdf.parse("2000-01-01 00:00:00");
|
| | |
| | | System.out.println(station_id);
|
| | | int battgroup_id=BattinfGroupFactory.searchMaxBattgroupId();
|
| | | System.out.println(battgroup_id);*/
|
| | | boolean bl=bimpl.judgeBattInOrNot(binf);
|
| | | System.out.println(bl);
|
| | | /*boolean bl=bimpl.judgeBattInOrNot(binf);
|
| | | System.out.println(bl);*/
|
| | | /*List<Fbs9100_state> list=bimpl.devCommNum();
|
| | | for (Fbs9100_state f : list) {
|
| | | System.out.println(f.getDev_id()+" "+f.getDev_commcount());
|
| | | }*/
|
| | | }
|
| | | }
|