Browse Source

修改仓库物料查询列表, 增加本地异常记录,上架与结束上架清除列表数据,智能上架(扫码) 增加列表数据, 及ID上传,修改入库采集增加修改条码与料号功能,修复PDA出库采集料号弹窗列表及搜索功能, 增加仓库管理功能的高度,

songw 10 months ago
parent
commit
9b79a08498

+ 0 - 2
app/src/main/java/com/uas/uas_mes_stw/activity/MainActivity.java

@@ -81,8 +81,6 @@ public class MainActivity extends BaseActivity implements BackHandlerInterface {
         }
 
 //        ACCESS_COARSE_LOCATION
-
-
     }
     final int REQUEST_PERMISSION_LOCATION = 10;
     private void initPermission() {

+ 11 - 8
app/src/main/java/com/uas/uas_mes_stw/adapter/ReportDetailAdapter.java

@@ -1,5 +1,6 @@
 package com.uas.uas_mes_stw.adapter;
 
+import android.support.annotation.Nullable;
 import android.widget.TextView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
@@ -7,22 +8,24 @@ import com.chad.library.adapter.base.BaseViewHolder;
 import com.uas.uas_mes_stw.R;
 import com.uas.uas_mes_stw.bean.PositionBean;
 
+import java.util.List;
+
 
 public class ReportDetailAdapter extends BaseQuickAdapter<PositionBean, BaseViewHolder> {
-    public ReportDetailAdapter() {
-        super(R.layout.item_report_detail, null);
+
+    public ReportDetailAdapter(int layoutResId, @Nullable List<PositionBean> data) {
+        super(layoutResId, data);
     }
+
     @Override
     protected void convert(BaseViewHolder helper, PositionBean item) {
-        TextView tv_pichi=helper.getView(R.id.tv_pichi);
-        TextView tv_report_num=helper.getView(R.id.tv_report_num);
-        TextView tv_report_man=helper.getView(R.id.tv_report_man);
-        TextView tv_qty=helper.getView(R.id.tv_qty);
+        TextView tv_pichi = helper.getView(R.id.tv_pichi);
+        TextView tv_report_num = helper.getView(R.id.tv_report_num);
+        TextView tv_report_man = helper.getView(R.id.tv_report_man);
+        TextView tv_qty = helper.getView(R.id.tv_qty);
         tv_pichi.setText(item.getBAR_PRODCODE());
         tv_report_num.setText(item.getPR_DETAIL());
         tv_report_man.setText(item.getPR_SPEC());
         tv_qty.setText(item.getBAR_REMAIN());
-
-
     }
 }

+ 15 - 2
app/src/main/java/com/uas/uas_mes_stw/application/PdaApplication.java

@@ -11,6 +11,7 @@ import com.android.volley.toolbox.Volley;
 import com.facebook.stetho.Stetho;
 import com.uas.uas_mes_stw.R;
 import com.uas.uas_mes_stw.util.AndroidUtil;
+import com.uas.uas_mes_stw.util.CrashHandler;
 import com.uas.uas_mes_stw.util.FakeX509TrustManager;
 import com.uas.uas_mes_stw.util.SoundUtil;
 import com.umeng.analytics.MobclickAgent;
@@ -44,11 +45,17 @@ public class PdaApplication extends Application {
     public static SoundPool mSoundPool;
     public static HashMap<Integer, Integer> mSoundMap;
     public static int mVersionCode = 1;
+    private static PdaApplication mInstance;
 
     @Override
     public void onCreate() {
         super.onCreate();
+        mInstance = this;
         mContext = getApplicationContext();
+
+        CrashHandler crashHandler = CrashHandler.getInstance();
+        crashHandler.init(mContext);
+
         FakeX509TrustManager.allowAllSSL();//去掉SSL证书验证
         if (mRequestQueue == null)
             mRequestQueue = Volley.newRequestQueue(this);
@@ -71,7 +78,6 @@ public class PdaApplication extends Application {
             mSoundPool = new SoundPool(4, AudioAttributes.CONTENT_TYPE_MUSIC, 0);
         }
 
-
         mSoundMap = new HashMap<>();
         mSoundMap.put(SoundUtil.SOUND_ARIEL, mSoundPool.load(this, R.raw.ariel, 1));
         mSoundMap.put(SoundUtil.SOUND_CARME, mSoundPool.load(this, R.raw.carme, 1));
@@ -85,7 +91,7 @@ public class PdaApplication extends Application {
         mSoundMap.put(SoundUtil.SOUND_TETHYS, mSoundPool.load(this, R.raw.tethys, 1));
         mSoundMap.put(SoundUtil.SOUND_TITAN, mSoundPool.load(this, R.raw.titan, 1));
         //友盟统计SDK
-        initUmeng();
+       // initUmeng();
     }
 
 
@@ -223,5 +229,12 @@ public class PdaApplication extends Application {
         return factory;
     }
 
+    public Context getContext() {
+        return mContext;
+    }
+
+    public static PdaApplication getInstance() {
+        return mInstance;
+    }
 
 }

+ 47 - 0
app/src/main/java/com/uas/uas_mes_stw/bean/InductionBean.java

@@ -0,0 +1,47 @@
+package com.uas.uas_mes_stw.bean;
+
+public
+        /**
+         * Created by sw on 2025-01-15
+         */
+class InductionBean {
+
+    private String BAR_ID;
+    private String BAR_CODE;
+    private String BAR_REMAIN;
+
+    public boolean isCheck() {
+        return isCheck;
+    }
+
+    public void setCheck(boolean check) {
+        isCheck = check;
+    }
+
+    private boolean isCheck;
+
+
+    public String getBAR_ID() {
+        return BAR_ID;
+    }
+
+    public void setBAR_ID(String BAR_ID) {
+        this.BAR_ID = BAR_ID;
+    }
+
+    public String getBAR_CODE() {
+        return BAR_CODE;
+    }
+
+    public void setBAR_CODE(String BAR_CODE) {
+        this.BAR_CODE = BAR_CODE;
+    }
+
+    public String getBAR_REMAIN() {
+        return BAR_REMAIN;
+    }
+
+    public void setBAR_REMAIN(String BAR_REMAIN) {
+        this.BAR_REMAIN = BAR_REMAIN;
+    }
+}

+ 189 - 158
app/src/main/java/com/uas/uas_mes_stw/fragment/IOCOutMakeMaterialOper.java

@@ -114,7 +114,7 @@ import razerdp.basepopup.BasePopupWindow;
  * Created by RaoMeng on 2016/7/27.
  * 材料出库采集页面
  */
-public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClickListener, RadioGroup.OnCheckedChangeListener,  HttpCallback {
+public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClickListener, RadioGroup.OnCheckedChangeListener, HttpCallback {
     private static final int SCAN_BARCODE_CODE = 103;
     private static final int SPLIT_BARCODE_SUCCESS = 104;
     private static final int SPLIT_BARCODE_FAIL = 105;
@@ -228,7 +228,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                             if (messageObject.optBoolean("ISMSD")) {
                                 //成功,有返回值,判断返回值message中isMsd是否存在,存在判断if(isMsd)true,弹出显示框
                                 iocOutMakeMaterialOperMsd = JsonTools.parseJsonToBean(jsonObject.toString(), IOCOutMakeMaterialOperMsd.class);
-//                            Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
+                                //                            Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
                                 mBarRemain = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getBAR_REMAIN());
                                 mRestqty = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getRESTQTY());
                                 showDewPopupWindow();
@@ -251,7 +251,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                         + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
                                         + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
                                         + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
-                                        + ";名称规格:" + messageObject.  optString("PR_DETAIL")
+                                        + ";名称规格:" + messageObject.optString("PR_DETAIL")
                                         + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
                                         + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
 
@@ -265,7 +265,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                     }
 
                                     //弹出拆分结果弹框
-                                    initBreakPopupWindow(listArray,"1");
+                                    initBreakPopupWindow(listArray, "1");
                                 }
 
                                 mCollectResultTextView.setText(barcodeResult);
@@ -438,6 +438,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private ClearableEditText edit_et;
     private PopupWindow editPW;
     private String pd_prodcode = "";     //物料编号
+    private RecyclerView rv_ip_port_data;
+    private MaterialAdapter materialAdapter;
 
 
     @Override
@@ -479,7 +481,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 
         text_finishno = root.findViewById(R.id.text_finishno);
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_material_collect));
-//        ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterialOper();
+        //        ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterialOper();
         ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
         ((FunctionActivity) getActivity()).setScanIvVisible(true);
 
@@ -512,8 +514,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             mCollectModelBtn.setText("离线");
         }
 
-        //条码输入框获取焦点
-        etBarCode.requestFocus();
+        //料号输入框获取焦点
+        cet_item_number.requestFocus();
 
         tvPiInoutno.setText(pi_inoutno);
         tvPdWhcode.setText(pd_whcode);
@@ -549,16 +551,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         mPrintDpi = SharedPreUtil.getInt(mActivity, "printDpi", 203);
 
 
-
         special_check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
             @Override
             public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                 boolean checked = special_check.isChecked();
-                Log.e("checked",checked+"");
+                Log.e("checked", checked + "");
             }
         });
-
-
     }
 
     @Override
@@ -644,7 +643,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             @Override
             public boolean onKey(View v, int keyCode, KeyEvent event) {
                 if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {
-//                    getOutbybatch();
+                    //                    getOutbybatch();
                     return true;
                 }
                 return false;
@@ -653,15 +652,14 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         iv_item_number_search.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                String search = cet_item_number.getText().toString().trim();
-                getItemNumberData(search);
+                getItemNumberData();
             }
         });
     }
 
     private void getOutbybatch() {
         try {
-            String url = GloableParams.ADDRESS_GETPRODOUTPROD + "?id="+pi_id;
+            String url = GloableParams.ADDRESS_GETPRODOUTPROD + "?id=" + pi_id;
             VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
                     .url(url)
                     .method(Request.Method.GET)
@@ -698,10 +696,10 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         }
     }
 
