Browse Source

入库采集功能优化,列表ui修改,智能上架界面逻辑增加

ChengJH 1 year ago
parent
commit
5c415be736

+ 1 - 6
app/src/main/java/com/uas/uas_mes_stw/adapter/StorageInAddBarcodeAdapter.java

@@ -9,7 +9,6 @@ import android.widget.TextView;
 
 import com.uas.uas_mes_stw.R;
 import com.uas.uas_mes_stw.bean.StorageInBarcodeBean;
-import com.uas.uas_mes_stw.fragment.StorageInAddBarcodeListFragment;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -61,11 +60,7 @@ public class StorageInAddBarcodeAdapter extends BaseAdapter {
     private void initializeViews(StorageInBarcodeBean object, ViewHolder holder) {
         holder.mProdcodeTv.setText(object.getBI_PRODCODE());
         holder.mBrandTv.setText(object.getBI_BRAND());
-        if (mWhichPage == StorageInAddBarcodeListFragment.PAGE_IN_BARCODE_DETAIL) {
-            holder.mInqtyTv.setText(object.getBI_INQTY() + "");
-        } else {
-            holder.mInqtyTv.setText(object.getBI_OUTQTY() + "");
-        }
+        holder.mInqtyTv.setText(object.getBI_INQTY() + "");
         holder.mPoTv.setText(object.getBI_ORDERCODE());
         holder.mDatecodeTv.setText(object.getBI_DATECODE());
         holder.mLotnoTv.setText(object.getBI_LOTNO());

+ 95 - 0
app/src/main/java/com/uas/uas_mes_stw/adapter/StorageInAddBarcodeAdaptertwo.java

@@ -0,0 +1,95 @@
+package com.uas.uas_mes_stw.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.uas.uas_mes_stw.R;
+import com.uas.uas_mes_stw.bean.StorageInBarcodeBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class StorageInAddBarcodeAdaptertwo extends BaseAdapter {
+
+    private List<StorageInBarcodeBean> objects = new ArrayList<StorageInBarcodeBean>();
+
+    private Context context;
+    private LayoutInflater layoutInflater;
+    private int mWhichPage;
+
+    public StorageInAddBarcodeAdaptertwo(Context context, List<StorageInBarcodeBean> objects) {
+        this.context = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        this.objects = objects;
+    }
+
+    public void setWhichPage(int whichPage) {
+        mWhichPage = whichPage;
+    }
+
+    @Override
+    public int getCount() {
+        return objects.size();
+    }
+
+    @Override
+    public StorageInBarcodeBean getItem(int position) {
+        return objects.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_list_storage_in_add_barcodetwo, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((StorageInBarcodeBean) getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(StorageInBarcodeBean object, ViewHolder holder) {
+        holder.mProdcodeTv.setText(object.getBI_PRODCODE());
+        holder.mBrandTv.setText(object.getBI_BRAND());
+        holder.mInqtyTv.setText(object.getBI_INQTY() + "");
+        holder.mPoTv.setText(object.getBI_ORDERCODE());
+        holder.mDatecodeTv.setText(object.getBI_DATECODE());
+        holder.mLotnoTv.setText(object.getBI_LOTNO());
+        holder.mEmnameTv.setText(object.getEM_NAME());
+        holder.mStatusTv.setText(object.getBI_STATUS());
+        holder.mBarcodeTv.setText(object.getBI_BARCODE());
+    }
+
+    protected class ViewHolder {
+        private TextView mProdcodeTv;
+        private TextView mBrandTv;
+        private TextView mInqtyTv;
+        private TextView mPoTv;
+        private TextView mDatecodeTv;
+        private TextView mLotnoTv;
+        private TextView mEmnameTv;
+        private TextView mBarcodeTv;
+        private TextView mStatusTv;
+
+        public ViewHolder(View view) {
+            mProdcodeTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_prodcode_tv);
+            mBrandTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_brand_tv);
+            mInqtyTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_inqty_tv);
+            mPoTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_po_tv);
+            mDatecodeTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_datecode_tv);
+            mLotnoTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_lotno_tv);
+            mEmnameTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_emname_tv);
+            mStatusTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_status_tv);
+            mBarcodeTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_barcode_tv);
+        }
+    }
+}

+ 3 - 3
app/src/main/java/com/uas/uas_mes_stw/bean/StorageInBarcodeBean.java

