ソースを参照

发布修复进入出库会闪退的版本

songw 8 ヶ月 前
コミット
4a2aa5c4ad

+ 1740 - 0
app/src/main/java/com/uas/pda_wps/fragment/FullStationVerificationFragment.java

@@ -0,0 +1,1740 @@
+package com.uas.pda_wps.fragment;
+
+import android.app.ActionBar;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.graphics.drawable.BitmapDrawable;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v4.app.Fragment;
+import android.support.v7.app.AlertDialog;
+import android.text.Editable;
+import android.text.SpannableString;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.AutoCompleteTextView;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.android.volley.AuthFailureError;
+import com.android.volley.DefaultRetryPolicy;
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.StringRequest;
+import com.uas.pda_wps.R;
+import com.uas.pda_wps.activity.FunctionActivity;
+import com.uas.pda_wps.application.PdaApplication;
+import com.uas.pda_wps.bean.LineInfoBean;
+import com.uas.pda_wps.bean.SmtDslBean;
+import com.uas.pda_wps.global.GloableParams;
+import com.uas.pda_wps.tools.DataSourceManager;
+import com.uas.pda_wps.tools.SharedPreUtil;
+import com.uas.pda_wps.tools.VolleyUtil;
+import com.uas.pda_wps.util.CommonUtil;
+import com.uas.pda_wps.util.Constants;
+import com.uas.pda_wps.util.FragmentUtils;
+import com.uas.pda_wps.util.HttpCallback;
+import com.uas.pda_wps.util.HttpParams;
+import com.uas.pda_wps.util.JsonUtils;
+import com.uas.pda_wps.util.LogUtil;
+import com.uas.pda_wps.util.MyArrayAdapter;
+import com.uas.pda_wps.util.SoundUtil;
+import com.uas.pda_wps.util.VolleyRequest;
+import com.uas.pda_wps.view.ClearableEditText;
+import com.uas.pda_wps.view.TextViewWithButton;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public
+        /**
+         * Created by sw on 2025-12-19
+         */
+class FullStationVerificationFragment extends BaseFragment implements View.OnClickListener {
+
+    private static final String COLLECT_LOCATION = "请录入站位编号";
+    private static final String COLLECT_PRODCODE = "请录入物料编号";
+    private static final String COLLECT_OLD_PRODCODE = "站位采集成功,请采集原物料号";
+
+    //校验方式
+    private final int FEEDER_WITH_LOCATION = 1;
+    private final int FEEDER_ORDER = 2;
+    private final int BARCODE_WITH_LOCATION = 3;
+    private final int BARCODE_ORDER = 4;
+
+    //当前校验方式,默认为1
+    private int curCheckStyle = FEEDER_WITH_LOCATION;
+    private JSONObject makeCraft;
+    private JSONArray makeSMTLocation;
+
+    private TextView tvMsgNotice;
+    private TextView tvMsgProdcode;
+    private TextView tvMsgLocation;
+    private TextView tvMsgBarcode;
+    private TextView tvMsgQuantity;
+    private TextView tvMsgSpec;
+
+    private ClearableEditText etFecode, etLocation, etOrder;
+    private LinearLayout llOrder, llDouble;
+    private RelativeLayout rlCollect, rlChange;
+    private View parentView;
+
+    private String TAG = "SMTCHECK:";
+    int wrongColor, rightColor;
+    private TextView tvCheckStyle;
+    int mcId = -1;
+    private Button btnChange;
+    private ImageView mCleanIv, mSmtQueryImageView;
+
+    private TextView mLinecodeTextView, mTableTextView, mMacodeTextView;
+    private LineInfoBean mLineInfoBean;
+    private AutoCompleteTextView mCollectEditText;
+    private Button mConfirmButton;
+    private String mSmtLocationCache;
+    private boolean mIgnoreFocusChange = false;
+    private SmtDslBean mSmtDslBean = new SmtDslBean();
+    private TextViewWithButton mLocationTextView;
+    private RadioGroup mModeRadioGroup;
+    private RadioButton mUpRadioButton, mJoinRadioButton;
+    private StringRequest mStringRequest;
+    private MyArrayAdapter<String> mAutoStringAdapter;
+    private TextView mRecalibrationTextView;
+    private String mNoticeStr;
+    private boolean mOrderSwitch = false, mMaterialSwitch;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fra_full_station_verification;
+    }
+
+    @Override
+    protected void initViews() {
+        ((FunctionActivity) getActivity()).setSmtQueryIvVisible(true);
+
+        mOrderSwitch = SharedPreUtil.getInt(mActivity, Constants.FLAG.CACHE_DEFAULT_ORDER_SWITCH + CommonUtil.getUserName(mActivity), 0) == 1;
+        mMaterialSwitch = SharedPreUtil.getInt(mActivity, Constants.FLAG.CACHE_DEFAULT_MATERIAL_SWITCH + CommonUtil.getUserName(mActivity), 0) == 1;
+        //->校验方式
+        tvCheckStyle = (TextView) root.findViewById(R.id.tvCurCheckContent);
+        btnChange = (Button) root.findViewById(R.id.btn_changecheck_smtcheck);
+        //->提示信息
+        rlChange = (RelativeLayout) root.findViewById(R.id.ll_change_smtchildcheck);
+        tvMsgNotice = (TextView) root.findViewById(R.id.tv_innernotice_msgtitle_scmake);
+        tvMsgProdcode = (TextView) root.findViewById(R.id.tv_innernotice_1_scmake);
+        tvMsgLocation = (TextView) root.findViewById(R.id.tv_innernotice_2_scmake);
+        tvMsgBarcode = (TextView) root.findViewById(R.id.tv_innernotice_3_scmake);
+        tvMsgQuantity = (TextView) root.findViewById(R.id.tv_innernotice_4_scmake);
+        tvMsgSpec = (TextView) root.findViewById(R.id.tv_innernotice_5_scmake);
+        mModeRadioGroup = (RadioGroup) root.findViewById(R.id.smt_check_mode_rg);
+        mUpRadioButton = (RadioButton) root.findViewById(R.id.smt_check_up_rb);
+        mJoinRadioButton = (RadioButton) root.findViewById(R.id.smt_check_join_rb);
+        mCleanIv = (ImageView) root.findViewById(R.id.smt_check_prodcode_clean_iv);
+        mSmtQueryImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_smt_query_iv);
+        mRecalibrationTextView = (TextView) root.findViewById(R.id.smt_check_recalibration_tv);
+
+        wrongColor = getResources().getColor(R.color.text_error);
+        rightColor = getResources().getColor(R.color.green);
+        //->录入信息
+        etFecode = (ClearableEditText) root.findViewById(R.id.et_fecode_smtchildcheck);
+        etLocation = (ClearableEditText) root.findViewById(R.id.et_location_smtchildcheck);
+        etOrder = (ClearableEditText) root.findViewById(R.id.et_order_smtchildcheck);
+        etFecode.setEnabled(false);
+        etLocation.setEnabled(false);
+        etOrder.setEnabled(false);
+
+        parentView = getActivity().getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+        rlCollect = (RelativeLayout) root.findViewById(R.id.rl_collect_smtchildcheck);
+        llDouble = (LinearLayout) root.findViewById(R.id.ll_double_smtchildcheck);
+        llOrder = (LinearLayout) root.findViewById(R.id.ll_order_smtchildcheck);
+
+        mLinecodeTextView = (TextView) root.findViewById(R.id.smt_check_linecode_tv);
+        mTableTextView = (TextView) root.findViewById(R.id.smt_check_table_tv);
+        mMacodeTextView = (TextView) root.findViewById(R.id.smt_check_macode_tv);
+        mCollectEditText = (AutoCompleteTextView) root.findViewById(R.id.smt_check_prodcode_et);
+        mConfirmButton = (Button) root.findViewById(R.id.smt_check_confirm_btn);
+        mLocationTextView = (TextViewWithButton) root.findViewById(R.id.smt_check_location_tv);
+
+        mCollectEditText.requestFocus();
+
+
+        //接口回调
+        VolleyUtil.setVolleyHandler(handler);
+
+        mLineInfoBean = (LineInfoBean) PdaApplication.getDataCacheFromMap(Constants.FLAG.SMT_DEVICE_LINE_CACHE);
+
+
+        /*try {
+            makeCraft = new JSONObject(makeCraftStr);
+            mcId = makeCraft.getInt("mc_id");
+            Log.e(TAG, "makeCraft:" + makeCraft.toString());
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        JSONObject paramJson = new JSONObject();
+        try {
+            paramJson.put("id", mcId);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        showLoadingView();
+        //获取网络数据
+        requestType = VolleyUtil.FRAGMENT_SCMAKE_SMTCHECK_LOCATION;
+        VolleyUtil.getVolleyUtil().requestSMTCheckLocation(getActivity(), GloableParams.ADDRESS_SMTCHECK_LOCATION_APPLY, VolleyUtil.METHOD_GET,
+                requestType, mcId);*/
+
+    }
+
+    @Override
+    protected void initEvents() {
+        mCleanIv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mCollectEditText.setText("");
+            }
+        });
+
+        mCollectEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                String collect = mCollectEditText.getText().toString().trim();
+                if (!TextUtils.isEmpty(collect)) {
+                    if (actionId == EditorInfo.IME_ACTION_DONE
+                            || actionId == EditorInfo.IME_ACTION_SEND
+                            || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                        confirmEvent(collect);
+                        return true;
+                    }
+                }
+                return false;
+            }
+        });
+
+        mCollectEditText.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+            }
+
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
+
+            }
+
+            @Override
+            public void afterTextChanged(Editable s) {
+                if (s.length() == 0) {
+                    mConfirmButton.setEnabled(false);
+                    mCleanIv.setVisibility(View.GONE);
+                } else {
+                    mConfirmButton.setEnabled(true);
+                    mCleanIv.setVisibility(View.VISIBLE);
+                }
+
+                //                String collectHint = mCollectEditText.getHint().toString();
+                //
+                //                if (COLLECT_PRODCODE.equals(collectHint) || COLLECT_OLD_PRODCODE.equals(collectHint)) {
+                //                    if (s.length() >= 3) {
+                //                        if (!s.toString().matches(Constants.REGEX.NO_SYMBOL)) {
+                //                            CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.prodcode_cannot_contain_special));
+                //                            mCollectEditText.setText(null);
+                //                            mCollectEditText.requestFocus();
+                //                        } else {
+                //                            fuzzySearch();
+                //                        }
+                //                    }
+                //                }
+            }
+        });
+
+        mConfirmButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                String collect = mCollectEditText.getText().toString().trim();
+                confirmEvent(collect);
+            }
+        });
+
+
+        mLocationTextView.setOnTextClearListener(new TextViewWithButton.OnTextClearListener() {
+            @Override
+            public void onTextClear() {
+                mCollectEditText.setHint(COLLECT_LOCATION);
+                mCollectEditText.setText("");
+
+                mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
+                mCollectEditText.setAdapter(mAutoStringAdapter);
+
+                //                tvMsgNotice.setText("");
+                //                tvMsgProdcode.setText("");
+                //                tvMsgLocation.setText("");
+                //                tvMsgBarcode.setText("");
+                //                tvMsgQuantity.setText("");
+                //                tvMsgSpec.setText("");
+            }
+        });
+
+        mModeRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(RadioGroup group, int checkedId) {
+                mLocationTextView.setText("");
+                tvMsgNotice.setText("");
+            }
+        });
+
+        mSmtQueryImageView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Fragment fragment = new SCSMTQueryFragment();
+                FragmentUtils.switchFragment(FullStationVerificationFragment.this, fragment);
+            }
+        });
+
+        mRecalibrationTextView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                new AlertDialog.Builder(mActivity).setTitle("提示")
+                        .setMessage("重新校验将会清空所有站位的校验记录,是否确定?")
+                        .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                mLocationTextView.setText("");
+                                startCheck();
+                            }
+                        })
+                        .setNegativeButton(R.string.cancel, null).create().show();
+            }
+        });
+    }
+
+    /**
+     * 重新校验
+     */
+    private void startCheck() {
+        progressDialog.show();
+        String url = GloableParams.ADDRESS_SMT_REPEATCHECK_DATA + "?linecode=" + (mLineInfoBean == null ? "" : mLineInfoBean.getDL_LINECODE());
+        PdaApplication.mRequestQueue.cancelAll(TAG + "startcheck");
+
+        mStringRequest = new StringRequest(Request.Method.GET, url,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+                        try {
+                            if (progressDialog.isShowing())
+                                progressDialog.dismiss();
+                            JSONObject resultObject = new JSONObject(s);
+                            JSONObject dataObject = resultObject.optJSONObject("data");
+                            if (dataObject != null) {
+                                double notCheckCount = JsonUtils.optDoubleNotNull(dataObject, "NotCheckCount");
+                                String notice = "";
+                                if (notCheckCount == 0) {
+                                    notice = notice + "校验已完成";
+                                    mNoticeStr = notice;
+                                    SoundUtil.play(SoundUtil.SOUND_CERES);
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    tvMsgNotice.setText(notice);
+                                } else {
+                                    notice = notice + "未校验站位" + CommonUtil.doubleFormat(notCheckCount) + "条";
+                                    JSONArray notFeedArray = dataObject.optJSONArray("NotCheckLocation");
+                                    if (notFeedArray != null && notFeedArray.length() != 0) {
+                                        //notice = notice + "\n站位:\n";
+                                        for (int i = 0; i < notFeedArray.length(); i++) {
+                                            JSONObject notCheckObject = notFeedArray.optJSONObject(i);
+                                            if (notCheckObject != null) {
+                                                String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                String psl_prodcode = JsonUtils.optStringNotNull(notCheckObject, "PSL_PRODCODE");
+                                                if (i == 0 && mOrderSwitch) {
+                                                    mCollectEditText.setText(psl_location);
+                                                    confirmEvent(psl_location);
+                                                }
+                                                //notice = notice + psl_location + ",";
+                                                notice += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
+                                            }
+                                        }
+                                        //notice = notice.substring(0, notice.length() - 1);
+                                    }
+                                    mNoticeStr = notice;
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, 5, 5 + CommonUtil.doubleFormat(notCheckCount).length(), R.color.blue_800);
+                                    tvMsgNotice.setText(spannableString);
+                                }
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+                        if (progressDialog.isShowing())
+                            progressDialog.dismiss();
+                        String errorToast = CommonUtil.showErrorToast(volleyError, false);
+                        tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                        tvMsgNotice.setText(errorToast);
+                    }
+                }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+        };
+        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        mStringRequest.setTag(TAG + "startcheck");
+        PdaApplication.mRequestQueue.add(mStringRequest);
+
+    }
+
+    private void fuzzySearch() {
+        String url = null;
+        try {
+            url = GloableParams.ADDRESS_SMT_FUZZY_SEARCH_PRODUCT
+                    + "?pr_code=" + URLEncoder.encode(mCollectEditText.getText().toString().toLowerCase(), "utf-8");
+
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+            url = GloableParams.ADDRESS_SMT_FUZZY_SEARCH_PRODUCT
+                    + "?pr_code=" + mCollectEditText.getText().toString().toLowerCase();
+        }
+
+        PdaApplication.mRequestQueue.cancelAll(TAG + "fuzzysearch");
+
+        mStringRequest = new StringRequest(Request.Method.GET, url,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+                        Log.e("autoStrings", s);
+                        List<String> mAutoStrings = new ArrayList<String>();
+                        try {
+                            mAutoStrings.clear();
+                            mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, mAutoStrings);
+                            if (mCollectEditText != null) {
+                                mCollectEditText.setAdapter(mAutoStringAdapter);
+                            }
+
+                            JSONObject resultObject = new JSONObject(s);
+                            JSONArray dataArray = resultObject.optJSONArray("data");
+                            if (dataArray != null) {
+                                for (int i = 0; i < dataArray.length(); i++) {
+                                    JSONObject dataObject = dataArray.optJSONObject(i);
+                                    if (dataObject != null) {
+                                        String pi_inoutno = JsonUtils.optStringNotNull(dataObject, "PR_CODE");
+                                        if (!TextUtils.isEmpty(pi_inoutno))
+                                            mAutoStringAdapter.add(pi_inoutno);
+                                    }
+                                }
+                            }
+                        } catch (JSONException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+                        CommonUtil.showErrorToast(volleyError);
+                        mCollectEditText.setText("");
+                        mCollectEditText.requestFocus();
+                        CommonUtil.openKeybord(mCollectEditText, mActivity);
+                    }
+                }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+        };
+        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        mStringRequest.setTag(TAG + "fuzzysearch");
+        PdaApplication.mRequestQueue.add(mStringRequest);
+    }
+
+
+    private void confirmEvent(final String collect) {
+        final String location = mLocationTextView.getText().toString().trim();
+
+        if (TextUtils.isEmpty(location)) {
+            locationCheck(collect, location);
+        } else {
+            mSmtDslBean.setDsl_barcode(collect);
+            /*if (mUpRadioButton.isChecked() || (mJoinRadioButton.isChecked() && COLLECT_PRODCODE.equals(mCollectEditText.getHint().toString()))) {
+                smtCheck(collect, location);
+            } else {
+                joinDataCheck(collect, location);
+            }*/
+
+            if (mMaterialSwitch) {
+                requestCheck(collect, location);
+            } else {
+                smtCheck(collect, location);
+            }
+        }
+    }
+
+    private void requestCheck(String collect, String location) {
+        progressDialog.show();
+        Map<String, Object> dslMap = new HashMap<>();
+        dslMap.put("dsl_location", location);
+        dslMap.put("dsl_prodcode", collect);
+        dslMap.put("success", true);
+
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_SMT_FORECASTDATACHECK)
+                .method(Request.Method.POST)
+                .addParam("dsl", JSON.toJSONString(dslMap))
+                .addParam("deviceLineMake", JSON.toJSONString(mLineInfoBean))
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                if (progressDialog.isShowing()) {
+                    progressDialog.dismiss();
+                }
+                successCheckData(collect, location);
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                if (progressDialog.isShowing()) {
+                    progressDialog.dismiss();
+                }
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+
+                String notice = failStr + "\n" + mNoticeStr;
+                SpannableString spannableString = CommonUtil.spanString(notice, mActivity, (failStr + "\n").length(), notice.length(), R.color.green);
+                tvMsgNotice.setText(spannableString);
+
+                CommonUtil.makeNotice();
+                mCollectEditText.setText("");
+                mCollectEditText.postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        mCollectEditText.requestFocus();
+                    }
+                }, 100);
+
+                int smtCheckErr = SharedPreUtil.getInt(mActivity, Constants.FLAG.SMT_CHECK_ERROR, 0);
+                if (smtCheckErr == 1) {
+                    failCheckData(collect, location);
+                }
+
+            }
+        });
+    }
+
+    private void joinDataCheck(final String collect, final String location) {
+        progressDialog.show();
+
+        PdaApplication.mRequestQueue.cancelAll(TAG + "datacheck");
+
+        mStringRequest = new StringRequest(Request.Method.POST, GloableParams.ADDRESS_SMT_JOIN_FORECASTDATA_CHECK,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+                        if (progressDialog.isShowing())
+                            progressDialog.dismiss();
+                        joinDataCheck(collect, location, "原物料号校验正确", true);
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+                        if (progressDialog.isShowing())
+                            progressDialog.dismiss();
+                        String errorToast = CommonUtil.showErrorToast(volleyError, false);
+                        joinDataCheck(collect, location, errorToast, false);
+                    }
+                }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+
+            @Override
+            protected Map<String, String> getParams() throws AuthFailureError {
+                Map<String, String> params = new HashMap<>();
+                Map<String, Object> dslMap = new HashMap<>();
+                if (mUpRadioButton.isChecked()) {
+                    dslMap.put("type", "loading");
+                } else if (mJoinRadioButton.isChecked()) {
+                    dslMap.put("type", "join");
+                }
+                dslMap.put("dsl_location", location);
+                dslMap.put("dsl_prodcode", collect);
+                dslMap.put("success", true);
+
+                params.put("dsl", JSON.toJSONString(dslMap));
+                params.put("deviceLineMake", JSON.toJSONString(mLineInfoBean));
+                Log.d("paramjson", params.toString());
+                return params;
+            }
+        };
+        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        mStringRequest.setTag(TAG + "datacheck");
+        PdaApplication.mRequestQueue.add(mStringRequest);
+    }
+
+    private void joinDataCheck(String collect, String location, String dataCheckResult, boolean isSuccess) {
+        tvMsgProdcode.setText("");
+        tvMsgLocation.setText("");
+        tvMsgBarcode.setText("");
+        tvMsgQuantity.setText("");
+        tvMsgSpec.setText("");
+
+        collect = mLocationTextView.getText().toString().trim();
+
+        if (!TextUtils.isEmpty(mSmtLocationCache)) {
+            try {
+                JSONArray locationArray = new JSONArray(mSmtLocationCache);
+                boolean isExist = false;
+                for (int i = 0; i < locationArray.length(); i++) {
+                    JSONObject locationObject = locationArray.getJSONObject(i);
+                    if (collect.equals(JsonUtils.optStringNotNull(locationObject, "PSL_LOCATION"))) {
+                        isExist = true;
+                        mLocationTextView.setText(collect);
+                        mCollectEditText.setText("");
+
+                        String psl_prodcode = JsonUtils.optStringNotNull(locationObject, "PSL_PRODCODE");
+                        String psl_repcode = JsonUtils.optStringNotNull(locationObject, "PSL_REPCODE");
+                        mSmtDslBean = new SmtDslBean();
+                        mSmtDslBean.setDsl_location(location);
+                        mSmtDslBean.setDsl_prodcode(psl_prodcode);
+                        mSmtDslBean.setDsl_repcode(psl_repcode);
+
+                        mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
+                        mCollectEditText.setAdapter(mAutoStringAdapter);
+
+                        mCollectEditText.setHint(COLLECT_PRODCODE);
+                        if (!TextUtils.isEmpty(psl_repcode)) {
+                            String[] repcodes = psl_repcode.split(",");
+                            String notice = dataCheckResult + "\n请采集接料的物料号";
+                            for (int j = 0; j < repcodes.length; j++) {
+                                String repcode = repcodes[j];
+                                notice = notice + "\n" + repcode;
+                            }
+                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                            if (isSuccess) {
+                                tvMsgNotice.setText(notice);
+                            } else {
+                                SpannableString spannableString = CommonUtil.spanString(notice, mActivity, 0, dataCheckResult.length(), R.color.red);
+                                tvMsgNotice.setText(spannableString);
+                            }
+                        } else if (!TextUtils.isEmpty(psl_prodcode)) {
+                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                            if (isSuccess) {
+                                tvMsgNotice.setText(dataCheckResult + "\n请采集接料的物料号\n" + psl_prodcode);
+                            } else {
+                                SpannableString spannableString = CommonUtil.spanString(dataCheckResult + "\n请采集接料的物料号\n" + psl_prodcode, mActivity, 0, dataCheckResult.length(), R.color.red);
+                                tvMsgNotice.setText(spannableString);
+                            }
+
+                        } else {
+                            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                            if (isSuccess) {
+                                CommonUtil.spanString(dataCheckResult + "\n物料编号获取失败", mActivity, 0, dataCheckResult.length(), R.color.green);
+                                tvMsgNotice.setText(dataCheckResult + "\n物料编号获取失败");
+                            } else {
+                                tvMsgNotice.setText(dataCheckResult + "\n物料编号获取失败");
+                            }
+                        }
+                    }
+                }
+
+                if (!isExist) {
+                    tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                    String notice = "站位编号错误\n" + mNoticeStr;
+                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+                    tvMsgNotice.setText(spannableString);
+                    CommonUtil.makeNotice();
+                    mCollectEditText.setText("");
+                }
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        } else {
+            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+            String notice = "站位编号错误\n" + mNoticeStr;
+            SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+            tvMsgNotice.setText(spannableString);
+            CommonUtil.makeNotice();
+            mCollectEditText.setText("");
+        }
+    }
+
+    private void locationCheck(String collect, String location) {
+        tvMsgProdcode.setText("");
+        tvMsgLocation.setText("");
+        tvMsgBarcode.setText("");
+        tvMsgQuantity.setText("");
+        tvMsgSpec.setText("");
+
+        if (!TextUtils.isEmpty(mSmtLocationCache)) {
+            try {
+                JSONArray locationArray = new JSONArray(mSmtLocationCache);
+                boolean isExist = false;
+                for (int i = 0; i < locationArray.length(); i++) {
+                    JSONObject locationObject = locationArray.getJSONObject(i);
+                    if (collect.equals(JsonUtils.optStringNotNull(locationObject, "PSL_LOCATION"))) {
+                        isExist = true;
+                        mLocationTextView.setText(collect);
+                        mCollectEditText.setText("");
+
+                        String psl_prodcode = JsonUtils.optStringNotNull(locationObject, "PSL_PRODCODE");
+                        String psl_repcode = JsonUtils.optStringNotNull(locationObject, "PSL_REPCODE");
+                        mSmtDslBean = new SmtDslBean();
+                        mSmtDslBean.setDsl_location(location);
+                        mSmtDslBean.setDsl_prodcode(psl_prodcode);
+                        mSmtDslBean.setDsl_repcode(psl_repcode);
+
+                        mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
+                        mCollectEditText.setAdapter(mAutoStringAdapter);
+                        //no use
+                        if (mUpRadioButton.isChecked()) {
+                            mCollectEditText.setHint(COLLECT_PRODCODE);
+                            if (!TextUtils.isEmpty(psl_repcode)) {
+                                String[] repcodes = psl_repcode.split(",");
+                                String notice = "站位采集成功,请采集物料\n";
+                                for (int j = 0; j < repcodes.length; j++) {
+                                    String repcode = repcodes[j];
+                                    notice = notice + repcode + "\n";
+                                }
+                                notice = notice + "的物料编号";
+                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                tvMsgNotice.setText(notice);
+                            } else if (!TextUtils.isEmpty(psl_prodcode)) {
+                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                tvMsgNotice.setText("站位采集成功,请采集物料\n" + psl_prodcode + "\n的物料编号");
+                            } else {
+                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                tvMsgNotice.setText("站位采集成功,物料编号获取失败");
+                            }
+                        } else {
+                            tvMsgNotice.setText("");
+                            mCollectEditText.setHint(COLLECT_OLD_PRODCODE);
+                        }
+                    }
+                }
+
+                if (!isExist) {
+                    tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                    String notice = "站位编号错误\n" + mNoticeStr;
+                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+                    tvMsgNotice.setText(spannableString);
+                    CommonUtil.makeNotice();
+                    mCollectEditText.setText("");
+                }
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        } else {
+            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+            String notice = "站位编号错误\n" + mNoticeStr;
+            SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+            tvMsgNotice.setText(spannableString);
+            CommonUtil.makeNotice();
+            mCollectEditText.setText("");
+        }
+    }
+
+    /**
+     * 物料号本地校验
+     *
+     * @param collect  采集的物料号
+     * @param location 站位编号
+     */
+    private void smtCheck(final String collect, final String location) {
+        boolean isExist = false;
+        String repcode = mSmtDslBean.getDsl_repcode();
+        if (collect.contains(mSmtDslBean.getDsl_prodcode())) {
+            isExist = true;
+        } else {
+            if (!TextUtils.isEmpty(repcode)) {
+                String[] repcodes = repcode.split(",");
+                if (repcodes != null && repcodes.length != 0) {
+                    for (int i = 0; i < repcodes.length; i++) {
+                        if (collect.contains(repcodes[i])) {
+                            isExist = true;
+                        }
+                    }
+                }
+            }
+        }
+
+        if (isExist) {
+            successCheckData(collect, location);
+        } else {
+            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+
+            String notice = "校验失败,物料号错误!\n" + mNoticeStr;
+            SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "校验失败,物料号错误!\n".length(), notice.length(), R.color.green);
+            tvMsgNotice.setText(spannableString);
+
+            CommonUtil.makeNotice();
+            mCollectEditText.setText("");
+            mCollectEditText.postDelayed(new Runnable() {
+                @Override
+                public void run() {
+                    mCollectEditText.requestFocus();
+                }
+            }, 100);
+
+            int smtCheckErr = SharedPreUtil.getInt(mActivity, Constants.FLAG.SMT_CHECK_ERROR, 0);
+            if (smtCheckErr == 1) {
+                failCheckData(collect, location);
+            }
+
+        }
+    }
+
+    private void failCheckData(final String collect, final String location) {
+        PdaApplication.mRequestQueue.cancelAll(TAG + "check");
+
+        mStringRequest = new StringRequest(Request.Method.POST, GloableParams.ADDRESS_CHECK_LOCATIONDATAREPEATCHECK,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+
+                    }
+                }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+
+            @Override
+            protected Map<String, String> getParams() throws AuthFailureError {
+                Map<String, String> params = new HashMap<>();
+                Map<String, Object> dslMap = new HashMap<>();
+                if (mUpRadioButton.isChecked()) {
+                    dslMap.put("type", "loading");
+                } else if (mJoinRadioButton.isChecked()) {
+                    dslMap.put("type", "join");
+                }
+                dslMap.put("dsl_location", location);
+                dslMap.put("dsl_prodcode", collect);
+                dslMap.put("success", false);
+
+                params.put("dsl", JSON.toJSONString(dslMap));
+                params.put("deviceLineMake", JSON.toJSONString(mLineInfoBean));
+                Log.d("paramjson", params.toString());
+                return params;
+            }
+        };
+        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        mStringRequest.setTag(TAG + "check");
+        PdaApplication.mRequestQueue.add(mStringRequest);
+    }
+
+    /**
+     * SMT物料校验
+     *
+     * @param collect
+     * @param location
+     */
+    private void successCheckData(final String collect, final String location) {
+        progressDialog.show();
+        PdaApplication.mRequestQueue.cancelAll(TAG + "check");
+
+        mStringRequest = new StringRequest(Request.Method.POST, GloableParams.ADDRESS_CHECK_LOCATIONDATAREPEATCHECK,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+                        if (progressDialog.isShowing())
+                            progressDialog.dismiss();
+                        try {
+                            LogUtil.i("smtcheck", s);
+                            JSONObject resultObject = new JSONObject(s);
+                            JSONObject dataObject = resultObject.optJSONObject("data");
+                            String notice = "站位[" + location + "]+物料[" + collect + "]匹配成功!";
+                            if (dataObject != null) {
+                                mSmtDslBean = new SmtDslBean();
+                                mLocationTextView.setText("");
+                                mCollectEditText.setText("");
+
+                                double notCheckCount = JsonUtils.optDoubleNotNull(dataObject, "NotCheckCount");
+                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                if (notCheckCount == 0) {
+                                    notice = notice + "\n校验已完成";
+                                    mNoticeStr = "校验已完成";
+                                    SoundUtil.play(SoundUtil.SOUND_CERES);
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    tvMsgNotice.setText(notice);
+                                } else {
+                                    String buffer = notice;
+                                    notice = notice + "\n未校验站位" + CommonUtil.doubleFormat(notCheckCount) + "条";
+                                    String noticeStr = "未校验站位" + CommonUtil.doubleFormat(notCheckCount) + "条";
+                                    JSONArray notCheckArray = dataObject.optJSONArray("NotCheckLocation");
+                                    if (notCheckArray != null && notCheckArray.length() != 0) {
+                                        //notice = notice + "\n站位:";
+                                        //noticeStr = noticeStr + "\n站位:";
+                                        for (int i = 0; i < notCheckArray.length(); i++) {
+                                            JSONObject notCheckObject = notCheckArray.optJSONObject(i);
+                                            if (notCheckObject != null) {
+                                                String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                String psl_prodcode = JsonUtils.optStringNotNull(notCheckObject, "PSL_PRODCODE");
+                                                if (i == 0 && mOrderSwitch) {
+                                                    mCollectEditText.setText(psl_location);
+                                                    confirmEvent(psl_location);
+                                                }
+                                                //notice = notice + psl_location + ",";
+                                                //noticeStr = noticeStr + psl_location + ",";
+                                                notice += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
+                                                noticeStr += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
+                                            }
+                                        }
+                                        //notice = notice.substring(0, notice.length() - 1);
+                                        //noticeStr = noticeStr.substring(0, noticeStr.length() - 1);
+                                    }
+                                    mNoticeStr = noticeStr;
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, (buffer + "\n未校验站位").length(), (buffer + "\n未校验站位").length() + CommonUtil.doubleFormat(notCheckCount).length(), R.color.blue_800);
+                                    tvMsgNotice.setText(spannableString);
+                                }
+
+                                mCollectEditText.postDelayed(new Runnable() {
+                                    @Override
+                                    public void run() {
+                                        mCollectEditText.requestFocus();
+                                    }
+                                }, 100);
+                            }
+
+                        } catch (JSONException e) {
+                            e.printStackTrace();
+                        }
+
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+                        if (progressDialog.isShowing())
+                            progressDialog.dismiss();
+                        String errorToast = CommonUtil.showErrorToast(volleyError, true);
+                        tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+
+                        String errorNotice = "校验失败," + errorToast + "\n" + mNoticeStr;
+                        SpannableString spannableString = CommonUtil.spanString(errorNotice, mActivity, ("校验失败," + errorToast + "\n").length(), errorNotice.length(), R.color.green);
+                        tvMsgNotice.setText(spannableString);
+
+                        mSmtDslBean = new SmtDslBean();
+                        mLocationTextView.setText("");
+                        mCollectEditText.setText("");
+                        mCollectEditText.postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                mCollectEditText.requestFocus();
+                            }
+                        }, 100);
+                    }
+                }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+
+            @Override
+            protected Map<String, String> getParams() throws AuthFailureError {
+                Map<String, String> params = new HashMap<>();
+                Map<String, Object> dslMap = new HashMap<>();
+                if (mUpRadioButton.isChecked()) {
+                    dslMap.put("type", "loading");
+                } else if (mJoinRadioButton.isChecked()) {
+                    dslMap.put("type", "join");
+                }
+                dslMap.put("dsl_location", location);
+                dslMap.put("dsl_prodcode", collect);
+                dslMap.put("success", true);
+
+                params.put("dsl", JSON.toJSONString(dslMap));
+                params.put("deviceLineMake", JSON.toJSONString(mLineInfoBean));
+                Log.d("paramjson", params.toString());
+                return params;
+            }
+        };
+        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        mStringRequest.setTag(TAG + "check");
+        PdaApplication.mRequestQueue.add(mStringRequest);
+    }
+
+    //    private void verificationLocation() {
+    //        String location = mLocationEditText.getText().toString().trim();
+    //        if (TextUtils.isEmpty(location)) {
+    //            CommonUtil.toastNoRepeat(mActivity, "请采集站位编号!");
+    //        } else {
+    //            if (!TextUtils.isEmpty(mSmtLocationCache)) {
+    //                try {
+    //                    mIgnoreFocusChange = true;
+    //                    JSONArray locationArray = new JSONArray(mSmtLocationCache);
+    //                    boolean isExist = false;
+    //                    for (int i = 0; i < locationArray.length(); i++) {
+    //                        JSONObject locationObject = locationArray.getJSONObject(i);
+    //                        if (location.equals(JsonUtils.optStringNotNull(locationObject, "PSL_LOCATION"))) {
+    //                            isExist = true;
+    //                            mCollectEditText.postDelayed(new Runnable() {
+    //                                @Override
+    //                                public void run() {
+    //                                    mCollectEditText.requestFocus();
+    //                                }
+    //                            }, 100);
+    //
+    //                            String psl_prodcode = JsonUtils.optStringNotNull(locationObject, "PSL_PRODCODE");
+    //                            String psl_repcode = JsonUtils.optStringNotNull(locationObject, "PSL_REPCODE");
+    //                            mSmtDslBean = new SmtDslBean();
+    //                            mSmtDslBean.setDsl_location(location);
+    //                            mSmtDslBean.setDsl_prodcode(psl_prodcode);
+    //                            mSmtDslBean.setDsl_repcode(psl_repcode);
+    //
+    //                        }
+    //                    }
+    //
+    //                    if (!isExist) {
+    //                        CommonUtil.toastNoRepeat(mActivity, "站位编号错误");
+    //                        mLocationEditText.setText("");
+    //                        mLocationEditText.postDelayed(new Runnable() {
+    //                            @Override
+    //                            public void run() {
+    //                                mLocationEditText.requestFocus();
+    //                            }
+    //                        }, 100);
+    //                    }
+    //
+    //                    mIgnoreFocusChange = false;
+    //                } catch (JSONException e) {
+    //                    e.printStackTrace();
+    //                }
+    //            } else {
+    //                CommonUtil.toastNoRepeat(mActivity, "站位编号错误");
+    //                mLocationEditText.setText("");
+    //                mLocationEditText.postDelayed(new Runnable() {
+    //                    @Override
+    //                    public void run() {
+    //                        mLocationEditText.requestFocus();
+    //                    }
+    //                }, 100);
+    //            }
+    //        }
+    //    }
+
+    @Override
+    protected void initDatas() {
+        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("复检校验");
+
+        mSmtLocationCache = SharedPreUtil.getString(mActivity, Constants.FLAG.SMT_LOCATION_CACHE, null);
+        if (mLineInfoBean != null) {
+            mLinecodeTextView.setText(mLineInfoBean.getDL_LINECODE());
+            mTableTextView.setText(mLineInfoBean.getDL_TABLE() + "面");
+            mMacodeTextView.setText(mLineInfoBean.getDL_MACODE());
+        }
+
+        getUncheckLocation();
+    }
+
+    /**
+     * 获取未校验站位
+     */
+    private void getUncheckLocation() {
+        progressDialog.show();
+        String url = GloableParams.ADDRESS_SMT_GET_UNCHECK_LOCATION + "?linecode=" + (mLineInfoBean == null ? "" : mLineInfoBean.getDL_LINECODE());
+        PdaApplication.mRequestQueue.cancelAll(TAG + "uncheck");
+
+        mStringRequest = new StringRequest(Request.Method.GET, url,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+                        try {
+                            if (progressDialog.isShowing())
+                                progressDialog.dismiss();
+                            JSONObject resultObject = new JSONObject(s);
+                            JSONObject dataObject = resultObject.optJSONObject("data");
+                            if (dataObject != null) {
+                                double notCheckCount = JsonUtils.optDoubleNotNull(dataObject, "NotCheckCount");
+                                String notice = "";
+                                if (notCheckCount == 0) {
+                                    notice = notice + "校验已完成";
+                                    mNoticeStr = notice;
+                                    SoundUtil.play(SoundUtil.SOUND_CERES);
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    tvMsgNotice.setText(notice);
+                                } else {
+                                    notice = notice + "未校验站位" + CommonUtil.doubleFormat(notCheckCount) + "条";
+                                    JSONArray notFeedArray = dataObject.optJSONArray("NotCheckLocation");
+                                    if (notFeedArray != null && notFeedArray.length() != 0) {
+                                        //notice = notice + "\n站位:";
+                                        for (int i = 0; i < notFeedArray.length(); i++) {
+                                            JSONObject notCheckObject = notFeedArray.optJSONObject(i);
+                                            if (notCheckObject != null) {
+                                                String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                String psl_prodcode = JsonUtils.optStringNotNull(notCheckObject, "PSL_PRODCODE");
+                                                if (i == 0 && mOrderSwitch) {
+                                                    mCollectEditText.setText(psl_location);
+                                                    confirmEvent(psl_location);
+                                                }
+                                                //notice = notice + psl_location + ",";
+                                                notice += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
+                                            }
+                                        }
+                                        //notice = notice.substring(0, notice.length() - 1);
+                                    }
+                                    mNoticeStr = notice;
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, 5, 5 + CommonUtil.doubleFormat(notCheckCount).length(), R.color.blue_800);
+                                    tvMsgNotice.setText(spannableString);
+                                }
+                            }
+
+                        } catch (Exception e) {
+
+                        }
+
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+                        if (progressDialog.isShowing())
+                            progressDialog.dismiss();
+                        String errorToast = CommonUtil.showErrorToast(volleyError, false);
+                        tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                        tvMsgNotice.setText(errorToast);
+                    }
+                }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+        };
+        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        mStringRequest.setTag(TAG + "uncheck");
+        PdaApplication.mRequestQueue.add(mStringRequest);
+
+    }
+
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+        if (!hidden) {
+            FunctionActivity.setTitle("复检校验");
+            ((FunctionActivity) getActivity()).setSmtQueryIvVisible(true);
+        } else {
+            ((FunctionActivity) getActivity()).setSmtQueryIvVisible(false);
+        }
+    }
+
+    @Override
+    public void onDestroy() {
+        hideKeyboard(etLocation);
+        VolleyUtil.distoryVolley();
+        super.onDestroy();
+    }
+
+
+    @Override
+    public void onDestroyView() {
+        CommonUtil.closeKeybord(mCollectEditText, mActivity);
+        ((FunctionActivity) getActivity()).setSmtQueryIvVisible(false);
+        super.onDestroyView();
+    }
+
+    //改变当前校验方式
+    String mslKey = "msl_fecode";
+    String errorMsg, errorMsgNull;
+    String rightMsg, successMsg;
+    String serverParam = null;
+
+    private void changeCurCheckStyle(int style) {
+        String checkName = getString(R.string.notice_smtchild_feloa);
+        curCheckStyle = style;
+        febar = null;
+        isOrder = false;
+        //显示采集布局
+        showCollectLayout();
+        switch (style) {
+            case FEEDER_WITH_LOCATION:
+                Log.e(TAG, "check style:FEEDER_WITH_LOCATION");
+                //改变取值关键字
+                mslKey = "msl_fecode";
+                //修改界面信息
+                llOrder.setVisibility(View.GONE);
+                llDouble.setVisibility(View.VISIBLE);
+                etFecode.setText("");
+                etLocation.setText("");
+                etFecode.setHint(R.string.hint_smtchild_fecode);
+                errorMsg = getString(R.string.hint_feedererror_smtcheck);
+                errorMsgNull = getString(R.string.hint_collectfeeder_smtcheck);
+                rightMsg = getString(R.string.notice_smtchild_rightmsg);
+                successMsg = getString(R.string.notice_smtchild_successmsg);
+                //获得焦点
+                editTextGetFocus(etFecode);
+                break;
+            case FEEDER_ORDER:
+                //初始顺序置0
+                order = 0;
+                isOrder = true;
+                mslKey = "msl_fecode";
+                //上传给服务器的参数三
+                serverParam = "fecode";
+                Log.e(TAG, "check style:FEEDER_ORDER");
+                llOrder.setVisibility(View.VISIBLE);
+                llDouble.setVisibility(View.GONE);
+                etOrder.setText("");
+                etOrder.setHint(R.string.hint_smtchild_fecode);
+                //自动将变量makeSMTLocation[0].msl_fecode中的值赋值给变量fe_code
+                try {
+                    febar = ((JSONObject) makeSMTLocation.get(order)).getString("msl_fecode");
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+                //获得焦点
+                editTextGetFocus(etOrder);
+                //修改界面信息
+                rightMsg = getString(R.string.notice_smtchild_rightmsg);
+                successMsg = getString(R.string.notice_smtchild_successmsg);
+                errorMsg = getString(R.string.notice_smtchild_wrongfedmsg);
+                checkName = getString(R.string.notice_smtchild_feord);
+                break;
+            case BARCODE_WITH_LOCATION:
+                Log.e(TAG, "check style:BARCODE_WITH_LOCATION");
+                mslKey = "msl_barcode";
+                llOrder.setVisibility(View.GONE);
+                llDouble.setVisibility(View.VISIBLE);
+                etFecode.setText("");
+                etLocation.setText("");
+                etFecode.setHint(R.string.hint_smtchild_barcode);
+                errorMsg = getString(R.string.hint_barcoderror_smtcheck);
+                errorMsgNull = getString(R.string.hint_collectbarcode_smtcheck);
+                checkName = getString(R.string.notice_smtchild_barloa);
+                //获得焦点
+                editTextGetFocus(etFecode);
+                break;
+            case BARCODE_ORDER:
+                //初始顺序置0
+                order = 0;
+                isOrder = true;
+                mslKey = "msl_barcode";
+                //上传给服务器的参数三
+                serverParam = "barcode";
+                Log.e(TAG, "check style:FEEDER_ORDER");
+                llOrder.setVisibility(View.VISIBLE);
+                llDouble.setVisibility(View.GONE);
+                etOrder.setText("");
+                etOrder.setHint(R.string.hint_smtchild_barcode);
+                //自动将变量makeSMTLocation[0].msl_fecode中的值赋值给变量fe_code
+                try {
+                    febar = ((JSONObject) makeSMTLocation.get(order)).getString("msl_barcode");
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+                //获得焦点
+                editTextGetFocus(etOrder);
+                //修改界面信息
+                rightMsg = getString(R.string.notice_smtchild_rightbarmsg);
+                successMsg = getString(R.string.notice_smtchild_successbarmsg);
+                errorMsg = getString(R.string.notice_smtchild_wrongbarmsg);
+                checkName = getString(R.string.notice_smtchild_barord);
+                break;
+        }
+        //修改校验方式显示文字
+        tvCheckStyle.setText(checkName);
+        //清空提示框文字
+        setNotice("", "", -1);
+    }
+
+    //飞达/料卷输入框回车事件,febar = fecode、barcode、fe_code
+    String febar, location;
+
+    private boolean disposeFecodeEnter(String msl_key) {
+        setNotice("", "", -1);
+        String tmpFecode = null, tmpLocation = null;
+        //获得文字框输入
+        String msl_fecode = etFecode.getText().toString().trim();
+        Log.e(TAG + "tmpFecode", msl_fecode);
+        if (msl_fecode.equals("") || msl_fecode == null) {
+            etFecode.setWarnIconVisible();
+            return false;
+        }
+        //判断输入fecode与makeSMTLocation是否匹配
+        try {
+            JSONObject tmpJson;
+            for (int i = 0; i < makeSMTLocation.length(); i++) {
+                tmpJson = makeSMTLocation.getJSONObject(i);
+                tmpFecode = tmpJson.getString(msl_key);
+                //如果匹配
+                if (tmpFecode.equals(msl_fecode)) {
+                    tmpLocation = tmpJson.getString("msl_location");
+                    febar = msl_fecode;
+                    location = tmpLocation;
+                    Log.e(TAG + "FENTER:", "fecode:" + febar + "location:" + location);
+                    etFecode.setOkIconVisible();
+                    //站位获取焦点
+                    editTextGetFocus(etLocation);
+                    setNotice("", "", -1);
+                    return true;
+                }
+            }
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        //如果不匹配
+        //提示飞达错误,清空输入值
+        String title = "错误";
+        setNotice(title, errorMsg, wrongColor);
+        etFecode.setText("");
+        febar = null;
+        location = null;
+        return false;
+    }
+
+    //站位输入框回车事件
+    private void disposeLocationEnter() {
+        setNotice("", "", -1);
+        Log.e(TAG, "disposeLocationEnter");
+        //获得输入框内容
+        String msl_fecode = etFecode.getText().toString().trim();
+        Log.e(TAG, msl_fecode);
+        //判断fecode内容是否为空
+        if (msl_fecode.equals("") || msl_fecode == null) {
+            String title = "错误";
+            setNotice(title, errorMsgNull, wrongColor);
+            editTextGetFocus(etFecode);
+            return;
+        }
+        //获得location输入框内容
+        String msl_location = etLocation.getText().toString().trim();
+        //判断location内容是否为空
+        if (msl_location.equals("") || msl_location == null) {
+            String title = "错误";
+            setNotice(title,
+                    getString(R.string.hint_collectfeeder_smtcheck),
+                    wrongColor);
+            return;
+        }
+        //判断msl_fecode 是否等于变量fecode
+        if (!msl_fecode.equals(febar)) {
+            //如果飞达输入框判断通过,fecode和mslfecode一致
+            if (!disposeFecodeEnter(mslKey)) {
+                return;
+            }
+            checkLocation(msl_location);
+        }
+        //如果msl_fecode等于变量fecode
+        else {
+            checkLocation(msl_location);
+        }
+    }
+
+    //校验站位是否正确
+    private void checkLocation(String msl_location) {
+        //校验正确
+        if (location.equals(msl_location)) {
+            String title = getString(R.string.notice_smtcheck_right);
+            String content = "站位:" + msl_location + "正确,请继续校验!";
+            setNotice(title, content, rightColor);
+            JSONObject paramJson = new JSONObject();
+            try {
+                String tmpId = makeCraft.getString("mc_id");
+                paramJson.put("id", tmpId);
+                paramJson.put("code", location);
+                paramJson.put("type", "location");
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+            //更新数据msl_ifcheck值
+            requestType = VolleyUtil.FRAGMENT_SCMAKE_SMTCHECK_IFCHECK;
+            VolleyUtil.getVolleyUtil().requestJsonObject(getActivity(), GloableParams.ADDRESS_SMTCHECK_IFCHECK_APPLY, VolleyUtil.METHOD_POST,
+                    requestType, paramJson);
+        } else {
+            //提示“站位msl_location错误”,同时清空msl_location
+            String title = getString(R.string.notice_smtcheck_wrong);
+            String content = "站位:" + msl_location + "错误!";
+            etLocation.setText("");
+            setNotice(title, content, wrongColor);
+        }
+    }
+
+    //按钮点击事件:“飞达+站位”FeederLocation
+    private void disposeOnclickDouble() {
+        //获得输入框文字
+        String msl_fecode = null, msl_location = null;
+        msl_fecode = etFecode.getText().toString().trim();
+        msl_location = etLocation.getText().toString().trim();
+        setNotice("", "", -1);
+        if (msl_fecode.equals("") || msl_fecode == null) {
+            Log.e(TAG, "etFecode is null");
+            etFecode.setWarnIconVisible();
+            return;
+        }
+        if (msl_location.equals("") || msl_location == null) {
+            Log.e(TAG, "etLocation is null");
+            etLocation.setWarnIconVisible();
+            return;
+        }
+        disposeLocationEnter();
+    }
+
+    //顺序校验输入框enter事件(fecode和barcode共用)
+    int order = 0;
+
+    private void disposeOrderEnter() {
+        String title, content;
+        //获取输入框文字
+        String msl_febar = etOrder.getText().toString().trim();
+        if (msl_febar.equals("") || msl_febar == null) {
+            etOrder.setWarnIconVisible();
+            return;
+        }
+        //如果输入的msl_fecode不等于变量fe_code
+        Log.e(TAG + "ordercheck", "msl_fecode:" + msl_febar + "fe_code:" + febar + msl_febar.equals(febar));
+        if (!msl_febar.equals(febar)) {
+            title = getString(R.string.notice_smtcheck_wrong);
+            content = errorMsg.replaceAll("replace", msl_febar);
+            etOrder.setText("");
+            setNotice(title, content, wrongColor);
+            return;
+        }
+        title = getString(R.string.notice_smtcheck_right);
+        rightMsg = rightMsg.replaceAll("replace", msl_febar);
+        setNotice(title, rightMsg, rightColor);
+        //发送请求至服务器更新msl_ifcheck=1
+        JSONObject paramJson = new JSONObject();
+        try {
+            String id = makeCraft.getString("mc_id");
+            String code = msl_febar;
+            paramJson.put("id", id);
+            paramJson.put("code", code);
+            paramJson.put("type", serverParam);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        requestType = VolleyUtil.FRAGMENT_SCMAKE_SMTCHECK_IFCHECK;
+        VolleyUtil.getVolleyUtil().requestJsonObject(getActivity(), GloableParams.ADDRESS_SMTCHECK_IFCHECK_APPLY, VolleyUtil.METHOD_POST,
+                requestType, paramJson);
+    }
+
+    //按钮点击事件:顺序校验
+    private void disposeOnclickOrder() {
+        String msl_febar = etOrder.getText().toString().trim();
+        if (msl_febar.equals("") || msl_febar == null) {
+            etOrder.setWarnIconVisible();
+            return;
+        }
+        disposeOrderEnter();
+    }
+
+    /*============================选择校验方式下拉框==================================*/
+    List checkStyleList;
+    //显示选择校验方式下拉框
+    PopupWindow changePopWin;
+
+    //显示选择校验方式界面
+    private void showSelectPopWindow() {
+        ListView lvCheckStyle;
+        LayoutInflater inflater = getActivity().getLayoutInflater();
+        View view = inflater.inflate(R.layout.popupwin_inmake_select, null, false);
+        //获取组件
+        changePopWin = new PopupWindow(view, ActionBar.LayoutParams.WRAP_CONTENT, ActionBar.LayoutParams.WRAP_CONTENT);
+        RelativeLayout rlPopwin = (RelativeLayout) view.findViewById(R.id.rl_popwin_inmake_select);
+        rlPopwin.setBackgroundColor(getResources().getColor(R.color.transparent));
+        lvCheckStyle = (ListView) view.findViewById(R.id.select_content_view);
+        TextView tvTitle = (TextView) view.findViewById(R.id.title_selectpop);
+        //获取数据源
+        checkStyleList = DataSourceManager.getDataSourceManager().getCheckStyleItemList();
+        Log.e(TAG, "checkStyleList" + checkStyleList.toString());
+        //Adapter
+        ArrayAdapter adapter = new ArrayAdapter(getActivity(), R.layout.item_list_popwin, checkStyleList);
+        lvCheckStyle.setAdapter(adapter);
+        //添加监听
+        lvCheckStyle.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                disposeOncheckStyleItemClice(position, id);
+            }
+        });
+        //界面配置
+        tvTitle.setText(R.string.text_smtcheck_checkstyle);
+        //popwin捕获焦点
+        changePopWin.setFocusable(true);
+        changePopWin.setBackgroundDrawable(new BitmapDrawable());
+        changePopWin.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+    }
+
+    //校验方式下拉框item点击事件
+    private void disposeOncheckStyleItemClice(int position, long id) {
+        String selectCheckStyleName = checkStyleList.get(position).toString().trim();
+        switch (selectCheckStyleName) {
+            //飞达+站位
+            case GloableParams.LISTNAME_SCMAKE_SMTCHECK_FELOA:
+                curCheckStyle = FEEDER_WITH_LOCATION;
+                break;
+            //飞达按序
+            case GloableParams.LISTNAME_SCMAKE_SMTCHECK_FEORD:
+                curCheckStyle = FEEDER_ORDER;
+                break;
+            //料卷+站位
+            case GloableParams.LISTNAME_SCMAKE_SMTCHECK_BARLOA:
+                curCheckStyle = BARCODE_WITH_LOCATION;
+                break;
+            //料卷按序
+            case GloableParams.LISTNAME_SCMAKE_SMTCHECK_BARORD:
+                curCheckStyle = BARCODE_ORDER;
+                break;
+        }
+        changeCurCheckStyle(curCheckStyle);
+        dismissPopwin();
+    }
+
+    /*=============================Volley Handler===================================*/
+    int requestType = -1;
+    Handler handler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case VolleyUtil.SUCCESS_SUCCESS:
+                    disposeVolleySuccess(msg);
+                    break;
+                case VolleyUtil.FAILED_FAILED:
+                    String title = "失败";
+                    String content = "连接服务器失败";
+                    setNotice(title, content, wrongColor);
+                    break;
+            }
+            progressDialog.dismiss();
+        }
+    };
+
+    //Volley成功
+    private void disposeVolleySuccess(Message msg) {
+        Log.e(TAG, "" + requestType);
+        switch (requestType) {
+            //页面加载
+            case VolleyUtil.FRAGMENT_SCMAKE_SMTCHECK_LOCATION:
+                disposeLoadingSuccess(msg);
+                break;
+            //校验
+            case VolleyUtil.FRAGMENT_SCMAKE_SMTCHECK_IFCHECK:
+                disposeIfcheckSuccess(msg);
+                break;
+        }
+    }
+
+    //页面加载Volley响应成功
+    private void disposeLoadingSuccess(Message msg) {
+        //获得makeSMTLocation
+        String makeSMTLocationStr = (String) msg.obj;
+        try {
+            JSONObject tmpJson = new JSONObject(makeSMTLocationStr);
+            boolean isNull = tmpJson.isNull("message");
+            Log.e(TAG + "makeSMTLocation0", "" + tmpJson.isNull("message"));
+            //如果makeSMTLocation是null
+            if (isNull) {
+                disposeMakeSMTLocationIsNull();
+            }
+            //如果有数据
+            else {
+                makeSMTLocation = tmpJson.getJSONArray("message");
+                //默认校验方式:飞达+站位
+                changeCurCheckStyle(FEEDER_WITH_LOCATION);
+            }
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    //隐藏采集界面,提示无校验数据
+    private void disposeMakeSMTLocationIsNull() {
+        hideCollectLayout();
+        String title = "没有需要校验的数据";
+        setNotice(title, "", getResources().getColor(R.color.text_search));
+    }
+
+    boolean isOrder = false;
+
+    //校验Volley响应成功
+    private void disposeIfcheckSuccess(Message msg) {
+        String title = getString(R.string.notice_smtcheck_success);
+        String content = successMsg.replaceAll("replace", febar);
+        Log.e(TAG, "febar:" + content);
+        setNotice(title, content, rightColor);
+        if (isOrder) {
+            //修改变量fe_code 的值
+            try {
+                //如果已经校验到该单最后一条
+                if (order == (makeSMTLocation.length() - 1)) {
+                    title = getString(R.string.notice_smtcheck_allright);
+                    content = getString(R.string.notice_smtcheck_allrightmsg);
+                    content = content.replace("replace", febar);
+                    setNotice(title, content, rightColor);
+                    //隐藏采集界面
+                    hideCollectLayout();
+                    return;
+                }
+                //febar等于下一条要校验的key值
+                febar = ((JSONObject) makeSMTLocation.get(++order)).getString(mslKey);
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }
+        clearEditText();
+    }
+
+    //清除编辑框内容
+    private void clearEditText() {
+        if (etOrder != null) {
+            etOrder.setText("");
+        }
+        if (etLocation != null) {
+            etLocation.setText("");
+        }
+        if (etFecode != null) {
+            editTextGetFocus(etFecode);
+            etFecode.setText("");
+        }
+        if (isOrder) {
+            editTextGetFocus(etOrder);
+        }
+    }
+
+    //隐藏采集界面
+    private void hideCollectLayout() {
+        rlChange.setVisibility(View.GONE);
+        rlCollect.setVisibility(View.GONE);
+        //llOrder.setVisibility(View.GONE);
+    }
+
+    //显示采集界面
+    private void showCollectLayout() {
+        rlChange.setVisibility(View.VISIBLE);
+        rlCollect.setVisibility(View.VISIBLE);
+        // llOrder.setVisibility(View.VISIBLE);
+    }
+    /*=============================公用方法===================================*/
+
+    /**
+     * 隐藏键盘
+     */
+    private void hideKeyboard(final EditText view) {
+        InputMethodManager inputManager = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+        //获取键盘管理对象
+        inputManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
+    }
+
+    /**
+     * 获取输入框焦点
+     */
+    private void editTextGetFocus(EditText editText) {
+        editText.setFocusable(true);
+        editText.setFocusableInTouchMode(true);
+        editText.setEnabled(true);
+        editText.setClickable(true);
+        editText.requestFocus();
+    }
+
+    /**
+     * 设置提示信息
+     */
+    private void setNotice(String title, String content, int pid) {
+        tvMsgNotice.setText(title);
+        tvMsgNotice.setTextColor(pid);
+        tvMsgProdcode.setText(content);
+        //etCollect.setText("");
+        //清除其它信息
+        tvMsgSpec.setText("");
+        tvMsgBarcode.setText("");
+        tvMsgLocation.setText("");
+        tvMsgQuantity.setText("");
+    }
+
+    @Override
+    public void onClick(View v) {
+        switch (curCheckStyle) {
+            //飞达+站位
+            case FEEDER_WITH_LOCATION:
+                disposeOnclickDouble();
+                break;
+            //飞达按序
+            case FEEDER_ORDER:
+                disposeOnclickOrder();
+                break;
+            //料卷+站位
+            case BARCODE_WITH_LOCATION:
+                disposeOnclickDouble();
+                break;
+            //料卷按序
+            case BARCODE_ORDER:
+                disposeOnclickOrder();
+                break;
+        }
+    }
+
+    /**
+     * 显示loadingView
+     */
+    private void showLoadingView() {
+        if (!progressDialog.isShowing()) {
+            progressDialog.show();
+        }
+    }
+
+    /**
+     * 关闭选择框
+     */
+    private void dismissPopwin() {
+        if (changePopWin.isShowing() && changePopWin != null) {
+            changePopWin.dismiss();
+        }
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
+            if (progressDialog != null && progressDialog.isShowing()) {
+                //                loadingView.dismiss();
+                //                VolleyUtil.distoryVolley();
+                return true;
+            }
+            if (changePopWin != null && changePopWin.isShowing()) {
+                changePopWin.dismiss();
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+}

+ 49 - 55
app/src/main/java/com/uas/pda_wps/fragment/IOCOutMakeMaterial.java

@@ -69,30 +69,14 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import butterknife.Bind;
 import butterknife.ButterKnife;
-import butterknife.OnClick;
 
 /**
  * 材料出库页面
  */
 public class IOCOutMakeMaterial extends BaseFragment {
-
     private static String TAG = "IOCOutMakeMaterial";
 
-    @Bind(R.id.in_out_no)
-    AutoCompleteTextView inOutNo;
-    @Bind(R.id.clean_iv)
-    ImageView cleanIv;
-    @Bind(R.id.wh_code)
-    ClearableEditText whCode;
-    @Bind(R.id.submit_btn)
-    Button submitBtn;
-    @Bind(R.id.list_in_out)
-    ListView listInOut;
-    @Bind(R.id.iocout_material_multiple_tv)
-    TextView mMultipleTextView;
-
     private IOCOutMakeMaterialFuzzySearch fuzzySearchData;
     private MyArrayAdapter<String> autoStringAdapter;
     private StringRequest stringRequest, stringRequestPost;
@@ -109,6 +93,13 @@ public class IOCOutMakeMaterial extends BaseFragment {
     private int mClickPosition = -1;
     private InputMethodManager mInputMethodManager;
 
+    private AutoCompleteTextView inOutNo;
+    private ImageView cleanIv;
+    private ClearableEditText whCode;
+    private Button submitBtn;
+    private ListView listInOut;
+    private TextView mMultipleTextView;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_iocout_make_material;
@@ -120,6 +111,13 @@ public class IOCOutMakeMaterial extends BaseFragment {
         mDbManager = new DBManager(getActivity());
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("材料出库单");
 
+        inOutNo = root.findViewById(R.id.in_out_no);
+        cleanIv = root.findViewById(R.id.clean_iv);
+        whCode = root.findViewById(R.id.wh_code);
+        submitBtn = root.findViewById(R.id.submit_btn);
+        listInOut = root.findViewById(R.id.list_in_out);
+        mMultipleTextView = root.findViewById(R.id.iocout_material_multiple_tv);
+
         //弹出软键盘
         mInputMethodManager = (InputMethodManager) root.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
         mInputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
@@ -142,13 +140,10 @@ public class IOCOutMakeMaterial extends BaseFragment {
             if (CommonUtil.isNetWorkConnected(mActivity))
                 refreshMaterialStatus();
         }
-
-
     }
 
     @Override
     protected void initEvents() {
-
         listInOut.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
@@ -261,6 +256,41 @@ public class IOCOutMakeMaterial extends BaseFragment {
                 }
             }
         });
+
+        cleanIv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                inOutNo.getText().clear();
+            }
+        });
+
+        submitBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (TextUtils.isEmpty(inOutNo.getText().toString().trim())) {
+                    CommonUtil.toastNoRepeat(getActivity(), "请输入出库单号");
+                } else if (CommonUtil.isStringContainsSpecialChar(inOutNo.getText().toString().trim())) {
+                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
+                } else if (CommonUtil.isStringContainsSpecialChar(whCode.getText().toString().trim())) {
+                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.whcode_cannot_contain_special));
+                } else {
+                    //判断单号和仓库组合是否已经存在于变量orders中
+                    boolean isExist = false;
+                    for (int i = 0; i < dataList.size(); i++) {
+                        if ((dataList.get(i).getPI_INOUTNO()).equals(inOutNo.getText().toString().trim()) && (dataList.get(i).getPD_WHCODE()).equals(whCode.getText().toString().trim())) {
+                            isExist = true;
+                            break;
+                        }
+                    }
+                    if (isExist) {
+                        Toast.makeText(getActivity(), "单号重复", Toast.LENGTH_SHORT).show();
+                        reset();
+                    } else {
+                        submitBtnClick();
+                    }
+                }
+            }
+        });
     }
 
     @Override