-    private void getItemNumberData(String itemNumber) {
-        Log.e("pi_id",pi_id);
+    private void getItemNumberData() {
+        Log.e("pi_id", pi_id);
         progressDialog.show();
-        String url = GloableParams.ADDRESS_GETPRODOUTPROD+ "?id="+pi_id;
+        String url = GloableParams.ADDRESS_GETPRODOUTPROD + "?id=" + pi_id;
         PdaApplication.mRequestQueue.cancelAll(TAG);
         mCollectTypeRadioGroup.setEnabled(false);
         jsonRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
@@ -764,13 +762,14 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private void initresourcesPopupWindow() {
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_recycle_item, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
-        TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
+        Button sure_tv = (Button) contView.findViewById(R.id.sure_tv);
+        sure_tv.setVisibility(View.GONE);
         TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
         ImageView search_im = contView.findViewById(R.id.search_im);
-        RecyclerView rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
         rv_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
         rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
-        MaterialAdapter materialAdapter = new MaterialAdapter(itemNumberList);
+        materialAdapter = new MaterialAdapter(itemNumberList);
         materialAdapter.setmList(itemNumberList);
         rv_ip_port_data.setAdapter(materialAdapter);
         edit_et.requestFocus();
@@ -823,17 +822,20 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                 if (!mSearchStr.isEmpty()) {
                     List<ItemNumberBean> thisList = new ArrayList<>();
                     for (int i = 0; i < itemNumberList.size(); i++) {
-                        if (itemNumberList.get(i).getPD_PRODCODE().contains(mSearchStr)
-                                || itemNumberList.get(i).getPR_DETAIL().contains(mSearchStr)
-                                || itemNumberList.get(i).getPR_SPEC().contains(mSearchStr)
+                        if ((!TextUtils.isEmpty(itemNumberList.get(i).getPD_PRODCODE()) && itemNumberList.get(i).getPD_PRODCODE().contains(mSearchStr))
+                                || (!TextUtils.isEmpty(itemNumberList.get(i).getPR_DETAIL()) && itemNumberList.get(i).getPR_DETAIL().contains(mSearchStr))
+                                || (!TextUtils.isEmpty(itemNumberList.get(i).getPR_SPEC()) && itemNumberList.get(i).getPR_SPEC().contains(mSearchStr))
                         ) {
                             thisList.add(itemNumberList.get(i));
                         }
                     }
                     if (thisList.size() > 0) {
-                        materialAdapter.setmList(thisList);
-                    }else {
-                        materialAdapter.setmList(itemNumberList);
+                        pd_prodcode = "";
+                        //setAdapterData(thisList);
+                        materialAdapter.updateList(thisList);
+                    } else {
+                        setAdapterData(itemNumberList);
+                        //                        materialAdapter.setmList(itemNumberList);
                     }
                 }
             }
@@ -841,19 +843,19 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         });
 
         //确定
-        sure_tv.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (StringUtil.isEmpty(pd_prodcode)) {
-                    CommonUtil.toastNoRepeat(mActivity, "请选择物料编号");
-                    return;
-                }
-                cet_item_number.setText(pd_prodcode);
-                cet_item_number.requestFocus();
-                cet_item_number.setSelection(cet_item_number.getText().length());
-                closeItemNumberPopupWindow();
-            }
-        });
+        //        sure_tv.setOnClickListener(new View.OnClickListener() {
+        //            @Override
+        //            public void onClick(View v) {
+        //                if (StringUtil.isEmpty(pd_prodcode)) {
+        //                    CommonUtil.toastNoRepeat(mActivity, "请选择物料编号");
+        //                    return;
+        //                }
+        //                cet_item_number.setText(pd_prodcode);
+        //                cet_item_number.requestFocus();
+        //                cet_item_number.setSelection(cet_item_number.getText().length());
+        //                closeItemNumberPopupWindow();
+        //            }
+        //        });
 
         //取消
         cancle_tv.setOnClickListener(new View.OnClickListener() {
@@ -866,11 +868,31 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         materialAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
             @Override
             public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                List<ItemNumberBean> ipAndPortBeans = materialAdapter.getmList();
-                pd_prodcode = ipAndPortBeans.get(position).getPD_PRODCODE();
-                edit_et.setText(pd_prodcode);
-                ipAndPortBeans.get(position).setSelect(true);
-                materialAdapter.notifyDataSetChanged();
+                try {
+                    List<ItemNumberBean> ipAndPortBeans = materialAdapter.getmList();
+                    pd_prodcode = ipAndPortBeans.get(position).getPD_PRODCODE();
+                    //                edit_et.setText(pd_prodcode);
+                    //                for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                    //                    if (i == position){
+                    //                        ipAndPortBeans.get(i).setSelect(true);
+                    //                    }else {
+                    //                        ipAndPortBeans.get(i).setSelect(false);
+                    //                    }
+                    //                }
+                    //                setAdapterData(ipAndPortBeans);
+                    //                rv_ip_port_data.scrollToPosition(position);
+                    if (StringUtil.isEmpty(pd_prodcode)) {
+                        CommonUtil.toastNoRepeat(mActivity, "请选择物料编号");
+                        return;
+                    }
+                    cet_item_number.setText(pd_prodcode);
+                    etBarCode.requestFocus();
+                    etBarCode.setSelection(etBarCode.getText().length());
+                    startchuku();
+                    closeItemNumberPopupWindow();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
             }
         });
     }
@@ -924,7 +946,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         SharedPreUtil.saveString(getActivity().getApplicationContext(), Constants.FLAG.MATERIAL_OUT_COLLECT_TYPE, "byBarcode");
         mCollectType = "byBarcode";
 
-//        mBarcodeTableLayout.setVisibility(View.VISIBLE);
+        //        mBarcodeTableLayout.setVisibility(View.VISIBLE);
         mBarcodeTableLayout.setVisibility(View.GONE);
         mBoxTableLayout.setVisibility(View.GONE);
 
@@ -962,22 +984,22 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         progressDialog.show();
         String url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id + "&prodcode=" + cet_item_number.getText().toString().trim();
 
