Bläddra i källkod

[WallPadEmergency]
1. get_metering 지원
- 작년, 3개월, 월, 일 모두 확인(xml tester 이용)
2. 버전업
- 2021.06.04.01 -> 2023.03.20.01

jglee 2 år sedan
förälder
incheckning
56a9d09fc1

BIN
WallPadEnergyCtrl/libs/WallPadAPI.jar


+ 1 - 1
WallPadEnergyCtrl/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadenergyctrl"
     android:versionCode="01"
-    android:versionName="2021.06.04.01">
+    android:versionName="2023.03.20.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 25 - 0
WallPadEnergyCtrl/src/main/java/kr/co/icontrols/wallpadenergyctrl/imap/iMAPRemotemeter.java

@@ -247,6 +247,31 @@ public class iMAPRemotemeter extends WallPadiMAPClient{
                             }
                         }
                     }
+                    //jglee - 2023.03.10 get_metering 추가 (단지서버1.0에서 사용함)
+                    else if ((name!=null && name.equalsIgnoreCase("get_metering"))
+                            && (type!=null && type.equalsIgnoreCase("reply"))) {
+                        if (SetItem("guidemap") == 1) {
+                            if (isDistinguishYear_String!=null && isDistinguishYear_String.equalsIgnoreCase("year")) {
+                                String distinguish = GetAttributeVal(0, "distinguish");
+                                if (distinguish!=null && distinguish.equalsIgnoreCase(
+                                        "year")) {
+                                    if (SetItem("valuelist") > 0) {
+                                        Proc.ProcSuccess();
+                                        return;
+                                    }
+                                }
+                            } else if (isDistinguishYear_String!=null && isDistinguishYear_String.equalsIgnoreCase("month")) {
+                                String distinguish = GetAttributeVal(0, "distinguish");
+                                if (distinguish!=null && distinguish.equalsIgnoreCase(
+                                        "month")) {
+                                    if (SetItem("valuelist") > 0) {
+                                        Proc.ProcSuccess();
+                                        return;
+                                    }
+                                }
+                            }
+                        }
+                    }
                 }
             } 
         }

+ 395 - 206
WallPadEnergyCtrl/src/main/java/kr/co/icontrols/wallpadenergyctrl/screen/RemoteMeterMainScreen.java

@@ -125,7 +125,9 @@ public class RemoteMeterMainScreen extends WpadScreen{
 	int mSampleShow;
 	boolean mEMS_Enable;
 	boolean mCostInfo_Enable = false;
-
+	//2023.03.10 ems 사용여부 구분자
+	boolean isUseEMS = true;
+	
 	int mNumberOfEnergy;
 	boolean mOpenList = false;
 	boolean mOpenListEnergy = false;
@@ -322,6 +324,10 @@ public class RemoteMeterMainScreen extends WpadScreen{
 		//테스트
 		LoadInfoFromDB();
 
+		WallpadDeviceSet wds = new WallpadDeviceSet(getContext());
+		isUseEMS = wds.GetEMSProtocolUse();
+		wds.closeDB();
+
         Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.RemoteMeterMainScreenID.image.BACKGROUND);
         ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
 
@@ -1810,6 +1816,8 @@ public class RemoteMeterMainScreen extends WpadScreen{
 	 */
 	private void ShowGraphValue(float usedValue_Myhome, int PointX, float f, boolean isShowBottomValue, String BottomValue, int BottomValueofPointY)
 	{
+		if(mDrawGraphValue >= Show_TopGraphValue_Text.length)
+			return;
 		Show_TopGraphValue_Text[mDrawGraphValue] = new WpadTextView(getContext(), false, 120, 30, Gravity.CENTER, Color.WHITE, Common.fontsize._26_DEFAULT, false, ID.RemoteMeterMainScreenID.text.TEXT_INFO);
 		ViewRegistration(getLayout(), Show_TopGraphValue_Text[mDrawGraphValue],
 				Common.ImgPosion.GetX(PointX-35),
@@ -2294,61 +2302,98 @@ public class RemoteMeterMainScreen extends WpadScreen{
 											{
 												case 0:
 													monthTableClass[j] = new MonthTableClass("", "", "");
-													if ((imapRemotemeter.GetAttributeVal(i, "elect_used") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "elect_average_used_samesize") != null))
+													//jglee - 2023.03.10 여기서 구분자 필요
+													//ems 사용 여부 체크
+													if(isUseEMS)
 													{
-														if (imapRemotemeter.GetAttributeVal(i, "elect_used").equals("1000000") == true)
-														{
-															TempString = "- / ";
-														}
-														else
-														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "elect_used") + " / ";
-														}
-														if (imapRemotemeter.GetAttributeVal(i, "elect_average_used_samesize").equals("null") == true)
+														if ((imapRemotemeter.GetAttributeVal(i, "elect_used") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "elect_average_used_samesize") != null))
 														{
-															TempString = TempString + "-";
-														}
-														else
-														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "elect_average_used_samesize");
-														}
-														monthTableClass[j].Use = TempString;
-													}
-													if ((imapRemotemeter.GetAttributeVal(i, "elect_ranking_samesize") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
-													{
-														if (imapRemotemeter.GetAttributeVal(i, "elect_ranking_samesize").equals("null") == true)
-														{
-															TempString = "- / ";
-														}
-														else
-														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "elect_ranking_samesize") + " / ";
+															if (imapRemotemeter.GetAttributeVal(i, "elect_used").equals("1000000") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "elect_used") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "elect_average_used_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "elect_average_used_samesize");
+															}
+															monthTableClass[j].Use = TempString;
 														}
