| | |
| | | import com.fgkj.dto.Batt_Maint_Dealarm;
|
| | | import com.fgkj.dto.Batt_maint_inf;
|
| | | import com.fgkj.dto.Batt_maintenance_inf;
|
| | | import com.fgkj.dto.Batttestdata;
|
| | | import com.fgkj.dto.Batttestdata_inf;
|
| | | import com.fgkj.dto.Batttestdatastop;
|
| | | import com.fgkj.dto.Limit;
|
| | |
| | | baseSql+=station1SqlF;
|
| | | }
|
| | | //用于维护区
|
| | | String station2SqlT=" stationname2!=? ";//全部
|
| | | String station2SqlF=" stationname2=? ";
|
| | | String station2SqlT=" and stationname2!=? ";//全部
|
| | | String station2SqlF=" and stationname2=? ";
|
| | | if(binf.getStationName2().equals("")){
|
| | | baseSql+=station2SqlT;
|
| | | }else{
|
| | |
| | | return nums;
|
| | | }
|
| | |
|
| | | |
| | | //电池配组管理(重要)
|
| | | public List serchMakeGroup(Object obj){
|
| | | BattInf binf=(BattInf) obj;
|
| | | String sql="SELECT distinct BattGroupId,stationid,stationname1,stationname2,stationname,stationname3,BattProducer,MonVolStd,MonCapStd,monCount from db_battinf.tb_battinf where stationname2 like ? ";
|
| | | //选中品牌一致
|
| | | String producerSqlT=" order by BattProducer,MonCapStd,MonVolStd ";//一致
|
| | | String producerSqlF=" order by MonCapStd,MonVolStd ";//不一致
|
| | | if(binf.getBattProducer().equals("1")){
|
| | | sql+=producerSqlT;
|
| | | }else{
|
| | | sql+=producerSqlF;
|
| | | }
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%"}, new CallBack() {
|
| | | |
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()){
|
| | | BattInf binf=new BattInf();
|
| | | binf.setBattGroupId(rs.getInt("battGroupId"));
|
| | | binf.setStationId(rs.getString("stationId"));
|
| | | binf.setStationName(rs.getString("stationName"));
|
| | | binf.setStationName1(rs.getString("stationName1"));
|
| | | binf.setStationName2(rs.getString("stationName2"));
|
| | | binf.setStationName3(rs.getString("stationName3"));
|
| | | binf.setBattProducer(rs.getString("battProducer"));
|
| | | binf.setMonVolStd(rs.getFloat("monVolStd"));
|
| | | binf.setMonCapStd(rs.getFloat("monCapStd"));
|
| | | binf.setMonCount(rs.getInt("monCount"));
|
| | | list.add(binf);
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | }
|
| | | return list;
|
| | | }
|
| | | });
|
| | | return list;
|
| | | }
|
| | | public static void main(String[] args) throws ParseException {
|
| | | //new BattInfImpl().searchAll();
|
| | |
|