Browse Source

增加仓位物料查询界面

ChengJH 1 year ago
parent
commit
45264afc49

+ 28 - 0
app/src/main/java/com/uas/uas_mes_stw/adapter/ReportDetailAdapter.java

@@ -0,0 +1,28 @@
+package com.uas.uas_mes_stw.adapter;
+
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.uas_mes_stw.R;
+import com.uas.uas_mes_stw.bean.PositionBean;
+
+
+public class ReportDetailAdapter extends BaseQuickAdapter<PositionBean, BaseViewHolder> {
+    public ReportDetailAdapter() {
+        super(R.layout.item_report_detail, null);
+    }
+    @Override
+    protected void convert(BaseViewHolder helper, PositionBean item) {
+        TextView tv_pichi=helper.getView(R.id.tv_pichi);
+        TextView tv_report_num=helper.getView(R.id.tv_report_num);
+        TextView tv_report_man=helper.getView(R.id.tv_report_man);
+        TextView tv_qty=helper.getView(R.id.tv_qty);
+        tv_pichi.setText(item.getBAR_PRODCODE());
+        tv_report_num.setText(item.getPR_DETAIL());
+        tv_report_man.setText(item.getPR_SPEC());
+        tv_qty.setText(item.getBAR_REMAIN());
+
+
+    }
+}

+ 60 - 0
app/src/main/java/com/uas/uas_mes_stw/bean/PositionBean.java

@@ -0,0 +1,60 @@
+package com.uas.uas_mes_stw.bean;
+
+/**
+ * Created by cjh on 2024-07-25
+ */
+public class PositionBean {
+    private String BAR_LOCATION;
+    private String BAR_PRODCODE;
+    private String PR_DETAIL;
+    private String PR_SPEC;
+    private String BAR_REMAIN;
+    public PositionBean(){}
+    public PositionBean(String BAR_LOCATION, String BAR_PRODCODE, String PR_DETAIL, String PR_SPEC, String BAR_REMAIN) {
+        this.BAR_LOCATION = BAR_LOCATION;
+        this.BAR_PRODCODE = BAR_PRODCODE;
+        this.PR_DETAIL = PR_DETAIL;
+        this.PR_SPEC = PR_SPEC;
+        this.BAR_REMAIN = BAR_REMAIN;
+    }
+
+    public String getBAR_LOCATION() {
+        return BAR_LOCATION;
+    }
+
+    public void setBAR_LOCATION(String BAR_LOCATION) {
+        this.BAR_LOCATION = BAR_LOCATION;
+    }
+
+    public String getBAR_PRODCODE() {
+        return BAR_PRODCODE;
+    }
+
+    public void setBAR_PRODCODE(String BAR_PRODCODE) {
+        this.BAR_PRODCODE = BAR_PRODCODE;
+    }
+
+    public String getPR_DETAIL() {
+        return PR_DETAIL;
+    }
+
+    public void setPR_DETAIL(String PR_DETAIL) {
+        this.PR_DETAIL = PR_DETAIL;
+    }
+
+    public String getPR_SPEC() {
+        return PR_SPEC;
+    }
+
+    public void setPR_SPEC(String PR_SPEC) {
+        this.PR_SPEC = PR_SPEC;
+    }
+
+    public String getBAR_REMAIN() {
+        return BAR_REMAIN;
+    }
+
+    public void setBAR_REMAIN(String BAR_REMAIN) {
+        this.BAR_REMAIN = BAR_REMAIN;
+    }
+}

+ 4 - 1
app/src/main/java/com/uas/uas_mes_stw/bluebooths/PrintHelper.java

@@ -86,7 +86,10 @@ public class PrintHelper {
             this.textSize = textSize;
             return this;
         }
