From 5f73148bd85016ac62586e030c2a4cccccfacf47 Mon Sep 17 00:00:00 2001
From: 81041 <81041@192.168.10.33>
Date: 星期四, 11 十月 2018 10:19:56 +0800
Subject: [PATCH] 电池配组记录添加
---
gx_tieta/src/com/fgkj/actions/BattInfAction.java | 7 +++++++
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java | 11 +++++++----
gx_tieta/src/com/fgkj/services/BattInfServices.java | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 4 deletions(-)
diff --git a/gx_tieta/src/com/fgkj/actions/BattInfAction.java b/gx_tieta/src/com/fgkj/actions/BattInfAction.java
index c0290e7..af20d32 100644
--- a/gx_tieta/src/com/fgkj/actions/BattInfAction.java
+++ b/gx_tieta/src/com/fgkj/actions/BattInfAction.java
@@ -333,6 +333,13 @@
result = ActionUtil.tojson(model);
return SUCCESS;
}
+ //鐢垫睜閰嶇粍绠$悊(閲嶈)
+ public String serchGroupByInfor(){
+ BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
+ ServiceModel model = service.serchGroupByInfor(binf);
+ result = ActionUtil.tojson(model);
+ return SUCCESS;
+ }
public BattInf getBif() {
return bif;
}
diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
index bf5dd09..d55984c 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -3699,8 +3699,8 @@
" 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 ? ";
- List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationName4()+"%"}, new CallBack() {
+ " where stationname1 like ? and stationname2 like ? and stationname3 like ? and battgroupname like ? and battgroupid=? ";
+ List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId()}, new CallBack() {
public List getResults(ResultSet rs) {
List<BattInf> list=new ArrayList();
@@ -3765,10 +3765,12 @@
BattInfImpl biml = new BattInfImpl();
BattInf binf = new BattInf();
- binf.setBattGroupId(1000967);
+ binf.setBattGroupId(1000001);
binf.setStationName("");
binf.setStationName1("");
binf.setStationName2("");
+ binf.setStationName3("姝︽眽婧愭殺瀹為獙瀹�1");
+ binf.setBattGroupName("");
binf.setBattProducer("1");
User_inf uinf=new User_inf();
uinf.setUId(1002);
@@ -3794,7 +3796,8 @@
//List<BattInf> list = biml.serchByConditionNew(bmd);
//List<BattInf> list=biml.serchByTestType(bmd);
//List<BattInf> list=biml.serchGroupAssess(bmd);
- List<BattInf> list=biml.serchMakeGroup(binf);
+ //List<BattInf> list=biml.serchMakeGroup(binf);
+ List<BattInf> list=biml.serchGroupByInfor(binf);
for (BattInf b : list) {
System.out.println(b);
}
diff --git a/gx_tieta/src/com/fgkj/services/BattInfServices.java b/gx_tieta/src/com/fgkj/services/BattInfServices.java
index b81a4fd..16d3dec 100644
--- a/gx_tieta/src/com/fgkj/services/BattInfServices.java
+++ b/gx_tieta/src/com/fgkj/services/BattInfServices.java
@@ -858,6 +858,42 @@
}
return model;
}
+ //鐢垫睜閰嶇粍绠$悊(閲嶈)
+ public ServiceModel serchGroupByInfor(Object obj){
+ List<BattInf> list=((BattInfImpl)dao).serchGroupByInfor(obj);
+ List list_b=new ArrayList();
+ if(list!=null&&list.size()>0){
+ for(int i=0;i<list.size();i++){
+ BattInf binf=list.get(i);
+ List<BattInf_Rebuild> listr=(List<BattInf_Rebuild>) binf.getObj();
+ for (int j = 0; j <binf.getMonCount(); j++) {
+ BattInf b=new BattInf();
+ b.setBattGroupId(binf.getBattGroupId());
+ b.setBattProducer(binf.getBattProducer());
+ b.setStationName(binf.getStationName());
+ b.setBattGroupName(binf.getBattGroupName());
+ b.setMonVolStd(binf.getMonVolStd());
+ b.setMonCapStd(binf.getMonCapStd());
+ b.setMonNum(j+1);
+ for (int z = 0; z < listr.size(); z++) {
+ BattInf_Rebuild brinf=(BattInf_Rebuild) listr.get(z);
+ if((j+1)==brinf.getNew_monum()&&b.getBattGroupId()==brinf.getNew_battgroupid()){
+ b.setBattProducer(brinf.getOld_battproducer());
+ }
+ }
+ list_b.add(b);
+ }
+ }
+ model.setCode(1);
+ model.setData(list_b);
+ model.setMsg("鏌ヨ鎴愬姛!");
+ }else{
+ model.setCode(0);
+ model.setMsg("鏌ヨ澶辫触!");
+ }
+ return model;
+ }
+
public static void main(String[] args) {
//new BattInfServices().findMenu();
BattInf b=new BattInf();
--
Gitblit v1.9.1