| | |
| | | import com.fgkj.dao.impl.BattDischarge_planImpl;
|
| | | import com.fgkj.dao.impl.BattInfImpl;
|
| | | import com.fgkj.dao.impl.BattMap_informationImpl;
|
| | | import com.fgkj.dao.impl.Batt_enduranceImpl;
|
| | | import com.fgkj.dao.impl.Batt_rtstateDAOImpl;
|
| | | import com.fgkj.dao.impl.Battalarm_dataDAOImpl;
|
| | | import com.fgkj.dao.impl.ram.Bts_station_stateImpl;
|
| | |
| | | //9.1录入机房信息
|
| | | public ServiceModel add(Object obj){
|
| | | Boolean bl=dao.add(obj);
|
| | | if(bl){
|
| | | model.setCode(1);
|
| | | model.setMsg("添加成功!");
|
| | | }else{
|
| | | model.setCode(0);
|
| | | model.setMsg("添加失败!");
|
| | | }
|
| | | return model;
|
| | | }
|
| | | //9.1录入机房信息(手机端)
|
| | | public ServiceModel replace(Object obj){
|
| | | Boolean bl=((BattMap_informationImpl)dao).replace(obj);
|
| | | if(bl){
|
| | | model.setCode(1);
|
| | | model.setMsg("添加成功!");
|
| | |
| | | int numPlan=0;
|
| | | int numPoff=0;
|
| | | int dianzhanNum=0;
|
| | | int xuhangNum=0;
|
| | | if(list!=null&&list.size()>0){
|
| | | for(int i=0;i<list.size();i++){
|
| | | state="item-normal";
|
| | |
| | | binf.setFBSDeviceId(binformation.getFBSDeviceId());
|
| | | state=(new Fbs9100_stateImpl().seachDevNow(binf));
|
| | | }else{
|
| | | xuhangNum=(new Batt_enduranceImpl()).serchxuhangNotInThree_stationid(binformation);//续航不足3小时数
|
| | | numPoff=(new Bts_station_stateImpl()).serchByStationId(binformation); //停电数
|
| | | dianzhanNum=((Bts_station_stateImpl)dao).serchByStationId_diaozhan(binformation); //掉站数
|
| | | dianzhanNum=(new Bts_station_stateImpl()).serchByStationId_diaozhan(binformation); //掉站数
|
| | | numBadBatt=(new BadBatt_monImpl()).serchByStationId(binformation); //落后总数
|
| | | numAlarm=(new Battalarm_dataDAOImpl()).serchByStationId(binformation); //告警总数
|
| | | //numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation); //延迟总数
|
| | | if(numPoff>0){ |
| | | state="item-poff"; //停电
|
| | | if(dianzhanNum>0){ |
| | | state="item-timeout"; //掉站
|
| | | }else{
|
| | | if(numBadBatt>0){
|
| | | state="item-behind"; //落后机房
|
| | | if(numPoff>0){
|
| | | state="item-poff"; //停电
|
| | | |
| | | }else{
|
| | | if(numAlarm > 0){
|
| | | state="item-warn"; //告警机房
|
| | | if(xuhangNum>0){
|
| | | state="item-xuhang"; //续航不足
|
| | | }else{
|
| | | /*if(numPlan > 0){
|
| | | state="item-timeout"; //延迟机房
|
| | | }*/
|
| | | if(dianzhanNum>0){
|
| | | state="item-timeout";
|
| | | if(numBadBatt>0){
|
| | | state="item-behind"; //落后机房
|
| | | }else{
|
| | | if(numAlarm > 0){
|
| | | state="item-warn"; //告警机房 |
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | if("0".equals(list.get(i).getInformation())){
|
| | | state="item-install"; //若机房未安装将指定的机房设置成灰色的
|
| | |
| | | model.setSum(numBadBatt); //落后总数
|
| | | //model.setNewsum(numPlan); //延时总数
|
| | | model.setMsgT(String.valueOf(dianzhanNum)); //掉站
|
| | | model.setMsgV(String.valueOf(xuhangNum));//续航不足
|
| | | model.setMsg(state); //61850状态
|
| | | model.setMsgN(binformation.getFBSDeviceId().toString());
|
| | | listAll.add(model);
|
| | |
| | | int numPlan=0;
|
| | | int numPoff=0;
|
| | | int dianzhanNum=0;
|
| | | int xuhangNum=0;
|
| | | if(list!=null&&list.size()>0){
|
| | | for(int i=0;i<list.size();i++){
|
| | | state="item-normal";
|
| | |
| | | binf.setFBSDeviceId(binformation.getFBSDeviceId());
|
| | | state=(new Fbs9100_stateImpl().seachDevNow(binf));
|
| | | }else{
|
| | | xuhangNum=(new Batt_enduranceImpl()).serchxuhangNotInThree_stationid(binformation);//续航不足3小时数
|
| | | numPoff=(new Bts_station_stateImpl()).serchByStationId(binformation); //停电数
|
| | | dianzhanNum=((Bts_station_stateImpl)dao).serchByStationId_diaozhan(binformation); //掉站数
|
| | | dianzhanNum=(new Bts_station_stateImpl()).serchByStationId_diaozhan(binformation); //掉站数
|
| | | numBadBatt=(new BadBatt_monImpl()).serchByStationId(binformation); //落后总数
|
| | | numAlarm=(new Battalarm_dataDAOImpl()).serchByStationId(binformation); //告警总数
|
| | | //numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation); //延迟总数
|
| | | if(numPoff>0){ |
| | | state="item-poff"; //停电
|
| | | if(dianzhanNum>0){ |
| | | state="item-timeout"; //掉站
|
| | | }else{
|
| | | if(numBadBatt>0){
|
| | | state="item-behind"; //落后机房
|
| | | if(numPoff>0){
|
| | | state="item-poff"; //停电
|
| | | |
| | | }else{
|
| | | if(numAlarm > 0){
|
| | | state="item-warn"; //告警机房
|
| | | if(xuhangNum>0){
|
| | | state="item-xuhang"; //续航不足
|
| | | }else{
|
| | | /*if(numPlan > 0){
|
| | | state="item-timeout"; //延迟机房
|
| | | }*/
|
| | | if(dianzhanNum>0){
|
| | | state="item-timeout";
|
| | | if(numBadBatt>0){
|
| | | state="item-behind"; //落后机房
|
| | | }else{
|
| | | if(numAlarm > 0){
|
| | | state="item-warn"; //告警机房 |
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | model.setSum(numBadBatt); //落后总数
|
| | | //model.setNewsum(numPlan); //延时总数
|
| | | model.setMsgT(String.valueOf(dianzhanNum)); //掉站
|
| | | model.setMsgV(String.valueOf(xuhangNum));//续航不足
|
| | | model.setMsg(state); //61850状态
|
| | | model.setMsgN(binformation.getFBSDeviceId().toString());
|
| | | listAll.add(model);
|
| | |
| | | int numBadBatt=(new BadBatt_monImpl()).serchByStationId(binformation);
|
| | | int numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation);
|
| | | int numPoff=(new Bts_station_stateImpl()).serchByStationId(binformation); //停电数
|
| | | int dianzhanNum=((Bts_station_stateImpl)dao).serchByStationId_diaozhan(binformation); //掉站数
|
| | | int dianzhanNum=(new Bts_station_stateImpl()).serchByStationId_diaozhan(binformation); //掉站数
|
| | | int xuhangNum=(new Batt_enduranceImpl()).serchxuhangNotInThree_stationid(binformation);//续航不足3小时数
|
| | | model.setData(list.get(i));
|
| | | model.setCode(numAlarm); //告警总数
|
| | | model.setSum(numBadBatt); //落后总数
|
| | | model.setNewsum(numPlan); //延时总数
|
| | | model.setMsgO(String.valueOf(numPoff)); //停电数
|
| | | model.setMsgT(String.valueOf(dianzhanNum)); //掉站
|
| | | model.setMsgV(String.valueOf(xuhangNum));//续航不足
|
| | | listAll.add(model);
|
| | | }
|
| | | }
|