-
+        public TextBuilder setTextAutLine(String x, String y, int width, int size, boolean isbole, boolean isdouble, String str) throws Exception {
+            HPRTPrinterHelper .AutLine(x,y,width,size,isbole,isdouble,str);
+            return this;
+        }
         public TextBuilder setBold(int bold) {
             if (bold < 0) {
                 bold = 0;

+ 220 - 0
app/src/main/java/com/uas/uas_mes_stw/fragment/PositionInquiryFragment.java

@@ -0,0 +1,220 @@
+package com.uas.uas_mes_stw.fragment;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.uas.uas_mes_stw.R;
+import com.uas.uas_mes_stw.activity.FunctionActivity;
+import com.uas.uas_mes_stw.adapter.ReportDetailAdapter;
+import com.uas.uas_mes_stw.bean.PositionBean;
+import com.uas.uas_mes_stw.global.GloableParams;
+import com.uas.uas_mes_stw.listener.MyEditorActionListener;
+import com.uas.uas_mes_stw.util.CommonUtil;
+import com.uas.uas_mes_stw.util.HttpCallback;
+import com.uas.uas_mes_stw.util.HttpParams;
+import com.uas.uas_mes_stw.util.VolleyRequest;
+import com.uas.uas_mes_stw.view.ClearableEditText;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @note:仓位物料查询
+ */
+public class PositionInquiryFragment extends BaseFragment{
+    private static final int SCAN_BARCODE_CODE = 402;
+    private ClearableEditText modify_barcode_quantity_barcode_cet;
+    private ImageView mScanImageView;
+    private int mFocusId;
+    private Button modify_barcode_quantity_confirm_btn;
+    private List<PositionBean> mFilterStorageInBeans;
+    private RecyclerView rv_content;
+    private ReportDetailAdapter reportDetailAdapter;
+    private TextView tv_loction;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_position_inquiry;
+    }
+
+    @Override
+    protected void initViews() {
+        ((FunctionActivity) mActivity).setScanIvVisible(true);
+        modify_barcode_quantity_barcode_cet = (ClearableEditText) root.findViewById(R.id.modify_barcode_quantity_barcode_cet);
+        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("仓位物料查询");
+        modify_barcode_quantity_confirm_btn = mActivity.findViewById(R.id.modify_barcode_quantity_confirm_btn);
+        mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
+        rv_content = mActivity.findViewById(R.id.rv_data);
+        tv_loction = mActivity.findViewById(R.id.tv_loction);
+    }
+
+    @Override
+    protected void initEvents() {
+        modify_barcode_quantity_barcode_cet.requestFocus();
+        CommonUtil.setEditorActionListener(modify_barcode_quantity_barcode_cet, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                saveBarAcceptCode();
+            }
+        });
+        modify_barcode_quantity_confirm_btn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                saveBarAcceptCode();
+            }
+        });
+
+
+        mFilterStorageInBeans = new ArrayList<>();
+        rv_content.setLayoutManager(new LinearLayoutManager(mActivity));
+        reportDetailAdapter = new ReportDetailAdapter();
+        rv_content.setAdapter(reportDetailAdapter);
+
+
+
+    }
+
+    @Override
+    protected void initDatas() {
+
+    }
+    private void saveBarAcceptCode() {
+        String warehouse = modify_barcode_quantity_barcode_cet.getText().toString().trim();
+
+        if (TextUtils.isEmpty(warehouse)) {
+            CommonUtil.toastNoRepeat(mActivity, "请采集仓位");
+            modify_barcode_quantity_barcode_cet.requestFocus();
+            return;
+        }
+
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_COMMON_GETLOCATIONPROD)
+                .method(Request.Method.GET)
+                .addParam("location",warehouse)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                try {
+                    mFilterStorageInBeans.clear();
+                    String result = o.toString();
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONArray dataArray = resultObject.getJSONArray("data");
+                    if (dataArray != null && dataArray.size() > 0) {
+                        tv_loction.setVisibility(View.VISIBLE);
+                        for(Object index:dataArray){
+                            JSONObject data = (JSONObject) index;
+                            PositionBean jltStorageInBean = new PositionBean();
+                            jltStorageInBean.setBAR_LOCATION(data.getString( "BAR_LOCATION"));
+                            tv_loction.setText("仓位:"+data.getString( "BAR_LOCATION"));
+                            jltStorageInBean.setBAR_PRODCODE(data.getString( "BAR_PRODCODE"));
+                            jltStorageInBean.setBAR_REMAIN(data.getString( "BAR_REMAIN"));
+                            jltStorageInBean.setPR_DETAIL(data.getString( "PR_DETAIL"));
+                            jltStorageInBean.setPR_SPEC(data.getString( "PR_SPEC"));
+                            mFilterStorageInBeans.add(jltStorageInBean);
+                        }
+                        reportDetailAdapter.setNewData(mFilterStorageInBeans);
+                    }
+                    modify_barcode_quantity_barcode_cet.setText("");
+                    modify_barcode_quantity_barcode_cet.requestFocus();
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    progressDialog.dismiss();
+                }
+
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                tv_loction.setVisibility(View.GONE);
+                modify_barcode_quantity_barcode_cet.setText("");
+                modify_barcode_quantity_barcode_cet.requestFocus();
+                mFilterStorageInBeans.clear();
+                reportDetailAdapter.setNewData(mFilterStorageInBeans);
+
+            }
+        });
+
+    }
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+
+        if (resultCode != Activity.RESULT_OK) {
+            return;
+        }
+
+        if (requestCode == SCAN_BARCODE_CODE && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
+                if (mFocusId == R.id.et_collect) {
+                    modify_barcode_quantity_barcode_cet.setText(result);
+                    modify_barcode_quantity_barcode_cet.setSelection(result.length());
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onDestroy() {
+        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("仓位物料查询");
+
+        ((FunctionActivity) mActivity).setScanIvVisible(false);
+        super.onDestroy();
+    }
+
+    @Override
+    public void onPause() {
+        super.onPause();
+    }
+
+    /**
+     * 隐藏键盘
+     */
+    private void hideKeyboard(EditText editText) {
+        //获取键盘管理对象
+        InputMethodManager inputManager = (InputMethodManager) editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+        inputManager.hideSoftInputFromWindow(editText.getWindowToken(), 0);
+    }
+
+
+
+
+    @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;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+}

+ 94 - 15
app/src/main/java/com/uas/uas_mes_stw/fragment/SmartShelvestFragment.java

@@ -5,12 +5,16 @@ import android.app.Activity;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.Color;
+import android.graphics.drawable.BitmapDrawable;
+import android.support.v4.app.Fragment;
 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.LinearLayout;
+import android.widget.PopupWindow;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
 import android.widget.TextView;
@@ -24,6 +28,7 @@ import com.uas.uas_mes_stw.listener.MyEditorActionListener;
 import com.uas.uas_mes_stw.util.CameraUtil;
 import com.uas.uas_mes_stw.util.CommonUtil;
 import com.uas.uas_mes_stw.util.FastjsonUtil;
+import com.uas.uas_mes_stw.util.FragmentUtils;
 import com.uas.uas_mes_stw.util.HttpCallback;
 import com.uas.uas_mes_stw.util.HttpParams;
 import com.uas.uas_mes_stw.util.StringUtil;
@@ -46,7 +51,11 @@ public class SmartShelvestFragment extends BaseFragment {
     private RadioButton rb_chexiao;
     private String rb_changeinter = "1";
     private Button btn_kill;
-
+    private TextView tv_newtext1;
+    private TextView tv_newtext2;
+    private Button mMenuButton;
+    private PopupWindow mMenuPopupWindow;
+    private Fragment mFragment;
     @Override
     protected int getLayout() {
         return R.layout.fragment_smart_shelves;
@@ -55,7 +64,8 @@ public class SmartShelvestFragment extends BaseFragment {
     @Override
     protected void initViews() {
         FunctionActivity.setTitle("智能上架(扫码)");
-        ((FunctionActivity) getActivity()).setScanIvVisible(true);
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+        mMenuButton = (Button) mActivity.findViewById(R.id.btn_actionbar_more);
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
         mBarcodeEditText = root.findViewById(R.id.barcode_info_collect_barcode_et);
         mConfirmButton = root.findViewById(R.id.barcode_info_collect_confirm_btn);
@@ -65,6 +75,8 @@ public class SmartShelvestFragment extends BaseFragment {
         rb_zhuanchu = mActivity.findViewById(R.id.rb_zhuanchu);
         rb_chexiao = mActivity.findViewById(R.id.rb_chexiao);
         btn_kill = mActivity.findViewById(R.id.btn_kill);
+        tv_newtext1 = mActivity.findViewById(R.id.tv_newtext1);
+        tv_newtext2 = mActivity.findViewById(R.id.tv_newtext2);
         mBarcodeEditText.requestFocus();
         jsonObject=new org.json.JSONObject();
     }
@@ -134,8 +146,52 @@ public class SmartShelvestFragment extends BaseFragment {
                 }
             }
         });
+        initPopupWindow();
+        mMenuButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                CommonUtil.setBackgroundAlpha(getActivity(), 0.5f);
+                mMenuPopupWindow.showAsDropDown(mMenuButton);
+            }
+        });
+    }
+    private void initPopupWindow() {
+        View view = View.inflate(getActivity(), R.layout.pop_storage_recharge_menu, null);
+
+        Button doneButton = (Button) view.findViewById(R.id.pop_storage_recharge_menu_1);
+        Button todoButton = (Button) view.findViewById(R.id.pop_storage_recharge_menu_2);
+        doneButton.setText("仓位物料查询");
+        todoButton.setVisibility(View.GONE);
+        mFragment = new PositionInquiryFragment();
+
+        doneButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+//                Bundle bundle = new Bundle();
+//                bundle.putString(Constants.FLAG.FLAG_RECHARGE_CALLER, "AcceptNotify!Have");
+//                mFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(SmartShelvestFragment.this, mFragment);
+            }
+        });
+
+        mMenuPopupWindow = new PopupWindow(view, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        mMenuPopupWindow.setBackgroundDrawable(new BitmapDrawable());
+        mMenuPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeMenuPopupWindow();
+            }
+        });
     }
 
