Browse Source

修复更新问题, 增加本地日志. 增加解除报警功能,仓库管理页增加自由上架, 出库增加开始出库, 结束出库

songw 10 months ago
parent
commit
062e74d7a3
30 changed files with 2027 additions and 23 deletions
  1. 1 1
      app/build.gradle
  2. 7 0
      app/src/main/AndroidManifest.xml
  3. 33 0
      app/src/main/java/com/uas/xzc_electronic/adapter/ReportDetailAdapter.java
  4. 14 0
      app/src/main/java/com/uas/xzc_electronic/application/PdaApplication.java
  5. 64 0
      app/src/main/java/com/uas/xzc_electronic/bean/GroundingBean.java
  6. 2 2
      app/src/main/java/com/uas/xzc_electronic/fragment/ConnectServerFragment.java
  7. 444 0
      app/src/main/java/com/uas/xzc_electronic/fragment/FreeListingFragment.java
  8. 1 6
      app/src/main/java/com/uas/xzc_electronic/fragment/IOCOutMakeMaterial.java
  9. 154 3
      app/src/main/java/com/uas/xzc_electronic/fragment/IOCOutMakeMaterialOper.java
  10. 10 1
      app/src/main/java/com/uas/xzc_electronic/fragment/IndexWareHouseContentFragment.java
  11. 1 0
      app/src/main/java/com/uas/xzc_electronic/fragment/LoginFragment.java
  12. 169 0
      app/src/main/java/com/uas/xzc_electronic/fragment/PositionInquiryFragment.java
  13. 141 0
      app/src/main/java/com/uas/xzc_electronic/fragment/ReleaseAlarmFragment.java
  14. 1 1
      app/src/main/java/com/uas/xzc_electronic/fragment/VersionUpgradeFragment.java
  15. 45 2
      app/src/main/java/com/uas/xzc_electronic/global/GloableParams.java
  16. 2 1
      app/src/main/java/com/uas/xzc_electronic/tools/SharedPreUtil.java
  17. 230 0
      app/src/main/java/com/uas/xzc_electronic/util/CrashHandler.java
  18. BIN
      app/src/main/res/drawable-xhdpi/iv_shelves.png
  19. BIN
      app/src/main/res/drawable-xhdpi/jiechubaojing.png
  20. 9 0
      app/src/main/res/drawable/bg_stops_enabled.xml
  21. 9 0
      app/src/main/res/drawable/bg_stops_focus.xml
  22. 7 0
      app/src/main/res/drawable/bgstop_button.xml
  23. 387 0
      app/src/main/res/layout/fragment_free_listing.xml
  24. 27 3
      app/src/main/res/layout/fragment_iocout_make_material_oper.xml
  25. 16 0
      app/src/main/res/layout/fragment_position_inquiry.xml
  26. 94 0
      app/src/main/res/layout/fragment_release_aliarm.xml
  27. 137 0
      app/src/main/res/layout/item_report_detail.xml
  28. 5 0
      app/src/main/res/values/color.xml
  29. 14 0
      app/src/main/res/values/strings.xml
  30. 3 3
      build.gradle

+ 1 - 1
app/build.gradle