@@ -278,7 +308,6 @@ public class IOCOutMakeMaterial extends BaseFragment {
         return false;
     }
 
-
     /**
      * 刷新多工单采集状态
      */
@@ -458,41 +487,6 @@ public class IOCOutMakeMaterial extends BaseFragment {
         PdaApplication.mRequestQueue.add(stringRequest);
     }
 
-    @OnClick({R.id.clean_iv, R.id.submit_btn})
-    public void onClick(View view) {
-        switch (view.getId()) {
-            case R.id.clean_iv:
-                inOutNo.getText().clear();
-                break;
-            case R.id.submit_btn:
-                if (TextUtils.isEmpty(inOutNo.getText().toString().trim())) {
-                    CommonUtil.toastNoRepeat(getActivity(), "请输入出库单号");
-                } else if (CommonUtil.isStringContainsSpecialChar(inOutNo.getText().toString().trim())) {
-                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
-                } else if (CommonUtil.isStringContainsSpecialChar(whCode.getText().toString().trim())) {
-                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.whcode_cannot_contain_special));
-                } else {
-                    //判断单号和仓库组合是否已经存在于变量orders中
-                    boolean isExist = false;
-                    for (int i = 0; i < dataList.size(); i++) {
-                        if ((dataList.get(i).getPI_INOUTNO()).equals(inOutNo.getText().toString().trim()) && (dataList.get(i).getPD_WHCODE()).equals(whCode.getText().toString().trim())) {
-                            isExist = true;
-                            break;
-                        }
-                    }
-                    if (isExist) {
-                        Toast.makeText(getActivity(), "单号重复", Toast.LENGTH_SHORT).show();
-                        reset();
-                    } else {
-                        submitBtnClick();
-                    }
-                }
-
-                break;
-        }
-    }
-
-
     private void submitBtnClick() {
         progressDialog.show();
         String inOutNoString = inOutNo.getText().toString();

+ 55 - 51
app/src/main/java/com/uas/pda_wps/fragment/IOCOutMakeMaterialOper.java

@@ -96,7 +96,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
-import butterknife.Bind;
 import butterknife.ButterKnife;
 import okhttp3.Call;
 import okhttp3.Callback;
@@ -114,56 +113,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private static final int SPLIT_BARCODE_FAIL = 105;
     private static final int FLAG_CONFIRM_POST = 0x05;
 
-    @Bind(R.id.tv_pi_inoutno)
-    TextView tvPiInoutno;
-    @Bind(R.id.tv_pd_whcode)
-    TextView tvPdWhcode;
-    @Bind(R.id.et_bar_code)
-    ClearableEditText etBarCode;
-    @Bind(R.id.btn_confirm)
-    Button btnConfirm;
-
-    @Bind(R.id.iocout_collect_rg)
-    RadioGroup mCollectTypeRadioGroup;
-    @Bind(R.id.iocout_collect_barcode_rb)
-    RadioButton mBarcodeRadioButton;
-    @Bind(R.id.iocout_collect_box_rb)
-    RadioButton mBoxRadioButton;
-    @Bind(R.id.iocout_collect_barcode_tl)
-    TableLayout mBarcodeTableLayout;
-    @Bind(R.id.iocout_collect_box_tl)
-    TableLayout mBoxTableLayout;
-
-    @Bind(R.id.tv_barcode_collection_success)
-    TextView tvBarcodeCollectionSuccess;
-    @Bind(R.id.iocout_bar_code_tv)
-    TextView mCollectBarcodeTv;
-    @Bind(R.id.iocout_bar_remain_tv)
-    TextView mCollectBarRemainTv;
-    @Bind(R.id.iocout_bar_prodcode_tv)
-    TextView mCollectBarProdcodeTv;
-
-    @Bind(R.id.tv_box_collection_success)
-    TextView tvBoxCollectionSuccess;
-    @Bind(R.id.iocout_box_tv)
-    TextView mCollectBoxTv;
-    @Bind(R.id.iocout_box_num_tv)
-    TextView mCollectBoxNumTv;
-    @Bind(R.id.iocout_box_prodcode_tv)
-    TextView mCollectBoxrProdcodeTv;
-    @Bind(R.id.iocout_box_whcode_tv)
-    TextView mCollectBoxWhcodeTv;
-    @Bind(R.id.iocout_collect_model_btn)
-    Button mCollectModelBtn;
-    @Bind(R.id.iocout_material_type_tv)
-    TextView mtypeNameTv;
-    @Bind(R.id.iocout_material_type_sp)
-    Spinner mTypeSpinner;
-    @Bind(R.id.iocout_next_material_information)
-    TextView mMaterialInforTextView;
-    @Bind(R.id.iocout_collect_result)
-    TextView mCollectResultTextView;
-
     private ImageView mScanImageView;
 
     private JsonObjectRequest jsonRequest;
@@ -448,6 +397,33 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private int mPrintDpi = 203;
     private boolean isPrinting = false;
 
+    private TextView tvPiInoutno;
+    private TextView tvPdWhcode;
+    private ClearableEditText etBarCode;
+    private Button btnConfirm;
+
+    private RadioGroup mCollectTypeRadioGroup;
+    private RadioButton mBarcodeRadioButton;
+    private RadioButton mBoxRadioButton;
+    private TableLayout mBarcodeTableLayout;
+    private TableLayout mBoxTableLayout;
+
+    private TextView tvBarcodeCollectionSuccess;
+    private TextView mCollectBarcodeTv;
+    private TextView mCollectBarRemainTv;
+    private TextView mCollectBarProdcodeTv;
+
+    private TextView tvBoxCollectionSuccess;
+    private TextView mCollectBoxTv;
+    private TextView mCollectBoxNumTv;
+    private TextView mCollectBoxrProdcodeTv;
+    private TextView mCollectBoxWhcodeTv;
+    private TextView mCollectModelBtn;
+    private TextView mtypeNameTv;
+    private Spinner mTypeSpinner;
+    private TextView mMaterialInforTextView;
+    private TextView mCollectResultTextView;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_iocout_make_material_oper;
@@ -456,6 +432,34 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     @Override
     protected void initViews() {
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_material_collect));
+
+        tvPiInoutno = root.findViewById(R.id.tv_pi_inoutno);
+        tvPdWhcode = root.findViewById(R.id.tv_pd_whcode);
+        etBarCode = root.findViewById(R.id.et_bar_code);
+        btnConfirm = root.findViewById(R.id.btn_confirm);
+
+        mCollectTypeRadioGroup = root.findViewById(R.id.iocout_collect_rg);
+        mBarcodeRadioButton = root.findViewById(R.id.iocout_collect_barcode_rb);
+        mBoxRadioButton = root.findViewById(R.id.iocout_collect_box_rb);
+        mBarcodeTableLayout = root.findViewById(R.id.iocout_collect_barcode_tl);
+        mBoxTableLayout = root.findViewById(R.id.iocout_collect_box_tl);
+
+        tvBarcodeCollectionSuccess = root.findViewById(R.id.tv_barcode_collection_success);
+        mCollectBarcodeTv = root.findViewById(R.id.iocout_bar_code_tv);
+        mCollectBarRemainTv = root.findViewById(R.id.iocout_bar_remain_tv);
+        mCollectBarProdcodeTv = root.findViewById(R.id.iocout_bar_prodcode_tv);
+
+        tvBoxCollectionSuccess = root.findViewById(R.id.tv_box_collection_success);
+        mCollectBoxTv = root.findViewById(R.id.iocout_box_tv);
+        mCollectBoxNumTv = root.findViewById(R.id.iocout_box_num_tv);
+        mCollectBoxrProdcodeTv = root.findViewById(R.id.iocout_box_prodcode_tv);
+        mCollectBoxWhcodeTv = root.findViewById(R.id.iocout_box_whcode_tv);
+        mCollectModelBtn = root.findViewById(R.id.iocout_collect_model_btn);
+        mtypeNameTv = root.findViewById(R.id.iocout_material_type_tv);
+        mTypeSpinner = root.findViewById(R.id.iocout_material_type_sp);
+        mMaterialInforTextView = root.findViewById(R.id.iocout_next_material_information);
+        mCollectResultTextView = root.findViewById(R.id.iocout_collect_result);
+
 //        ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterialOper();
         ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
         ((FunctionActivity) getActivity()).setScanIvVisible(true);