@@ -23,7 +23,7 @@ public class StorageInBarcodeBean {
 
     private String BI_BARCODE;
     private String BI_PRODCODE;
-    private double BI_INQTY;
+    private String BI_INQTY;
     private double BI_OUTQTY;
     private String BI_INOUTNO;
     private String BI_WHCODE;
@@ -70,11 +70,11 @@ public class StorageInBarcodeBean {
         this.BI_PRODCODE = BI_PRODCODE;
     }
 
-    public double getBI_INQTY() {
+    public String getBI_INQTY() {
         return BI_INQTY;
     }
 
-    public void setBI_INQTY(double BI_INQTY) {
+    public void setBI_INQTY(String BI_INQTY) {
         this.BI_INQTY = BI_INQTY;
     }
 

+ 30 - 2
app/src/main/java/com/uas/uas_mes_stw/fragment/ProductionLineBarcodeGenerationFragment.java

@@ -142,7 +142,7 @@ public class ProductionLineBarcodeGenerationFragment extends BaseFragment {
 
 
         String nowTime = getNowTime();
-        nowTime=prcode+"|"+bom_check_qty_cet.getText().toString().trim()+"|"+pi_xb_user+"|"+nowTime;
+//        nowTime=prcode+"|"+bom_check_qty_cet.getText().toString().trim()+"|"+pi_xb_user+"|"+nowTime;
         JSONObject jsonObject = new JSONObject();
         JSONArray jsonArray = new JSONArray();
         for (int i=0;i<integer;i++){
@@ -167,7 +167,8 @@ public class ProductionLineBarcodeGenerationFragment extends BaseFragment {
 
 //        jsonArray.put(bean);
 
-        initBreakPopupWindow(nolist);
+
+        getokPrint(nolist.toString(),nolist);
         Log.e("nowTime",nowTime);
         Log.e("alone===1",nolist.toString());
     }
@@ -313,6 +314,7 @@ public class ProductionLineBarcodeGenerationFragment extends BaseFragment {
         timeString=result+"";
         return timeString;
     }
+
     private void getRepairStep(String pi_inoutno) {
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(mStringRequest,
@@ -345,6 +347,32 @@ public class ProductionLineBarcodeGenerationFragment extends BaseFragment {
                 });
 
 
+    }
+
+
+    private void getokPrint(String notlist,org.json.JSONArray listArray) {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_COMMON_GETBARINTO)
+                        .method(Request.Method.POST)
+                        .tag(TAG + "getMaCode")
+                        .flag(0)
+                        .addParam("barcodejson",notlist)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        initBreakPopupWindow(listArray);
+                    }
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity.getApplicationContext(), failStr);
+                    }
+                });
+
+
     }
     private void handleFeededlineData(JSONArray dataArray) {
         ComDataBean bean;

+ 5 - 1
app/src/main/java/com/uas/uas_mes_stw/fragment/ShopFloorOperationsFragment.java

@@ -62,10 +62,14 @@ public class ShopFloorOperationsFragment extends BaseFragment implements View.On
                 mFragment = null;
                 String selectedName = mMenuList.get(position).get(DataSourceManager.KEY_GRID_ITEMNAME).toString();
                 switch (selectedName) {
-                    case GloableParams.SHOP_INBOUND_COLLECTION:
                         //入库采集
+                    case GloableParams.SHOP_INBOUND_COLLECTION:
                         mFragment = new StorageCollectionFragment();
                         break;
+                        //产线条码生成
+                    case GloableParams.PRODUCTION_LINE_BARCODE_GENERATION:
+                        mFragment = new ProductionLineBarcodeGenerationFragment();
+                        break;
                     default:
                         break;
                 }

+ 142 - 85
app/src/main/java/com/uas/uas_mes_stw/fragment/SmartShelvestFragment.java

@@ -1,20 +1,24 @@
 package com.uas.uas_mes_stw.fragment;
 
+import android.annotation.SuppressLint;
 import android.app.Activity;
+import android.content.DialogInterface;
 import android.content.Intent;
+import android.graphics.Color;
+import android.support.v7.app.AlertDialog;
 import android.text.TextUtils;
 import android.view.KeyEvent;
 import android.view.View;
 import android.widget.Button;
 import android.widget.ImageView;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
 import android.widget.TextView;
 
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
-import com.google.gson.Gson;
 import com.uas.uas_mes_stw.R;
 import com.uas.uas_mes_stw.activity.FunctionActivity;
-import com.uas.uas_mes_stw.bean.BarcodeInfoDataBean;
 import com.uas.uas_mes_stw.global.GloableParams;
 import com.uas.uas_mes_stw.listener.MyEditorActionListener;
 import com.uas.uas_mes_stw.util.CameraUtil;
@@ -22,6 +26,7 @@ import com.uas.uas_mes_stw.util.CommonUtil;
 import com.uas.uas_mes_stw.util.FastjsonUtil;
 import com.uas.uas_mes_stw.util.HttpCallback;
 import com.uas.uas_mes_stw.util.HttpParams;
+import com.uas.uas_mes_stw.util.StringUtil;
 import com.uas.uas_mes_stw.util.VolleyRequest;
 import com.uas.uas_mes_stw.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
@@ -36,6 +41,11 @@ public class SmartShelvestFragment extends BaseFragment {
     private int mFocusId;
     private String mBarCode;
     private org.json.JSONObject jsonObject;
+    private RadioGroup rg_change;
+    private RadioButton rb_zhuanchu;
+    private RadioButton rb_chexiao;
+    private String rb_changeinter = "1";
+    private Button btn_kill;
 
     @Override
     protected int getLayout() {
@@ -51,7 +61,10 @@ public class SmartShelvestFragment extends BaseFragment {
         mConfirmButton = root.findViewById(R.id.barcode_info_collect_confirm_btn);
         mResultTextView = root.findViewById(R.id.barcode_info_collect_result_tv);
         mLocationEditText = (ClearableEditText) root.findViewById(R.id.material_in_collect_location_et);
-
+        rg_change = mActivity.findViewById(R.id.rg_change);
+        rb_zhuanchu = mActivity.findViewById(R.id.rb_zhuanchu);
+        rb_chexiao = mActivity.findViewById(R.id.rb_chexiao);
+        btn_kill = mActivity.findViewById(R.id.btn_kill);
         mBarcodeEditText.requestFocus();
         jsonObject=new org.json.JSONObject();
     }
@@ -70,16 +83,35 @@ public class SmartShelvestFragment extends BaseFragment {
         CommonUtil.setEditorActionListener(mLocationEditText, new MyEditorActionListener() {
             @Override
             public void MyEditorAction(String text, int actionId, KeyEvent event) {
-                LocationischeckData();
+
             }
         });
 
-
+        rg_change.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @SuppressLint("NonConstantResourceId")
+            @Override
+            public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
+                switch (checkid){
+                    case R.id.rb_zhuanchu:
+                        rb_changeinter = "0";
+                        break;
+                    case R.id.rb_chexiao:
+                        rb_changeinter = "1";
+                        break;
+                }
+            }
+        });
 
         mConfirmButton.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                setBindingData();
+                saveBarAcceptCode("0");
+            }
+        });
+        btn_kill.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                savekillAcceptCode();
             }
         });
 
