| | |
| | | package com.fgkj.services; |
| | | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | import com.fgkj.dao.BaseDAO; |
| | | import com.fgkj.dao.BaseDAOFactory; |
| | | import com.fgkj.dao.impl.ram.Fbs9100_setparamImpl; |
| | | import com.fgkj.dto.BattInf; |
| | | import com.fgkj.dto.Devstate_usr; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.ram.Fbs9100_setparam; |
| | | |
| | | public class Devstate_usrService { |
| | | private BaseDAO dao; |
| | |
| | | } |
| | | //根据用户id查询 |
| | | public ServiceModel serchByCondition(Object obj) { |
| | | List list=dao.serchByCondition(obj); |
| | | List<Devstate_usr> list=dao.serchByCondition(obj); |
| | | if(list!=null&&list.size()>0){ |
| | | model.setCode(1); |
| | | model.setData(list); |
| | | model.setMsg("查询成功!"); |
| | | //根据查询出来的dev_id查询参数设置 |
| | | LinkedList<Fbs9100_setparam> paramList = new LinkedList<>(); |
| | | for (int i = 0; i < paramList.size(); i++) { |
| | | BattInf battInf = new BattInf(); |
| | | battInf.setFBSDeviceId(paramList.get(i).getDev_id()); |
| | | List<Fbs9100_setparam> paramListTemp = new Fbs9100_setparamImpl().serchdevParam(battInf); |
| | | if (paramListTemp.size()!=0){ |
| | | Fbs9100_setparam fbs9100_setparam = paramListTemp.get(0); |
| | | paramList.add(fbs9100_setparam); |
| | | } |
| | | } |
| | | model.setData2(paramList); |
| | | }else{ |
| | | model.setCode(0); |
| | | model.setMsg("查询失败!"); |