Browse Source

检查优化

guilin 10 months ago
parent
commit
7a63acdd13
40 changed files with 3756 additions and 680 deletions
  1. 14 0
      app/src/main/AndroidManifest.xml
  2. 9 18
      app/src/main/java/com/fxy/adapter/PictureListAdapter.java
  3. 3 3
      app/src/main/java/com/fxy/adapter/ShowPictureAdapter.java
  4. 116 0
      app/src/main/java/com/fxy/common/ConfirmDialog.java
  5. 118 19
      app/src/main/java/com/fxy/detection/DetectionConfirmGoodsMainActivity.java
  6. 671 0
      app/src/main/java/com/fxy/detection/DetectionConfirmPartsMainActivity.java
  7. 510 0
      app/src/main/java/com/fxy/detection/DetectionDealDiffMainActivity.java
  8. 671 198
      app/src/main/java/com/fxy/detection/DetectionWorkMainActivity.java
  9. 148 0
      app/src/main/java/com/fxy/detection/bean/BaseBean.java
  10. 109 0
      app/src/main/java/com/fxy/detection/bean/BtnInfoBean.java
  11. 114 0
      app/src/main/java/com/fxy/detection/bean/ConfirmGoodsBean.java
  12. 82 0
      app/src/main/java/com/fxy/detection/bean/ConfirmPartsBean.java
  13. 100 0
      app/src/main/java/com/fxy/detection/bean/DealDiffBean.java
  14. 57 0
      app/src/main/java/com/fxy/detection/bean/NeedPhotoBean.java
  15. 166 0
      app/src/main/java/com/fxy/detection/bean/OptionsBean.java
  16. 82 0
      app/src/main/java/com/fxy/detection/bean/PartsBean.java
  17. 59 0
      app/src/main/java/com/fxy/detection/bean/RepairConfirmBean.java
  18. 0 95
      app/src/main/java/com/fxy/detection/bean/StepsBaseBean.java
  19. 0 161
      app/src/main/java/com/fxy/detection/bean/StepsInfoBean.java
  20. 0 114
      app/src/main/java/com/fxy/detection/bean/StepsPictureBean.java
  21. 70 0
      app/src/main/java/com/fxy/detection/bean/SuspendBean.java
  22. 1 1
      app/src/main/java/com/fxy/login/LoginActivity.java
  23. 6 0
      app/src/main/java/com/fxy/net/Urls.java
  24. 38 0
      app/src/main/java/com/fxy/utils/ToolUtils.java
  25. 7 0
      app/src/main/res/drawable/text_border.xml
  26. 5 0
      app/src/main/res/drawable/text_border_select.xml
  27. 33 17
      app/src/main/res/layout/activity_fxy_detection_confirm_goods.xml
  28. 115 0
      app/src/main/res/layout/activity_fxy_detection_confirm_parts.xml
  29. 132 0
      app/src/main/res/layout/activity_fxy_detection_deal_diff.xml
  30. 56 47
      app/src/main/res/layout/activity_fxy_detection_work.xml
  31. 11 0
      app/src/main/res/layout/item_btn.xml
  32. 9 0
      app/src/main/res/layout/item_card.xml
  33. 41 0
      app/src/main/res/layout/item_card_tab.xml
  34. 139 0
      app/src/main/res/layout/item_card_tab_two.xml
  35. 0 1
      app/src/main/res/layout/item_picture_selector.xml
  36. 2 2
      app/src/main/res/layout/item_preview_image.xml
  37. 45 0
      app/src/main/res/layout/item_repair.xml
  38. 6 4
      app/src/main/res/layout/item_sku_img.xml
  39. 1 0
      app/src/main/res/values/dimens.xml
  40. 10 0
      app/src/main/res/values/styles.xml

+ 14 - 0
app/src/main/AndroidManifest.xml

@@ -231,6 +231,20 @@
             android:configChanges="orientation|keyboardHidden|screenSize"
             tools:ignore="LockedOrientationActivity"/>
 
+        <activity
+            android:name=".detection.DetectionConfirmPartsMainActivity"
+            android:windowSoftInputMode="stateHidden|adjustPan"
+            android:screenOrientation="sensor"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            tools:ignore="LockedOrientationActivity"/>
+
+        <activity
+            android:name=".detection.DetectionDealDiffMainActivity"
+            android:windowSoftInputMode="stateHidden|adjustPan"
+            android:screenOrientation="sensor"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            tools:ignore="LockedOrientationActivity"/>
+
 
         <activity
             android:name=".workOrder.WorkOrderOptMainActivity"

+ 9 - 18
app/src/main/java/com/fxy/adapter/PictureListAdapter.java

@@ -1,10 +1,7 @@
 package com.fxy.adapter;
 
-import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.Context;
-import android.graphics.drawable.Drawable;
-import android.support.v4.content.ContextCompat;
 import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.util.DisplayMetrics;
@@ -25,20 +22,14 @@ import com.chad.library.adapter.base.BaseViewHolder;
 import com.elvishew.xlog.XLog;
 import com.fxy.R;
 import com.fxy.baselibrary.views.dialog.RxDialogZoomImageView;
-import com.fxy.detection.bean.StepsPictureBean;
+import com.fxy.detection.bean.OptionsBean;
 import com.fxy.view.FullyGridLayoutManager;
-import com.luck.picture.lib.PictureSelector;
 import com.luck.picture.lib.config.PictureConfig;
 import com.luck.picture.lib.config.PictureMimeType;
-import com.luck.picture.lib.entity.LocalMedia;
 
-import java.util.ArrayList;
 import java.util.List;
 
-import static com.fxy.baselibrary.util.Tools.getScreenHeight;
-import static com.fxy.baselibrary.util.Tools.getScreenWidth;
-
-public class PictureListAdapter extends BaseQuickAdapter<StepsPictureBean, BaseViewHolder> {
+public class PictureListAdapter extends BaseQuickAdapter<OptionsBean, BaseViewHolder> {
     private LayoutInflater mInflater;
     private Context context;
     private Activity mActivity;
@@ -73,7 +64,7 @@ public class PictureListAdapter extends BaseQuickAdapter<StepsPictureBean, BaseV
 //        this.mItemClickListener = listener;
 //    }
 
-    public PictureListAdapter(Context context, Activity activity, RecyclerView view, List<StepsPictureBean> list, String type){
+    public PictureListAdapter(Context context, Activity activity, RecyclerView view, List<OptionsBean> list, String type){
         super(R.layout.item_preview_image, list);
         this.context = context;
         this.mActivity = activity;
@@ -113,13 +104,13 @@ public class PictureListAdapter extends BaseQuickAdapter<StepsPictureBean, BaseV
     }
 
 
-//    public void setNewData( List<StepsPictureBean> list){
+//    public void setNewData( List<OptionsBean> list){
 //        super(list);
 //    }
 
 
     @Override
-    protected void convert(BaseViewHolder helper, StepsPictureBean item) {
+    protected void convert(BaseViewHolder helper, OptionsBean item) {
         //定义setOnItemChildClickListener 事件点击
         helper.addOnClickListener(R.id.cb_select);
         helper.addOnClickListener(R.id.ivp_img);
@@ -153,9 +144,9 @@ public class PictureListAdapter extends BaseQuickAdapter<StepsPictureBean, BaseV
 
 
         tvName.setVisibility(View.VISIBLE);
-        tvName.setText(item.getDesc());
+        tvName.setText(item.getTitle());
 
-         if (item.getType().equals("picture") && !item.getUrl().isEmpty()){
+         if ( !item.getNeedPhoto().isEmpty()){
              mImg.setVisibility(View.VISIBLE);
              cbSelect.setVisibility(View.VISIBLE);
              cbSelect.setChecked((boolean)item.getChecked());
@@ -166,7 +157,7 @@ public class PictureListAdapter extends BaseQuickAdapter<StepsPictureBean, BaseV
                      .diskCacheStrategy(DiskCacheStrategy.ALL);
 
              Glide.with(helper.itemView.getContext())
-                     .load(item.getUrl())
+                     .load(item.getNeedPhoto())
                      .apply(options)
                      .into(mImg);
 
@@ -210,7 +201,7 @@ public class PictureListAdapter extends BaseQuickAdapter<StepsPictureBean, BaseV
 //                com.luck.picture.lib.PictureSelector.create(mActivity).externalPicturePreview(position, mediasList);
 
                 RxDialogZoomImageView rxDialogZoomImageView = new RxDialogZoomImageView(mContext);
-                rxDialogZoomImageView.setImagePath(mData.get(position).getUrl());
+//                rxDialogZoomImageView.setImagePath(mData.get(position));
                 rxDialogZoomImageView.show();
 
             }

+ 3 - 3
app/src/main/java/com/fxy/adapter/ShowPictureAdapter.java

@@ -14,7 +14,7 @@ import com.bumptech.glide.Glide;
 import com.bumptech.glide.load.engine.DiskCacheStrategy;
 import com.bumptech.glide.request.RequestOptions;
 import com.fxy.R;
-import com.fxy.detection.bean.StepsPictureBean;
+import com.fxy.detection.bean.OptionsBean;
 import com.luck.picture.lib.entity.LocalMedia;
 
 import java.util.ArrayList;
@@ -62,11 +62,11 @@ public class ShowPictureAdapter extends RecyclerView.Adapter<ShowPictureAdapter.
 
     }
 
-    public void setBeanList( List<StepsPictureBean> list) {
+    public void setBeanList( List<OptionsBean> list) {
 
         pictureList.clear();
         for (int i = 0; i < list.size(); i++) {
-            pictureList.add(list.get(i).getUrl());
+//            pictureList.add(list.get(i).getUrl());
         }
     }
 

+ 116 - 0
app/src/main/java/com/fxy/common/ConfirmDialog.java

@@ -0,0 +1,116 @@
+package com.fxy.common;
+
+import android.content.Context;
+import android.content.DialogInterface;
+
+import com.fxy.R;
+import com.fxy.detection.bean.BtnInfoBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public  class ConfirmDialog {
+    private final Context mContext;
+    private List<BtnInfoBean> listBtn = new ArrayList<>();
+    private OnCallbackListener listener;
+    private DialogInterface dialog;
+    private boolean cancelable= false;
+    public ConfirmDialog(Context context, List<BtnInfoBean> list){
+        mContext = context;
+        listBtn = list;
+    }
+
+    public void  setCancelable(boolean flag){
+        cancelable = flag;
+    }
+
+
+    public void showDialog(String center){
+        showDialog(center,"");
+    }
+
+    public void showDialog(String center,String title){
+        // 使用AlertDialog.Builder来创建对话框的构建器
+        android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(mContext);
+        builder.setCancelable(cancelable).setMessage(center);
+
+        if (!title.isEmpty()){
+            builder.setTitle(title);
+        }
+
+        int len = listBtn!=null ? listBtn.size() : 0 ;
+        if (len>0){
+
+            builder.setPositiveButton(listBtn.get(0).getTxt(), new DialogInterface.OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialogInterface, int i) {
+                    if (listener == null){
+                        dialogInterface.dismiss();
+                    }else{
+                        dialog = dialogInterface;
+                        listener.OnCallback(listBtn.get(0).getValue(),0);
+                    }
+                }
+            });
+
+            if (len>1){
+                builder.setNeutralButton(listBtn.get(1).getTxt(), new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialogInterface, int i) {
+                        if (listener == null){
+                            dialogInterface.dismiss();
+                        }else{
+                            dialog = dialogInterface;
+                            listener.OnCallback(listBtn.get(1).getValue(),1);
+                        }
+                    }
+                });
+            }
+
+            if (len>2){
+                builder.setNegativeButton(listBtn.get(2).getTxt(), new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialogInterface, int i) {
+                        if (listener == null){
+                            dialogInterface.dismiss();
+                        }else{
+                            dialog = dialogInterface;
+                            listener.OnCallback(listBtn.get(2).getValue(),2);
+                        }
+
+                    }
+                });
+            }
+
+        }else{
+            builder.setPositiveButton(R.string.str_submit, new DialogInterface.OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialogInterface, int i) {
+                    dialogInterface.dismiss();
+                }
+            });
+        }
+
+        // 创建并显示对话框
+        android.app.AlertDialog dialog = builder.create();
+        dialog.show();
+    }
+
+    public void dismiss(){
+        if (dialog!=null){
+            dialog.dismiss();
+            dialog = null;
+        }
+    }
+
+
+
+    public interface OnCallbackListener{
+        void OnCallback(String value,int position);
+    }
+
+    // 提供注册事件监听的方法
+    public void setOnCallbackListener(OnCallbackListener onCallbackListener) {
+        this.listener = onCallbackListener;
+    }
+}

+ 118 - 19
app/src/main/java/com/fxy/detection/DetectionConfirmGoodsMainActivity.java

@@ -10,13 +10,11 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.support.v7.widget.GridLayoutManager;
-import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.util.DisplayMetrics;
 import android.view.KeyEvent;