+ 29 - 35
app/src/main/java/com/uas/pda_wps/fragment/IOCOutManagement.java

@@ -12,9 +12,7 @@ import com.uas.pda_wps.tools.SharedPreUtil;
 import com.uas.pda_wps.util.CommonUtil;
 import com.uas.pda_wps.util.Constants;
 
-import butterknife.Bind;
 import butterknife.ButterKnife;
-import butterknife.OnClick;
 
 /**
  * A simple {@link Fragment} subclass.
@@ -22,13 +20,10 @@ import butterknife.OnClick;
  */
 public class IOCOutManagement extends BaseFragment {
 
-    @Bind(R.id.out_material)
-    LinearLayout outMaterial;
-    @Bind(R.id.out_finish_material)
-    LinearLayout outFinishMaterial;
-
     private String mProdOutType;
     private Fragment mFragment;
+    private LinearLayout outMaterial;
+    private LinearLayout outFinishMaterial;
 
     @Override
     protected int getLayout() {
@@ -38,6 +33,9 @@ public class IOCOutManagement extends BaseFragment {
     @Override
     protected void initViews() {
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_management));
+        outMaterial = root.findViewById(R.id.out_material);
+        outFinishMaterial = root.findViewById(R.id.out_finish_material);
+
         root.setBackgroundColor(getResources().getColor(R.color.background_color_second));
 
         ButterKnife.bind(this, root);
@@ -46,7 +44,31 @@ public class IOCOutManagement extends BaseFragment {
 
     @Override
     protected void initEvents() {
+        outMaterial.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                //材料出库
+                if (mProdOutType != null) {
+                    if (mProdOutType.equals("byBatch") || mProdOutType.equals("byProdcode")) {
+                        mFragment = new IOCOutMakeMaterial();
+                        getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment, mFragment).commit();
+                    } else if (mProdOutType.equals("byBarcode")) {
+                        //                        mFragment = new IOCOutFreeCollectFragment();
+                        //                        getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment,mFragment).commit();
+                        CommonUtil.toastNoRepeat(mActivity, "暂时不支持自由采集功能!");
+                    }
+                }
+            }
+        });
 
