Ver Fonte

The common library removes the editor, deletes the interface, and reimplements it in the project -- common library 去掉editor 删除接口,在项目内重新实现 (resolve: #14604)
ISF-> Party delete error -- ISF-> Party 删除报错 (resolve: #14603)

Ray Zhang há 4 anos atrás
pai
commit
ffd66a4e3c

+ 19 - 19
ApexDrivers/RAUtilsLibrary/src/main/java/com/usai/redant/rautils/utils/Network.java

@@ -1006,25 +1006,25 @@ public class Network {
             return null;
         }
     }
-    public static JSONObject delete_editor(String request_url,Bundle params) {
-
-        if (request_url == null || request_url.isEmpty() || params == null) {
-            return null;
-        }
-
-        String json_string = getJson(request_url,params,REQUEST_TIMEOUT);
-
-        if (json_string == null || json_string.isEmpty()) {
-            json_string = "{\"result\" : \"1\"}";
-        }
-
-        try {
-            return new JSONObject(json_string);
-        } catch (JSONException e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
+//    public static JSONObject delete_editor(String request_url,Bundle params) {
+//
+//        if (request_url == null || request_url.isEmpty() || params == null) {
+//            return null;
+//        }
+//
+//        String json_string = getJson(request_url,params,REQUEST_TIMEOUT);
+//
+//        if (json_string == null || json_string.isEmpty()) {
+//            json_string = "{\"result\" : \"1\"}";
+//        }
+//
+//        try {
+//            return new JSONObject(json_string);
+//        } catch (JSONException e) {
+//            e.printStackTrace();
+//            return null;
+//        }
+//    }
 //    public static JSONObject submit_editor(String request_url,Bundle params) {
 //
 //        if (request_url == null || request_url.isEmpty() || params == null) {

+ 20 - 0
ApexDrivers/ratradefiling/src/main/java/com/usai/ratradefiling/dataprovider/OnlineDataProvider.java

@@ -167,6 +167,26 @@ public class OnlineDataProvider extends com.usai.redant.rautils.utils.Network
 			return null;
 		}
 	}
+
+	public static JSONObject request_delete_editor(String request_url,Bundle params) {
+
+		if (request_url == null || request_url.isEmpty() || params == null) {
+			return null;
+		}
+
+		String json_string = getJson(request_url,params);
+
+		if (json_string == null || json_string.isEmpty()) {
+			json_string = "{\"result\" : \"1\"}";
+		}
+
+		try {
+			return new JSONObject(json_string);
+		} catch (JSONException e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
 	public static JSONObject request_save_editor(String request_url,Bundle params) {
 
 		if (request_url == null || request_url.isEmpty() || params == null) {

+ 1 - 1
ApexDrivers/ratradefiling/src/main/java/com/usai/ratradefiling/dataprovider/RADataProvider.java

@@ -35,7 +35,7 @@ public class RADataProvider {
             return OfflineDataProvider.delete_editor(url,param);
         }
         else {
-            return OnlineDataProvider.delete_editor(url,param);
+            return OnlineDataProvider.request_delete_editor(url,param);
         }
     }
     public static JSONObject submit_editor(String url,Bundle param)

+ 1 - 1
ApexDrivers/ratradefiling/src/main/java/com/usai/ratradefiling/tfeditor/TFEditorActivity.java

@@ -216,7 +216,7 @@ public class TFEditorActivity extends CommonEditorActivity
                     JSONObject params= jitem.optJSONObject("params");
 
                     RAUtil.mergeJson(upparams,params);
-                    final Bundle b=RAUtil.Json2Bundle(params);
+                    final Bundle b=RAUtil.Json2Bundle(upparams);
                     final ProgressDialog pd = RAUtil.waiting_alert(mCtx,"Deleting","please wait");
 
                     new Thread(new Runnable()