Procházet zdrojové kódy

1.修改Android Apex Drivers上传。

Pen Li před 7 roky
rodič
revize
b0e07cc194

+ 4 - 0
ApexDrivers/RAUtilsLibrary/src/main/java/com/usai/redant/rautils/Service/RAService.java

@@ -68,6 +68,10 @@ public abstract class RAService extends Service {
 
     private RAUploadManager uploadManager = null;
 
+    public RAUploadManager getUploadManager() {
+        return uploadManager;
+    }
+
     // sub function location
     LocationListener locationListener = null;
     LocationManager locationManager = null;

+ 3 - 1
ApexDrivers/RAUtilsLibrary/src/main/java/com/usai/redant/rautils/Utils/Network.java

@@ -272,7 +272,9 @@ public class Network {
         if(!file.exists())
         {
             String result="{\"result\":0,\"msg\":\"file does not exist\"}";
-            listener.onFinish(200,result);
+            if (listener != null) {
+                listener.onFinish(200,result);
+            }
 
             return result;
         }

+ 1 - 1
ApexDrivers/app/src/main/java/com/usai/redant/apexdrivers/ApexDriversBackgroundService.java

@@ -12,7 +12,7 @@ import org.json.JSONObject;
 
 public class ApexDriversBackgroundService extends RAService implements RAService.ServiceLocation, RAService.ServicePushNotification,RAService.ServiceUpload{
 
-    public RAUploadManager uploadManager = new RAUploadManager(ApexDriverApplication.sharedApplication().getApplicationContext());
+//    public RAUploadManager uploadManager = new RAUploadManager(ApexDriverApplication.sharedApplication().getApplicationContext());
 
     public ApexDriversBackgroundService() {
 

+ 2 - 0
ApexDrivers/app/src/main/java/com/usai/redant/apexdrivers/Detail/Model/DetailSubActionModel.java

@@ -16,6 +16,8 @@ public class DetailSubActionModel {
 
     public static class DetailActionSubType {
         public static final int DetailActionSubTypeEnum = 0;
+        public static final int DetailActionSubTypeAccept = 1;
+        public static final int DetailActionSubTypeReject = 2;
     }
 
     public int actionType;

+ 3 - 1
ApexDrivers/app/src/main/java/com/usai/redant/apexdrivers/Network/Network.java

@@ -333,7 +333,9 @@ public class Network extends com.usai.redant.rautils.Utils.Network {
     private static JSONObject fakeError() {
         try {
             return new JSONObject("{\n" +
-                    "  \"result\": 0\n" +
+                    "  \"container_photo_0\": \"12346798\",\n" +
+                    "  \"container_photo_1\": \"78945612\",\n" +
+                    "  \"result\": 2\n" +
                     "}");
         } catch (JSONException e) {
             e.printStackTrace();

+ 48 - 14
ApexDrivers/app/src/main/java/com/usai/redant/apexdrivers/Update/UpdateActivity.java

@@ -9,21 +9,22 @@ import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.database.Cursor;
-import android.graphics.BitmapFactory;
 import android.net.Uri;
 import android.os.Environment;
 import android.os.Handler;
 import android.os.Message;
 import android.provider.MediaStore;
+import android.support.v4.content.PermissionChecker;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
 import android.util.Log;
-import android.view.LayoutInflater;
+
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.widget.ExpandableListView;
+import android.widget.Toast;
 
 import com.usai.redant.apexdrivers.ApexDriverApplication;
 import com.usai.redant.apexdrivers.CodeScanner.CaptureActivity;
@@ -37,7 +38,6 @@ import com.usai.redant.apexdrivers.Update.Model.UpdatePhotoModel;
 import com.usai.redant.rautils.Receiver.RABroadcast;
 import com.usai.redant.rautils.Utils.FileManager;
 import com.usai.redant.rautils.Utils.ImageUtil;
-import com.usai.redant.rautils.Utils.Network;
 import com.usai.redant.rautils.Utils.RAUtil;
 
 import org.json.JSONArray;
@@ -97,6 +97,7 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
     private File photoFile = null;
 
     private ProgressDialog mProgressDialog;
+    private AlertDialog mDialog;
     private ArrayList<File> mPhotoArray = new ArrayList<>();// 用于直接返回后删除Photo文件
 
     @Override
@@ -176,6 +177,9 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
         super.onStop();
 
         dismissProgressDialog();
+        if (mDialog != null && mDialog.isShowing()) {
+            mDialog.dismiss();
+        }
     }
 
     @Override
@@ -396,7 +400,12 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
                             final int result = json.optInt("result",0);
                             if (result == RESULT_TRUE) {
 
-                                syncUploadPhotos(photoArr,json);
+                                if (photoArr.size() > 0) {
+                                    syncUploadPhotos(photoArr,json);
+                                } else {
+                                    dismissProgressDialog();
+                                    goHome();
+                                }
 
                             } else {
                                 dismissProgressDialog();
@@ -431,7 +440,7 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
             @Override
             public void run() {
                 int retryCount = 0;
-                ArrayList<UpdatePhotoModel> failedArr = new ArrayList<>();
+                ArrayList<UpdatePhotoModel> finishArr = new ArrayList<>();
                 for (int i = 0; i < photoArr.size(); i++) {
 
                     UpdatePhotoModel model = photoArr.get(i);
@@ -448,7 +457,6 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
                                 i--;
                                 retryCount++;
                                 if (retryCount >= 3) {
-                                    failedArr.add(model);
                                     break;
                                 }
                             } else {
@@ -458,27 +466,31 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
                                     photoFile.delete();
                                     ImageUtil.updateGallery(mCtx,model.photoPath);
                                 }
+                                finishArr.add(model);
                             }
                         } else {
                             // error
                             i--;
                             retryCount++;
                             if (retryCount >= 3) {
-                                failedArr.add(model);
                                 break;
                             }
                         }
                     }
                 }
 
-                final ArrayList<UpdatePhotoModel> uploadFaildArr = failedArr;
+                for (UpdatePhotoModel model : finishArr) {
+                    photoArr.remove(model);
+                }
+
+                final ArrayList<UpdatePhotoModel> uploadFaildArr = photoArr;
                 runOnUiThread(new Runnable() {
                     @Override
                     public void run() {
                         dismissProgressDialog();
                         if (uploadFaildArr.size() > 0) {
 
-                            new AlertDialog.Builder(mCtx)
+                            mDialog = new AlertDialog.Builder(mCtx)
                                     .setTitle("Warning")
                                     .setMessage("upload the photos failed,would you like to retry or do it background?")
                                     .setPositiveButton("Background", new DialogInterface.OnClickListener() {
@@ -526,8 +538,9 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
         ArrayList<Bundle> taskArr = new ArrayList<Bundle>();
         final ArrayList<UpdatePhotoModel> photoArr = photos;
 
-        String encryptUser = ApexDriverApplication.sharedApplication().encryptUser();
-        String encryptPwd = ApexDriverApplication.sharedApplication().encryptPassword();
+        Date currentTime = new Date();
+        SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/YYYY HH:mm");
+        String dateString = formatter.format(currentTime);
 
         for (int i = 0; i < photoArr.size(); i++) {
 
@@ -541,10 +554,11 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
                 task.putString("url","");
                 task.putString("order",mOrderID);
                 task.putString("action",getTitle().toString());
+                task.putString("time",dateString);
+                task.putString("name",model.title);
+
 
                 Bundle params = new Bundle();
-                params.putString("user",encryptUser);
-                params.putString("password",encryptPwd);
                 params.putString("platform","android");
                 params.putString("serial", serial);
 
@@ -614,7 +628,7 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
                     case UpdateBaseModel.UpdateTypePhoto: {
 
                         UpdatePhotoModel photoModel = (UpdatePhotoModel)baseModel;
-                        if (photoModel.photoPath != null && photoModel.key != null) {
+                        if (photoModel.photoPath != null && photoModel.photoPath.length() > 0 && photoModel.key != null) {
                             params.putString(photoModel.key,photoModel.getPhotoName());
 
                             photoArr.add(photoModel);
@@ -638,6 +652,14 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
         if (model == null) {
             return;
         }
+
+        if (PermissionChecker.checkSelfPermission(mCtx,Manifest.permission.CAMERA)!= PermissionChecker.PERMISSION_GRANTED) {
+
+            Toast.makeText(mCtx,"please allow app use camera",Toast.LENGTH_LONG).show();
+
+            return;
+        }
+
         mInputModel = model;
 
         Intent intent = new Intent();
@@ -669,6 +691,18 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
     private void startCamera()
     {
 
+        boolean cameraPermission = PermissionChecker.checkSelfPermission(mCtx,Manifest.permission.CAMERA) == PermissionChecker.PERMISSION_GRANTED;
+        boolean storageReadPermission = PermissionChecker.checkSelfPermission(mCtx,Manifest.permission.READ_EXTERNAL_STORAGE) == PermissionChecker.PERMISSION_GRANTED;
+        boolean storageWritePermission = PermissionChecker.checkSelfPermission(mCtx,Manifest.permission.WRITE_EXTERNAL_STORAGE) == PermissionChecker.PERMISSION_GRANTED;
+
+        if (!cameraPermission || !storageReadPermission || !storageWritePermission) {
+
+            Toast.makeText(mCtx,"please allow app use camera and storage",Toast.LENGTH_LONG).show();
+
+            return;
+        }
+
+
         Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
         // Ensure that there's a camera activity to handle the intent
 

+ 11 - 2
ApexDrivers/app/src/main/java/com/usai/redant/apexdrivers/Upload/UploadListActivity.java

@@ -118,6 +118,7 @@ public class UploadListActivity extends AppCompatActivity {
                         String name = taskinfo.getString("order","");
                         String action = taskinfo.getString("action","");
                         String time = taskinfo.getString("time");
+                        String photoName = taskinfo.getString("name");
 
                         holder.name_tv.setText(name);
                         holder.progressBar.setProgress((int)(100 *percent));
@@ -126,6 +127,7 @@ public class UploadListActivity extends AppCompatActivity {
                         holder.time_tv.setText(time);
                         holder.progress_tv.setText(String.format("%.2f%%",100*percent));
                         holder.err_tv.setText(err);
+                        holder.photoName_tv.setText(photoName);
                     }
 
                 }
@@ -179,10 +181,13 @@ public class UploadListActivity extends AppCompatActivity {
 
 
 
-                uploadManager = uploadServiceservice.uploadManager;
+                uploadManager = uploadServiceservice.getUploadManager();
+                if (uploadManager == null) {
+                    return;
+                }
                 uploadManager.uiUpdateListener = uiUpdateListener;
                 displaylist = (ArrayList<Bundle>) uploadManager.get_arr_queue().clone(); //uploadManager.arr_queue;
-
+                adapter.notifyDataSetChanged();
             }
 
             @Override
@@ -338,6 +343,7 @@ public class UploadListActivity extends AppCompatActivity {
             String name = item.getString("order","");
             String action = item.getString("action","");
             String time = item.getString("time");
+            String photoName = item.getString("name");
 
             View cell;
             ViewHolder holder;
@@ -351,6 +357,7 @@ public class UploadListActivity extends AppCompatActivity {
                 cell = View.inflate(getApplicationContext(),resourceId,null);
                 holder = new ViewHolder();
                 holder.name_tv = (TextView)cell.findViewById(R.id.upload_cell_title_tv);
+                holder.photoName_tv = cell.findViewById(R.id.upload_cell_name_tv);
                 holder.action_tv = cell.findViewById(R.id.upload_cell_action_tv);
                 holder.time_tv = cell.findViewById(R.id.upload_cell_time_tv);
                 holder.progressBar = (ProgressBar)cell.findViewById(R.id.upload_progressBar);
@@ -387,6 +394,7 @@ public class UploadListActivity extends AppCompatActivity {
             holder.state_tv.setText(status);
             holder.progress_tv.setText(String.format("%.2f%%",100*percent));
             holder.err_tv.setText(err);
+            holder.photoName_tv.setText(photoName);
 
 
 
@@ -396,6 +404,7 @@ public class UploadListActivity extends AppCompatActivity {
 
         private class ViewHolder {
             public TextView name_tv;
+            public TextView photoName_tv;
             public TextView action_tv;
             public TextView time_tv;
             public ProgressBar progressBar;

+ 15 - 2
ApexDrivers/app/src/main/res/layout/upload_cell.xml

@@ -13,11 +13,24 @@
         android:text="AFS20180530001200"
         />
 
+    <TextView
+        android:id="@+id/upload_cell_name_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@id/upload_cell_title_tv"
+        android:layout_alignRight="@id/upload_cell_title_tv"
+        android:layout_marginBottom="5dp"
+        android:layout_below="@id/upload_cell_title_tv"
+        android:textSize="17sp"
+        android:textColor="#000000"
+        android:text="Container Photo"
+        />
+
     <RelativeLayout
         android:id="@+id/upload_cell_line"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_below="@id/upload_cell_title_tv"
+        android:layout_below="@id/upload_cell_name_tv"
         android:layout_alignLeft="@id/upload_cell_title_tv"
         android:layout_alignRight="@id/upload_cell_title_tv"
         >
@@ -27,7 +40,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
-            android:textSize="17sp"
+            android:textSize="14sp"
             android:textColor="#000000"
             android:text="12/31/2018 24:05"
             />

+ 239 - 237
ApexDrivers/app/src/main/res/raw/fake_order_detail.json

@@ -1,239 +1,241 @@
 {
-    "result": 2,
-    "sections": [
-                 {
-                 "title": "Overview",
-                 "values": [
-                            {
-                            "title": "Order ID",
-                            "value": "201805300010",
-                            "type": 0
-                            },
-                            {
-                            "title": "Dispatcher",
-                            "value": "Jack",
-                            "type": 0
-                            },
-                            {
-                            "title": "Container No.",
-                            "value": "TCNU6432476",
-                            "type": 0
-                            },
-                            {
-                            "title": "Type",
-                            "value": "Pickup Order Import",
-                            "type": 0
-                            },
-                            {
-                            "title": "Status",
-                            "value": "C2-Delivered Empty",
-                            "type": 0
-                            },
-                            {
-                            "title": "Action",
-                            "value": "Delivered",
-                            "type": 0
-                            },
-                            {
-                            "title": "Instuctions",
-                            "value": "据知情人士介绍,微软公司最近就收购 GitHub 一事召开相关会议。这意味着双方再次开启多年以来断断续续的对话通道。\\\\n之所以选择这一时间,主要考虑到 GitHub 作为软件开发者群体中的高人气平台供应方,最近一直难以找到理想的 CEO 候选人。",
-                            "type": 0
-                            }
-                            ]
-                 },
-                 {
-                 "title": "Action",
-                 "values": [
-                            {
-                            "actions": [
-                                        {
-                                        "actionType": "0",
-                                        "actionTitle": "Reject",
-                                        "url": "",
-                                        "params": {
-                                        "action": "reject",
-                                        "orderID": "20180530001200"
-                                        }
-                                        },
-                                        {
-                                        "actionType": "0",
-                                        "actionTitle": "Accept",
-                                        "url": "",
-                                        "params": {
-                                        "action": "accept",
-                                        "orderID": "20180530001200"
-                                        }
-                                        },
-                                        {
-                                        "actionType": "1",
-                                        "actionTitle": "Update Action",
-                                        "actionSubType": "0",
-                                        "enums": [
-                                                  {
-                                                  "actionTitle": "Action 0",
-                                                  "actionID": "0"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 1",
-                                                  "actionID": "1"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 2",
-                                                  "actionID": "2"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 3",
-                                                  "actionID": "3"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 4",
-                                                  "actionID": "4"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 5",
-                                                  "actionID": "5"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 6",
-                                                  "actionID": "6"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 7",
-                                                  "actionID": "7"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 8",
-                                                  "actionID": "8"
-                                                  },
-                                                  {
-                                                  "actionTitle": "Action 9",
-                                                  "actionID": "9"
-                                                  }
-                                                  ]
-                                        }
-                                        ],
-                            "type": 2
-                            }
-                            ]
-                 },
-                 {
-                 "title": "Datetime",
-                 "values": [
-                            {
-                            "type": 1,
-                            "value": "DEMURRAGE LFD\n\nTERMINAL PICKUP APPT\n\nDELIVERY  APPT(setup wiwhse)\n\nPICKUP ON\n据知情人士介绍,微软公司最近就收购 GitHub 一事召开相关会议。这意味着双方再次开启多年以来断断续续的对话通道。\\n之所以选择这一时间,主要考虑到 GitHub 作为软件开发者群体中的高人气平台供应方,最近一直难以找到理想的 CEO 候选人。\\GitHub 公司 2015 年的估值为 20 亿美元,这主要归功于红杉资本为其砸下的 2.5 亿美元投资。此外,多位消息人士告诉我们,GitHub 方面的财务状况相当不错。然而,最终收购价格可能达到 50 亿美元甚至更高,而且考虑到谈判正在进行,目前尚不清楚微软是否愿意支付这么可观的价码。"
-                            }
-                            ]
-                 },
-                 {
-                 "title": "Container Info",
-                 "values": [
-                            {
-                            "type": 3,
-                            "title": "Pick Up",
-                            "location": "TRANS PACIFIC CONTAINER SERVICE\n\nBERTH 30 2800 7TH ST\n\nOAKLAND,CA\n\n"
-                            },
-                            {
-                            "title": "TEL",
-                            "value": "510-8600,FAX:510-8600",
-                            "type": 0
-                            },
-                            {
-                            "title": "EMAIL",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "ATTN",
-                            "value": "",
-                            "type": 0
-                            }
-                            ]
-                 },
-                 {
-                 "title": "Chasis Info",
-                 "values": [
-                            {
-                            "type": 3,
-                            "title": "Pick Up",
-                            "location": "TRANS PACIFIC CONTAINER SERVICE\n\nBERTH 30 2800 7TH ST\n\nOAKLAND,CA\n\n"
-                            },
-                            {
-                            "title": "TEL",
-                            "value": "510-8600,FAX:510-8600",
-                            "type": 0
-                            },
-                            {
-                            "title": "EMAIL",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "ATTN",
-                            "value": "",
-                            "type": 0
-                            }
-                            ]
-                 },
-                 {
-                 "title": "Container Info",
-                 "values": [
-                            {
-                            "title": "Container No.",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "Quantity",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "Size",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "Sch B No.",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "Value",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "Marks",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "Description",
-                            "value": "",
-                            "type": 0
-                            }
-                            ]
-                 },
-                 {
-                 "title": "File Info",
-                 "values": [
-                            {
-                            "title": "File No.",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "BOL No.",
-                            "value": "",
-                            "type": 0
-                            },
-                            {
-                            "title": "Shipper",
-                            "value": "",
-                            "type": 0
-                            }
-                            ]
-                 }
-                 ]
+  "result": 2,
+  "sections": [
+    {
+      "title": "Overview",
+      "values": [
+        {
+          "title": "Order ID",
+          "value": "201805300010",
+          "type": 0
+        },
+        {
+          "title": "Dispatcher",
+          "value": "Jack",
+          "type": 0
+        },
+        {
+          "title": "Container No.",
+          "value": "TCNU6432476",
+          "type": 0
+        },
+        {
+          "title": "Type",
+          "value": "Pickup Order Import",
+          "type": 0
+        },
+        {
+          "title": "Status",
+          "value": "C2-Delivered Empty",
+          "type": 0
+        },
+        {
+          "title": "Action",
+          "value": "Delivered",
+          "type": 0
+        },
+        {
+          "title": "Instuctions",
+          "value": "据知情人士介绍,微软公司最近就收购 GitHub 一事召开相关会议。这意味着双方再次开启多年以来断断续续的对话通道。\\\\n之所以选择这一时间,主要考虑到 GitHub 作为软件开发者群体中的高人气平台供应方,最近一直难以找到理想的 CEO 候选人。",
+          "type": 0
+        }
+      ]
+    },
+    {
+      "title": "Action",
+      "values": [
+        {
+          "actions": [
+            {
+              "actionType": "0",
+              "actionTitle": "Reject",
+              "actionSubType": "2",
+              "url": "",
+              "params": {
+                "action": "reject",
+                "orderID": "20180530001200"
+              }
+            },
+            {
+              "actionType": "0",
+              "actionSubType": "1",
+              "actionTitle": "Accept",
+              "url": "",
+              "params": {
+                "action": "accept",
+                "orderID": "20180530001200"
+              }
+            },
+            {
+              "actionType": "1",
+              "actionTitle": "Update Action",
+              "actionSubType": "0",
+              "enums": [
+                {
+                  "actionTitle": "Action 0",
+                  "actionID": "0"
+                },
+                {
+                  "actionTitle": "Action 1",
+                  "actionID": "1"
+                },
+                {
+                  "actionTitle": "Action 2",
+                  "actionID": "2"
+                },
+                {
+                  "actionTitle": "Action 3",
+                  "actionID": "3"
+                },
+                {
+                  "actionTitle": "Action 4",
+                  "actionID": "4"
+                },
+                {
+                  "actionTitle": "Action 5",
+                  "actionID": "5"
+                },
+                {
+                  "actionTitle": "Action 6",
+                  "actionID": "6"
+                },
+                {
+                  "actionTitle": "Action 7",
+                  "actionID": "7"
+                },
+                {
+                  "actionTitle": "Action 8",
+                  "actionID": "8"
+                },
+                {
+                  "actionTitle": "Action 9",
+                  "actionID": "9"
+                }
+              ]
+            }
+          ],
+          "type": 2
+        }
+      ]
+    },
+    {
+      "title": "Datetime",
+      "values": [
+        {
+          "type": 1,
+          "value": "DEMURRAGE LFD\n\nTERMINAL PICKUP APPT\n\nDELIVERY  APPT(setup wiwhse)\n\nPICKUP ON\n据知情人士介绍,微软公司最近就收购 GitHub 一事召开相关会议。这意味着双方再次开启多年以来断断续续的对话通道。\\n之所以选择这一时间,主要考虑到 GitHub 作为软件开发者群体中的高人气平台供应方,最近一直难以找到理想的 CEO 候选人。\\GitHub 公司 2015 年的估值为 20 亿美元,这主要归功于红杉资本为其砸下的 2.5 亿美元投资。此外,多位消息人士告诉我们,GitHub 方面的财务状况相当不错。然而,最终收购价格可能达到 50 亿美元甚至更高,而且考虑到谈判正在进行,目前尚不清楚微软是否愿意支付这么可观的价码。"
+        }
+      ]
+    },
+    {
+      "title": "Container Info",
+      "values": [
+        {
+          "type": 3,
+          "title": "Pick Up",
+          "location": "TRANS PACIFIC CONTAINER SERVICE\n\nBERTH 30 2800 7TH ST\n\nOAKLAND,CA\n\n"
+        },
+        {
+          "title": "TEL",
+          "value": "510-8600,FAX:510-8600",
+          "type": 0
+        },
+        {
+          "title": "EMAIL",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "ATTN",
+          "value": "",
+          "type": 0
+        }
+      ]
+    },
+    {
+      "title": "Chasis Info",
+      "values": [
+        {
+          "type": 3,
+          "title": "Pick Up",
+          "location": "TRANS PACIFIC CONTAINER SERVICE\n\nBERTH 30 2800 7TH ST\n\nOAKLAND,CA\n\n"
+        },
+        {
+          "title": "TEL",
+          "value": "510-8600,FAX:510-8600",
+          "type": 0
+        },
+        {
+          "title": "EMAIL",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "ATTN",
+          "value": "",
+          "type": 0
+        }
+      ]
+    },
+    {
+      "title": "Container Info",
+      "values": [
+        {
+          "title": "Container No.",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "Quantity",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "Size",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "Sch B No.",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "Value",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "Marks",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "Description",
+          "value": "",
+          "type": 0
+        }
+      ]
+    },
+    {
+      "title": "File Info",
+      "values": [
+        {
+          "title": "File No.",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "BOL No.",
+          "value": "",
+          "type": 0
+        },
+        {
+          "title": "Shipper",
+          "value": "",
+          "type": 0
+        }
+      ]
+    }
+  ]
 }

+ 90 - 90
ApexDrivers/app/src/main/res/raw/fake_order_edit.json

@@ -1,92 +1,92 @@
 {
-    "result": 2,
-    "sections": [
-                 {
-                 "title": "Update Action",
-                 "items": [
-                           {
-                           "type": 0,
-                           "title": "Order ID",
-                           "value": "AFS20180530001200"
-                           },
-                           {
-                           "type": 0,
-                           "title": "Dispatcher",
-                           "value": "Jack Li"
-                           },
-                           {
-                           "type": 0,
-                           "title": "Current Action",
-                           "value": "Delivered"
-                           },
-                           {
-                           "type": 1,
-                           "title": "File No.",
-                           "key": "file_no_0",
-                           "value": "AFS20180530001200",
-                           "scannable": true
-                           },
-                           {
-                           "type": 1,
-                           "title": "File No.",
-                           "key": "file_no_1",
-                           "value": "AFS20180530001200",
-                           "scannable": false
-                           },
-                           {
-                           "type": 2,
-                           "key": "instruction_0",
-                           "title": "Instruction",
-                           "value": "不同于一般的 bug,性能问题因为并没有统一的标准,而且与用户的机器环境相关性较大,所以往往是在产品上线后才被发现,也导致解决问题的周期很长。微信读书 1.3.0 版本之前,性能问题基本都来自于用户反馈(包括测试人员),受限于测试时间和用户反馈的积极性,性能问题往往到了比较严重的程度,开发人员才真正发现问题。\n\n但是,移动应用要保证良好的用户体验,产品在性能方面的表现极其重要。为了尽可能早、尽可能全面地收集产品的性能问题,就避免不了对产品做性能监控。我们主要从两个维度进行了监控"
-                           },
-                           {
-                           "type": 3,
-                           "key": "container_photo_0",
-                           "title": "Container Photo",
-                           "path": "photoPath"
-                           },
-                           {
-                           "type": 0,
-                           "title": "Order ID",
-                           "value": "AFS20180530001200"
-                           },
-                           {
-                           "type": 0,
-                           "title": "Dispatcher",
-                           "value": "Jack Li"
-                           },
-                           {
-                           "type": 0,
-                           "title": "Current Action",
-                           "value": "Delivered"
-                           },
-                           {
-                           "type": 1,
-                           "title": "File No.",
-                           "key": "file_no_2",
-                           "value": "AFS20180530001200",
-                           "scannable": true
-                           },
-                           {
-                           "type": 1,
-                           "title": "File No.",
-                           "key": "file_no_3",
-                           "value": "AFS20180530001200",
-                           "scannable": false
-                           },
-                           {
-                           "type": 2,
-                           "title": "Instruction",
-                           "key": "instruction_1",
-                           "value": "不同于一般的 bug,性能问题因为并没有统一的标准,而且与用户的机器环境相关性较大,所以往往是在产品上线后才被发现,也导致解决问题的周期很长。微信读书 1.3.0 版本之前,性能问题基本都来自于用户反馈(包括测试人员),受限于测试时间和用户反馈的积极性,性能问题往往到了比较严重的程度,开发人员才真正发现问题。\n\n但是,移动应用要保证良好的用户体验,产品在性能方面的表现极其重要。为了尽可能早、尽可能全面地收集产品的性能问题,就避免不了对产品做性能监控。我们主要从两个维度进行了监控"
-                           },
-                           {
-                           "type": 3,
-                           "key": "container_photo_1",
-                           "title": "Container Photo",
-                           "path": "photoPath"
-                           }
-                           ]
-                 }
-                 ]
+  "result": 2,
+  "sections": [
+    {
+      "title": "Update Action",
+      "items": [
+        {
+          "type": 0,
+          "title": "Order ID",
+          "value": "AFS20180530001200"
+        },
+        {
+          "type": 0,
+          "title": "Dispatcher",
+          "value": "Jack Li"
+        },
+        {
+          "type": 0,
+          "title": "Current Action",
+          "value": "Delivered"
+        },
+        {
+          "type": 1,
+          "title": "File No.",
+          "key": "file_no_0",
+          "value": "AFS20180530001200",
+          "scannable": true
+        },
+        {
+          "type": 1,
+          "title": "File No.",
+          "key": "file_no_1",
+          "value": "AFS20180530001200",
+          "scannable": false
+        },
+        {
+          "type": 2,
+          "key": "instruction_0",
+          "title": "Instruction",
+          "value": "不同于一般的 bug,性能问题因为并没有统一的标准,而且与用户的机器环境相关性较大,所以往往是在产品上线后才被发现,也导致解决问题的周期很长。微信读书 1.3.0 版本之前,性能问题基本都来自于用户反馈(包括测试人员),受限于测试时间和用户反馈的积极性,性能问题往往到了比较严重的程度,开发人员才真正发现问题。\n\n但是,移动应用要保证良好的用户体验,产品在性能方面的表现极其重要。为了尽可能早、尽可能全面地收集产品的性能问题,就避免不了对产品做性能监控。我们主要从两个维度进行了监控"
+        },
+        {
+          "type": 3,
+          "key": "container_photo_0",
+          "title": "Container Photo 0",
+          "path": "photoPath"
+        },
+        {
+          "type": 0,
+          "title": "Order ID",
+          "value": "AFS20180530001200"
+        },
+        {
+          "type": 0,
+          "title": "Dispatcher",
+          "value": "Jack Li"
+        },
+        {
+          "type": 0,
+          "title": "Current Action",
+          "value": "Delivered"
+        },
+        {
+          "type": 1,
+          "title": "File No.",
+          "key": "file_no_2",
+          "value": "AFS20180530001200",
+          "scannable": true
+        },
+        {
+          "type": 1,
+          "title": "File No.",
+          "key": "file_no_3",
+          "value": "AFS20180530001200",
+          "scannable": false
+        },
+        {
+          "type": 2,
+          "title": "Instruction",
+          "key": "instruction_1",
+          "value": "不同于一般的 bug,性能问题因为并没有统一的标准,而且与用户的机器环境相关性较大,所以往往是在产品上线后才被发现,也导致解决问题的周期很长。微信读书 1.3.0 版本之前,性能问题基本都来自于用户反馈(包括测试人员),受限于测试时间和用户反馈的积极性,性能问题往往到了比较严重的程度,开发人员才真正发现问题。\n\n但是,移动应用要保证良好的用户体验,产品在性能方面的表现极其重要。为了尽可能早、尽可能全面地收集产品的性能问题,就避免不了对产品做性能监控。我们主要从两个维度进行了监控"
+        },
+        {
+          "type": 3,
+          "key": "container_photo_1",
+          "title": "Container Photo 1",
+          "path": "photoPath"
+        }
+      ]
+    }
+  ]
 }