Parcourir la source

2.修改Android Apex Mobile数据库删除Result固定显示字段及更新最多显示三条。

Pen Li il y a 7 ans
Parent
commit
094b6e5d52
1 fichiers modifiés avec 13 ajouts et 10 suppressions
  1. 13 10
      ApexDrivers/apexmobile/src/main/java/com/usai/util/dbUtil.java

+ 13 - 10
ApexDrivers/apexmobile/src/main/java/com/usai/util/dbUtil.java

@@ -569,13 +569,6 @@ public class dbUtil
 
 	public static void deleteResultFields() {
 
-//		String booking_sql = "delete from fields_info where behavior = 1 and function_name = 'Ocean Booking' and name in ('booking_no','shipper','consignee','po_no','f_etd,m_eta','place_of_receipt_uncode','place_of_delivery_uncode');";
-//
-//		String bl_sql = "delete from fields_info where behavior = 1 and function_name = 'Ocean B/L info.' and name in ('last_status_315_code','shipper,consignee','h_bol,etd','eta,po_no','place_of_receipt_un','place_of_delivery_un');";
-//
-//		String cn_sql = "delete from fields_info where behavior = 1 and function_name = 'Container detail' and name in ('shipper','consignee','ctnr','file_no','po_no','etd','eta','fport_of_loading_un','mport_of_discharge_un');";
-
-
 		SQLiteDatabase db = OpenDB(ApexTrackingApplication.get_instance(), null, true);
 
 		deleteResultFields(db);
@@ -595,10 +588,20 @@ public class dbUtil
 
 	public static void deleteResultFields(SQLiteDatabase db) {
 
-		db.delete("fields_info", "behavior = 1 and function_name = 'Ocean Booking' and name in ('booking_no','shipper','consignee','po_no','f_etd,m_eta','place_of_receipt_uncode','place_of_delivery_uncode')", null);
-		db.delete("fields_info", "behavior = 1 and function_name = 'Ocean B/L info.' and name in ('last_status_315_code','shipper,consignee','h_bol,etd','eta,po_no','place_of_receipt_un','place_of_delivery_un')", null);
-		db.delete("fields_info", "behavior = 1 and function_name = 'Container detail' and name in ('shipper','consignee','ctnr','file_no','po_no','etd','eta','fport_of_loading_un','mport_of_discharge_un')", null);
+//		db.delete("fields_info", "behavior = 1 and function_name = 'Ocean Booking' and name in ('booking_no','shipper','consignee','po_no','f_etd,m_eta','place_of_receipt_uncode','place_of_delivery_uncode')", null);
+//		db.delete("fields_info", "behavior = 1 and function_name = 'Ocean B/L info.' and name in ('last_status_315_code','shipper,consignee','h_bol,etd','eta,po_no','place_of_receipt_un','place_of_delivery_un')", null);
+//		db.delete("fields_info", "behavior = 1 and function_name = 'Container detail' and name in ('shipper','consignee','ctnr','file_no','po_no','etd','eta','fport_of_loading_un','mport_of_discharge_un')", null);
+
+
+		String booking_sql = "delete from fields_info where behavior = 1 and function_name = 'Ocean Booking' and name in ('booking_no','shipper','consignee','po_no','f_etd','m_eta','place_of_receipt_uncode','place_of_delivery_uncode');";
+
+		String bl_sql = "delete from fields_info where behavior = 1 and function_name = 'Ocean B/L info.' and name in ('last_status_315_code','shipper','consignee','h_bol','etd','eta','po_no','place_of_receipt_un','place_of_delivery_un');";
+
+		String cn_sql = "delete from fields_info where behavior = 1 and function_name = 'Container detail' and name in ('shipper','consignee','ctnr','file_no','po_no','etd','eta','fport_of_loading_un','mport_of_discharge_un');";
 
+		db.execSQL(booking_sql);
+		db.execSQL(bl_sql);
+		db.execSQL(cn_sql);
 	}
 
 	public static void updateResultDisplayFields(SQLiteDatabase db) {