| | |
| | | import com.fgkj.dao.impl.Batttestdata_infDAOImpl;
|
| | | import com.fgkj.dao.impl.BatttestdatastopDAOImpl;
|
| | | import com.fgkj.dao.impl.Process_surveyImpl;
|
| | | import com.fgkj.dao.impl.ram.Bts_station_stateImpl;
|
| | | import com.fgkj.dao.impl.ram.Fbs9100_setparamImpl;
|
| | | import com.fgkj.db.DBUtil;
|
| | | import com.fgkj.dto.App_Sys;
|
| | |
| | | import com.fgkj.dto.Page;
|
| | | import com.fgkj.dto.Process_survey;
|
| | | import com.fgkj.dto.ServiceModel;
|
| | | import com.fgkj.dto.User_inf;
|
| | |
|
| | | public class BattInfServices {
|
| | | private ServiceModel model;
|
| | |
| | | }
|
| | | //System.out.println(model);
|
| | | return model;
|
| | | }
|
| | | |
| | | //设置电池组充电电流阈值
|
| | | public ServiceModel update_charge(Object obj){
|
| | | boolean bl=((BattInfImpl)dao).update_charge(obj);
|
| | | if(bl){ |
| | | model.setCode(1);
|
| | | model.setMsg("修改成功!");
|
| | | }else{
|
| | | model.setCode(0);
|
| | | model.setMsg("修改失败!");
|
| | | }
|
| | | return model;
|
| | | }
|
| | | //删除电池组
|
| | | public ServiceModel delete(Object obj) {
|
| | |
| | | }
|
| | | return model;
|
| | | }
|
| | | public static void main(String[] args) {
|
| | | //首页上显示已安装数和全部基站数
|
| | | public ServiceModel serchDevice(Object obj){
|
| | | //int devNum=(new BattInfImpl()).serchByDeviceId(obj); //总设备数(已安装)
|
| | | List list=(new BattInfImpl()).serchByDeviceId_all(obj); //总设备数(全部)
|
| | | if (list != null && list.size() > 0) {
|
| | | model.setCode(1);
|
| | | model.setData(list);
|
| | | model.setMsg("查询成功!");
|
| | | }else{
|
| | | model.setCode(0);
|
| | | model.setMsg("查询失败!");
|
| | | }
|
| | | //System.out.println(model.getData());
|
| | | return model;
|
| | | }
|
| | | //头部查出已安装的所有机房
|
| | | public ServiceModel serchByDeviceId(Object obj){
|
| | | int devNum=(new BattInfImpl()).serchByDeviceId(obj); //总设备数(已安装)
|
| | | model.setCode(1);
|
| | | model.setSum(devNum);
|
| | | model.setMsg("查询成功!");
|
| | | return model;
|
| | | }
|
| | | //头部查出已安装的电池单体
|
| | | public ServiceModel serchByInstall_count(Object obj){
|
| | | int devNum=(new BattInfImpl()).serchByInstall_count(obj); //总设备数(已安装)
|
| | | model.setCode(1);
|
| | | model.setSum(devNum);
|
| | | model.setMsg("查询成功!");
|
| | | return model;
|
| | | }
|
| | | |
| | | //添加操作时查询出设备id
|
| | | public ServiceModel searchmaxdev_id(){
|
| | | int dev_id=BattinfGroupFactory.searchmaxdev_id();
|
| | | model.setData(dev_id);
|
| | | return model;
|
| | | }
|
| | | //添加操作时查询出电池组id
|
| | | public ServiceModel searchMaxBattgroupId(){
|
| | | int battgroupid=BattinfGroupFactory.searchMaxBattgroupId();
|
| | | model.setData(battgroupid);
|
| | | return model;
|
| | | }
|
| | | |
| | | //批量设置放电参数时,根据省市区,电池单体型号(伏数),组数筛选出电池组
|
| | | public ServiceModel serchByDischarge(Object obj){
|
| | | List list=((BattInfImpl)dao).serchByDischarge(obj);
|
| | | if (list != null && list.size() > 0) {
|
| | | model.setCode(1);
|
| | | model.setData(list);
|
| | | model.setMsg("查询成功!");
|
| | | }else{
|
| | | model.setCode(0);
|
| | | model.setMsg("查询失败!");
|
| | | }
|
| | | return model;
|
| | | }
|
| | | public static void main(String[] args) {
|
| | | //new BattInfServices().findMenu();
|
| | | BattInf b=new BattInf();
|
| | | //b.setBattGroupId(1000005);
|
| | |
| | | //bs.searchInform(bmd);
|
| | | //bs.serchByBattGroupName(b);
|
| | | //bs.updateIp(b);
|
| | | ServiceModel model=bs.serchMakeGroup(b);
|
| | | /*ServiceModel model=bs.serchMakeGroup(b);
|
| | | List<BattInf> list=(List) model.getData();
|
| | | for (BattInf binf : list) {
|
| | | List<Batttestdatastop> list_sdata=(List) binf.getObj();
|
| | | for (Batttestdatastop s : list_sdata) {
|
| | | System.out.println(s);
|
| | | }
|
| | | }
|
| | | }*/
|
| | | //BattTestData.run_cmd(BattTestData.STRCMD);
|
| | | User_inf uinf=new User_inf();
|
| | | uinf.setUId(1002);
|
| | | ServiceModel model=bs.serchDevice(uinf);
|
| | | System.out.println(model);
|
| | | }
|
| | | }
|