| | |
| | | model=new ServiceModel();
|
| | | dao=BaseDAOFactory.getBaseDAO(BaseDAO.BATTTESTDATA_INF);
|
| | | daoB=BaseDAOFactory.getBaseDAO(BaseDAO.BATTINF);
|
| | | }
|
| | | |
| | | public ServiceModel serchByCondition(Object obj){
|
| | | model=new ServiceModel();
|
| | | }
|
| | | /**
|
| | | * 根据电池组id查询电池组的inf表中的放电信息
|
| | | */
|
| | | public ServiceModel serchByCondition(Object obj){
|
| | | List<Batttestdata_inf> list=dao.serchByCondition(obj);
|
| | | if(list!=null && list.size()>0){
|
| | | model=judge(obj);
|
| | |
| | | model.setData(list);
|
| | | }
|
| | | }
|
| | | // for (Batttestdata_inf u :list) {
|
| | | // System.out.println(u);
|
| | | // }
|
| | | return model;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 根据电池组id查询电池组的inf表中的放电信息<-------跨域----------->
|
| | | */
|
| | | public ServiceModel serchByCondition_ky(Object obj){
|
| | | List<Batttestdata_inf> list=((Batttestdata_infDAOImpl)dao).serchByCondition_ky(obj); |
| | | if(list!=null && list.size()>0){
|
| | | model=judge(obj); |
| | | if(model.getCode()!=0){
|
| | | model.setCode(1);
|
| | | model.setData(list);
|
| | | }
|
| | | }
|
| | | return model;
|
| | | }
|
| | | //测试battgroupid在batttestdata_inf中是否存在
|
| | | public ServiceModel judge(Object obj){
|
| | | model=new ServiceModel();
|
| | | Batttestdata_inf bti=(Batttestdata_inf)obj;
|
| | | if(bti.getBattGroupId()!=null){
|
| | | //System.out.println(bti.getBattGroupId());
|
| | |
| | | //1.2/1.3电池组统计分析查询
|
| | | public ServiceModel serchByTestType1(Object obj){
|
| | | Batttestdata_inf binf=(Batttestdata_inf) obj;
|
| | | model=new ServiceModel();
|
| | | if(binf.getTest_type()==2){
|
| | | List<Batttestdata_inf> list2=((Batttestdata_infDAOImpl)dao).serchByTestType2(binf);
|
| | | List<Batttestdata_inf> list3=((Batttestdata_infDAOImpl)dao).serchByTestType3(binf);
|