+
+    private void closeMenuPopupWindow() {
+        if (mMenuPopupWindow != null) {
+            mMenuPopupWindow.dismiss();
+            CommonUtil.setBackgroundAlpha(mActivity, 1f);
+        }
+    }
     @Override
     protected void initDatas() { ;
 
@@ -175,15 +231,19 @@ public class SmartShelvestFragment extends BaseFragment {
                     String PR_LOCATION = dataObject.getString("PR_LOCATION") == null ? "" : dataObject.getString("PR_LOCATION");
                     String LOCATION = dataObject.getString("LOCATION") == null ? "" : dataObject.getString("LOCATION");
                     String TYPE = dataObject.getString("TYPE") == null ? "" : dataObject.getString("TYPE");
-                    mResultTextView.setTextColor(Color.BLUE);
+                    String LOCATIONS = dataObject.getString("LOCATIONS") == null ? "" : dataObject.getString("LOCATIONS");
+                    mResultTextView.setTextColor(getResources().getColor(R.color.blue));
                     mResultTextView.setVisibility(View.VISIBLE);
-                    mResultTextView.setText(TYPE+":"+mBarcodeEditText.getText().toString().trim()
-                                            +"\n编号:"+BAR_PRODCODE+" 数量:"+BAR_REMAIN
-                                            +"\n物料"+PR_DETAIL
-                                            +"\n规格"+PR_SPEC
-                                            +"\n默认仓位:"+PR_LOCATION
-                                            +"\n目前仓位:"+BAR_LOCATION
-                                            +"\n建议仓位:"+LOCATION);
+                    tv_newtext1.setVisibility(View.VISIBLE);
+                    tv_newtext2.setVisibility(View.VISIBLE);
+                    mResultTextView.setText(TYPE+":"+mBarcodeEditText.getText().toString().trim()
+                                            +"\n编号:"+BAR_PRODCODE+" 数量:"+BAR_REMAIN
+                                            +"\n物料:"+PR_DETAIL
+                                            +"\n规格:"+PR_SPEC
+                                            +"\n默认仓位:"+PR_LOCATION);
+                    tv_newtext1.setText("目前仓位:"+BAR_LOCATION
+                            +"\n已存放仓位:"+LOCATIONS);
+                    tv_newtext2.setText("建议仓位:"+LOCATION);
                     if (!mLocationEditText.getText().toString().isEmpty()&&!mBarcodeEditText.getText().toString().isEmpty()){
                         saveBarAcceptCode("0");
                     }else {
@@ -197,6 +257,8 @@ public class SmartShelvestFragment extends BaseFragment {
                     CommonUtil.toastNoRepeat(mActivity, failStr);
                     mResultTextView.setTextColor(Color.RED);
                     mResultTextView.setVisibility(View.VISIBLE);
+                    tv_newtext1.setVisibility(View.GONE);
+                    tv_newtext2.setVisibility(View.GONE);
                     mResultTextView.setText(failStr);
                     mBarcodeEditText.requestFocus();
                     mBarcodeEditText.setText(null);
@@ -237,6 +299,8 @@ public class SmartShelvestFragment extends BaseFragment {
             public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
                 mResultTextView.setVisibility(View.VISIBLE);
+                tv_newtext1.setVisibility(View.GONE);
+                tv_newtext2.setVisibility(View.GONE);
                 mResultTextView.setTextColor(getResources().getColor(R.color.blue));
 
 
@@ -275,12 +339,20 @@ public class SmartShelvestFragment extends BaseFragment {
             public void onFail(int flag, String failStr) throws Exception {
                 progressDialog.dismiss();
                 CommonUtil.toastNoRepeat(mActivity, failStr);
+                if (failStr.contains("仓位")){
+                    mLocationEditText.setText(null);
+                    mLocationEditText.requestFocus();
+                }else {
+                    mBarcodeEditText.requestFocus();
+                    mBarcodeEditText.setText(null);
+                }
                 mResultTextView.setVisibility(View.VISIBLE);
+                tv_newtext1.setVisibility(View.GONE);
+                tv_newtext2.setVisibility(View.GONE);
                 mResultTextView.setTextColor(getResources().getColor(R.color.red));
                 mResultTextView.setText(failStr);
-                mBarcodeEditText.requestFocus();
-                mBarcodeEditText.setText(null);
-                mLocationEditText.setText(null);
+
+
             }
         });
 
@@ -295,8 +367,11 @@ public class SmartShelvestFragment extends BaseFragment {
             public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
                 mResultTextView.setVisibility(View.VISIBLE);
+                tv_newtext1.setVisibility(View.GONE);
+                tv_newtext2.setVisibility(View.GONE);
                 mResultTextView.setText(null);
                 mBarcodeEditText.setText(null);
+                mBarcodeEditText.requestFocus();
                 mResultTextView.setTextColor(getResources().getColor(R.color.blue));
                 mResultTextView.setText("结束上架操作成功");
 
@@ -309,6 +384,8 @@ public class SmartShelvestFragment extends BaseFragment {
                 CommonUtil.toastNoRepeat(mActivity, failStr);
                 mResultTextView.setTextColor(getResources().getColor(R.color.red));
                 mResultTextView.setVisibility(View.VISIBLE);
+                tv_newtext1.setVisibility(View.GONE);
+                tv_newtext2.setVisibility(View.GONE);
                 mResultTextView.setText(failStr);
                 mBarcodeEditText.requestFocus();
                 mBarcodeEditText.setText(null);
@@ -339,7 +416,9 @@ public class SmartShelvestFragment extends BaseFragment {
         super.onHiddenChanged(hidden);
         if (!hidden) {
             FunctionActivity.setTitle("智能上架(扫码)");
-            ((FunctionActivity) mActivity).setScanIvVisible(true);
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+        }else {
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
         }
     }
 
@@ -356,6 +435,6 @@ public class SmartShelvestFragment extends BaseFragment {
     @Override
     public void onDestroyView() {
         super.onDestroyView();
-        ((FunctionActivity) getActivity()).setScanIvVisible(false);
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
     }
 }

+ 3 - 0
app/src/main/java/com/uas/uas_mes_stw/global/GloableParams.java

@@ -298,6 +298,7 @@ public class GloableParams {
     public static String ADDRESS_COMMON_SCANGETBARDATA;
     public static String ADDRESS_COMMON_SCANCONFIRMTRANS;
     public static String ADDRESS_COMMON_SCANENDTRANS;
+    public static String ADDRESS_COMMON_GETLOCATIONPROD;
 
 
 
@@ -805,6 +806,7 @@ public class GloableParams {
     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";
+    private static final String ADDRESSTAIL_PAD_GETLOCATIONPROD = "/api/pda/transfer/getLocationProd.action";
 
 
 
@@ -1326,6 +1328,7 @@ public class GloableParams {
         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;
+        GloableParams.ADDRESS_COMMON_GETLOCATIONPROD = uriHead + GloableParams.ADDRESSTAIL_PAD_GETLOCATIONPROD;
 
 
 

+ 9 - 6
app/src/main/java/com/uas/uas_mes_stw/util/PrintUtils.java

@@ -44,6 +44,7 @@ public class PrintUtils {
                         double toprate = FastjsonUtil.getDouble(templateObject, "LP_TOPRATE");
                         int printY = (int) (toprate * dpi / 25.4);//高度
                         double barHeight = FastjsonUtil.getDouble(templateObject, "LP_HEIGHT");
+                        int  lp_width = FastjsonUtil.getInt(templateObject, "LP_WIDTH");
                         int barHeightInt = (int) (barHeight * dpi / 25.4);
                         int fontSize = FastjsonUtil.getInt(templateObject, "LP_SIZE");
 //                        String lp_font = FastjsonUtil.getText(templateObject, "LP_FONT");//字体类型
@@ -66,12 +67,14 @@ public class PrintUtils {
                                     if ("BAR_BATCHCODE".equals(printKey)) {
                                         textFont = 7;
                                     }
-                                    printHelper = printHelper.printText(printText)
-                                            .setX(printX)
-                                            .setY(printY)
-                                            .setBold(1)
-                                            .setTextFont(textFont)//字号
-                                            .setTextSize(fontSize)//字体大小,取接口的值
+                                    printHelper = printHelper.printText("")
+                                            .setTextAutLine(printX+"",printY + (int) ((0.6 * dpi) / 25.4)+"",lp_width,fontSize,false,false,printText)
+//                                            .setX(printX)
+//                                            .setX(printX)
+//                                            .setY(printY)
+//                                            .setBold(1)
+//                                            .setTextFont(textFont)//字号
+//                                            .setTextSize(fontSize)//字体大小,取接口的值
                                             .build();
                                     break;
                                 case "qrcode"://打印二维码

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

@@ -149,7 +149,6 @@
         </LinearLayout>
 
         <LinearLayout
-            android:visibility="gone"
             android:layout_marginTop="5dp"
             android:orientation="horizontal"
             android:layout_width="match_parent"

+ 69 - 0
app/src/main/res/layout/fragment_position_inquiry.xml

@@ -0,0 +1,69 @@
+<?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:padding="@dimen/root_layout_padding">
+
+    <TableLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:stretchColumns="1">
+
+
+        <TableRow
+            android:id="@+id/material_in_collect_num_tr"
+            android:layout_marginTop="5dp">
+
+            <TextView
+                style="@style/tl_tv_style"
+                android:layout_height="match_parent"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="仓位"
+                android:textColor="@color/body_text_1"
+                android:textSize="16sp"/>
+
+            <com.uas.uas_mes_stw.view.ClearableEditText
+                android:id="@+id/modify_barcode_quantity_barcode_cet"
+                style="@style/EditTextStyle"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:focusable="true"
+                android:background="@drawable/bg_line_edittext"
+                android:focusableInTouchMode="true"
+                android:hint="请采集仓位"
+                android:imeOptions="actionSend"
+                android:textColor="@color/black"/>
+        </TableRow>
+
+
+    </TableLayout>
+
+    <Button
+        android:id="@+id/modify_barcode_quantity_confirm_btn"
+        style="@style/ButtonStyle"
+        android:text="查询"/>
+    <TextView
+        android:visibility="gone"
+        android:layout_marginTop="@dimen/dp_10"
+        android:id="@+id/tv_loction"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:textColor="@color/black"
+        android:paddingLeft="15dp"
+        android:textStyle="bold"
+        android:text="仓位:">
+    </TextView>
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/rv_data"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1">
+    </android.support.v7.widget.RecyclerView>
+
+
+</LinearLayout>

+ 214 - 203
app/src/main/res/layout/fragment_production_line_barcode_generation.xml

@@ -5,209 +5,220 @@
     android:layout_height="match_parent"
     android:orientation="vertical"
     android:padding="@dimen/root_layout_padding">
-
-    <TableLayout
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:stretchColumns="1">
-
-
-        <TableRow
-            android:id="@+id/material_in_collect_num_tr"
-            android:layout_marginTop="5dp">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="领料单号"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-
-            <com.uas.uas_mes_stw.view.ClearableEditText
-                android:id="@+id/bom_check_id_cet"
-                style="@style/EditTextStyle"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:focusable="true"
-                android:focusableInTouchMode="true"
-                android:hint="请输入工单号"
-                android:imeOptions="actionSend"
-                android:textColor="@color/black" />
-            <ImageView
-                android:layout_gravity="center"
-                android:id="@+id/iv_popuwindow"
-                android:layout_width="30dp"
-                android:layout_height="30dp"
-                android:layout_marginRight="10dp"
-                android:layout_marginLeft="5dp"
-                android:background="@drawable/bg_button"
-                android:src="@drawable/search_48" />
-        </TableRow>
-        <TableRow
-            android:layout_marginTop="5dp">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="工单号"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-            <TextView
-                android:id="@+id/tv_gdhcode"
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="left"
-                android:padding="10dp"
-                android:text=""
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-        </TableRow>
-
-        <TableRow
-            android:layout_marginTop="5dp">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="料号"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-            <TextView
-                android:id="@+id/tv_prcode"
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="left"
-                android:padding="10dp"
-                android:text=""
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-        </TableRow>
-        <TableRow
-            android:id="@+id/material_in_collect_lotno_tr"
-            android:layout_marginTop="5dp">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="规格"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-            <TextView
-                android:id="@+id/tv_space"
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="left"
-                android:padding="10dp"
-                android:text=""
-                android:maxLines="2"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-        </TableRow>
-        <TableRow
-            android:layout_marginTop="5dp">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="线别"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-            <TextView
-                android:id="@+id/tv_xbcode"
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="left"
-                android:padding="10dp"
-                android:text=""
-                android:maxLines="2"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-        </TableRow>
-        <TableRow
-            android:layout_marginTop="5dp">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="领料数量"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-            <TextView
-                android:id="@+id/tv_lingqty"
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="left"
-                android:padding="10dp"
-                android:text=""
-                android:maxLines="2"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-        </TableRow>
-        <TableRow
-            android:layout_marginTop="5dp">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="数量"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-
-            <com.uas.uas_mes_stw.view.ClearableEditText
-                android:id="@+id/bom_check_qty_cet"
-                style="@style/EditTextStyle"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:focusable="true"
-                android:focusableInTouchMode="true"
-                android:hint="请输入数量"
-                android:imeOptions="actionSend"
-                android:textColor="@color/black"
-                android:inputType="number"/>
-        </TableRow>
-        <TableRow
-            android:layout_marginTop="5dp">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="标签数"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-
-            <com.uas.uas_mes_stw.view.ClearableEditText
-                android:id="@+id/bom_check_tiaomashulaing_cet"
-                style="@style/EditTextStyle"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:focusable="true"
-                android:focusableInTouchMode="true"
-                android:hint="请输入数量"
-                android:imeOptions="actionSend"
-                android:textColor="@color/black"
-                android:inputType="number"/>
-        </TableRow>
-    </TableLayout>
-
-    <Button
-        android:id="@+id/bom_check_confirm_btn"
-        style="@style/ButtonStyle"
-        android:text="@string/confirm" />
+        android:layout_height="match_parent">
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+            <TableLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:stretchColumns="1">
+
+
+                <TableRow
+                    android:id="@+id/material_in_collect_num_tr"
+                    android:layout_marginTop="5dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:padding="10dp"
+                        android:text="领料单号"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.uas_mes_stw.view.ClearableEditText
+                        android:id="@+id/bom_check_id_cet"
+                        style="@style/EditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        android:hint="请输入工单号"
+                        android:imeOptions="actionSend"
+                        android:textColor="@color/black" />
+                    <ImageView
+                        android:layout_gravity="center"
+                        android:id="@+id/iv_popuwindow"
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:layout_marginRight="10dp"
+                        android:layout_marginLeft="5dp"
+                        android:background="@drawable/bg_button"
+                        android:src="@drawable/search_48" />
+                </TableRow>
+                <TableRow
+                    android:layout_marginTop="5dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:padding="10dp"
+                        android:text="工单号"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                    <TextView
+                        android:id="@+id/tv_gdhcode"
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="left"
+                        android:padding="10dp"
+                        android:text=""
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                </TableRow>
+
+                <TableRow
+                    android:layout_marginTop="5dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:padding="10dp"
+                        android:text="料号"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                    <TextView
+                        android:id="@+id/tv_prcode"
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="left"
+                        android:padding="10dp"
+                        android:text=""
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                </TableRow>
+                <TableRow
+                    android:id="@+id/material_in_collect_lotno_tr"
+                    android:layout_marginTop="5dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:padding="10dp"
+                        android:text="规格"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                    <TextView
+                        android:id="@+id/tv_space"
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="left"
+                        android:padding="10dp"
+                        android:text=""
+                        android:maxLines="2"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                </TableRow>
+                <TableRow
+                    android:layout_marginTop="5dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:padding="10dp"
+                        android:text="线别"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                    <TextView
+                        android:id="@+id/tv_xbcode"
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="left"
+                        android:padding="10dp"
+                        android:text=""
+                        android:maxLines="2"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                </TableRow>
+                <TableRow
+                    android:layout_marginTop="5dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:padding="10dp"
+                        android:text="领料数量"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                    <TextView
+                        android:id="@+id/tv_lingqty"
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="left"
+                        android:padding="10dp"
+                        android:text=""
+                        android:maxLines="2"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+                </TableRow>
+                <TableRow
+                    android:layout_marginTop="5dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:padding="10dp"
+                        android:text="数量"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.uas_mes_stw.view.ClearableEditText
+                        android:id="@+id/bom_check_qty_cet"
+                        style="@style/EditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        android:hint="请输入数量"
+                        android:imeOptions="actionSend"
+                        android:textColor="@color/black"
+                        android:inputType="number"/>
+                </TableRow>
+                <TableRow
+                    android:layout_marginTop="5dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:padding="10dp"
+                        android:text="标签数"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.uas_mes_stw.view.ClearableEditText
+                        android:id="@+id/bom_check_tiaomashulaing_cet"
+                        style="@style/EditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        android:hint="请输入数量"
+                        android:imeOptions="actionSend"
+                        android:textColor="@color/black"
+                        android:inputType="number"/>
+                </TableRow>
+            </TableLayout>
+
+            <Button
+                android:id="@+id/bom_check_confirm_btn"
+                style="@style/ButtonStyle"
+                android:text="@string/confirm" />
+        </LinearLayout>
+    </ScrollView>
+
+
+
 
 </LinearLayout>

+ 29 - 7
app/src/main/res/layout/fragment_smart_shelves.xml

@@ -111,16 +111,38 @@
     </LinearLayout>
 
 
-
-    <TextView
-        android:id="@+id/barcode_info_collect_result_tv"
+    <LinearLayout
+        android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/spacing_big"
         android:background="@drawable/shape_msg_block"
-        android:padding="10dp"
-        android:visibility="gone"
-        tools:visibility="visible"
-        tools:text="采集成功,条码:786528238;数量:2;料号:209837;名称规格:瓶子" />
+        android:padding="10dp">
+        <TextView
+            android:id="@+id/barcode_info_collect_result_tv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:visibility="gone"
+            tools:visibility="visible"
+            tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
+
+        <TextView
+            android:id="@+id/tv_newtext1"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:visibility="gone"
+            tools:visibility="visible"
+            android:textColor="@color/green"
+            tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
+        <TextView
+            android:id="@+id/tv_newtext2"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:visibility="gone"
+            tools:visibility="visible"
+            android:textColor="@color/blue"
+            tools:text="采集成功,条码:786528238;数量:2;料号:1209837;名称规格:瓶子" />
+    </LinearLayout>
+
 
 </LinearLayout>

+ 102 - 0
app/src/main/res/layout/item_report_detail.xml

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--主菜单griditem布局-->
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:paddingTop="10dp"
+    android:paddingLeft="15dp"
+    android:paddingRight="10dp"
+    >
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="料号:"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp" />
+        <TextView
+            android:id="@+id/tv_pichi"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:paddingLeft="6dp"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp"
+            tools:text="YS1506002" />
+
+    </LinearLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:orientation="horizontal">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="名称:"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp" />
+        <TextView
+            android:id="@+id/tv_report_num"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:minWidth="80dp"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp"
+            tools:text="YS1506002" />
+
+    </LinearLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:orientation="horizontal">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="规格:"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp" />
+        <TextView
+            android:id="@+id/tv_report_man"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:minWidth="80dp"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp"
+            tools:text="YS1506002" />
+    </LinearLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:orientation="horizontal">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="数量:"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp" />
+        <TextView
+            android:id="@+id/tv_qty"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:minWidth="80dp"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp"
+            tools:text="YS1506002" />
+    </LinearLayout>
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="0.5dp"
+        android:layout_marginTop="10dp"
+        android:background="@color/me_menu_item_press"/>
+
+</LinearLayout>
+

+ 2 - 2
build.gradle

@@ -50,8 +50,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 17,
-            versionName      : "v1.0.7"
+            versionCode      : 21,
+            versionName      : "v1.1.1"
     ]
 
     depsVersion = [