-														if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+														if ((imapRemotemeter.GetAttributeVal(i, "elect_ranking_samesize") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
 														{
-															TempString = TempString + "-";
+															if (imapRemotemeter.GetAttributeVal(i, "elect_ranking_samesize").equals("null") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "elect_ranking_samesize") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															}
+															monthTableClass[j].Rank = TempString;
 														}
-														else
+
+														//가격정보
+														if(mCostInfo_Enable == true)
 														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															if(imapRemotemeter.GetAttributeVal(i, "elect_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "elect_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "elect_price");
+																}
+															}
 														}
-														monthTableClass[j].Rank = TempString;
 													}
-
-													//가격정보
-													if(mCostInfo_Enable == true)
+													else
 													{
-														if(imapRemotemeter.GetAttributeVal(i, "elect_price") != null)
+														monthTableClass[j].Rank = "";
+														if ((imapRemotemeter.GetAttributeVal(i, "elect_used") != null))
 														{
-															if (imapRemotemeter.GetAttributeVal(i, "elect_price").equals("null") == true)
+															if (imapRemotemeter.GetAttributeVal(i, "elect_used").equals("1000000") == true)
 															{
-																monthTableClass[j].Price = "요금 정보 없음";
+																TempString = "- / -";
 															}
 															else
 															{
-																monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "elect_price");
+																TempString = imapRemotemeter.GetAttributeVal(i, "elect_used") + " / -";
+															}
+															monthTableClass[j].Use = TempString;
+														}
+
+														//가격정보
+														if(mCostInfo_Enable == true)
+														{
+															if(imapRemotemeter.GetAttributeVal(i, "elect_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "elect_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "elect_price");
+																}
 															}
 														}
 													}
@@ -2360,65 +2405,101 @@ public class RemoteMeterMainScreen extends WpadScreen{
 													break;
 												case 1:
 													monthTableClass[j] = new MonthTableClass("", "", "");
-													if ((imapRemotemeter.GetAttributeVal(i, "water_used") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "water_average_used_samesize") != null))
+													if(isUseEMS)
 													{
-														if (imapRemotemeter.GetAttributeVal(i, "water_used").equals("1000000") == true)
-														{
-															TempString = "- / ";
-														}
-														else
+														if ((imapRemotemeter.GetAttributeVal(i, "water_used") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "water_average_used_samesize") != null))
 														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "water_used") + " / ";
-														}
-														if (imapRemotemeter.GetAttributeVal(i, "water_average_used_samesize").equals("null") == true)
-														{
-															TempString = TempString + "-";
-														}
-														else
-														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "water_average_used_samesize");
-														}
-														monthTableClass[j].Use = TempString;
-													}
-													if ((imapRemotemeter.GetAttributeVal(i, "water_ranking_samesize") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
-													{
-														if (imapRemotemeter.GetAttributeVal(i, "water_ranking_samesize").equals("null") == true)
-														{
-															TempString = "- / ";
-														}
-														else
-														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "water_ranking_samesize") + " / ";
+															if (imapRemotemeter.GetAttributeVal(i, "water_used").equals("1000000") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "water_used") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "water_average_used_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "water_average_used_samesize");
+															}
+															monthTableClass[j].Use = TempString;
 														}
