From 7b8e271ed8344866c0dbe56942625ccedb5564c7 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期五, 02 十一月 2018 17:31:00 +0800
Subject: [PATCH] 问题反馈
---
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
index 0a235cd..76b6021 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -387,11 +387,11 @@
return list;
}
- //5.3娣诲姞閫夊彇鐢垫睜缁勬垨鑰呮満鎴挎垨鑰呯淮鎶ゅ尯
+ //5.3娣诲姞閫夊彇鐢垫睜缁勬垨鑰呮満鎴挎垨鑰呯淮鎶ゅ尯鎴栬�呭叏鍖哄幙
public List serchBatt(Object obj) {
BattInf binf=(BattInf) obj;
String sql="";
- String baseSql="select distinct(battgroupid),stationid,stationname,stationname1,battgroupname from db_battinf.tb_battinf " +
+ String baseSql="select distinct(battgroupid),stationid,stationname,stationname1,stationname2,stationname5,battgroupname from db_battinf.tb_battinf " +
"where ";
//鐢ㄤ簬缁存姢鍖�
String station1SqlT=" stationname1!=? ";//鍏ㄩ儴
@@ -408,6 +408,14 @@
baseSql+=station2SqlT;
}else{
baseSql+=station2SqlF;
+ }
+ //鐢ㄤ簬鍖哄幙
+ String station5SqlT=" and stationname5!=? ";//鍏ㄩ儴
+ String station5SqlF=" and stationname5=? ";
+ if(binf.getStationName5().equals("")){
+ baseSql+=station5SqlT;
+ }else{
+ baseSql+=station5SqlF;
}
//鐢ㄤ簬鏈烘埧绔欑偣
String stationSqlT=" and stationname!=? ";//鍏ㄩ儴
@@ -428,7 +436,7 @@
String endSql=" order by stationid ";
sql=baseSql+endSql;
//System.out.println(sql);
- List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getStationName1(),binf.getStationName2(),binf.getStationName(),binf.getBattGroupId()}, new CallBack() {
+ List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getStationName1(),binf.getStationName2(),binf.getStationName5(),binf.getStationName(),binf.getBattGroupId()}, new CallBack() {
public List getResults(ResultSet rs) {
List list=new ArrayList();
@@ -439,6 +447,8 @@
binf.setStationId(rs.getString("StationId"));
binf.setStationName(rs.getString("stationName"));
binf.setStationName1(rs.getString("stationName1"));
+ binf.setStationName2(rs.getString("stationName2"));
+ binf.setStationName5(rs.getString("stationName5"));
binf.setBattGroupName(rs.getString("battGroupName"));
list.add(binf);
}
@@ -3452,7 +3462,7 @@
" FROM db_battinf.tb_battinf " +
" where StationName1 like ? and StationName2 like ? " +
" ORDER BY CONVERT( StationName USING gbk ) COLLATE gbk_chinese_ci ASC ";
- List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"},new CallBack() {
+ List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%"},new CallBack() {
public List getResults(ResultSet rs) {
List list=new ArrayList();
@@ -3742,12 +3752,12 @@
//鐢垫睜閰嶇粍绠$悊(閲嶈)
public List serchMakeGroup(Object obj){
BattInf binf=(BattInf) obj;
- String sql="SELECT distinct BattGroupId,battgroupname,stationid,stationname1,stationname2,stationname,stationname3,BattProducer,MonVolStd,MonCapStd,monCount " +
+ String sql="SELECT distinct BattGroupId,battgroupname,stationid,stationname1,stationname2,stationname5,stationname,stationname3,BattProducer,MonVolStd,MonCapStd,monCount " +
" ,battinf_re.old_stationname,old_battgroupname,old_battproducer,old_stationid,old_battgroupid,old_monum,new_stationname,new_battgroupname,new_battproducer,new_stationid,new_battgroupid,new_monum,rebuild_time,rebuild_uid,rebuild_address,rebuild_clear_type " +
" from db_battinf.tb_battinf " +
" left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " +
" on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " +
- " where stationname2 like ? ";
+ " where stationname2 like ? and stationname5 like ? ";
//鐢ㄦ埛绠$悊
String userSql=" and StationId in(" +
" select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
@@ -3761,7 +3771,7 @@
}else{
sql+=producerSqlF;
}
- List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%",binf.getNum()}, new CallBack() {
+ List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%","%"+binf.getStationName5()+"%",binf.getNum()}, new CallBack() {
public List getResults(ResultSet rs) {
List<BattInf> list=new ArrayList();
@@ -3776,6 +3786,7 @@
binf.setStationName1(rs.getString("stationName1"));
binf.setStationName2(rs.getString("stationName2"));
binf.setStationName3(rs.getString("stationName3"));
+ binf.setStationName5(rs.getString("stationName5"));
binf.setBattProducer(rs.getString("battProducer"));
binf.setMonVolStd(rs.getFloat("monVolStd"));
binf.setMonCapStd(rs.getFloat("monCapStd"));
@@ -3822,18 +3833,18 @@
//鐢垫睜閰嶇粍绠$悊(閲嶈)
public List serchGroupByInfor(Object obj){
BattInf binf=(BattInf) obj;
- String sql="SELECT distinct BattGroupId,battgroupname,stationid,stationname1,stationname2,stationname,stationname3,BattProducer,MonVolStd,MonCapStd,monCount " +
+ String sql="SELECT distinct BattGroupId,battgroupname,stationid,stationname1,stationname2,stationname,stationname3,stationname5,BattProducer,MonVolStd,MonCapStd,monCount " +
" ,battinf_re.old_stationname,old_battgroupname,old_battproducer,old_stationid,old_battgroupid,old_monum,new_stationname,new_battgroupname,new_battproducer,new_stationid,new_battgroupid,new_monum,rebuild_time,rebuild_uid,rebuild_address,rebuild_clear_type " +
" from db_battinf.tb_battinf " +
" left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " +
" on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " +
- " where stationname1 like ? and stationname2 like ? and stationname3 like ? and battgroupname like ? and battgroupid=? ";
+ " where stationname1 like ? and stationname2 like ? and stationname3 like ? and stationname5 like ? and battgroupname like ? and battgroupid=? ";
//鐢ㄦ埛绠$悊
String userSql=" and StationId in(" +
" select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
" ) ";
sql+=userSql;
- List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId(),binf.getNum()}, new CallBack() {
+ List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationName5()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId(),binf.getNum()}, new CallBack() {
public List getResults(ResultSet rs) {
List<BattInf> list=new ArrayList();
@@ -3848,6 +3859,7 @@
binf.setStationName1(rs.getString("stationName1"));
binf.setStationName2(rs.getString("stationName2"));
binf.setStationName3(rs.getString("stationName3"));
+ binf.setStationName5(rs.getString("stationName5"));
binf.setBattProducer(rs.getString("battProducer"));
binf.setMonVolStd(rs.getFloat("monVolStd"));
binf.setMonCapStd(rs.getFloat("monCapStd"));
--
Gitblit v1.9.1