-import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.inputmethod.EditorInfo;
@@ -26,6 +24,7 @@ import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.load.engine.DiskCacheStrategy;
 import com.bumptech.glide.request.RequestOptions;
@@ -33,7 +32,6 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.elvishew.xlog.XLog;
 import com.fxy.R;
-import com.fxy.adapter.PictureListAdapter;
 import com.fxy.baselibrary.base.BaseActivity;
 import com.fxy.baselibrary.bean.BaseEventBusBean;
 import com.fxy.baselibrary.interfaces.OnRxScanerListener;
@@ -41,16 +39,19 @@ import com.fxy.baselibrary.qrcode.ActivityScanerCode;
 import com.fxy.baselibrary.util.JsonUtil;
 import com.fxy.bean.ActionBean;
 import com.fxy.bean.ScanBean;
+import com.fxy.common.ConfirmDialog;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
+import com.fxy.detection.bean.BtnInfoBean;
 import com.fxy.detection.bean.BoxInfoBean;
 import com.fxy.detection.bean.BoxSkuBean;
-import com.fxy.mine.PictureSelectorActivity;
+import com.fxy.detection.bean.ConfirmGoodsBean;
 import com.fxy.net.MyDialogCallback;
 import com.fxy.net.Urls;
-import com.fxy.putIn.TallyMainActivity;
+import com.fxy.utils.ToolUtils;
 import com.fxy.view.FloatingImageView;
 import com.fxy.view.FullyGridLayoutManager;
+import com.google.gson.Gson;
 import com.google.zxing.Result;
 import com.lzy.okgo.OkGo;
 import com.lzy.okgo.model.Response;
@@ -58,6 +59,7 @@ import com.lzy.okgo.model.Response;
 import org.json.JSONObject;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import butterknife.BindView;
@@ -86,6 +88,11 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
     @BindView(R.id.recyclerview)
     RecyclerView recyclerView;
 
+    @BindView(R.id.ll_host_diff)
+    LinearLayout llHostDiff;
+    @BindView(R.id.ll_from)
+    LinearLayout llFrom;
+
 
     //扫码扫码动作
     private ScanBean scanBean;
@@ -106,6 +113,12 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
 
     private int currentSku = -1;
 
+    private List<BtnInfoBean> listBtn = new ArrayList<>();
+
+    private float density = 0;
+
+    private ConfirmDialog confirmDialog;
+
     private Unbinder unbinder;
     
 
@@ -137,7 +150,10 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
-
+        if (requestCode == 200 && resultCode == 200)
+        {
+            clearData();
+        }
     }
 
 
@@ -185,21 +201,20 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
 
 
     private void initData() {
-
+        density = ToolUtils.getDensity(this);
     }
 
 
     private void initAdapter(){
 
-        int spanCount = 3;
-
+        int columnCount = 2; // 默认列数
+// 根据屏幕宽度动态调整列数
         DisplayMetrics displayMetrics = new DisplayMetrics();
         getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
-        int screenHeight = displayMetrics.heightPixels; // 屏幕高度(像素)
-        int screenWidth = displayMetrics.widthPixels; // 屏幕高度(像素)
-         if (Math.max(screenHeight,screenWidth)>1000){
-            spanCount = (int) screenWidth/300;
-        }
+        int screenWidth = displayMetrics.widthPixels;
+// 这里可以根据屏幕宽度动态计算列数,例如每列200dp
+        float dpWidth = screenWidth / (displayMetrics.densityDpi / 160f);
+        columnCount = (int) (dpWidth / 200); // 假设每列期望宽度为200dp
 
         emptyView = this.getLayoutInflater().inflate(R.layout.pager_empty, (ViewGroup) recyclerView.getParent(), false);
         errorView = this.getLayoutInflater().inflate(R.layout.pager_error, (ViewGroup) recyclerView.getParent(), false);
@@ -208,7 +223,7 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
         mAdapter.setEmptyView(emptyView);
         mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
 
-        recyclerView.setLayoutManager(new FullyGridLayoutManager(mContext, spanCount, GridLayoutManager.VERTICAL, false));
+        recyclerView.setLayoutManager(new FullyGridLayoutManager(mContext, columnCount, GridLayoutManager.VERTICAL, false));
         recyclerView.setAdapter(mAdapter);
 
          mAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@@ -226,6 +241,8 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
             super(R.layout.item_sku_img, data);
         }
 
+
+
         @Override
         protected void convert(BaseViewHolder helper, BoxSkuBean item) {
             //定义setOnItemChildClickListener 事件点击
@@ -235,6 +252,7 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
 
 
             ImageView imageView = helper.getView(R.id.iv_show);
+
             RequestOptions options = new RequestOptions()
                     .centerCrop()
                     .placeholder(R.color.color_f6)
@@ -387,6 +405,9 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
     }
 
     private void initEdit() {
+
+
+
         List<EditText> list = new ArrayList<>();
         list.add(etUnitCode);
         list.add(etBoxCode);
@@ -452,8 +473,7 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
                                 //showSuccessToast(bean.msg);
                                 Bundle bundle = new Bundle();
                                 bundle.putString("data",bean.data);
-                                bundle.putInt("step",0);
-                                intent2Page(mActivity, DetectionWorkMainActivity.class, false,bundle);
+                                intentPageResult(mActivity, DetectionWorkMainActivity.class, bundle,200);
                             } else {
                                 etBoxCode.selectAll();
                                 showWarningToast(bean.msg);
@@ -505,6 +525,7 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
                                     mAdapter.addData(boxSkuBeanList);
                                 }
                                 mAdapter.notifyDataSetChanged();
+                                llHostDiff.setVisibility(View.VISIBLE);
                             } else {
                                 showWarningToast(bean.msg);
                             }
@@ -516,6 +537,80 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
                 });
     }
 
