|
@@ -4002,6 +4002,13 @@ public class iMapServer extends Service {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ ArrayList<String> roomNameList_light = null;
|
|
|
+ ArrayList<String> roomNameList_concent = null;
|
|
|
+ ArrayList<String> roomNameList_heating = null;
|
|
|
+ ArrayList<String> roomNameList_systemaircon = null;
|
|
|
+ ArrayList<String> roomNameList_purity = null;
|
|
|
+ ArrayList<String> roomNameList_shading = null;
|
|
|
+
|
|
|
public String ProcSetsetup(Document ele) {
|
|
|
Common.DebugLog("ProcSetsetup------------------------->");
|
|
|
String RetVal = XMLHeader + "<service type=\"reply\" name=\"set_setup_info\" result=";
|
|
@@ -4355,6 +4362,112 @@ public class iMapServer extends Service {
|
|
|
wdb.closeDB();
|
|
|
}
|
|
|
}
|
|
|
+ else if (afterTransactionTodoListData.Title.equals("방명칭편집_조명") || afterTransactionTodoListData.Title.equals("방명칭편집_콘센트") || afterTransactionTodoListData.Title.equals("방명칭편집_난방")
|
|
|
+ || afterTransactionTodoListData.Title.equals("방명칭편집_시스템에어컨") || afterTransactionTodoListData.Title.equals("방명칭편집_청정환기") || afterTransactionTodoListData.Title.equals("방명칭편집_차광")) {
|
|
|
+ String deviceType = afterTransactionTodoListData.ValueString;
|
|
|
+ Log.d(TAG, "[ProcSetsetup] deviceType [" + deviceType + "]");
|
|
|
+ WallpadStatusData wdb = new WallpadStatusData(getApplicationContext());
|
|
|
+ if (wdb != null) {
|
|
|
+ if (deviceType.equals(define.ROOM_NAME_LIGHT)) {
|
|
|
+ if (!wdb.GetRoomNameChangeByUser(deviceType)) {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Change LIGHT roomname by Manager!!! deviceType [" + deviceType + "]");
|
|
|
+ if (roomNameList_light != null) {
|
|
|
+ Log.d(TAG, "[ProcSetsetup] roomNameList_light = " + roomNameList_light.toString()); // debugging
|
|
|
+
|
|
|
+ String[] roomNameArr = roomNameList_light.toArray(new String[roomNameList_light.size()]);
|
|
|
+ wdb.SetDevRoomNameList(roomNameArr, deviceType);
|
|
|
+ wdb.SetRoomNameChangeByManager(1, deviceType);
|
|
|
+ if (roomNameList_light != null) roomNameList_light = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Do not change roomname cause change by User!!! deviceType [" + deviceType + "]");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (deviceType.equals(define.ROOM_NAME_CONCENT)) {
|
|
|
+ if (!wdb.GetRoomNameChangeByUser(deviceType)) {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Change CONCENT roomname by Manager!!! deviceType [" + deviceType + "]");
|
|
|
+ if (roomNameList_concent != null) {
|
|
|
+ Log.d(TAG, "[ProcSetsetup] roomNameList_concent = " + roomNameList_concent.toString()); // debugging
|
|
|
+
|
|
|
+ String[] roomNameArr = roomNameList_concent.toArray(new String[roomNameList_concent.size()]);
|
|
|
+ wdb.SetDevRoomNameList(roomNameArr, deviceType);
|
|
|
+ wdb.SetRoomNameChangeByManager(1, deviceType);
|
|
|
+ if (roomNameList_concent != null) roomNameList_concent = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Do not change roomname cause change by User!!! deviceType [" + deviceType + "]");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (deviceType.equals(define.ROOM_NAME_HEATING)) {
|
|
|
+ if (!wdb.GetRoomNameChangeByUser(deviceType)) {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Change HEATING roomname by Manager!!! deviceType [" + deviceType + "]");
|
|
|
+ if (roomNameList_heating != null) {
|
|
|
+ Log.d(TAG, "[ProcSetsetup] roomNameList_heating = " + roomNameList_heating.toString()); // debugging
|
|
|
+
|
|
|
+ String[] roomNameArr = roomNameList_heating.toArray(new String[roomNameList_heating.size()]);
|
|
|
+ wdb.SetDevRoomNameList(roomNameArr, deviceType);
|
|
|
+ wdb.SetRoomNameChangeByManager(1, deviceType);
|
|
|
+ if (roomNameList_heating != null) roomNameList_heating = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Do not change roomname cause change by User!!! deviceType [" + deviceType + "]");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (deviceType.equals(define.ROOM_NAME_SYSTEMAIRCON)) {
|
|
|
+ if (!wdb.GetRoomNameChangeByUser(deviceType)) {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Change SYSTEM AIRCON roomname by Manager!!! deviceType [" + deviceType + "]");
|
|
|
+ if (roomNameList_systemaircon != null) {
|
|
|
+ Log.d(TAG, "[ProcSetsetup] roomNameList_systemaircon = " + roomNameList_systemaircon.toString()); // debugging
|
|
|
+
|
|
|
+ String[] roomNameArr = roomNameList_systemaircon.toArray(new String[roomNameList_systemaircon.size()]);
|
|
|
+ wdb.SetDevRoomNameList(roomNameArr, deviceType);
|
|
|
+ wdb.SetRoomNameChangeByManager(1, deviceType);
|
|
|
+ if (roomNameList_systemaircon != null) roomNameList_systemaircon = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Do not change roomname cause change by User!!! deviceType [" + deviceType + "]");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ else if (deviceType.equals(define.ROOM_NAME_PURITY)) {
|
|
|
+ if (!wdb.GetRoomNameChangeByUser(deviceType)) {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Change PURITY roomname by Manager!!! deviceType [" + deviceType + "]");
|
|
|
+ if (roomNameList_purity != null) {
|
|
|
+ Log.d(TAG, "[ProcSetsetup] roomNameList_purity = " + roomNameList_purity.toString()); // debugging
|
|
|
+
|
|
|
+ String[] roomNameArr = roomNameList_purity.toArray(new String[roomNameList_purity.size()]);
|
|
|
+ wdb.SetDevRoomNameList(roomNameArr, deviceType);
|
|
|
+ wdb.SetRoomNameChangeByManager(1, deviceType);
|
|
|
+ if (roomNameList_purity != null) roomNameList_purity = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Do not change roomname cause change by User!!! deviceType [" + deviceType + "]");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (deviceType.equals(define.ROOM_NAME_SHADING)) {
|
|
|
+ if (!wdb.GetRoomNameChangeByUser(deviceType)) {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Change SHADING roomname by Manager!!! deviceType [" + deviceType + "]");
|
|
|
+ if (roomNameList_shading != null) {
|
|
|
+ Log.d(TAG, "[ProcSetsetup] roomNameList_shading = " + roomNameList_shading.toString()); // debugging
|
|
|
+
|
|
|
+ String[] roomNameArr = roomNameList_shading.toArray(new String[roomNameList_shading.size()]);
|
|
|
+ wdb.SetDevRoomNameList(roomNameArr, deviceType);
|
|
|
+ wdb.SetRoomNameChangeByManager(1, deviceType);
|
|
|
+ if (roomNameList_shading != null) roomNameList_shading = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ Log.w(TAG, "[ProcSetsetup] Do not change roomname cause change by User!!! deviceType [" + deviceType + "]");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ wdb.closeDB();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|