@@ -41,7 +41,7 @@ android {
             if (outputFile != null && outputFile.name.endsWith('.apk')) {
                 if (variant.buildType.name.equals('release')) {
                     def releaseInfo = getVersionName()
-                    fileName = "行之成_electronic_RELEASE_${releaseInfo}.apk"
+                    fileName = "行之成_仓库_RELEASE_${releaseInfo}.apk"
 
                 } else if (variant.buildType.name.equals('debug')) {
                     def debugInfo = getVersionName()

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

@@ -18,6 +18,13 @@
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
 
+    <!-- 在 AndroidManifest.xml 文件中添加以下权限声明 -->
+    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
+
+    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
+
+
+
     <application
         android:name="com.uas.xzc_electronic.application.PdaApplication"
         android:allowBackup="true"

+ 33 - 0
app/src/main/java/com/uas/xzc_electronic/adapter/ReportDetailAdapter.java

@@ -0,0 +1,33 @@
+package com.uas.xzc_electronic.adapter;
+
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.xzc_electronic.R;
+import com.uas.xzc_electronic.bean.GroundingBean;
+
+
+public class ReportDetailAdapter extends BaseQuickAdapter<GroundingBean, BaseViewHolder> {
+
+    public ReportDetailAdapter() {
+        super(R.layout.item_report_detail, null);
+    }
+    @Override
+    protected void convert(BaseViewHolder helper, GroundingBean item) {
+        TextView tv_tiaomahao=helper.getView(R.id.tv_tiaomahao);    //条码号
+//        TextView tv_qty=helper.getView(R.id.tv_qty);    //仓位
+        TextView tv_qty=helper.getView(R.id.tv_qty);    //料架
+        TextView tv_pichi=helper.getView(R.id.tv_pichi);
+        TextView tv_report_num=helper.getView(R.id.tv_report_num);
+        TextView tv_report_man=helper.getView(R.id.tv_report_man);
+
+        tv_tiaomahao.setText(item.getPB_BARCODE());
+//        tv_qty.setText(item.getPB_LOCATION());
+        tv_qty.setText(item.getPB_SHELFCODE());
+        tv_pichi.setText(item.getPB_PRODCODE());
+        tv_report_num.setText(item.getPR_DETAIL());
+        tv_report_man.setText(item.getPR_SPEC());
+        tv_report_man.setText(item.getPR_SPEC());
+    }
+}

+ 14 - 0
app/src/main/java/com/uas/xzc_electronic/application/PdaApplication.java

@@ -11,6 +11,7 @@ import com.android.volley.toolbox.Volley;
 import com.facebook.stetho.Stetho;
 import com.uas.xzc_electronic.R;
 import com.uas.xzc_electronic.util.AndroidUtil;
+import com.uas.xzc_electronic.util.CrashHandler;
 import com.uas.xzc_electronic.util.FakeX509TrustManager;
 import com.uas.xzc_electronic.util.SoundUtil;
 import com.umeng.analytics.MobclickAgent;
@@ -45,10 +46,17 @@ public class PdaApplication extends Application {
     public static HashMap<Integer, Integer> mSoundMap;
     public static int mVersionCode = 1;
 
+    private static PdaApplication mInstance;
+
     @Override
     public void onCreate() {
         super.onCreate();
+        mInstance = this;
         mContext = getApplicationContext();
+
+        CrashHandler crashHandler = CrashHandler.getInstance();
+        crashHandler.init(mContext);
+
         FakeX509TrustManager.allowAllSSL();//去掉SSL证书验证
         if (mRequestQueue == null)
             mRequestQueue = Volley.newRequestQueue(this);
@@ -223,5 +231,11 @@ public class PdaApplication extends Application {
         return factory;
     }
 
+    public Context getContext() {
+        return mContext;
+    }
 
+    public static PdaApplication getInstance() {
+        return mInstance;
+    }
 }

+ 64 - 0
app/src/main/java/com/uas/xzc_electronic/bean/GroundingBean.java

@@ -0,0 +1,64 @@
+package com.uas.xzc_electronic.bean;
+
+public class GroundingBean {
+    //"PB_BARCODE": "0001-0011",  //条码号
+    //            "PB_LOCATION": "0001-0011",  //仓位编号
+    //            "PB_PRODCODE": "4-001-01-0346",  /物料编号
+    //            "PR_DETAIL": "贴片电阻",    //物料名称
+    //            "PR_SPEC": "1206/0.002R/2mR/1W/±1%/高精度/合金电阻/RALEC",   //物料规格
+
+    private String PB_BARCODE;
+    private String PB_LOCATION;
+    private String PB_PRODCODE;
+    private String PR_DETAIL;
+    private String PR_SPEC;
+    private String PB_SHELFCODE;
+
+    public String getPB_SHELFCODE() {
+        return PB_SHELFCODE;
+    }
+
+    public void setPB_SHELFCODE(String PB_SHELFCODE) {
+        this.PB_SHELFCODE = PB_SHELFCODE;
+    }
+
+    public String getPB_BARCODE() {
+        return PB_BARCODE;
+    }
+
+    public void setPB_BARCODE(String PB_BARCODE) {
+        this.PB_BARCODE = PB_BARCODE;
+    }
+
+    public String getPB_LOCATION() {
+        return PB_LOCATION;
+    }
+
+    public void setPB_LOCATION(String PB_LOCATION) {
+        this.PB_LOCATION = PB_LOCATION;
+    }
+
+    public String getPB_PRODCODE() {
+        return PB_PRODCODE;
+    }
+
+    public void setPB_PRODCODE(String PB_PRODCODE) {
+        this.PB_PRODCODE = PB_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;
+    }
+}

+ 2 - 2
app/src/main/java/com/uas/xzc_electronic/fragment/ConnectServerFragment.java

@@ -441,8 +441,8 @@ public class ConnectServerFragment extends BaseFragment implements View.OnClickL
         String port = portEditText.getText().toString().trim();
 
         //判断是否是正确的port地址
-        boolean portRight = RegexUtil.checkString(port, RegexUtil.PORT_FORMAT);
-
+//        boolean portRight = RegexUtil.checkString(port, RegexUtil.PORT_FORMAT);
+        boolean portRight = true;
         if (!portRight) {
             //Prot不正确,文字变红
             portEditText.setTextColor(getResources().getColor(R.color.red));

+ 444 - 0
app/src/main/java/com/uas/xzc_electronic/fragment/FreeListingFragment.java

@@ -0,0 +1,444 @@
+package com.uas.xzc_electronic.fragment;
+
+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.CheckBox;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.PopupWindow;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.uas.xzc_electronic.R;
+import com.uas.xzc_electronic.activity.FunctionActivity;
+import com.uas.xzc_electronic.global.GloableParams;
+import com.uas.xzc_electronic.listener.MyEditorActionListener;
+import com.uas.xzc_electronic.tools.SharedPreUtil;
+import com.uas.xzc_electronic.util.CameraUtil;
+import com.uas.xzc_electronic.util.CommonUtil;
+import com.uas.xzc_electronic.util.FastjsonUtil;
+import com.uas.xzc_electronic.util.FragmentUtils;
+import com.uas.xzc_electronic.util.HttpCallback;
+import com.uas.xzc_electronic.util.HttpParams;
+import com.uas.xzc_electronic.util.VolleyRequest;
+import com.uas.xzc_electronic.view.ClearableEditText;
+import com.uuzuche.lib_zxing.activity.CaptureActivity;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+
+public class FreeListingFragment extends BaseFragment {
+    private static final int SCAN_BARCODE_CODE = 101;
+    private ClearableEditText mBarcodeEditText,cet_material_rack;
+    private CheckBox cb_free_listing;
+    private Button mConfirmButton;
+    private TextView mResultTextView;
+    private ImageView mScanImageView;
+    private int mFocusId;
+    private String mBarCode;
+    private org.json.JSONObject jsonObject;
+    private Button btn_kill;
+    private Button mMenuButton;
+    private LinearLayout ll_shangjia,ll_end_data,ll_jiaoyan;
+    private PopupWindow mMenuPopupWindow;
+    private Fragment mFragment;
+    private TextView tv_liaojia,tv_barcode_tailback,tv_liaohao,tv_barremain,tv_name,
+            tv_guige,tv_wuliaomorencangku,tv_current_position,tv_aready_stored_in_storage_space,tv_end_data;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_free_listing;
+    }
+
+    @Override
+    protected void initViews() {
+        FunctionActivity.setTitle(getResources().getString(R.string.free_listing));
+        ((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);
+        mResultTextView = root.findViewById(R.id.barcode_info_collect_result_tv);
+        cet_material_rack = (ClearableEditText) root.findViewById(R.id.cet_material_rack);
+        cb_free_listing = (CheckBox) root.findViewById(R.id.cb_free_listing);
+        ll_shangjia = root.findViewById(R.id.ll_shangjia);
+        tv_liaojia = root.findViewById(R.id.tv_liaojia);
+        tv_barcode_tailback = root.findViewById(R.id.tv_barcode_tailback);
+        tv_liaohao = root.findViewById(R.id.tv_liaohao);
+        tv_barremain = root.findViewById(R.id.tv_barremain);
+        tv_name = root.findViewById(R.id.tv_name);
+        tv_guige = root.findViewById(R.id.tv_guige);
+        tv_wuliaomorencangku = root.findViewById(R.id.tv_wuliaomorencangku);
+        tv_current_position = root.findViewById(R.id.tv_current_position);
+        tv_aready_stored_in_storage_space = root.findViewById(R.id.tv_aready_stored_in_storage_space);
+        ll_end_data = root.findViewById(R.id.ll_end_data);
+        tv_end_data = root.findViewById(R.id.tv_end_data);
+        ll_jiaoyan = root.findViewById(R.id.ll_jiaoyan);
+
+        btn_kill = mActivity.findViewById(R.id.btn_kill);
+
+        cet_material_rack.requestFocus();
+        jsonObject=new org.json.JSONObject();
+    }
+
+    @Override
+    protected void initEvents() {
+        //料架回车
+        CommonUtil.setEditorActionListener(cet_material_rack, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                if (!text.isEmpty()&&!cet_material_rack.getText().toString().isEmpty()){
+                    materialRackCode();
+                }
+            }
+        });
+        //条码回车
+        CommonUtil.setEditorActionListener(mBarcodeEditText, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                try{
+                    if (!TextUtils.isEmpty(cet_material_rack.getText().toString().trim())
+                            && !TextUtils.isEmpty(mBarcodeEditText.getText().toString().trim())
+                    ){
+                        getBarAcceptCode(mBarcodeEditText.getText().toString().trim(),cet_material_rack.getText().toString().trim());
+                    }
+                }catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        });
+
+        mConfirmButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getBarAcceptCode(mBarcodeEditText.getText().toString().trim(),cet_material_rack.getText().toString().trim());
+            }
+        });
+        btn_kill.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                String userName = SharedPreUtil.getString(mActivity, SharedPreUtil.KEY_USERNAME, "");
+                new AlertDialog.Builder(getActivity()).setTitle("提示")
+                        .setMessage("是否结束(" + userName + ")的所有进行中的上架任务?")
+                        .setPositiveButton("是", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                dialog.dismiss();
+                                savekillAcceptCode("");
+                            }
+                        })
+                        .setNegativeButton("否", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                dialog.dismiss();
+                            }
+                        })
+                        .show();
+            }
+        });
+
+        mScanImageView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (CameraUtil.hasCamera()) {
+                    if (root.findFocus() != null) {
+                        mFocusId = root.findFocus().getId();
+                        Intent intent = new Intent();
+                        intent.setClass(mActivity, CaptureActivity.class);
+                        startActivityForResult(intent, SCAN_BARCODE_CODE);
+                    }
+                } else {
+                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
+                }
+            }
+        });
+        initPopupWindow();
+        mMenuButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                CommonUtil.setBackgroundAlpha(getActivity(), 0.5f);
+                mMenuPopupWindow.showAsDropDown(mMenuButton);
+            }
+        });
+    }
+
+    private void materialRackCode() {
+        String materialRack = cet_material_rack.getText().toString().trim();
+        if (TextUtils.isEmpty(materialRack)) {
+            CommonUtil.toastNoRepeat(mActivity, getResources().getString(R.string.Please_enter_the_material_rack));
+            cet_material_rack.requestFocus();
+            return;
+        }
+
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_CHECK_SHELF)
+                .method(Request.Method.GET)
+                .addParam("shcode",materialRack)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                org.json.JSONObject resultObject = new org.json.JSONObject(o.toString());
+                ll_jiaoyan.setVisibility(View.VISIBLE);
+                mResultTextView.setVisibility(View.VISIBLE);
+                ll_shangjia.setVisibility(View.GONE);
+                ll_end_data.setVisibility(View.GONE);
+                if (resultObject.optBoolean("success")) {
+                    mResultTextView.setTextColor(getResources().getColor(R.color.blue));
+                    mResultTextView.setText(getResources().getText(R.string.Shelf_validation_successful));
+//                    if (!cb_free_listing.isChecked()){
+//                        cet_material_rack.setText("");
+//                    }
+                    //mBarcodeEditText.setText("");
+                    mBarcodeEditText.requestFocus();
+                }else {
+                    mResultTextView.setTextColor(getResources().getColor(R.color.red));
+                    mResultTextView.setText(resultObject.getString("message"));
+                }
+                CommonUtil.makeNotice();
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                cet_material_rack.setText(null);
+                cet_material_rack.requestFocus();
+                ll_jiaoyan.setVisibility(View.VISIBLE);
+                mResultTextView.setVisibility(View.VISIBLE);
+                mResultTextView.setTextColor(getResources().getColor(R.color.red));
+                mResultTextView.setText(failStr);
+                ll_shangjia.setVisibility(View.GONE);
+                ll_end_data.setVisibility(View.GONE);
+                CommonUtil.makeNotice();
+            }
+        });
+    }
+
+    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(FreeListingFragment.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() { ;
+
+    }
+
+    private void getBarAcceptCode(String barcode,String shcode) {
+        if (TextUtils.isEmpty(shcode)){
+            CommonUtil.toastNoRepeat(mActivity, getResources().getString(R.string.Please_enter_the_material_rack));
+            return;
+        }
+        if (TextUtils.isEmpty(barcode)){
+            CommonUtil.toastNoRepeat(mActivity, getResources().getString(R.string.Please_enter_the_barcode_number));
+            return;
+        }
+        progressDialog.show();
+        try {
+            VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                    .url(GloableParams.ADDRESS_FREE_SMART_START)
+                    .method(Request.Method.GET)
+                    .addParam("shcode", shcode)
+                    .addParam("barcode", barcode)
+                    .build(), new HttpCallback() {
+                @Override
+                public void onSuccess(int flag, Object o) throws Exception {
+                    progressDialog.dismiss();
+                    org.json.JSONObject resultObject = new org.json.JSONObject(o.toString());
+                    if (resultObject.optBoolean("success")) {
+                        cet_material_rack.requestFocus();
+                        cet_material_rack.setSelection(cet_material_rack.getText().length());
+                        ll_shangjia.setVisibility(View.VISIBLE);
+                        ll_end_data.setVisibility(View.GONE);
+                        ll_jiaoyan.setVisibility(View.GONE);
+
+                        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 LOCATIONS = dataObject.getString("LOCATIONS") == null ? "" : dataObject.getString("LOCATIONS");
+
+                        tv_liaojia.setText(shcode);
+                        tv_barcode_tailback.setText(barcode);
+                        tv_liaohao.setText(BAR_PRODCODE);
+                        tv_barremain.setText(BAR_REMAIN);
+                        tv_name.setText(PR_DETAIL);
+                        tv_guige.setText(PR_SPEC);
+                        tv_wuliaomorencangku.setText(PR_LOCATION);
+                        tv_current_position.setText(BAR_LOCATION);
+                        tv_aready_stored_in_storage_space.setText(LOCATIONS);
+
+                        if (cb_free_listing.isChecked()) {
+                            mBarcodeEditText.setText("");
+                            mBarcodeEditText.requestFocus();
+                        }else {
+                            mBarcodeEditText.setText("");
+                            cet_material_rack.setText("");
+                            cet_material_rack.requestFocus();
+                        }
+                    }
+                    CommonUtil.makeNotice();
+                }
+
+                @Override
+                public void onFail(int flag, String failStr) throws Exception {
+                    progressDialog.dismiss();
+                    CommonUtil.toastNoRepeat(mActivity, failStr);
+                    mResultTextView.setTextColor(Color.RED);
+                    ll_jiaoyan.setVisibility(View.VISIBLE);
+                    mResultTextView.setVisibility(View.VISIBLE);
+                    mResultTextView.setText(failStr);
+                    mBarcodeEditText.requestFocus();
+                    mBarcodeEditText.setText(null);
+                    if (!cb_free_listing.isChecked()) {
+                        cet_material_rack.setText(null);
+                    }
+                    ll_shangjia.setVisibility(View.GONE);
+                    ll_end_data.setVisibility(View.GONE);
+                    CommonUtil.makeNotice();
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void savekillAcceptCode(String barcode) {
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_FREE_SMART_END)
+                .method(Request.Method.POST)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                org.json.JSONObject resultObject = new org.json.JSONObject(o.toString());
+                if (resultObject.optBoolean("success")) {
+                    ll_jiaoyan.setVisibility(View.VISIBLE);
+                    mResultTextView.setVisibility(View.VISIBLE);
+                    ll_shangjia.setVisibility(View.GONE);
+                    ll_end_data.setVisibility(View.VISIBLE);
+                    mResultTextView.setText(null);
+                    mBarcodeEditText.setText(null);
+                    mResultTextView.setTextColor(getResources().getColor(R.color.blue));
+                    mResultTextView.setText("结束上架操作成功");
+                    cet_material_rack.requestFocus();
+                    cet_material_rack.setSelection(cet_material_rack.getText().length());
+
+                    JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+                    tv_end_data.setText(dataObject.toJSONString());
+                }
+                CommonUtil.makeNotice();
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                mResultTextView.setTextColor(getResources().getColor(R.color.red));
+                ll_jiaoyan.setVisibility(View.VISIBLE);
+                mResultTextView.setVisibility(View.VISIBLE);
+                mResultTextView.setText(failStr);
+                mBarcodeEditText.requestFocus();
+                mBarcodeEditText.setText(null);
+                cet_material_rack.setText(null);
+                ll_shangjia.setVisibility(View.GONE);
+                ll_end_data.setVisibility(View.GONE);
+                CommonUtil.makeNotice();
+            }
+        });
+
+    }
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent 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.barcode_info_collect_barcode_et) {
+                    mBarcodeEditText.setText(result);
+                    mBarcodeEditText.setSelection(result.length());
+                    if (!TextUtils.isEmpty(cet_material_rack.getText().toString())) {
+                        getBarAcceptCode(result,cet_material_rack.getText().toString().trim());
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+        if (!hidden) {
+            FunctionActivity.setTitle(getResources().getString(R.string.free_listing));
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+        }else {
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        }
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+    }
+}