+    //检查
+    private void checkHostDiff(HashMap<String, Object> postData){
+
+        if (!validate()) {
+            return;
+        }
+
+        postData.put("box_number", etBoxCode.getText().toString().trim());
+        postData.put("unit_code", etUnitCode.getText().toString().trim());
+        String postJson = (new Gson()).toJson(postData);
+
+        if (!checkRepeat(Urls.FXY_DETECTION_DEAL_DIFF + (postJson))) {
+            return;
+        }
+
+        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_DEAL_DIFF).upJson(postJson)
+                .execute(new MyDialogCallback(this, true, true) {
+                    @Override
+                    public void onSuccess(Response<String> response) {
+                        super.onSuccess(response);
+                        try {
+                            ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
+                            JSONObject dataObject = new JSONObject(bean.data);
+                            if (bean.code == 1) {
+                                showSuccessToast(bean.msg);
+
+                                if(dataObject.has("next_step")){
+
+                                    ConfirmGoodsBean  confirmGoodsBean = JsonUtil.jsonString2Bean(bean.data, ConfirmGoodsBean.class);
+                                    confirmGoodsBean.setIsConfirm("1");
+                                    confirmGoodsBean.setUnitCode(etUnitCode.getText().toString().trim());
+                                    Bundle bundle = new Bundle();
+                                    bundle.putString("data",(new Gson()).toJson(confirmGoodsBean));
+                                    bundle.putString("node_code",dataObject.getString("next_step"));
+                                    intentPageResult(mActivity, DetectionWorkMainActivity.class, bundle,200);
+                                }else{
+                                    clearData();
+                                }
+
+
+                            } else {
+
+                                if (dataObject.has("need_confirm") && dataObject.getString("need_confirm").equals("1")){
+                                    listBtn = JsonUtil.jsonString2Beans(dataObject.getString("btns"), BtnInfoBean.class);
+
+                                    confirmDialog = new ConfirmDialog(mContext,listBtn);
+                                    confirmDialog.setOnCallbackListener(new ConfirmDialog.OnCallbackListener() {
+                                        @Override
+                                        public void OnCallback(String value,int position) {
+                                            HashMap<String, Object> postData = new HashMap<>();
+                                            postData.put(listBtn.get(position).getKey(),listBtn.get(position).getValue());
+                                            checkHostDiff(postData);
+                                        }
+                                    });
+                                    confirmDialog.showDialog(bean.msg);
+                                    if (confirmDialog!=null){
+                                        confirmDialog.dismiss();
+                                    }
+                                }else{
+                                    showWarningToast(bean.msg);
+                                }
+
+                            }
+
+
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            XLog.e("请求返回打托信息错误", e.getMessage());
+                        }
+                    }
+                });
+
+    }
+
 
     /**
      * @param type int 1、库位,2、箱号
@@ -568,14 +663,18 @@ public class DetectionConfirmGoodsMainActivity extends BaseActivity implements S
 
         setEditTextNormal(etUnitCode, true);
         setEditTextNormal(etBoxCode, true);
+        llHostDiff.setVisibility(View.GONE);
         etUnitCode.requestFocus();
     }
 
-    @OnClick({})
+    @OnClick({R.id.btn_host_diff})
     public void onViewClicked(View view) {
         Bundle bundle = new Bundle();
         switch (view.getId()) {
-
+            case R.id.btn_host_diff:
+                HashMap<String, Object> postData = new HashMap<>();
+                checkHostDiff(postData);
+                break;
             default:
                 break;
         }

+ 671 - 0
app/src/main/java/com/fxy/detection/DetectionConfirmPartsMainActivity.java

@@ -0,0 +1,671 @@
+package com.fxy.detection;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.graphics.Color;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v7.widget.GridLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.util.DisplayMetrics;
+import android.util.TypedValue;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
+import com.bumptech.glide.request.RequestOptions;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.elvishew.xlog.XLog;
+import com.fxy.R;
+import com.fxy.baselibrary.base.BaseActivity;
+import com.fxy.baselibrary.bean.BaseEventBusBean;
+import com.fxy.baselibrary.interfaces.OnRxScanerListener;
+import com.fxy.baselibrary.util.JsonUtil;
+import com.fxy.baselibrary.views.dialog.RxDialogZoomImageView;
+import com.fxy.bean.ActionBean;
+import com.fxy.bean.ScanBean;
+import com.fxy.constant.BaseConfig;
+import com.fxy.constant.EventCode;
+import com.fxy.detection.bean.BtnInfoBean;
+import com.fxy.detection.bean.ConfirmGoodsBean;
+import com.fxy.detection.bean.ConfirmPartsBean;
+import com.fxy.detection.bean.PartsBean;
+import com.fxy.net.MyDialogCallback;
+import com.fxy.net.Urls;
+import com.fxy.utils.ToolUtils;
+import com.fxy.view.FullyGridLayoutManager;
+import com.google.zxing.Result;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+import sto.android.app.StoJNI;
+import sto.android.app.StoPdaKeyEvent;
+import sto.android.app.StoTongJNI;
+
+public class DetectionConfirmPartsMainActivity extends BaseActivity implements StoJNI.ScanCallBack {
+    /**
+     * 列表适配器
+     */
+    Context mContext = this;
+    Activity mActivity = this;
+
+    @BindView(R.id.recyclerview)
+    RecyclerView recyclerView;
+
+
+    @BindView(R.id.ll_btn_center)
+    LinearLayout llBtnCenter;
+
+
+    @BindView(R.id.tv_content)
+    TextView tvContent;
+
+
+    @BindView(R.id.ll_btn_not_center)
+    LinearLayout llBtnNotCenter;
+
+    @BindView(R.id.ll_default)
+    LinearLayout llDefault;
+
+    @BindView(R.id.btn_default)
+    TextView btnDefault;
+
+    //扫码扫码动作
+    private ScanBean scanBean;
+
+    private JSONObject submitData = new JSONObject();
+
+    private ConfirmGoodsBean confirmGoodsBean;
+
+    private ConfirmPartsBean confirmPartsBean;
+
+
+
+    private View errorView;     //错误显示页
+    private View emptyView;     //空显示页
+    /**
+     * 列表适配器
+     */
+    private FinishWorkAdapter mAdapter;
+
+    private List<PartsBean> partsBeanList;
+
+    private boolean isDefault = false;
+
+
+    private float density = 0;
+
+
+    private Unbinder unbinder;
+    
+
+    @Override
+    public int getContentViewResId() {
+        return R.layout.activity_fxy_detection_confirm_parts;
+    }
+
+    @Override
+    public boolean showToolBar() {
+        return true;
+    }
+
+    @Override
+    public boolean openEventBus() {
+        return true;
+    }
+
+    @Override
+    protected void getBundleExtras(Bundle bundle) {
+        confirmGoodsBean = JsonUtil.jsonString2Bean(bundle.getString("data",""),ConfirmGoodsBean.class);
+        confirmPartsBean = JsonUtil.jsonString2Bean(bundle.getString("confirm_parts",""),ConfirmPartsBean.class);
+        partsBeanList = confirmPartsBean.getPartsList();
+    }
+
+    //finish的返回监听
+    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
+    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
+    //第三个参数包含了返回的值
+    //如果不需要所跳转的页面返回值,也就不需要这个方法了
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+
+    }
+
+
+    /**
+     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
+     *
+     * @param event
+     */
+    @Override
+    protected void EventBean(BaseEventBusBean event) {
+//        XLog.e("----------接收返回--------------");
+//        XLog.e("接收返回:"+event.getEventCode());
+        if (event != null && event.getEventCode() == EventCode.displacement_refresh) {
+
+        }
+    }
+
+    @Override
+    public boolean isPlayMusic() {
+        return true;
+    }
+
+    @Override
+    protected void initView() {
+        unbinder = ButterKnife.bind(this);
+        setTitleName("装箱确认");
+        density = ToolUtils.getDensity(this);
+        initAdapter();
+        initData();
+        initEdit();
+    }
+
+
+
+    private void initData() {
+
+        tvContent.setText(confirmPartsBean.getContent());
+        for (int i =0;i<confirmPartsBean.getBtnsQue().size();i++){
+            llBtnCenter.addView(getTextView(confirmPartsBean.getBtnsQue().get(i)));
+        }
+        for (int i =0;i<confirmPartsBean.getBtnsNoQue().size();i++){
+            llBtnNotCenter.addView(getTextView(confirmPartsBean.getBtnsNoQue().get(i)));
+        }
+
+    }
+
+
+    private void setBtnCenter(){
+
+        boolean isSelect = false;
+        for (int i=0;i<partsBeanList.size();i++){
+            if (partsBeanList.get(i).getChecked()){
+                isSelect = true;
+            }
+        }
+
+        if (isDefault){
+
+            llDefault.setVisibility(View.GONE);
+            if (isSelect){
+                llBtnCenter.setVisibility(View.VISIBLE);
+                llBtnNotCenter.setVisibility(View.GONE);
+            }else{
+                llBtnCenter.setVisibility(View.GONE);
+                llBtnNotCenter.setVisibility(View.VISIBLE);
+            }
+
+
+        }else{
+
+
+            llDefault.setVisibility(View.VISIBLE);
+            btnDefault.setText(isSelect?"缺配件":"不缺配件");
+            llBtnCenter.setVisibility(View.GONE);
+            llBtnNotCenter.setVisibility(View.GONE);
+        }
+
+
+    }
+
+    private TextView  getTextView(BtnInfoBean btnInfoBean){
+        TextView textView = new TextView(mContext);
+        textView.setText(btnInfoBean.getTxt());
+        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
+                LinearLayout.LayoutParams.WRAP_CONTENT, // 宽度
+                LinearLayout.LayoutParams.WRAP_CONTENT);// 高度
+
+        int margin = ToolUtils.getDpValue(10,this);
+        layoutParams.setMargins(margin,margin,margin,margin);
+
+
+        textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 24); // 使用sp单位
+        textView.setLayoutParams(layoutParams);
+        textView.setPadding(margin,margin,margin,margin);
+        textView.setTextColor(getResources().getColor(R.color.white));
+        textView.setBackgroundResource(R.drawable.bg_orange_item);
+        textView.setVisibility(View.VISIBLE);
+        textView.setGravity(View.TEXT_ALIGNMENT_CENTER);
+        textView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                confirmParts();
+            }
+        });
+        return textView;
+    }
+
+
+    private void initAdapter(){
+
+        int columnCount = 2; // 默认列数
+// 根据屏幕宽度动态调整列数
+        DisplayMetrics displayMetrics = new DisplayMetrics();
+        getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
+        int screenWidth = displayMetrics.widthPixels;
+// 这里可以根据屏幕宽度动态计算列数,例如每列200dp
+        float dpWidth = screenWidth / (displayMetrics.densityDpi / 160f);
+        columnCount = (int) (dpWidth / 200); // 假设每列期望宽度为200dp
+
+        emptyView = this.getLayoutInflater().inflate(R.layout.pager_empty, (ViewGroup) recyclerView.getParent(), false);
+        errorView = this.getLayoutInflater().inflate(R.layout.pager_error, (ViewGroup) recyclerView.getParent(), false);
+
+        mAdapter  = new FinishWorkAdapter(partsBeanList);
+        mAdapter.setEmptyView(emptyView);
+        mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
+
+        recyclerView.setLayoutManager(new FullyGridLayoutManager(mContext, columnCount, GridLayoutManager.VERTICAL, false));
+        recyclerView.setAdapter(mAdapter);
+
+         mAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
+            @Override
+            public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
+                PartsBean partsBean = partsBeanList.get(position);
+                partsBean.setChecked(!partsBean.getChecked());
+                partsBeanList.set(position,partsBean);
+                adapter.notifyDataSetChanged();
+                isDefault = false;
+                setBtnCenter();
+            }
+        });
+    }
+
+
+    public static class FinishWorkAdapter extends BaseQuickAdapter<PartsBean, BaseViewHolder> {
+
+        public FinishWorkAdapter(List<PartsBean> data){
+            super(R.layout.item_preview_image, data);
+        }
+
+        @Override
+        protected void convert(BaseViewHolder helper, PartsBean item) {
+            //定义setOnItemChildClickListener 事件点击
+
+            helper.addOnClickListener(R.id.cb_select);
+            helper.addOnClickListener(R.id.ivp_img);
+
+
+            ImageView  mImg = helper.getView(R.id.ivp_img);
+            CheckBox cbSelect = helper.getView(R.id.cb_select);
+            TextView tvName = helper.getView(R.id.tv_name);
+
+            tvName.setText(item.getPartsName());
+
+
+            RequestOptions options = new RequestOptions()
+                    .centerCrop()
+                    .placeholder(R.color.color_f6)
+                    .diskCacheStrategy(DiskCacheStrategy.ALL);
+
+            Glide.with(helper.itemView.getContext())
+                    .load(item.getUrl())
+                    .apply(options)
+                    .into(mImg);
+
+            cbSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                @Override
+                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                    RelativeLayout parentLinearLayout = (RelativeLayout) buttonView.getParent();
+
+                    View overlayView =  parentLinearLayout.findViewById(R.id.overlay_view);
+
+                    // 当checkbox1的选中状态改变时执行
+                    if (isChecked) {
+                        overlayView.setVisibility(View.VISIBLE);
+                    } else {
+                        overlayView.setVisibility(View.GONE);
+                    }
+                }
+            });
+
+            mImg.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+
+                    XLog.e("--------setOnClickListener------");
+                    int position = RecyclerView.NO_POSITION;
+                    position = Math.max(position, 0);
+//                List<LocalMedia> mediasList = new ArrayList<>();
+//                for (int i = 0; i < mData.size(); i++) {
+//                    LocalMedia media = new LocalMedia (mData.get(i).getUrl(), 0, PictureConfig.TYPE_IMAGE, "");
+//                    media.setCut(false);
+//                    mediasList.add(media);
+//                }
+//                com.luck.picture.lib.PictureSelector.create(mActivity).externalPicturePreview(position, mediasList);
+
+                    RxDialogZoomImageView rxDialogZoomImageView = new RxDialogZoomImageView(mContext);
+//                rxDialogZoomImageView.setImagePath(mData.get(position));
+                    rxDialogZoomImageView.show();
+
+                }
+            });
+        }
+    }
+
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        //XLog.e("event:"+event.getKeyCode());
+//        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
+//            //按确定键
+//            if(validate()){
+//                doPutIn();
+//            }
+//            return true;
+//        }
+        return super.dispatchKeyEvent(event);
+    }
+
+    //监听按键
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        //XLog.e("监听按键:"+keyCode);XLog.e(event);
+        if (scanBean.getIsBroadcast() == 0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode) == StoPdaKeyEvent.KEYCODE_SCAN
+                && event.getRepeatCount() == 0) {
+
+            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
+//
+            } else {
+                StoTongJNI.getIns(mContext).SetScannerStart();
+            }
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+
+    @SuppressLint("HandlerLeak")
+    Handler scanHandler = new Handler() {
+
+        @Override
+        public void handleMessage(Message msg) {
+            // TODO Auto-generated method stub
+            if (msg.obj != null) {
+
+                String scanResult = msg.obj.toString().trim();
+                if (!scanResult.isEmpty()) {
+                    setScanResult(scanResult);
+                }
+            }
+
+        }
+
+    };
+
+    @Override
+    public void onScanResults(String str) {
+        Message msg = new Message();
+        msg.obj = str;
+        scanHandler.sendMessage(msg);
+
+
+    }
+
+
+    @Override
+    public void onScanResults(String str, int type) {
+
+    }
+
+    /**
+     * 定义广播接受
+     */
+    BroadcastReceiver mReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String scanResult = intent.getStringExtra(scanBean.getDataName());
+            if (scanResult == null) {
+                return;
+            }
+            String scanStatus = "";
+            if (!scanBean.getStatusName().isEmpty()) {
+                scanStatus = intent.getStringExtra(scanBean.getStatusName());
+            } else {
+                scanStatus = scanResult.isEmpty() ? "" : "ok"; //有值 默认是扫码成功;
+            }
+
+            //新大陆(MT65,MT90) 需要手动关闭
+            if (!scanBean.getActionStop().isEmpty()) {
+                Intent stopIntent = new Intent(scanBean.getActionStop());
+                mContext.sendBroadcast(stopIntent);
+            }
+
+            if ("ok".equals(scanStatus)) {
+                setScanResult(scanResult);
+            } else {
+                showErrorToast(getString(R.string.scan_failed));
+            }
+        }
+    };
+
+    /**
+     * 注册广播
+     */
+    private void initReceiver() {
+
+        try {
+
+            String scanStr = getScanSetting();
+            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
+            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
+
+            if (is_broadcast == 1) {
+                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
+                this.registerReceiver(mReceiver, mFilter);
+            } else {
+                //不广播进行处理 jni模式
+                String pdaBrand = StoTongJNI.getmPdaBrand();
+                if (!pdaBrand.isEmpty()) {
+                    StoTongJNI.getIns(this).setmScanCB(this);
+                    StoTongJNI.getIns(this).SetScannerOn();
+                }
+            }
+
+
+        } catch (Exception e) {
+            showErrorToast("获取扫码配置失败" + e.getMessage());
+            XLog.e("获取扫码配置失败:" + e.getMessage());
+        }
+    }
+
+
+    //统一按钮回调
+    public void callbackEditor(View v) {
+        switch (v.getId()) {
+
+            
+            default:
+        }
+    }
+
+    private void initEdit() {
+
+
+ 
+    }
+
+    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
+        @Override
+        public void onSuccess(String type, Result result) {
+            String scanResult = result.getText();
+            switch (type) {
+                case BaseConfig.COMMON_SCANNER_ONLY:
+                    setScanResult(scanResult);
+
+                    break;
+            }
+        }
+
+        @Override
+        public void onFail(String type, String message) {
+
+        }
+    };
+
+    //把扫描结果赋值
+    private void setScanResult(String scanResult) {
+        //获取焦点的view对象
+        View view = getWindow().getDecorView().findFocus();
+        //如果是EditText
+        if (view instanceof EditText) {
+            ((EditText) view).setText(scanResult);
+            //执行回调
+            callbackEditor(view);
+        }
+    }
+
+
+    /*
+     * 校验必录
+     */
+    private boolean validate() {
+
+        try {
+            submitData.put("box_number",confirmGoodsBean.getBoxNumber());
+            submitData.put("goods_id",confirmGoodsBean.getGoodsId());
+            submitData.put("unit_code",confirmGoodsBean.getUnitCode());
+            submitData.put("node_code",confirmGoodsBean.getNodeCode());
+            submitData.put("tan_kuang",1);
+
+            JSONArray steps = new JSONArray();
+
+            for (int i=0;i<partsBeanList.size();i++){
+                JSONObject item = new JSONObject();
+                item.put("node_code",confirmGoodsBean.getNodeCode());
+                item.put("attr_id",partsBeanList.get(i).getPartsId());
+                steps.put(item);
+            }
+
+            submitData.put("steps",steps);
+
+
+
+
+        } catch (JSONException e) {
+            e.printStackTrace();
+            showErrorToast(e.getMessage());
+            return false;
+        }
+
+
+        return true;
+    }
+
+    /**
+     * 检查打托信息
+     */
+    private void confirmParts() {
+
+        if (!validate()){
+            return;
+        }
+
+
+        String postJson = submitData.toString();;
+        if (!checkRepeat(Urls.FXY_DETECTION_COMPLETED + (postJson))) {
+            return;
+        }
+        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_COMPLETED).upJson(postJson)
+                .execute(new MyDialogCallback(this, true, true) {
+                    @Override
+                    public void onSuccess(Response<String> response) {
+                        super.onSuccess(response);
+                        try {
+                            ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
+                            if (bean.code == 1) {
+                                showSuccessToast(bean.msg);
+                                Intent intent = new Intent();
+                                setResult(200, intent);//返回值,200 是改返回的标志,也会返回
+                                finish();
+
+                            } else {
+                                showWarningToast(bean.msg);
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            XLog.e("请求返回打托信息错误", e.getMessage());
+                        }
+                    }
+                });
+
+
+    }
+
+
+    //清除订单信息
+    private void clearData() {
+
+    }
+
+    @OnClick({R.id.btn_default})
+    public void onViewClicked(View view) {
+        Bundle bundle = new Bundle();
+        switch (view.getId()) {
+            case R.id.btn_default:
+                isDefault = true;
+                setBtnCenter();
+                break;
+            default:
+                break;
+        }
+    }
+
+
+
+    @Override
+    protected void onDestroy() {
+        unbinder.unbind();
+
+
+        super.onDestroy();
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        initReceiver();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        //销毁在onResume()方法中的广播
+        try {
+            //停止扫描
+            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
+            if (is_broadcast == 0) {
+                StoTongJNI.getIns(mContext).SetScannerStop();
+                StoTongJNI.getIns(mContext).SetScannerOff();
+            } else {
+                unregisterReceiver(mReceiver);
+            }
+        } catch (Exception e) {
+            XLog.e("销毁广播失败:", e.getMessage());
+        }
+    }
+
+
+}

