Selaa lähdekoodia

修复分拆批次闪退问题,增加IQC检验及相关功能,IQC入库界面检验结果和审核按钮功能调整,增加接口日志功能

songw 3 kuukautta sitten
vanhempi
commit
ff2c398083

+ 3 - 3
app/build.gradle

@@ -175,9 +175,9 @@ dependencies {
     implementation 'com.permissionx.guolindev:permissionx:1.3.0'
 
     // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
-//    implementation 'com.umeng.umsdk:common:9.4.4' //(必选)
-//    implementation 'com.umeng.umsdk:asms:1.4.1' // asms包依赖(必选)
-//    implementation 'com.umeng.umsdk:apm:1.5.2' // U-APM包依赖(必选) 错误分析升级为独立SDK,看crash数据请一定集成
+    implementation 'com.umeng.umsdk:common:9.4.4' //(必选)
+    implementation 'com.umeng.umsdk:asms:1.4.1' // asms包依赖(必选)
+    implementation 'com.umeng.umsdk:apm:1.5.2' // U-APM包依赖(必选) 错误分析升级为独立SDK,看crash数据请一定集成
 
 
     implementation 'org.greenrobot:eventbus:3.1.1'  //eventBus

+ 39 - 26
app/src/main/java/uas/erp/jiaweisi_wms/application/PdaApplication.java

@@ -1,4 +1,4 @@
-           package uas.erp.jiaweisi_wms.application;
+package uas.erp.jiaweisi_wms.application;
 
 import android.app.Activity;
 import android.app.Application;
@@ -12,7 +12,8 @@ import android.util.Log;
 import com.android.volley.RequestQueue;
 import com.android.volley.toolbox.Volley;
 import com.facebook.stetho.Stetho;
-
+import com.umeng.analytics.MobclickAgent;
+import com.umeng.commonsdk.UMConfigure;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -38,6 +39,7 @@ import uas.erp.jiaweisi_wms.tools.VolleyUtil;
 import uas.erp.jiaweisi_wms.util.AndroidUtil;
 import uas.erp.jiaweisi_wms.util.Constants;
 import uas.erp.jiaweisi_wms.util.FakeX509TrustManager;
+import uas.erp.jiaweisi_wms.util.MyLog;
 import uas.erp.jiaweisi_wms.util.SoundUtil;
 
 /**
@@ -54,6 +56,7 @@ public class PdaApplication extends Application {
     public static int mVersionCode = 1;
     private static final long COUNTDOWN_INTERVAL = 1000; // 1 second
     private static final long COUNTDOWN_TIME = 10 * 60 * 1000; //
+
     @Override
     public void onCreate() {
         super.onCreate();
@@ -97,8 +100,17 @@ public class PdaApplication extends Application {
         mSoundMap.put(SoundUtil.SOUND_TETHYS, mSoundPool.load(this, R.raw.tethys, 1));
         mSoundMap.put(SoundUtil.SOUND_TITAN, mSoundPool.load(this, R.raw.titan, 1));
         //友盟统计SDK
-        //initUmeng();
+        initUmeng();
+
+        //删除非当天的Log日志, Android8.0以下用不了
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+            MyLog.delNotDayFile();
+        } else {
+            MyLog.isFileCreatedTodayDel();
+        }
+
     }
+
     private CountDownTimer countDownTimer = new CountDownTimer(COUNTDOWN_TIME, COUNTDOWN_INTERVAL) {
 
         @Override
@@ -115,12 +127,12 @@ public class PdaApplication extends Application {
         public void onFinish() {
             // 倒计时完成时的操作
             // 更新UI
-            Activity activity=new Activity();
+            Activity activity = new Activity();
             String maName = SharedPreUtil.getString(activity, Constants.FLAG.ACCOUNT_NAME_CACHE, null);
             String userName = SharedPreUtil.getString(activity, "userNames", null);
             String password = SharedPreUtil.getString(activity, "passwords", null);
             VolleyUtil.requestUserLogin(activity, GloableParams.ADDRESS_LOGIN_APPLY, VolleyUtil.METHOD_POST,
-            VolleyUtil.FRAGMENT_LOGIN, maName, userName, password);
+                    VolleyUtil.FRAGMENT_LOGIN, maName, userName, password);
             Log.d("Countdown结束", "Countdown finished.");
             startCountdown();
         }
@@ -134,26 +146,26 @@ public class PdaApplication extends Application {
         countDownTimer.cancel();
     }
 
-//    private void initUmeng() {
-//        //2.在Application.oncreate()中调用预初始化函数
-//        UMConfigure.preInit(this, "68a571e5e563686f4283e880","umeng");
-//        UMConfigure.setLogEnabled(true);
-//        //3.客户端用户同意隐私政策后,正式初始化友盟+SDK
-//        UMConfigure.init(
-//                this,
-//                "68a571e5e563686f4283e880",
-//                "umeng",
-//                UMConfigure.DEVICE_TYPE_PHONE, ""
-//        );
-//        // 页面数据采集模式
-//        // setPageCollectionMode接口参数说明:
-//        // 1. MobclickAgent.PageMode.AUTO: 建议大多数用户使用本采集模式,SDK在此模式下自动采集Activity
-//        // 页面访问路径,开发者不需要针对每一个Activity在onResume/onPause函数中进行手动埋点。在此模式下,
-//        // 开发者如需针对Fragment、CustomView等自定义页面进行页面统计,直接调用MobclickAgent.onPageStart/
-//        // MobclickAgent.onPageEnd手动埋点即可。此采集模式简化埋点工作,唯一缺点是在Android 4.0以下设备中
-//        // 统计不到Activity页面数据和各类基础指标(提示:目前Android 4.0以下设备市场占比已经极小)。
-//        MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
-//    }
+    private void initUmeng() {
+        //2.在Application.oncreate()中调用预初始化函数
+        UMConfigure.preInit(this, "68a571e5e563686f4283e880", "umeng");
+        UMConfigure.setLogEnabled(true);
+        //3.客户端用户同意隐私政策后,正式初始化友盟+SDK
+        UMConfigure.init(
+                this,
+                "68a571e5e563686f4283e880",
+                "umeng",
+                UMConfigure.DEVICE_TYPE_PHONE, ""
+        );
+        // 页面数据采集模式
+        // setPageCollectionMode接口参数说明:
+        // 1. MobclickAgent.PageMode.AUTO: 建议大多数用户使用本采集模式,SDK在此模式下自动采集Activity
+        // 页面访问路径,开发者不需要针对每一个Activity在onResume/onPause函数中进行手动埋点。在此模式下,
+        // 开发者如需针对Fragment、CustomView等自定义页面进行页面统计,直接调用MobclickAgent.onPageStart/
+        // MobclickAgent.onPageEnd手动埋点即可。此采集模式简化埋点工作,唯一缺点是在Android 4.0以下设备中
+        // 统计不到Activity页面数据和各类基础指标(提示:目前Android 4.0以下设备市场占比已经极小)。
+        MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
+    }
 
     @Override
     public void onTerminate() {
@@ -167,6 +179,7 @@ public class PdaApplication extends Application {
 
     /**
      * 获取本地缓存
+     *
      * @param key
      * @return
      */
@@ -221,7 +234,7 @@ public class PdaApplication extends Application {
         SSLSocketFactory factory = null;
         try {
             cf = CertificateFactory.getInstance("X.509");
-//            InputStream caInput = new ByteArrayInputStream(load.getBytes());
+            //            InputStream caInput = new ByteArrayInputStream(load.getBytes());
             InputStream caInput = new ByteArrayInputStream("".getBytes());
             java.security.cert.Certificate ca = null;
             try {

+ 1 - 1
app/src/main/java/uas/erp/jiaweisi_wms/bean/WHMakeMaterialProduct.java

@@ -14,7 +14,7 @@ public class WHMakeMaterialProduct {
     private String REMAIN;
     private String MADEDATE;
 
-    private String PR_CODE;
+    private String PR_CODE;     //物料编号
 
     private String QTY;
 

+ 0 - 1
app/src/main/java/uas/erp/jiaweisi_wms/fragment/NewBePutInStorageOrderDetailFragment.java

@@ -262,7 +262,6 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
                         for (int i = 0; i < dataArray.size(); i++) {
                             JSONObject dataObject = dataArray.getJSONObject(i);
                             if (dataObject != null) {
-
                                 CollectListBean collectListBean = new CollectListBean();
                                 collectListBean.setPIM_TYPE(FastjsonUtil.getText(dataObject, "PIM_TYPE"));
                                 collectListBean.setCONTENT(FastjsonUtil.getText(dataObject, "CONTENT"));

+ 5 - 5
app/src/main/java/uas/erp/jiaweisi_wms/fragment/StorageInFragment.java

@@ -72,11 +72,11 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
 //                        //送检
 //                        mFragment = new StorageInspectionFragment();
 //                        break;
-//                    case GloableParams.MENU_STORAGE_IQC_STORAGE_IN:
-//                        //IQC入库
-////                        mFragment = new StorageIQCInFragment();
-//                        mFragment = new StorageTwoIQCInFragment();
-//                        break;
+                    case GloableParams.MENU_STORAGE_IQC_STORAGE_IN:
+                        //IQC入库
+//                        mFragment = new StorageIQCInFragment();
+                        mFragment = new StorageTwoIQCInFragment();
+                        break;
 //                    case GloableParams.MENU_STORAGE_MATERIAL_STORAGE_IN:
 //                        //单据入库
 //                        mFragment = new MaterialStorageFragment();

+ 0 - 3
app/src/main/java/uas/erp/jiaweisi_wms/fragment/StorageTwoIQCInFragment.java

@@ -166,9 +166,6 @@ public class StorageTwoIQCInFragment extends BaseFragment implements View.OnClic
         rb_no = root.findViewById(R.id.rb_no);
         btn_shen = root.findViewById(R.id.btn_shen);
 
-
-
-
         mCaptionValueBeans = new ArrayList<>();
         mCaptionValueItemAdapter = new CaptionValueItemAdapter(mActivity, mCaptionValueBeans);
         mDataListView.setAdapter(mCaptionValueItemAdapter);

+ 4 - 4
app/src/main/java/uas/erp/jiaweisi_wms/fragment/VersionUpgradeFragment.java

@@ -82,16 +82,16 @@ public class VersionUpgradeFragment extends BaseFragment implements ProgressResp
 
 //                File directory = new File(APK_FILE_PATH);
                 String filesDir = getActivity().getFilesDir().getAbsolutePath();
-                File directory = new File(filesDir + "/punaier_wms/apk");
+                File directory = new File(filesDir + "/jiaweisi_wms/apk");
                 if (!directory.exists() && !directory.isDirectory()) {
                     boolean mkdirs = directory.mkdirs();
                 } else {
 //                    FileUtils.delAllFile(APK_FILE_PATH);
-                    FileUtils.delAllFile(directory + "/punaier_wms/apk");
+                    FileUtils.delAllFile(directory + "/jiaweisi_wms/apk");
                 }
 
 //                file = new File(APK_FILE_PATH, APK_FILE_NAME);
-                file = new File(filesDir + "/punaier_wms/apk", APK_FILE_NAME);
+                file = new File(filesDir + "/jiaweisi_wms/apk", APK_FILE_NAME);
 
                 try {
                     file.createNewFile();
@@ -233,7 +233,7 @@ public class VersionUpgradeFragment extends BaseFragment implements ProgressResp
                     try {
 //                        File apk = new File(APK_FILE_PATH, APK_FILE_NAME);
                         String filesDir = getActivity().getFilesDir().getAbsolutePath();
-                        File apk = new File(filesDir + "/punaier_wms/apk", APK_FILE_NAME);
+                        File apk = new File(filesDir + "/jiaweisi_wms/apk", APK_FILE_NAME);
                         Intent intent = new Intent(Intent.ACTION_VIEW);
                         if (Build.VERSION.SDK_INT >= 24) {
                             Uri apkUri = FileProvider.getUriForFile(mActivity,

+ 56 - 122
app/src/main/java/uas/erp/jiaweisi_wms/fragment/WHBreakingBatchFragment.java

@@ -13,7 +13,6 @@ import android.os.Message;
 import android.text.Editable;
 import android.text.TextUtils;
 import android.text.TextWatcher;
-import android.util.Log;
 import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
@@ -47,22 +46,15 @@ import org.json.JSONException;
 import org.json.JSONObject;
 
 import java.io.File;
-import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
-import okhttp3.Call;
-import okhttp3.Callback;
-import okhttp3.FormBody;
 import okhttp3.OkHttpClient;
-import okhttp3.RequestBody;
 import uas.erp.jiaweisi_wms.R;
 import uas.erp.jiaweisi_wms.activity.FunctionActivity;
 import uas.erp.jiaweisi_wms.bean.WHBreakingBatchBreakingBtnClickEvent;
@@ -75,10 +67,13 @@ import uas.erp.jiaweisi_wms.util.CommonUtil;
 import uas.erp.jiaweisi_wms.util.Constants;
 import uas.erp.jiaweisi_wms.util.FileUtils;
 import uas.erp.jiaweisi_wms.util.FragmentUtils;
+import uas.erp.jiaweisi_wms.util.HttpCallback;
+import uas.erp.jiaweisi_wms.util.HttpParams;
 import uas.erp.jiaweisi_wms.util.JsonTools;
 import uas.erp.jiaweisi_wms.util.JsonUtils;
 import uas.erp.jiaweisi_wms.util.LogUtil;
 import uas.erp.jiaweisi_wms.util.PrintUtils;
+import uas.erp.jiaweisi_wms.util.VolleyRequest;
 import uas.erp.jiaweisi_wms.view.ClearableEditText;
 
 /**
@@ -265,17 +260,17 @@ public class WHBreakingBatchFragment extends BaseFragment implements View.OnClic
                         return true;
                     }
 
-//                    if (!str.matches(Constants.REGEX.NO_CN_SYMBOL)) {
-//                        CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
-//                        etOrBarcode.setText("");
-//                        etOrBarcode.postDelayed(new Runnable() {
-//                            @Override
-//                            public void run() {
-//                                etOrBarcode.requestFocus();
-//                            }
-//                        }, 100);
-//                        return true;
-//                    }
+                    //                    if (!str.matches(Constants.REGEX.NO_CN_SYMBOL)) {
+                    //                        CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
+                    //                        etOrBarcode.setText("");
+                    //                        etOrBarcode.postDelayed(new Runnable() {
+                    //                            @Override
+                    //                            public void run() {
+                    //                                etOrBarcode.requestFocus();
+                    //                            }
+                    //                        }, 100);
+                    //                        return true;
+                    //                    }
 
                     CommonUtil.closeKeybord(etOrBarcode, mActivity);
                     //请求详细数据
@@ -475,14 +470,14 @@ public class WHBreakingBatchFragment extends BaseFragment implements View.OnClic
                     Toast.makeText(getActivity().getApplicationContext(), "还有必填项值为空", Toast.LENGTH_SHORT).show();
                     return;
                 }
-//                if (!etOrBarcode.getText().toString().trim().matches(Constants.REGEX.NO_CN_SYMBOL)) {
-//                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
-//                    return;
-//                }
-//                if (!str.matches(Constants.REGEX.NO_CN_SYMBOL)) {
-//                    CommonUtil.toastNoRepeat(getActivity(), "请输入正确的拆分数量");
-//                    return;
-//                }
+                //                if (!etOrBarcode.getText().toString().trim().matches(Constants.REGEX.NO_CN_SYMBOL)) {
+                //                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
+                //                    return;
+                //                }
+                //                if (!str.matches(Constants.REGEX.NO_CN_SYMBOL)) {
+                //                    CommonUtil.toastNoRepeat(getActivity(), "请输入正确的拆分数量");
+                //                    return;
+                //                }
                 if (!str.matches(Constants.REGEX.IS_FLOAT)) {
                     Toast.makeText(getActivity(), "请输入正确的拆分数量", Toast.LENGTH_SHORT).show();
                     return;
@@ -588,17 +583,17 @@ public class WHBreakingBatchFragment extends BaseFragment implements View.OnClic
                         return;
                     }
 
-//                    if (!str.matches(Constants.REGEX.NO_CN_SYMBOL)) {
-//                        CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
-//                        etOrBarcode.setText("");
-//                        etOrBarcode.postDelayed(new Runnable() {
-//                            @Override
-//                            public void run() {
-//                                etOrBarcode.requestFocus();
-//                            }
-//                        }, 100);
-//                        return;
-//                    }
+                    //                    if (!str.matches(Constants.REGEX.NO_CN_SYMBOL)) {
+                    //                        CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
+                    //                        etOrBarcode.setText("");
+                    //                        etOrBarcode.postDelayed(new Runnable() {
+                    //                            @Override
+                    //                            public void run() {
+                    //                                etOrBarcode.requestFocus();
+                    //                            }
+                    //                        }, 100);
+                    //                        return;
+                    //                    }
 
                     CommonUtil.closeKeybord(etOrBarcode, mActivity);
                     //请求详细数据
@@ -670,104 +665,43 @@ public class WHBreakingBatchFragment extends BaseFragment implements View.OnClic
     private void breakingBtnClickEvent() {
         messages.clear();
         progressDialog.show();
-        String url = GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT;
-        Log.d("breakDeal", url);
-
-        RequestBody requestBody = new FormBody.Builder()
-                .add("or_barcode", etOrBarcode.getText().toString().trim())
-                .add("or_remain", tvOrRemain.getText().toString().trim())
-                .add("bar_remain", etBarRemain.getText().toString().trim())
-                .build();
-
-        okhttp3.Request.Builder builder = new okhttp3.Request.Builder().url(url).post(requestBody);
-
-        Map<String, String> cookiesMap = VolleyUtil.getVolleyUtil().setCookies();
-        if (cookiesMap != null) {
-            Set<String> keys = cookiesMap.keySet();
-            Iterator<String> iterator = keys.iterator();
-            while (iterator.hasNext()) {
-                String key = iterator.next();
-                String value = cookiesMap.get(key);
-                builder.addHeader(key, value);
-            }
-        }
-
-        mRequest = builder.build();
-        mOkHttpClient.newCall(mRequest).enqueue(new Callback() {
-            @Override
-            public void onFailure(Call call, IOException e) {
-                progressDialog.dismiss();
-                Message message = Message.obtain();
-                message.what = SPLIT_BARCODE_FAIL;
-                message.obj = "{\"exceptionInfo\":\"条码拆分异常\"}";
-                mHandler.sendMessage(message);
-            }
 
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT)
+                .method(Request.Method.POST)
+                .tag(GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT)
+                .flag(0)
+                .addParam("or_barcode", etOrBarcode.getText().toString().trim())
+                .addParam("or_remain", tvOrRemain.getText().toString().trim())
+                .addParam("bar_remain", etBarRemain.getText().toString().trim())
+                .build(), new HttpCallback() {
             @Override
-            public void onResponse(Call call, okhttp3.Response response) throws IOException {
+            public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
-                String s = response.body().string();
-                if (response.code() == 200) {
+                String result = o.toString();
+                com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
+                if (resultObject != null && resultObject.getBoolean("success")) {
                     Message message = Message.obtain();
                     message.what = SPLIT_BARCODE_SUCCESS;
-                    message.obj = s;
+                    message.obj = result;
                     mHandler.sendMessage(message);
                 } else {
                     Message message = Message.obtain();
                     message.what = SPLIT_BARCODE_FAIL;
-                    message.obj = s;
+                    message.obj = result;
                     mHandler.sendMessage(message);
                 }
             }
-        });
 
-        /*PdaApplication.mRequestQueue.cancelAll(TAG + "break");
-        stringRequest = new StringRequest(Request.Method.POST, GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT,
-                new Response.Listener<String>() {
-                    @Override
-                    public void onResponse(String s) {
-                        LogUtil.e("breaking", s);
-                        WHBreakingBatchBreakingBtnClickEvent wh = JsonTools.parseJsonToBean(s, WHBreakingBatchBreakingBtnClickEvent.class);
-                        if (wh.getData() != null) {
-                            for (int i = 0; i < wh.getData().size(); i++) {
-                                messages.add(wh.getData().get(i));
-                            }
-                        }
-                        strPrintDataList = new Gson().toJson(messages);
-                        //打开popupWindow;
-                        initPopupWindow();
-                        reset();
-                    }
-                },
-                new Response.ErrorListener() {
-                    @Override
-                    public void onErrorResponse(VolleyError volleyError) {
-                        CommonUtil.showErrorToast(volleyError);
-                        etOrBarcode.setText("");
-                        etBarRemain.setText("");
-                        tvOrRemain.setText("");
-                        btnBreaking.setEnabled(false);
-                        CommonUtil.editTextGetFocus(etOrBarcode);
-                        progressDialog.dismiss();
-                    }
-                }) {
             @Override
-            protected Map<String, String> getParams() throws AuthFailureError {
-                Map<String, String> params = new HashMap<>();
-                params.put("or_barcode", etOrBarcode.getText().toString().trim());
-                params.put("or_remain", tvOrRemain.getText().toString().trim());
-                params.put("bar_remain", etBarRemain.getText().toString().trim());
-                return params;
-            }
-
-            @Override
-            public Map<String, String> getHeaders() throws AuthFailureError {
-                return VolleyUtil.getVolleyUtil().setCookies();
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                Message message = Message.obtain();
+                message.what = SPLIT_BARCODE_FAIL;
+                message.obj = "{\"exceptionInfo\":\"条码拆分异常\"}";
+                mHandler.sendMessage(message);
             }
-        };
-        stringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
-        stringRequest.setTag(TAG + "break");
-        PdaApplication.mRequestQueue.add(stringRequest);*/
+        });
     }
 
     /**
@@ -810,7 +744,7 @@ public class WHBreakingBatchFragment extends BaseFragment implements View.OnClic
                     JSONObject resultObject = new JSONObject(s);
                     if (resultObject.optBoolean("success")) {
                         mPrintUrl = resultObject.optString("data");
-                        FileUtils.printBarcode(getActivity(),mPrintUrl, mHandler);
+                        FileUtils.printBarcode(getActivity(), mPrintUrl, mHandler);
                     }
                 } catch (JSONException e) {
                     if (progressDialog.isShowing())

+ 3 - 3
app/src/main/java/uas/erp/jiaweisi_wms/global/GloableParams.java

@@ -866,7 +866,7 @@ public class GloableParams {
     //-->入库管理
     public static final String MENU_STORAGE_RECHARGE = "收料单";
     //    public static final String MENU_STORAGE_INSPECTION = "送检";
-    //    public static final String MENU_STORAGE_IQC_STORAGE_IN = "IQC检验";
+        public static final String MENU_STORAGE_IQC_STORAGE_IN = "IQC检验";
     //    public static final String MENU_STORAGE_MATERIAL_STORAGE_IN = "单据入库";
     //    public static final String MENU_STORAGE_PRODUCT_CHECK = "成品检验";
     //    public static final String MENU_STORAGE_PRODUCT_STORAGE_IN = "完工品入库";
@@ -880,7 +880,7 @@ public class GloableParams {
     public static final String[] storageInMenuNames = {
             MENU_STORAGE_RECHARGE,
             //            MENU_STORAGE_INSPECTION,
-            //            MENU_STORAGE_IQC_STORAGE_IN,
+                        MENU_STORAGE_IQC_STORAGE_IN,
             //            MENU_STORAGE_MATERIAL_STORAGE_IN,
             //            MENU_STORAGE_PRODUCT_STORAGE_IN,
             //            MENU_STORAGE_RANDOM_CHECK,
@@ -893,7 +893,7 @@ public class GloableParams {
     public static final int[] storageInMenuImgs = {
             R.drawable.ic_storage_recharge,
             //            R.drawable.ic_storage_inspection,
-            //            R.drawable.ic_storage_iqc,
+                        R.drawable.ic_storage_iqc,
             //            R.drawable.ic_storage_material_in,
             //            R.drawable.ic_storage_finish_in,
             //            R.drawable.ic_storage_random_check,

+ 6 - 4
app/src/main/java/uas/erp/jiaweisi_wms/util/CommonUtil.java

@@ -499,11 +499,12 @@ public class CommonUtil {
             ErrorMsg errorMsg = JsonTools.parseJsonToBean(new String(volleyError.networkResponse.data), ErrorMsg.class);
             if (errorMsg != null && errorMsg.exceptionInfo != null) {
                 errorStr = errorMsg.exceptionInfo;
-                MyLog.e("aaa","错误信息:" + errorMsg.exceptionInfo);
             } else {
-                errorStr = "系统错误";
+                //errorStr = "系统错误";
+                errorStr = new String(volleyError.networkResponse.data);
             }
         }
+        MyLog.d("aaa","接口错误信息:" + errorStr);
         makeNotice();
         Toast.makeText(PdaApplication.getmContext(), errorStr, Toast.LENGTH_LONG).show();
         return errorStr;
@@ -585,11 +586,12 @@ public class CommonUtil {
             ErrorMsg errorMsg = JsonTools.parseJsonToBean(new String(volleyError.networkResponse.data), ErrorMsg.class);
             if (errorMsg != null && errorMsg.exceptionInfo != null) {
                 errorStr = errorMsg.exceptionInfo;
-                MyLog.e("aaa","错误信息:" + errorMsg.exceptionInfo);
             } else {
-                errorStr = "系统错误";
+                //                errorStr = "系统错误";
+                errorStr = new String(volleyError.networkResponse.data);
             }
         }
+        MyLog.d("aaa","接口错误信息:" + errorStr);
         //振动提示
         makeNotice();
         /*MediaPlayer mp = new MediaPlayer();

+ 63 - 0
app/src/main/java/uas/erp/jiaweisi_wms/util/FileUtils.java

@@ -15,6 +15,7 @@ import java.io.InputStream;
 import java.security.SecureRandom;
 import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
+import java.util.Calendar;
 
 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.SSLContext;
@@ -282,4 +283,66 @@ public class FileUtils {
             return true;
         }
     }
+
+    /**
+     * 判断文件是否为当天创建(使用最后修改时间)
+     * Android 7.0推荐使用此方法
+     */
+    public static boolean isFileCreatedToday(File file) {
+        if (file == null || !file.exists()) {
+            return false;
+        }
+
+        // 获取文件的最后修改时间
+        long lastModified = file.lastModified();
+
+        // 获取当前时间的Calendar
+        Calendar today = Calendar.getInstance();
+
+        // 获取文件时间的Calendar
+        Calendar fileDate = Calendar.getInstance();
+        fileDate.setTimeInMillis(lastModified);
+
+        // 比较年、月、日是否相同
+        return today.get(Calendar.YEAR) == fileDate.get(Calendar.YEAR) &&
+                today.get(Calendar.MONTH) == fileDate.get(Calendar.MONTH) &&
+                today.get(Calendar.DAY_OF_MONTH) == fileDate.get(Calendar.DAY_OF_MONTH);
+    }
+
+    /**
+     * 获取文件创建时间的字符串表示
+     */
+    public static String getFileCreationTimeString(File file) {
+        if (file == null || !file.exists()) {
+            return "文件不存在";
+        }
+
+        long lastModified = file.lastModified();
+        Calendar cal = Calendar.getInstance();
+        cal.setTimeInMillis(lastModified);
+
+        return String.format("%04d-%02d-%02d %02d:%02d:%02d",
+                cal.get(Calendar.YEAR),
+                cal.get(Calendar.MONTH) + 1, // 月份从0开始
+                cal.get(Calendar.DAY_OF_MONTH),
+                cal.get(Calendar.HOUR_OF_DAY),
+                cal.get(Calendar.MINUTE),
+                cal.get(Calendar.SECOND));
+    }
+
+    /**
+     * 格式化文件大小
+     */
+    public static String formatFileSize(long size) {
+        if (size < 1024) {
+            return size + " B";
+        } else if (size < 1024 * 1024) {
+            return String.format("%.2f KB", size / 1024.0);
+        } else if (size < 1024 * 1024 * 1024) {
+            return String.format("%.2f MB", size / (1024.0 * 1024));
+        } else {
+            return String.format("%.2f GB", size / (1024.0 * 1024 * 1024));
+        }
+    }
+
 }

+ 212 - 143
app/src/main/java/uas/erp/jiaweisi_wms/util/MyLog.java

@@ -1,161 +1,230 @@
 package uas.erp.jiaweisi_wms.util;
 
 import android.annotation.SuppressLint;
+import android.os.Build;
 import android.util.Log;
 
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.nio.file.attribute.FileTime;
 import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
 import java.util.Date;
 
+import androidx.annotation.RequiresApi;
+import uas.erp.jiaweisi_wms.application.PdaApplication;
+
 /**
  * 带日志文件输入,又可控开关的日志调试
  */
 @SuppressLint("SimpleDateFormat")
 public class MyLog {
-	public static Boolean MYLOG_SWITCH = true; // 日志文件总开关
-	private static Boolean MYLOG_WRITE_TO_FILE = true;// 日志写入文件开关
-	private static char MYLOG_TYPE = 'v';// 输入日志类型,w代表只输出告警信息等,v代表输出所有信息
-	@SuppressLint("SdCardPath")
-	private static String MYLOG_PATH_SDCARD_DIR1 = "/sdcard/MSShow";    // 日志文件在sdcard中的路径
-	private static String MYLOG_PATH_SDCARD_DIR2 = "/Log";
-	private static String MYLOG_PATH_SDCARD_DIR = MYLOG_PATH_SDCARD_DIR1+MYLOG_PATH_SDCARD_DIR2;
-	private static String MYLOGFILEName = "Log.txt";// 本类输出的日志文件名称
-
-	@SuppressLint("SimpleDateFormat")
-	private static SimpleDateFormat myLogSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 日志的输出格式
-
-	private static boolean isDebug = true;		//普通log的开关
-	private static String TAG = "英唐" +"-----------";
-
-	public static void e(String msg){
-		if(isDebug){
-			Log.e(TAG, msg);
-		}
-	}
-
-	public static void w(String msg){
-		if(isDebug){
-			Log.w(TAG, msg);
-		}
-	}
-
-	public static void d(String msg){
-		if(isDebug){
-			Log.d(TAG, msg);
-		}
-	}
-
-	public static void i(String msg){
-		if(isDebug){
-			Log.i(TAG, msg);
-		}
-	}
-
-	public static void w(String tag, Object msg) { // 警告信息
-		log(tag, msg.toString(), 'w');
-	}
-
-	public static void e(String tag, Object msg) { // 错误信息
-		log(tag, msg.toString(), 'e');
-	}
-
-	public static void d(String tag, Object msg) {// 调试信息
-		log(tag, msg.toString(), 'd');
-	}
-
-	public static void i(String tag, Object msg) {//
-		log(tag, msg.toString(), 'i');
-	}
-
-	public static void v(String tag, Object msg) {
-		log(tag, msg.toString(), 'v');
-	}
-
-	public static void w(String tag, String text) {
-		log(tag, text, 'w');
-	}
-
-	public static void e(String tag, String text) {
-		log(tag, text, 'e');
-	}
-
-	public static void d(String tag, String text) {
-		log(tag, text, 'd');
-	}
-
-	public static void i(String tag, String text) {
-		log(tag, text, 'i');
-	}
-
-	public static void v(String tag, String text) {
-		log(tag, text, 'v');
-	}
-
-	/**
-	 * 根据tag, msg和等级,输出日志
-	 */
-	private static void log(String tag, String msg, char level) {
-		msg = "\r\n"+msg;
-		if (MYLOG_SWITCH) {
-			if ('e' == level && ('e' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) { // 输出错误信息
-				Log.e(tag, msg);
-			} else if ('w' == level && ('w' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
-				Log.w(tag, msg);
-			} else if ('d' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
-				Log.d(tag, msg);
-			} else if ('i' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
-				Log.i(tag, msg);
-			} else {
-				Log.v(tag, msg);
-			}
-			if (MYLOG_WRITE_TO_FILE) {
-				writeLogtoFile(String.valueOf(level), tag, msg);
-			}
-		}
-	}
-
-	/**
-	 * 打开日志文件并写入日志
-	 * **/
-	private static void writeLogtoFile(String mylogtype, String tag, String text) {// 新建或打开日志文件
-		isExist(MYLOG_PATH_SDCARD_DIR1);
-		isExist(MYLOG_PATH_SDCARD_DIR);
-		Date nowtime = new Date();
-//		String needWriteFiel = logfile.format(nowtime);
-		String needWriteMessage = myLogSdf.format(nowtime) + "    " + mylogtype
-				+ "    " + tag + "    " + text;
-		File file = new File(MYLOG_PATH_SDCARD_DIR, MYLOGFILEName);
-		try {
-			FileWriter filerWriter = new FileWriter(file, true);// 后面这个参数代表是不是要接上文件中原来的数据,不进行覆盖
-			BufferedWriter bufWriter = new BufferedWriter(filerWriter);
-			bufWriter.write(needWriteMessage);
-			bufWriter.newLine();
-			bufWriter.close();
-			filerWriter.close();
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 删除制定的日志文件
-	 * */
-	public static void delFile() {// 删除日志文件
-		File file = new File(MYLOG_PATH_SDCARD_DIR, MYLOGFILEName);
-		if (file.exists()) {
-			file.delete();
-		}
-	}
-
-	public static void isExist(String path) {
-		File file = new File(path);
-		// 判断文件夹是否存在,如果不存在则创建文件夹
-		if (!file.exists()) {
-			file.mkdir();
-		}
-
-	}
+    public static Boolean MYLOG_SWITCH = true; // 日志文件总开关
+    private static Boolean MYLOG_WRITE_TO_FILE = true;// 日志写入文件开关
+    private static char MYLOG_TYPE = 'v';// 输入日志类型,w代表只输出告警信息等,v代表输出所有信息
+    @SuppressLint("SdCardPath")
+//    private static String MYLOG_PATH_SDCARD_DIR1 = "/sdcard/MSShow";    // 日志文件在sdcard中的路径
+//    private static String MYLOG_PATH_SDCARD_DIR1 = "/data/data/" + PdaApplication.getmContext().getPackageName();  //APP包下创建的文件不需要权限
+    private static String MYLOG_PATH_SDCARD_DIR1 = "/sdcard/Android/data/" + PdaApplication.getmContext().getPackageName();  //模拟器的APP包下创建的文件
+    private static String MYLOG_PATH_SDCARD_DIR2 = "/Log";
+    private static String MYLOG_PATH_SDCARD_DIR = MYLOG_PATH_SDCARD_DIR1 + MYLOG_PATH_SDCARD_DIR2;
+    private static String MYLOGFILEName = "Log.txt";// 本类输出的日志文件名称
+
+    @SuppressLint("SimpleDateFormat")
+    private static SimpleDateFormat myLogSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 日志的输出格式
+
+    private static boolean isDebug = true;        //普通log的开关
+    private static String TAG = "英唐" + "-----------";
+
+    public static void e(String msg) {
+        if (isDebug) {
+            Log.e(TAG, msg);
+        }
+    }
+
+    public static void w(String msg) {
+        if (isDebug) {
+            Log.w(TAG, msg);
+        }
+    }
+
+    public static void d(String msg) {
+        if (isDebug) {
+            Log.d(TAG, msg);
+        }
+    }
+
+    public static void i(String msg) {
+        if (isDebug) {
+            Log.i(TAG, msg);
+        }
+    }
+
+    public static void w(String tag, Object msg) { // 警告信息
+        log(tag, msg.toString(), 'w');
+    }
+
+    public static void e(String tag, Object msg) { // 错误信息
+        log(tag, msg.toString(), 'e');
+    }
+
+    public static void d(String tag, Object msg) {// 调试信息
+        log(tag, msg.toString(), 'd');
+    }
+
+    public static void i(String tag, Object msg) {//
+        log(tag, msg.toString(), 'i');
+    }
+
+    public static void v(String tag, Object msg) {
+        log(tag, msg.toString(), 'v');
+    }
+
+    public static void w(String tag, String text) {
+        log(tag, text, 'w');
+    }
+
+    public static void e(String tag, String text) {
+        log(tag, text, 'e');
+    }
+
+    public static void d(String tag, String text) {
+        log(tag, text, 'd');
+    }
+
+    public static void i(String tag, String text) {
+        log(tag, text, 'i');
+    }
+
+    public static void v(String tag, String text) {
+        log(tag, text, 'v');
+    }
+
+    /**
+     * 根据tag, msg和等级,输出日志
+     */
+    private static void log(String tag, String msg, char level) {
+        msg = "\r\n" + msg;
+        if (MYLOG_SWITCH) {
+            if ('e' == level && ('e' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) { // 输出错误信息
+                Log.e(tag, msg);
+            } else if ('w' == level && ('w' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
+                Log.w(tag, msg);
+            } else if ('d' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
+                Log.d(tag, msg);
+            } else if ('i' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
+                Log.i(tag, msg);
+            } else {
+                Log.v(tag, msg);
+            }
+            if (MYLOG_WRITE_TO_FILE && 'd' == MYLOG_TYPE) {
+                writeLogtoFile(String.valueOf(level), tag, msg);
+            }
+        }
+    }
+
+    /**
+     * 打开日志文件并写入日志,
+     **/
+    private static void writeLogtoFile(String mylogtype, String tag, String text) {
+    	// 新建或打开日志文件
+        isExist(MYLOG_PATH_SDCARD_DIR1);
+        isExist(MYLOG_PATH_SDCARD_DIR);
+        Date nowtime = new Date();
+        //		String needWriteFiel = logfile.format(nowtime);
+        String needWriteMessage = myLogSdf.format(nowtime) + "    " + mylogtype
+                + "    " + tag + "    " + text;
+        File file = new File(MYLOG_PATH_SDCARD_DIR, MYLOGFILEName);
+        try {
+            FileWriter filerWriter = new FileWriter(file, true);// 后面这个参数代表是不是要接上文件中原来的数据,不进行覆盖
+            BufferedWriter bufWriter = new BufferedWriter(filerWriter);
+            bufWriter.write(needWriteMessage);
+            bufWriter.newLine();
+            bufWriter.close();
+            filerWriter.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 删除制定的日志文件
+     */
+    public static void delFile() {// 删除日志文件
+        File file = new File(MYLOG_PATH_SDCARD_DIR, MYLOGFILEName);
+        if (file.exists()) {
+            file.delete();
+        }
+    }
+
+    public static void isExist(String path) {
+        File file = new File(path);
+        // 判断文件夹是否存在,如果不存在则创建文件夹
+        if (!file.exists()) {
+            file.mkdir();
+        }
+    }
+
+    /**
+     * 取消Android8.0的提示限制
+     */
+    @RequiresApi(api = Build.VERSION_CODES.O)
+    public static void delNotDayFile(){
+        File fileP = new File(MYLOG_PATH_SDCARD_DIR, MYLOGFILEName);
+        if (fileP.exists()) {
+            Path path = Paths.get(MYLOG_PATH_SDCARD_DIR + "/" + MYLOGFILEName); //文件路径
+            try {
+                // 获取文件的属性
+                BasicFileAttributes attrs = Files.readAttributes(path, BasicFileAttributes.class);
+                // 获取文件的创建时间
+                FileTime creationTime = attrs.creationTime();
+                // 转换为LocalDateTime以便于比较
+                //将FileTime对象转换为LocalDateTime以便于与当前日期进行比较。这里使用了系统的默认时区(ZoneId.systemDefault())。如果需要特定时区,可以替换为相应的ZoneId。
+                //通过LocalDateTime 的 toLocalDate()方法将时间转换为仅包含日期(忽略时间),然后与当前日期进行比较。
+                LocalDateTime creationDateTime = creationTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
+                LocalDateTime now = LocalDateTime.now();
+
+                // 比较是否为当天创建
+                if (isToday(creationDateTime)) {
+                    //System.out.println("文件是今天创建的。");
+                } else {
+                    //System.out.println("文件不是今天创建的。");
+                    delFile();  //删除不是当天日期
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    // 辅助方法,检查日期是否为今天
+    @RequiresApi(api = Build.VERSION_CODES.O)
+    private static boolean isToday(LocalDateTime dateTime) {
+        LocalDate today = LocalDate.now();
+        LocalDate fileDate = dateTime.toLocalDate();
+        return today.equals(fileDate);
+    }
+
+    /**
+     * 判断文件是否为当天创建(使用最后修改时间),不同则删除
+     * Android 7.0推荐使用此方法
+     */
+    public static void isFileCreatedTodayDel() {
+        File fileP = new File(MYLOG_PATH_SDCARD_DIR, MYLOGFILEName);
+        if (fileP.exists()) {
+            if (!FileUtils.isFileCreatedToday(fileP)) {
+                delFile();  //删除不是当天创建的日期
+            }
+        }
+    }
+
+
 }

+ 4 - 3
app/src/main/java/uas/erp/jiaweisi_wms/util/VolleyRequest.java

@@ -100,7 +100,7 @@ public class VolleyRequest {
                 index++;
             }
         }
-
+        MyLog.d("aaa","*************************" + "\n" + "接口地址:" + url);
         PdaApplication.mRequestQueue.cancelAll(httpParams.getUrl());
 
         stringRequest = new StringRequest(httpParams.getMethod(), url,
@@ -108,7 +108,8 @@ public class VolleyRequest {
                     @Override
                     public void onResponse(String s) {
                         try {
-                            LogUtil.prinlnLongMsg("responseSucc", s);
+                            MyLog.d("aaa","响应成功:" + s);
+                            //LogUtil.prinlnLongMsg("responseSucc", s);
                             httpCallback.onSuccess(httpParams.getFlag(), s);
                         } catch (Exception e) {
                             e.printStackTrace();
@@ -120,7 +121,7 @@ public class VolleyRequest {
                     public void onErrorResponse(VolleyError volleyError) {
                         String errorToast = CommonUtil.showErrorToast(volleyError, false);
                         try {
-                            LogUtil.e("responErr", errorToast);
+                            //LogUtil.e("responErr", errorToast);
                             if (errorToast.length() >= 500) {
                                 Activity activity=new Activity();
                                 String maName = SharedPreUtil.getString(activity, Constants.FLAG.ACCOUNT_NAME_CACHE, null);

+ 3 - 1
app/src/main/java/uas/erp/jiaweisi_wms/util/VollyRequest.java

@@ -95,6 +95,7 @@ public class VollyRequest {
             }
         }
 
+        MyLog.d("aaa","*************************" + "\n" + "接口地址:" + url);
         PdaApplication.mRequestQueue.cancelAll(httpParams.getTag());
 
         stringRequest = new StringRequest(httpParams.getMethod(), url,
@@ -102,7 +103,8 @@ public class VollyRequest {
                     @Override
                     public void onResponse(String s) {
                         try {
-                            LogUtil.prinlnLongMsg("responseSucc", s);
+                            MyLog.d("aaa","响应成功:" + s);
+                            //LogUtil.prinlnLongMsg("responseSucc", s);
                             httpCallback.onSuccess(httpParams.getFlag(), s);
                         } catch (Exception e) {
                             e.printStackTrace();

+ 175 - 136
app/src/main/res/layout/fragment_two_storage_iqc_in.xml

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
@@ -31,9 +30,11 @@
             android:clickable="false"
             android:src="@drawable/ic_edittext_scan" />
     </LinearLayout>
+
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
+
         <FrameLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
@@ -44,18 +45,20 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:orientation="vertical">
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="条码号:" />
+                        android:text="条码号:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_barcode"
@@ -63,22 +66,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="检验单号:" />
+                        android:text="检验单号:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_veCode"
@@ -86,22 +91,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="收料单号:" />
+                        android:text="收料单号:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_vadCode"
@@ -109,22 +116,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="物料编号:" />
+                        android:text="物料编号:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_prodcode"
@@ -132,22 +141,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="物料名称:" />
+                        android:text="物料名称:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_prDetail"
@@ -155,22 +166,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="物料规格:" />
+                        android:text="物料规格:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_prSpec"
@@ -178,22 +191,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="采购单:" />
+                        android:text="采购单:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_veOrderCode"
@@ -201,22 +216,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="序号:" />
+                        android:text="序号:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_veOrderNo"
@@ -224,22 +241,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="供应商:" />
+                        android:text="供应商:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_veVendName"
@@ -247,22 +266,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="检验方式:" />
+                        android:text="检验方式:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_testMethod"
@@ -270,69 +291,76 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
                     android:layout_marginTop="5dp"
                     android:orientation="horizontal"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:visibility="gone">
+
                     <TextView
-                        android:layout_gravity="center"
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
+                        android:layout_gravity="center"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="检验结果:" />
+                        android:text="检验结果:"
+                        android:textSize="14sp" />
+
                     <RadioGroup
                         android:id="@+id/rg_yesorno"
-                        android:orientation="horizontal"
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
-                        android:layout_weight="3">
+                        android:layout_weight="3"
+                        android:orientation="horizontal">
+
                         <RadioButton
                             android:id="@+id/rb_yse"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:textSize="14sp"
                             android:checked="true"
-                            android:text="合格">
-                        </RadioButton>
+                            android:text="合格"
+                            android:textSize="14sp"></RadioButton>
+
                         <RadioButton
                             android:id="@+id/rb_no"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:textSize="14sp"
-                            android:text="不合格">
-                        </RadioButton>
+                            android:text="不合格"
+                            android:textSize="14sp"></RadioButton>
                     </RadioGroup>
+
                     <TextView
                         android:id="@+id/tv_testResult"
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
                         android:textSize="14sp"
-                        android:text=" "
-                        android:visibility="gone"/>
+                        android:visibility="gone" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="收料数:" />
+                        android:text="收料数:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_vadQty"
@@ -340,23 +368,25 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
-                        android:layout_gravity="center"
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
+                        android:layout_gravity="center"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="送检数:" />
+                        android:text="送检数:"
+                        android:textSize="14sp" />
 
 
                     <TextView
@@ -365,22 +395,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="合格数:" />
+                        android:text="合格数:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_mOkQty"
@@ -388,22 +420,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="不合格数:" />
+                        android:text="不合格数:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_ngQty"
@@ -411,22 +445,24 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:layout_marginTop="5dp"
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="1"
-                        android:textSize="14sp"
-                        android:text="状态:" />
+                        android:text="状态:"
+                        android:textSize="14sp" />
 
                     <TextView
                         android:id="@+id/tv_status"
@@ -434,28 +470,29 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
                         android:layout_weight="3"
+                        android:text=" "
                         android:textColor="@color/black"
-                        android:textSize="14sp"
-                        android:text=" " />
+                        android:textSize="14sp" />
                 </LinearLayout>
 
                 <ListView
-                    android:visibility="gone"
                     android:id="@+id/storage_iqc_in_data_lv"
                     android:layout_width="match_parent"
                     android:layout_height="0dp"
                     android:layout_weight="1"
-                    android:divider="@null" />
+                    android:divider="@null"
+                    android:visibility="gone" />
+
                 <LinearLayout
-                    android:visibility="gone"
                     android:layout_width="match_parent"
                     android:layout_height="36dp"
                     android:gravity="center_vertical"
                     android:orientation="horizontal"
-                    android:paddingBottom="3dp"
                     android:paddingLeft="12dp"
+                    android:paddingTop="3dp"
                     android:paddingRight="15dp"
-                    android:paddingTop="3dp">
+                    android:paddingBottom="3dp"
+                    android:visibility="gone">
 
                     <TextView
                         android:layout_width="0dp"
@@ -495,15 +532,15 @@
                 </LinearLayout>
 
                 <LinearLayout
-                    android:visibility="gone"
                     android:layout_width="match_parent"
                     android:layout_height="36dp"
                     android:gravity="center_vertical"
                     android:orientation="horizontal"
-                    android:paddingBottom="3dp"
                     android:paddingLeft="12dp"
+                    android:paddingTop="3dp"
                     android:paddingRight="15dp"
-                    android:paddingTop="3dp">
+                    android:paddingBottom="3dp"
+                    android:visibility="gone">
 
                     <TextView
                         android:layout_width="0dp"
@@ -542,12 +579,14 @@
                             android:visibility="gone" />
                     </RelativeLayout>
                 </LinearLayout>
+
                 <Button
-                    android:layout_marginBottom="@dimen/dp_10"
                     android:id="@+id/btn_shen"
                     style="@style/ButtonStyle"
                     android:layout_marginTop="10dp"
-                    android:text="审核" />
+                    android:layout_marginBottom="@dimen/dp_10"
+                    android:text="审核"
+                    android:visibility="gone" />
 
 
                 <Button
@@ -555,7 +594,7 @@
                     style="@style/ButtonStyle"
                     android:layout_marginTop="10dp"
                     android:text="入库"
-                    android:visibility="gone"/>
+                    android:visibility="gone" />
             </LinearLayout>
 
             <ScrollView
@@ -570,8 +609,8 @@
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
                     android:padding="10dp"
-                    android:textSize="16sp"
-                    android:text="错误信息" />
+                    android:text="错误信息"
+                    android:textSize="16sp" />
             </ScrollView>
         </FrameLayout>
     </ScrollView>

+ 2 - 2
build.gradle

@@ -54,8 +54,8 @@ ext {
             targetSdkVersion : 31,
             compileSdkVersion: 31,
             buildToolsVersion: "35.0.0",
-            versionCode      : 9,
-            versionName      : "1.0.8"
+            versionCode      : 13,
+            versionName      : "1.1.2"
     ]
 
     depsVersion = [