-//        String url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
-////        if (!isMultiple) {
-//        if (false) {
-//            if (mProdOutType.equals("byProdcode")) {
-//                url = GloableParams.ADDRESS_OUT_GET_NEXT_PRODCODE + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
-//            } else if (mProdOutType.equals("byBatch")) {
-//                url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
-//            }
-//        } else {
-//            url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
-//            if (mProdOutType.equals("byProdcode")) {
-//                url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
-//            } else if (mProdOutType.equals("byBatch")) {
-//                url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
-//            }
-//        }
+        //        String url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
+        ////        if (!isMultiple) {
+        //        if (false) {
+        //            if (mProdOutType.equals("byProdcode")) {
+        //                url = GloableParams.ADDRESS_OUT_GET_NEXT_PRODCODE + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
+        //            } else if (mProdOutType.equals("byBatch")) {
+        //                url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
+        //            }
+        //        } else {
+        //            url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
+        //            if (mProdOutType.equals("byProdcode")) {
+        //                url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
+        //            } else if (mProdOutType.equals("byBatch")) {
+        //                url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
+        //            }
+        //        }
 
         PdaApplication.mRequestQueue.cancelAll(TAG + "getnext");
         mStringRequest = new StringRequest(Request.Method.GET, url,
@@ -1030,10 +1052,10 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     /**
      * 开始出库
      */
-    private void startchuku(){
-        Log.e("pi_id",pi_id);
+    private void startchuku() {
+        Log.e("pi_id", pi_id);
         progressDialog.show();
-        String url = GloableParams.ADDRESS_PAD_STARTPRODOUT+ "?id="+pi_id +"&prodcode="+ cet_item_number.getText().toString().trim();
+        String url = GloableParams.ADDRESS_PAD_STARTPRODOUT + "?id=" + pi_id + "&prodcode=" + cet_item_number.getText().toString().trim();
         PdaApplication.mRequestQueue.cancelAll(TAG);
         mCollectTypeRadioGroup.setEnabled(false);
         jsonRequest = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener<JSONObject>() {
@@ -1041,7 +1063,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             public void onResponse(JSONObject jsonObject) {
                 progressDialog.dismiss();
                 try {
-                    Log.e("jsonObject",jsonObject.toString());
+                    Log.e("jsonObject", jsonObject.toString());
                     JSONObject dataObject = jsonObject.optJSONObject("data");
                     JSONObject dataData = dataObject.optJSONObject("next");
                     Object log = dataObject.get("log");
@@ -1055,17 +1077,17 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                     String dc = dataData.getString("DC");
                     mCollectResultTextView.setVisibility(View.VISIBLE);
                     mCollectResultTextView.setText(log.toString());
-                    mMaterialInforTextView.setText("物料:"+bar_prodcode
-                                                    +"名称:"+pr_detail
-                                                    +"规格:"+pr_spec
-                                                    +"未备料数:"+pd_restqty
-                                                    +"批数量:"+bar_remain
-                                                    +"DC:"+dc
+                    mMaterialInforTextView.setText("物料:" + bar_prodcode
+                            + "名称:" + pr_detail
+                            + "规格:" + pr_spec
+                            + "未备料数:" + pd_restqty
+                            + "批数量:" + bar_remain
+                            + "DC:" + dc
                     );
 
 
                     getNextMaterialInfo();
-//                    JSONObject messageObject = dataObject.getJSONObject("barcode");
+                    //                    JSONObject messageObject = dataObject.getJSONObject("barcode");
                     CommonUtil.toastNoRepeat(mActivity, "货架点亮成功");
                 } catch (Exception e) {
                     e.printStackTrace();
@@ -1099,9 +1121,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     /**
      * 结束出库
      */
-    private void stopchuku(){
+    private void stopchuku() {
         progressDialog.show();
-        String url = GloableParams.ADDRESS_COMMON_ENDPRODOUT+ "?id="+pi_id + "&prodcode=" + cet_item_number.getText().toString().trim();
+        String url = GloableParams.ADDRESS_COMMON_ENDPRODOUT + "?id=" + pi_id + "&prodcode=" + cet_item_number.getText().toString().trim();
         PdaApplication.mRequestQueue.cancelAll(TAG);
         mCollectTypeRadioGroup.setEnabled(false);
         jsonRequest = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener<JSONObject>() {
@@ -1109,14 +1131,14 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             public void onResponse(JSONObject jsonObject) {
                 progressDialog.dismiss();
                 try {
-                    Log.e("jsonObject",jsonObject.toString());
-//                    JSONObject dataObject = jsonObject.optJSONObject("data");
+                    Log.e("jsonObject", jsonObject.toString());
+                    //                    JSONObject dataObject = jsonObject.optJSONObject("data");
                     String data = FastjsonUtil.getText(jsonObject.toString(), "data");
 
                     mCollectResultTextView.setVisibility(View.VISIBLE);
                     mCollectResultTextView.setTextColor(getResources().getColor(R.color.blue));
                     mCollectResultTextView.setText(data.toString());
-//                    JSONObject messageObject = dataObject.getJSONObject("barcode");
+                    //                    JSONObject messageObject = dataObject.getJSONObject("barcode");
                     CommonUtil.toastNoRepeat(mActivity, data.toString());
                 } catch (Exception e) {
                     e.printStackTrace();
@@ -1164,15 +1186,15 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private void barcodeEnterEvent(boolean msdcheck, boolean datecheck) {
         progressDialog.show();
         boolean checkeds = special_check.isChecked();
-//        currentBarcode = etBarCode.getText().toString().trim();
+        //        currentBarcode = etBarCode.getText().toString().trim();
         String url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
                 + "?barcode=" + currentBarcode
                 + (isMultiple ? "&ids=" : "&ids=")
                 + pi_id + "&whcode=" + pd_whcode
                 + "&type=barcode&msdcheck=" + msdcheck
                 + "&datecheck=" + datecheck
-                +"&ifspecial="+checkeds
-                +"&prodcode="+ cet_item_number.getText().toString().trim();
+                + "&ifspecial=" + checkeds
+                + "&prodcode=" + cet_item_number.getText().toString().trim();
         try {
             if (mProdOutType != null && mCollectType != null) {
                 if (mProdOutType.equals("byProdcode")) {
@@ -1183,8 +1205,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 + pi_id + "&whcode=" + pd_whcode
                                 + "&type=barcode&msdcheck=" + msdcheck
                                 + "&datecheck=" + datecheck
-                                +"&ifspecial="+checkeds
-                        + "&prodcode=" + cet_item_number.getText().toString().trim();
+                                + "&ifspecial=" + checkeds
+                                + "&prodcode=" + cet_item_number.getText().toString().trim();
 
                     } else if (mCollectType.equals("byBatchcode")) {
                         url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
@@ -1193,8 +1215,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 + pi_id + "&whcode=" + pd_whcode
                                 + "&type=boxcode&msdcheck=" + msdcheck
                                 + "&datecheck=" + datecheck
-                                +"&ifspecial="+checkeds
-                        + "&prodcode=" + cet_item_number.getText().toString().trim();
+                                + "&ifspecial=" + checkeds
+                                + "&prodcode=" + cet_item_number.getText().toString().trim();
                     }
                 } else if (mProdOutType.equals("byBatch")) {
                     if (mCollectType.equals("byBarcode")) {
@@ -1204,8 +1226,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 + pi_id + "&whcode=" + pd_whcode
                                 + "&type=barcode&msdcheck=" + msdcheck
                                 + "&datecheck=" + datecheck
-                                +"&ifspecial="+checkeds
-                        + "&prodcode=" + cet_item_number.getText().toString().trim();
+                                + "&ifspecial=" + checkeds
+                                + "&prodcode=" + cet_item_number.getText().toString().trim();
                     } else if (mCollectType.equals("byBatchcode")) {
                         url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
                                 + "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
@@ -1213,8 +1235,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 + pi_id + "&whcode=" + pd_whcode
                                 + "&type=boxcode&msdcheck=" + msdcheck
                                 + "&datecheck=" + datecheck
-                                +"&ifspecial="+checkeds
-                        + "&prodcode=" + cet_item_number.getText().toString().trim();
+                                + "&ifspecial=" + checkeds
+                                + "&prodcode=" + cet_item_number.getText().toString().trim();
                     }
 
                 }
@@ -1242,7 +1264,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                     etBarCode.setText(null);
 
                     JSONObject messageObject = dataObject.getJSONObject("barcode");
-
                     if (messageObject.has("IFOVER") && messageObject.optBoolean("IFOVER")) {
                         new AlertDialog.Builder(mActivity)
                                 .setMessage("采集条码[" + messageObject.optString("BAR_CODE") + "]有效期已过,是否继续采集?")
@@ -1276,32 +1297,36 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                         mCollectResultTextView.setVisibility(View.VISIBLE);
                         mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
                         mCollectResultTextView.setText(null);
-//                        JSONArray listArray = dataObject.optJSONArray("nolist");
+                        //                        JSONArray listArray = dataObject.optJSONArray("nolist");
                         if (mCollectType.equals("byBarcode") || mCollectType.equals("byBatchcode")) {
                             String barcodeResult = "采集成功!\n"
-//                                    + JsonUtils.optStringNotNull(dataObject, "finishno")
+                                    //                                    + JsonUtils.optStringNotNull(dataObject, "finishno")
                                     + "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
                                     + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
-//                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
+                                    //                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
                                     + ";\n料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
-                                    + ";\n名称规格:" + messageObject.optString("PR_DETAIL")+";";
-//                                    + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC");
-//                                    + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
-
-//                            if (listArray != null && listArray.length() > 0) {
-//                                for (int i = 0; i < listArray.length(); i++) {
-//                                    JSONObject listObject = listArray.optJSONObject(i);
-//                                    barcodeResult = barcodeResult
-//                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
-//                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
-//                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
-//                                }
-//                            }
+                                    + ";\n名称规格:" + messageObject.optString("PR_DETAIL") + ";";
+                            //                                    + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC");
+                            //                                    + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
+
+                            //                            if (listArray != null && listArray.length() > 0) {
+                            //                                for (int i = 0; i < listArray.length(); i++) {
+                            //                                    JSONObject listObject = listArray.optJSONObject(i);
+                            //                                    barcodeResult = barcodeResult
+                            //                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
+                            //                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
+                            //                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
+                            //                                }
+                            //                            }
                             String finishno = JsonUtils.optStringNotNull(dataObject, "finishno");
-                            if (!finishno.isEmpty()){
+                            if (!finishno.isEmpty()) {
                                 text_finishno.setVisibility(View.VISIBLE);
                                 text_finishno.setText(finishno);
-                            }else {
+                                //包含 当前物料 并且 包含 已完成备料  才弹出物料的放大镜来
+                                if (finishno.contains("当前物料") && finishno.contains("已完成备料")){
+                                    getItemNumberData();
+                                }
+                            } else {
                                 text_finishno.setVisibility(View.GONE);
                             }
 
@@ -1338,15 +1363,15 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                     + " " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC");
 
 
-//                            if (listArray != null && listArray.length() > 0) {
-//                                for (int i = 0; i < listArray.length(); i++) {
-//                                    JSONObject listObject = listArray.optJSONObject(i);
-//                                    boxResult = boxResult
-//                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
-//                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
-//                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
-//                                }
-//                            }
+                            //                            if (listArray != null && listArray.length() > 0) {
+                            //                                for (int i = 0; i < listArray.length(); i++) {
+                            //                                    JSONObject listObject = listArray.optJSONObject(i);
+                            //                                    boxResult = boxResult
+                            //                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
+                            //                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
+                            //                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
+                            //                                }
+                            //                            }
 
                             mCollectResultTextView.setText(boxResult);
                             mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
@@ -1399,7 +1424,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                             mMaterialInforTextView.setText("该出库单已经完成备料");
                         }
                     }
-
+                    etBarCode.requestFocus();
                 } catch (JSONException e) {
                     e.printStackTrace();
                 }
@@ -1647,7 +1672,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                             clickToFragment(new MaterialOutStockTaskMultipleFragment());
                         } else {
                             clickToFragment(new MaterialOutStockTaskMultipleFragment());
-//                            clickToFragment(new MaterialOutStockTaskFragment());
+                            //                            clickToFragment(new MaterialOutStockTaskFragment());
                         }
                     }
                 });
@@ -1677,7 +1702,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                     public void onClick(View v) {
                         closeListPopupWindow();
                         ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
-//                        ((FunctionActivity) getActivity()).setScanIvVisible(false);
+                        //                        ((FunctionActivity) getActivity()).setScanIvVisible(false);
                         clickToFragment(new MaterialOutRevocationStockFragment());
                     }
                 });
@@ -1687,7 +1712,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                     public void onClick(View v) {
                         closeListPopupWindow();
                         ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
-//                        ((FunctionActivity) getActivity()).setScanIvVisible(false);
+                        //                        ((FunctionActivity) getActivity()).setScanIvVisible(false);
                         clickToFragment(new ModifyQuantityOutFragment());
                     }
                 });
@@ -1697,7 +1722,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                     public void onClick(View v) {
                         closeListPopupWindow();
                         ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
-//                        ((FunctionActivity) getActivity()).setScanIvVisible(false);
+                        //                        ((FunctionActivity) getActivity()).setScanIvVisible(false);
                         clickToFragment(new SpecialMaterialOutFragment());
                     }
                 });
@@ -1846,7 +1871,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             case R.id.btn_dew_cancel:
                 //点击取消按钮,关闭窗口
                 closePopupWindow();
-//                clearAll();
+                //                clearAll();
                 break;
             case R.id.iocout_collect_model_btn:
                 if (mCollectModelBtn.getText().toString().trim().equals("在线")) {
@@ -1961,8 +1986,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 
                         } else {
                             Toast.makeText(mActivity, "出烘烤失败", Toast.LENGTH_LONG).show();
-//                            etBarCode.setText("");
-//                            CommonUtil.editTextGetFocus(etBarCode);
+                            //                            etBarCode.setText("");
+                            //                            CommonUtil.editTextGetFocus(etBarCode);
                         }
                     }
                 }
@@ -2044,7 +2069,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                         if (messageObject.optBoolean("ISMSD")) {
                             //成功,有返回值,判断返回值message中isMsd是否存在,存在判断if(isMsd)true,弹出显示框
                             iocOutMakeMaterialOperMsd = JsonTools.parseJsonToBean(jsonObject.toString(), IOCOutMakeMaterialOperMsd.class);
-//                            Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
+                            //                            Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
                             mBarRemain = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getBAR_REMAIN());
                             mRestqty = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getRESTQTY());
                             showDewPopupWindow();
@@ -2063,32 +2088,32 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                         JSONArray listArray = dataObject.optJSONArray("nolist");
                         if (mCollectType.equals("byBarcode") || mCollectType.equals("byBatchcode")) {
                             String barcodeResult = "采集成功!"
-//                                    + JsonUtils.optStringNotNull(dataObject, "finishno")
+                                    //                                    + JsonUtils.optStringNotNull(dataObject, "finishno")
                                     + "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
                                     + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
-//                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
+                                    //                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
                                     + ";\n料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
                                     + ";\n名称规格:" + messageObject.optString("PR_DETAIL");
-//                                    + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
-//                                    + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
+                            //                                    + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
+                            //                                    + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
 
                             if (listArray != null && listArray.length() > 0) {
-//                                for (int i = 0; i < listArray.length(); i++) {
-//                                    JSONObject listObject = listArray.optJSONObject(i);
-//                                    barcodeResult = barcodeResult
-//                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
-//                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
-//                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
-//                                }
+                                //                                for (int i = 0; i < listArray.length(); i++) {
+                                //                                    JSONObject listObject = listArray.optJSONObject(i);
+                                //                                    barcodeResult = barcodeResult
+                                //                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
+                                //                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
+                                //                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
+                                //                                }
 
                                 //弹出拆分结果弹框
-                                initBreakPopupWindow(listArray,"1");
+                                initBreakPopupWindow(listArray, "1");
                             }
                             String finishno = JsonUtils.optStringNotNull(dataObject, "finishno");
-                            if (!finishno.isEmpty()){
+                            if (!finishno.isEmpty()) {
                                 text_finishno.setVisibility(View.VISIBLE);
                                 text_finishno.setText(finishno);
-                            }else {
+                            } else {
                                 text_finishno.setVisibility(View.GONE);
                             }
 
@@ -2457,7 +2482,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         PdaApplication.mRequestQueue.add(stringRequest);*/
     }
 
-    protected void initBreakPopupWindow(JSONArray listArray,String bolle) {
+    protected void initBreakPopupWindow(JSONArray listArray, String bolle) {
         messages.clear();
         for (int i = 0; i < listArray.length(); i++) {
             try {
@@ -2465,12 +2490,12 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 
                 if (barcodeObject != null) {
                     WHBreakingBatchBreakingBtnClickEvent.DataBean dataBean = new WHBreakingBatchBreakingBtnClickEvent.DataBean();
-                    if (bolle.equals("true")){
+                    if (bolle.equals("true")) {
                         dataBean.setBAR_CODE(JsonUtils.optStringNotNull(barcodeObject, "BAR_CODE"));
                         dataBean.setBAR_REMAIN(JsonUtils.optStringNotNull(barcodeObject, "BAR_REMAIN"));
                         dataBean.setPR_CODE(JsonUtils.optStringNotNull(barcodeObject, "PR_CODE"));
                         dataBean.setPR_SPEC(JsonUtils.optStringNotNull(barcodeObject, "PR_SPEC"));
-                    }else {
+                    } else {
                         dataBean.setBAR_CODE(JsonUtils.optStringNotNull(barcodeObject, "BAR_CODE"));
                         dataBean.setBAR_REMAIN(JsonUtils.optStringNotNull(barcodeObject, "BAR_REMAIN"));
                     }
@@ -2545,7 +2570,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             @Override
             public void onDismiss() {
                 closeSplitPopupWindow();
-//                confirmEvent();
+                //                confirmEvent();
             }
         });
         CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
@@ -2670,9 +2695,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         if (TextUtils.isEmpty(currentBarcode)) {
             CommonUtil.toastNoRepeat(getActivity(), "请输入号码");
         }
-//        else if (!currentBarcode.matches(Constants.REGEX.NO_CN_SYMBOL)) {
-//            CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
-//        }
+        //        else if (!currentBarcode.matches(Constants.REGEX.NO_CN_SYMBOL)) {
+        //            CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
+        //        }
         else {
             if (mCollectModel == 1) {
                 if (CommonUtil.isNetWorkConnected(getActivity())) {
@@ -2903,7 +2928,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             @Override
             public void onResponse(String s) {
                 LogUtil.e("已空", s + "");
-//                progressDialog.dismiss();
+                //                progressDialog.dismiss();
                 CommonUtil.toastNoRepeat(getActivity(), "已清空采集数据");
                 getCollectNotListOnline(pi_id, pd_whcode);
             }
@@ -2913,7 +2938,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                 progressDialog.dismiss();
                 if (getActivity() != null) {
                     closeListPopupWindow();
-//                getCollectNotListOnline(pi_id, pd_whcode);
+                    //                getCollectNotListOnline(pi_id, pd_whcode);
                     CommonUtil.showErrorToast(volleyError);
                 }
             }
@@ -3076,11 +3101,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         }
     }
 
-
-
-
-
-
     /**
      * 清除所有信息
      */
@@ -3142,7 +3162,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                             TableLPRODIONEEDGET tableLPRODIONEEDGET = allLprodioneedgets.get(i);
                                             if (tableLPRODIONEEDGET.getLPN_PIID() == deleteLbarcodeio.getLBI_PIID()
                                                     && tableLPRODIONEEDGET.getLPN_WHCODE().equals(deleteLbarcodeio.getLBI_WHCODE())
-//                                                    && tableLPRODIONEEDGET.getLPN_PRODCODE().equals(deleteLbarcodeio.getLBI_PRODCODE())
+                                                //                                                    && tableLPRODIONEEDGET.getLPN_PRODCODE().equals(deleteLbarcodeio.getLBI_PRODCODE())
                                             ) {
                                                 tableLPRODIONEEDGET.setLPN_RESTQTY(CommonUtil.doubleAddition(tableLPRODIONEEDGET.getLPN_RESTQTY(), deleteLbarcodeio.getLBI_INQTY()));
                                                 mDbManager.updateProductWaitCollect(tableLPRODIONEEDGET);
@@ -3159,13 +3179,18 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                             }
                         }
                     }).show();
-//            ((FunctionActivity) getActivity()).fragment = new MaterialStorageFragment();
+            //            ((FunctionActivity) getActivity()).fragment = new MaterialStorageFragment();
             return true;
         } else {
             return false;
         }
     }
 
+    private void setAdapterData(List<ItemNumberBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        materialAdapter.setmList(mList);
+        //rv_ip_port_data.setAdapter(materialAdapter);
+    }
 
     private class MaterialAdapter extends BaseQuickAdapter<ItemNumberBean, BaseViewHolder> {
         private List<ItemNumberBean> mmmmList;
@@ -3176,7 +3201,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 
         public void setmList(List<ItemNumberBean> mList) {
             this.mmmmList = mList;
-            notifyDataSetChanged();
+            this.notifyDataSetChanged();
+        }
+
+        public void updateList(List<ItemNumberBean> mList) {
+            mmmmList.clear();
+            mmmmList.addAll(mList);
+            this.notifyDataSetChanged();
         }
 
         public ItemNumberBean getBeanByPositon(int position) {
@@ -3197,7 +3228,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             helper.setText(R.id.tv_unprepared_materials_number, "未备料数量: " + item.getV_RESQTY());
             if (item.isSelect()) {
                 helper.setBackgroundColor(R.id.ll_item_bg, getResources().getColor(R.color.blue));
-            }else {
+            } else {
                 helper.setBackgroundColor(R.id.ll_item_bg, getResources().getColor(R.color.white));
             }
         }

+ 16 - 8
app/src/main/java/com/uas/uas_mes_stw/fragment/PositionInquiryFragment.java

@@ -58,10 +58,10 @@ public class PositionInquiryFragment extends BaseFragment{
         ((FunctionActivity) mActivity).setScanIvVisible(true);
         modify_barcode_quantity_barcode_cet = (ClearableEditText) root.findViewById(R.id.modify_barcode_quantity_barcode_cet);
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("仓位物料查询");
-        modify_barcode_quantity_confirm_btn = mActivity.findViewById(R.id.modify_barcode_quantity_confirm_btn);
+        modify_barcode_quantity_confirm_btn = root.findViewById(R.id.modify_barcode_quantity_confirm_btn);
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
-        rv_content = mActivity.findViewById(R.id.rv_data);
-        tv_loction = mActivity.findViewById(R.id.tv_loction);
+        rv_content = root.findViewById(R.id.rv_data);
+        tv_loction = root.findViewById(R.id.tv_loction);
     }
 
     @Override
@@ -80,14 +80,12 @@ public class PositionInquiryFragment extends BaseFragment{
             }
         });
 