+        outFinishMaterial.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                //完工品出库
+                mFragment = new FinishedGoodsOutFragment();
+                getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment, mFragment).commit();
+            }
+        });
     }
 
     @Override
@@ -67,35 +89,7 @@ public class IOCOutManagement extends BaseFragment {
     @Override
     public void onDestroyView() {
         super.onDestroyView();
-        ButterKnife.unbind(this);
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_in_management));
     }
 
-    @OnClick({R.id.out_material, R.id.out_finish_material})
-    public void onClick(View view) {
-
-        switch (view.getId()) {
-            case R.id.out_material:
-                //材料出库
-                if (mProdOutType != null) {
-                    if (mProdOutType.equals("byBatch") || mProdOutType.equals("byProdcode")) {
-                        mFragment = new IOCOutMakeMaterial();
-                        getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment, mFragment).commit();
-                    } else if (mProdOutType.equals("byBarcode")) {
-//                        mFragment = new IOCOutFreeCollectFragment();
-//                        getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment,mFragment).commit();
-                        CommonUtil.toastNoRepeat(mActivity, "暂时不支持自由采集功能!");
-                    }
-                }
-
-                break;
-            case R.id.out_finish_material:
-                //完工品出库
-                mFragment = new FinishedGoodsOutFragment();
-                getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment, mFragment).commit();
-                break;
-            default:
-                break;
-        }
-    }
 }

