package com.fgkj.services;
|
|
import java.util.List;
|
|
import com.fgkj.dao.BaseDAO;
|
import com.fgkj.dao.BaseDAOFactory;
|
import com.fgkj.dao.impl.Batt_enduranceImpl;
|
import com.fgkj.dto.ServiceModel;
|
|
public class Batt_enduranceService {
|
private BaseDAO dao;
|
private ServiceModel model;
|
|
public Batt_enduranceService() {
|
super();
|
dao =BaseDAOFactory.getBaseDAO(BaseDAO.BATT_ENDURANCE);
|
model = new ServiceModel();
|
}
|
//续航时间的查询
|
public ServiceModel serchByCondition(Object obj) {
|
List list=dao.serchByCondition(obj);
|
if(list.size()>0&&list!=null){
|
model.setCode(1);
|
model.setData(list);
|
model.setMsg("查询成功!");
|
}else{
|
model.setCode(0);
|
model.setMsg("查询失败!");
|
}
|
return model;
|
}
|
//续航不足1小时,2小时等的饼状图
|
public ServiceModel serchByState_xuhang(Object obj) {
|
List list=((Batt_enduranceImpl)dao).serchByState_xuhang(obj);
|
if(list.size()>0&&list!=null){
|
model.setCode(1);
|
model.setData(list);
|
model.setMsg("查询成功!");
|
}else{
|
model.setCode(0);
|
model.setMsg("查询失败!");
|
}
|
return model;
|
}
|
//导航上续航不足3小时的个数
|
public ServiceModel serchxuhangNotInThree(Object obj) {
|
int nums=((Batt_enduranceImpl)dao).serchxuhangNotInThree(obj);
|
model.setMsg("查询成功!");
|
model.setSum(nums);
|
return model;
|
}
|
|
}
|