guilin 3 veckor sedan
förälder
incheckning
a660faa871

+ 3 - 2
app/src/main/java/com/fxy/base/CrashHandler.java

@@ -57,10 +57,11 @@ public class CrashHandler implements UncaughtExceptionHandler {
     public void sendError() {
         //先不发送
         try {
-            
+
             SharedPreferences sp = mContext.getSharedPreferences("errorInfo", Context.MODE_PRIVATE);
             String data = sp.getString("data", "");
-            XLog.e("崩溃信息:",data);
+            XLog.e("崩溃信息:");
+            XLog.e(data);
             if (!data.isEmpty()) {
                 JSONObject jsonObject = new JSONObject();
                 jsonObject.put("content",data);

+ 3 - 3
app/src/main/java/com/fxy/common/UploadDialog.java

@@ -4,6 +4,7 @@ package com.fxy.common;
 import android.app.Activity;
 import android.app.ProgressDialog;
 import android.content.DialogInterface;
+import android.widget.Toast;
 
 import com.fxy.baselibrary.bean.BaseEventBusBean;
 import com.fxy.constant.EventCode;
@@ -18,7 +19,6 @@ import java.util.Objects;
 public class UploadDialog {
     private OnEventCallback callback;
     private Activity mActivity;
-    private EventBus eventBus;
     private ProgressDialog progressDialog;
     private AsyncPictureUpload asyncPictureUpload ;
     private boolean currentUploadStatus = false;
@@ -92,8 +92,9 @@ public class UploadDialog {
             asyncPictureUpload.setStartUpload();
             currentUploadStatus = false;
         }
-        if (asyncPictureUpload.getAwaitUploadListNum()==0){
+        if (asyncPictureUpload.getAllAwaitNum()==0){
             progressDialog.dismiss();
+            Toast.makeText(mActivity, "已全部上传", Toast.LENGTH_SHORT).show();
         }
     }
 
@@ -107,7 +108,6 @@ public class UploadDialog {
 
 
     public void unregister() {
-        eventBus.unregister(this);
         if (asyncPictureUpload!=null){
             asyncPictureUpload.setStopUpload();
             asyncPictureUpload.removeHandler();

+ 7 - 4
app/src/main/java/com/fxy/detection/BoxPutInDetailsMainActivity.java

@@ -317,8 +317,11 @@ public class BoxPutInDetailsMainActivity extends  BaseActivity implements StoJNI
     }
 
     public HashMap<String, Object> getNotifyParam(){
-        postData.put("tracking_number",trackingBoxBean.getTrackingNumber().trim());
-        postData.put("box_number",trackingBoxBean.getBoxNumber().trim());
+        if (trackingBoxBean!=null){
+            postData.put("tracking_number",trackingBoxBean.getTrackingNumber());
+            postData.put("box_number",trackingBoxBean.getBoxNumber());
+        }
+
         postData.put("unit_code",etUnitCode.getText().toString().trim());
         return postData;
     }
@@ -816,8 +819,8 @@ public class BoxPutInDetailsMainActivity extends  BaseActivity implements StoJNI
             }
 
 
-            postParam.put("box_number",trackingBoxBean.getBoxNumber().trim());
-            postParam.put("tracking_number",trackingBoxBean.getTrackingNumber().trim());
+            postParam.put("box_number",trackingBoxBean.getBoxNumber());
+            postParam.put("tracking_number",trackingBoxBean.getTrackingNumber());
             postParam.put("unit_code",etUnitCode.getText().toString().trim());
 
             if (!customerCode.isEmpty()){

+ 10 - 3
app/src/main/java/com/fxy/detection/BoxPutInMainActivity.java

@@ -172,7 +172,7 @@ public class BoxPutInMainActivity extends  BaseActivity implements StoJNI.ScanCa
                 }
                 totalAwaitNum();
 
-                if (mapPictureSelector.get("label_img").getOssPhotoList().size()>0){
+                if (mapPictureSelector.get(currentPictureType).getOssPhotoList().size()>0){
                     //页面跳转
                     submitLabelImg();
                 }
@@ -850,7 +850,14 @@ public class BoxPutInMainActivity extends  BaseActivity implements StoJNI.ScanCa
 
         Gson gson = new Gson();
         Map<String,Object> math = new HashMap<>();
-        math.put("tracking_number",trackingBoxBean.getTrackingNumber().trim());
+
+        if (trackingBoxBean!=null && !trackingBoxBean.getTrackingNumber().isEmpty()){
+            math.put("tracking_number",trackingBoxBean.getTrackingNumber());
+        }else{
+            math.put("tracking_number",etTrackingNumber.getText().toString().trim());
+        }
+
+
 
 
         math.put("box_number",etOrderNumber.getText().toString().trim());
@@ -880,7 +887,7 @@ public class BoxPutInMainActivity extends  BaseActivity implements StoJNI.ScanCa
 
 
         OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_PUTIN).upJson(gson.toJson(math))
-                .execute(new MyDialogCallback(this, true, false) {
+                .execute(new MyDialogCallback(this, true, true) {
                     @Override
                     public void onSuccess(Response<String> response) {
                         super.onSuccess(response);

+ 4 - 1
app/src/main/java/com/fxy/detection/TrayMakeThirdMainActivity.java

@@ -367,7 +367,10 @@ public class TrayMakeThirdMainActivity extends BaseActivity implements StoJNI.Sc
         }
 
         Map<String,Object> math = new HashMap<>();
-        math.put("tracking_number",trayMakeBean.getTrackingNumber().trim());
+        if (trayMakeBean!=null){
+            math.put("tracking_number",trayMakeBean.getTrackingNumber());
+        }
+
         math.put("box_number",etOrderNumber.getText().toString().trim());
         math.put("is_check",1);
         math.put("ab_img_id",abImgId);

+ 4 - 1
baselibrary/src/main/java/com/fxy/baselibrary/base/BaseActivity.java

@@ -205,7 +205,9 @@ public abstract class BaseActivity extends SupportActivity implements Observer {
             //判断是否需要本地播放
             if(!voice.contains("http")){
                 int resourceId = RxTool.getResIdByName(this,voice,"raw");
-                playMusic(resourceId);
+                if (resourceId > 0){
+                    playMusic(resourceId);
+                }
                 return;
             }
 
@@ -216,6 +218,7 @@ public abstract class BaseActivity extends SupportActivity implements Observer {
             mediaPlayer.prepare();
             mediaPlayer.start();
 
+
         } catch (IOException e) {
             //XLog.e(e.getMessage());
             e.printStackTrace();

+ 1 - 1
config.gradle

@@ -8,7 +8,7 @@ ext {
             minSdkVersion    : 21,
             targetSdkVersion : 23,
             versionCode      : 1,
-            versionName      : "2.9.10",
+            versionName      : "2.9.11",
             versionApi       : "2.9",
             versionRealm     : 2,
     ]