|
|
@@ -509,6 +509,17 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
+-(void)nodeProfileUpdate
|
|
|
+{
|
|
|
+ SocketRequestModel *request = [[SocketRequestModel alloc] initWithMsgType:MSG_TYPE_NODE_PROFILE_UPDATE];
|
|
|
+ NSDictionary *param = @{@"device_id":_refDevice.deviceId,
|
|
|
+ @"node_id":_refDevice.nodeId,
|
|
|
+ @"cust_id": [[JDFacade facade].loginUser custId],
|
|
|
+ @"ctrt_grp_id": [[JDFacade facade].loginUser ctrtGrpId]};
|
|
|
+ [request setRequestMsg:param];
|
|
|
+ [self sendDataToSocket:request modelClass:[CommandModel class] isLoading:YES];
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark - MoreButtonDelegate
|
|
|
-(void)moreBtnAction:(id)sender
|
|
|
{
|
|
|
@@ -546,7 +557,12 @@
|
|
|
[self toggleOptionsWithArray:sender btnArray:_moreBtnArray];
|
|
|
}
|
|
|
- (IBAction)btnUpdateTouched:(id)sender {
|
|
|
- NSLog(@"업데이트");
|
|
|
+ [[JDFacade facade] confirmTitle:@"장치 업데이트" message:@"지금 장치를 최신 버전으로\n업데이트 하시겠습니까?" btnOKLabel:@"예" btnCancelLabel:@"아니오" completion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
|
|
|
+ if (buttonIndex == 0) {
|
|
|
+ [self nodeProfileUpdate];
|
|
|
+ }
|
|
|
+ }];
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- (IBAction)btnCloseTouched:(id)sender {
|
|
|
@@ -576,6 +592,15 @@
|
|
|
[self requestDeviceDetail:@NO];
|
|
|
}
|
|
|
}
|
|
|
+ if ([result.messageType isEqualToString:MSG_TYPE_NODE_PROFILE_UPDATE_RES]) {
|
|
|
+// ContentModel *response = [[ContentModel alloc] initWithDictionary:notification.object error:nil];
|
|
|
+ if (result.isSuccess) {
|
|
|
+ NSLog(@"Resutl : %@", result);
|
|
|
+ } else {
|
|
|
+ [[JDFacade facade] alertTitle:nil message:result.resultMsg];
|
|
|
+ }
|
|
|
+// NSLog(@"Response : %@", result);
|
|
|
+ }
|
|
|
// else if ([result.messageType isEquestToIgnoreCase:MSG_TYPE_NODE_COMMAND_RES]) {
|
|
|
//
|
|
|
// }
|