guilin 3 місяців тому
батько
коміт
f675d93fa9

+ 4 - 0
app/src/main/java/com/fxy/base/CrashHandler.java

@@ -7,6 +7,7 @@ import android.content.pm.PackageManager;
 import android.os.Build;
 
 import com.alibaba.fastjson.JSONException;
+import com.elvishew.xlog.XLog;
 import com.fxy.BuildConfig;
 import com.fxy.baselibrary.util.RxTimeTool;
 import com.fxy.constant.SPCache;
@@ -56,8 +57,10 @@ 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);
             if (!data.isEmpty()) {
                 JSONObject jsonObject = new JSONObject();
                 jsonObject.put("content",data);
@@ -98,6 +101,7 @@ public class CrashHandler implements UncaughtExceptionHandler {
                     "崩溃原因:" + throwable.getMessage() + "\n\n" +
                     "详细信息:" + Arrays.toString(throwable.getStackTrace());
             sp.edit().putString("data", stringBuffer).apply();
+
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 2 - 1
app/src/main/java/com/fxy/common/AsyncFileUpload.java

@@ -326,10 +326,11 @@ public class AsyncFileUpload {
     }
 
     private RealmResults<AsyncUploadRealm> getBatchUploadRealm(Integer[] isFinish){
+        Integer[] pushStatus = {0,1};
         //更新值
         RealmResults<AsyncUploadRealm> realmResults  = mRealm.where(AsyncUploadRealm.class)
                 .equalTo("isDelete",0)
-                .equalTo("pushStatus",0)
+                .in("pushStatus",pushStatus)
                 .in("isFinish",isFinish)
 //                    .equalTo("notifyKey",fileKey)
 //                    .equalTo("uploadType",uploadType)

+ 6 - 0
app/src/main/java/com/fxy/common/AsyncPictureUpload.java

@@ -531,6 +531,12 @@ public class AsyncPictureUpload {
         // 遍历结果并修改
         for (AsyncUploadRealm item : realmResults) {
             item.setIsFinish(1);
+            //已重推失败需要重置
+            if (item.getPushStatus()==1){
+                item.setPushStatus(0);
+                item.setRePush(0);
+            }
+
         }
         realmResults.load();
         mRealm.commitTransaction();

+ 4 - 1
app/src/main/java/com/fxy/putIn/TallyPutInMainActivity.java

@@ -564,7 +564,10 @@ public class TallyPutInMainActivity extends  BaseActivity implements StoJNI.Scan
 
         Gson gson = new Gson();
         Map<String,Object> math = new HashMap<>();
-        math.put("pallet_code",tallyPutInBean.getPalletCode().trim());
+        if (tallyPutInBean!=null && tallyPutInBean.getPalletCode()!=null){
+            math.put("pallet_code",tallyPutInBean.getPalletCode());
+        }
+
 
 
         //面单

+ 3 - 1
app/src/main/java/com/fxy/service/UploadJobService.java

@@ -21,12 +21,14 @@ public class UploadJobService  extends JobService {
         // 2. 上传文件到OSS
 
         Context context = UploadContentProvider.getCurrentContext();
-        XLog.d("------------执行异步上传图片--------------------"+jobParameters.getJobId());
+
 
 
         asyncFileUpload = new AsyncFileUpload(context);
         Integer[] pushStatus = {0,1};
         int awaitNum = asyncFileUpload.getAllAwaitNum(pushStatus);
+
+        XLog.d("------------执行异步上传图片"+String.valueOf(awaitNum)+"--------------------"+jobParameters.getJobId());
         if (awaitNum == 0){
             // 标记任务为已完成(如果你不需要重试)
             jobFinished(jobParameters, false);

+ 1 - 1
config.gradle

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