+ 1 - 6
app/src/main/java/com/uas/xzc_electronic/fragment/IOCOutMakeMaterial.java

@@ -78,9 +78,6 @@ import butterknife.OnClick;
 public class IOCOutMakeMaterial extends BaseFragment {
 
     private static String TAG = "IOCOutMakeMaterial";
-
-
-
     private IOCOutMakeMaterialFuzzySearch fuzzySearchData;
     private MyArrayAdapter<String> autoStringAdapter;
     private StringRequest stringRequest, stringRequestPost;
@@ -118,8 +115,6 @@ public class IOCOutMakeMaterial extends BaseFragment {
         listInOut = root.findViewById(R.id.list_in_out);
         mMultipleTextView = root.findViewById(R.id.iocout_material_multiple_tv);
 
-
-
         mDbManager = new DBManager(getActivity());
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("出库单");
 
@@ -539,7 +534,7 @@ public class IOCOutMakeMaterial extends BaseFragment {
                                 dataBean.setPI_INOUTNO(JsonUtils.optStringNotNull(materialObject, "PI_INOUTNO"));
                                 dataBean.setPI_TITLE(JsonUtils.optStringNotNull(materialObject, "PI_TITLE"));
                                 dataBean.setPI_CARDCODE(JsonUtils.optStringNotNull(materialObject, "PI_CARDCODE"));
-                                dataBean.setPI_ID(JsonUtils.optLongNotNull(materialObject, "PI_ID"));
+                                dataBean.setPI_ID(JsonUtils.optLongNotNull(materialObject, "PD_WHCODE"));
                                 dataBean.setPI_STATUSCODE(JsonUtils.optStringNotNull(materialObject, "PI_STATUSCODE"));
                                 dataBean.setPI_PDASTATUS(JsonUtils.optStringNotNull(materialObject, "PI_PDASTATUS"));
 

+ 154 - 3
app/src/main/java/com/uas/xzc_electronic/fragment/IOCOutMakeMaterialOper.java

@@ -69,6 +69,7 @@ import com.uas.xzc_electronic.tools.VolleyUtil;
 import com.uas.xzc_electronic.util.CameraUtil;
 import com.uas.xzc_electronic.util.CommonUtil;
 import com.uas.xzc_electronic.util.Constants;
+import com.uas.xzc_electronic.util.FastjsonUtil;
 import com.uas.xzc_electronic.util.FileUtils;
 import com.uas.xzc_electronic.util.FragmentUtils;
 import com.uas.xzc_electronic.util.HttpCallback;
@@ -419,6 +420,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private TextView mCollectBarProdcodeTv;
     private CheckBox special_check;
     private TextView text_finishno;
+    private Button btn_startoutku, btn_stopoutku;
 
     @Override
     protected int getLayout() {
@@ -460,6 +462,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         ((FunctionActivity) getActivity()).setScanIvVisible(true);
 
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
+        btn_startoutku = root.findViewById(R.id.btn_startoutku);
+        btn_stopoutku =  root.findViewById(R.id.btn_stopoutku);
 
         mDbManager = new DBManager(getActivity().getApplicationContext());
         mOkHttpClient = new OkHttpClient.Builder()
@@ -524,8 +528,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         mOldAddress = SharedPreUtil.getString(mActivity, "printAddress", "");
         mPrintDpi = SharedPreUtil.getInt(mActivity, "printDpi", 203);
 
-
-
         special_check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
             @Override
             public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
@@ -585,6 +587,156 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 
             }
         });
+
+        btn_startoutku.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                startchuku();
+            }
+        });
+        btn_stopoutku.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                new AlertDialog.Builder(getActivity()).setTitle("提示")
+                        .setMessage("确认结束出库?")
+                        .setPositiveButton("确定", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                dialog.dismiss();
+                                stopchuku();
+                            }
+                        })
+                        .setNegativeButton("取消", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                dialog.dismiss();
+                            }
+                        })
+                        .show();
+            }
+        });
+    }
+
+    /**
+     * 开始出库
+     */
+    private void startchuku(){
+        progressDialog.show();
+        String url = GloableParams.ADDRESS_PAD_STARTPRODOUT+ "?id="+pi_id;
+        PdaApplication.mRequestQueue.cancelAll(TAG);
+        mCollectTypeRadioGroup.setEnabled(false);
+        jsonRequest = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject jsonObject) {
+                progressDialog.dismiss();
+                try {
+                    Log.e("jsonObject",jsonObject.toString());
+                    JSONObject dataObject = jsonObject.optJSONObject("data");
+                    JSONObject dataData = dataObject.optJSONObject("next");
+                    Object log = dataObject.get("log");
+                    String bar_prodcode = dataData.getString("PD_PRODCODE");//编号
+                    String pr_detail = dataData.getString("PR_DETAIL");//名称
+                    String pr_spec = dataData.getString("PR_SPEC");//规格
+                    String pd_outqty = dataData.getString("PD_OUTQTY");//出库数量
+                    String pd_restqty = dataData.getString("PD_RESTQTY");
+                    String pr_zxbzs = dataData.getString("PR_ZXBZS");
+                    String bar_remain = dataData.getString("BAR_REMAIN");
+                    String dc = dataData.getString("DC");
+                    mCollectResultTextView.setVisibility(View.VISIBLE);
+                    mCollectResultTextView.setText(log.toString());
+                    mMaterialInforTextView.setText("物料:"+bar_prodcode
+                            +"名称:"+pr_detail
+                            +"规格:"+pr_spec
+                            +"未备料数:"+pd_restqty
+                            +"批数量:"+bar_remain
+                            +"DC:"+dc
+                    );
+
+
+                    getNextMaterialInfo();
+                    //                    JSONObject messageObject = dataObject.getJSONObject("barcode");
+                    CommonUtil.toastNoRepeat(mActivity, "货架点亮成功");
+                    etBarCode.requestFocus();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError volleyError) {
+                progressDialog.dismiss();
+                if (getActivity() != null) {
+                    mCollectTypeRadioGroup.setEnabled(true);
+                    CommonUtil.editTextGetFocus(etBarCode);
+                    String errorToast = CommonUtil.showErrorToast(volleyError, true);
+                    mCollectResultTextView.setVisibility(View.VISIBLE);
+                    mCollectResultTextView.setTextColor(getResources().getColor(R.color.red));
+                    mCollectResultTextView.setText(errorToast);
+                    etBarCode.requestFocus();
+                }
+
+            }
+        }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+        };
+        jsonRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        jsonRequest.setTag(TAG);
+        PdaApplication.mRequestQueue.add(jsonRequest);
+    }
+    /**
+     * 结束出库
+     */
+    private void stopchuku(){
+        progressDialog.show();
+        String url = GloableParams.ADDRESS_COMMON_ENDPRODOUT+ "?id="+pi_id;
+        PdaApplication.mRequestQueue.cancelAll(TAG);
+        mCollectTypeRadioGroup.setEnabled(false);
+        jsonRequest = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject jsonObject) {
+                progressDialog.dismiss();
+                try {
+                    Log.e("jsonObject",jsonObject.toString());
+                    //                    JSONObject dataObject = jsonObject.optJSONObject("data");
+                    String data = FastjsonUtil.getText(jsonObject.toString(), "data");
+
+                    mCollectResultTextView.setVisibility(View.VISIBLE);
+                    mCollectResultTextView.setTextColor(getResources().getColor(R.color.blue));
+                    mCollectResultTextView.setText(data.toString());
+                    //                    JSONObject messageObject = dataObject.getJSONObject("barcode");
+                    CommonUtil.toastNoRepeat(mActivity, data.toString());
+                    etBarCode.requestFocus();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError volleyError) {
+                progressDialog.dismiss();
+                if (getActivity() != null) {
+                    mCollectTypeRadioGroup.setEnabled(true);
+                    CommonUtil.editTextGetFocus(etBarCode);
+                    String errorToast = CommonUtil.showErrorToast(volleyError, true);
+                    mCollectResultTextView.setVisibility(View.VISIBLE);
+                    mCollectResultTextView.setTextColor(getResources().getColor(R.color.red));
+                    mCollectResultTextView.setText(errorToast);
+                    etBarCode.requestFocus();
+                }
+
+            }
+        }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+        };
+        jsonRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        jsonRequest.setTag(TAG);
+        PdaApplication.mRequestQueue.add(jsonRequest);
     }
 
     /**
@@ -2275,7 +2427,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             return;
         }
 
-
         boolean isExist = false;
         for (int i = 0; i < allBarcodeIo.size(); i++) {
             if (pi_id.equals(allBarcodeIo.get(i).getLBI_PIID() + "") && pd_whcode.equals(allBarcodeIo.get(i).getLBI_WHCODE())

+ 10 - 1
app/src/main/java/com/uas/xzc_electronic/fragment/IndexWareHouseContentFragment.java

@@ -166,7 +166,16 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
-
+                case GloableParams.GRIDNAME_SMART_SHELVES://自由上架
+                    fragment = new FreeListingFragment();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
+                case GloableParams.LIGHT_RELEASE_THE_ALARM:     //解除警报
+                    fragment = new ReleaseAlarmFragment();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
 
             }
             if (mFragment != null) {

+ 1 - 0
app/src/main/java/com/uas/xzc_electronic/fragment/LoginFragment.java

@@ -68,6 +68,7 @@ public class LoginFragment extends BaseFragment implements AdapterView.OnItemSel
             switch (msg.what) {
                 case VolleyUtil.SUCCESS_SUCCESS:
                     String userName = userEditText.getText().toString().trim();
+                    SharedPreUtil.saveString(mActivity, SharedPreUtil.KEY_USERNAME, userName);
                     String pwd = null;
                     if (rmbCheckBox.isChecked()) {
                         pwd = pwdEditText.getText().toString().trim();

+ 169 - 0
app/src/main/java/com/uas/xzc_electronic/fragment/PositionInquiryFragment.java

@@ -0,0 +1,169 @@
+package com.uas.xzc_electronic.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.view.KeyEvent;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
+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.xzc_electronic.R;
+import com.uas.xzc_electronic.adapter.ReportDetailAdapter;
+import com.uas.xzc_electronic.bean.GroundingBean;
+import com.uas.xzc_electronic.global.GloableParams;
+import com.uas.xzc_electronic.util.CommonUtil;
+import com.uas.xzc_electronic.util.HttpCallback;
+import com.uas.xzc_electronic.util.HttpParams;
+import com.uas.xzc_electronic.util.VolleyRequest;
+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 List<GroundingBean> mFilterStorageInBeans;
+    private RecyclerView rv_content;
+    private ReportDetailAdapter reportDetailAdapter;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_position_inquiry;
+    }
+
+    @Override
+    protected void initViews() {
+//        ((FunctionActivity) mActivity).setScanIvVisible(true);
+        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("上架任务查询");
+        rv_content = mActivity.findViewById(R.id.rv_data);
+    }
+
+    @Override
+    protected void initEvents() {
+        mFilterStorageInBeans = new ArrayList<>();
+        rv_content.setLayoutManager(new LinearLayoutManager(mActivity));
+        reportDetailAdapter = new ReportDetailAdapter();
+        rv_content.setAdapter(reportDetailAdapter);
+
+        saveBarAcceptCode();
+    }
+
+    @Override
+    protected void initDatas() {
+
+    }
+    private void saveBarAcceptCode() {
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_COMMON_GETLOCATIONPROD)
+                .method(Request.Method.GET)
+                .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) {
+                        for(Object index:dataArray){
+                            JSONObject data = (JSONObject) index;
+                            GroundingBean groundingBean = new GroundingBean();
+                            groundingBean.setPB_BARCODE(data.getString( "PB_BARCODE"));
+                            groundingBean.setPB_LOCATION(data.getString( "PB_LOCATION"));
+                            groundingBean.setPB_PRODCODE(data.getString( "PB_PRODCODE"));
+                            groundingBean.setPR_DETAIL(data.getString( "PR_DETAIL"));
+                            groundingBean.setPR_SPEC(data.getString( "PR_SPEC"));
+                            groundingBean.setPB_SHELFCODE(data.getString( "PB_SHELFCODE"));
+                            mFilterStorageInBeans.add(groundingBean);
+                        }
+                        reportDetailAdapter.setNewData(mFilterStorageInBeans);
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    progressDialog.dismiss();
+                }
+
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                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;
+    }
+
+}

+ 141 - 0
app/src/main/java/com/uas/xzc_electronic/fragment/ReleaseAlarmFragment.java

@@ -0,0 +1,141 @@
+package com.uas.xzc_electronic.fragment;
+
+import android.text.TextUtils;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.uas.xzc_electronic.R;
+import com.uas.xzc_electronic.activity.FunctionActivity;
+import com.uas.xzc_electronic.global.GloableParams;
+import com.uas.xzc_electronic.listener.MyEditorActionListener;
+import com.uas.xzc_electronic.util.CommonUtil;
+import com.uas.xzc_electronic.util.HttpCallback;
+import com.uas.xzc_electronic.util.HttpParams;
+import com.uas.xzc_electronic.util.VolleyRequest;
+import com.uas.xzc_electronic.view.ClearableEditText;
+
+
+public
+        /**
+         * Created by sw on 2024-12-31
+         */
+class ReleaseAlarmFragment extends BaseFragment{
+
+    private ClearableEditText cet_material_rack;
+    private Button bt_release_the_alarm;
+    private TextView tv_result;
+    private LinearLayout ll_result;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_release_aliarm;
+    }
+
+    @Override
+    protected void initViews() {
+        FunctionActivity.setTitle(getResources().getString(R.string.release_the_alarm));
+        cet_material_rack = root.findViewById(R.id.cet_material_rack);
+        bt_release_the_alarm = root.findViewById(R.id.bt_release_the_alarm);
+        tv_result = root.findViewById(R.id.tv_result);
+        ll_result = root.findViewById(R.id.ll_result);
+    }
+
+    @Override
+    protected void initEvents() {
+        //料架回车
+        CommonUtil.setEditorActionListener(cet_material_rack, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                if (!text.isEmpty()&&!cet_material_rack.getText().toString().isEmpty()){
+                    materialRackCode();
+                }
+            }
+        });
+
+        bt_release_the_alarm.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                materialRackCode();
+            }
+        });
+    }
+
+    private void materialRackCode() {
+        String materialRack = cet_material_rack.getText().toString().trim();
+        if (TextUtils.isEmpty(materialRack)) {
+            CommonUtil.toastNoRepeat(mActivity, getResources().getString(R.string.Please_enter_the_material_rack));
+            cet_material_rack.requestFocus();
+            return;
+        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_RELEASE_ALARM)
+                .method(Request.Method.POST)
+                .addParam("shcode",materialRack)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                org.json.JSONObject resultObject = new org.json.JSONObject(o.toString());
+                ll_result.setVisibility(View.VISIBLE);
+                if (resultObject.optBoolean("success")) {
+                    tv_result.setTextColor(getResources().getColor(R.color.blue));
+                    tv_result.setText(getResources().getText(R.string.release_the_alarm) + ":" + materialRack + getResources().getText(R.string.alarm_successful));
+                    cet_material_rack.setText("");
+                }else {
+                    tv_result.setTextColor(getResources().getColor(R.color.red));
+                    tv_result.setText(getResources().getText(R.string.release_the_alarm) + ":" + materialRack + getResources().getText(R.string.alarm_successful));
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                cet_material_rack.setText(null);
+                cet_material_rack.requestFocus();
+                ll_result.setVisibility(View.VISIBLE);
+                tv_result.setTextColor(getResources().getColor(R.color.red));
+                tv_result.setText(failStr);
+            }
+        });
+    }
+
+    @Override
+    protected void initDatas() {
+
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+        //        if (!hidden) {
+        //            FunctionActivity.setTitle(getResources().getString(R.string.free_listing));
+        //            ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+        //        }else {
+        //            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        //        }
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        //        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+    }
+
+
+}

