gx_tieta/src/com/fgkj/actions/BattInfAction.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
gx_tieta/src/com/fgkj/services/BattInfServices.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
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; } 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); } 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();