+ 77 - 90
app/src/main/java/com/uas/pda_wps/fragment/WHBreakingBatchFragment.java

@@ -16,7 +16,6 @@ import android.support.v4.content.FileProvider;
 import android.text.Editable;
 import android.text.TextUtils;
 import android.text.TextWatcher;
-import android.util.Log;
 import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
@@ -55,10 +54,13 @@ import com.uas.pda_wps.util.CommonUtil;
 import com.uas.pda_wps.util.Constants;
 import com.uas.pda_wps.util.FileUtils;
 import com.uas.pda_wps.util.FragmentUtils;
+import com.uas.pda_wps.util.HttpCallback;
+import com.uas.pda_wps.util.HttpParams;
 import com.uas.pda_wps.util.JsonTools;
 import com.uas.pda_wps.util.JsonUtils;
 import com.uas.pda_wps.util.LogUtil;
 import com.uas.pda_wps.util.PrintUtils;
+import com.uas.pda_wps.util.VolleyRequest;
 import com.uas.pda_wps.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
@@ -67,22 +69,15 @@ import org.json.JSONException;
 import org.json.JSONObject;
 
 import java.io.File;
-import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
-import okhttp3.Call;
-import okhttp3.Callback;
-import okhttp3.FormBody;
 import okhttp3.OkHttpClient;