-														if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+														if ((imapRemotemeter.GetAttributeVal(i, "water_ranking_samesize") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
 														{
-															TempString = TempString + "-";
+															if (imapRemotemeter.GetAttributeVal(i, "water_ranking_samesize").equals("null") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "water_ranking_samesize") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															}
+															monthTableClass[j].Rank = TempString;
 														}
-														else
+
+														//가격정보
+														if(mCostInfo_Enable == true)
 														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															if(imapRemotemeter.GetAttributeVal(i, "water_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "water_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "water_price");
+																}
+															}
 														}
-														monthTableClass[j].Rank = TempString;
 													}
-
-													//가격정보
-													if(mCostInfo_Enable == true)
+													else
 													{
-														if(imapRemotemeter.GetAttributeVal(i, "water_price") != null)
+														monthTableClass[j].Rank = "";
+														if ((imapRemotemeter.GetAttributeVal(i, "water_used") != null))
 														{
-															if (imapRemotemeter.GetAttributeVal(i, "water_price").equals("null") == true)
+															if (imapRemotemeter.GetAttributeVal(i, "water_used").equals("1000000") == true)
 															{
-																monthTableClass[j].Price = "요금 정보 없음";
+																TempString = "- / -";
 															}
 															else
 															{
-																monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "water_price");
+																TempString = imapRemotemeter.GetAttributeVal(i, "water_used") + " / -";
+															}
+															monthTableClass[j].Use = TempString;
+														}
+
+														//가격정보
+														if(mCostInfo_Enable == true)
+														{
+															if(imapRemotemeter.GetAttributeVal(i, "water_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "water_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "water_price");
+																}
 															}
 														}
 													}
 
+
 													monthTableClass[j].Goal = DBMGR.GetRemoteMeteringTargetValue(j);
 													DebugLogOutput("수도");
 													DebugLogOutput(monthTableClass[j].Use);
@@ -2427,65 +2508,101 @@ public class RemoteMeterMainScreen extends WpadScreen{
 													break;
 												case 2:
 													monthTableClass[j] = new MonthTableClass("", "", "");
-													if ((imapRemotemeter.GetAttributeVal(i, "gas_used") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "gas_average_used_samesize") != null))
-													{
-														if (imapRemotemeter.GetAttributeVal(i, "gas_used").equals("1000000") == true)
-														{
-															TempString = "- / ";
-														}
-														else
-														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "gas_used") + " / ";
-														}
-														if (imapRemotemeter.GetAttributeVal(i, "gas_average_used_samesize").equals("null") == true)
-														{
-															TempString = TempString + "-";
-														}
-														else
-														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "gas_average_used_samesize");
-														}
-														monthTableClass[j].Use = TempString;
-													}
-													if ((imapRemotemeter.GetAttributeVal(i, "gas_ranking_samesize") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
+													if(isUseEMS)
 													{
-														if (imapRemotemeter.GetAttributeVal(i, "gas_ranking_samesize").equals("null") == true)
-														{
-															TempString = "- / ";
-														}
-														else
+														if ((imapRemotemeter.GetAttributeVal(i, "gas_used") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "gas_average_used_samesize") != null))
 														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "gas_ranking_samesize") + " / ";
+															if (imapRemotemeter.GetAttributeVal(i, "gas_used").equals("1000000") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "gas_used") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "gas_average_used_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "gas_average_used_samesize");
+															}
+															monthTableClass[j].Use = TempString;
 														}
-														if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+														if ((imapRemotemeter.GetAttributeVal(i, "gas_ranking_samesize") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
 														{
-															TempString = TempString + "-";
+															if (imapRemotemeter.GetAttributeVal(i, "gas_ranking_samesize").equals("null") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "gas_ranking_samesize") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															}
+															monthTableClass[j].Rank = TempString;
 														}
-														else
+
+														//가격정보
+														if(mCostInfo_Enable == true)
 														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															if(imapRemotemeter.GetAttributeVal(i, "gas_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "gas_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "gas_price");
+																}
+															}
 														}
-														monthTableClass[j].Rank = TempString;
 													}