-
         mFilterStorageInBeans = new ArrayList<>();
         rv_content.setLayoutManager(new LinearLayoutManager(mActivity));
-        reportDetailAdapter = new ReportDetailAdapter();
+        reportDetailAdapter = new ReportDetailAdapter(R.layout.item_report_detail,mFilterStorageInBeans);
         rv_content.setAdapter(reportDetailAdapter);
 
-
-
+        reportDetailAdapter.setNewData(mFilterStorageInBeans);
     }
 
     @Override
@@ -130,7 +128,17 @@ public class PositionInquiryFragment extends BaseFragment{
                             jltStorageInBean.setPR_SPEC(data.getString( "PR_SPEC"));
                             mFilterStorageInBeans.add(jltStorageInBean);
                         }
-                        reportDetailAdapter.setNewData(mFilterStorageInBeans);
+
+//                        getActivity().runOnUiThread(new Runnable() {
+//                            @Override
+//                            public void run() {
+//                                reportDetailAdapter.setNewData(mFilterStorageInBeans);
+//                                reportDetailAdapter.notifyDataSetChanged();
+//                            }
+//                        });
+
+                        reportDetailAdapter.replaceData(mFilterStorageInBeans);
+                        reportDetailAdapter.notifyDataSetChanged();
                     }
                     modify_barcode_quantity_barcode_cet.setText("");
                     modify_barcode_quantity_barcode_cet.requestFocus();