-import okhttp3.RequestBody;
 
 /**
  * @note:分拆批次
@@ -673,104 +668,96 @@ public class WHBreakingBatchFragment extends BaseFragment implements View.OnClic
     private void breakingBtnClickEvent() {
         messages.clear();
         progressDialog.show();
-        String url = GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT;
-        Log.d("breakDeal", url);
-
-        RequestBody requestBody = new FormBody.Builder()
-                .add("or_barcode", etOrBarcode.getText().toString().trim())
-                .add("or_remain", tvOrRemain.getText().toString().trim())
-                .add("bar_remain", etBarRemain.getText().toString().trim())
-                .build();
-
-        okhttp3.Request.Builder builder = new okhttp3.Request.Builder().url(url).post(requestBody);
-
-        Map<String, String> cookiesMap = VolleyUtil.getVolleyUtil().setCookies();
-        if (cookiesMap != null) {
-            Set<String> keys = cookiesMap.keySet();
-            Iterator<String> iterator = keys.iterator();
-            while (iterator.hasNext()) {
-                String key = iterator.next();
-                String value = cookiesMap.get(key);
-                builder.addHeader(key, value);
-            }
-        }
-
-        mRequest = builder.build();
-        mOkHttpClient.newCall(mRequest).enqueue(new Callback() {
-            @Override
-            public void onFailure(Call call, IOException e) {
-                progressDialog.dismiss();
-                Message message = Message.obtain();
-                message.what = SPLIT_BARCODE_FAIL;
-                message.obj = "{\"exceptionInfo\":\"条码拆分异常\"}";
-                mHandler.sendMessage(message);
-            }
 
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT)
+                .method(Request.Method.POST)
+                .tag(GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT)
+                .flag(0)
+                .addParam("or_barcode", etOrBarcode.getText().toString().trim())
+                .addParam("or_remain", tvOrRemain.getText().toString().trim())
+                .addParam("bar_remain", etBarRemain.getText().toString().trim())
+                .build(), new HttpCallback() {
             @Override
-            public void onResponse(Call call, okhttp3.Response response) throws IOException {
+            public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
-                String s = response.body().string();
-                if (response.code() == 200) {
+                String result = o.toString();
+                com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
+                if (resultObject != null && resultObject.getBoolean("success")) {
                     Message message = Message.obtain();
                     message.what = SPLIT_BARCODE_SUCCESS;
-                    message.obj = s;
+                    message.obj = result;
                     mHandler.sendMessage(message);
                 } else {
                     Message message = Message.obtain();
                     message.what = SPLIT_BARCODE_FAIL;
-                    message.obj = s;
+                    message.obj = result;
                     mHandler.sendMessage(message);
                 }
             }
-        });
 
-        /*PdaApplication.mRequestQueue.cancelAll(TAG + "break");
-        stringRequest = new StringRequest(Request.Method.POST, GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT,
-                new Response.Listener<String>() {
-                    @Override
-                    public void onResponse(String s) {
-                        LogUtil.e("breaking", s);
-                        WHBreakingBatchBreakingBtnClickEvent wh = JsonTools.parseJsonToBean(s, WHBreakingBatchBreakingBtnClickEvent.class);
-                        if (wh.getData() != null) {
-                            for (int i = 0; i < wh.getData().size(); i++) {
-                                messages.add(wh.getData().get(i));
-                            }
-                        }
-                        strPrintDataList = new Gson().toJson(messages);
-                        //打开popupWindow;
-                        initPopupWindow();
-                        reset();
-                    }
-                },
-                new Response.ErrorListener() {
-                    @Override
-                    public void onErrorResponse(VolleyError volleyError) {
-                        CommonUtil.showErrorToast(volleyError);
-                        etOrBarcode.setText("");
-                        etBarRemain.setText("");
-                        tvOrRemain.setText("");
-                        btnBreaking.setEnabled(false);
-                        CommonUtil.editTextGetFocus(etOrBarcode);
-                        progressDialog.dismiss();
-                    }
-                }) {
             @Override
-            protected Map<String, String> getParams() throws AuthFailureError {
-                Map<String, String> params = new HashMap<>();
-                params.put("or_barcode", etOrBarcode.getText().toString().trim());
-                params.put("or_remain", tvOrRemain.getText().toString().trim());
-                params.put("bar_remain", etBarRemain.getText().toString().trim());
-                return params;
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                Message message = Message.obtain();
+                message.what = SPLIT_BARCODE_FAIL;
+                message.obj = "{\"exceptionInfo\":\"条码拆分异常\"}";
+                mHandler.sendMessage(message);
             }
+        });
+
+//
+//        String url = GloableParams.ADDRESS_BREAKINGBTNCLICKEVENT;
+//        Log.d("breakDeal", url);
+//
+//        RequestBody requestBody = new FormBody.Builder()
+//                .add("or_barcode", etOrBarcode.getText().toString().trim())
+//                .add("or_remain", tvOrRemain.getText().toString().trim())
+//                .add("bar_remain", etBarRemain.getText().toString().trim())
+//                .build();
+//
+//        okhttp3.Request.Builder builder = new okhttp3.Request.Builder().url(url).post(requestBody);
+//
+//        Map<String, String> cookiesMap = VolleyUtil.getVolleyUtil().setCookies();
+//        if (cookiesMap != null) {
+//            Set<String> keys = cookiesMap.keySet();
+//            Iterator<String> iterator = keys.iterator();
+//            while (iterator.hasNext()) {
+//                String key = iterator.next();
+//                String value = cookiesMap.get(key);
+//                builder.addHeader(key, value);
+//            }
+//        }
+//
+//        mRequest = builder.build();
+//        mOkHttpClient.newCall(mRequest).enqueue(new Callback() {
+//            @Override
+//            public void onFailure(Call call, IOException e) {
+//                progressDialog.dismiss();
+//                Message message = Message.obtain();
+//                message.what = SPLIT_BARCODE_FAIL;
+//                message.obj = "{\"exceptionInfo\":\"条码拆分异常\"}";
+//                mHandler.sendMessage(message);
+//            }
+//
+//            @Override
+//            public void onResponse(Call call, okhttp3.Response response) throws IOException {
+//                progressDialog.dismiss();
+//                String s = response.body().string();
+//                if (response.code() == 200) {
+//                    Message message = Message.obtain();
+//                    message.what = SPLIT_BARCODE_SUCCESS;
+//                    message.obj = s;
+//                    mHandler.sendMessage(message);
+//                } else {
+//                    Message message = Message.obtain();
+//                    message.what = SPLIT_BARCODE_FAIL;
+//                    message.obj = s;
+//                    mHandler.sendMessage(message);
+//                }
+//            }
+//        });
 
-            @Override
-            public Map<String, String> getHeaders() throws AuthFailureError {
-                return VolleyUtil.getVolleyUtil().setCookies();
-            }
-        };
-        stringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
-        stringRequest.setTag(TAG + "break");
-        PdaApplication.mRequestQueue.add(stringRequest);*/
     }
 
     /**

+ 234 - 0
app/src/main/res/layout/fra_full_station_verification.xml

@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="utf-8"?><!--SMTChild检验界面模板-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+    <!--上部:设备信息  no use-->
+    <include
+        layout="@layout/card_device_msg"
+        android:visibility="gone" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:padding="10dp">
+
+        <TextView
+            android:id="@+id/smt_check_linecode_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="center_vertical"
+            android:textSize="@dimen/textsize_16"
+            tools:text="LINE01" />
+
+        <TextView
+            android:id="@+id/smt_check_table_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="10dp"
+            android:layout_weight="1"
+            android:gravity="center_vertical"
+            android:textSize="@dimen/textsize_16"
+            tools:text="A面" />
+
+        <TextView
+            android:id="@+id/smt_check_macode_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="10dp"
+            android:layout_weight="2"
+            android:gravity="center_vertical"
+            android:textSize="@dimen/textsize_16"
+            tools:text="BZBD2308943434434" />
+
+
+        <TextView
+            android:id="@+id/smt_check_recalibration_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:padding="10dp"
+            android:text="重新校验"
+            android:textColor="@color/text_blue"
+            android:textSize="@dimen/textsize_16" />
+    </LinearLayout>
+
+    <View style="@style/view_gray_line" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical">
+
+        <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+                <!--中部:采集区域   no use-->
+                <include
+                    layout="@layout/include_scmake_smtfeederchild_check"
+                    android:visibility="gone" />
+                <!--no  use-->
+                <RadioGroup
+                    android:id="@+id/smt_check_mode_rg"
+                    android:layout_width="match_parent"
+                    android:layout_height="40dp"
+                    android:gravity="center"
+                    android:orientation="horizontal"
+                    android:visibility="gone">
+
+                    <RadioButton
+                        android:id="@+id/smt_check_up_rb"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_marginRight="30dp"
+                        android:checked="true"
+                        android:text="上料" />
+
+                    <RadioButton
+                        android:id="@+id/smt_check_join_rb"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_marginLeft="30dp"
+                        android:text="接料" />
+                </RadioGroup>
+
+                <TableLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="10dp"
+                    android:stretchColumns="1">
+
+                    <TableRow android:background="@color/white">
+
+                        <TextView
+                            style="@style/tl_tv_style"
+                            android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:paddingLeft="20dp"
+                            android:paddingRight="20dp"
+                            android:text="站位"
+                            android:textColor="@color/body_text_1"
+                            android:textSize="16sp" />
+
+                        <!--<com.uas.uaspda.view.ClearableEditText-->
+                        <!--android:id="@+id/smt_check_location_et"-->
+                        <!--style="@style/EditTextLineStyle"-->
+                        <!--android:layout_width="0dp"-->
+                        <!--android:layout_marginRight="@dimen/padding_normal"-->
+                        <!--android:layout_weight="1"-->
+                        <!--android:hint="站位编号"-->
+                        <!--android:imeOptions="actionSend" />-->
+
+                        <LinearLayout
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:orientation="horizontal">
+
+                            <com.uas.pda_wps.view.TextViewWithButton
+                                android:id="@+id/smt_check_location_tv"
+                                style="@style/EditTextLineEnableStyle"
+                                android:layout_width="0dp"
+                                android:layout_marginRight="16dp"
+                                android:layout_weight="1"
+                                android:imeOptions="actionSend"
+                                android:textColor="@color/black" />
+
+                        </LinearLayout>
+
+                    </TableRow>
+
+                    <TableRow
+                        android:layout_marginTop="5dp"
+                        android:background="@color/white">
+
+                        <TextView
+                            style="@style/tl_tv_style"
+                            android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:paddingLeft="20dp"
+                            android:paddingRight="20dp"
+                            android:text="采集栏"
+                            android:textColor="@color/body_text_1"
+                            android:textSize="16sp" />
+                        <!--
+                                            <com.uas.uaspda.view.ClearableEditText
+                                                android:id="@+id/smt_check_prodcode_et"
+                                                style="@style/EditTextLineStyle"
+                                                android:layout_width="0dp"
+                                                android:layout_marginRight="@dimen/padding_normal"
+                                                android:layout_weight="1"
+                                                android:hint="请录入站位编号"
+                                                android:visibility="gone"/>-->
+
+                        <FrameLayout
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_marginRight="@dimen/padding_normal"
+                            android:layout_weight="1">
+
+                            <AutoCompleteTextView
+                                android:id="@+id/smt_check_prodcode_et"
+                                style="@style/EditTextLineStyle"
+                                android:hint="请录入站位编号" />
+
+                            <ImageView
+                                android:id="@+id/smt_check_prodcode_clean_iv"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center|right"
+                                android:layout_marginRight="13dp"
+                                android:src="@drawable/wrong"
+                                android:visibility="gone" />
+                        </FrameLayout>
+
+                    </TableRow>
+                </TableLayout>
+               <!--no use-->
+                <Button
+                    android:id="@+id/smt_check_confirm_btn"
+                    style="@style/ButtonStyle"
+                    android:layout_margin="16dp"
+                    android:enabled="false"
+                    android:text="@string/confirm"
+                    android:visibility="gone" />
+
+                <LinearLayout
+                    style="@style/CardWhiteSytle_fillheight"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent">
+                    <!--no use-->
+                    <TextView
+                        style="@style/CardTitleStyle"
+                        android:layout_marginBottom="5dp"
+                        android:layout_marginTop="5dp"
+                        android:text="@string/text_search_collect_fragment_scmake"
+                        android:visibility="gone" />
+
+                    <include layout="@layout/innermsg_collect_scmake" />
+                </LinearLayout>
+            </LinearLayout>
+        </ScrollView>
+
+        <!--<TextView
+            android:id="@+id/smt_check_recalibration_tv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@color/text_blue"
+            android:gravity="center"
+            android:padding="10dp"
+            android:text="重新校验"
+            android:textColor="@color/white"
+            android:textSize="@dimen/textsize_16" />-->
+    </LinearLayout>
+
+</LinearLayout>

+ 4 - 0
app/src/main/res/values/strings.xml

@@ -428,4 +428,8 @@
         <item>重新采集</item>
         <item>未提交列表</item>
     </string-array>
+
+    <string name="full_station_verification">全站位校验</string>
+
+
 </resources>

+ 2 - 2
build.gradle

@@ -50,8 +50,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 14,
-            versionName      : "v1.0.4"
+            versionCode      : 15,
+            versionName      : "v1.0.5"
     ]
 
     depsVersion = [