@@ -104,91 +136,61 @@ public class SmartShelvestFragment extends BaseFragment {
     protected void initDatas() { ;
 
     }
-    //确定
-    public void setBindingData(){
-        String barcode = mBarcodeEditText.getText().toString();
-        String warehouse = mLocationEditText.getText().toString().trim();
-        if (TextUtils.isEmpty(barcode)) {
-            CommonUtil.toastNoRepeat(mActivity, "请采集条码");
-            mBarcodeEditText.requestFocus();
-            return;
-        }
-        if (TextUtils.isEmpty(warehouse)) {
-            CommonUtil.toastNoRepeat(mActivity, "请采集仓位");
-            mBarcodeEditText.requestFocus();
-            return;
-        }
 
 
-        saveBarAcceptCode(barcode);
-    }
-
-
-    //仓位回车
-    public void LocationischeckData(){
-        String barcode = mBarcodeEditText.getText().toString();
-        String warehouse = mLocationEditText.getText().toString().trim();
-        if (TextUtils.isEmpty(barcode)) {
-            CommonUtil.toastNoRepeat(mActivity, "请采集条码");
-            mBarcodeEditText.requestFocus();
-            return;
-        }
-        if (TextUtils.isEmpty(warehouse)) {
-            CommonUtil.toastNoRepeat(mActivity, "请采集仓位");
-            mLocationEditText.requestFocus();
-            return;
-        }
-
-        saveBarAcceptCode(barcode);
-    }
 
 
     private void getBarAcceptCode(String barcode) {
-        String datasJson="";
-        BarcodeInfoDataBean dataBean=new BarcodeInfoDataBean();
-        if(!TextUtils.isEmpty(mBarCode)){
-            dataBean.setBARCODE(mBarCode);
-        }else{
-            dataBean.setBARCODE(mBarcodeEditText.getText().toString());
-        }
-        dataBean.setPARSECODE("");
-        dataBean.setPRODCODE("");
-        dataBean.setLOTNO(mLocationEditText.getText().toString());
-        dataBean.setDC(mLocationEditText.getText().toString());
-        dataBean.setQTY("");
-        dataBean.setLC("");
-        dataBean.setPKG("");
-        dataBean.setPN("");
-        dataBean.setPRODCODE_VE("");
-        datasJson=new Gson().toJson(dataBean);
-
-
-        if (TextUtils.isEmpty(barcode)) {
+        if (StringUtil.isEmpty(barcode)){
+            CommonUtil.toastNoRepeat(mActivity, "请输入条码号");
             return;
         }
+
         progressDialog.show();
         try {
             VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
-                    .url(GloableParams.ADDRESS_INMATERIAL_GETBARACCEPTCODE)
+                    .url(GloableParams.ADDRESS_COMMON_SCANGETBARDATA)
                     .method(Request.Method.GET)
-                    .addParam("barcode", barcode)
-                    .addParam("datas","")//传空
+                    .addParam("code", barcode)
+                    .addParam("single",rb_changeinter)
                     .build(), new HttpCallback() {
                 @Override
                 public void onSuccess(int flag, Object o) throws Exception {
                     progressDialog.dismiss();
                     mLocationEditText.requestFocus();
                     mLocationEditText.setSelection(mLocationEditText.getText().length());
+                    JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+                    String BAR_PRODCODE = dataObject.getString("BAR_PRODCODE") == null ? "" : dataObject.getString("BAR_PRODCODE");
+                    String PR_DETAIL = dataObject.getString("PR_DETAIL") == null ? "" : dataObject.getString("PR_DETAIL");
+                    String PR_SPEC = dataObject.getString("PR_SPEC") == null ? "" : dataObject.getString("PR_SPEC");
+                    String PR_ORISPECCODE = dataObject.getString("PR_ORISPECCODE") == null ? "" : dataObject.getString("PR_ORISPECCODE");
+                    String BAR_LOCATION = dataObject.getString("BAR_LOCATION") == null ? "" : dataObject.getString("BAR_LOCATION");
+                    String BAR_CODE = dataObject.getString("BAR_CODE") == null ? "" : dataObject.getString("BAR_CODE");
+                    String BAR_REMAIN = dataObject.getString("BAR_REMAIN") == null ? "" : dataObject.getString("BAR_REMAIN");
+                    String BAR_WHCODE = dataObject.getString("BAR_WHCODE") == null ? "" : dataObject.getString("BAR_WHCODE");
+                    String PR_LOCATION = dataObject.getString("PR_LOCATION") == null ? "" : dataObject.getString("PR_LOCATION");
+                    String LOCATION = dataObject.getString("LOCATION") == null ? "" : dataObject.getString("LOCATION");
+                    mResultTextView.setTextColor(Color.BLUE);
+                    mResultTextView.setVisibility(View.VISIBLE);
+                    mResultTextView.setText("编号:"+BAR_PRODCODE+" 数量:"+BAR_REMAIN
+                                            +"\n名称"+PR_DETAIL
+                                            +"\n规格"+PR_SPEC
+                                            +"\n默认仓库:"+PR_LOCATION
+                                            +"\n目前仓位;"+BAR_LOCATION
+                                            +"\n建议仓位:"+LOCATION);
                 }
 
                 @Override
                 public void onFail(int flag, String failStr) throws Exception {
                     progressDialog.dismiss();
                     CommonUtil.toastNoRepeat(mActivity, failStr);
+                    mResultTextView.setTextColor(Color.RED);
                     mResultTextView.setVisibility(View.VISIBLE);
                     mResultTextView.setText(failStr);
-                    mBarcodeEditText.setText(null);
                     mBarcodeEditText.requestFocus();
+                    mBarcodeEditText.setText(null);
+                    mLocationEditText.setText(null);
+
                 }
             });
         } catch (Exception e) {
@@ -197,13 +199,28 @@ public class SmartShelvestFragment extends BaseFragment {
     }
 
 
-    private void saveBarAcceptCode(String barcode) {
+    private void saveBarAcceptCode(String ifmix) {
+        String barcode = mBarcodeEditText.getText().toString();
+        String warehouse = mLocationEditText.getText().toString().trim();
+        if (TextUtils.isEmpty(barcode)) {
+            CommonUtil.toastNoRepeat(mActivity, "请采集条码");
+            mBarcodeEditText.requestFocus();
+            return;
+        }
+        if (TextUtils.isEmpty(warehouse)) {
+            CommonUtil.toastNoRepeat(mActivity, "请采集仓位");
+            mBarcodeEditText.requestFocus();
+            return;
+        }
+
         progressDialog.show();
         VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
-                .url(GloableParams.ADDRESS_INMATERIAL_SAVEBARACCEPTCODE)
+                .url(GloableParams.ADDRESS_COMMON_SCANCONFIRMTRANS)
                 .method(Request.Method.POST)
-                .addParam("barcode", barcode)
-                .addParam("datas",jsonObject.toString())
+                .addParam("code", barcode)
+                .addParam("single",rb_changeinter)
+                .addParam("location",warehouse)
+                .addParam("ifmix",ifmix)
                 .build(), new HttpCallback() {
             @Override
             public void onSuccess(int flag, Object o) throws Exception {
@@ -211,23 +228,29 @@ public class SmartShelvestFragment extends BaseFragment {
                 mResultTextView.setVisibility(View.VISIBLE);
                 mResultTextView.setText(null);
                 mBarcodeEditText.setText(null);
-                mResultTextView.setTextColor(getResources().getColor(R.color.green));
-                mBarcodeEditText.postDelayed(new Runnable() {
-                    @Override
-                    public void run() {
-                        mBarcodeEditText.requestFocus();
-                    }
-                }, 100);
-                try {
-                    String result = o.toString();
-                    if (FastjsonUtil.validate(result)) {
-                        com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
-                        mResultTextView.setText(FastjsonUtil.getText(resultObject, "data"));
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
+                mLocationEditText.setText(null);
+                mResultTextView.setTextColor(getResources().getColor(R.color.blue));
+
+                JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+                String LOG = dataObject.getString("log") == null ? "" : dataObject.getString("log");
+                String IFMIX = dataObject.getString("ifmix") == null ? "" : dataObject.getString("ifmix");
+                String PRODCODE = dataObject.getString("prodcode") == null ? "" : dataObject.getString("prodcode");
+                if (StringUtil.isEmpty(IFMIX)){
+                    mResultTextView.setText(LOG);
+                }else {
+                    new AlertDialog.Builder(getActivity()).setTitle("提示")
+                            .setCancelable(true)
+                            .setMessage("是否允许混物料放置? 已经放置物料:"+PRODCODE)
+                            .setPositiveButton("是", new DialogInterface.OnClickListener() {
+                                @Override
+                                public void onClick(DialogInterface dialog, int which) {
+                                    saveBarAcceptCode(IFMIX);
+                                }
+                            })
+                            .setNegativeButton("否", null).show();
                 }
 
+                mBarcodeEditText.requestFocus();
 
 
 
@@ -238,13 +261,47 @@ public class SmartShelvestFragment extends BaseFragment {
                 progressDialog.dismiss();
                 CommonUtil.toastNoRepeat(mActivity, failStr);
                 mResultTextView.setVisibility(View.VISIBLE);
+                mResultTextView.setTextColor(getResources().getColor(R.color.red));
                 mResultTextView.setText(failStr);
                 mBarcodeEditText.requestFocus();
+                mBarcodeEditText.setText(null);
+                mLocationEditText.setText(null);
             }
         });
 
     }
+    private void savekillAcceptCode() {
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_COMMON_SCANENDTRANS)
+                .method(Request.Method.POST)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                mResultTextView.setVisibility(View.VISIBLE);
+                mResultTextView.setText(null);
+                mBarcodeEditText.setText(null);
+                mResultTextView.setTextColor(getResources().getColor(R.color.blue));
+                mResultTextView.setText("结束上架操作成功");
+
+
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                mResultTextView.setTextColor(getResources().getColor(R.color.red));
+                mResultTextView.setVisibility(View.VISIBLE);
+                mResultTextView.setText(failStr);
+                mBarcodeEditText.requestFocus();
+                mBarcodeEditText.setText(null);
+                mLocationEditText.setText(null);
+            }
+        });
 
+    }
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         if (resultCode != Activity.RESULT_OK) {

+ 76 - 143
app/src/main/java/com/uas/uas_mes_stw/fragment/StorageInAddBarcodeListFragment.java

@@ -2,8 +2,8 @@ package com.uas.uas_mes_stw.fragment;
 
 import android.app.Dialog;
 import android.content.DialogInterface;
-import android.os.Bundle;
 import android.support.v7.app.AlertDialog;
+import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
 import android.widget.AdapterView;
@@ -21,11 +21,11 @@ import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.uas.uas_mes_stw.R;
 import com.uas.uas_mes_stw.activity.FunctionActivity;
 import com.uas.uas_mes_stw.adapter.StorageInAddBarcodeAdapter;
-import com.uas.uas_mes_stw.adapter.StorageInAddQuantityAdapter;
 import com.uas.uas_mes_stw.adapter.StorageSearchModeAdapter;
 import com.uas.uas_mes_stw.bean.StorageInBarcodeBean;
 import com.uas.uas_mes_stw.global.GloableParams;
 import com.uas.uas_mes_stw.listener.MyEditorActionListener;
+import com.uas.uas_mes_stw.tools.SharedPreUtil;
 import com.uas.uas_mes_stw.util.CommonUtil;
 import com.uas.uas_mes_stw.util.FastjsonUtil;
 import com.uas.uas_mes_stw.util.HttpCallback;
@@ -35,29 +35,31 @@ import com.uas.uas_mes_stw.view.ClearableEditText;
 import com.uas.uas_mes_stw.view.EmptyLayout;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
- * @author cjh
+ * @author RaoMeng
  * @describe
- * @date 2022/7/12 15:21
+ * @date 2018/6/22 10:51
  */
 public class StorageInAddBarcodeListFragment extends BaseFragment implements HttpCallback {
+    private final int FLAG_GET_BARCODE_DETAIL = 201;
+    private final int FLAG_DELETE_BARCODE = 202;
+
     public static final int PAGE_OUT_BARCODE_DETAIL = 111;
     public static final int PAGE_OUT_QUANTITY_SUM = 112;
     public static final int PAGE_IN_BARCODE_DETAIL = 113;
     public static final int PAGE_IN_QUANTITY_SUM = 114;
 
-    private final int FLAG_GET_BARCODE_DETAIL = 201;
-    private final int FLAG_DELETE_BARCODE = 202;
+
 
     private PullToRefreshListView mRefreshListView;
     private ClearableEditText mSearchEt;
     private TextView mSearchBtn, mClearTextView, mSearchModeView;
     private LinearLayout mSearchLl;
     private EmptyLayout mEmptyLayout;
-    private int mWhichPage;
-    private long mPiId;
     private StringRequest mStringRequest;
     private int mPageIndex = 1, mPageSize = 20;
     private String mKeyword = "";
@@ -67,13 +69,15 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
     private StorageSearchModeAdapter mModeAdapter;
 
     private StorageInAddBarcodeAdapter mStorageInAddBarcodeAdapter;
-    private StorageInAddQuantityAdapter mStorageInAddQuantityAdapter;
 
     private List<StorageInBarcodeBean> mStorageInBarcodeBeans;
     private JSONArray mQuantityArray;
     private int mSelectionPosition = -1;
 
     private OnDeleteSuccessListener mOnDeleteSuccessListener;
+    private String mPiid;
+    private String pi_class;
+    private TextView clean_all;
 
     public void setOnDeleteSuccessListener(OnDeleteSuccessListener onDeleteSuccessListener) {
         mOnDeleteSuccessListener = onDeleteSuccessListener;
@@ -86,12 +90,8 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
 
     @Override
     protected void initViews() {
-        Bundle arguments = getArguments();
-        if (arguments != null) {
-            mWhichPage = arguments.getInt("whichPage");
-            mPiId = arguments.getLong("piid");
-        }
-
+        mPiid = SharedPreUtil.getString(mActivity, "pi_id", null);
+        pi_class = SharedPreUtil.getString(mActivity, "pi_class", null);
         mRefreshListView = root.findViewById(R.id.storage_in_add_barcode_list_lv);
         mRefreshListView.setMode(PullToRefreshBase.Mode.BOTH);
         mEmptyLayout = new EmptyLayout(mActivity, mRefreshListView.getRefreshableView());
@@ -99,7 +99,9 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
         mEmptyLayout.setShowEmptyButton(false);
         mEmptyLayout.setShowErrorButton(false);
         mEmptyLayout.setEmptyMessage("数据为空");
-
+        ((FunctionActivity) getActivity()).setSubmitBtnVisible(false);
+        clean_all = root.findViewById(R.id.clean_all);
+        clean_all.setVisibility(View.VISIBLE);
         mSearchLl = root.findViewById(R.id.storage_in_add_barcode_list_search_ll);
         mSearchEt = root.findViewById(R.id.storage_in_add_barcode_list_search_cet);
         mSearchBtn = root.findViewById(R.id.storage_in_add_barcode_list_search_tv);
@@ -116,26 +118,15 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
         mModeListView.setAdapter(mModeAdapter);
 
         mModeDialog = new AlertDialog.Builder(mActivity).setView(historyView).create();
-
-        if (mWhichPage == PAGE_IN_BARCODE_DETAIL || mWhichPage == PAGE_OUT_BARCODE_DETAIL) {
+        //入库采集--->条码明细||出库备料--->条码明细
             FunctionActivity.setTitle("条码明细");
             mSearchLl.setVisibility(View.VISIBLE);
-            ((FunctionActivity) getActivity()).setSubmitBtnVisible(true);
-
             mStorageInBarcodeBeans = new ArrayList<>();
             mStorageInAddBarcodeAdapter = new StorageInAddBarcodeAdapter(mActivity, mStorageInBarcodeBeans);
-            mStorageInAddBarcodeAdapter.setWhichPage(mWhichPage);
+            mStorageInAddBarcodeAdapter.setWhichPage(111);
             mRefreshListView.setAdapter(mStorageInAddBarcodeAdapter);
-        } else if (mWhichPage == PAGE_IN_QUANTITY_SUM || mWhichPage == PAGE_OUT_QUANTITY_SUM) {
-            FunctionActivity.setTitle("数量汇总");
-            mSearchLl.setVisibility(View.GONE);
-            ((FunctionActivity) getActivity()).setSubmitBtnVisible(false);
-
-            mQuantityArray = new JSONArray();
-            mStorageInAddQuantityAdapter = new StorageInAddQuantityAdapter(mActivity, mQuantityArray);
-            mStorageInAddQuantityAdapter.setWhichPage(mWhichPage);
-            mRefreshListView.setAdapter(mStorageInAddQuantityAdapter);
-        }
+            //入库采集--->数量汇总||出库备料--->数量汇总
+
     }
 
     @Override
@@ -157,7 +148,7 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
         mRefreshListView.getRefreshableView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
             @Override
             public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
-                if (mWhichPage == PAGE_IN_BARCODE_DETAIL || mWhichPage == PAGE_OUT_BARCODE_DETAIL) {
+                //入库采集--->条码明细||出库备料--->条码明细
                     mSelectionPosition = (int) adapterView.getItemIdAtPosition(i);
                     new AlertDialog.Builder(mActivity)
                             .setMessage("确定删除该条明细?")
@@ -171,13 +162,11 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
                                 }
                             }).create().show();
                     return true;
-                } else {
-                    return false;
-                }
+
             }
         });
 