-
-													//가격정보
-													if(mCostInfo_Enable == true)
+													else
 													{
-														if(imapRemotemeter.GetAttributeVal(i, "gas_price") != null)
+														monthTableClass[j].Rank = "";
+														if ((imapRemotemeter.GetAttributeVal(i, "gas_used") != null))
 														{
-															if (imapRemotemeter.GetAttributeVal(i, "gas_price").equals("null") == true)
+															if (imapRemotemeter.GetAttributeVal(i, "gas_used").equals("1000000") == true)
 															{
-																monthTableClass[j].Price = "요금 정보 없음";
+																TempString = "- / -";
 															}
 															else
 															{
-																monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "gas_price");
+																TempString = imapRemotemeter.GetAttributeVal(i, "gas_used") + " / -";
+															}
+															monthTableClass[j].Use = TempString;
+														}
+
+														//가격정보
+														if(mCostInfo_Enable == true)
+														{
+															if(imapRemotemeter.GetAttributeVal(i, "gas_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "gas_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "gas_price");
+																}
 															}
 														}
 													}
 
+
 													monthTableClass[j].Goal = DBMGR.GetRemoteMeteringTargetValue(j);
 													DebugLogOutput("가스");
 													DebugLogOutput(monthTableClass[j].Use);
@@ -2494,65 +2611,101 @@ public class RemoteMeterMainScreen extends WpadScreen{
 													break;
 												case 3:
 													monthTableClass[j] = new MonthTableClass("", "", "");
-													if ((imapRemotemeter.GetAttributeVal(i, "hotwater_used") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "hotwater_average_used_samesize") != null))
+													if(isUseEMS)
 													{
-														if (imapRemotemeter.GetAttributeVal(i, "hotwater_used").equals("1000000") == true)
+														if ((imapRemotemeter.GetAttributeVal(i, "hotwater_used") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "hotwater_average_used_samesize") != null))
 														{
-															TempString = "- / ";
-														}
-														else
-														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "hotwater_used") + " / ";
-														}
-														if (imapRemotemeter.GetAttributeVal(i, "hotwater_average_used_samesize").equals("null") == true)
-														{
-															TempString = TempString + "-";
-														}
-														else
-														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "hotwater_average_used_samesize");
-														}
-														monthTableClass[j].Use = TempString;
-													}
-													if ((imapRemotemeter.GetAttributeVal(i, "hotwater_ranking_samesize") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
-													{
-														if (imapRemotemeter.GetAttributeVal(i, "hotwater_ranking_samesize").equals("null") == true)
-														{
-															TempString = "- / ";
-														}
-														else
-														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "hotwater_ranking_samesize") + " / ";
+															if (imapRemotemeter.GetAttributeVal(i, "hotwater_used").equals("1000000") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "hotwater_used") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "hotwater_average_used_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "hotwater_average_used_samesize");
+															}
+															monthTableClass[j].Use = TempString;
 														}
-														if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+														if ((imapRemotemeter.GetAttributeVal(i, "hotwater_ranking_samesize") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
 														{
-															TempString = TempString + "-";
+															if (imapRemotemeter.GetAttributeVal(i, "hotwater_ranking_samesize").equals("null") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "hotwater_ranking_samesize") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															}
+															monthTableClass[j].Rank = TempString;
 														}
-														else
+
+														//가격정보
+														if(mCostInfo_Enable == true)
 														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															if(imapRemotemeter.GetAttributeVal(i, "hotwater_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "hotwater_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "hotwater_price");
+																}
+															}
 														}
-														monthTableClass[j].Rank = TempString;
 													}
-
-													//가격정보
-													if(mCostInfo_Enable == true)
+													else
 													{
-														if(imapRemotemeter.GetAttributeVal(i, "hotwater_price") != null)
+														monthTableClass[j].Rank = "";
+														if ((imapRemotemeter.GetAttributeVal(i, "hotwater_used") != null))
 														{
-															if (imapRemotemeter.GetAttributeVal(i, "hotwater_price").equals("null") == true)
+															if (imapRemotemeter.GetAttributeVal(i, "hotwater_used").equals("1000000") == true)
 															{
-																monthTableClass[j].Price = "요금 정보 없음";
+																TempString = "- / -";
 															}
 															else
 															{
-																monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "hotwater_price");
+																TempString = imapRemotemeter.GetAttributeVal(i, "hotwater_used") + " / -";
+															}
+															monthTableClass[j].Use = TempString;
+														}
+
+														//가격정보
+														if(mCostInfo_Enable == true)
+														{
+															if(imapRemotemeter.GetAttributeVal(i, "hotwater_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "hotwater_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "hotwater_price");
+																}
 															}
 														}
 													}
 
+
 													monthTableClass[j].Goal = DBMGR.GetRemoteMeteringTargetValue(j);
 													DebugLogOutput("온수");
 													DebugLogOutput(monthTableClass[j].Use);
