// package com.fgkj.mapper.impl;
|
//
|
// import java.sql.Connection;
|
// import java.sql.ResultSet;
|
// import java.sql.SQLException;
|
// import java.text.ParseException;
|
// import java.text.SimpleDateFormat;
|
// import java.util.ArrayList;
|
// import java.util.Date;
|
// import java.util.List;
|
//
|
// import com.fgkj.util.*;
|
// import com.fgkj.mapper.BaseDAO;
|
// import com.fgkj.mapper.CallBack;
|
//
|
// import com.fgkj.mapper.LimitNumberFactory;
|
// import com.fgkj.db.DBUtil;
|
// import com.fgkj.dto.BattInf;
|
// import com.fgkj.dto.Batt_Maint_Dealarm;
|
// import com.fgkj.dto.Batt_maint_inf;
|
// import com.fgkj.dto.Batttestdata_inf;
|
// import com.fgkj.dto.Page;
|
// import com.fgkj.dto.User_inf;
|
// @Deprecated
|
// public class BattInfAgainImpl implements BaseDAO,CallBack{
|
//
|
// public List getResults(ResultSet rs) {
|
// List list = new ArrayList<BattInf>();
|
// try {
|
// while (rs.next()) {
|
// Batt_Maint_Dealarm bmd = new Batt_Maint_Dealarm();
|
// BattInf binf = new BattInf();
|
// Batt_maint_inf mainf = new Batt_maint_inf();
|
// Batttestdata_inf tdata = new Batttestdata_inf();
|
// Page p=new Page();
|
// binf.setBattGroupId(rs.getInt("battGroupId"));
|
//
|
//
|
// binf.setStationName(rs.getString("stationName"));
|
// binf.setStationName1(rs.getString("stationName1"));
|
// binf.setStationIp(rs.getString("stationIp"));
|
// binf.setBattGroupName(rs.getString("battGroupName"));
|
// binf.setBattGroupName1(rs.getString("battGroupName1"));
|
// binf.setBattGroupNum(rs.getInt("battGroupNum"));
|
// binf.setMonCount(rs.getInt("monCount"));
|
// binf.setMonCapStd(rs.getFloat("monCapStd"));
|
// binf.setMonVolStd(rs.getFloat("monVolStd"));
|
// binf.setBattProducer(rs.getString("battProducer"));
|
// binf.setBattProductDate(rs.getDate("battProductDate"));
|
// binf.setBattInUseDate(rs.getDate("battInUseDate"));
|
//
|
// //minf.setFault_type(rs.getString("fault_type"));
|
// if (rs.getString("maint_done_time") != null)
|
// mainf.setMaint_done_time(DateUtil.sdf.parse(rs
|
// .getString("maint_done_time")));
|
//
|
// tdata.setBattGroupId(rs.getInt("battGroupId"));
|
//
|
// //System.out.println(rs.getInt("battGroupId"));
|
//
|
// tdata.setTest_record_count(rs.getInt("test_record_count"));
|
//
|
// if (rs.getString("test_starttime") != null)
|
// tdata.setTest_starttime(DateUtil.sdf.parse(rs
|
// .getString("test_starttime")));
|
//
|
// tdata.setTest_starttype(rs.getInt("test_starttype"));
|
// tdata.setTest_type(rs.getInt("test_type"));
|
// tdata.setTest_curr(rs.getFloat("test_curr"));
|
// tdata.setTest_timelong(rs.getInt("test_timelong"));
|
// tdata.setMax_monvol(rs.getFloat("max_monvol"));
|
// tdata.setMin_monvol(rs.getFloat("min_monvol"));
|
// tdata.setMin_monnum(rs.getInt("min_monnum"));
|
// tdata.setTest_cap(rs.getFloat("test_cap"));
|
// tdata.setData_new(rs.getInt("data_new"));
|
//
|
//
|
// bmd.setBinf(binf);
|
// bmd.setMainf(mainf);
|
// bmd.setTdata(tdata);
|
// bmd.setPage(p);
|
//
|
//
|
// list.add(bmd);
|
//
|
// }
|
// } catch (SQLException e) {
|
// e.printStackTrace();
|
// } catch (ParseException e) {
|
// // TODO Auto-generated catch block
|
// e.printStackTrace();
|
// }
|
//
|
// return list;
|
// }
|
//
|
//
|
// public boolean add(Object obj) {
|
// // TODO Auto-generated method stub
|
// return false;
|
// }
|
//
|
// public boolean update(Object obj) {
|
// // TODO Auto-generated method stub
|
// return false;
|
// }
|
//
|
// public boolean del(Object obj) {
|
// // TODO Auto-generated method stub
|
// return false;
|
// }
|
//
|
// public List searchAll() {
|
// // TODO Auto-generated method stub
|
// return null;
|
// }
|
//
|
// public List serchByCondition(Object obj) {
|
// // TODO Auto-generated method stub
|
// return null;
|
// }
|
//
|
// public List serchByInfo(Object obj) {
|
// // TODO Auto-generated method stub
|
// return null;
|
// }
|
//
|
//
|
// //1.2电池组统计分析查询
|
// public List serchByTestType1(Object obj){
|
// Batt_Maint_Dealarm bmd = (Batt_Maint_Dealarm) obj;
|
// List list = null;
|
// BattInf binf = bmd.getBinf();
|
// Batt_maint_inf mainf = bmd.getMainf();
|
// Batttestdata_inf tdata = bmd.getTdata();
|
// User_inf uinf=bmd.getUinf();
|
// String sql="";
|
// String baseSql="select distinct(db_battinf.tb_battinf.BattgroupId),StationName1,StationName,stationip,BattGroupName,BattGroupName1,battgroupnum,moncount,moncapstd,monvolstd,battproducer,battproductdate,battinusedate " +
|
// ",maint_done_time " +
|
// ",test_record_count,test_type,test_starttime,test_starttype,test_curr,test_timelong,max_monvol,min_monvol,test_cap,data_new ,db_user.tb_user_battgroup_baojigroup_battgroup.battgroupid " +
|
// "from db_batt_testdata.tb_batttestdata_inf " +
|
// "left outer join db_battinf.tb_batt_maint_inf on db_batt_testdata.tb_batttestdata_inf.BattgroupId=db_battinf.tb_batt_maint_inf.BattGroupId " +
|
// "left outer join db_battinf.tb_battinf on db_battinf.tb_battinf.BattgroupId=db_batt_testdata.tb_batttestdata_inf.BattGroupId " +
|
// "left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.battgroupid=db_batt_testdata.tb_batttestdata_inf.BattgroupId " +
|
// "left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id= db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id " +
|
// "left outer join db_user.tb_user_inf on db_user.tb_user_inf.uId=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
// "where test_type=? and to_days(db_batt_testdata.tb_batttestdata_inf.record_time)>=to_days(?) and to_days(db_batt_testdata.tb_batttestdata_inf.record_time)<=to_days(?) " +
|
// "and to_days(battproductdate)>=to_days(?) and to_days(battproductdate)<=to_days(?) and to_days(battinusedate)>=to_days(?) and to_days(battinusedate)<=to_days(?)";
|
// //用于维护区
|
// String station1SqlT=" and stationname1!=? ";//全部
|
// String station1SqlF=" and stationname1=? ";
|
// if(binf.getStationName1().equals("")){
|
// baseSql+=station1SqlT;
|
// }else{
|
// baseSql+=station1SqlF;
|
// }
|
// //用于机房站点
|
// String stationSqlT=" and stationname!=? ";//全部
|
// String stationSqlF=" and stationname=? ";
|
// if(binf.getStationName().equals("")){
|
// baseSql+=stationSqlT;
|
// }else{
|
// baseSql+=stationSqlF;
|
// }
|
// //用于电池类型
|
// String producerSqlT=" and battproducer!=? ";//全部
|
// String producerSqlF=" and battproducer=? ";
|
// if(binf.getBattProducer().equals("")){
|
// baseSql+=producerSqlT;
|
// }else{
|
// baseSql+=producerSqlF;
|
// }
|
// //选取蓄电池组条件
|
// String idSqlT=" and db_battinf.tb_battinf.battgroupid!=? ";
|
// String idSqlF=" and db_battinf.tb_battinf.battgroupid=? ";
|
// if(binf.getBattGroupId()==0){
|
// baseSql+=idSqlT;
|
// }else{
|
// baseSql+=idSqlF;
|
// }
|
// //选取系统类型
|
// String nameSqlT=" and BattGroupName1 like ? ";
|
// String nameSqlF=" and BattGroupName1 not like '%开关电源系统%' and BattGroupName1 not like '%UPS系统%' and BattGroupName1 not like ? ";
|
// if(binf.getBattGroupName1().equals("其他")){
|
// baseSql+=nameSqlF;
|
// }else{
|
// baseSql+=nameSqlT;
|
// }
|
// //用于单体电压
|
// String volSqlT=" and monVolStd!=? ";//全部
|
// String volSqlF=" and monVolStd=?" ;
|
// if(binf.getMonVolStd()==0){
|
// baseSql+=volSqlT;
|
// }else{
|
// baseSql+=volSqlF;
|
// }
|
// //用于电池容量
|
// String capSqlT=" and monCapStd!=? ";//全部
|
// String capSqlF=" and monCapStd=?" ;
|
// if(binf.getMonCapStd()==0){
|
// baseSql+=capSqlT;
|
// }else{
|
// baseSql+=capSqlF;
|
// }
|
// //包机人
|
// String userSqlF=" and db_user.tb_user_inf.uname=? and db_user.tb_user_inf.ubaojiusr=1 ";
|
// if(uinf.getuName().equals("0")){
|
// baseSql=baseSql;
|
// }else{
|
// baseSql+=userSqlF;
|
// }
|
// //用于测试类型
|
// //全部
|
// String start_typeA=" ";
|
// //拉闸放电
|
// String start_typeF=" and test_starttype<5 and test_type not in(2,9) and test_starttype!=2 ";
|
// //核对性放电
|
// String start_typeT=" and test_starttype>=5 or (test_type not in(2,9) and test_starttype=2) ";
|
// if(tdata.getTest_starttype()==0){
|
// baseSql+=start_typeA;
|
// }else if(tdata.getTest_starttype()==1){
|
// baseSql+=start_typeF;
|
// }else if(tdata.getTest_starttype()==2){
|
// baseSql+=start_typeT;
|
// }
|
//
|
// //用于电池维护记录条件
|
// //有维护记录
|
// String maintSqlT=" and db_battinf.tb_battinf.BattGroupId in(select db_battinf.tb_batt_maint_inf.battgroupid from db_battinf.tb_batt_maint_inf where to_days(maint_done_time)>=to_days(?) and to_days(maint_done_time)<=to_days(?)) " ;
|
// //无维护记录
|
// String maintSqlF=" and db_battinf.tb_battinf.BattGroupId not in(select db_battinf.tb_batt_maint_inf.battgroupid from db_battinf.tb_batt_maint_inf where to_days(maint_done_time)>=to_days(?) and to_days(maint_done_time)<=to_days(?)) " ;
|
// //全部
|
// String maintSqlA=" and db_battinf.tb_battinf.BattGroupId!=(select count(distinct(db_battinf.tb_batt_maint_inf.battgroupid )) from db_battinf.tb_batt_maint_inf where to_days(maint_done_time)>=to_days(?) and to_days(maint_done_time)<=to_days(?)) " ;
|
//
|
// if(mainf.getRemark().equals("0")){
|
// baseSql+=maintSqlF;
|
// }else if(mainf.getRemark().equals("1")){
|
// baseSql+=maintSqlT;
|
// }else if(mainf.getRemark().equals("100")){
|
// baseSql+=maintSqlA;
|
// }
|
// String endSql=" order by StationName1,db_battinf.tb_battinf.BattgroupId";
|
//
|
// sql=baseSql+endSql;
|
// //System.out.println(sql);
|
// if(uinf.getuName().equals("0")){
|
// list = DateUtil.executeQuery(
|
// sql,
|
// DBUtil.getConn(),
|
// new Object[] {
|
// tdata.getTest_type(),
|
// tdata.getRecord_time(),
|
// tdata.getRecord_time1(),
|
// binf.getBattProductDate(),
|
// binf.getBattProductDate1(),
|
// binf.getBattInUseDate(),
|
// binf.getBattInUseDate1(),
|
// binf.getStationName1(),
|
// binf.getStationName(),
|
// binf.getBattProducer(),
|
//
|
// binf.getBattGroupId(),
|
// "%"+binf.getBattGroupName1()+"%",
|
// binf.getMonVolStd(),
|
// binf.getMonCapStd(),
|
// mainf.getMaint_done_time(),
|
// mainf.getMaint_done_time1()
|
// },
|
// new BattInfAgainImpl());
|
// }else{
|
// list = DateUtil.executeQuery(
|
// sql,
|
// DBUtil.getConn(),
|
// new Object[] {
|
// tdata.getTest_type(),
|
// tdata.getRecord_time(),
|
// tdata.getRecord_time1(),
|
// binf.getBattProductDate(),
|
// binf.getBattProductDate1(),
|
// binf.getBattInUseDate(),
|
// binf.getBattInUseDate1(),
|
// binf.getStationName1(),
|
// binf.getStationName(),
|
// binf.getBattProducer(),
|
//
|
// binf.getBattGroupId(),
|
// "%"+binf.getBattGroupName1()+"%",
|
// binf.getMonVolStd(),
|
// binf.getMonCapStd(),
|
// uinf.getuName(),
|
// mainf.getMaint_done_time(),
|
// mainf.getMaint_done_time1()
|
// },
|
// new BattInfAgainImpl());
|
// }
|
//
|
// List<Batt_Maint_Dealarm> listd=new ArrayList();
|
// /*for(int i=0;i<list.size();i++){
|
// System.out.println(((Batt_Maint_Dealarm)list.get(i)).getBinf().getBattGroupId());
|
// }*/
|
// int index=0;
|
// //System.out.println(list.size());
|
// for(int i=(bmd.getPage().getPageCurr()-1)*bmd.getPage().getPageSize();i<bmd.getPage().getPageSize()*bmd.getPage().getPageCurr()&&i<list.size();i++){
|
// listd.add((Batt_Maint_Dealarm) list.get(i));
|
// //system.out.println(list.get(i));
|
// ((Batt_Maint_Dealarm)listd.get(index++)).getPage().setPageAll(list.size());
|
// }
|
// return listd;
|
// }
|
// //1.2电池组统计分析查询
|
// @SuppressWarnings("unchecked")
|
// public List serchByTestType(Object obj){
|
// Batt_Maint_Dealarm bmd = (Batt_Maint_Dealarm) obj;
|
// List<Batt_Maint_Dealarm> list = new ArrayList<Batt_Maint_Dealarm>();;
|
// BattInf binf = bmd.getBinf();
|
// Batt_maint_inf mainf = bmd.getMainf();
|
// Batttestdata_inf tdata = bmd.getTdata();
|
// User_inf uinf=bmd.getUinf();
|
// String sql="";
|
// String numberSql=" SELECT FOUND_ROWS() number";
|
// Connection conn=DBUtil.getConn();
|
// String baseSql="select SQL_CALC_FOUND_ROWS distinct(db_battinf.tb_battinf.BattgroupId),StationName1,StationName,stationip,BattGroupName,BattGroupName1,battgroupnum,moncount,moncapstd,monvolstd,battproducer,battproductdate,battinusedate " +
|
// ",maint_done_time " +
|
// ",test_record_count,test_type,test_starttime,test_starttype,test_curr,test_timelong,max_monvol,min_monvol,min_monnum,test_cap,data_new ,db_user.tb_user_battgroup_baojigroup_battgroup.battgroupid " +
|
// "from db_batt_testdata.tb_batttestdata_inf " +
|
// "left outer join db_battinf.tb_batt_maint_inf on db_batt_testdata.tb_batttestdata_inf.BattgroupId=db_battinf.tb_batt_maint_inf.BattGroupId " +
|
// "left outer join db_battinf.tb_battinf on db_battinf.tb_battinf.BattgroupId=db_batt_testdata.tb_batttestdata_inf.BattGroupId " +
|
// "left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.battgroupid=db_batt_testdata.tb_batttestdata_inf.BattgroupId " +
|
// "left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id= db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id " +
|
// "left outer join db_user.tb_user_inf on db_user.tb_user_inf.uId=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
// "where test_type=? and db_batt_testdata.tb_batttestdata_inf.record_time>=? and db_batt_testdata.tb_batttestdata_inf.record_time<=? " +
|
// "and battproductdate>=? and battproductdate<=? and battinusedate>=? and battinusedate<=?";
|
// //用于维护区
|
// String station1SqlT=" and stationname1!=? ";//全部
|
// String station1SqlF=" and stationname1=? ";
|
// if(binf.getStationName1().equals("")){
|
// baseSql+=station1SqlT;
|
// }else{
|
// baseSql+=station1SqlF;
|
// }
|
// //用于机房站点
|
// String stationSqlT=" and stationname!=? ";//全部
|
// String stationSqlF=" and stationname=? ";
|
// if(binf.getStationName().equals("")){
|
// baseSql+=stationSqlT;
|
// }else{
|
// baseSql+=stationSqlF;
|
// }
|
// //用于电池类型
|
// String producerSqlT=" and battproducer!=? ";//全部
|
// String producerSqlF=" and battproducer=? ";
|
// if(binf.getBattProducer().equals("")){
|
// baseSql+=producerSqlT;
|
// }else{
|
// baseSql+=producerSqlF;
|
// }
|
// //选取蓄电池组条件
|
// String idSqlT=" and db_battinf.tb_battinf.battgroupid!=? ";
|
// String idSqlF=" and db_battinf.tb_battinf.battgroupid=? ";
|
// if(binf.getBattGroupId()==0){
|
// baseSql+=idSqlT;
|
// }else{
|
// baseSql+=idSqlF;
|
// }
|
// //选取系统类型
|
// String nameSqlT=" and BattGroupName1 like ? ";
|
// String nameSqlF=" and BattGroupName1 not like '%开关电源系统%' and BattGroupName1 not like '%UPS系统%' and BattGroupName1 not like ? ";
|
// if(binf.getBattGroupName1().equals("其他")){
|
// baseSql+=nameSqlF;
|
// }else{
|
// baseSql+=nameSqlT;
|
// }
|
// //用于单体电压
|
// String volSqlT=" and monVolStd!=? ";//全部
|
// String volSqlF=" and monVolStd=?" ;
|
// if(binf.getMonVolStd()==0){
|
// baseSql+=volSqlT;
|
// }else{
|
// baseSql+=volSqlF;
|
// }
|
// //用于电池容量
|
// String capSqlT=" and monCapStd!=? ";//全部
|
// String capSqlF=" and monCapStd=?" ;
|
// if(binf.getMonCapStd()==0){
|
// baseSql+=capSqlT;
|
// }else{
|
// baseSql+=capSqlF;
|
// }
|
// //包机人
|
// String userSqlF=" and db_user.tb_user_inf.uname=? and db_user.tb_user_inf.ubaojiusr=1 ";
|
// if(uinf.getuName().equals("0")){
|
// baseSql=baseSql;
|
// }else{
|
// baseSql+=userSqlF;
|
// }
|
// //用于测试类型
|
// //全部
|
// String start_typeA=" ";
|
// //拉闸放电
|
// String start_typeF=" and test_starttype<5 and test_type not in(2,9) and test_starttype!=2 ";
|
// //核对性放电
|
// String start_typeT=" and test_starttype>=5 or (test_type not in(2,9) and test_starttype=2) ";
|
// if(tdata.getTest_starttype()==0){
|
// baseSql+=start_typeA;
|
// }else if(tdata.getTest_starttype()==1){
|
// baseSql+=start_typeF;
|
// }else if(tdata.getTest_starttype()==2){
|
// baseSql+=start_typeT;
|
// }
|
//
|
// //用于电池维护记录条件
|
// //有维护记录
|
// String maintSqlT=" and db_battinf.tb_battinf.BattGroupId in(select db_battinf.tb_batt_maint_inf.battgroupid from db_battinf.tb_batt_maint_inf where to_days(maint_done_time)>=to_days(?) and to_days(maint_done_time)<=to_days(?)) " ;
|
// //无维护记录
|
// String maintSqlF=" and db_battinf.tb_battinf.BattGroupId not in(select db_battinf.tb_batt_maint_inf.battgroupid from db_battinf.tb_batt_maint_inf where to_days(maint_done_time)>=to_days(?) and to_days(maint_done_time)<=to_days(?)) " ;
|
// //全部
|
// String maintSqlA=" and db_battinf.tb_battinf.BattGroupId!=(select count(distinct(db_battinf.tb_batt_maint_inf.battgroupid )) from db_battinf.tb_batt_maint_inf where to_days(maint_done_time)>=to_days(?) and to_days(maint_done_time)<=to_days(?)) " ;
|
//
|
// if(mainf.getRemark().equals("0")){
|
// baseSql+=maintSqlF;
|
// }else if(mainf.getRemark().equals("1")){
|
// baseSql+=maintSqlT;
|
// }else if(mainf.getRemark().equals("100")){
|
// baseSql+=maintSqlA;
|
// }
|
// String endSql=" order by StationName1,db_battinf.tb_battinf.BattgroupId";
|
// String limitSql=" limit ?,? ";
|
// sql=baseSql+endSql+limitSql;
|
// System.out.println(sql);
|
// if(uinf.getuName().equals("0")){
|
// list = DateUtil.executeQueryLimit(
|
// sql,
|
// conn,
|
// new Object[] {
|
// tdata.getTest_type(),
|
// tdata.getRecord_time(),
|
// tdata.getRecord_time1(),
|
// binf.getBattProductDate(),
|
// binf.getBattProductDate1(),
|
// binf.getBattInUseDate(),
|
// binf.getBattInUseDate1(),
|
// binf.getStationName1(),
|
// binf.getStationName(),
|
// binf.getBattProducer(),
|
//
|
// binf.getBattGroupId(),
|
// "%"+binf.getBattGroupName1()+"%",
|
// binf.getMonVolStd(),
|
// binf.getMonCapStd(),
|
// mainf.getMaint_done_time(),
|
// mainf.getMaint_done_time1(),(bmd.getPage().getPageCurr() - 1)* bmd.getPage().getPageSize(),
|
// bmd.getPage().getPageSize()
|
// },
|
// new BattInfAgainImpl());
|
// }else{
|
// list = DateUtil.executeQueryLimit(
|
// sql,
|
// conn,
|
// new Object[] {
|
// tdata.getTest_type(),
|
// tdata.getRecord_time(),
|
// tdata.getRecord_time1(),
|
// binf.getBattProductDate(),
|
// binf.getBattProductDate1(),
|
// binf.getBattInUseDate(),
|
// binf.getBattInUseDate1(),
|
// binf.getStationName1(),
|
// binf.getStationName(),
|
// binf.getBattProducer(),
|
//
|
// binf.getBattGroupId(),
|
// "%"+binf.getBattGroupName1()+"%",
|
// binf.getMonVolStd(),
|
// binf.getMonCapStd(),
|
// uinf.getuName(),
|
// mainf.getMaint_done_time(),
|
// mainf.getMaint_done_time1(),(bmd.getPage().getPageCurr() - 1)* bmd.getPage().getPageSize(),
|
// bmd.getPage().getPageSize()
|
// },
|
// new BattInfAgainImpl());
|
// }
|
//
|
// /*List<Batt_Maint_Dealarm> listd=new ArrayList();
|
// for(int i=0;i<list.size();i++){
|
// System.out.println(((Batt_Maint_Dealarm)list.get(i)).getBinf().getBattGroupId());
|
// }
|
// int index=0;
|
// System.out.println(list.size());
|
// for(int i=(bmd.getPage().getPageCurr()-1)*bmd.getPage().getPageSize();i<bmd.getPage().getPageSize()*bmd.getPage().getPageCurr()&&i<list.size();i++){
|
// listd.add((Batt_Maint_Dealarm) list.get(i));
|
// //system.out.println(list.get(i));
|
// ((Batt_Maint_Dealarm)listd.get(index++)).getPage().setPageAll(list.size());
|
// }*/
|
// //去掉limit条件后的总数
|
// int number=LimitNumberFactory.GetLimtitNumber(conn, numberSql);
|
// System.out.println("number: "+number);
|
// if(list!=null&&list.size()>0){
|
// list.get(list.size()-1).getPage().setPageAll(number);
|
// }
|
// return list;
|
// }
|
// public static void main(String[] args) throws ParseException {
|
// BattInfAgainImpl biml = new BattInfAgainImpl();
|
// BattInf binf = new BattInf();
|
// /*
|
// * binf.setStationName("中国山西太原杏花岭区移动枢纽一枢纽-2F-网管监控-203");
|
// * binf.setStationName1("一枢纽");
|
// * binf.setBattGroupName("1#开关电源系统-1#电池组-光宇-24节");
|
// * binf.setBattGroupName1("开关电源系统"); binf.setBattProducer("光宇");
|
// * binf.setMonCapStd(100f); binf.setMonVolStd(12f);
|
// */
|
// binf.setStationName("太原小店二枢纽4号楼5层动力机房");
|
// binf.setStationName1("二枢纽");
|
// //binf.setBattGroupName("");
|
// binf.setBattGroupId(0);
|
// binf.setBattGroupName1("");
|
// binf.setBattProducer("光宇");
|
// binf.setMonCapStd(0f);
|
// binf.setMonVolStd(0f);
|
//
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
// Date date1 = sdf.parse("2000-01-01");
|
// Date date2 = sdf.parse("2020-01-01");
|
// binf.setBattProductDate(ActionUtil.getSimpDate(date1));
|
// binf.setBattProductDate1(ActionUtil.getSimpDate(date2));
|
// binf.setBattInUseDate(ActionUtil.getSimpDate(date1));
|
// binf.setBattInUseDate1(ActionUtil.getSimpDate(date2));
|
//
|
// /*
|
// * binf.getStationName1(), binf.getStationName(),
|
// * binf.getBattGroupName(), binf.getBattProducer(),
|
// * binf.getBattGroupName1(), binf.getBattProductDate(),
|
// * binf.getBattProductDate1(), binf.getBattInUseDate(),
|
// * binf.getBattInUseDate1(),
|
// */
|
//
|
// Batt_maint_inf mainf = new Batt_maint_inf();
|
// mainf.setRemark("100");
|
// mainf.setMaint_done_time(ActionUtil.getSimpDate(date1));
|
// mainf.setMaint_done_time1(ActionUtil.getSimpDate(date2));
|
//
|
// Batttestdata_inf tdata = new Batttestdata_inf();
|
// tdata.setTest_type(3);
|
// tdata.setTest_starttype(0);
|
// tdata.setRecord_time(ActionUtil.getSimpDate(date1));
|
// tdata.setRecord_time1(ActionUtil.getSimpDate(date2));
|
//
|
// Page p=new Page();
|
// p.setPageCurr(1);
|
// p.setPageSize(10);
|
//
|
// User_inf uinf=new User_inf();
|
// uinf.setuName("0");
|
// Batt_Maint_Dealarm bmd = new Batt_Maint_Dealarm();
|
// bmd.setBinf(binf);
|
// bmd.setMainf(mainf);
|
// bmd.setTdata(tdata);
|
// bmd.setPage(p);
|
// bmd.setUinf(uinf);
|
//
|
// List<Batt_Maint_Dealarm> list = biml.serchByTestType(bmd);
|
// for (Batt_Maint_Dealarm b : list) {
|
// System.out.println(b);
|
// }
|
// System.out.println(list.size());
|
// }
|
//
|
// }
|