+ 510 - 0
app/src/main/java/com/fxy/detection/DetectionDealDiffMainActivity.java

@@ -0,0 +1,510 @@
+package com.fxy.detection;
+
+import android.annotation.SuppressLint;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v7.widget.RecyclerView;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.elvishew.xlog.XLog;
+import com.fxy.R;
+import com.fxy.baselibrary.base.BaseActivity;
+import com.fxy.baselibrary.bean.BaseEventBusBean;
+import com.fxy.baselibrary.interfaces.OnRxScanerListener;
+import com.fxy.baselibrary.util.JsonUtil;
+import com.fxy.baselibrary.views.MarqueeTextView;
+import com.fxy.bean.ActionBean;
+import com.fxy.bean.ScanBean;
+import com.fxy.common.PictureSelectorUpload;
+import com.fxy.constant.BaseConfig;
+import com.fxy.constant.EventCode;
+import com.fxy.detection.bean.DealDiffBean;
+import com.fxy.detection.bean.NeedPhotoBean;
+import com.fxy.net.MyDialogCallback;
+import com.fxy.net.Urls;
+import com.google.gson.Gson;
+import com.google.zxing.Result;
+import com.luck.picture.lib.config.PictureConfig;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+import sto.android.app.StoJNI;
+import sto.android.app.StoPdaKeyEvent;
+import sto.android.app.StoTongJNI;
+
+public class DetectionDealDiffMainActivity extends BaseActivity implements StoJNI.ScanCallBack {
+    /**
+     * 列表适配器
+     */
+    Context mContext = this;
+
+
+    @BindView(R.id.mt_box_number)
+    MarqueeTextView mtBoxNumber;
+
+    @BindView(R.id.mt_unit_code)
+    MarqueeTextView mtUnitCode;
+
+    @BindView(R.id.recyclerview)
+    RecyclerView recyclerView;
+
+    @BindView(R.id.ll_recycler_view)
+    LinearLayout llRecyclerView;
+
+
+    private DealDiffBean dealDiffBean = new DealDiffBean();
+    private List<NeedPhotoBean> listNeedPhoto  = new ArrayList<>();
+
+    //节点
+    private String nodeCode = "";
+
+    //定义文件上传
+    private HashMap<Integer,PictureSelectorUpload> mapPictureSelector = new HashMap<>();
+    private int currentPictureInx = -1;
+
+    //提交数据
+    private JSONObject submitData = new JSONObject();
+
+    private Unbinder unbinder;
+
+    private ScanBean scanBean;
+
+    @Override
+    public int getContentViewResId() {
+        return R.layout.activity_fxy_detection_deal_diff;
+    }
+
+    @Override
+    public boolean showToolBar() {
+        return true;
+    }
+
+    @Override
+    public boolean openEventBus() {
+        return true;
+    }
+
+    @Override
+    protected void getBundleExtras(Bundle bundle) {
+
+        dealDiffBean = JsonUtil.jsonString2Bean(bundle.getString("data"),DealDiffBean.class);
+
+    }
+
+    //finish的返回监听
+    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
+    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
+    //第三个参数包含了返回的值
+    //如果不需要所跳转的页面返回值,也就不需要这个方法了
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+
+        // 图片选择结果回调
+        if (resultCode == RESULT_OK) {
+            // 图片选择结果回调
+            if (requestCode == PictureConfig.CHOOSE_REQUEST || requestCode == PictureConfig.REQUEST_CAMERA) {
+                PictureSelectorUpload filedUpload = mapPictureSelector.get(currentPictureInx);
+                if (filedUpload != null){
+                    filedUpload.getSelectImg(data);
+                }
+            }
+        }
+
+    }
+
+
+    /**
+     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
+     *
+     * @param event
+     */
+    @Override
+    protected void EventBean(BaseEventBusBean event) {
+//        XLog.e("----------接收返回--------------");
+//        XLog.e("接收返回:"+event.getEventCode());
+        if (event != null && event.getEventCode() == EventCode.displacement_refresh) {
+
+        }
+    }
+
+    @Override
+    public boolean isPlayMusic() {
+        return true;
+    }
+
+    @Override
+    protected void initView() {
+        unbinder = ButterKnife.bind(this);
+        setTitleName("主机差异");
+        initData();
+    }
+
+
+
+    private void initData() {
+        nodeCode = dealDiffBean.getNodeCode();
+
+        mtBoxNumber.setText(dealDiffBean.getBoxNumber());
+        mtUnitCode.setText(dealDiffBean.getUnitCode());
+        listNeedPhoto = dealDiffBean.getNeedPhotos();
+
+
+        if (listNeedPhoto!=null){
+            for (int i=0;i<listNeedPhoto.size();i++){
+                addPictureSelectorUpload(i,listNeedPhoto.get(i).getLimit());
+            }
+        }
+
+    }
+
+    /**
+     *
+     * @param position int 遍历添加
+     */
+    private void addPictureSelectorUpload(int position,int limit){
+        String tagKey = "recyclerview"+position;
+        View itemPictureSelector = View.inflate(mContext, R.layout.item_picture_selector, null);
+        TextView tvPicturesTitle =   itemPictureSelector.findViewById(R.id.tv_pictures_title);
+        tvPicturesTitle.setText(listNeedPhoto.get(position).getFieldKey());
+        RecyclerView rvLabelShowImg = (RecyclerView)itemPictureSelector.findViewById(R.id.recyclerview);
+        itemPictureSelector.setTag(tagKey);
+        llRecyclerView.addView(itemPictureSelector);
+        PictureSelectorUpload tmpPictureSelector  = setItemPicture(String.valueOf(position),rvLabelShowImg,limit,PictureConfig.TYPE_IMAGE);
+        mapPictureSelector.put(position,tmpPictureSelector);
+    }
+
+    /**
+     * 设置多个上传文件
+     * @param actionType String
+     * @param showImg RecyclerView
+     */
+    private PictureSelectorUpload setItemPicture(String actionType,RecyclerView showImg,int maxNum,int pictureType){
+        PictureSelectorUpload pictureUpload = new PictureSelectorUpload(DetectionDealDiffMainActivity.this,showImg,"detection",maxNum,pictureType);
+        pictureUpload.setActionType(actionType);
+        pictureUpload.setCompress(true,100,500);
+        pictureUpload.setOnlyCamera(true);
+        pictureUpload.setProgressType(2);
+        //showImg.onTouchEvent()
+
+        pictureUpload.setOnChangeListener(new PictureSelectorUpload.UploadChangeListener() {
+            @Override
+            public void uploadResult(boolean State,String actionType) {
+                if (State) {
+
+                }
+            }
+
+            @Override
+            public void uploadActionType(String actionType) {
+                System.out.println("actionType:"+actionType);
+                currentPictureInx = Integer.parseInt(actionType);
+            }
+        });
+        return  pictureUpload;
+    }
+
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        //XLog.e("event:"+event.getKeyCode());
+//        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
+//            //按确定键
+//            if(validate()){
+//                doPutIn();
+//            }
+//            return true;
+//        }
+        return super.dispatchKeyEvent(event);
+    }
+
+    //监听按键
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        //XLog.e("监听按键:"+keyCode);XLog.e(event);
+        if (scanBean.getIsBroadcast() == 0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode) == StoPdaKeyEvent.KEYCODE_SCAN
+                && event.getRepeatCount() == 0) {
+
+            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
+//
+            } else {
+                StoTongJNI.getIns(mContext).SetScannerStart();
+            }
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+
+    @SuppressLint("HandlerLeak")
+    Handler scanHandler = new Handler() {
+
+        @Override
+        public void handleMessage(Message msg) {
+            // TODO Auto-generated method stub
+            if (msg.obj != null) {
+
+                String scanResult = msg.obj.toString().trim();
+                if (!scanResult.isEmpty()) {
+                    setScanResult(scanResult);
+                }
+            }
+
+        }
+
+    };
+
+    @Override
+    public void onScanResults(String str) {
+        Message msg = new Message();
+        msg.obj = str;
+        scanHandler.sendMessage(msg);
+
+
+    }
+
+
+    @Override
+    public void onScanResults(String str, int type) {
+
+    }
+
+    /**
+     * 定义广播接受
+     */
+    BroadcastReceiver mReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String scanResult = intent.getStringExtra(scanBean.getDataName());
+            if (scanResult == null) {
+                return;
+            }
+            String scanStatus = "";
+            if (!scanBean.getStatusName().isEmpty()) {
+                scanStatus = intent.getStringExtra(scanBean.getStatusName());
+            } else {
+                scanStatus = scanResult.isEmpty() ? "" : "ok"; //有值 默认是扫码成功;
+            }
+
+            //新大陆(MT65,MT90) 需要手动关闭
+            if (!scanBean.getActionStop().isEmpty()) {
+                Intent stopIntent = new Intent(scanBean.getActionStop());
+                mContext.sendBroadcast(stopIntent);
+            }
+
+            if ("ok".equals(scanStatus)) {
+                setScanResult(scanResult);
+            } else {
+                showErrorToast(getString(R.string.scan_failed));
+            }
+        }
+    };
+
+    /**
+     * 注册广播
+     */
+    private void initReceiver() {
+
+        try {
+
+            String scanStr = getScanSetting();
+            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
+            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
+
+            if (is_broadcast == 1) {
+                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
+                this.registerReceiver(mReceiver, mFilter);
+            } else {
+                //不广播进行处理 jni模式
+                String pdaBrand = StoTongJNI.getmPdaBrand();
+                if (!pdaBrand.isEmpty()) {
+                    StoTongJNI.getIns(this).setmScanCB(this);
+                    StoTongJNI.getIns(this).SetScannerOn();
+                }
+            }
+
+
+        } catch (Exception e) {
+            showErrorToast("获取扫码配置失败" + e.getMessage());
+            XLog.e("获取扫码配置失败:" + e.getMessage());
+        }
+    }
+
+
+    //统一按钮回调
+    public void callbackEditor(View v) {
+        switch (v.getId()) {
+            default:
+        }
+    }
+
+    private void initEdit() {
+
+    }
+
+    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
+        @Override
+        public void onSuccess(String type, Result result) {
+            String scanResult = result.getText();
+            switch (type) {
+                case BaseConfig.COMMON_SCANNER_ONLY:
+                    setScanResult(scanResult);
+
+                    break;
+            }
+        }
+
+        @Override
+        public void onFail(String type, String message) {
+
+        }
+    };
+
+    //把扫描结果赋值
+    private void setScanResult(String scanResult) {
+        //获取焦点的view对象
+        View view = getWindow().getDecorView().findFocus();
+        //如果是EditText
+        if (view instanceof EditText) {
+            ((EditText) view).setText(scanResult);
+            //执行回调
+            callbackEditor(view);
+        }
+    }
+
+
+    /**
+     * 完成
+     */
+    private void doConfirm() {
+        if (!validate()) {
+            return;
+        }
+
+        String postJson = submitData.toString();
+        if (!checkRepeat(Urls.FXY_DETECTION_COMPLETED + (postJson))) {
+            return;
+        }
+        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_COMPLETED).upJson(postJson)
+                .execute(new MyDialogCallback(this, true, true) {
+                    @Override
+                    public void onSuccess(Response<String> response) {
+                        super.onSuccess(response);
+                        try {
+                            ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
+                            if (bean.code == 1) {
+                                showSuccessToast(bean.msg);
+                                finish();
+                            } else {
+                                showWarningToast(bean.msg);
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            XLog.e("请求返回信息错误", e.getMessage());
+                        }
+                    }
+                });
+    }
+
+
+    /*
+     * 校验必录
+     */
+    private boolean validate() {
+
+        try {
+            submitData.put("box_number",dealDiffBean.getBoxNumber());
+            submitData.put("goods_id","");
+            submitData.put("unit_code",dealDiffBean.getUnitCode());
+
+            JSONArray steps = new JSONArray();
+            if (listNeedPhoto!=null && listNeedPhoto.size()>0){
+                for (int i=0;i<listNeedPhoto.size();i++){
+                    JSONObject item = new JSONObject();
+                    ArrayList<String> urlList = mapPictureSelector.get(i).getPhotoList();
+                    String fieldKey = listNeedPhoto.get(i).getFieldKey();
+                    if (urlList.size()==0){
+                        showErrorToast(fieldKey+"需要拍照");
+                        return  false;
+                    }
+                    item.put("node_code",nodeCode);
+                    item.put("attr_id","");
+                    item.put("field_key",fieldKey);
+                    item.put("url",(new Gson()).toJson(urlList));
+                    steps.put(i,item);
+                }
+            }
+        } catch (JSONException e) {
+            e.printStackTrace();
+            showErrorToast(e.getMessage());
+            return false;
+        }
+
+
+        return true;
+    }
+
+
+
+    @OnClick({R.id.btn_confirm})
+    public void onViewClicked(View view) {
+        Bundle bundle = new Bundle();
+        switch (view.getId()) {
+            case R.id.btn_confirm:
+                doConfirm();
+                break;
+            default:
+                break;
+        }
+    }
+
+
+    @Override
+    protected void onDestroy() {
+        unbinder.unbind();
+        super.onDestroy();
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        initReceiver();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        //销毁在onResume()方法中的广播
+        try {
+            //停止扫描
+            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
+            if (is_broadcast == 0) {
+                StoTongJNI.getIns(mContext).SetScannerStop();
+                StoTongJNI.getIns(mContext).SetScannerOff();
+            } else {
+                unregisterReceiver(mReceiver);
+            }
+        } catch (Exception e) {
+            XLog.e("销毁广播失败:", e.getMessage());
+        }
+    }
+
+
+}

