package com.fgkj.services; import java.util.List; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.BaseDAOFactory; import com.fgkj.dao.impl.Batt_attentionImpl; import com.fgkj.dao.impl.BatttestdatastopDAOImpl; import com.fgkj.dto.BattInf; import com.fgkj.dto.Batt_Maint_Dealarm; import com.fgkj.dto.Page; import com.fgkj.dto.ServiceModel; public class Batt_attentionService { private BaseDAO dao; private ServiceModel model; public Batt_attentionService() { super(); model=new ServiceModel(); dao=BaseDAOFactory.getBaseDAO(BaseDAO.BATT_ATTENTION); } //添加关注 public ServiceModel add(Object obj) { Boolean bl = dao.add(obj); if (bl) { model.setCode(1); model.setMsg("添加成功!"); } else { model.setMsg("添加失败!"); } return model; } public ServiceModel update(Object obj) { Boolean bl = dao.update(obj); if (bl) { model.setCode(1); model.setMsg("修改成功!"); } else { model.setMsg("修改失败!"); } return model; } //取消关注 public ServiceModel delete(Object obj) { Boolean bl = dao.del(obj); if (bl) { model.setCode(1); model.setMsg("删除成功!"); } else { model.setMsg("删除失败!"); } return model; } //根据电池组的筛选条件,查询单体的实际电压 public ServiceModel serchByCondition(Object obj) { List list = dao.serchByCondition(obj); if(list!=null&&list.size()>0){ for (int i=0;i