@@ -2561,65 +2714,101 @@ public class RemoteMeterMainScreen extends WpadScreen{
 													break;
 												case 4:
 													monthTableClass[j] = new MonthTableClass("", "", "");
-													if ((imapRemotemeter.GetAttributeVal(i, "energy_used") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "energy_average_used_samesize") != null))
+													if(isUseEMS)
 													{
-														if (imapRemotemeter.GetAttributeVal(i, "energy_used").equals("1000000") == true)
-														{
-															TempString = "- / ";
-														}
-														else
+														if ((imapRemotemeter.GetAttributeVal(i, "energy_used") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "energy_average_used_samesize") != null))
 														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "energy_used") + " / ";
-														}
-														if (imapRemotemeter.GetAttributeVal(i, "energy_average_used_samesize").equals("null") == true)
-														{
-															TempString = TempString + "-";
-														}
-														else
-														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "energy_average_used_samesize");
-														}
-														monthTableClass[j].Use = TempString;
-													}
-													if ((imapRemotemeter.GetAttributeVal(i, "energy_ranking_samesize") != null)
-															&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
-													{
-														if (imapRemotemeter.GetAttributeVal(i, "energy_ranking_samesize").equals("null") == true)
-														{
-															TempString = "- / ";
-														}
-														else
-														{
-															TempString = imapRemotemeter.GetAttributeVal(i, "energy_ranking_samesize") + " / ";
+															if (imapRemotemeter.GetAttributeVal(i, "energy_used").equals("1000000") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "energy_used") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "energy_average_used_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "energy_average_used_samesize");
+															}
+															monthTableClass[j].Use = TempString;
 														}
-														if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+														if ((imapRemotemeter.GetAttributeVal(i, "energy_ranking_samesize") != null)
+																&& (imapRemotemeter.GetAttributeVal(i, "count_samesize") != null))
 														{
-															TempString = TempString + "-";
+															if (imapRemotemeter.GetAttributeVal(i, "energy_ranking_samesize").equals("null") == true)
+															{
+																TempString = "- / ";
+															}
+															else
+															{
+																TempString = imapRemotemeter.GetAttributeVal(i, "energy_ranking_samesize") + " / ";
+															}
+															if (imapRemotemeter.GetAttributeVal(i, "count_samesize").equals("null") == true)
+															{
+																TempString = TempString + "-";
+															}
+															else
+															{
+																TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															}
+															monthTableClass[j].Rank = TempString;
 														}
-														else
+
+														//가격정보
+														if(mCostInfo_Enable == true)
 														{
-															TempString = TempString + imapRemotemeter.GetAttributeVal(i, "count_samesize");
+															if(imapRemotemeter.GetAttributeVal(i, "energy_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "energy_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "energy_price");
+																}
+															}
 														}
-														monthTableClass[j].Rank = TempString;
 													}
-
-													//가격정보
-													if(mCostInfo_Enable == true)
+													else
 													{
-														if(imapRemotemeter.GetAttributeVal(i, "energy_price") != null)
+														monthTableClass[j].Rank = "";
+														if ((imapRemotemeter.GetAttributeVal(i, "energy_used") != null))
 														{
-															if (imapRemotemeter.GetAttributeVal(i, "energy_price").equals("null") == true)
+															if (imapRemotemeter.GetAttributeVal(i, "energy_used").equals("1000000") == true)
 															{
-																monthTableClass[j].Price = "요금 정보 없음";
+																TempString = "- / -";
 															}
 															else
 															{
-																monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "energy_price");
+																TempString = imapRemotemeter.GetAttributeVal(i, "energy_used") + " / -";
+															}
+															monthTableClass[j].Use = TempString;
+														}
+
+														//가격정보
+														if(mCostInfo_Enable == true)
+														{
+															if(imapRemotemeter.GetAttributeVal(i, "energy_price") != null)
+															{
+																if (imapRemotemeter.GetAttributeVal(i, "energy_price").equals("null") == true)
+																{
+																	monthTableClass[j].Price = "요금 정보 없음";
+																}
+																else
+																{
+																	monthTableClass[j].Price = imapRemotemeter.GetAttributeVal(i, "energy_price");
+																}
 															}
 														}
 													}
 
+
 													monthTableClass[j].Goal = DBMGR.GetRemoteMeteringTargetValue(j);
 													DebugLogOutput("열량");
 													DebugLogOutput(monthTableClass[j].Use);