+ 266 - 48
app/src/main/java/com/uas/uas_mes_stw/fragment/SmartShelvestFragment.java

@@ -8,21 +8,33 @@ import android.graphics.Color;
 import android.graphics.drawable.BitmapDrawable;
 import android.support.v4.app.Fragment;
 import android.support.v7.app.AlertDialog;
+import android.support.v7.widget.DefaultItemAnimator;
+import android.support.v7.widget.DividerItemDecoration;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
 import android.text.TextUtils;
+import android.util.SparseBooleanArray;
 import android.view.KeyEvent;
+import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.PopupWindow;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
 import com.uas.uas_mes_stw.R;
 import com.uas.uas_mes_stw.activity.FunctionActivity;
+import com.uas.uas_mes_stw.bean.InductionBean;
 import com.uas.uas_mes_stw.global.GloableParams;
 import com.uas.uas_mes_stw.listener.MyEditorActionListener;
 import com.uas.uas_mes_stw.util.CameraUtil;
@@ -31,15 +43,18 @@ import com.uas.uas_mes_stw.util.FastjsonUtil;
 import com.uas.uas_mes_stw.util.FragmentUtils;
 import com.uas.uas_mes_stw.util.HttpCallback;
 import com.uas.uas_mes_stw.util.HttpParams;
+import com.uas.uas_mes_stw.util.LogUtil;
 import com.uas.uas_mes_stw.util.StringUtil;
 import com.uas.uas_mes_stw.util.VolleyRequest;
 import com.uas.uas_mes_stw.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
 
+import java.util.ArrayList;
+
 public class SmartShelvestFragment extends BaseFragment {
     private static final int SCAN_BARCODE_CODE = 101;
-    private ClearableEditText mBarcodeEditText,mLocationEditText;
+    private ClearableEditText mBarcodeEditText, mLocationEditText;
     private Button mConfirmButton;
     private TextView mResultTextView;
     private ImageView mScanImageView;
@@ -56,6 +71,13 @@ public class SmartShelvestFragment extends BaseFragment {
     private Button mMenuButton;
     private PopupWindow mMenuPopupWindow;
     private Fragment mFragment;
+    private RecyclerView rv_data;
+    private SelectAdapter myAdapter;
+    private ArrayList<InductionBean> mFeededList;
+    private CheckBox cb_quanxuan;
+    private String barIds = "";
+    private RelativeLayout rl_quanxuan;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_smart_shelves;
@@ -77,8 +99,11 @@ public class SmartShelvestFragment extends BaseFragment {
         btn_kill = mActivity.findViewById(R.id.btn_kill);
         tv_newtext1 = mActivity.findViewById(R.id.tv_newtext1);
         tv_newtext2 = mActivity.findViewById(R.id.tv_newtext2);
+        rv_data = mActivity.findViewById(R.id.rv_data);
+        cb_quanxuan = mActivity.findViewById(R.id.cb_quanxuan);
+        rl_quanxuan = mActivity.findViewById(R.id.rl_quanxuan);
         mBarcodeEditText.requestFocus();
-        jsonObject=new org.json.JSONObject();
+        jsonObject = new org.json.JSONObject();
     }
 
     @Override
@@ -90,14 +115,13 @@ public class SmartShelvestFragment extends BaseFragment {
             }
         });
 
-
         //仓位回车
         CommonUtil.setEditorActionListener(mLocationEditText, new MyEditorActionListener() {
             @Override
             public void MyEditorAction(String text, int actionId, KeyEvent event) {
-                if (!text.isEmpty()&&!mBarcodeEditText.getText().toString().isEmpty()){
+                if (!text.isEmpty() && !mBarcodeEditText.getText().toString().isEmpty()) {
                     saveBarAcceptCode("0");
-                }else {
+                } else {
                     mBarcodeEditText.requestFocus();
                 }
             }
@@ -107,7 +131,7 @@ public class SmartShelvestFragment extends BaseFragment {
             @SuppressLint("NonConstantResourceId")
             @Override
             public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
-                switch (checkid){
+                switch (checkid) {
                     case R.id.rb_zhuanchu:
                         rb_changeinter = "1";
                         break;
@@ -124,6 +148,7 @@ public class SmartShelvestFragment extends BaseFragment {
                 saveBarAcceptCode("0");
             }
         });
+
         btn_kill.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
@@ -154,7 +179,34 @@ public class SmartShelvestFragment extends BaseFragment {
                 mMenuPopupWindow.showAsDropDown(mMenuButton);
             }
         });
+
+        cb_quanxuan.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                if (buttonView.isPressed()) {   //只有当用户主动点击时才处理选中状态变化
+                    if (isChecked) {
+                        if (mFeededList.size() > 0) {
+                            barIds = "";
+                            for (int i = 0; i < mFeededList.size(); i++) {
+                                mFeededList.get(i).setCheck(true);
+                                barIds += mFeededList.get(i).getBAR_ID() + "," ;
+                            }
+                        }
+                    } else {
+                        if (mFeededList.size() > 0) {
+                            barIds = "";
+                            for (int i = 0; i < mFeededList.size(); i++) {
+                                mFeededList.get(i).setCheck(false);
+                            }
+                        }
+                    }
+                    setAdapter(mFeededList);
+                    myAdapter.notifyDataSetChanged();
+                }
+            }
+        });
     }
+
     private void initPopupWindow() {
         View view = View.inflate(getActivity(), R.layout.pop_storage_recharge_menu, null);
 
@@ -168,9 +220,9 @@ public class SmartShelvestFragment extends BaseFragment {
             @Override
             public void onClick(View v) {
                 closeMenuPopupWindow();
-//                Bundle bundle = new Bundle();
-//                bundle.putString(Constants.FLAG.FLAG_RECHARGE_CALLER, "AcceptNotify!Have");
-//                mFragment.setArguments(bundle);
+                //                Bundle bundle = new Bundle();
+                //                bundle.putString(Constants.FLAG.FLAG_RECHARGE_CALLER, "AcceptNotify!Have");
+                //                mFragment.setArguments(bundle);
                 FragmentUtils.switchFragment(SmartShelvestFragment.this, mFragment);
             }
         });
@@ -192,16 +244,22 @@ public class SmartShelvestFragment extends BaseFragment {
             CommonUtil.setBackgroundAlpha(mActivity, 1f);
         }
     }