+ 1 - 1
app/src/main/java/com/uas/xzc_electronic/fragment/VersionUpgradeFragment.java

@@ -185,7 +185,7 @@ public class VersionUpgradeFragment extends BaseFragment implements ProgressResp
                         Intent intent = new Intent(Intent.ACTION_VIEW);
                         if (Build.VERSION.SDK_INT >= 24) {
                             Uri apkUri = FileProvider.getUriForFile(mActivity,
-                                    "com.uas.pda_smart_sa.fileprovider", apk);
+                                    "com.uas.xzc_electronic", apk);
                             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                             intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
                             intent.setDataAndType(apkUri, "application/vnd.android.package-archive");

+ 45 - 2
app/src/main/java/com/uas/xzc_electronic/global/GloableParams.java

@@ -263,6 +263,16 @@ public class GloableParams {
     public static String ADDRESS_DOCUMENTLIBRARY_MAKESNLIST;
     public static String ADDRESS_DOCUMENTLIBRARY_MAKESNPACKAGE;
 
+    public static String ADDRESS_PAD_STARTPRODOUT; //出库采集--开始出库
+    public static String ADDRESS_COMMON_ENDPRODOUT; //出库采集--结束出库
+
+    public static String ADDRESS_CHECK_SHELF;    //自由上架料号enter
+    public static String ADDRESS_FREE_SMART_START;    //自由上架 条码号enter/上架
+    public static String ADDRESS_FREE_SMART_END;    //自由上架 结束上架
+
+    public static String ADDRESS_COMMON_GETLOCATIONPROD;
+
+    public static String ADDRESS_RELEASE_ALARM;    // 解除报警
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -749,7 +759,22 @@ public class GloableParams {
     //拆箱序列号查询
     private static final String ADDRESSTAIL_MAKESNPACKAGE = "/api/pda/receiving/makeSnPackage.action";
 
+    //开始出库
+    private static final String ADDRESSTAIL_PAD_STARTPRODOUT = "/api/pda/outMaterial/startProdOut.action";
+    //结束出库
+    private static final String ADDRESSTAIL_PAD_ENDPRODOUT = "/api/pda/outMaterial/endProdOut.action";
+
+    //料架ENTER事件
+    private static final String ADDRESSTAIL_CHECK_SHELF = "/api/pda/transfer/checkShelf.action";
+    //条码号enter/上架按钮
+    private static final String ADDRESSTAIL_FREE_SMART_START = "/api/pda/transfer/freeSmartStart.action";
+    //结束上架
+    private static final String ADDRESSTAIL_FREE_SMART_END = "/api/pda/transfer/freeSmartEnd.action";
+
+    private static final String ADDRESSTAIL_PAD_GETLOCATIONPROD = "/api/pda/transfer/getLocationProd.action";
 
+    //解除报警
+    private static final String ADDRESSAIL_RELEASE_ALARM = "/api/pda/transfer/releaseAlarm.action";
 
 
     /***********************************************************************************************/
@@ -806,6 +831,8 @@ public class GloableParams {
     public static final String GRIDNAME_FINISHED_MOVE_THE_CONTAINER = "移箱";
     public static final String GRIDNAME_FINISHED_DISMOUNTING = "拆装箱";
     public static final String GRIDNAME_FINISHED_INQUIRE = "箱号查询";
+    public static final String GRIDNAME_SMART_SHELVES = "自由上架";
+    public static final String LIGHT_RELEASE_THE_ALARM = "解除报警";
     public static final String[] storageGridNames = {
             GRIDNAME_GOOD_SEARCH,
             GRIDNAME_BATCH_OPRATION,
@@ -818,7 +845,10 @@ public class GloableParams {
             GRIDNAME_FINISHED_PRODUCT_OUTBOUND,
 //            GRIDNAME_FINISHED_MOVE_THE_CONTAINER,
             GRIDNAME_FINISHED_DISMOUNTING,
-            GRIDNAME_FINISHED_INQUIRE};
+            GRIDNAME_FINISHED_INQUIRE,
+            GRIDNAME_SMART_SHELVES,
+            LIGHT_RELEASE_THE_ALARM
+    };
     public static final int[] storageGridImgs = {
             R.drawable.storage_good_search,
             R.drawable.storage_bach_operation,
@@ -830,7 +860,10 @@ public class GloableParams {
             R.drawable.ic_finished_product_outbound,
 //            R.drawable.move_the_container,
             R.drawable.ic_dismounting,
-            R.drawable.ic_inquire};
+            R.drawable.ic_inquire,
+            R.drawable.iv_shelves,
+            R.drawable.jiechubaojing
+    };
     //DETAIL:搜索备料单号,下拉列表
     public static final String SPINNER_PREPARE_SEARCH = "搜索备料单号";
     public static final String SPINNER_MAKECODE_SEARCH = "搜索制造单号";
@@ -1203,6 +1236,16 @@ public class GloableParams {
 
         GloableParams.ADDRESS_DOCUMENTLIBRARY_MAKESNPACKAGE= uriHead + GloableParams.ADDRESSTAIL_MAKESNPACKAGE;
 
+        GloableParams.ADDRESS_PAD_STARTPRODOUT = uriHead + GloableParams.ADDRESSTAIL_PAD_STARTPRODOUT;
+        GloableParams.ADDRESS_COMMON_ENDPRODOUT = uriHead + GloableParams.ADDRESSTAIL_PAD_ENDPRODOUT;
+
+        GloableParams.ADDRESS_CHECK_SHELF = uriHead + GloableParams.ADDRESSTAIL_CHECK_SHELF;
+        GloableParams.ADDRESS_FREE_SMART_START = uriHead + GloableParams.ADDRESSTAIL_FREE_SMART_START;
+        GloableParams.ADDRESS_FREE_SMART_END = uriHead + GloableParams.ADDRESSTAIL_FREE_SMART_END;
+
+        GloableParams.ADDRESS_COMMON_GETLOCATIONPROD = uriHead + GloableParams.ADDRESSTAIL_PAD_GETLOCATIONPROD;
+
+        GloableParams.ADDRESS_RELEASE_ALARM = uriHead + GloableParams.ADDRESSAIL_RELEASE_ALARM;
 
     }
 }

+ 2 - 1
app/src/main/java/com/uas/xzc_electronic/tools/SharedPreUtil.java

@@ -20,7 +20,8 @@ public class SharedPreUtil {
     public static final String KEY_SCMAKE_PREPARE = "key_scmake_prepare";
     //飞达上料,备料单缓存
     public static final String KEY_SCMAKE_FEEDER = "key_scmake_feeder";
-
+    //账号名称
+    public static final String KEY_USERNAME = "username";
 
     //清除IP和PORT的所有缓存
     public static void removeAll(Context pContext) {

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

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

BIN
app/src/main/res/drawable-xhdpi/iv_shelves.png


BIN
app/src/main/res/drawable-xhdpi/jiechubaojing.png


+ 9 - 0
app/src/main/res/drawable/bg_stops_enabled.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <solid android:color="@color/yellow_stop"/>
+            <corners android:radius="5dip"/>
+        </shape>
+    </item>
+</layer-list>

+ 9 - 0
app/src/main/res/drawable/bg_stops_focus.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <solid android:color="@color/yellow_light"/>
+            <corners android:radius="5dip"/>
+        </shape>
+    </item>
+</layer-list>

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

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/bg_stops_focus"/>
+    <item android:state_enabled="true" android:drawable="@drawable/bg_stops_enabled"/>
+    <item android:state_enabled="false" android:drawable="@drawable/bg_button_invalid"/>
+    <item android:drawable="@drawable/bg_button_normal"/>
+</selector>

+ 387 - 0
app/src/main/res/layout/fragment_free_listing.xml

@@ -0,0 +1,387 @@
+<?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">
+
+    <LinearLayout
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <CheckBox
+            android:id="@+id/cb_free_listing"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+
+            android:layout_marginTop="5dp"
+            android:layout_marginBottom="5dp"
+            android:text="@string/continuously_listed"
+            android:textSize="16sp"
+            />
+
+        <LinearLayout
+            android:layout_marginTop="5dp"
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/material_in_collect_location_tv"
+                android:layout_width="70dp"
+                android:layout_height="match_parent"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="@string/material_rack"
+                android:textColor="@color/body_text_1"
+                android:textSize="16sp"  />
+
+            <com.uas.xzc_electronic.view.ClearableEditText
+                android:id="@+id/cet_material_rack"
+                style="@style/EditTextStyle"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:hint="@string/Please_enter_the_material_rack"
+                android:background="@drawable/shape_msg_block"
+                android:lines="1"
+                android:maxLines="1"
+                android:textColor="@color/black"
+                android:singleLine="true"/>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_marginTop="@dimen/dp_10"
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:layout_width="70dp"
+                android:layout_height="match_parent"
+                android:gravity="center"
+                android:padding="6dp"
+                android:text="@string/string_barcode"
+                android:textColor="@color/body_text_1"
+                android:textSize="16sp" />
+
+            <com.uas.xzc_electronic.view.ClearableEditText
+                android:id="@+id/barcode_info_collect_barcode_et"
+                    style="@style/EditTextStyle"
+                    android:background="@drawable/shape_msg_block"
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:hint="@string/please_collect_barcode"
+                    android:focusable="true"
+                    android:focusableInTouchMode="true"
+                    android:imeOptions="actionSend"
+                    android:textColor="@color/black" />
+            </LinearLayout>
+
+    </LinearLayout>
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <Button
+            android:id="@+id/barcode_info_collect_confirm_btn"
+            style="@style/ButtonStyle"
+            android:layout_marginTop="16dp"
+            android:text="上架"
+            android:layout_weight="1"/>
+        <Button
+            android:id="@+id/btn_kill"
+            style="@style/ButtonStyle"
+            android:layout_marginTop="16dp"
+            android:text="结束上架"
+            android:layout_weight="1"/>
+
+    </LinearLayout>
+
+    <LinearLayout
+        tools:visibility="visible"
+        android:visibility="gone"
+        android:id="@+id/ll_shangjia"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_marginTop="10dp"
+        android:background="@drawable/shape_msg_block"
+        android:padding="10dp"
+        >
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="2dp"
+            >
+
+            <TextView
+                android:id="@+id/tv_material_rack"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/material_rack"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:id="@+id/tv_material_rack_flag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:text=":"
+                android:layout_toEndOf="@+id/tv_material_rack"
+                />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:layout_toEndOf="@+id/tv_material_rack_flag"
+               android:id="@+id/tv_liaojia"
+                />
+
+            <TextView
+                android:layout_toStartOf="@+id/tv_barcode_tailback"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/text_barcode_tailback"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:id="@+id/tv_barcode_tailback"
+                android:layout_alignParentEnd="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                />
+
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="2dp"
+            >
+
+            <TextView
+                android:id="@+id/tv_procode_tailback"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/text_procode_tailback"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:id="@+id/tv_liaohao"
+                android:layout_toEndOf="@+id/tv_procode_tailback"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:layout_toStartOf="@+id/tv_barremain"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/text_barremain"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:id="@+id/tv_barremain"
+                android:layout_alignParentEnd="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                />
+
+        </RelativeLayout>
+
+        <LinearLayout
+            android:layout_marginTop="2dp"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/pr_detail"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:id="@+id/tv_name"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                />
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_marginTop="2dp"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/pr_spec"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:id="@+id/tv_guige"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                />
+
+        </LinearLayout>
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="2dp"
+            >
+
+            <TextView
+                android:id="@+id/tv_default_warehouse_for_materials"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/Default_warehouse_for_materials"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:id="@+id/tv_default_warehouse_for_materials_flag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:text=":"
+                android:layout_toEndOf="@+id/tv_default_warehouse_for_materials"
+                />
+
+            <TextView
+                android:id="@+id/tv_wuliaomorencangku"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:layout_toEndOf="@+id/tv_default_warehouse_for_materials_flag"
+                />
+
+            <TextView
+                android:layout_toStartOf="@+id/tv_current_position_flag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/Current_position"
+                android:textSize="12sp"
+                />
+
+            <TextView
+                android:id="@+id/tv_current_position_flag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:text=":"
+                android:layout_toStartOf="@+id/tv_current_position"
+                />
+
+            <TextView
+                android:id="@+id/tv_current_position"
+                android:layout_alignParentEnd="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                />
+
+        </RelativeLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:layout_marginTop="2dp"
+            >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/aready_stored_in_storage_space"
+                android:textSize="12sp"
+                />
+
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:text=":"
+                />
+
+            <TextView
+                android:id="@+id/tv_aready_stored_in_storage_space"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:id="@+id/ll_end_data"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_marginTop="@dimen/spacing_big"
+        android:background="@drawable/shape_msg_block"
+        android:visibility="gone"
+        tools:visibility="visible"
+        android:padding="10dp"
+        >
+
+        <TextView
+            android:id="@+id/tv_end_data"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:visibility="gone"
+            tools:visibility="visible"
+            tools:text="料架:xxxx,条码:xxxx 结束上架成功" />
+
+    </LinearLayout>
+
+
+    <LinearLayout
+        android:id="@+id/ll_jiaoyan"
+        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:visibility="gone"
+        tools:visibility="visible"
+        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;名称规格:瓶子" />
+
+
+    </LinearLayout>
+
+
+</LinearLayout>

+ 27 - 3
app/src/main/res/layout/fragment_iocout_make_material_oper.xml

@@ -1,7 +1,8 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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"
     tools:context="com.uas.xzc_electronic.fragment.IOCOutMakeMaterialOper">
     <!--    <include
             android:id="@+id/include_menuactionbar"
@@ -9,7 +10,8 @@
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
         android:orientation="vertical">
         <!--no use-->
         <LinearLayout
@@ -360,5 +362,27 @@
 
         </ScrollView>
     </LinearLayout>
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <Button
+            android:id="@+id/btn_startoutku"
+            style="@style/ButtonStyle"
+            android:layout_width="match_parent"
+            android:layout_margin="12dp"
+            android:layout_weight="1"
+            android:text="开始出库"
+            />
+        <Button
+            android:id="@+id/btn_stopoutku"
+            style="@style/ButtonStyle"
+            android:layout_width="match_parent"
+            android:layout_margin="12dp"
+            android:layout_weight="1"
+            android:text="结束出库"
+            android:background="@drawable/bgstop_button"
+            />
+    </LinearLayout>
 
-</RelativeLayout>
+</LinearLayout>

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

@@ -0,0 +1,16 @@
+<?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">
+
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/rv_data"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1" />
+
+</LinearLayout>

+ 94 - 0
app/src/main/res/layout/fragment_release_aliarm.xml

@@ -0,0 +1,94 @@
+<?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:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    >
+
+    <LinearLayout
+        android:layout_marginTop="35dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="30dp"
+        android:layout_marginEnd="30dp"
+        >
+
+        <TextView
+            android:id="@+id/material_in_collect_location_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:gravity="center"
+            android:padding="10dp"
+            android:text="@string/material_rack"
+            android:textColor="@color/red"
+            android:textSize="16sp"  />
+
+        <com.uas.xzc_electronic.view.ClearableEditText
+            android:id="@+id/cet_material_rack"
+            style="@style/EditTextStyle"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:hint="@string/Please_enter_the_material_rack"
+            android:background="@drawable/shape_msg_block"
+            android:lines="1"
+            android:maxLines="1"
+            android:textColor="@color/black"
+            android:singleLine="true"/>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_marginTop="30dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
+        >
+
+        <Button
+            android:id="@+id/bt_release_the_alarm"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:textSize="16sp"
+            android:textColor="@color/white"
+            android:background="@drawable/bg_button"
+            android:text="@string/release_the_alarm"
+            android:layout_weight="4"/>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:id="@+id/ll_result"
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
+        android:background="@drawable/shape_msg_block"
+        android:visibility="gone"
+        tools:visibility="visible"
+        android:padding="10dp">
+
+        <TextView
+            android:id="@+id/tv_result"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="5dp"
+            android:layout_marginStart="5dp"
+            android:layout_marginEnd="5dp"
+            android:layout_marginBottom="5dp"
+            tools:visibility="visible"
+            />
+
+    </LinearLayout>
+
+
+
+
+
+</LinearLayout>

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

@@ -0,0 +1,137 @@
+<?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:paddingLeft="15dp"
+    android:paddingTop="10dp"
+    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_tiaomahao"
+            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="10dp"
+        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>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        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>
+
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="0.5dp"
+        android:layout_marginTop="10dp"
+        android:background="@color/me_menu_item_press" />
+
+</LinearLayout>
+

+ 5 - 0
app/src/main/res/values/color.xml

@@ -100,4 +100,9 @@
     <color name="menu_item_press">#DFDEDE</color>
 
     <color name="titleBlue">#BF2F95DD</color> <!-- 青蓝色 -->
+    <color name="yellow_stop">#FFC107</color>
+    <color name="me_menu_item_press">#DFDEDE</color>
+
+
+
 </resources>

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

@@ -433,4 +433,18 @@
         <item>重新采集</item>
         <item>未提交列表</item>
     </string-array>
+
+    <string name="free_listing">自由上架</string>
+    <string name="continuously_listed">连续上架</string>
+    <string name="material_rack">料架</string>
+    <string name="Please_enter_the_material_rack">请输入料架</string>
+    <string name="Please_enter_the_barcode_number">请输入条码号</string>
+    <string name="Shelf_validation_successful">料架效验成功</string>
+    <string name="Default_warehouse_for_materials">物料默认仓库</string>
+    <string name="Current_position">目前仓位</string>
+    <string name="aready_stored_in_storage_space">已经存放仓位</string>
+
+    <string name="release_the_alarm">解除警报</string>
+    <string name="alarm_successful">报警成功</string>
+
 </resources>

+ 3 - 3
build.gradle

@@ -50,12 +50,12 @@ task clean(type: Delete) {
 
 ext {
     android = [
-            minSdkVersion    : 16,
+            minSdkVersion    : 17,
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 10,
-            versionName      : "v1.0"
+            versionCode      : 13,
+            versionName      : "v1.0.2"
     ]
 
     depsVersion = [