|
@@ -1110,4 +1110,51 @@
|
|
|
return dataStr;
|
|
|
}
|
|
|
|
|
|
++ (NSString *)uploadOrBackupsDoneBy:(NSString *)taskUid withFileName:(NSString *)fileName
|
|
|
+withType:(BOOL)isUploadType
|
|
|
+{
|
|
|
+ NSString *savePath = nil;
|
|
|
+ if(isUploadType){
|
|
|
+ NSString * uploadDefaultPath = [HWDataManager getStringWithKey:stringKeyAddSn(Const_photo_upload_default_path)];
|
|
|
+ if(!uploadDefaultPath || uploadDefaultPath.length == 0){
|
|
|
+ [HWDataManager setStringWithKey:stringKeyAddSn(Const_photo_upload_default_path) value:Const_default_upload_path];
|
|
|
+ uploadDefaultPath = Const_default_upload_path;
|
|
|
+ }
|
|
|
+
|
|
|
+ //判断最后一个是否是/
|
|
|
+ NSString *lastStr= [uploadDefaultPath substringFromIndex:uploadDefaultPath.length-1];
|
|
|
+ if(![lastStr isEqualToString:@"/"]){
|
|
|
+ uploadDefaultPath = [[NSString alloc] initWithFormat:@"%@/",uploadDefaultPath];
|
|
|
+ }
|
|
|
+
|
|
|
+ savePath = [[NSString alloc] initWithFormat:@"%@%@",uploadDefaultPath,fileName];
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ NSString * backupsDefaultPath = [HWDataManager getStringWithKey:stringKeyAddSn(Const_photo_backups_default_path)];
|
|
|
+
|
|
|
+ if(!backupsDefaultPath || backupsDefaultPath.length == 0){
|
|
|
+ backupsDefaultPath = Const_default_backups_path;
|
|
|
+ [HWDataManager setStringWithKey:stringKeyAddSn(Const_photo_backups_default_path) value:backupsDefaultPath];
|
|
|
+ }
|
|
|
+
|
|
|
+ NSString *lastStr= [backupsDefaultPath substringFromIndex:backupsDefaultPath.length-1];
|
|
|
+ if(![lastStr isEqualToString:@"/"]){
|
|
|
+ backupsDefaultPath = [[NSString alloc] initWithFormat:@"%@/",backupsDefaultPath];
|
|
|
+ }
|
|
|
+ savePath = [[NSString alloc] initWithFormat:@"%@%@",backupsDefaultPath,fileName];
|
|
|
+ }
|
|
|
+
|
|
|
+ NSString *dataStr =[NSString stringWithFormat:@"{\"data\":{\"taskUid\":\"%@\",\"filePath\":\"%@\"},\"type\":\"fileFinish\"}",taskUid,savePath];
|
|
|
+
|
|
|
+ if (USENEWCONTROLLCOMMONDNO500)
|
|
|
+ {
|
|
|
+// dataStr = [self commondAppendingHeadAndEndStrWithSourStr:dataStr];
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dataStr = [self commandAppending00StringWithSourStr:dataStr];
|
|
|
+ }
|
|
|
+
|
|
|
+ return dataStr;
|
|
|
+}
|
|
|
@end
|