-    @Override
-    protected void initDatas() { ;
 
+    @Override
+    protected void initDatas() {
+        mFeededList = new ArrayList<>();
+        myAdapter = new SelectAdapter(mFeededList);
+        rv_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        //设置Item增加、移除动画
+        rv_data.setItemAnimator(new DefaultItemAnimator());
+        setAdapter(mFeededList);
+        rv_data.setAdapter(myAdapter);
     }
 
 
-
-
     private void getBarAcceptCode(String barcode) {
-        if (StringUtil.isEmpty(barcode)){
+        if (StringUtil.isEmpty(barcode)) {
             CommonUtil.toastNoRepeat(mActivity, "请输入条码号");
             return;
         }
@@ -212,14 +270,14 @@ public class SmartShelvestFragment extends BaseFragment {
                     .url(GloableParams.ADDRESS_COMMON_SCANGETBARDATA)
                     .method(Request.Method.GET)
                     .addParam("code", barcode)
-                    .addParam("single",rb_changeinter)
+                    .addParam("single", rb_changeinter)
                     .build(), new HttpCallback() {
                 @Override
                 public void onSuccess(int flag, Object o) throws Exception {
                     progressDialog.dismiss();
                     mLocationEditText.requestFocus();
                     mLocationEditText.setSelection(mLocationEditText.getText().length());
-                    JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+                    JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(), "data");
                     String BAR_PRODCODE = dataObject.getString("BAR_PRODCODE") == null ? "" : dataObject.getString("BAR_PRODCODE");
                     String PR_DETAIL = dataObject.getString("PR_DETAIL") == null ? "" : dataObject.getString("PR_DETAIL");
                     String PR_SPEC = dataObject.getString("PR_SPEC") == null ? "" : dataObject.getString("PR_SPEC");
@@ -236,19 +294,37 @@ public class SmartShelvestFragment extends BaseFragment {
                     mResultTextView.setVisibility(View.VISIBLE);
                     tv_newtext1.setVisibility(View.VISIBLE);
                     tv_newtext2.setVisibility(View.VISIBLE);
-                    mResultTextView.setText(TYPE+":"+mBarcodeEditText.getText().toString().trim()
-                                            +"\n编号:"+BAR_PRODCODE+" 数量:"+BAR_REMAIN
-                                            +"\n物料:"+PR_DETAIL
-                                            +"\n规格:"+PR_SPEC
-                                            +"\n默认仓位:"+PR_LOCATION);
-                    tv_newtext1.setText("目前仓位:"+BAR_LOCATION
-                            +"\n已存放仓位:"+LOCATIONS);
-                    tv_newtext2.setText("建议仓位:"+LOCATION);
-                    if (!mLocationEditText.getText().toString().isEmpty()&&!mBarcodeEditText.getText().toString().isEmpty()){
+                    mResultTextView.setText(TYPE + ":" + mBarcodeEditText.getText().toString().trim()
+                            + "\n编号:" + BAR_PRODCODE + " 数量:" + BAR_REMAIN
+                            + "\n物料:" + PR_DETAIL
+                            + "\n规格:" + PR_SPEC
+                            + "\n默认仓位:" + PR_LOCATION);
+                    tv_newtext1.setText("目前仓位:" + BAR_LOCATION
+                            + "\n已存放仓位:" + LOCATIONS);
+                    tv_newtext2.setText("建议仓位:" + LOCATION);
+                    if (!mLocationEditText.getText().toString().isEmpty() && !mBarcodeEditText.getText().toString().isEmpty()) {
                         saveBarAcceptCode("0");
-                    }else {
+                    } else {
                         mLocationEditText.requestFocus();
                     }
+                    JSONArray othersArr = dataObject.getJSONArray("OTHERS");
+                    if (othersArr != null && othersArr.size() > 0) {
+                        rl_quanxuan.setVisibility(View.VISIBLE);
+                        mFeededList.clear();
+                        for (int i = 0; i < othersArr.size(); i++) {
+                            JSONObject jsonObject = othersArr.getJSONObject(i);
+                            InductionBean inductionBean = new InductionBean();
+                            inductionBean.setBAR_ID(FastjsonUtil.getText(jsonObject, "BAR_ID"));
+                            inductionBean.setBAR_CODE(FastjsonUtil.getText(jsonObject, "BAR_CODE"));
+                            inductionBean.setBAR_REMAIN(FastjsonUtil.getText(jsonObject, "BAR_REMAIN"));
+                            inductionBean.setCheck(false);
+                            mFeededList.add(inductionBean);
+                        }
+                        setAdapter(mFeededList);
+                        myAdapter.notifyDataSetChanged();
+                    }else {
+                        clearListData();
+                    }
                 }
 
                 @Override
@@ -263,7 +339,7 @@ public class SmartShelvestFragment extends BaseFragment {
                     mBarcodeEditText.requestFocus();
                     mBarcodeEditText.setText(null);
                     mLocationEditText.setText(null);
-
+                    clearListData();
                 }
             });
         } catch (Exception e) {
@@ -271,6 +347,11 @@ public class SmartShelvestFragment extends BaseFragment {
         }
     }
 
+    private void clearListData() {
+        rl_quanxuan.setVisibility(View.GONE);
+        mFeededList.clear();
+        myAdapter.notifyDataSetChanged();
+    }
 
     private void saveBarAcceptCode(String ifmix) {
         String barcode = mBarcodeEditText.getText().toString();
@@ -291,9 +372,10 @@ public class SmartShelvestFragment extends BaseFragment {
                 .url(GloableParams.ADDRESS_COMMON_SCANCONFIRMTRANS)
                 .method(Request.Method.POST)
                 .addParam("code", barcode)
-                .addParam("single",rb_changeinter)
-                .addParam("location",warehouse)
-                .addParam("ifmix",ifmix)
+                .addParam("single", rb_changeinter)
+                .addParam("location", warehouse)
+                .addParam("ifmix", ifmix)
+                .addParam("data", barIds.length() > 1 ? barIds.substring(0, barIds.length() - 1) : barIds)
                 .build(), new HttpCallback() {
             @Override
             public void onSuccess(int flag, Object o) throws Exception {
@@ -303,23 +385,21 @@ public class SmartShelvestFragment extends BaseFragment {
                 tv_newtext2.setVisibility(View.GONE);
                 mResultTextView.setTextColor(getResources().getColor(R.color.blue));
 
-
-
-                JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+                JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(), "data");
                 String LOG = dataObject.getString("log") == null ? "" : dataObject.getString("log");
                 String IFMIX = dataObject.getString("ifmix") == null ? "" : dataObject.getString("ifmix");
                 String PRODCODE = dataObject.getString("prodcode") == null ? "" : dataObject.getString("prodcode");
-                if (StringUtil.isEmpty(IFMIX)){
+                if (StringUtil.isEmpty(IFMIX)) {
                     mResultTextView.setText(null);
                     mBarcodeEditText.setText(null);
                     mLocationEditText.setText(null);
                 }
-                if (StringUtil.isEmpty(IFMIX)){
+                if (StringUtil.isEmpty(IFMIX)) {
                     mResultTextView.setText(LOG);
-                }else {
+                } else {
                     new AlertDialog.Builder(getActivity()).setTitle("提示")
                             .setCancelable(true)
-                            .setMessage("是否允许混物料放置? 已经放置物料:"+PRODCODE)
+                            .setMessage("是否允许混物料放置? 已经放置物料:" + PRODCODE)
                             .setPositiveButton("是", new DialogInterface.OnClickListener() {
                                 @Override
                                 public void onClick(DialogInterface dialog, int which) {
@@ -328,21 +408,18 @@ public class SmartShelvestFragment extends BaseFragment {
                             })
                             .setNegativeButton("否", null).show();
                 }
-
+                clearListData();
                 mBarcodeEditText.requestFocus();
-
-
-
             }
 
             @Override
             public void onFail(int flag, String failStr) throws Exception {
                 progressDialog.dismiss();
                 CommonUtil.toastNoRepeat(mActivity, failStr);
-                if (failStr.contains("仓位")){
+                if (failStr.contains("仓位")) {
                     mLocationEditText.setText(null);
                     mLocationEditText.requestFocus();
-                }else {
+                } else {
                     mBarcodeEditText.requestFocus();
                     mBarcodeEditText.setText(null);
                 }
@@ -351,12 +428,12 @@ public class SmartShelvestFragment extends BaseFragment {
                 tv_newtext2.setVisibility(View.GONE);
                 mResultTextView.setTextColor(getResources().getColor(R.color.red));
                 mResultTextView.setText(failStr);
-
-
+                clearListData();
             }
         });
 
     }
+
     private void savekillAcceptCode() {
         progressDialog.show();
         VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
@@ -374,8 +451,7 @@ public class SmartShelvestFragment extends BaseFragment {
                 mBarcodeEditText.requestFocus();
                 mResultTextView.setTextColor(getResources().getColor(R.color.blue));
                 mResultTextView.setText("结束上架操作成功");
-
-
+                clearListData();
             }
 
             @Override
@@ -390,10 +466,12 @@ public class SmartShelvestFragment extends BaseFragment {
                 mBarcodeEditText.requestFocus();
                 mBarcodeEditText.setText(null);
                 mLocationEditText.setText(null);
+                clearListData();
             }
         });
 
     }
+
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         if (resultCode != Activity.RESULT_OK) {
@@ -417,7 +495,7 @@ public class SmartShelvestFragment extends BaseFragment {
         if (!hidden) {
             FunctionActivity.setTitle("智能上架(扫码)");
             ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
-        }else {
+        } else {
             ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
         }
     }
@@ -437,4 +515,144 @@ public class SmartShelvestFragment extends BaseFragment {
         super.onDestroyView();
         ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
     }
+
+    public class SelectAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+
+        private ArrayList<InductionBean> mList = new ArrayList<>();
+        private SparseBooleanArray mSelectedPositions = new SparseBooleanArray();
+        private boolean mIsSelectable = false;
+
+        public SelectAdapter(ArrayList<InductionBean> list) {
+            if (list == null) {
+                throw new IllegalArgumentException("model Data must not be null");
+            }
+            mList = list;
+        }
+
+        //更新adpter的数据和选择状态
+        public void updateDataSet(ArrayList<InductionBean> list) {
+            this.mList = list;
+            mSelectedPositions = new SparseBooleanArray();
+            //            ab.setTitle("已选择" + 0 + "项");
+            notifyDataSetChanged();
+        }
+
+        //获得选中条目的结果
+        public ArrayList<InductionBean> getSelectedItem() {
+            ArrayList<InductionBean> selectList = new ArrayList<>();
+            for (int i = 0; i < mList.size(); i++) {
+                if (isItemChecked(i)) {
+                    selectList.add(mList.get(i));
+                }
+            }
+            return selectList;
+        }
+
+        @Override
+        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
+            View itemView = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_rv_zhinengshangjia, viewGroup, false);
+            return new ListItemViewHolder(itemView);
+        }
+
+        //设置给定位置条目的选择状态
+        private void setItemChecked(int position, boolean isChecked) {
+            mSelectedPositions.put(position, isChecked);
+        }
+
+        //根据位置判断条目是否选中
+        private boolean isItemChecked(int position) {
+            return mSelectedPositions.get(position);
+        }
+
+        //根据位置判断条目是否可选
+        private boolean isSelectable() {
+            return mIsSelectable;
+        }
+
+        //设置给定位置条目的可选与否的状态
+        private void setSelectable(boolean selectable) {
+            mIsSelectable = selectable;
+        }
+
+        //绑定界面,设置监听
+        @Override
+        public void onBindViewHolder(final RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") int i) {
+            //设置条目状态
+            ((SelectAdapter.ListItemViewHolder) holder).tv_date1.setText("条码:" + mList.get(i).getBAR_CODE());
+            ((SelectAdapter.ListItemViewHolder) holder).tv_date2.setText("数量:" + mList.get(i).getBAR_REMAIN());
+
+//            ((SelectAdapter.ListItemViewHolder) holder).cb_danxuan.setChecked(isItemChecked(i));
+            ((SelectAdapter.ListItemViewHolder) holder).cb_danxuan.setChecked(mList.get(i).isCheck());
+
+//            ((SelectAdapter.ListItemViewHolder) holder).cb_danxuan.setOnClickListener(new View.OnClickListener() {
+//                @Override
+//                public void onClick(View v) {
+//                    if (isItemChecked(i)) {
+//                        setItemChecked(i, false);
+//                    } else {
+//                        setItemChecked(i, true);
+//                    }
+//                }
+//            });
+
+                        ((ListItemViewHolder) holder).cb_danxuan.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                            @Override
+                            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                                if (buttonView.isPressed()) {   //只有当用户主动点击时才处理选中状态变化
+                                    if (isChecked) {
+                                        if (!TextUtils.isEmpty(barIds)) {
+                                            if (!barIds.contains(mList.get(i).getBAR_ID())) {
+                                                barIds += mList.get(i).getBAR_ID() + ",";
+                                            }
+                                        } else {
+                                            barIds = mList.get(i).getBAR_ID() + ",";
+                                        }
+                                    } else {
+                                        boolean checked = cb_quanxuan.isChecked();
+                                        if (checked) {
+                                            cb_quanxuan.setChecked(false);
+                                        }
+                                        if (!TextUtils.isEmpty(barIds)) {
+                                            if (barIds.contains(mList.get(i).getBAR_ID())) {
+                                                int startIndex = barIds.indexOf(mList.get(i).getBAR_ID());
+                                                int endIndex = startIndex + mList.get(i).getBAR_ID().length() + 1;
+                                                // 删除子串
+                                                barIds = barIds.substring(0, startIndex).concat(barIds.substring(endIndex));
+                                                LogUtil.e("aaa","checkBox.setOnCheckedChangeListener长度是:" +barIds);
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        });
+
+
+        }
+
+        @Override
+        public int getItemCount() {
+            return mList == null ? 0 : mList.size();
+        }
+
+        public class ListItemViewHolder extends RecyclerView.ViewHolder {
+            //ViewHolder
+            CheckBox cb_danxuan;
+            TextView tv_date1;
+            TextView tv_date2;
+
+            ListItemViewHolder(View view) {
+                super(view);
+                this.tv_date1 = (TextView) view.findViewById(R.id.tv_date1);
+                this.tv_date2 = (TextView) view.findViewById(R.id.tv_date2);
+                this.cb_danxuan = (CheckBox) view.findViewById(R.id.cb_danxuan);
+            }
+        }
+    }
+
+    private void setAdapter(ArrayList<InductionBean> mList) {
+        //LogUtil.i("mList", JSON.toJSONString(mList));
+        myAdapter = new SelectAdapter(mList);
+        rv_data.setAdapter(myAdapter);
+    }
+
 }

+ 230 - 0
app/src/main/java/com/uas/uas_mes_stw/util/CrashHandler.java

@@ -0,0 +1,230 @@
+package com.uas.uas_mes_stw.util;
+
+import android.content.Context;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.os.Build;
+import android.os.Environment;
+import android.os.Looper;
+import android.util.Log;
+
+import com.uas.uas_mes_stw.application.PdaApplication;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.lang.Thread.UncaughtExceptionHandler;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+
+public class CrashHandler implements UncaughtExceptionHandler {
+
+    public static final String TAG = "CrashHandler";
+
+    //系统默认的UncaughtException处理类
+    private UncaughtExceptionHandler mDefaultHandler;
+    //CrashHandler实例
+    private static CrashHandler INSTANCE = new CrashHandler();
+    //程序的Context对象
+    private Context mContext;
+    //用来存储设备信息和异常信息
+    private Map<String, String> infos = new HashMap<String, String>();
+
+    /** 保证只有一个CrashHandler实例 */
+    private CrashHandler() {
+    }
+
+    private DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
+    /** 获取CrashHandler实例 ,单例模式 */
+    public static CrashHandler getInstance() {
+        return INSTANCE;
+    }
+
+    /**
+     * 初始化
+     * @param context
+     */
+    public void init(Context context) {
+        mContext = context;
+        //获取系统默认的UncaughtException处理器
+        mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler();
+        //设置该CrashHandler为程序的默认处理器
+        Thread.setDefaultUncaughtExceptionHandler(this);
+    }
+
+    /**
+     * 当UncaughtException发生时会转入该函数来处理
+     */
+    @Override
+    public void uncaughtException(Thread thread, Throwable ex) {
+        if (!handleException(ex) && mDefaultHandler != null) {
+            //如果用户没有处理则让系统默认的异常处理器来处理
+            mDefaultHandler.uncaughtException(thread, ex);
+        } else {
+            try {
+                Thread.sleep(3000);
+            } catch (InterruptedException e) {
+                Log.e(TAG, "error : ", e);
+            }
+            //退出程序
+            android.os.Process.killProcess(android.os.Process.myPid());
+            System.exit(1);
+        }
+    }
+
+    /**
+     * 自定义错误处理,收集错误信息 发送错误报告等操作均在此完成.
+     *
+     * @param ex
+     * @return true:如果处理了该异常信息;否则返回false.
+     */
+    private boolean handleException(Throwable ex) {
+        if (ex == null) {
+            return false;
+        }
+        final String msg = ex.getLocalizedMessage();
+        //使用Toast来显示异常信息
+        new Thread() {
+            @Override
+            public void run() {
+                Looper.prepare();
+                //MToast.makeText(msg).show();
+                Looper.loop();
+            }
+        }.start();
+
+//        MAppData.GetInstance().setBooleanData("LoginAuto", false);
+//        if(!MAppData.GetInstance().isXG()) {
+//            Intent intent_a = new Intent(mContext, MService.class);
+//            mContext.stopService(intent_a);
+//        }
+
+        //收集设备参数信息
+//        ExceptionError(ex);     //提交到服务器
+        saveCrashInfo2File(ex);
+        collectDeviceInfo(mContext);
+        return true;
+    }
+
+    /**
+     * 收集设备参数信息
+     * @param ctx
+     */
+    public void collectDeviceInfo(Context ctx) {
+        try {
+            PackageManager pm = ctx.getPackageManager();
+            PackageInfo pi = pm.getPackageInfo(ctx.getPackageName(), PackageManager.GET_ACTIVITIES);
+            if (pi != null) {
+                String versionName = pi.versionName == null ? "null" : pi.versionName;
+                String versionCode = pi.versionCode + "";
+                infos.put("versionName", versionName);
+                infos.put("versionCode", versionCode);
+            }
+        } catch (NameNotFoundException e) {
+            Log.e(TAG, "an error occured when collect package info", e);
+        }
+        java.lang.reflect.Field[] fields = Build.class.getDeclaredFields();
+        for (java.lang.reflect.Field field : fields) {
+            try {
+                field.setAccessible(true);
+                infos.put(field.getName(), field.get(null).toString());
+                Log.d(TAG, field.getName() + " : " + field.get(null));
+            } catch (Exception e) {
+                Log.e(TAG, "an error occured when collect crash info", e);
+            }
+        }
+    }
+
+    private String saveCrashInfo2File(Throwable ex) {
+        StringBuffer sb = new StringBuffer();
+//        for (Map.Entry<String, String> entry : infos.entrySet()) {
+//            String key = entry.getKey();
+//            String value = entry.getValue();
+//            sb.append(key + "=" + value + "\n");
+//        }
+
+        Writer writer = new StringWriter();
+        PrintWriter printWriter = new PrintWriter(writer);
+        ex.printStackTrace(printWriter);
+        Throwable cause = ex.getCause();
+        while (cause != null) {
+            Log.i("liuyou", "cause:"+cause.toString()+"--");
+            cause.printStackTrace(printWriter);
+            cause = cause.getCause();
+        }
+        printWriter.close();
+        String result = writer.toString();
+        Log.i("liuyou", "result:"+result);
+        sb.append(result);
+        try {
+            long timestamp = System.currentTimeMillis();
+            String time = formatter.format(new Date());
+            String fileName = "crash-" + time + "-" + timestamp + ".log";
+            if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
+                String path = "/sdcard/Log_"+mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).packageName+"/";
+                File dir = new File(path);
+                if (!dir.exists()) {
+                    dir.mkdirs();
+                }
+                FileOutputStream fos = new FileOutputStream(path + fileName);
+                fos.write(sb.toString().getBytes());
+                fos.close();
+            }
+            return fileName;
+        } catch (Exception e) {
+            Log.e(TAG, "an error occured while writing file...", e);
+        }
+        return null;
+    }
+
+    private final int _WriteLog  = 0;
+    private void ExceptionError(Throwable ex) {
+        StringBuffer sb = new StringBuffer();
+        Writer writer = new StringWriter();
+        PrintWriter printWriter = new PrintWriter(writer);
+        ex.printStackTrace(printWriter);
+        Throwable cause = ex.getCause();
+        while (cause != null) {
+            Log.i("liuyou", "cause:" + cause.toString() + "--");
+            cause.printStackTrace(printWriter);
+            cause = cause.getCause();
+        }
+        printWriter.close();
+        String result = writer.toString();
+        sb.append(result);
+//        WebService ws = new WebService(mContext, _WriteLog, true, "WriteLog");
+//        HashMap<String, Object> property = new HashMap<String, Object>();
+//        property.put("loginName", MAppData.GetInstance().getStringData("LoginName"));
+//        property.put("password", MAppData.GetInstance().getStringData("LoginPwd"));
+//        property.put("logContent", Contents.APPName + "-" + getVersion() + " " + sb.toString());
+//        ws.addWebServiceListener(new WebServiceListener() {
+//
+//            @Override
+//            public void onWebServiceReceive(String method, int id, String result) {
+//                // TODO Auto-generated method stub
+//                android.os.Process.killProcess(android.os.Process.myPid());
+//                System.exit(1);
+//            }
+//        });
+//        ws.SyncGet(property);
+    }
+
+    public String getVersion() {
+        try {
+            PackageManager manager = PdaApplication.getInstance().getContext().getPackageManager();
+            PackageInfo info = manager.getPackageInfo(PdaApplication.getInstance().getContext().getPackageName(), 0);
+            String version = info.versionName;
+            return  version;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return "";
+        }
+    }
+}

+ 28 - 31
app/src/main/res/layout/fragment_iocout_make_material_oper.xml

@@ -139,6 +139,34 @@
 
                 </LinearLayout>
 
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:minHeight="48dp"
+                    >
+
+                    <com.uas.uas_mes_stw.view.ClearableEditText
+                        android:id="@+id/cet_item_number"
+                        style="@style/PopWinEditTextStyle"
+                        android:layout_marginTop="8dp"
+                        android:layout_weight="1"
+                        android:hint="料号" />
+
+                    <ImageView
+                        android:id="@+id/iv_item_number_search"
+                        android:layout_width="@dimen/height_32"
+                        android:layout_height="@dimen/height_32"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginLeft="@dimen/space_left_5"
+                        android:layout_marginRight="@dimen/dp_10"
+                        android:background="@drawable/bg_button"
+                        android:src="@drawable/search_48" />
+
+                </LinearLayout>
+
+
                 <TableLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
@@ -188,37 +216,6 @@
                     android:text="@string/confirm"
                     android:visibility="gone" />
 
-
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-
-                    android:minHeight="48dp"
-                    >
-
-                    <com.uas.uas_mes_stw.view.ClearableEditText
-                        android:id="@+id/cet_item_number"
-                        style="@style/PopWinEditTextStyle"
-                        android:layout_marginTop="8dp"
-                        android:layout_weight="1"
-                        android:hint="料号" />
-
-                    <ImageView
-                        android:id="@+id/iv_item_number_search"
-                        android:layout_width="@dimen/height_32"
-                        android:layout_height="@dimen/height_32"
-                        android:layout_gravity="center_vertical"
-                        android:layout_marginLeft="@dimen/space_left_5"
-                        android:layout_marginRight="@dimen/dp_10"
-                        android:background="@drawable/bg_button"
-                        android:src="@drawable/search_48" />
-
-                </LinearLayout>
-
-
-
                 <TableLayout
                     android:id="@+id/iocout_collect_barcode_tl"
                     android:layout_width="match_parent"

+ 165 - 105
app/src/main/res/layout/fragment_smart_shelves.xml

@@ -7,51 +7,63 @@
     android:orientation="vertical"
     android:padding="@dimen/root_layout_padding">
 
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        >
+
     <LinearLayout
-        android:orientation="vertical"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-        <RadioGroup
-            android:id="@+id/rg_change"
-            android:layout_marginTop="@dimen/dp_10"
-            android:orientation="horizontal"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:gravity="center">
-            <RadioButton
-                android:id="@+id/rb_zhuanchu"
-                android:text="单盘"
-                android:layout_gravity="center"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:checked="true"
-                android:layout_marginRight="50dp">
-            </RadioButton>
-            <RadioButton
-                android:id="@+id/rb_chexiao"
-                android:text="非单盘"
-                android:layout_gravity="center"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="50dp">
-            </RadioButton>
-        </RadioGroup>
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        >
+
 
         <LinearLayout
-            android:layout_marginTop="@dimen/dp_10"
-            android:orientation="horizontal"
+            android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="wrap_content">
-            <TextView
-                android:layout_width="110dp"
-                android:layout_height="match_parent"
-                android:background="@color/gray_light"
-                android:gravity="center"
-                android:padding="6dp"
-                android:text="条码"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
+            <RadioGroup
+                android:id="@+id/rg_change"
+                android:layout_marginTop="@dimen/dp_10"
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:gravity="center">
+                <RadioButton
+                    android:id="@+id/rb_zhuanchu"
+                    android:text="单盘"
+                    android:layout_gravity="center"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:checked="true"
+                    android:layout_marginRight="50dp">
+                </RadioButton>
+                <RadioButton
+                    android:id="@+id/rb_chexiao"
+                    android:text="非单盘"
+                    android:layout_gravity="center"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="50dp">
+                </RadioButton>
+            </RadioGroup>
+
+            <LinearLayout
+                android:layout_marginTop="@dimen/dp_10"
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    android:layout_width="110dp"
+                    android:layout_height="match_parent"
+                    android:background="@color/gray_light"
+                    android:gravity="center"
+                    android:padding="6dp"
+                    android:text="条码"
+                    android:textColor="@color/body_text_1"
+                    android:textSize="16sp" />
                 <com.uas.uas_mes_stw.view.ClearableEditText
                     android:id="@+id/barcode_info_collect_barcode_et"
                     style="@style/EditTextStyle"
@@ -63,86 +75,134 @@
                     android:imeOptions="actionSend"
                     android:textColor="@color/black" />
             </LinearLayout>
+            <LinearLayout
+                android:layout_marginTop="5dp"
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    android:id="@+id/material_in_collect_location_tv"
+                    android:layout_width="110dp"
+                    android:layout_height="match_parent"
+                    android:background="@color/gray_light"
+                    android:gravity="center"
+                    android:padding="10dp"
+                    android:text="仓位"
+                    android:textColor="@color/body_text_1"
+                    android:textSize="16sp"  />
+
+                <com.uas.uas_mes_stw.view.ClearableEditText
+                    android:id="@+id/material_in_collect_location_et"
+                    style="@style/EditTextStyle"
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:hint="请输入仓位"
+                    android:lines="1"
+                    android:maxLines="1"
+                    android:textColor="@color/black"
+                    android:singleLine="true"/>
+            </LinearLayout>
+        </LinearLayout>
+
         <LinearLayout
-            android:layout_marginTop="5dp"
             android:orientation="horizontal"
             android:layout_width="match_parent"
             android:layout_height="wrap_content">
-            <TextView
-                android:id="@+id/material_in_collect_location_tv"
-                android:layout_width="110dp"
-                android:layout_height="match_parent"
-                android:background="@color/gray_light"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="仓位"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp"  />
-
-            <com.uas.uas_mes_stw.view.ClearableEditText
-                android:id="@+id/material_in_collect_location_et"
-                style="@style/EditTextStyle"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:hint="请输入仓位"
-                android:lines="1"
-                android:maxLines="1"
-                android:textColor="@color/black"
-                android:singleLine="true"/>
-        </LinearLayout>
-    </LinearLayout>
-    <LinearLayout
-        android:orientation="horizontal"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-        <Button
-            android:id="@+id/barcode_info_collect_confirm_btn"
-            style="@style/ButtonStyle"
-            android:layout_marginTop="16dp"
-            android:text="上架"
-            android:layout_weight="1"/>
-        <Button
-            android:id="@+id/btn_kill"
-            style="@style/ButtonStyle"
-            android:layout_marginTop="16dp"
-            android:text="结束上架"
-            android:layout_weight="1"/>
-
-    </LinearLayout>
+            <Button
+                android:id="@+id/barcode_info_collect_confirm_btn"
+                style="@style/ButtonStyle"
+                android:layout_marginTop="16dp"
+                android:text="上架"
+                android:layout_weight="1"/>
+            <Button
+                android:id="@+id/btn_kill"
+                style="@style/ButtonStyle"
+                android:layout_marginTop="16dp"
+                android:text="结束上架"
+                android:layout_weight="1"/>
 
+        </LinearLayout>
 
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/spacing_big"
-        android:background="@drawable/shape_msg_block"
-        android:padding="10dp">
-        <TextView
-            android:id="@+id/barcode_info_collect_result_tv"
+        <LinearLayout
+            android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:visibility="gone"
-            tools:visibility="visible"
-            tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
+            android:layout_marginTop="@dimen/spacing_big"
+            android:background="@drawable/shape_msg_block"
+            android:padding="10dp">
+            <TextView
+                android:id="@+id/barcode_info_collect_result_tv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:visibility="gone"
+                tools:visibility="visible"
+                tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
 
-        <TextView
-            android:id="@+id/tv_newtext1"
+            <TextView
+                android:id="@+id/tv_newtext1"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:visibility="gone"
+                tools:visibility="visible"
+                android:textColor="@color/green"
+                tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
+            <TextView
+                android:id="@+id/tv_newtext2"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:visibility="gone"
+                tools:visibility="visible"
+                android:textColor="@color/blue"
+                tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
+        </LinearLayout>
+
+        <RelativeLayout
+            android:visibility="gone"
+            android:id="@+id/rl_quanxuan"
+            android:layout_marginTop="10dp"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:textColor="@color/green"
-            tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
-        <TextView
-            android:id="@+id/tv_newtext2"
+            >
+
+            <CheckBox
+                android:id="@+id/cb_quanxuan"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="全选"
+                />
+
+       <!--     <TextView
+                android:id="@+id/tv_tiaoma"
+                android:layout_toEndOf="@+id/cb_quanxuan"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="10dp"
+                android:text="条码号"
+                />
+
+            <TextView
+                android:layout_toEndOf="@+id/tv_tiaoma"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="10dp"
+                android:text="数量"
+                />-->
+
+        </RelativeLayout>
+
+
+        <android.support.v7.widget.RecyclerView
+            android:layout_marginTop="10dp"
+            android:id="@+id/rv_data"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:textColor="@color/blue"
-            tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
+            />
+
     </LinearLayout>
 
+    </android.support.v4.widget.NestedScrollView>
+
+
+
 
 </LinearLayout>

+ 0 - 6
app/src/main/res/layout/index_recycle_item.xml

@@ -60,7 +60,6 @@
         android:layout_marginTop="10dp"
         android:layout_marginBottom="10dp">
 
-
         <Button
             android:id="@+id/cancle_tv"
             android:layout_width="0dp"
@@ -83,9 +82,4 @@
             android:textColor="@color/white" />
     </LinearLayout>
 
-
-
-
-
-
 </RelativeLayout>

+ 1 - 1
app/src/main/res/layout/item_grid_first.xml

@@ -2,7 +2,7 @@
 <!--一级griditem布局-->
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="wrap_content"
-    android:layout_height="100dp"
+    android:layout_height="115dp"
     android:gravity="center"
     android:focusable="false"
     android:layout_centerInParent="true"

+ 47 - 0
app/src/main/res/layout/item_rv_zhinengshangjia.xml

@@ -0,0 +1,47 @@
+<?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="wrap_content"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal">
+
+        <CheckBox
+            android:id="@+id/cb_danxuan"
+            android:layout_width="@dimen/dp_40"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"/>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/tv_date1"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginStart="3dp"
+                android:layout_marginEnd="5dp"
+                android:gravity="center|left"
+                android:text="11234123ee21234er"/>
+
+            <TextView
+                android:id="@+id/tv_date2"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginStart="3dp"
+                android:layout_marginEnd="5dp"
+                android:gravity="center|left"
+                android:text="11234123ee21234er"/>
+        </LinearLayout>
+
+    </LinearLayout>
+
+
+</LinearLayout>

+ 3 - 3
build.gradle

@@ -46,12 +46,12 @@ task clean(type: Delete) {
 
 ext {
     android = [
-            minSdkVersion    : 16,
+            minSdkVersion    : 17,
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 22,
-            versionName      : "v1.1.3"
+            versionCode      : 29,
+            versionName      : "v1.2.0"
     ]
 
     depsVersion = [