File diff suppressed because it is too large
+ 671 - 198
app/src/main/java/com/fxy/detection/DetectionWorkMainActivity.java


+ 148 - 0
app/src/main/java/com/fxy/detection/bean/BaseBean.java

@@ -0,0 +1,148 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BaseBean implements Parcelable  {
+
+    private String box_number = ""; //
+    private String goods_id = ""; //
+    private String unit_code = ""; //
+    private String node_code = ""; //
+    private String node_name = ""; //
+    private String options_type = "radio"; //
+    private String result = ""; //
+    private List<OptionsBean> options = new ArrayList<>(); //
+    private List<NeedPhotoBean> need_photos = new ArrayList<>(); //
+    private SuspendBean zhong_duan = new SuspendBean(); //
+
+    public BaseBean(){
+
+    }
+
+
+    protected BaseBean(Parcel in) {
+        box_number = in.readString();
+        goods_id = in.readString();
+        unit_code = in.readString();
+        node_code = in.readString();
+        node_name = in.readString();
+        options_type = in.readString();
+        result = in.readString();
+        options = in.createTypedArrayList(OptionsBean.CREATOR);
+        need_photos = in.createTypedArrayList(NeedPhotoBean.CREATOR);
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(box_number);
+        dest.writeString(goods_id);
+        dest.writeString(unit_code);
+        dest.writeString(node_code);
+        dest.writeString(node_name);
+        dest.writeString(options_type);
+        dest.writeString(result);
+        dest.writeTypedList(options);
+        dest.writeTypedList(need_photos);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<BaseBean> CREATOR = new Creator<BaseBean>() {
+        @Override
+        public BaseBean createFromParcel(Parcel in) {
+            return new BaseBean(in);
+        }
+
+        @Override
+        public BaseBean[] newArray(int size) {
+            return new BaseBean[size];
+        }
+    };
+
+    public String getBoxNumber() {
+        return box_number;
+    }
+
+    public void setBoxNumber(String box_number) {
+        this.box_number = box_number;
+    }
+
+    public String getGoodsId() {
+        return goods_id;
+    }
+
+    public void setGoodsId(String goods_id) {
+        this.goods_id = goods_id;
+    }
+
+    public String getUnitCode() {
+        return unit_code;
+    }
+
+    public void setUnitCode(String unit_code) {
+        this.unit_code = unit_code;
+    }
+
+    public String getNodeCode() {
+        return node_code;
+    }
+
+    public void setNodeCode(String node_code) {
+        this.node_code = node_code;
+    }
+
+    public String getOptionsType() {
+        return options_type;
+    }
+
+    public void setOptionsType(String options_type) {
+        this.options_type = options_type;
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+    public List<OptionsBean> getOptions() {
+        return options;
+    }
+
+    public void setOptions(List<OptionsBean> options) {
+        this.options = options;
+    }
+
+    public List<NeedPhotoBean> getNeedPhotos() {
+        return need_photos;
+    }
+
+    public void setNeedPhotos(List<NeedPhotoBean> need_photos) {
+        this.need_photos = need_photos;
+    }
+
+    public SuspendBean getZhongDuan() {
+        return zhong_duan;
+    }
+
+    public void setZhongDuan(SuspendBean zhong_duan) {
+        this.zhong_duan = zhong_duan;
+    }
+
+    public String getNodeName() {
+        return node_name;
+    }
+
+    public void setNodeName(String node_name) {
+        this.node_name = node_name;
+    }
+}

+ 109 - 0
app/src/main/java/com/fxy/detection/bean/BtnInfoBean.java

@@ -0,0 +1,109 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BtnInfoBean implements Parcelable{
+    private String key = "";
+    private String value = "";
+    private String txt = "";
+    private String tip = "";
+    private List<NeedPhotoBean> need_photos = new ArrayList<>();
+    private Boolean checked = false;
+
+    public BtnInfoBean(){
+
+    }
+
+
+    protected BtnInfoBean(Parcel in) {
+        key = in.readString();
+        value = in.readString();
+        txt = in.readString();
+        tip = in.readString();
+        need_photos = in.createTypedArrayList(NeedPhotoBean.CREATOR);
+        byte tmpChecked = in.readByte();
+        checked = tmpChecked == 0 ? null : tmpChecked == 1;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(key);
+        dest.writeString(value);
+        dest.writeString(txt);
+        dest.writeString(tip);
+        dest.writeTypedList(need_photos);
+        dest.writeByte((byte) (checked == null ? 0 : checked ? 1 : 2));
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<BtnInfoBean> CREATOR = new Creator<BtnInfoBean>() {
+        @Override
+        public BtnInfoBean createFromParcel(Parcel in) {
+            return new BtnInfoBean(in);
+        }
+
+        @Override
+        public BtnInfoBean[] newArray(int size) {
+            return new BtnInfoBean[size];
+        }
+    };
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getTxt() {
+        return txt;
+    }
+
+    public void setTxt(String txt) {
+        this.txt = txt;
+    }
+
+    public String getTip() {
+        return tip;
+    }
+
+    public BtnInfoBean setTip(String tip) {
+        this.tip = tip;
+        return this;
+    }
+
+    public List<NeedPhotoBean> getNeedPhotos() {
+        return need_photos;
+    }
+
+    public BtnInfoBean setNeedPhotos(List<NeedPhotoBean> need_photos) {
+        this.need_photos = need_photos;
+        return this;
+    }
+
+    public Boolean getChecked() {
+        return checked;
+    }
+
+    public BtnInfoBean setChecked(Boolean checked) {
+        this.checked = checked;
+        return this;
+    }
+}

+ 114 - 0
app/src/main/java/com/fxy/detection/bean/ConfirmGoodsBean.java

@@ -0,0 +1,114 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class ConfirmGoodsBean implements Parcelable {
+
+    private String box_number = ""; //
+    private String goods_id = ""; //
+    private String unit_code = ""; //
+    private String node_code = ""; //
+    private String node_name = ""; //
+    private String result = ""; //
+    private String is_confirm = "";
+
+    public ConfirmGoodsBean(){
+
+    }
+
+
+    protected ConfirmGoodsBean(Parcel in) {
+        box_number = in.readString();
+        goods_id = in.readString();
+        unit_code = in.readString();
+        node_code = in.readString();
+        node_name = in.readString();
+        result = in.readString();
+        is_confirm = in.readString();
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(box_number);
+        dest.writeString(goods_id);
+        dest.writeString(unit_code);
+        dest.writeString(node_code);
+        dest.writeString(node_name);
+        dest.writeString(result);
+        dest.writeString(is_confirm);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<ConfirmGoodsBean> CREATOR = new Creator<ConfirmGoodsBean>() {
+        @Override
+        public ConfirmGoodsBean createFromParcel(Parcel in) {
+            return new ConfirmGoodsBean(in);
+        }
+
+        @Override
+        public ConfirmGoodsBean[] newArray(int size) {
+            return new ConfirmGoodsBean[size];
+        }
+    };
+
+    public String getBoxNumber() {
+        return box_number;
+    }
+
+    public void setBoxNumber(String box_number) {
+        this.box_number = box_number;
+    }
+
+    public String getGoodsId() {
+        return goods_id;
+    }
+
+    public void setGoodsId(String goods_id) {
+        this.goods_id = goods_id;
+    }
+
+    public String getUnitCode() {
+        return unit_code;
+    }
+
+    public void setUnitCode(String unit_code) {
+        this.unit_code = unit_code;
+    }
+
+    public String getNodeCode() {
+        return node_code;
+    }
+
+    public void setNodeCode(String node_code) {
+        this.node_code = node_code;
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+    public String getNodeName() {
+        return node_name;
+    }
+
+    public void setNodeName(String node_name) {
+        this.node_name = node_name;
+    }
+
+    public String getIsConfirm() {
+        return is_confirm;
+    }
+
+    public void setIsConfirm(String is_confirm) {
+        this.is_confirm = is_confirm;
+    }
+}

+ 82 - 0
app/src/main/java/com/fxy/detection/bean/ConfirmPartsBean.java

@@ -0,0 +1,82 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ConfirmPartsBean implements Parcelable {
+    private String content="";
+    private List<PartsBean> parts_list = new ArrayList<>();
+    private List<BtnInfoBean> btns_que = new ArrayList<>();
+    private List<BtnInfoBean> btns_no_que = new ArrayList<>();
+
+    public ConfirmPartsBean(){
+
+    }
+
+    protected ConfirmPartsBean(Parcel in) {
+        content = in.readString();
+        parts_list = in.createTypedArrayList(PartsBean.CREATOR);
+        btns_que = in.createTypedArrayList(BtnInfoBean.CREATOR);
+        btns_no_que = in.createTypedArrayList(BtnInfoBean.CREATOR);
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(content);
+        dest.writeTypedList(parts_list);
+        dest.writeTypedList(btns_que);
+        dest.writeTypedList(btns_no_que);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<ConfirmPartsBean> CREATOR = new Creator<ConfirmPartsBean>() {
+        @Override
+        public ConfirmPartsBean createFromParcel(Parcel in) {
+            return new ConfirmPartsBean(in);
+        }
+
+        @Override
+        public ConfirmPartsBean[] newArray(int size) {
+            return new ConfirmPartsBean[size];
+        }
+    };
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public List<PartsBean> getPartsList() {
+        return parts_list;
+    }
+
+    public void setPartsList(List<PartsBean> parts_list) {
+        this.parts_list = parts_list;
+    }
+
+    public List<BtnInfoBean> getBtnsQue() {
+        return btns_que;
+    }
+
+    public void setBtnsQue(List<BtnInfoBean> btns_que) {
+        this.btns_que = btns_que;
+    }
+
+    public List<BtnInfoBean> getBtnsNoQue() {
+        return btns_no_que;
+    }
+
+    public void setBtnsNoQue(List<BtnInfoBean> btns_no_que) {
+        this.btns_no_que = btns_no_que;
+    }
+}

+ 100 - 0
app/src/main/java/com/fxy/detection/bean/DealDiffBean.java

@@ -0,0 +1,100 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 处理主机查验bean
+ */
+public class DealDiffBean implements Parcelable  {
+
+    private String box_number = ""; //
+    private String unit_code = ""; //
+    private String node_code = ""; //
+    private String result = ""; //
+    private List<NeedPhotoBean> need_photos = new ArrayList<>(); //
+    public DealDiffBean(){
+    }
+
+
+    protected DealDiffBean(Parcel in) {
+        box_number = in.readString();
+        unit_code = in.readString();
+        node_code = in.readString();
+        result = in.readString();
+        need_photos = in.createTypedArrayList(NeedPhotoBean.CREATOR);
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(box_number);
+        dest.writeString(unit_code);
+        dest.writeString(node_code);
+        dest.writeString(result);
+        dest.writeTypedList(need_photos);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<DealDiffBean> CREATOR = new Creator<DealDiffBean>() {
+        @Override
+        public DealDiffBean createFromParcel(Parcel in) {
+            return new DealDiffBean(in);
+        }
+
+        @Override
+        public DealDiffBean[] newArray(int size) {
+            return new DealDiffBean[size];
+        }
+    };
+
+    public String getBoxNumber() {
+        return box_number;
+    }
+
+    public void setBoxNumber(String box_number) {
+        this.box_number = box_number;
+    }
+
+
+    public String getUnitCode() {
+        return unit_code;
+    }
+
+    public void setUnitCode(String unit_code) {
+        this.unit_code = unit_code;
+    }
+
+    public String getNodeCode() {
+        return node_code;
+    }
+
+    public void setNodeCode(String node_code) {
+        this.node_code = node_code;
+    }
+
+
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+
+    public List<NeedPhotoBean> getNeedPhotos() {
+        return need_photos;
+    }
+
+    public void setNeedPhotos(List<NeedPhotoBean> need_photos) {
+        this.need_photos = need_photos;
+    }
+}

+ 57 - 0
app/src/main/java/com/fxy/detection/bean/NeedPhotoBean.java

@@ -0,0 +1,57 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class NeedPhotoBean implements Parcelable {
+    private String field_key = "";
+    private int limit = 1;
+
+    public NeedPhotoBean(){
+
+    }
+
+    protected NeedPhotoBean(Parcel in) {
+        field_key = in.readString();
+        limit = in.readInt();
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(field_key);
+        dest.writeInt(limit);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<NeedPhotoBean> CREATOR = new Creator<NeedPhotoBean>() {
+        @Override
+        public NeedPhotoBean createFromParcel(Parcel in) {
+            return new NeedPhotoBean(in);
+        }
+
+        @Override
+        public NeedPhotoBean[] newArray(int size) {
+            return new NeedPhotoBean[size];
+        }
+    };
+
+    public String getFieldKey() {
+        return field_key;
+    }
+
+    public void setFieldKey(String field_key) {
+        this.field_key = field_key;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
+}

+ 166 - 0
app/src/main/java/com/fxy/detection/bean/OptionsBean.java

@@ -0,0 +1,166 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class OptionsBean implements Parcelable {
+    private String type = ""; //
+    private String attr_id = ""; //
+    private String title = ""; //
+    private String content = ""; //
+    private String result = ""; //
+    private String tip = ""; //
+    private String name = ""; //
+
+    private List<NeedPhotoBean> need_photo = new ArrayList<>(); //
+    private List<RepairConfirmBean> confirm = new ArrayList<>(); //
+    private List<BtnInfoBean> btns = new ArrayList<>(); //
+
+    private Boolean checked = false;
+
+
+    public OptionsBean() {
+
+    }
+
+
+    protected OptionsBean(Parcel in) {
+        type = in.readString();
+        attr_id = in.readString();
+        title = in.readString();
+        content = in.readString();
+        result = in.readString();
+        tip = in.readString();
+        name = in.readString();
+        need_photo = in.createTypedArrayList(NeedPhotoBean.CREATOR);
+        confirm = in.createTypedArrayList(RepairConfirmBean.CREATOR);
+        btns = in.createTypedArrayList(BtnInfoBean.CREATOR);
+        byte tmpChecked = in.readByte();
+        checked = tmpChecked == 0 ? null : tmpChecked == 1;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(type);
+        dest.writeString(attr_id);
+        dest.writeString(title);
+        dest.writeString(content);
+        dest.writeString(result);
+        dest.writeString(tip);
+        dest.writeString(name);
+        dest.writeTypedList(need_photo);
+        dest.writeTypedList(confirm);
+        dest.writeTypedList(btns);
+        dest.writeByte((byte) (checked == null ? 0 : checked ? 1 : 2));
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<OptionsBean> CREATOR = new Creator<OptionsBean>() {
+        @Override
+        public OptionsBean createFromParcel(Parcel in) {
+            return new OptionsBean(in);
+        }
+
+        @Override
+        public OptionsBean[] newArray(int size) {
+            return new OptionsBean[size];
+        }
+    };
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getAttrId() {
+        return attr_id;
+    }
+
+    public void setAttrId(String attr_id) {
+        this.attr_id = attr_id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+    public List<NeedPhotoBean> getNeedPhoto() {
+        return need_photo;
+    }
+
+    public void setNeedPhoto(List<NeedPhotoBean> need_photo) {
+        this.need_photo = need_photo;
+    }
+
+    public List<RepairConfirmBean> getConfirm() {
+        return confirm;
+    }
+
+    public void setConfirm(List<RepairConfirmBean> confirm) {
+        this.confirm = confirm;
+    }
+
+    public List<BtnInfoBean> getBtns() {
+        return btns;
+    }
+
+    public void setBtns(List<BtnInfoBean> btns) {
+        this.btns = btns;
+    }
+
+    public Boolean getChecked() {
+        return checked;
+    }
+
+    public void setChecked(Boolean checked) {
+        this.checked = checked;
+    }
+
+    public String getTip() {
+        return tip;
+    }
+
+    public OptionsBean setTip(String tip) {
+        this.tip = tip;
+        return this;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public OptionsBean setName(String name) {
+        this.name = name;
+        return this;
+    }
+}

+ 82 - 0
app/src/main/java/com/fxy/detection/bean/PartsBean.java

@@ -0,0 +1,82 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class PartsBean implements Parcelable {
+    private String parts_id="";
+    private String parts_name="";
+    private String url="";
+    private Boolean checked = false;
+
+
+    public PartsBean(){
+
+    }
+
+
+    protected PartsBean(Parcel in) {
+        parts_id = in.readString();
+        parts_name = in.readString();
+        url = in.readString();
+        byte tmpChecked = in.readByte();
+        checked = tmpChecked == 0 ? null : tmpChecked == 1;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(parts_id);
+        dest.writeString(parts_name);
+        dest.writeString(url);
+        dest.writeByte((byte) (checked == null ? 0 : checked ? 1 : 2));
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<PartsBean> CREATOR = new Creator<PartsBean>() {
+        @Override
+        public PartsBean createFromParcel(Parcel in) {
+            return new PartsBean(in);
+        }
+
+        @Override
+        public PartsBean[] newArray(int size) {
+            return new PartsBean[size];
+        }
+    };
+
+    public String getPartsId() {
+        return parts_id;
+    }
+
+    public void setPartsId(String parts_id) {
+        this.parts_id = parts_id;
+    }
+
+    public String getPartsName() {
+        return parts_name;
+    }
+
+    public void setPartsName(String parts_name) {
+        this.parts_name = parts_name;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public Boolean getChecked() {
+        return checked;
+    }
+
+    public void setChecked(Boolean checked) {
+        this.checked = checked;
+    }
+}

+ 59 - 0
app/src/main/java/com/fxy/detection/bean/RepairConfirmBean.java

@@ -0,0 +1,59 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class RepairConfirmBean implements Parcelable {
+
+    private String name = "";
+    private String txt = "";
+
+    public RepairConfirmBean(){
+
+    }
+
+
+    protected RepairConfirmBean(Parcel in) {
+        name = in.readString();
+        txt = in.readString();
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(name);
+        dest.writeString(txt);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<RepairConfirmBean> CREATOR = new Creator<RepairConfirmBean>() {
+        @Override
+        public RepairConfirmBean createFromParcel(Parcel in) {
+            return new RepairConfirmBean(in);
+        }
+
+        @Override
+        public RepairConfirmBean[] newArray(int size) {
+            return new RepairConfirmBean[size];
+        }
+    };
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getTxt() {
+        return txt;
+    }
+
+    public void setTxt(String txt) {
+        this.txt = txt;
+    }
+}

+ 0 - 95
app/src/main/java/com/fxy/detection/bean/StepsBaseBean.java

@@ -1,95 +0,0 @@
-package com.fxy.detection.bean;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import com.zebra.adc.decoder.BarCodeReader;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class StepsBaseBean  implements Parcelable  {
-
-    private String box_number = ""; //
-    private String goods_id = ""; //
-    private String unit_code = ""; //
-    private String total = ""; //
-    private List<StepsInfoBean> steps = new ArrayList<>(); //
-
-    public StepsBaseBean(){
-
-    }
-    protected StepsBaseBean(Parcel in) {
-        box_number = in.readString();
-        goods_id = in.readString();
-        unit_code = in.readString();
-        total = in.readString();
-        steps = in.createTypedArrayList(StepsInfoBean.CREATOR);
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(box_number);
-        dest.writeString(goods_id);
-        dest.writeString(unit_code);
-        dest.writeString(total);
-        dest.writeTypedList(steps);
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    public static final Creator<StepsBaseBean> CREATOR = new Creator<StepsBaseBean>() {
-        @Override
-        public StepsBaseBean createFromParcel(Parcel in) {
-            return new StepsBaseBean(in);
-        }
-
-        @Override
-        public StepsBaseBean[] newArray(int size) {
-            return new StepsBaseBean[size];
-        }
-    };
-
-    public String getBoxNumber() {
-        return box_number;
-    }
-
-    public void setBoxNumber(String box_number) {
-        this.box_number = box_number;
-    }
-
-    public String getGoodsId() {
-        return goods_id;
-    }
-
-    public void setGoodsId(String goods_id) {
-        this.goods_id = goods_id;
-    }
-
-    public String getUnitCode() {
-        return unit_code;
-    }
-
-    public void setUnitCode(String unit_code) {
-        this.unit_code = unit_code;
-    }
-
-    public String getTotal() {
-        return total;
-    }
-
-    public void setTotal(String total) {
-        this.total = total;
-    }
-
-    public List<StepsInfoBean> getSteps() {
-        return steps;
-    }
-
-    public void setSteps(List<StepsInfoBean> steps) {
-        this.steps = steps;
-    }
-}

+ 0 - 161
app/src/main/java/com/fxy/detection/bean/StepsInfoBean.java

@@ -1,161 +0,0 @@
-package com.fxy.detection.bean;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class StepsInfoBean implements Parcelable {
-
-    private String sort = ""; //
-    private String node_code = ""; //
-    private String node_name = ""; //
-    public List<StepsPictureBean> picture_1 = new ArrayList<>(); //
-    public List<StepsPictureBean> picture_2 = new ArrayList<>(); //
-    public List<StepsPictureBean> picture_3 = new ArrayList<>(); //
-    public List<StepsPictureBean> func_points = new ArrayList<>(); //
-    public List<StepsPictureBean> facade_points = new ArrayList<>(); //
-    public List<StepsPictureBean> spare_picture_1 = new ArrayList<>(); //
-    public List<StepsPictureBean> spare_picture_2 = new ArrayList<>(); //
-    public List<StepsPictureBean> pack_points = new ArrayList<>(); //
-
-    public StepsInfoBean(){
-
-    }
-
-    protected StepsInfoBean(Parcel in) {
-        sort = in.readString();
-        node_code = in.readString();
-        node_name = in.readString();
-        picture_1 = in.createTypedArrayList(StepsPictureBean.CREATOR);
-        picture_2 = in.createTypedArrayList(StepsPictureBean.CREATOR);
-        picture_3 = in.createTypedArrayList(StepsPictureBean.CREATOR);
-        func_points = in.createTypedArrayList(StepsPictureBean.CREATOR);
-        facade_points = in.createTypedArrayList(StepsPictureBean.CREATOR);
-        spare_picture_1 = in.createTypedArrayList(StepsPictureBean.CREATOR);
-        spare_picture_2 = in.createTypedArrayList(StepsPictureBean.CREATOR);
-        pack_points = in.createTypedArrayList(StepsPictureBean.CREATOR);
-    }
-
-    public static final Creator<StepsInfoBean> CREATOR = new Creator<StepsInfoBean>() {
-        @Override
-        public StepsInfoBean createFromParcel(Parcel in) {
-            return new StepsInfoBean(in);
-        }
-
-        @Override
-        public StepsInfoBean[] newArray(int size) {
-            return new StepsInfoBean[size];
-        }
-    };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel parcel, int i) {
-        parcel.writeString(sort);
-        parcel.writeString(node_code);
-        parcel.writeString(node_name);
-        parcel.writeTypedList(picture_1);
-        parcel.writeTypedList(picture_2);
-        parcel.writeTypedList(picture_3);
-        parcel.writeTypedList(func_points);
-        parcel.writeTypedList(facade_points);
-        parcel.writeTypedList(spare_picture_1);
-        parcel.writeTypedList(spare_picture_2);
-        parcel.writeTypedList(pack_points);
-    }
-
-    public void setSort(String sort) {
-        this.sort = sort;
-    }
-
-    public void setNode_code(String node_code) {
-        this.node_code = node_code;
-    }
-
-    public void setNode_name(String node_name) {
-        this.node_name = node_name;
-    }
-
-    public void setPicture_1(List<StepsPictureBean> picture_1) {
-        this.picture_1 = picture_1;
-    }
-
-    public void setPicture_2(List<StepsPictureBean> picture_2) {
-        this.picture_2 = picture_2;
-    }
-
-    public void setPicture_3(List<StepsPictureBean> picture_3) {
-        this.picture_3 = picture_3;
-    }
-
-    public void setFunc_points(List<StepsPictureBean> func_points) {
-        this.func_points = func_points;
-    }
-
-    public void setFacade_points(List<StepsPictureBean> facade_points) {
-        this.facade_points = facade_points;
-    }
-
-    public void setSpare_picture_1(List<StepsPictureBean> spare_picture_1) {
-        this.spare_picture_1 = spare_picture_1;
-    }
-
-    public void setSpare_picture_2(List<StepsPictureBean> spare_picture_2) {
-        this.spare_picture_2 = spare_picture_2;
-    }
-
-    public void setPack_points(List<StepsPictureBean> pack_points) {
-        this.pack_points = pack_points;
-    }
-
-    public String getSort() {
-        return sort;
-    }
-
-    public String getNodeCode() {
-        return node_code;
-    }
-
-    public String getNodeName() {
-        return node_name;
-    }
-
-    public List<StepsPictureBean> getPicture_1() {
-        return picture_1;
-    }
-
-    public List<StepsPictureBean> getPicture_2() {
-        return picture_2;
-    }
-
-    public List<StepsPictureBean> getPicture_3() {
-        return picture_3;
-    }
-
-    public List<StepsPictureBean> getFunc_points() {
-        return func_points;
-    }
-
-    public List<StepsPictureBean> getFacade_points() {
-        return facade_points;
-    }
-
-    public List<StepsPictureBean> getSpare_picture_1() {
-        return spare_picture_1;
-    }
-
-    public List<StepsPictureBean> getSpare_picture_2() {
-        return spare_picture_2;
-    }
-
-    public List<StepsPictureBean> getPack_points() {
-        return pack_points;
-    }
-}

+ 0 - 114
app/src/main/java/com/fxy/detection/bean/StepsPictureBean.java

@@ -1,114 +0,0 @@
-package com.fxy.detection.bean;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class StepsPictureBean implements Parcelable {
-    private String attr_id = ""; //
-    private String desc = ""; //
-    private String url = ""; //
-    private String type = ""; //
-    private String need_photo = ""; //
-    private String field_key = ""; //
-    private Boolean checked = false;
-
-    public StepsPictureBean() {
-
-    }
-
-
-    protected StepsPictureBean(Parcel in) {
-        attr_id = in.readString();
-        desc = in.readString();
-        url = in.readString();
-        type = in.readString();
-        need_photo = in.readString();
-        field_key = in.readString();
-        byte tmpChecked = in.readByte();
-        checked = tmpChecked == 0 ? null : tmpChecked == 1;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(attr_id);
-        dest.writeString(desc);
-        dest.writeString(url);
-        dest.writeString(type);
-        dest.writeString(need_photo);
-        dest.writeString(field_key);
-        dest.writeByte((byte) (checked == null ? 0 : checked ? 1 : 2));
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    public static final Creator<StepsPictureBean> CREATOR = new Creator<StepsPictureBean>() {
-        @Override
-        public StepsPictureBean createFromParcel(Parcel in) {
-            return new StepsPictureBean(in);
-        }
-
-        @Override
-        public StepsPictureBean[] newArray(int size) {
-            return new StepsPictureBean[size];
-        }
-    };
-
-    public String getAttrId() {
-        return attr_id;
-    }
-
-    public void setAttrId(String attr_id) {
-        this.attr_id = attr_id;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getNeedPhoto() {
-        return need_photo;
-    }
-
-    public void setNeedPhoto(String need_photo) {
-        this.need_photo = need_photo;
-    }
-
-    public String getFieldKey() {
-        return field_key;
-    }
-
-    public void setFieldKey(String field_key) {
-        this.field_key = field_key;
-    }
-
-    public Boolean getChecked() {
-        return checked;
-    }
-
-    public void setChecked(Boolean checked) {
-        this.checked = checked;
-    }
-}

+ 70 - 0
app/src/main/java/com/fxy/detection/bean/SuspendBean.java

@@ -0,0 +1,70 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SuspendBean implements Parcelable {
+    private String type;
+    private String content;
+    private List<BtnInfoBean> btns = new ArrayList<>(); //
+
+    public SuspendBean(){
+
+    }
+    protected SuspendBean(Parcel in) {
+        type = in.readString();
+        content = in.readString();
+        btns = in.createTypedArrayList(BtnInfoBean.CREATOR);
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(type);
+        dest.writeString(content);
+        dest.writeTypedList(btns);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<SuspendBean> CREATOR = new Creator<SuspendBean>() {
+        @Override
+        public SuspendBean createFromParcel(Parcel in) {
+            return new SuspendBean(in);
+        }
+
+        @Override
+        public SuspendBean[] newArray(int size) {
+            return new SuspendBean[size];
+        }
+    };
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public List<BtnInfoBean> getBtns() {
+        return btns;
+    }
+
+    public void setBtns(List<BtnInfoBean> btns) {
+        this.btns = btns;
+    }
+}

+ 1 - 1
app/src/main/java/com/fxy/login/LoginActivity.java

@@ -303,7 +303,7 @@ public class LoginActivity extends BaseActivity {
 
                 if (isCanLogin()) {
                     login(mLogEtName.getText().toString().trim(),mLogEtPwd.getText().toString().trim());
-//                    AlertDialog.Builder builder = new AlertDialog.Builder(this);
+//                    ConfirmDialog.Builder builder = new ConfirmDialog.Builder(this);
 //                    builder.setView(captchaView);
 //                    if(capchatDialog != null){
 //                        capchatDialog.show();

+ 6 - 0
app/src/main/java/com/fxy/net/Urls.java

@@ -170,9 +170,15 @@ public class Urls {
     //确认商品
     public static final String FXY_DETECTION_CONFIRM_GOODS = "/pda/inbound/QcConfirmGoods";
 
+    //点击主机差异
+    public static final String FXY_DETECTION_DEAL_DIFF = "/pda/inbound/QcDealChayi";
+
     //装修完成
     public static final String FXY_DETECTION_COMPLETED = "/pda/Inbound/QcFinish";
 
+
+    public static final String FXY_DETECTION_ASSIGN_DATA = "/pda/Inbound/getAssignData";
+
     //打托 - 扫托盘
     public static final String FXY_HK_CHECK_PALLET = "/pda/HongkongInbound/checkPallet";
 

+ 38 - 0
app/src/main/java/com/fxy/utils/ToolUtils.java

@@ -0,0 +1,38 @@
+package com.fxy.utils;
+
+import android.app.Activity;
+
+/**
+ * 封装常用方法
+ */
+public class ToolUtils {
+
+    /**
+     * 获取dp对应值
+     * @param  dpValue int 需要转换的值
+     * @param density float 比例
+     * @return int
+     */
+    public static int getDpValue(int dpValue,float density){
+        return Math.round((float)dpValue * density);
+    }
+
+    /**
+     *
+     * @param dpValue int 需要转换的值
+     * @param activity Activity 当前活动页
+     * @return
+     */
+    public static int getDpValue(int dpValue,Activity activity){
+        return Math.round((float)dpValue * getDensity(activity));
+    }
+
+    /**
+     * 获取设备密度
+     * @param activity Activity 当前活动页
+     * @return float
+     */
+    public static float getDensity(Activity activity){
+        return activity.getResources().getDisplayMetrics().density;
+    }
+}

+ 7 - 0
app/src/main/res/drawable/text_border.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="#FFFFFF"/>
+    <stroke android:width="1dp"  android:color="#958D8D"/>
+    <corners android:radius="10dp"/>
+</shape>

+ 5 - 0
app/src/main/res/drawable/text_border_select.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+    <solid android:color="@color/alertdialog_line" />
+    <corners android:radius="10dp" />
+</shape>

+ 33 - 17
app/src/main/res/layout/activity_fxy_detection_confirm_goods.xml

@@ -22,11 +22,17 @@
                 android:id="@+id/ll_from"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="vertical">
+                android:orientation="horizontal">
                 <LinearLayout
                     android:id="@+id/ll_box_code"
                     style="@style/FromLinearLayoutItem"
+                    android:layout_width="wrap_content"
                     android:orientation="horizontal">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:textSize="@dimen/t24"
+                        android:text="箱号:"/>
                     <EditText
                         android:id="@+id/et_box_code"
                         style="@style/EditTextStyle"
@@ -38,7 +44,13 @@
                 </LinearLayout>
                 <LinearLayout
                     style="@style/FromLinearLayoutItem"
+                    android:layout_width="wrap_content"
                     android:orientation="horizontal">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:textSize="@dimen/t24"
+                        android:text="内件码:"/>
                     <EditText
                         style="@style/EditTextStyle"
                         android:id="@+id/et_unit_code"
@@ -48,30 +60,35 @@
                         style="@style/ClearImg"
                         android:id="@+id/ib_unit_code_clear"
                         />
-
                 </LinearLayout>
 
-            </LinearLayout>
+                <LinearLayout
+                    android:id="@+id/ll_host_diff"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:padding="10dp"
+                    android:visibility="gone"
+                    android:orientation="horizontal">
 
+                    <TextView
+                        style="@style/fontSize"
+                        android:id="@+id/btn_host_diff"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:background="@drawable/bg_orange_item"
+                        android:gravity="center"
+                        android:text="主机差异"
+                        android:padding="10dp"
+                        android:textColor="@color/white"
+                        android:visibility="visible" />
+                </LinearLayout>
 
-            <!--xians-->
-            <LinearLayout
-                android:id="@+id/ll_pictures_title"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:paddingBottom="5dp"
-                android:paddingTop="5dp"
-                android:orientation="horizontal">
-                <TextView
-                    android:layout_marginLeft="@dimen/dp_10"
-                    style="@style/tvLeftStyle"
-                    android:text="确认货品" />
             </LinearLayout>
 
+
             <LinearLayout
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
-                android:background="@drawable/bg_white_et"
                 android:layout_marginLeft="@dimen/dp_10"
                 android:layout_marginRight="@dimen/dp_10"
                 android:gravity="center_vertical"
@@ -84,7 +101,6 @@
                     android:id="@+id/recyclerview"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:background="#fff"
                     android:overScrollMode="never"/>
             </LinearLayout>
 

+ 115 - 0
app/src/main/res/layout/activity_fxy_detection_confirm_parts.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:background="@color/md_grey_100"
+    android:orientation="vertical">
+
+    <ScrollView
+        android:id="@+id/ll_scroll_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scrollbars="none">
+
+
+        <LinearLayout
+
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+            <LinearLayout
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:background="@color/md_grey_100"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingBottom="5dp"
+                android:paddingTop="5dp"
+                android:orientation="horizontal">
+                <TextView
+                    android:id="@+id/tv_content"
+                    style="@style/tvDetectionStyle"
+                    android:hint="内容" />
+
+            </LinearLayout>
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:scrollbars="vertical"
+                android:paddingTop="@dimen/dp_10"
+                android:paddingBottom="@dimen/dp_10"
+                >
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/recyclerview"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:overScrollMode="never"/>
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ll_default"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:layout_marginBottom="@dimen/dp_4"
+                android:orientation="horizontal"
+                android:gravity="center_horizontal"
+                android:layout_gravity="bottom"
+                android:padding="10dp">
+
+                <TextView
+                    style="@style/DetectionFontSize"
+                    android:id="@+id/btn_default"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_marginRight="@dimen/dp_10"
+                    android:background="@drawable/bg_orange_item"
+                    android:gravity="center"
+                    android:text="不缺配件"
+                    android:padding="10dp"
+                    android:textColor="@color/white"
+                    android:visibility="visible" />
+            </LinearLayout>
+        <LinearLayout
+            android:id="@+id/ll_btn_center"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/dp_10"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_marginRight="@dimen/dp_10"
+            android:layout_marginBottom="@dimen/dp_4"
+            android:orientation="horizontal"
+            android:gravity="center_horizontal"
+            android:layout_gravity="bottom"
+            android:visibility="gone"
+            android:padding="10dp">
+        </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ll_btn_not_center"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:layout_marginBottom="@dimen/dp_4"
+                android:orientation="horizontal"
+                android:gravity="center_horizontal"
+                android:layout_gravity="bottom"
+                android:visibility="gone"
+                android:padding="10dp">
+            </LinearLayout>
+
+        </LinearLayout>
+    </ScrollView>
+
+</LinearLayout>

+ 132 - 0
app/src/main/res/layout/activity_fxy_detection_deal_diff.xml

@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:background="@color/md_grey_100"
+    android:orientation="vertical">
+
+    <ScrollView
+        android:id="@+id/ll_scroll_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scrollbars="none">
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+
+
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:background="@drawable/bg_white_et"
+                android:gravity="center_vertical"
+                android:orientation="vertical"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp">
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/tvDetectionStyle"
+                        android:text="箱号" />
+                    <TextView
+                        style="@style/tvDetectionStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_box_number"
+                        />
+
+                </LinearLayout>
+
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/tvDetectionStyle"
+                        android:text="内件码" />
+                    <TextView
+                        style="@style/tvDetectionStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_unit_code"
+                        />
+                </LinearLayout>
+
+
+            </LinearLayout>
+
+
+            <!--xians-->
+            <LinearLayout
+                android:id="@+id/ll_pictures_title"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:paddingBottom="10dp"
+                android:paddingTop="10dp"
+                android:gravity="center"
+                android:orientation="horizontal">
+                <TextView
+                    android:id="@+id/btn_confirm"
+                    style="@style/tvLeftStyle"
+                    android:background="@drawable/bg_white_et"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="20dp"
+                    android:textSize="50sp"
+                    android:text="确认货品" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:scrollbars="vertical"
+                android:paddingTop="@dimen/dp_10"
+                android:paddingBottom="@dimen/dp_10"
+                >
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/recyclerview"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:overScrollMode="never"/>
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:id="@+id/ll_recycler_view"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:orientation="vertical" >
+            </LinearLayout>
+
+        </LinearLayout>
+    </ScrollView>
+
+</LinearLayout>

+ 56 - 47
app/src/main/res/layout/activity_fxy_detection_work.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
@@ -7,11 +7,7 @@
     android:background="@color/md_grey_100"
     android:orientation="vertical">
 
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
+
 
 
         <LinearLayout
@@ -30,21 +26,21 @@
                 android:layout_marginTop="@dimen/dp_10"
                 android:background="@drawable/bg_white_et"
                 android:gravity="center_vertical"
-                android:orientation="vertical"
+                android:orientation="horizontal"
                 android:paddingLeft="10dp"
                 android:paddingRight="10dp">
                 <LinearLayout
-                    android:layout_width="match_parent"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:paddingBottom="5dp"
                     android:paddingTop="5dp"
                     android:orientation="horizontal">
 
                     <TextView
-                        style="@style/tvLeftStyle"
+                        style="@style/tvDetectionStyle"
                         android:text="箱号" />
                     <TextView
-                        style="@style/tvLeftStyle"
+                        style="@style/tvDetectionStyle"
                         android:text=":" />
 
                     <com.fxy.baselibrary.views.MarqueeTextView
@@ -56,17 +52,18 @@
 
 
                 <LinearLayout
-                    android:layout_width="match_parent"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:paddingBottom="5dp"
                     android:paddingTop="5dp"
+                    android:layout_marginLeft="@dimen/dp_40"
                     android:orientation="horizontal">
 
                     <TextView
-                        style="@style/tvLeftStyle"
+                        style="@style/tvDetectionStyle"
                         android:text="内件码" />
                     <TextView
-                        style="@style/tvLeftStyle"
+                        style="@style/tvDetectionStyle"
                         android:text=":" />
 
                     <com.fxy.baselibrary.views.MarqueeTextView
@@ -74,32 +71,34 @@
                         android:id="@+id/mt_unit_code"
                         />
                 </LinearLayout>
-
-
             </LinearLayout>
 
 
-            <!--xians-->
             <LinearLayout
-                android:id="@+id/ll_pictures_title"
+                android:id="@+id/ll_result"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
+                android:background="@drawable/bg_white_et"
                 android:layout_marginLeft="@dimen/dp_10"
                 android:layout_marginRight="@dimen/dp_10"
-                android:paddingBottom="5dp"
-                android:paddingTop="5dp"
+                android:layout_marginTop="20dp"
+                android:layout_marginBottom="20dp"
+                android:paddingBottom="10dp"
+                android:paddingTop="10dp"
+                android:gravity="center"
                 android:orientation="horizontal">
                 <TextView
-                    android:id="@+id/tv_pictures_type"
+                    android:id="@+id/btn_result"
                     style="@style/tvLeftStyle"
-                    android:text="确认货品" />
+                    android:paddingStart="20dp"
+                    android:paddingEnd="20dp"
+                    android:textSize="50sp"/>
             </LinearLayout>
 
+
             <LinearLayout
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
                 android:gravity="center_vertical"
                 android:orientation="horizontal"
                 android:scrollbars="vertical"
@@ -113,6 +112,13 @@
                     android:overScrollMode="never"/>
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/ll_details"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:orientation="vertical" >
+            </LinearLayout>
+
 
             <LinearLayout
                 android:id="@+id/ll_recycler_view"
@@ -123,23 +129,9 @@
 
 
 
-<!--            <LinearLayout
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content">
-                <GridLayout
-                    android:id="@+id/gl_img"
-                    android:layout_width="match_parent"
-                    android:padding="10dp"
-                    android:layout_margin="10dp"
-                    android:background="@color/white"
-                    android:layout_height="wrap_content">
-                </GridLayout>
-            </LinearLayout>-->
-
 
             <LinearLayout
+                android:id="@+id/ll_step2"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginLeft="@dimen/dp_10"
@@ -148,42 +140,59 @@
                 android:layout_marginBottom="@dimen/dp_4"
                 android:orientation="horizontal"
                 android:gravity="center_horizontal"
+                android:visibility="gone"
                 android:layout_gravity="bottom"
                 android:padding="10dp">
 
                 <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_last_step"
+                    style="@style/DetectionFontSize"
+                    android:id="@+id/btn_suspend"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginLeft="@dimen/dp_10"
                     android:layout_marginRight="@dimen/dp_10"
                     android:background="@drawable/bg_orange_item"
                     android:gravity="center"
-                    android:text="上一步"
+                    android:text="检测中断"
                     android:padding="10dp"
                     android:textColor="@color/white"
                     android:visibility="visible" />
                 <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_confirm"
+                    style="@style/DetectionFontSize"
+                    android:id="@+id/btn_finish"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginLeft="@dimen/dp_10"
                     android:layout_marginRight="@dimen/dp_10"
                     android:background="@drawable/bg_orange_item"
                     android:gravity="center"
-                    android:text="下一步"
+                    android:text="检修完成"
                     android:padding="10dp"
                     android:textColor="@color/white"
                     android:visibility="visible" />
             </LinearLayout>
 
 
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:scrollbars="vertical"
+                android:paddingTop="@dimen/dp_10"
+                android:paddingBottom="@dimen/dp_10"
+                >
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/result_recyclerview"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:overScrollMode="never"/>
+            </LinearLayout>
+
+
+
 
         </LinearLayout>
-    </ScrollView>
 
 
-    <include layout="@layout/item_float_image" />
-</LinearLayout>
+</RelativeLayout>

+ 11 - 0
app/src/main/res/layout/item_btn.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/tv_item_btn"
+    android:textSize="@dimen/tDetection"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:paddingLeft="@dimen/dp_10"
+    android:paddingRight="@dimen/dp_10"
+    android:background="@drawable/text_border"
+    android:text="按钮4545454"/>

+ 9 - 0
app/src/main/res/layout/item_card.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/cl_model"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/md_grey_100"
+    android:padding="@dimen/dp_10"
+    android:orientation="vertical">
+</LinearLayout>

+ 41 - 0
app/src/main/res/layout/item_card_tab.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/bg_white_et"
+    android:padding="@dimen/dp_4"
+    android:layout_margin="@dimen/dp_10"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingBottom="5dp"
+        android:paddingTop="5dp"
+        android:layout_gravity="center_horizontal"
+        android:orientation="horizontal">
+        <TextView
+            android:id="@+id/tv_title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textSize="@dimen/t28"
+            android:textColor="@color/black_3d3d3d"
+            android:gravity="center"
+            android:text="标题" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingBottom="5dp"
+        android:paddingTop="5dp"
+        android:orientation="horizontal">
+        <TextView
+            android:id="@+id/tv_describe"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="@dimen/t28"
+            android:textColor="@color/black_3d3d3d"
+            android:text="内容" />
+    </LinearLayout>
+</LinearLayout>

+ 139 - 0
app/src/main/res/layout/item_card_tab_two.xml

@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:padding="16dp"
+    android:layout_margin="@dimen/dp_10"
+    android:background="@drawable/bg_white_et"
+    android:id="@+id/ll_item_card">
+
+    <RelativeLayout
+
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <LinearLayout
+            android:id="@+id/ll_item_center"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            >
+
+            <TextView
+                android:id="@+id/tv_content"
+                android:layout_marginBottom="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:textColor="@color/black_3d3d3d"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="@dimen/tDetection"
+                android:text="标题"/>
+            <LinearLayout
+                android:id="@+id/ll_input"
+                style="@style/FromLinearLayoutItem"
+                android:layout_width="wrap_content"
+                android:orientation="horizontal">
+                <EditText
+                    android:id="@+id/et_input"
+                    style="@style/EditTextStyle"
+                    android:hint="请输入"
+                    android:text=""/>
+                <ImageButton
+                    style="@style/ClearImg"
+                    android:id="@+id/ib_unit_code_clear"
+                    />
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ll_btn_center"
+                android:layout_marginBottom="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:textColor="@color/black_3d3d3d"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal" >
+
+                <TextView
+                    android:visibility="gone"
+                    android:textSize="@dimen/tDetection"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingLeft="@dimen/dp_10"
+                    android:paddingRight="@dimen/dp_10"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:background="@drawable/text_border"
+                    android:text=""
+                    />
+                <TextView
+                    android:visibility="gone"
+                    android:textSize="@dimen/tDetection"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingLeft="@dimen/dp_10"
+                    android:paddingRight="@dimen/dp_10"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:background="@drawable/text_border"
+                    android:text=""
+                    />
+                <TextView
+                    android:visibility="gone"
+                    android:textSize="@dimen/tDetection"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingLeft="@dimen/dp_10"
+                    android:paddingRight="@dimen/dp_10"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:background="@drawable/text_border"
+                    android:text=""
+                    />
+                <TextView
+                    android:visibility="gone"
+                    android:textSize="@dimen/tDetection"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingLeft="@dimen/dp_10"
+                    android:paddingRight="@dimen/dp_10"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:background="@drawable/text_border"
+                    android:text=""
+                    />
+
+
+            </LinearLayout>
+
+
+
+        </LinearLayout>
+        <LinearLayout
+            android:id="@+id/ll_tip"
+            android:layout_marginBottom="@dimen/dp_10"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentEnd="true"
+            android:orientation="vertical">
+            <TextView
+                android:id="@+id/tv_tip"
+                android:textColor="@color/md_light_green_A700"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="@dimen/tDetection"
+                android:hint=""/>
+        </LinearLayout>
+    </RelativeLayout>
+
+
+
+    <LinearLayout
+        android:id="@+id/ll_upload_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical" >
+    </LinearLayout>
+
+
+
+</RelativeLayout>

+ 0 - 1
app/src/main/res/layout/item_picture_selector.xml

@@ -21,7 +21,6 @@
     <LinearLayout
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:background="@drawable/bg_white_et"
         android:layout_marginLeft="@dimen/dp_10"
         android:layout_marginRight="@dimen/dp_10"
         android:gravity="center_vertical"

+ 2 - 2
app/src/main/res/layout/item_preview_image.xml

@@ -17,8 +17,8 @@
 
         <ImageView
             android:id="@+id/ivp_img"
-            android:layout_width="110dp"
-            android:layout_height="110dp"
+            android:layout_width="200dp"
+            android:layout_height="200dp"
             style="@android:style/Animation"
             android:src="@mipmap/cat"
             android:contentDescription="@null"

+ 45 - 0
app/src/main/res/layout/item_repair.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:padding="16dp"
+    android:layout_margin="@dimen/dp_10"
+    android:background="@drawable/bg_white_et"
+    android:id="@+id/ll_item_card">
+
+    <LinearLayout
+
+        android:id="@+id/ll_item_center"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        >
+
+        <TextView
+            android:id="@+id/tv_title"
+            android:textColor="@color/black_3d3d3d"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="@dimen/tDetection"
+            android:text="标题"/>
+
+
+
+
+    </LinearLayout>
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentEnd="true"
+        android:layout_centerInParent="true"
+        android:orientation="vertical">
+    <TextView
+        android:id="@+id/tv_status"
+        android:textColor="@color/md_light_green_A700"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textSize="@dimen/tDetection"
+        android:hint=""/>
+    </LinearLayout>
+
+</RelativeLayout>

+ 6 - 4
app/src/main/res/layout/item_sku_img.xml

@@ -8,12 +8,14 @@
 
     <ImageView
         android:id="@+id/iv_show"
-        android:layout_width="100dp"
-        android:layout_height="100dp" />
+        android:layout_width="200dp"
+        android:layout_height="200dp" />
     <TextView
         android:id="@+id/tv_name"
-        android:layout_width="100dp"
+        android:layout_width="200dp"
         android:layout_height="wrap_content"
+        android:gravity="center"
         android:padding="2dp"
-        android:hint="标题"  />
+        android:textSize="30sp"
+        android:hint="标题 "  />
 </LinearLayout>

+ 1 - 0
app/src/main/res/values/dimens.xml

@@ -12,4 +12,5 @@
     <dimen name="t24">24sp</dimen>
     <dimen name="t26">26sp</dimen>
     <dimen name="t28">28sp</dimen>
+    <dimen name="tDetection">40sp</dimen>
 </resources>

+ 10 - 0
app/src/main/res/values/styles.xml

@@ -224,6 +224,16 @@
     </style>
 
 
+    <style name="tvDetectionStyle">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:textColor">@color/black_3d3d3d</item>
+        <item name="android:textSize">30sp</item>
+    </style>
 
+    <!--统一字体-->
+    <style name="DetectionFontSize">
+        <item name="android:textSize">@dimen/t24</item>
+    </style>
 
 </resources>