-        mClearTextView.setOnClickListener(new View.OnClickListener() {
+        clean_all.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 new AlertDialog.Builder(mActivity)
@@ -245,40 +234,25 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
 
     private void getDataList() {
         String url = "";
-        switch (mWhichPage) {
-            case PAGE_IN_BARCODE_DETAIL:
-                String mode = mSearchModeView.getText().toString();
-                if ("条码号".equals(mode)) {
-                    mode = "barcode";
-                } else if ("料号".equals(mode)) {
-                    mode = "prod";
-                }
-                url = GloableParams.ADDRESS_PDAIO_IN_GETBARCODEDETAIL + "?piid=" + mPiId + "&page=" + mPageIndex
-                        + "&pageSize=" + mPageSize + "&condition=" + mKeyword + "&kind=" + mode;
-                break;
-            case PAGE_IN_QUANTITY_SUM:
-                url = GloableParams.ADDRESS_PDAIO_IN_GETPRODINOUTQTYSUM + "?piid=" + mPiId + "&page=" + mPageIndex
-                        + "&pageSize=" + mPageSize + "&condition=" + mKeyword;
-                break;
-            case PAGE_OUT_BARCODE_DETAIL:
-                mode = mSearchModeView.getText().toString();
-                if ("条码号".equals(mode)) {
-                    mode = "barcode";
-                } else if ("料号".equals(mode)) {
-                    mode = "prod";
-                }
-                url = GloableParams.ADDRESS_PDAIO_OUT_GETBARCODEDETAIL + "?piid=" + mPiId + "&page=" + mPageIndex
-                        + "&pageSize=" + mPageSize + "&condition=" + mKeyword + "&kind=" + mode;
-                break;
-            case PAGE_OUT_QUANTITY_SUM:
-                url = GloableParams.ADDRESS_PDAIO_OUT_GETPRODINOUTQTYSUM + "?piid=" + mPiId + "&page=" + mPageIndex
-                        + "&pageSize=" + mPageSize + "&condition=" + mKeyword;
-                break;
-            default:
-                break;
+        String mode = mSearchModeView.getText().toString();
+        if ("条码号".equals(mode)) {
+            mode = "barcode";
+        } else if ("料号".equals(mode)) {
+            mode = "prod";
         }
-
-
+        Integer integer = Integer.valueOf(mPiid);
+        Log.e("integer",integer+"");
+        Map<String, Object> params = new HashMap<>();
+        params.put("piid", integer);
+//        params.put("caller", "BarInFinish");
+        params.put("page", mPageIndex + "");
+        params.put("pageSize", mPageSize + "");
+        params.put("condition",mSearchEt.getText().toString().trim());
+        params.put("kind",mode);
+//        params.put("piclass", pi_class);
+        params.put("terms", "");
+//        params.put("currentMaster", DataUtils.getMaster(mActivity));
+        url = FastjsonUtil.param2Url(GloableParams.ADDRESS_PDAIO_IN_GETBARCODEDETAIL, params);
         VollyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(url)
@@ -358,81 +332,44 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
     }
 
     private void analysisBarcodeDetail(Object o) {
-        if (mPageIndex == 1) {
-            switch (mWhichPage) {
-                case PAGE_IN_BARCODE_DETAIL:
-                case PAGE_OUT_BARCODE_DETAIL:
-                    mStorageInBarcodeBeans.clear();
-                    break;
-                case PAGE_IN_QUANTITY_SUM:
-                case PAGE_OUT_QUANTITY_SUM:
-                    mQuantityArray.clear();
-                    break;
-                default:
-                    break;
-            }
-        }
+        mStorageInBarcodeBeans.clear();
         String result = o.toString();
         JSONObject resultObject = JSON.parseObject(result);
         JSONArray dataArray = resultObject.getJSONArray("data");
         if (dataArray != null) {
-            switch (mWhichPage) {
-                case PAGE_IN_BARCODE_DETAIL:
-                case PAGE_OUT_BARCODE_DETAIL:
-                    for (int i = 0; i < dataArray.size(); i++) {
-                        JSONObject dataObject = dataArray.getJSONObject(i);
-                        if (dataObject != null) {
-                            StorageInBarcodeBean storageInBarcodeBean = new StorageInBarcodeBean();
-
-                            storageInBarcodeBean.setBI_BARCODE(FastjsonUtil.getText(dataObject, "BI_BARCODE"));
-                            storageInBarcodeBean.setBI_PRODCODE(FastjsonUtil.getText(dataObject, "BI_PRODCODE"));
-                            storageInBarcodeBean.setBI_INQTY(FastjsonUtil.getDouble(dataObject, "BI_INQTY"));
-                            storageInBarcodeBean.setBI_OUTQTY(FastjsonUtil.getDouble(dataObject, "BI_OUTQTY"));
-                            storageInBarcodeBean.setBI_INOUTNO(FastjsonUtil.getText(dataObject, "BI_INOUTNO"));
-                            storageInBarcodeBean.setBI_WHCODE(FastjsonUtil.getText(dataObject, "BI_WHCODE"));
-                            storageInBarcodeBean.setBI_BRAND(FastjsonUtil.getText(dataObject, "BI_BRAND"));
-                            storageInBarcodeBean.setBI_ORDERCODE(FastjsonUtil.getText(dataObject, "BI_ORDERCODE"));
-                            storageInBarcodeBean.setEM_NAME(FastjsonUtil.getText(dataObject, "EM_NAME"));
-                            storageInBarcodeBean.setBI_ID(FastjsonUtil.getLong(dataObject, "BI_ID"));
-                            storageInBarcodeBean.setBI_DATECODE(FastjsonUtil.getText(dataObject, "BI_DATECODE"));
-                            storageInBarcodeBean.setBI_LOTNO(FastjsonUtil.getText(dataObject, "BI_LOTNO"));
-                            storageInBarcodeBean.setBI_STATUS(FastjsonUtil.getText(dataObject, "BI_STATUS"));
-                            storageInBarcodeBean.setRN(FastjsonUtil.getInt(dataObject, "RN"));
-
-                            mStorageInBarcodeBeans.add(storageInBarcodeBean);
-                        }
-                    }
+            for (int i = 0; i < dataArray.size(); i++) {
+                JSONObject dataObject = dataArray.getJSONObject(i);
+                if (dataObject != null) {
+                    StorageInBarcodeBean storageInBarcodeBean = new StorageInBarcodeBean();
+                    storageInBarcodeBean.setBI_BARCODE(FastjsonUtil.getText(dataObject, "BI_BARCODE"));
+                    storageInBarcodeBean.setBI_PRODCODE(FastjsonUtil.getText(dataObject, "BI_PRODCODE"));
+                    storageInBarcodeBean.setBI_INQTY(FastjsonUtil.getText(dataObject, "BI_INQTY"));
+                    storageInBarcodeBean.setBI_OUTQTY(FastjsonUtil.getDouble(dataObject, "BI_OUTQTY"));
+                    storageInBarcodeBean.setBI_INOUTNO(FastjsonUtil.getText(dataObject, "BI_INOUTNO"));
+                    storageInBarcodeBean.setBI_WHCODE(FastjsonUtil.getText(dataObject, "BI_WHCODE"));
+                    storageInBarcodeBean.setBI_BRAND(FastjsonUtil.getText(dataObject, "BI_BRAND"));
+                    storageInBarcodeBean.setBI_ORDERCODE(FastjsonUtil.getText(dataObject, "BI_ORDERCODE"));
+                    storageInBarcodeBean.setEM_NAME(FastjsonUtil.getText(dataObject, "EM_NAME"));
+                    storageInBarcodeBean.setBI_ID(FastjsonUtil.getLong(dataObject, "BI_ID"));
+                    storageInBarcodeBean.setBI_DATECODE(FastjsonUtil.getText(dataObject, "BI_DATECODE"));
+                    storageInBarcodeBean.setBI_LOTNO(FastjsonUtil.getText(dataObject, "BI_LOTNO"));
+                    storageInBarcodeBean.setBI_STATUS(FastjsonUtil.getText(dataObject, "BI_STATUS"));
+                    storageInBarcodeBean.setPR_DETAIL(FastjsonUtil.getText(dataObject, "PR_DETAIL"));
+                    storageInBarcodeBean.setPR_SPEC(FastjsonUtil.getText(dataObject, "PR_SPEC"));
+//                            storageInBarcodeBean.setBI_LOCATION(FastjsonUtil.getText(dataObject, "BI_LOCATION"));
+                    storageInBarcodeBean.setRN(FastjsonUtil.getInt(dataObject, "RN"));
+
+                    mStorageInBarcodeBeans.add(storageInBarcodeBean);
+                }
+            }
 
-                    mStorageInAddBarcodeAdapter.notifyDataSetChanged();
-                    if (mStorageInBarcodeBeans.size() == 0) {
-                        mEmptyLayout.showEmpty();
-                    }
-                    break;
-                case PAGE_IN_QUANTITY_SUM:
-                case PAGE_OUT_QUANTITY_SUM:
-                    mQuantityArray.addAll(dataArray);
-                    mStorageInAddQuantityAdapter.notifyDataSetChanged();
-                    if (mQuantityArray.size() == 0) {
-                        mEmptyLayout.showEmpty();
-                    }
-                    break;
-                default:
-                    break;
+            mStorageInAddBarcodeAdapter.notifyDataSetChanged();
+            if (mStorageInBarcodeBeans.size() == 0) {
+                mEmptyLayout.showEmpty();
             }
         } else {
             if (mPageIndex == 1) {
-                switch (mWhichPage) {
-                    case PAGE_IN_BARCODE_DETAIL:
-                    case PAGE_OUT_BARCODE_DETAIL:
-                        mStorageInAddBarcodeAdapter.notifyDataSetChanged();
-                        break;
-                    case PAGE_IN_QUANTITY_SUM:
-                    case PAGE_OUT_QUANTITY_SUM:
-                        mStorageInAddQuantityAdapter.notifyDataSetChanged();
-                        break;
-                    default:
-                        break;
-                }
+                mStorageInAddBarcodeAdapter.notifyDataSetChanged();
                 mEmptyLayout.showEmpty();
             } else {
                 mPageIndex--;
@@ -448,19 +385,15 @@ public class StorageInAddBarcodeListFragment extends BaseFragment implements Htt
         } else if ("料号".equals(mode)) {
             mode = "prod";
         }
-        String url = GloableParams.ADDRESS_PDAIO_IN_DELETEBARCODE;
-        if (mWhichPage == PAGE_IN_BARCODE_DETAIL) {
-            url = GloableParams.ADDRESS_PDAIO_IN_DELETEBARCODE;
-        } else if (mWhichPage == PAGE_OUT_BARCODE_DETAIL) {
-            url = GloableParams.ADDRESS_PDAIO_OUT_DELETEBARCODE;
-        }
+        String url = "";
+        url = GloableParams.ADDRESS_PDAIO_IN_DELETEBARCODE;
         VollyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(url)
                         .method(Request.Method.POST)
                         .flag(FLAG_DELETE_BARCODE)
                         .tag(TAG + "deletebarcode")
-                        .addParam("piid", mPiId + "")
+                        .addParam("piid", mPiid + "")
                         .addParam("type", type)
                         .addParam("biid", biid)
                         .addParam("condition", condition)

+ 4 - 4
app/src/main/java/com/uas/uas_mes_stw/fragment/StorageInAddTwoBarcodeListFragment.java

@@ -19,7 +19,7 @@ import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.uas.uas_mes_stw.R;
 import com.uas.uas_mes_stw.activity.FunctionActivity;
-import com.uas.uas_mes_stw.adapter.StorageInAddBarcodeAdapter;
+import com.uas.uas_mes_stw.adapter.StorageInAddBarcodeAdaptertwo;
 import com.uas.uas_mes_stw.adapter.StorageSearchModeAdapter;
 import com.uas.uas_mes_stw.bean.StorageInBarcodeBean;
 import com.uas.uas_mes_stw.global.GloableParams;
@@ -61,7 +61,7 @@ public class StorageInAddTwoBarcodeListFragment extends BaseFragment implements
     private List<String> mModeList;
     private StorageSearchModeAdapter mModeAdapter;
 
-    private StorageInAddBarcodeAdapter mStorageInAddQuantityAdapter;
+    private StorageInAddBarcodeAdaptertwo mStorageInAddQuantityAdapter;
 
     private List<StorageInBarcodeBean> mStorageInBarcodeBeans;
     private int mSelectionPosition = -1;
@@ -110,7 +110,7 @@ public class StorageInAddTwoBarcodeListFragment extends BaseFragment implements
             mSearchLl.setVisibility(View.GONE);//search列表隐藏
             mStorageInBarcodeBeans = new ArrayList<>();
             ((FunctionActivity) getActivity()).setSubmitBtnVisible(false);
-            mStorageInAddQuantityAdapter = new StorageInAddBarcodeAdapter(mActivity, mStorageInBarcodeBeans);
+            mStorageInAddQuantityAdapter = new StorageInAddBarcodeAdaptertwo(mActivity, mStorageInBarcodeBeans);
             mRefreshListView.setAdapter(mStorageInAddQuantityAdapter);
     }
 
@@ -255,7 +255,7 @@ public class StorageInAddTwoBarcodeListFragment extends BaseFragment implements
                 if (dataObject != null) {
                     StorageInBarcodeBean storageInBarcodeBean = new StorageInBarcodeBean();
                     storageInBarcodeBean.setBI_PRODCODE(FastjsonUtil.getText(dataObject, "BI_PRODCODE"));
-                    storageInBarcodeBean.setBI_INQTY(FastjsonUtil.getDouble(dataObject, "BI_INQTY"));
+                    storageInBarcodeBean.setBI_INQTY(FastjsonUtil.getText(dataObject, "BI_INQTY"));
                     storageInBarcodeBean.setBI_INOUTNO(FastjsonUtil.getText(dataObject, "BI_INOUTNO"));
                     storageInBarcodeBean.setBI_ORDERCODE(FastjsonUtil.getText(dataObject, "BI_ORDERCODE"));
                     storageInBarcodeBean.setPR_DETAIL(FastjsonUtil.getText(dataObject, "PR_DETAIL"));

+ 25 - 5
app/src/main/java/com/uas/uas_mes_stw/global/GloableParams.java

@@ -294,6 +294,10 @@ public class GloableParams {
     public static String ADDRESS_OUTMATERIAL_GETPRODINOUTLIST;
     public static String ADDRESS_COMMON_DBFIND;
     public static String ADDRESS_COMMON_ENDPRODOUT;
+    public static String ADDRESS_COMMON_GETBARINTO;
+    public static String ADDRESS_COMMON_SCANGETBARDATA;
+    public static String ADDRESS_COMMON_SCANCONFIRMTRANS;
+    public static String ADDRESS_COMMON_SCANENDTRANS;
 
 
 
@@ -794,6 +798,16 @@ public class GloableParams {
 
     private static final String ADDRESSTAIL_PAD_STARTPRODOUT = "/api/pda/outMaterial/startProdOut.action";
     private static final String ADDRESSTAIL_PAD_ENDPRODOUT = "/api/pda/outMaterial/endProdOut.action";
+    private static final String ADDRESSTAIL_PAD_GETBARINTO = "/api/pdaio/pdaioIn/getBarinto.action";
+    /**
+     *智能上架(扫码)
+     */
+    private static final String ADDRESSTAIL_PAD_SCANGETBARDATA = "/api/pda/transfer/scanGetBarData.action";
+    private static final String ADDRESSTAIL_PAD_SCANCONFIRMTRANS = "/api/pda/transfer/scanConfirmTrans.action";
+    private static final String ADDRESSTAIL_PAD_SCANENDTRANS = "/api/pda/transfer/scanEndTrans.action";
+
+
+
 
 
 //    入库采集
@@ -876,7 +890,6 @@ public class GloableParams {
     public static final String GRIDNAME_MODIFY_QUANTITY = "条码数量修改";
     public static final String GRIDNAME_BOM_CHECK = "BOM校验";
     public static final String MENU_STORAGE_STOCK_INFO_COLLECT = "库存条码绑定";
-    public static final String PRODUCTION_LINE_BARCODE_GENERATION = "产线条码生成";
     public static final String GRIDNAME_SMART_SHELVES = "智能上架(扫码)";
     public static final String[] storageGridNames = {
             GRIDNAME_GOOD_SEARCH,
@@ -886,7 +899,6 @@ public class GloableParams {
 //            GRIDNAME_WORK_INVENTORY,
             MENU_STORAGE_BARCODE_INFO_COLLECT,
 //            GRIDNAME_BOM_CHECK,
-            PRODUCTION_LINE_BARCODE_GENERATION,
             MENU_STORAGE_STOCK_INFO_COLLECT,
             GRIDNAME_SMART_SHELVES};
     public static final int[] storageGridImgs = {
@@ -895,7 +907,6 @@ public class GloableParams {
 //            R.drawable.storage_transfer,
             R.drawable.storage_work_inventory,
             R.drawable.ic_modify_quantity,
-            R.drawable.storage_msd_manager,
             R.drawable.storage_transfer,
             R.drawable.iv_shelves};
     //DETAIL:搜索备料单号,下拉列表
@@ -967,11 +978,16 @@ public class GloableParams {
     };
     //车间作业
     public static final String SHOP_INBOUND_COLLECTION = "入库采集";
+    public static final String PRODUCTION_LINE_BARCODE_GENERATION = "产线条码生成";
+
     public static final String[] shopfloorInMenuNames = {
-            SHOP_INBOUND_COLLECTION
+            SHOP_INBOUND_COLLECTION,
+            PRODUCTION_LINE_BARCODE_GENERATION
     };
     public static final int[] shopfloorInMenuImgs = {
-            R.drawable.mainmenu_outinstorage
+            R.drawable.mainmenu_outinstorage,
+            R.drawable.storage_msd_manager
+
     };
 
     //-->SMT校验
@@ -1306,6 +1322,10 @@ public class GloableParams {
         GloableParams.ADDRESS_OUTMATERIAL_GETPRODINOUTLIST = uriHead + GloableParams.ADDRESSTAIL_COUNTING_GETPRODINOUTLIST;
         GloableParams.ADDRESS_COMMON_DBFIND = uriHead + GloableParams.ADDRESSTAIL_COMMON_DBFIND;
         GloableParams.ADDRESS_COMMON_ENDPRODOUT = uriHead + GloableParams.ADDRESSTAIL_PAD_ENDPRODOUT;
+        GloableParams.ADDRESS_COMMON_GETBARINTO = uriHead + GloableParams.ADDRESSTAIL_PAD_GETBARINTO;
+        GloableParams.ADDRESS_COMMON_SCANGETBARDATA = uriHead + GloableParams.ADDRESSTAIL_PAD_SCANGETBARDATA;
+        GloableParams.ADDRESS_COMMON_SCANCONFIRMTRANS = uriHead + GloableParams.ADDRESSTAIL_PAD_SCANCONFIRMTRANS;
+        GloableParams.ADDRESS_COMMON_SCANENDTRANS = uriHead + GloableParams.ADDRESSTAIL_PAD_SCANENDTRANS;
 
 
 

+ 27 - 0
app/src/main/res/layout/fragment_smart_shelves.xml

@@ -11,8 +11,35 @@
         android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
+        <RadioGroup
+            android:id="@+id/rg_change"
+            android:layout_marginTop="@dimen/dp_10"
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:gravity="center">
+            <RadioButton
+                android:id="@+id/rb_zhuanchu"
+                android:text="单盘"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:checked="true"
+                android:layout_marginRight="50dp">
+            </RadioButton>
+            <RadioButton
+                android:id="@+id/rb_chexiao"
+                android:text="非单盘"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="50dp">
+            </RadioButton>
+        </RadioGroup>
 
         <LinearLayout
+            android:layout_marginTop="@dimen/dp_10"
             android:orientation="horizontal"
             android:layout_width="match_parent"
             android:layout_height="wrap_content">

+ 13 - 0
app/src/main/res/layout/fragment_storage_in_add_barcode_list.xml

@@ -53,4 +53,17 @@
         android:layout_height="match_parent"
         android:divider="#D8D8D8"
         android:dividerHeight="1px" />
+    <TextView
+        android:id="@+id/clean_all"
+        android:layout_margin="@dimen/dp_10"
+        android:layout_gravity="right"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:text="清空"
+        android:padding="5dp"
+        android:textColor="@color/white"
+        android:background="@drawable/bg_button"
+        android:visibility="gone">
+    </TextView>
 </LinearLayout>

+ 3 - 2
app/src/main/res/layout/goodbad_in_add_detail.xml

@@ -62,7 +62,7 @@
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="号"
+                android:text="条码号"
                 android:textColor="@color/red"
                 android:layout_gravity="center"
                 android:textSize="@dimen/space_top_line_15"
@@ -228,6 +228,7 @@
         style="@style/ButtonStyle"
         android:layout_width="match_parent"
         android:layout_marginBottom="@dimen/dp_10"
-        android:text="确认入库" />
+        android:text="确认入库"
+        android:visibility="gone"/>
 
 </LinearLayout>

+ 3 - 2
app/src/main/res/layout/item_list_storage_in_add_barcode.xml

@@ -39,6 +39,7 @@
         android:padding="3dp">
 
         <LinearLayout
+            android:visibility="gone"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_weight="1"
@@ -64,7 +65,6 @@
         <LinearLayout
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="8dp"
             android:layout_weight="1"
             android:orientation="horizontal">
 
@@ -96,7 +96,7 @@
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:text="PO:"
+            android:text="制造单号:"
             android:textSize="14sp" />
 
         <TextView
@@ -134,6 +134,7 @@
     </LinearLayout>
 
     <LinearLayout
+        android:visibility="gone"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"

+ 240 - 0
app/src/main/res/layout/item_list_storage_in_add_barcodetwo.xml

@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:paddingBottom="4dp"
+    android:paddingLeft="8dp"
+    android:paddingRight="4dp"
+    android:paddingTop="4dp">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="料号:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_barcode_prodcode_tv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="物料编号" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <LinearLayout
+            android:visibility="gone"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="品牌:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/list_storage_in_add_barcode_brand_tv"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="8dp"
+                android:layout_weight="1"
+                android:textColor="#333"
+                android:textSize="14sp"
+                tools:text="品牌" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="数量:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/list_storage_in_add_barcode_inqty_tv"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="8dp"
+                android:layout_weight="2"
+                android:textColor="#333"
+                android:textSize="14sp"
+                tools:text="111" />
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="制造单号:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_barcode_po_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="PO号" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:visibility="gone"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="DateCode:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_barcode_datecode_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="日期" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:visibility="gone"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="LotNo:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_barcode_lotno_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="lotno" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:visibility="gone"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="序列号:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_barcode_barcode_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="925432352452" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:visibility="gone"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="采集人:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/list_storage_in_add_barcode_emname_tv"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="8dp"
+                android:layout_weight="1"
+                android:textColor="#333"
+                android:textSize="14sp"
+                tools:text="采集人" />
+        </LinearLayout>
+
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="状态:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/list_storage_in_add_barcode_status_tv"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="8dp"
+                android:layout_weight="1"
+                android:textColor="#333"
+                android:textSize="14sp"
+                tools:text="入库状态" />
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>

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

@@ -10,6 +10,7 @@
         android:id="@+id/pop_storage_in_add_menu_1"
         style="@style/action_more_menu"
         android:text="过账"
+        android:visibility="gone"
         />
 
     <Button