浏览代码

删除多余代码文件

guilin 1 年之前
父节点
当前提交
ad75d5ba04
共有 36 个文件被更改,包括 10 次插入9080 次删除
  1. 1 130
      app/src/main/AndroidManifest.xml
  2. 2 2
      app/src/main/java/com/fxy/adapter/GoodsAdapter.java
  3. 0 578
      app/src/main/java/com/fxy/fms/check/CheckGoodsDetailsMainActivity.java
  4. 0 510
      app/src/main/java/com/fxy/fms/check/CheckGoodsMainActivity.java
  5. 0 476
      app/src/main/java/com/fxy/fms/check/CheckStartMainActivity.java
  6. 0 569
      app/src/main/java/com/fxy/fms/check/WaitCheckMainActivity.java
  7. 0 599
      app/src/main/java/com/fxy/fms/putIn/PutAwayMainActivity.java
  8. 0 484
      app/src/main/java/com/fxy/fms/putIn/TallyPictureMainActivity.java
  9. 0 659
      app/src/main/java/com/fxy/fms/putIn/TallyStartMainActivity.java
  10. 0 943
      app/src/main/java/com/fxy/fms/putIn/TallyVolumeMainActivity.java
  11. 0 72
      app/src/main/java/com/fxy/fms/putIn/bean/InboundBean.java
  12. 0 641
      app/src/main/java/com/fxy/fms/putOut/StorageAddMainActivity.java
  13. 0 620
      app/src/main/java/com/fxy/fms/putOut/StorageCancelMainActivity.java
  14. 0 448
      app/src/main/java/com/fxy/fms/putOut/StorageChecklistMainActivity.java
  15. 0 377
      app/src/main/java/com/fxy/fms/putOut/StorageFinishMainActivity.java
  16. 0 623
      app/src/main/java/com/fxy/fms/putOut/StorageStartMainActivity.java
  17. 1 1
      app/src/main/java/com/fxy/fms/logic/ViewLogic.java
  18. 0 1
      app/src/main/java/com/fxy/main/fragment/HomePagerFragment.java
  19. 1 1
      app/src/main/java/com/fxy/putIn/CheckGoodsDetailsMainActivity.java
  20. 0 1
      app/src/main/java/com/fxy/putIn/CheckGoodsMainActivity.java
  21. 1 4
      app/src/main/java/com/fxy/putIn/TallyMainActivity.java
  22. 0 2
      app/src/main/java/com/fxy/putOut/QualityInspectionMainActivity.java
  23. 4 15
      app/src/main/java/com/fxy/workOrder/WorkOrderOptMainActivity.java
  24. 0 57
      app/src/main/res/layout/activity_fms_check_goods.xml
  25. 0 377
      app/src/main/res/layout/activity_fms_check_goods_details.xml
  26. 0 25
      app/src/main/res/layout/activity_fms_check_start.xml
  27. 0 33
      app/src/main/res/layout/activity_fms_check_wait.xml
  28. 0 108
      app/src/main/res/layout/activity_fms_put_away.xml
  29. 0 130
      app/src/main/res/layout/activity_fms_storage_add.xml
  30. 0 93
      app/src/main/res/layout/activity_fms_storage_cancel.xml
  31. 0 18
      app/src/main/res/layout/activity_fms_storage_check_list.xml
  32. 0 103
      app/src/main/res/layout/activity_fms_storage_finish.xml
  33. 0 81
      app/src/main/res/layout/activity_fms_storage_start.xml
  34. 0 96
      app/src/main/res/layout/activity_fms_tally_picture.xml
  35. 0 124
      app/src/main/res/layout/activity_fms_tally_start.xml
  36. 0 79
      app/src/main/res/layout/activity_fms_tally_volume.xml

+ 1 - 130
app/src/main/AndroidManifest.xml

@@ -100,71 +100,13 @@
             android:screenOrientation="portrait"
             tools:ignore="LockedOrientationActivity" />
 
-        <activity
-            android:name="com.fxy.putIn.SignInMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity" />
-        <activity
-            android:name="com.fxy.putIn.TallyMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity" />
-        <activity
-            android:name="com.fxy.putIn.CloseTrayMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
 
         <activity
-            android:name="com.fxy.putIn.PutAwayMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity" />
-        <activity
-            android:name="com.fxy.repertory.ShiftMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-
-        <activity
-            android:name="com.fxy.repertory.CompleteShiftMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity" />
-
-
-        <activity
-            android:name="com.fxy.putOut.StartPickupMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity" />
-
-        <activity
-            android:name="com.fxy.putOut.PickupMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity" />
-
-
-        <activity
-            android:name="com.fxy.putOut.CloseContainerMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity" />
-
-        <activity
-        android:name="com.fxy.putOut.TurnOverMainActivity"
-        android:windowSoftInputMode="stateHidden|adjustPan"
-        android:screenOrientation="portrait"
-        tools:ignore="LockedOrientationActivity" />
-        <activity
-            android:name="com.fxy.putOut.InterceptMainActivity"
+            android:name="com.fxy.putIn.TallyMainActivity"
             android:windowSoftInputMode="stateHidden|adjustPan"
             android:screenOrientation="portrait"
             tools:ignore="LockedOrientationActivity" />
 
-
         <activity
             android:name="com.fxy.mine.ScanSettingActivity"
             android:windowSoftInputMode="stateHidden|adjustPan"
@@ -176,77 +118,6 @@
             android:screenOrientation="portrait"
             tools:ignore="LockedOrientationActivity"/>
 
-        <activity
-            android:name="com.fxy.fms.putIn.TallyStartMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-        <activity
-            android:name="com.fxy.fms.putIn.TallyPictureMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-        <activity
-            android:name="com.fxy.fms.putIn.TallyVolumeMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-        <activity
-            android:name="com.fxy.fms.check.WaitCheckMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-        <activity
-            android:name="com.fxy.fms.check.CheckStartMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-        <activity
-            android:name="com.fxy.fms.check.CheckGoodsMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-        <activity
-            android:name="com.fxy.fms.check.CheckGoodsDetailsMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-
-        <activity
-            android:name="com.fxy.fms.putOut.StorageCancelMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-
-        <activity
-            android:name="com.fxy.fms.putOut.StorageStartMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-
-
-        <activity
-            android:name="com.fxy.fms.putOut.StorageFinishMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-        <activity
-            android:name="com.fxy.fms.putOut.StorageAddMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-
-        <activity
-            android:name="com.fxy.fms.putIn.PutAwayMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-        <activity
-            android:name="com.fxy.fms.putOut.StorageChecklistMainActivity"
-            android:windowSoftInputMode="stateHidden|adjustPan"
-            android:screenOrientation="portrait"
-            tools:ignore="LockedOrientationActivity"/>
-
         <activity
             android:name="com.fxy.mine.PictureSelectorActivity"
             android:windowSoftInputMode="stateHidden|adjustPan"

+ 2 - 2
app/src/main/java/com/fxy/adapter/GoodsAdapter.java

@@ -10,7 +10,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
 import com.elvishew.xlog.XLog;
 import com.fxy.R;
 import com.fxy.baselibrary.views.dialog.RxDialogZoomImageView;
-import com.fxy.fms.logic.ViewLogic;
+import com.fxy.logic.ViewLogic;
 
 import org.json.JSONObject;
 
@@ -41,7 +41,7 @@ public  class GoodsAdapter extends BaseQuickAdapter<JSONObject, BaseViewHolder>
             holder.setGone(R.id.ll_right_icon,true);
 
             ImageView ivGoodsImg =  (ImageView)holder.getView(R.id.iv_goods_img);
-            new ViewLogic.GlideImageLoder(mContext,ivGoodsImg,image_url);
+            new  ViewLogic.GlideImageLoder(mContext,ivGoodsImg,image_url);
             ivGoodsImg.setOnClickListener(new View.OnClickListener(){
                 @Override
                 public void onClick(View v) {

+ 0 - 578
app/src/main/java/com/fxy/fms/check/CheckGoodsDetailsMainActivity.java

@@ -1,578 +0,0 @@
-package com.fxy.fms.check;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.support.v7.widget.RecyclerView;
-import android.view.KeyEvent;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-import android.widget.Switch;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.elvishew.xlog.XLog;
-import com.google.gson.Gson;
-import com.google.zxing.Result;
-import com.luck.picture.lib.config.PictureConfig;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.R;
-import com.fxy.common.PictureSelectorUpload;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class CheckGoodsDetailsMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-
-    //
-    @BindView(R.id.ll_check_goods_list)
-    LinearLayout llCheckGoodsList;
-
-    @BindView(R.id.ll_check_options)
-    LinearLayout llCheckOptions;
-
-
-    @BindView(R.id.s_is_product_name_match)
-    Switch sIsProductNameMatch;
-    @BindView(R.id.s_is_brand_match)
-    Switch sIsBrandMatch;
-    @BindView(R.id.s_is_model_match)
-    Switch sIsModelMatch;
-
-    @BindView(R.id.s_is_battery)
-    Switch sIsBattery;
-    @BindView(R.id.s_is_magnetic)
-    Switch sIsMagnetic;
-    @BindView(R.id.s_is_wood)
-    Switch sIsWood;
-    @BindView(R.id.s_is_other)
-    Switch sIsOther;
-
-    @BindView(R.id.ll_take_picture)
-    LinearLayout llTakePicture;
-
-    @BindView(R.id.ll_remark_info)
-    LinearLayout llRemarkInfo;
-
-    @BindView(R.id.btn_confirm)
-    TextView btnConfirm;
-
-    @BindView(R.id.rv_show_img)
-    RecyclerView rvShowImg;
-
-
-    @BindView(R.id.et_remark)
-    EditText etRemark;
-
-
-    //搬运工队列
-    private JSONArray issueList= new JSONArray();
-
-    private Integer selectId= 0;
-
-    private ArrayList photoList =new ArrayList<>();
-
-    private PictureSelectorUpload pictureSelectorUpload;
-
-    //
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    //订单信息对象
-    private JSONObject inboundObject = new JSONObject();
-
-    private JSONObject  goodsObject =  new JSONObject();
-
-    private List<JSONObject>  goodsList = new ArrayList<>();
-
-    protected String action;
-
-    private boolean isOk = true;
-
-    private Unbinder unbinder;
-
-    private JSONObject postParam = new JSONObject();
-
-    private ViewLogic viewLogic;
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_check_goods_details;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        try {
-            action = bundle.getString("action","waitcheck");
-            inboundObject = new JSONObject(bundle.getString("inbound_object"));
-            goodsObject = new JSONObject(bundle.getString("goods_object"));
-
-        } catch (JSONException e) {
-            XLog.e("接收数据解析:"+e.getMessage());
-            e.printStackTrace();
-        }
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-
-        if (resultCode == RESULT_OK) {
-            if (requestCode == PictureConfig.CHOOSE_REQUEST) {// 图片选择结果回调
-                pictureSelectorUpload.getSelectImg(data);
-            }
-        }
-    }
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("货物查验");
-
-        initEdit();
-        iniData();
-        pictureSelectorUpload = new PictureSelectorUpload(CheckGoodsDetailsMainActivity.this,rvShowImg,"check");
-    }
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                finishCheck();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-    }
-
-
-    private void iniData(){
-        viewLogic = new ViewLogic(llCheckGoodsList);
-        viewLogic.setGoodsData(inboundObject,goodsObject);
-    }
-
-    /**
-     *  初始化下拉框控件值
-     */
-    private void initSpinner() {
-    }
-
-
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-
-                default:
-            }
-
-
-        }
-    }
-
-
-    private void finishCheck(){
-        if (!validate()){
-            return;
-        }
-        //数据检查不通过
-
-        if (!isOk){  Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show(); return;}
-        isOk = false;
-        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_FINISH_CHECK).upJson(postParam)
-                .execute(new MyDialogCallback(this, true, true) {
-                    @Override
-                    public void onSuccess(Response<String> response) {
-                        isOk = true;
-                        super.onSuccess(response);
-                        try {
-                            ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                            if(bean.code == 1){
-                                showSuccessToast(bean.msg);
-                                JSONObject data = new JSONObject(bean.data);
-                                if (data.has("next_package") && !data.getString("next_package").isEmpty() &&
-                                        !data.getString("next_package").equals("[]")){
-                                    goodsObject = new JSONObject(data.getString("next_package"));
-                                    viewLogic.setGoodsData(inboundObject,goodsObject);
-                                    restoreData();
-                                }else{
-                                    Intent intent = new Intent();
-                                    intent.putExtra("opt_status", "success");
-                                    intent.putExtra("package_goods_id",postParam.getInt("package_goods_id"));
-                                    setResult(200, intent);//返回值,200 是改返回的标志,也会返回
-                                    finish();
-                                }
-
-                            }else{
-                                showWarningToast(bean.msg);
-                            }
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                            XLog.e("添加理货数据结果返回错误",e.getMessage());
-                        }
-                    }
-                });
-    }
-
-    private void restoreData(){
-
-        postParam.remove("photo");
-        postParam.remove("remark");
-        postParam.remove("order_number");
-        postParam.remove("package_goods_id");
-        etRemark.setText("");
-        pictureSelectorUpload.emptyRemake();
-
-        sIsProductNameMatch.setChecked(false);
-        sIsBrandMatch.setChecked(false);
-        sIsModelMatch.setChecked(false);
-        sIsBattery.setChecked(false);
-        sIsMagnetic.setChecked(false);
-        sIsWood.setChecked(false);
-        sIsOther.setChecked(false);
-
-        try {
-            //初始化问题类型
-            selectId = 0;
-            JSONObject issueObject = issueList.getJSONObject(selectId);
-            etRemark.setText(issueObject.getString("dictionary_name"));
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-
-        llTakePicture.setVisibility(View.GONE);
-        llRemarkInfo.setVisibility(View.GONE);
-        btnConfirm.setBackgroundResource(R.drawable.bg_green_item);
-        btnConfirm.setText("查验无异常,下一个");
-    }
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        photoList = pictureSelectorUpload.getPhotoList();
-        try {
-            postParam.put("order_number",inboundObject.getString("order_number"));
-            postParam.put("package_goods_id",goodsObject.getInt("package_goods_id"));
-
-            if (checkAllSwitch()){
-                //检查是否拍照
-                if (photoList.size()==0){
-                    showWarningToast("请拍照上传");
-                    return false;
-                }
-                Gson gson = new Gson();
-                postParam.put("photo",gson.toJson(photoList));
-
-
-//                if (etRemark.getText().toString().isEmpty()){
-//                    showWarningToast("请填写备注信息");
-//                    return false;
-//                }
-                postParam.put("remark",etRemark.getText().toString());
-
-            }
-        } catch (JSONException e) {
-            showWarningToast("系统异常"+e.getMessage());
-            e.printStackTrace();
-            return false;
-        }
-
-
-
-        return true;
-    }
-
-
-    //清除订单信息
-    private boolean checkAllSwitch() {
-        boolean result = false;
-        if (putSwitch(sIsProductNameMatch,"is_product_name_match")){result = true;}
-        if (putSwitch(sIsBrandMatch,"is_brand_match")){result = true;}
-        if (putSwitch(sIsModelMatch,"is_model_match")){result = true;}
-
-
-        if (putSwitch(sIsBattery,"is_battery")){result = true;}
-        if (putSwitch(sIsMagnetic,"is_magnetic")){result = true;}
-        if (putSwitch(sIsWood,"is_wood")){result = true;}
-        if (putSwitch(sIsOther,"is_other")){result = true;}
-        return result;
-    }
-
-    private boolean putSwitch(Switch sv,String name){
-        boolean isChecked = sv.isChecked();
-        try {
-            postParam.put(name,isChecked?"Y":"N");
-        } catch (JSONException e) {
-            XLog.e("设置Switch异常");
-            e.printStackTrace();
-        }
-        return isChecked;
-    }
-
-    //sIsGoodinfoMatch,sIsBattery,sIsMagnetic,sIsWood,sIsExtra,sIsOther
-    @OnClick({R.id.s_is_product_name_match,R.id.s_is_brand_match,R.id.s_is_model_match,R.id.s_is_battery,R.id.s_is_other,R.id.s_is_magnetic,R.id.s_is_wood,R.id.btn_confirm})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-            case R.id.s_is_product_name_match:
-            case R.id.s_is_brand_match:
-            case R.id.s_is_model_match:
-            case R.id.s_is_battery:
-            case R.id.s_is_other:
-            case R.id.s_is_magnetic:
-            case R.id.s_is_wood:
-                if (checkAllSwitch()){
-                    llTakePicture.setVisibility(View.VISIBLE);
-                    llRemarkInfo.setVisibility(View.VISIBLE);
-                    btnConfirm.setBackgroundResource(R.drawable.bg_orange_item);
-                    btnConfirm.setText("完成查验,下一个");
-                }else {
-                    llTakePicture.setVisibility(View.GONE);
-                    llRemarkInfo.setVisibility(View.GONE);
-                    btnConfirm.setBackgroundResource(R.drawable.bg_green_item);
-                    btnConfirm.setText("查验无异常,下一个");
-                }
-                break;
-            case R.id.btn_confirm:
-                finishCheck();
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-        pictureSelectorUpload.removeHandler();
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-}

+ 0 - 510
app/src/main/java/com/fxy/fms/check/CheckGoodsMainActivity.java

@@ -1,510 +0,0 @@
-package com.fxy.fms.check;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-import android.widget.Toast;
-
-import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.BaseViewHolder;
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class CheckGoodsMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-
-    @BindView(R.id.ll_check_info)
-    LinearLayout llCheckInfo;
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    //订单信息对象
-    private JSONObject inboundObject;
-
-    private List<JSONObject>  goodsList = new ArrayList<>();
-
-    protected String action;
-
-
-    private Unbinder unbinder;
-
-    //订单号
-    private String orderNumber;
-    private GoodsAdapter goodsAdapter;
-    // 空显示页
-    private View emptyView;
-
-    @BindView(R.id.rc_check_goods)
-    RecyclerView rcCheckGoods;
-
-
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_check_goods;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        try {
-            action = bundle.getString("action","waitcheck");
-            inboundObject = new JSONObject(bundle.getString("inbound_object"));
-        } catch (JSONException e) {
-            XLog.e("接收数据解析:"+e.getMessage());
-            e.printStackTrace();
-        }
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-            String  opt_status = data.getStringExtra("opt_status").toString();
-            if (opt_status.equals("success")){
-                Intent intent = new Intent();
-                intent.putExtra("opt_status", "success");
-                setResult(200, intent);//返回值,200 是改返回的标志,也会返回
-                finish();
-            }
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("货物查验");
-
-        initEdit();
-        initAdapter();
-        iniData();
-    }
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                //getInboundInfo();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-    }
-
-    private void iniData(){
-        ViewLogic viewLogic = new ViewLogic(llCheckInfo);
-        viewLogic.setCheckData(inboundObject);
-        getPackageGoods();
-    }
-
-    private void initAdapter() {
-
-        emptyView = this.getLayoutInflater().inflate(R.layout.pager_empty, (ViewGroup) rcCheckGoods.getParent(), false);
-        goodsAdapter = new GoodsAdapter(goodsList);
-        goodsAdapter.setEmptyView(emptyView);
-        goodsAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
-        rcCheckGoods.setLayoutManager(new LinearLayoutManager(this));
-        rcCheckGoods.setAdapter(goodsAdapter);
-        // 卡片项点击事件
-        goodsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-            @Override
-            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                //showLoadDialog("开始调整查验...");
-                try {
-
-                    Bundle bundle = new Bundle();
-                    bundle.putString("inbound_object",inboundObject.toString());
-                    JSONObject goodsObject = goodsList.get(position);
-
-                    if (goodsObject.has("is_pass")){
-                        showErrorToast("已查验不需要重复操作");
-                        return;
-                    }
-                    bundle.putString("goods_object",goodsObject.toString());
-
-                    intentPageResult(CheckGoodsMainActivity.this,CheckGoodsDetailsMainActivity.class, bundle,200);
-                }catch (Exception e){
-                    XLog.e("选中获取商品信息错误:",e);
-                }
-
-            }
-        });
-    }
-
-    private static class GoodsAdapter extends BaseQuickAdapter<JSONObject, BaseViewHolder> {
-        GoodsAdapter(List<JSONObject> data) {
-            super(R.layout.item_check_goods, data);
-        }
-
-        @Override
-        protected void convert(BaseViewHolder holder, JSONObject jsonObject) {
-            //XLog.e(jsonObject);
-
-            try {
-
-                if (jsonObject.has("is_pass") && jsonObject.getString("is_pass").equals("Y")){
-                    holder.setBackgroundRes(R.id.ll_check_goods_list,R.drawable.bg_green_item);
-                }
-                if (jsonObject.has("is_pass") && jsonObject.getString("is_pass").equals("N")){
-                    holder.setBackgroundRes(R.id.ll_check_goods_list,R.drawable.bg_orange_item);
-                }
-                //holder.setBackgroundRes(R.id.ll_tally_info,R.drawable.bg_green_item);
-
-                holder.setGone(R.id.ll_order_number,false);
-                holder.setGone(R.id.ll_category_en_name,false);
-                holder.setGone(R.id.ll_right_icon,true);
-
-
-                holder.setText(R.id.mt_shipment_id, jsonObject.getString("shipment_id"));
-                holder.setText(R.id.mt_package_number, jsonObject.getString("package_number"));
-                holder.setText(R.id.mt_box_qty, jsonObject.getString("box_qty"));
-                holder.setText(R.id.mt_category_cn_name, jsonObject.getString("cn_name"));
-                holder.setText(R.id.mt_category_en_name, jsonObject.getString("en_name"));
-                holder.setText(R.id.mt_brand, jsonObject.getString("brand"));
-                holder.setText(R.id.mt_model_number, jsonObject.getString("type"));
-
-                double box_length = jsonObject.getDouble("box_length");
-                double box_width = jsonObject.getDouble("box_width");
-                double box_height = jsonObject.getDouble("box_height");
-                holder.setText(R.id.mt_carton_size, box_length+"*"+box_width+"*"+box_height);
-            } catch (Exception e) {
-                XLog.e("查询结果数据渲染失败:"+e.getMessage());
-                e.printStackTrace();
-            }
-
-        }
-    }
-
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    //getInboundInfo();
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-    private void getPackageGoods(){
-
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("order_number",inboundObject.getString("order_number"));
-            jsonObject.put("action","waitcheck");
-
-            if (!checkRepeat(Urls.FMS_GET_PACKAGE_GOODS+(jsonObject.toString()))){
-                Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
-                return;
-            }
-            goodsList.clear();
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_GET_PACKAGE_GOODS).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    JSONObject data = new JSONObject(bean.data);
-                                    if (data.has("data")){
-                                        JSONArray list = data.getJSONArray("data");
-                                        for (int i = 0; i<list.length(); i++){
-                                            goodsList.add(list.getJSONObject(i));
-                                        }
-                                        goodsAdapter.notifyDataSetChanged();
-                                    }
-
-                                }else{
-                                    goodsList.clear();
-                                    goodsAdapter.notifyDataSetChanged();
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                showEmptyView("入库订单包裹商品信息解析错误:"+e.getMessage());
-                                XLog.e("获取包裹商品信息解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            XLog.e("请求包裹商品订单信息错误:",e);
-        }
-    }
-
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-
-        return true;
-    }
-
-
-    //清除订单信息
-    private void clearData() {
-
-    }
-
-    @OnClick({})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 476
app/src/main/java/com/fxy/fms/check/CheckStartMainActivity.java

@@ -1,476 +0,0 @@
-package com.fxy.fms.check;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.widget.EditText;
-import android.widget.ImageButton;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.qrcode.ActivityScanerCode;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.baselibrary.util.StringUtils;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
-
-import org.json.JSONObject;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class CheckStartMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    //单号清除
-    @BindView(R.id.ib_order_no_clear)
-    ImageButton ibOrderNoClear;
-
-    //单号
-    @BindView(R.id.et_order_no)
-    EditText etOrderNo;
-
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    //订单信息对象
-    private JSONObject inboundObject;
-
-
-
-
-    private Unbinder unbinder;
-
-    //订单号
-    private String orderNumber;
-
-
-
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_check_start;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle extras) {
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-//        XLog.e("requestCode:"+requestCode);
-//        XLog.e("resultCode:"+resultCode);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-            String  opt_status    = data.getStringExtra("opt_status").toString();
-            if (opt_status.equals("success")){
-                clearData();
-            }
-        }else if (resultCode==0){
-
-
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("货物查验");
-
-        initEdit();
-
-        //监听浮动按钮
-        iv_drag.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if(!iv_drag.isDrag()){
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-            }
-        });
-
-    }
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                getInboundInfo();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-        //
-        etOrderNo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-                    String orderNo = etOrderNo.getText().toString().trim();
-                    if (StringUtils.isEmpty(orderNo)) {
-                        setEditTextFocused(v,true);
-                        showWarningToast(v.getHint().toString());
-                        return false;
-                    }
-                    getInboundInfo();//获取订单信息
-                    return false;
-                }
-                return false;
-            }
-        });
-        etOrderNo.addTextChangedListener(new TextWatcher() {
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                orderNumber = s.toString().trim();
-                if (s.length() > 0 ) {
-                    if (etOrderNo.isEnabled()){
-                        ibOrderNoClear.setVisibility(View.VISIBLE);
-                    }
-                    setEditTextNormal(etOrderNo,true);
-                } else {
-                    ibOrderNoClear.setVisibility(View.INVISIBLE);
-                    setEditTextFocused(etOrderNo,true);
-                }
-            }
-
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-            }
-
-            public void afterTextChanged(Editable s) {
-
-            }
-        });
-        ibOrderNoClear.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                etOrderNo.requestFocus();
-                etOrderNo.getText().clear();
-            }
-        });
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    getInboundInfo();
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-    private void getInboundInfo(){
-        final String orderNo = etOrderNo.getText().toString().trim();
-        if (orderNo.isEmpty()){
-            return;
-        }
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("order_number",orderNo);
-            jsonObject.put("action","waitcheck");
-
-            if (!checkRepeat(Urls.FMS_CHECK_ORDER+(jsonObject.toString()))){
-                Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
-                return;
-            }
-
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_CHECK_ORDER).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    inboundObject = new JSONObject(bean.data);
-                                    Bundle bundle = new Bundle();
-                                    bundle.putString("inbound_object",bean.data);
-                                    intentPageResult(CheckStartMainActivity.this,CheckGoodsMainActivity.class, bundle,200);
-                                }else{
-                                    inboundObject = null;
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                showEmptyView("入库订单信息解析错误:"+e.getMessage());
-                                XLog.e("获取入库订单信息解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            inboundObject = null;
-            XLog.e("请求入库订单信息错误:",e);
-        }
-    }
-
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        if(!checkNull(etOrderNo)){
-            setEditTextFocused(etOrderNo,true);
-            showWarningToast(getString(R.string.hint_please_scan_no));
-            return false;
-        }
-        return true;
-    }
-
-
-    //清除订单信息
-    private void clearData() {
-        etOrderNo.setText("");
-        etOrderNo.requestFocus();
-    }
-
-    @OnClick({})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-
-
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 569
app/src/main/java/com/fxy/fms/check/WaitCheckMainActivity.java

@@ -1,569 +0,0 @@
-package com.fxy.fms.check;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.EditText;
-import android.widget.Toast;
-
-import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.BaseViewHolder;
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.jaredrummler.materialspinner.MaterialSpinner;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class WaitCheckMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    @BindView(R.id.ms_product_list)
-    MaterialSpinner ProductSpinner;
-
-    @BindView(R.id.rc_wait_check)
-    RecyclerView rcWaitCheck;
-
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-
-    private Unbinder unbinder;
-
-    //订单号
-    private String orderNumber;
-
-    //渠道列表
-    private JSONArray productList = new JSONArray();
-
-    //待查验数据
-    private List<JSONObject> waitCheckList = new ArrayList<>(); ;
-
-    private AvailableFinishWorkAdapter availableFinishWorkAdapter;
-    // 空显示页
-    private View emptyView;
-
-    private Integer selectId=0;
-
-    private JSONObject inboundObject;
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_check_wait;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle extras) {
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-            String  opt_status    = data.getStringExtra("opt_status").toString();
-            if (opt_status.equals("success")){
-                waitCheckList.clear();
-                getWaitCheckList(selectId);
-            }
-        }else if (resultCode==0){
-
-
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("待查验列表");
-
-        initEdit();
-
-        initAdapter();
-
-        //loadServiceData();
-        iniProducts();
-        initData();
-
-
-    }
-
-    private void iniProducts(){
-        try {
-            productList = new JSONArray();
-            JSONObject initObject = new JSONObject();
-            initObject.put("id",0);
-            initObject.put("name",0);
-            productList.put(initObject);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-    }
-
-    private void initData(){
-
-        getWaitCheckList(selectId);
-
-        try {
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_GET_PRODUCTS)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    JSONObject data = new JSONObject(bean.data);
-                                    productList = new JSONArray(data.getString("product_list"));
-                                    List<String> spinnerList = new ArrayList<String>();
-                                    for (int i = 0;i < productList.length(); i++){
-                                        JSONObject jsonObject =productList.getJSONObject(i);
-                                        spinnerList.add(jsonObject.getString("name"));
-                                    }
-                                    ProductSpinner.setItems(spinnerList);
-                                    ProductSpinner.setSelectedIndex(selectId);
-                                    initSpinner();
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                showWarningToast("获取产品列表解析错误:"+e.getMessage());
-                                e.printStackTrace();
-                                XLog.e("获取产品列表解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            showWarningToast(e.getMessage());
-            XLog.e("请求产品列表信息错误:",e);
-        }
-    }
-
-    /**
-     *  获取待查验产品
-     * @param id
-     */
-    private void getWaitCheckList(int id){
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("product_id",id);
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_GET_WAIT_CHECK_LIST).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    JSONObject data = new JSONObject(bean.data);
-
-                                    if (data.has("data")){
-                                        JSONArray list = new JSONArray(data.getString("data"));
-                                        for (int i = 0; i<list.length(); i++){
-                                            waitCheckList.add(list.getJSONObject(i));
-                                        }
-                                        availableFinishWorkAdapter.notifyDataSetChanged();
-                                    }
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                showWarningToast("获取产品列表解析错误:"+e.getMessage());
-                                e.printStackTrace();
-                                XLog.e("获取产品列表解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            showWarningToast(e.getMessage());
-            XLog.e("请求产品列表信息错误:",e);
-        }
-    }
-
-    /**
-     *  初始化下拉框控件值
-     */
-    private void initSpinner() {
-        ProductSpinner.setOnItemSelectedListener(new MaterialSpinner.OnItemSelectedListener<String>() {
-            @Override public void onItemSelected(MaterialSpinner view, int position, long id, String item) {
-               // XLog.e(id);XLog.e(item);
-                selectId = position;
-                waitCheckList.clear();
-                availableFinishWorkAdapter.notifyDataSetChanged();
-
-                try {
-                    JSONObject productObject = productList.getJSONObject(selectId);
-                    getWaitCheckList(productObject.getInt("id"));
-                } catch (JSONException e) {
-                    XLog.e("获取产品的数据错误");
-                    e.printStackTrace();
-                }
-            }
-        });
-    }
-
-
-    private void initAdapter() {
-
-        emptyView = this.getLayoutInflater().inflate(R.layout.pager_empty, (ViewGroup) rcWaitCheck.getParent(), false);
-        availableFinishWorkAdapter = new AvailableFinishWorkAdapter(waitCheckList);
-        availableFinishWorkAdapter.setEmptyView(emptyView);
-        availableFinishWorkAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
-        rcWaitCheck.setLayoutManager(new LinearLayoutManager(this));
-        rcWaitCheck.setAdapter(availableFinishWorkAdapter);
-        // 卡片项点击事件
-        availableFinishWorkAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-            @Override
-            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                //showLoadDialog("开始调整查验...");
-
-                try {
-                    JSONObject jsonObject = new JSONObject();
-                    jsonObject.put("order_number",waitCheckList.get(position).getString("order_number"));
-                    jsonObject.put("action","waitcheck");
-
-                    if (!checkRepeat(Urls.FMS_CHECK_ORDER+(jsonObject.toString()))){
-                        Toast.makeText(mContext, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
-                        return;
-                    }
-
-                    OkGo.<String>post(Urls.getServiceAddress(mContext) + Urls.FMS_CHECK_ORDER).upJson(jsonObject)
-                            .execute(new MyDialogCallback(mContext, true, true) {
-                                @Override
-                                public void onSuccess(Response<String> response) {
-                                    super.onSuccess(response);
-                                    try {
-                                        ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                        if(bean.code == 1){
-                                            inboundObject = new JSONObject(bean.data);
-                                            Bundle bundle = new Bundle();
-                                            bundle.putString("inbound_object",bean.data);
-                                            intentPageResult(WaitCheckMainActivity.this,CheckGoodsMainActivity.class, bundle,200);
-                                        }else{
-                                            inboundObject = null;
-                                            showWarningToast(bean.msg);
-                                        }
-                                    } catch (Exception e) {
-                                        e.printStackTrace();
-                                        showEmptyView("入库订单信息解析错误:"+e.getMessage());
-                                        XLog.e("获取入库订单信息解析错误",e.getMessage());
-                                    }
-                                }
-                            });
-                }catch (Exception e){
-                    inboundObject = null;
-                    XLog.e("请求入库订单信息错误:",e);
-                }
-
-
-            }
-        });
-    }
-
-    private class AvailableFinishWorkAdapter extends BaseQuickAdapter<JSONObject, BaseViewHolder> {
-        public AvailableFinishWorkAdapter(List<JSONObject> data) {
-            super(R.layout.item_check_info, data);
-        }
-
-        @Override
-        protected void convert(BaseViewHolder holder, JSONObject jsonObject) {
-            XLog.e(jsonObject);
-            //{"channel_name":"","inbound_date":"2021-03-26 03:29:08","order_number":"123","product_id":590,
-            // "inbound_pieces":12,"id":2,"product_name":"换号服务专用产品","domestic_wms_location":""}
-            try {
-
-                holder.setText(R.id.mt_order_number, jsonObject.getString("order_number"));
-                holder.setText(R.id.tv_country_name,jsonObject.getString("country_name"));
-                holder.setText(R.id.mt_channel_name, jsonObject.getString("channel_name"));
-                holder.setText(R.id.mt_location_code, jsonObject.getString("domestic_wms_location"));
-                holder.setText(R.id.mt_inbound_pieces, jsonObject.getString("inbound_pieces"));
-                holder.setText(R.id.mt_inbound_date, jsonObject.getString("inbound_date"));
-            } catch (Exception e) {
-                XLog.e("查询结果数据渲染失败:"+e.getMessage());
-                e.printStackTrace();
-            }
-
-        }
-    }
-
-
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-
-
-
-
-
-    @OnClick({})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 599
app/src/main/java/com/fxy/fms/putIn/PutAwayMainActivity.java

@@ -1,599 +0,0 @@
-package com.fxy.fms.putIn;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.widget.EditText;
-import android.widget.ImageButton;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.jaredrummler.materialspinner.MaterialSpinner;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.qrcode.ActivityScanerCode;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.baselibrary.util.StringUtils;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class PutAwayMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    //单号清除
-    @BindView(R.id.ib_order_no_clear)
-    ImageButton ibOrderNoClear;
-
-    //单号
-    @BindView(R.id.et_order_no)
-    EditText etOrderNo;
-
-
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
-
-    @BindView(R.id.tv_already_location)
-    TextView tvAlreadyLocation;
-
-    @BindView(R.id.ms_location_list)
-    MaterialSpinner LocationSpinner;
-
-
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    protected String action;
-
-    //订单信息对象
-    private JSONObject inboundObject;
-
-    private Unbinder unbinder;
-
-
-    //库位列
-    private JSONArray locationList;
-
-    private Integer selectId=0;
-
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_put_away;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        action = bundle.getString("action","putaway");
-    }
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("扫描上架");
-        initEdit();
-
-        //loadServiceData();
-        initData();
-
-        //监听浮动按钮
-        iv_drag.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if(!iv_drag.isDrag()){
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-            }
-        });
-
-    }
-
-
-    private void initData(){
-
-        try {
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_LOCATION_LIST)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                List<String> spinnerList = new ArrayList<String>();
-                                spinnerList.add("请选择上架库位");
-                                if(bean.code == 1){
-                                    //JSONObject data = new JSONObject(bean.data);
-                                    locationList = new JSONArray(bean.data);
-                                    for (int i = 0;i < locationList.length(); i++){
-                                        JSONObject jsonObject =locationList.getJSONObject(i);
-                                        spinnerList.add(jsonObject.getString("name"));
-                                    }
-                                    LocationSpinner.setItems(spinnerList);
-
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-
-                                LocationSpinner.setSelectedIndex(selectId);
-                                initSpinner();
-
-                            } catch (Exception e) {
-                                showWarningToast("请配置上架库位基础数据");
-                                e.printStackTrace();
-                                XLog.e("获取上架库位解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            showWarningToast(e.getMessage());
-            XLog.e("请求上架库位信息错误:",e);
-        }
-    }
-
-    /**
-     *  初始化下拉框控件值
-     */
-    private void initSpinner() {
-        LocationSpinner.setOnItemSelectedListener(new MaterialSpinner.OnItemSelectedListener<String>() {
-            @Override public void onItemSelected(MaterialSpinner view, int position, long id, String item) {
-                // XLog.e(id);XLog.e(item);
-                selectId = position;
-                if (position>0){
-                    setEditTextNormal(LocationSpinner,false);
-                }
-            }
-        });
-    }
-
-
-
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                addPutAway();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-        //
-        etOrderNo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-                    String orderNo = etOrderNo.getText().toString().trim();
-                    if (StringUtils.isEmpty(orderNo)) {
-                        setEditTextFocused(v,true);
-                        showWarningToast(v.getHint().toString());
-                        return false;
-                    }
-                    getInboundInfo();//获取订单信息
-                    return false;
-                }
-                return false;
-            }
-        });
-        etOrderNo.addTextChangedListener(new TextWatcher() {
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                s = s.toString().trim();
-                if (s.length() > 0 ) {
-                    if (etOrderNo.isEnabled()){
-                        ibOrderNoClear.setVisibility(View.VISIBLE);
-                    }
-                    setEditTextNormal(etOrderNo,true);
-
-                } else {
-                    ibOrderNoClear.setVisibility(View.INVISIBLE);
-                    setEditTextFocused(etOrderNo,true);
-                }
-            }
-
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-            }
-
-            public void afterTextChanged(Editable s) {
-
-            }
-        });
-        ibOrderNoClear.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                etOrderNo.requestFocus();
-                etOrderNo.getText().clear();
-            }
-        });
-
-
-
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    getInboundInfo();
-                    break;
-            }
-
-
-        }
-    }
-
-
-    private void getInboundInfo(){
-        final String orderNumber = etOrderNo.getText().toString().trim();
-        if (orderNumber.isEmpty()){
-            return;
-        }
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("order_number",orderNumber);
-            jsonObject.put("action",action);
-            if (!checkRepeat(Urls.FMS_CHECK_ORDER+(jsonObject.toString()))){
-                Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
-                return;
-            }
-
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_CHECK_ORDER).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    showSuccessToast(bean.msg);
-                                    inboundObject = new JSONObject(bean.data);
-                                    tvAlreadyLocation.setText(inboundObject.getString("domestic_wms_location"));
-                                }else{
-                                    inboundObject = null;
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                showEmptyView("入库订单信息解析错误:"+e.getMessage());
-                                XLog.e("获取入库订单信息解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            inboundObject = null;
-            XLog.e("请求出库订单信息错误:",e);
-        }
-    }
-
-
-    private void addPutAway() {
-
-        //校验数据
-        if (!validate()){
-            return;
-        }
-
-        String orderNumber = etOrderNo.getText().toString().trim();
-
-
-        try {
-            //locationList.getJSONObject(i);
-            JSONObject jsonObject = locationList.getJSONObject(selectId-1);
-            String locationNumber = jsonObject.getString("code");
-
-            JSONObject param = new JSONObject();
-            param.put("order_number",orderNumber);
-            param.put("domestic_wms_location",locationNumber);
-
-            if (!checkRepeat(Urls.FMS_PUT_AWAY+(param.toString()))){return;}
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_PUT_AWAY).upJson(param)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    showSuccessToast(bean.msg);
-                                    clearData();
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                showErrorToast("数据解析失败"+e.getMessage());//不需要翻译
-                                e.printStackTrace();
-                                XLog.e("开始拣货结果返回错误",e.getMessage());
-                            }
-                        }
-                    });
-
-
-        } catch (JSONException e) {
-            showEmptyView("数据组装失败:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-
-    }
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-
-        if(!checkNull(etOrderNo)){
-            setEditTextFocused(etOrderNo,true);
-            showWarningToast(etOrderNo.getHint().toString());
-            return false;
-        }
-
-        if (selectId==0){
-            setEditTextFocused(LocationSpinner,false);
-            showWarningToast("请选择上架库位");
-            return false;
-        }
-        return true;
-    }
-
-
-    //清除订单信息
-    private void clearData() {
-        etOrderNo.setText("");
-        etOrderNo.requestFocus();
-    }
-
-    @OnClick({R.id.ima_or_code,R.id.btn_confirm})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-            case R.id.btn_confirm:
-                addPutAway();
-
-                break;
-            case R.id.ima_or_code:
-                if(etOrderNo.isEnabled()){
-                    etOrderNo.requestFocus();
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-                break;
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 484
app/src/main/java/com/fxy/fms/putIn/TallyPictureMainActivity.java

@@ -1,484 +0,0 @@
-package com.fxy.fms.putIn;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.support.v7.widget.RecyclerView;
-import android.view.KeyEvent;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-
-import com.elvishew.xlog.XLog;
-import com.google.gson.Gson;
-import com.google.zxing.Result;
-import com.luck.picture.lib.config.PictureConfig;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.qrcode.ActivityScanerCode;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.baselibrary.views.dialog.RxDialogChooseImage;
-import com.fxy.R;
-
-import com.fxy.common.PictureSelectorUpload;
-import com.fxy.base.fragment.ShowImgFragment;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-
-import java.util.ArrayList;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class TallyPictureMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    //材积明细
-    @BindView(R.id.ll_add_img)
-    LinearLayout llAddImg;
-
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
-
-
-
-    @BindView(R.id.ll_tally_info)
-    LinearLayout llTallyInfo;
-
-    @BindView(R.id.rv_show_img)
-    RecyclerView rvShowImg;
-
-
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    //订单信息对象
-    private JSONObject inboundObject;
-
-    private JSONObject paramObject;
-
-
-
-
-    private Unbinder unbinder;
-
-    protected String action;
-
-    private ShowImgFragment showImgFragment;
-
-
-// ArrayList<String> imgList = new  ArrayList<String>();
-    private RxDialogChooseImage rxDialogChooseImage;
-
-    private ArrayList photoList =new ArrayList<>();
-
-    private PictureSelectorUpload pictureSelectorUpload;
-
-
-    private JSONObject postParam = new JSONObject();
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_tally_picture;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-
-        try {
-            inboundObject = new JSONObject(bundle.getString("inbound_object"));
-            paramObject = new JSONObject(bundle.getString("param"));
-            postParam = new JSONObject(bundle.getString("post_param"));
-        } catch (JSONException e) {
-            XLog.e("接收数据解析:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-
-
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (resultCode == RESULT_OK) {
-            if (requestCode == PictureConfig.CHOOSE_REQUEST) {// 图片选择结果回调
-                pictureSelectorUpload.getSelectImg(data);
-            }
-        }
-    }
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("录入材积重");
-
-        initEdit();
-
-
-        //loadServiceData();
-        initData();
-
-        //监听浮动按钮
-        iv_drag.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if(!iv_drag.isDrag()){
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-            }
-        });
-
-        if (inboundObject!=null){
-            //设置订单信息
-            ViewLogic logic = new ViewLogic(llTallyInfo);
-            logic.setTallyData(inboundObject);
-            logic.setTallyMore(paramObject);
-        }
-
-        pictureSelectorUpload = new PictureSelectorUpload(TallyPictureMainActivity.this,rvShowImg,"tally");
-
-
-    }
-
-
-    private void initData(){
-
-    }
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                addReceive();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        photoList = pictureSelectorUpload.getPhotoList();
-        if (photoList.size()==0){
-            showWarningToast("请拍照拍照");
-            return false;
-        }
-        return true;
-    }
-
-
-
-
-    @OnClick({R.id.btn_confirm,R.id.tv_clear_pictures})
-    public void onViewClicked(final View view) {
-        Bundle bundle = new Bundle();
-
-        switch (view.getId()) {
-            case R.id.btn_confirm:
-                addReceive();
-                break;
-            case R.id.tv_clear_pictures:
-                pictureSelectorUpload.emptyRemake();
-                break;
-
-            default:
-                break;
-        }
-    }
-
-
-    private void addReceive(){
-        //校验数据
-        if (!validate()){
-            return;
-        }
-        try {
-
-            Gson gson = new Gson();
-            postParam.put("is_confirm","Y");
-            postParam.put("photo",gson.toJson(photoList));
-
-            if (!checkRepeat(Urls.FMS_ADD_RECEIVE+(postParam.toString()))){return;}
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_ADD_RECEIVE).upJson(postParam)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    showSuccessToast(getString(R.string.str_tally_success));
-                                    Intent intent = new Intent();
-                                    intent.putExtra("opt_status", "success");
-                                    setResult(200, intent);//返回值,200 是改返回的标志,也会返回
-                                    finish();
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                XLog.e("添加理货数据结果返回错误",e.getMessage());
-                            }
-                        }
-                    });
-        } catch (JSONException e) {
-            XLog.e("sku数据解析出错",e);
-            e.printStackTrace();
-        }
-    }
-
-
-
-
-
-    //获取输入框值
-    protected String getValStr(EditText v){
-        return v.getText().toString().trim();
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-        pictureSelectorUpload.removeHandler();
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 659
app/src/main/java/com/fxy/fms/putIn/TallyStartMainActivity.java

@@ -1,659 +0,0 @@
-package com.fxy.fms.putIn;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.EditText;
-import android.widget.ImageButton;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.jaredrummler.materialspinner.MaterialSpinner;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.qrcode.ActivityScanerCode;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.baselibrary.util.StringUtils;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
-import com.fxy.fms.putIn.bean.InboundBean;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class TallyStartMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    //单号清除
-    @BindView(R.id.ib_order_no_clear)
-    ImageButton ibOrderNoClear;
-
-    //单号
-    @BindView(R.id.et_order_no)
-    EditText etOrderNo;
-
-
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
-
-
-    @BindView(R.id.ms_docker_list)
-    MaterialSpinner DockerSpinner;
-
-    @BindView(R.id.ll_tally_info)
-    LinearLayout llTallyInfo;
-
-    @BindView(R.id.checkBox_tag)
-    CheckBox checkBoxTag;
-
-
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    protected String action;
-
-    //订单信息对象
-    private JSONObject inboundObject;
-
-    private InboundBean inboundBean;
-
-
-
-    private Unbinder unbinder;
-
-    //订单号
-    private String orderNumber;
-
-    //搬运工队列
-    private JSONArray dockerList;
-
-    private Integer selectId=0;
-
-    private String hasLabel = "Y" ;//N 无标签入库  Y 需要标签入库
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_tally_start;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        action = bundle.getString("action","receive");
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-//        XLog.e("requestCode:"+requestCode);
-//        XLog.e("resultCode:"+resultCode);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-            String  opt_status    = data.getStringExtra("opt_status").toString();
-            if (opt_status.equals("success")){
-                clearData();
-            }
-        }else if (resultCode==0){
-
-
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName(getString(R.string.tally));
-
-        initEdit();
-
-
-        //loadServiceData();
-        initData();
-
-        //监听浮动按钮
-        iv_drag.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if(!iv_drag.isDrag()){
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-            }
-        });
-
-        llTallyInfo.setVisibility(View.GONE);
-
-    }
-
-
-    private void initData(){
-
-        try {
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_DOCKER_LIST)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                List<String> spinnerList = new ArrayList<String>();
-                                spinnerList.add("请选择搬运小组");
-                                if(bean.code == 1){
-                                    JSONObject data = new JSONObject(bean.data);
-                                    dockerList = new JSONArray(data.getString("docker_list"));
-                                    for (int i = 0;i < dockerList.length(); i++){
-                                        JSONObject jsonObject =dockerList.getJSONObject(i);
-                                        spinnerList.add(jsonObject.getString("name"));
-                                    }
-                                    DockerSpinner.setItems(spinnerList);
-
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-
-                                DockerSpinner.setSelectedIndex(selectId);
-                                initSpinner();
-
-                            } catch (Exception e) {
-                                showWarningToast("获取搬运小组解析错误:"+e.getMessage());
-                                e.printStackTrace();
-                                XLog.e("获取搬运小组解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            showWarningToast(e.getMessage());
-            XLog.e("请求入库订单信息错误:",e);
-        }
-    }
-
-    /**
-     *  初始化下拉框控件值
-     */
-    private void initSpinner() {
-        DockerSpinner.setOnItemSelectedListener(new MaterialSpinner.OnItemSelectedListener<String>() {
-            @Override public void onItemSelected(MaterialSpinner view, int position, long id, String item) {
-               // XLog.e(id);XLog.e(item);
-                selectId = position;
-                if (position>0){
-                    setEditTextNormal(DockerSpinner,false);
-                }
-            }
-        });
-    }
-
-
-    /**
-     * 复选框选中与不选中的事件
-     */
-    public void onCheckedChanged(CompoundButton checkBox, boolean checked) {
-        // TODO Auto-generated method stub
-        switch (checkBox.getId()) {
-            case R.id.checkBox_tag:
-                if (checked) {// 选中吃
-                    hasLabel = "Y";
-                } else {
-                    hasLabel = "N";
-                }
-                break;
-            default:
-                break;
-        }
-    }
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                startReceive();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-        //
-        etOrderNo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-                    String orderNo = etOrderNo.getText().toString().trim();
-                    if (StringUtils.isEmpty(orderNo)) {
-                        setEditTextFocused(v,true);
-                        showWarningToast(v.getHint().toString());
-                        return false;
-                    }
-                    getInboundInfo();//获取订单信息
-                    return false;
-                }
-                return false;
-            }
-        });
-        etOrderNo.addTextChangedListener(new TextWatcher() {
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                orderNumber = s.toString().trim();
-                if (s.length() > 0 ) {
-                    if (etOrderNo.isEnabled()){
-                        ibOrderNoClear.setVisibility(View.VISIBLE);
-                    }
-                    setEditTextNormal(etOrderNo,true);
-                } else {
-                    ibOrderNoClear.setVisibility(View.INVISIBLE);
-                    setEditTextFocused(etOrderNo,true);
-                }
-            }
-
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-            }
-
-            public void afterTextChanged(Editable s) {
-
-            }
-        });
-        ibOrderNoClear.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                etOrderNo.requestFocus();
-                etOrderNo.getText().clear();
-            }
-        });
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    getInboundInfo();
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-    private void getInboundInfo(){
-        final String orderNo = etOrderNo.getText().toString().trim();
-        if (orderNo.isEmpty()){
-            return;
-        }
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("order_number",orderNo);
-            jsonObject.put("action",action);
-            if (!checkRepeat(Urls.FMS_CHECK_ORDER+(jsonObject.toString()))){
-                Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
-                return;
-            }
-
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_CHECK_ORDER).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    inboundObject = new JSONObject(bean.data);
-                                    inboundBean  = JsonUtil.getObject(inboundObject.toString(), InboundBean.class);
-                                    //设置订单信息
-                                    llTallyInfo.setVisibility(View.VISIBLE);
-                                    ViewLogic logic = new ViewLogic(llTallyInfo);
-                                    logic.setTallyData(inboundObject);
-                                }else{
-                                    inboundObject = null;
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                showEmptyView("入库订单信息解析错误:"+e.getMessage());
-                                XLog.e("获取入库订单信息解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            inboundObject = null;
-            XLog.e("请求入库订单信息错误:",e);
-        }
-    }
-
-
-    private void startReceive() {
-
-        //校验数据
-        if (!validate()){
-            return;
-        }
-        if (inboundObject==null){
-            getInboundInfo();
-            return;
-        }
-        orderNumber = etOrderNo.getText().toString().trim();
-
-        hasLabel = checkBoxTag.isChecked()?"Y":"N";
-
-        try {
-            JSONObject param = new JSONObject();
-            JSONObject dockerObject = dockerList.getJSONObject(selectId-1);
-            param.put("docker_id",dockerObject.getInt("id"));
-            param.put("docker_name",dockerObject.getString("name"));
-            param.put("order_number",orderNumber);
-            param.put("order_number",orderNumber);
-            param.put("has_label",hasLabel);
-
-            Bundle bundle = new Bundle();
-            bundle.putString("inbound_object",inboundObject.toString());
-            bundle.putString("param",param.toString());
-            intentPageResult(this,TallyVolumeMainActivity.class, bundle,200);
-        } catch (JSONException e) {
-            showEmptyView("数据组装失败:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-
-    }
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        if (selectId==0){
-            setEditTextFocused(DockerSpinner,false);
-            showWarningToast("请选择搬运小组");
-            return false;
-        }
-        if(!checkNull(etOrderNo)){
-            setEditTextFocused(etOrderNo,true);
-            showWarningToast(getString(R.string.hint_please_scan_no));
-            return false;
-        }
-
-        return true;
-    }
-
-
-    //清除订单信息
-    private void clearData() {
-        etOrderNo.setText("");
-        etOrderNo.requestFocus();
-        try {
-            JSONObject iniData = new JSONObject();
-            iniData.put("order_number", "");
-            iniData.put("customer_name", "");
-            iniData.put("receive_country", "");
-            iniData.put("product_name", "");
-            iniData.put("forecast_pieces", "");
-            iniData.put("domestic_wms_location", "");
-            llTallyInfo.setVisibility(View.GONE);
-            ViewLogic logic = new ViewLogic(llTallyInfo);
-            logic.setTallyData(iniData);
-            inboundObject = null;
-
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-
-
-    }
-
-    @OnClick({R.id.ima_or_code,R.id.btn_confirm})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-            case R.id.btn_confirm:
-                startReceive();
-
-                break;
-            case R.id.ima_or_code:
-                if(etOrderNo.isEnabled()){
-                    etOrderNo.requestFocus();
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(TallyStartMainActivity.this, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-                break;
-
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 943
app/src/main/java/com/fxy/fms/putIn/TallyVolumeMainActivity.java

@@ -1,943 +0,0 @@
-package com.fxy.fms.putIn;
-
-import android.annotation.SuppressLint;
-import android.app.AlertDialog;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import androidx.annotation.RequiresApi;
-
-import com.elvishew.xlog.XLog;
-import com.google.gson.Gson;
-import com.google.zxing.Result;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.qrcode.ActivityScanerCode;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class TallyVolumeMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    //材积明细
-    @BindView(R.id.ll_volume_content)
-    LinearLayout llVolumeContent;
-
-    @BindView(R.id.tv_add_pallet)
-    TextView tvAddPallet;
-
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
-
-    @BindView(R.id.ll_tally_info)
-    LinearLayout llTallyInfo;
-
-    private EditText edittext;
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    //订单信息对象
-    private JSONObject inboundObject;
-
-    private JSONObject paramObject;
-
-    private Unbinder unbinder;
-
-    protected String action;
-
-    //订单号
-    private String orderNumber;
-
-    //是否确认 Y 或 N 默认:N
-    private String isConfirm = "N";
-
-    //理货总件数
-    private int total_pieces = 0;
-
-
-
-    private ArrayList<Map<String, String>> volumeList = new ArrayList<Map<String, String>>();
-
-    private JSONObject postParam = new JSONObject();
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_tally_volume;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-
-        try {
-            action = bundle.getString("action","receive");
-            inboundObject = new JSONObject(bundle.getString("inbound_object"));
-            paramObject = new JSONObject(bundle.getString("param"));
-        } catch (JSONException e) {
-            XLog.e("接收数据解析:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-
-
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-//        XLog.e("requestCode:"+requestCode);
-//        XLog.e("resultCode:"+resultCode);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-
-            String  opt_status    = data.getStringExtra("opt_status").toString();
-            if (opt_status.equals("success")){
-                Intent intent = new Intent();
-                intent.putExtra("opt_status", opt_status);
-                setResult(200, intent);//返回值,200 是改返回的标志,也会返回
-                finish();
-            }
-
-
-        }else if (resultCode==0){
-
-
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("录入材积重");
-
-        initEdit();
-
-
-        //loadServiceData();
-        initData();
-
-        //监听浮动按钮
-        iv_drag.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if(!iv_drag.isDrag()){
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-            }
-        });
-
-        if (inboundObject!=null){
-            //设置订单信息
-            ViewLogic logic = new ViewLogic(llTallyInfo);
-            logic.setTallyData(inboundObject);
-            logic.setTallyMore(paramObject);
-        }
-
-        //默认添加一条
-        addPallet();
-    }
-
-
-    private void initData(){
-
-
-    }
-
-
-
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                addReceive();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-
-    }
-
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-
-
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        int len = llVolumeContent.getChildCount();
-        if (len==0){
-            showWarningToast("请先添加材积信息");
-            return false;
-        }
-        volumeList.clear();//清空材积信息
-
-        total_pieces = 0;
-        int num = 0;//第几个卡板
-        for(int i=0;i<len ;i++) {
-            View view_c = llVolumeContent.getChildAt(i);
-            EditText etWeight = (EditText) view_c.findViewById(R.id.et_weight);
-            EditText etPalletWeight = (EditText) view_c.findViewById(R.id.et_pallet_weight);
-            if (etWeight==null){
-                continue;
-            }
-
-            num++;
-            //1、检查重量是否填写(一个卡板只有一个重量)
-            if (!isNumber(getValStr(etWeight),3)){
-                setEditTextFocused(etWeight,false);
-                showWarningToast(getString(R.string.msg_gt_zero_3));
-                return false;
-            }
-            etWeight.setBackgroundResource(R.drawable.edit_background);
-
-            //1.1 检查卡板重量
-            if (etPalletWeight.getText().toString().isEmpty()){
-                setEditTextFocused(etPalletWeight,false);
-                showWarningToast("必填项不能空");
-                return false;
-            }
-
-            etPalletWeight.setBackgroundResource(R.drawable.edit_background);
-
-            //总重量
-            double weightTotal= Double.parseDouble(etWeight.getText().toString());
-            //卡板重量
-            double palletWeightTotal= Double.parseDouble(etPalletWeight.getText().toString());
-
-            //1.2 检查卡板重量必需小于重量
-            if (palletWeightTotal>=weightTotal){
-                setEditTextFocused(etWeight,false);
-                showWarningToast("卡板重量必需小于总重量");
-                return false;
-            }
-
-
-
-            LinearLayout pallLayout = (LinearLayout) view_c.findViewById(R.id.ll_pall_center);
-
-
-
-
-            //3、遍历卡板下的材积 ,由于removeAllViews 没有删除视图
-
-            int volumeCopies = 0;
-            int starIndex = volumeList.size();
-            for(int j=2;j<pallLayout.getChildCount();j++) {
-                View pallView = pallLayout.getChildAt(j);
-                if (pallView.findViewById(R.id.et_copies)!=null){
-                    EditText etCopies = (EditText) pallView.findViewById(R.id.et_copies);
-                    EditText etLength = (EditText) pallView.findViewById(R.id.et_length);
-                    EditText etWidth = (EditText) pallView.findViewById(R.id.et_width);
-                    EditText etHeight = (EditText) pallView.findViewById(R.id.et_height);
-                    if (!validateVolume(etCopies,etLength,etWidth,etHeight)){
-                        return false;
-                    }
-                    String copies= etCopies.getText().toString().trim();
-                    Map<String,String> hostMap = new HashMap<>();
-                    hostMap.put("qty",copies);
-                    hostMap.put("inbound_weight","0");
-                    hostMap.put("inbound_length",etLength.getText().toString().trim());
-                    hostMap.put("inbound_width",etWidth.getText().toString().trim());
-                    hostMap.put("inbound_height",etHeight.getText().toString().trim());
-                    hostMap.put("pallet_height",etPalletWeight.getText().toString().trim());
-                    hostMap.put("total_width",etWeight.getText().toString().trim());
-                    volumeList.add(hostMap);
-
-                    volumeCopies = volumeCopies+Integer.parseInt(copies);
-                }
-            }
-
-            if (volumeCopies==0){
-                showWarningToast("卡板"+num+"材积不能为空");
-                return false;
-            }
-            total_pieces = total_pieces+volumeCopies;
-
-
-            //单件重量
-            String inbound_weight = String .format("%.2f",(weightTotal-palletWeightTotal)/volumeCopies);;
-            for (int n=starIndex ;n<volumeList.size();n++){
-                Map<String,String> hostMap = volumeList.get(n);
-                hostMap.put("inbound_weight",inbound_weight);
-                volumeList.set(n,hostMap);
-            }
-
-
-        }
-        return true;
-    }
-
-    private boolean validateVolume(EditText etCopies,EditText etLength,EditText etWidth,EditText etHeight){
-        if (etCopies.getText().toString().isEmpty() ||   !isNumber(getValStr(etCopies),0)){
-            setEditTextFocused(etCopies,false);
-            showWarningToast(getString(R.string.error_please_int_num));
-            return false;
-        }
-        //清除红色框框
-        etCopies.setBackgroundResource(R.drawable.edit_background);
-
-
-        if (!isNumber(getValStr(etLength),3)){
-            setEditTextFocused(etLength,false);
-            showWarningToast(getString(R.string.msg_gt_zero_3));
-            return false;
-        }
-        //清除红色框框
-        etLength.setBackgroundResource(R.drawable.edit_background);
-
-        if (!isNumber(getValStr(etWidth),3)){
-            setEditTextFocused(etWidth,false);
-            showWarningToast(getString(R.string.msg_gt_zero_3));
-            return false;
-        }
-        //清除红色框框
-        etWidth.setBackgroundResource(R.drawable.edit_background);
-
-        if (!isNumber(getValStr(etHeight),3)){
-            setEditTextFocused(etHeight,false);
-            showWarningToast(getString(R.string.msg_gt_zero_3));
-            return false;
-        }
-        //清除红色框框
-        etHeight.setBackgroundResource(R.drawable.edit_background);
-
-
-        return true;
-    }
-
-
-
-    @OnClick({R.id.btn_confirm,R.id.tv_add_pallet})
-    public void onViewClicked(final View view) {
-        Bundle bundle = new Bundle();
-
-        switch (view.getId()) {
-            case R.id.btn_confirm:
-                addReceive();
-                break;
-            case R.id.tv_add_pallet:
-                addPallet();
-                break;
-
-            default:
-                break;
-        }
-    }
-
-
-    private void addPallet(){
-        View newView = View.inflate(TallyVolumeMainActivity.this, R.layout.item_tally_pallet, null);
-
-
-
-        //找到里面需要动态改变的控件
-        TextView tvPalletTitle = (TextView) newView.findViewById(R.id.tv_pallet_num);
-        //给控件赋值
-        tvPalletTitle.setText("卡板"+(llVolumeContent.getChildCount()+1));
-
-        TextView tvPalletDel = (TextView) newView.findViewById(R.id.tv_pallet_del);
-        TextView tvVolumeDel = (TextView) newView.findViewById(R.id.tv_volume_del);
-        TextView tvAddVolume = (TextView) newView.findViewById(R.id.tv_add_volume);
-
-        if (llVolumeContent.getChildCount()==0){
-            tvPalletDel.setVisibility(View.GONE);
-        }
-        tvVolumeDel.setVisibility(View.GONE);
-
-
-        //监听删除按钮
-        onClickVolumeDel(tvVolumeDel);
-        onEditorAction((EditText) newView.findViewById(R.id.et_copies));
-        onEditorAction((EditText) newView.findViewById(R.id.et_weight));
-        onEditorAction((EditText) newView.findViewById(R.id.et_pallet_weight));
-        onEditorAction((EditText) newView.findViewById(R.id.et_length));
-        onEditorAction((EditText) newView.findViewById(R.id.et_width));
-        onEditorAction((EditText) newView.findViewById(R.id.et_height));
-
-        //监听删除卡托点击事件
-        tvPalletDel.setOnClickListener(new View.OnClickListener() {
-            @RequiresApi(api = Build.VERSION_CODES.KITKAT)
-            @Override
-            public void onClick(View v) {
-                try {
-                    final LinearLayout  linearLayout = (LinearLayout) v.getParent().getParent().getParent();
-                    new AlertDialog.Builder(mContext)
-                            .setTitle(R.string.dl_hint)
-                            .setMessage("确定要删除卡板吗?")
-                            .setNegativeButton(R.string.str_cancel, new DialogInterface.OnClickListener() {
-                                @Override
-                                public void onClick(DialogInterface dialogInterface, int i) {
-                                    dialogInterface.dismiss();
-                                }
-                            }).setPositiveButton(R.string.str_submit, new DialogInterface.OnClickListener() {
-                        @Override
-                        public void onClick(DialogInterface dialogInterface, int i) {
-                            linearLayout.removeAllViews();
-                            setPalletTitle();
-                        }
-                    }).show();
-
-
-
-
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    showErrorToast("删除卡板失败");
-                }
-
-            }
-        });
-
-
-        //监听添加材积
-        tvAddVolume.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                LinearLayout pallLayout = (LinearLayout) v.getParent().getParent();
-                addVolume(pallLayout);
-            }
-        });
-        llVolumeContent.addView(newView); //添加一个View
-        setPalletTitle();
-    }
-    //统计
-    //添加材积
-    private void addVolume(LinearLayout pallLayout){
-        try {
-
-            int childCount = pallLayout.getChildCount();
-            //卡板的Layout
-            View newView = View.inflate(TallyVolumeMainActivity.this, R.layout.item_tally_volume, null);
-            TextView tvVolumeDel = (TextView) newView.findViewById(R.id.tv_volume_del);
-            TextView tvTitleNum = (TextView) newView.findViewById(R.id.tv_title_num);
-
-            onEditorAction((EditText) newView.findViewById(R.id.et_copies));
-            onEditorAction((EditText) newView.findViewById(R.id.et_length));
-            onEditorAction((EditText) newView.findViewById(R.id.et_width));
-            onEditorAction((EditText) newView.findViewById(R.id.et_height));
-
-
-            //监听删除按钮
-            onClickVolumeDel(tvVolumeDel);
-
-            //index 获取插入卡板的第几个子元素
-            pallLayout.addView(newView,childCount-1);
-            setVolumeTitle(pallLayout);
-        } catch (Exception e) {
-            e.printStackTrace();
-            showErrorToast("添加失败");
-        }
-    }
-
-    //监听删除事件
-    private void onClickVolumeDel(View tvVolumeDel){
-        //监听删除材积
-        tvVolumeDel.setOnClickListener(new View.OnClickListener() {
-            @RequiresApi(api = Build.VERSION_CODES.KITKAT)
-            @Override
-            public void onClick(View v) {
-
-                try {
-
-                   final LinearLayout linearLayout = (LinearLayout) v.getParent().getParent().getParent();
-
-                    new AlertDialog.Builder(mContext)
-                            .setTitle(R.string.dl_hint)
-                            .setMessage("确定要删除材积信息吗?")
-                            .setNegativeButton(R.string.str_cancel, new DialogInterface.OnClickListener() {
-                                @Override
-                                public void onClick(DialogInterface dialogInterface, int i) {
-                                    dialogInterface.dismiss();
-                                }
-                            }).setPositiveButton(R.string.str_submit, new DialogInterface.OnClickListener() {
-                        @Override
-                        public void onClick(DialogInterface dialogInterface, int i) {
-                            LinearLayout pallLayout = (LinearLayout) linearLayout.getParent();
-                            linearLayout.removeAllViews();
-                            setVolumeTitle(pallLayout);
-                        }
-                    }).show();
-
-
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    showErrorToast("删除材积信息失败");
-                }
-
-            }
-        });
-    }
-
-    //设置卡板标题
-    private void setPalletTitle(){
-        int num = 1;
-        for(int j=0;j<llVolumeContent.getChildCount();j++) {
-            View view_c = llVolumeContent.getChildAt(j);
-            TextView tvPalletTitle = (TextView) view_c.findViewById(R.id.tv_pallet_num);
-            if (tvPalletTitle!=null){
-                tvPalletTitle.setText("卡板"+(num));
-                num++;
-            }
-
-        }
-    }
-    //设置材积标题
-    private void setVolumeTitle(LinearLayout pallLayout){
-        int num = 1;
-        for(int j=0;j<pallLayout.getChildCount();j++) {
-            View view_c = pallLayout.getChildAt(j);
-            if (view_c.findViewById(R.id.ll_volume_container)!=null){
-                TextView tvTitle = (TextView) view_c.findViewById(R.id.tv_title_num);
-                tvTitle.setText("材积信息("+num+")");
-                num++;
-            }
-        }
-    }
-    //监听所有输入框
-    private void onEditorAction(EditText editText){
-        editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-                    int len = llVolumeContent.getChildCount();
-                    int num = 0;//第几个卡板
-                    for(int i=0;i<len ;i++) {
-                        View view_c = llVolumeContent.getChildAt(i);
-                        EditText etWeight = (EditText) view_c.findViewById(R.id.et_weight);
-                        EditText etPalletWeight = (EditText) view_c.findViewById(R.id.et_pallet_weight);
-                        if (etWeight==null){
-                            continue;
-                        }
-                        num++;
-                        if (etWeight.getText().toString().isEmpty()){
-                            etWeight.requestFocus();
-                            return false;
-                        }
-                        if (etPalletWeight.getText().toString().isEmpty()){
-                            etPalletWeight.requestFocus();
-                            return false;
-                        }
-
-                        LinearLayout pallLayout = (LinearLayout) view_c.findViewById(R.id.ll_pall_center);
-                        int a = pallLayout.getChildCount();
-                        //2、查验卡板下是否有材积信息
-                        if (pallLayout.getChildCount()<4){
-                            showWarningToast("卡板"+(num)+"材积不能为空");
-                            //return true;
-                            continue; //不终止
-                        }
-
-
-                        //3、遍历卡板下的材积
-                        for(int j=2;j<pallLayout.getChildCount();j++) {
-                            View pallView = pallLayout.getChildAt(j);
-                            if (pallView.findViewById(R.id.et_copies)!=null){
-                                EditText etCopies = (EditText) pallView.findViewById(R.id.et_copies);
-                                if (etCopies.getText().toString().isEmpty()){
-                                    etCopies.requestFocus();
-                                    return false;
-                                }
-                                EditText etLength = (EditText) pallView.findViewById(R.id.et_length);
-                                if (etLength.getText().toString().isEmpty()){
-                                    etLength.requestFocus();
-                                    return false;
-                                }
-                                EditText etWidth = (EditText) pallView.findViewById(R.id.et_width);
-                                if (etWidth.getText().toString().isEmpty()){
-                                    etWidth.requestFocus();
-                                    return false;
-                                }
-                                EditText etHeight = (EditText) pallView.findViewById(R.id.et_height);
-                                if (etHeight.getText().toString().isEmpty()){
-                                    etHeight.requestFocus();
-                                    return false;
-                                }
-                            }
-                        }
-
-                    }
-
-                    //软键盘
-                    View view = getWindow().peekDecorView();
-                    if (view != null) {
-                        InputMethodManager inputmanger = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
-                        inputmanger.hideSoftInputFromWindow(view.getWindowToken(), 0);
-                    }
-
-                }
-                return false;
-            }
-        });
-    }
-
-    private void addReceive(){
-
-        if (!validate()){
-            return;
-        }
-
-
-        try {
-            //理货数量
-            int inbound_pieces  = inboundObject.getInt("inbound_pieces");
-            //预报数量
-            int forecast_pieces = inboundObject.getInt("forecast_pieces");
-            if (forecast_pieces>inbound_pieces+total_pieces){
-                new AlertDialog.Builder(TallyVolumeMainActivity.this)
-                        .setTitle(R.string.dl_hint)
-                        .setMessage("入库件数"+(inbound_pieces+total_pieces)+"与预报件数"+(forecast_pieces)+"不一致,确定是否入库")
-                        .setNegativeButton(R.string.str_cancel, new DialogInterface.OnClickListener() {
-                            @RequiresApi(api = Build.VERSION_CODES.KITKAT)
-                            @Override
-                            public void onClick(DialogInterface dialogInterface, int i) {
-                                dialogInterface.dismiss();
-                            }
-                        }).setPositiveButton(R.string.str_submit, new DialogInterface.OnClickListener() {
-                    @Override
-                    public void onClick(DialogInterface dialogInterface, int i) {
-                        addReceiveDo();
-                    }
-                }).show();
-            }else{
-                addReceiveDo();
-            }
-
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-
-
-        //数据检查不通过
-
-    }
-
-    private void addReceiveDo(){
-        try {
-            postParam = new JSONObject();
-            Gson gson = new Gson();
-            postParam.put("order_number",inboundObject.getString("order_number"));
-            postParam.put("docker_id",paramObject.getInt("docker_id"));
-            postParam.put("has_label",paramObject.getString("has_label"));
-            postParam.put("is_confirm",isConfirm);
-            postParam.put("receive_list",gson.toJson(volumeList));
-            postParam.put("action",action);
-            if (!checkRepeat(Urls.FMS_ADD_RECEIVE+(postParam.toString()))){return;}
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_ADD_RECEIVE).upJson(postParam)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    showSuccessToast(getString(R.string.str_tally_success));
-                                    Intent intent = new Intent();
-                                    intent.putExtra("opt_status", "success");
-                                    setResult(200, intent);//返回值,2 是改返回的标志,也会返回
-                                    finish();
-                                }else{
-                                    JSONObject result = new JSONObject();
-                                    if (bean.data!=null && !bean.data.isEmpty()){
-                                        result = new JSONObject(bean.data);
-                                    }
-                                    if (result.has("is_warning") && result.getInt("is_warning")==1){
-                                        new AlertDialog.Builder(TallyVolumeMainActivity.this)
-                                                .setTitle(R.string.dl_hint)
-                                                .setMessage(bean.msg)
-                                                .setNegativeButton("录入准确,拍照", new DialogInterface.OnClickListener() {
-                                                    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
-                                                    @Override
-                                                    public void onClick(DialogInterface dialogInterface, int i) {
-                                                        Bundle bundle = new Bundle();
-                                                        bundle.putString("inbound_object",inboundObject.toString());
-                                                        bundle.putString("param",paramObject.toString());
-                                                        bundle.putString("post_param",postParam.toString());
-                                                        intentPageResult(TallyVolumeMainActivity.this,TallyPictureMainActivity.class, bundle,200);
-                                                    }
-                                                }).setPositiveButton("重新录入", new DialogInterface.OnClickListener() {
-                                            @Override
-                                            public void onClick(DialogInterface dialogInterface, int i) {
-                                                //取消不做操作
-
-                                            }
-                                        }).show();
-                                    }else {
-                                        showWarningToast(bean.msg);
-                                    }
-
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                XLog.e("添加理货数据结果返回错误",e.getMessage());
-                            }
-                        }
-                    });
-        } catch (JSONException e) {
-            XLog.e("sku数据解析出错",e);
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 72
app/src/main/java/com/fxy/fms/putIn/bean/InboundBean.java

@@ -1,72 +0,0 @@
-package com.fxy.fms.putIn.bean;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class InboundBean implements Parcelable {
-    //{"order_number":"GL032400001","customer_name":"美国客户","product_name":"换号服务专用产品","domestic_wms_location":"","receive_country":"","forecast_pieces":""}
-    private String order_number = ""; // 入库订单编号
-    private String customer_name = ""; // 用户名称
-    private String customer_code = ""; // 用户名称
-    private String receive_country = ""; //收件人国家
-    private String product_name = ""; //物流产品
-    private Integer forecast_pieces = 0; //预报数量
-    private String domestic_wms_location = "";
-
-    protected InboundBean(Parcel in) {
-        order_number = in.readString();
-        customer_name = in.readString();
-        customer_code = in.readString();
-        receive_country = in.readString();
-        product_name = in.readString();
-        if (in.readByte() == 0) {
-            forecast_pieces = null;
-        } else {
-            forecast_pieces = in.readInt();
-        }
-        domestic_wms_location = in.readString();
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(order_number);
-        dest.writeString(customer_name);
-        dest.writeString(customer_code);
-        dest.writeString(receive_country);
-        dest.writeString(product_name);
-        if (forecast_pieces == null) {
-            dest.writeByte((byte) 0);
-        } else {
-            dest.writeByte((byte) 1);
-            dest.writeInt(forecast_pieces);
-        }
-        dest.writeString(domestic_wms_location);
-    }
-
-    public InboundBean() {
-    }
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    public static final Creator<InboundBean> CREATOR = new Creator<InboundBean>() {
-        @Override
-        public InboundBean createFromParcel(Parcel in) {
-            return new InboundBean(in);
-        }
-
-        @Override
-        public InboundBean[] newArray(int size) {
-            return new InboundBean[size];
-        }
-    };
-
-    public String getInboundNumber() {return order_number; }
-    public String getCustomerName() {return customer_name; }
-    public String getCustomerCode() {return customer_code; }
-    public String getReceiverCountry() {return receive_country; }
-    public String getProductName() {return product_name; }
-    public Integer getForecastPieces() {return forecast_pieces; }
-    public String getLocationNumber() {return domestic_wms_location; }
-}

+ 0 - 641
app/src/main/java/com/fxy/fms/putOut/StorageAddMainActivity.java

@@ -1,641 +0,0 @@
-package com.fxy.fms.putOut;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.widget.EditText;
-import android.widget.ImageButton;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.qrcode.ActivityScanerCode;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.baselibrary.util.StringUtils;
-import com.fxy.baselibrary.views.MarqueeTextView;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class StorageAddMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    @BindView(R.id.mt_outbound_number)
-    MarqueeTextView mtOutboundNumber;
-
-    //单号清除
-    @BindView(R.id.ib_order_no_clear)
-    ImageButton ibOrderNoClear;
-
-    //单号
-    @BindView(R.id.et_order_no)
-    EditText etOrderNo;
-
-    //单号
-    @BindView(R.id.et_order_qty)
-    EditText etOrderQty;
-
-
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
-
-    @BindView(R.id.ll_storage_details)
-    LinearLayout llStorageDetails;
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    protected String action;
-
-    //订单信息对象
-    private JSONObject outboundObject;
-
-    //装柜信息
-    private JSONObject storageObject;
-
-    private JSONObject postParam = new JSONObject();
-
-    private Unbinder unbinder;
-
-    //订单号
-    private String orderNumber;
-
-    private String loadingQty;
-
-    private ViewLogic viewLogic;
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_storage_add;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        try {
-            outboundObject = new JSONObject(bundle.getString("outbound_object"));
-            postParam = new JSONObject(bundle.getString("post_param"));
-            action = bundle.getString("action","storage");
-        } catch (JSONException e) {
-            XLog.e("接收数据解析:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-//        XLog.e("requestCode:"+requestCode);
-//        XLog.e("resultCode:"+resultCode);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-            String  opt_status    = data.getStringExtra("opt_status").toString();
-            if (opt_status.equals("success")){
-                clearData();
-                getStorageInfo();
-            }
-        }else if (resultCode==0){
-
-
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        viewLogic = new ViewLogic(llStorageDetails);
-        setTitleName("装柜扫描");
-        initEdit();
-        initData();
-        //监听浮动按钮
-        iv_drag.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if(!iv_drag.isDrag()){
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-            }
-        });
-
-    }
-
-
-    private void initData(){
-        try {
-            mtOutboundNumber.setText(outboundObject.getString("outbound_number"));
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-        getStorageInfo();
-
-    }
-
-    public void getStorageInfo(){
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("outbound_number",outboundObject.getString("outbound_number"));
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_GET_OUTBOUND_INFO).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    JSONObject data = new JSONObject(bean.data);
-                                    viewLogic.setOutbound(data,null);
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                showWarningToast("获取获取排舱解析错误:"+e.getMessage());
-                                e.printStackTrace();
-                                XLog.e("获取获取排舱解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            showWarningToast(e.getMessage());
-            XLog.e("请求获取排舱信息错误:",e);
-        }
-    }
-
-
-
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                addStorage();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-        //
-        etOrderNo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-                    String orderNo = etOrderNo.getText().toString().trim();
-                    if (StringUtils.isEmpty(orderNo)) {
-                        setEditTextFocused(v,true);
-                        showWarningToast(v.getHint().toString());
-                        return false;
-                    }
-                    checkOrder();//获取订单信息
-                    return false;
-                }
-                return false;
-            }
-        });
-        etOrderNo.addTextChangedListener(new TextWatcher() {
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                orderNumber = s.toString().trim();
-                if (s.length() > 0 ) {
-                    if (etOrderNo.isEnabled()){
-                        ibOrderNoClear.setVisibility(View.VISIBLE);
-                    }
-                    setEditTextNormal(etOrderNo,true);
-                } else {
-                    ibOrderNoClear.setVisibility(View.INVISIBLE);
-                    setEditTextFocused(etOrderNo,true);
-                }
-            }
-
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-            }
-
-            public void afterTextChanged(Editable s) {
-
-            }
-        });
-        ibOrderNoClear.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                etOrderNo.requestFocus();
-                etOrderNo.getText().clear();
-            }
-        });
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    checkOrder();
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-    private void checkOrder(){
-        final String orderNo = etOrderNo.getText().toString().trim();
-        if (orderNo.isEmpty()){
-            return;
-        }
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("order_number",orderNo);
-            jsonObject.put("outbound_number",outboundObject.getString("outbound_number"));
-            jsonObject.put("action",action);
-            if (!checkRepeat(Urls.FMS_OUTBOUND_CHECK_ORDER+(jsonObject.toString()))){
-                Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
-                return;
-            }
-
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_OUTBOUND_CHECK_ORDER).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    storageObject = new JSONObject(bean.data);
-                                    //设置订单信息
-                                    etOrderQty.requestFocus();
-
-                                    //更新数据
-                                    getStorageInfo();
-                                }else{
-                                    storageObject = null;
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                showEmptyView("出库检查订单信息解析错误:"+e.getMessage());
-                                XLog.e("出库检查订单信息解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            storageObject = null;
-            XLog.e("出库检查订单信息错误:",e);
-        }
-    }
-
-
-    private void addStorage() {
-
-        //校验数据
-        if (!validate()){
-            return;
-        }
-        if (storageObject==null){
-            checkOrder();
-            return;
-        }
-        orderNumber = etOrderNo.getText().toString().trim();
-        loadingQty = etOrderQty.getText().toString().trim();
-
-        try {
-            postParam.put("loading_qty",loadingQty);
-            postParam.put("order_number",orderNumber);
-            if (!checkRepeat(Urls.FMS_ADD_STORAGE+(postParam.toString()))){return;}
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_ADD_STORAGE).upJson(postParam)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    showSuccessToast(bean.msg);
-                                    clearData();
-                                    getStorageInfo();
-                                }else{
-
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                XLog.e("添加理货数据结果返回错误",e.getMessage());
-                            }
-                        }
-                    });
-        } catch (JSONException e) {
-            showEmptyView("数据组装失败:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-
-    }
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        if(!checkNull(etOrderNo)){
-            setEditTextFocused(etOrderNo,true);
-            showWarningToast(getString(R.string.hint_please_scan_no));
-            return false;
-        }
-        if(!checkNull(etOrderQty)){
-            setEditTextFocused(etOrderQty,true);
-            showWarningToast(etOrderQty.getHint().toString());
-            return false;
-        }
-        return true;
-    }
-
-
-    //清除订单信息
-    private void clearData() {
-        etOrderNo.setText("");
-        etOrderQty.setText("");
-        etOrderNo.requestFocus();
-
-    }
-
-    @OnClick({R.id.btn_add_loader,R.id.btn_finish,R.id.tv_not_look,R.id.tv_has_look,R.id.ima_or_code})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-            case R.id.btn_add_loader:
-                addStorage();;
-
-                break;
-            case R.id.btn_finish:
-                bundle.putString("outbound_object",outboundObject.toString());
-                bundle.putString("action",action);
-                intentPageResult(this, StorageFinishMainActivity.class, bundle,200);
-                break;
-            case R.id.ima_or_code:
-                if(etOrderNo.isEnabled()){
-                    etOrderNo.requestFocus();
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-                break;
-            case R.id.tv_not_look:
-                toChecklist(10);
-                break;
-            case R.id.tv_has_look:
-                toChecklist(20);
-                break;
-
-            default:
-                break;
-        }
-    }
-
-    private void toChecklist(int status){
-        Bundle bundle = new Bundle();
-        try {
-            JSONObject paramObject = new JSONObject();
-            paramObject.put("outbound_number",outboundObject.getString("outbound_number"));
-            paramObject.put("status",status);
-            bundle.putString("param_object",paramObject.toString());
-            bundle.putString("action",action);
-            intentPageResult(this, StorageChecklistMainActivity.class, bundle,200);
-        } catch (JSONException e) {
-            XLog.e("调整参数错误"+e.getMessage());
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 620
app/src/main/java/com/fxy/fms/putOut/StorageCancelMainActivity.java

@@ -1,620 +0,0 @@
-package com.fxy.fms.putOut;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.widget.EditText;
-import android.widget.ImageButton;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.qrcode.ActivityScanerCode;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.baselibrary.util.StringUtils;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class StorageCancelMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    //单号清除
-    @BindView(R.id.ib_order_no_clear)
-    ImageButton ibOrderNoClear;
-
-    //单号
-    @BindView(R.id.et_order_no)
-    EditText etOrderNo;
-
-    //单号清除
-    @BindView(R.id.ib_outbound_number_clear)
-    ImageButton ibOutboundNumberClear;
-
-    //单号
-    @BindView(R.id.et_outbound_number)
-    EditText etOutboundNumber;
-
-
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
-
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    protected String action;
-
-    //订单信息对象
-    private JSONObject outboundObject;
-
-    private Unbinder unbinder;
-
-
-    //搬运工队列
-    private JSONArray dockerList;
-
-    private Integer selectId=0;
-
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_storage_cancel;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        action = bundle.getString("action","receive");
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-//        XLog.e("requestCode:"+requestCode);
-//        XLog.e("resultCode:"+resultCode);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-            String  opt_status    = data.getStringExtra("opt_status").toString();
-            if (opt_status.equals("success")){
-                clearData();
-            }
-        }else if (resultCode==0){
-
-
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("撤销装柜");
-        initEdit();
-
-        //loadServiceData();
-        initData();
-
-        //监听浮动按钮
-        iv_drag.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if(!iv_drag.isDrag()){
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-            }
-        });
-
-    }
-
-
-    private void initData(){
-
-
-    }
-
-
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                cancelStorage();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-
-
-
-        //
-        etOutboundNumber.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-                    String str = etOutboundNumber.getText().toString().trim();
-                    if (StringUtils.isEmpty(str)) {
-                        setEditTextFocused(v,true);
-                        showWarningToast(v.getHint().toString());
-                        return false;
-                    }
-                    getOutboundInfo();//获取订单信息
-                    return false;
-                }
-                return false;
-            }
-        });
-        etOutboundNumber.addTextChangedListener(new TextWatcher() {
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                s = s.toString().trim();
-                if (s.length() > 0 ) {
-                    if (etOutboundNumber.isEnabled()){
-                        ibOutboundNumberClear.setVisibility(View.VISIBLE);
-                    }
-                    setEditTextNormal(etOutboundNumber,true);
-                } else {
-                    ibOutboundNumberClear.setVisibility(View.INVISIBLE);
-                    setEditTextFocused(etOutboundNumber,true);
-                }
-            }
-
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-            }
-
-            public void afterTextChanged(Editable s) {
-
-            }
-        });
-        ibOutboundNumberClear.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                etOutboundNumber.requestFocus();
-                etOutboundNumber.getText().clear();
-            }
-        });
-
-
-        //
-        etOrderNo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-                    String orderNo = etOrderNo.getText().toString().trim();
-                    if (StringUtils.isEmpty(orderNo)) {
-                        setEditTextFocused(v,true);
-                        showWarningToast(v.getHint().toString());
-                        return false;
-                    }
-                    cancelStorage();//获取订单信息
-                    return false;
-                }
-                return false;
-            }
-        });
-        etOrderNo.addTextChangedListener(new TextWatcher() {
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                s = s.toString().trim();
-                if (s.length() > 0 ) {
-                    if (etOrderNo.isEnabled()){
-                        ibOrderNoClear.setVisibility(View.VISIBLE);
-                    }
-                    setEditTextNormal(etOrderNo,true);
-                } else{
-                    ibOrderNoClear.setVisibility(View.INVISIBLE);
-
-                    if (!etOutboundNumber.getText().toString().isEmpty()){
-                        setEditTextFocused(etOrderNo,true);
-                    }
-                }
-            }
-
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-            }
-
-            public void afterTextChanged(Editable s) {
-
-            }
-        });
-        ibOrderNoClear.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                etOrderNo.requestFocus();
-                etOrderNo.getText().clear();
-            }
-        });
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    cancelStorage();
-                    break;
-                case R.id.et_outbound_number:
-                    getOutboundInfo();
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-    private void getOutboundInfo(){
-        final String outboundNumber = etOutboundNumber.getText().toString().trim();
-        if (outboundNumber.isEmpty()){
-            return;
-        }
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("outbound_number",outboundNumber);
-            jsonObject.put("action",action);
-            if (!checkRepeat(Urls.FMS_CHECK_OUTBOUND+(jsonObject.toString()))){
-                Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
-                return;
-            }
-
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_CHECK_OUTBOUND).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    //showSuccessToast(bean.msg);
-                                    etOrderNo.requestFocus();
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                showEmptyView("出库订单信息解析错误:"+e.getMessage());
-                                XLog.e("获取出库订单信息解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            outboundObject = null;
-            XLog.e("请求出库订单信息错误:",e);
-        }
-    }
-
-
-    private void cancelStorage() {
-
-        //校验数据
-        if (!validate()){
-            return;
-        }
-
-        String orderNumber = etOrderNo.getText().toString().trim();
-        String outboundNumber = etOutboundNumber.getText().toString().trim();
-
-        try {
-            JSONObject param = new JSONObject();
-            param.put("order_number",orderNumber);
-            param.put("outbound_number",outboundNumber);
-            param.put("action",action);
-            if (!checkRepeat(Urls.FMS_CANCEL_STORAGE+(param.toString()))){return;}
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_CANCEL_STORAGE).upJson(param)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    showSuccessToast(bean.msg);
-                                    clearData();
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                showErrorToast("数据解析失败"+e.getMessage());//不需要翻译
-                                e.printStackTrace();
-                                XLog.e("开始拣货结果返回错误",e.getMessage());
-                            }
-                        }
-                    });
-
-
-        } catch (JSONException e) {
-            showEmptyView("数据组装失败:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-
-    }
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        if(!checkNull(etOutboundNumber)){
-            setEditTextFocused(etOutboundNumber,true);
-            showWarningToast(etOutboundNumber.getHint().toString());
-            return false;
-        }
-        if(!checkNull(etOrderNo)){
-            setEditTextFocused(etOrderNo,true);
-            showWarningToast(etOrderNo.getHint().toString());
-            return false;
-        }
-        return true;
-    }
-
-
-    //清除订单信息
-    private void clearData() {
-        etOrderNo.setText("");
-        etOutboundNumber.setText("");
-        etOutboundNumber.requestFocus();
-    }
-
-    @OnClick({R.id.ima_or_code,R.id.btn_confirm,R.id.ima_or_code_two})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-            case R.id.btn_confirm:
-                cancelStorage();
-
-                break;
-            case R.id.ima_or_code:
-                if(etOutboundNumber.isEnabled()){
-                    etOutboundNumber.requestFocus();
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-
-                break;
-            case R.id.ima_or_code_two:
-                if(etOrderNo.isEnabled()){
-                    etOrderNo.requestFocus();
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(StorageCancelMainActivity.this, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-                break;
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 448
app/src/main/java/com/fxy/fms/putOut/StorageChecklistMainActivity.java

@@ -1,448 +0,0 @@
-package com.fxy.fms.putOut;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.EditText;
-
-import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.BaseViewHolder;
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class StorageChecklistMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-
-
-    @BindView(R.id.rc_storage_check_list)
-    RecyclerView rcStorageCheckList;
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    private Unbinder unbinder;
-
-    //待查验数据
-    private List<JSONObject> checkList = new ArrayList<>(); ;
-
-    private AvailableFinishWorkAdapter listAdapter;
-    // 空显示页
-    private View emptyView;
-
-    private JSONObject paramObject;
-
-    protected String action;
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_storage_check_list;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        try {
-            paramObject = new JSONObject(bundle.getString("param_object"));
-            action = bundle.getString("action","storage");
-        } catch (JSONException e) {
-            XLog.e("接收数据解析:"+e.getMessage());
-            e.printStackTrace();
-        }
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("已装柜清单");
-
-        initEdit();
-
-        initAdapter();
-
-        //loadServiceData();
-
-        initData();
-
-
-    }
-
-    private void initData(){
-        getWaitCheckList();
-    }
-
-
-    private void getWaitCheckList(){
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("outbound_number",paramObject.getString("outbound_number"));
-            jsonObject.put("status",paramObject.getInt("status"));
-
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_OUTBOUND_DETAIL).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-
-                                if(bean.code == 1){
-                                    checkList.clear();
-                                    if (!bean.data.isEmpty()&& !bean.data.equals("[]")){
-                                        JSONArray list = new JSONArray(bean.data);
-                                        for (int i = 0; i<list.length(); i++){
-                                            checkList.add(list.getJSONObject(i));
-                                        }
-                                    }
-                                    listAdapter.notifyDataSetChanged();
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                                int count = checkList.size();
-                                String TitleName= paramObject.getInt("status")==10?"未装柜清单("+count+")":"已装柜清单("+count+")";
-                                setTitleName(TitleName);
-                                //PC-2021032611414 PC-2021032611414
-                                //PC-2021032611414
-
-                            } catch (Exception e) {
-                                showWarningToast("获取订单清单列表解析错误:"+e.getMessage());
-                                e.printStackTrace();
-                                XLog.e("获取订单清单列表解析错误",e.getMessage());
-                            }
-                        }//PC-2021032611414
-                    });
-        }catch (Exception e){
-            showWarningToast(e.getMessage());
-            XLog.e("请求订单清单列表信息错误:",e);
-        }
-    }
-
-
-
-
-    private void initAdapter() {
-
-        emptyView = this.getLayoutInflater().inflate(R.layout.pager_empty, (ViewGroup) rcStorageCheckList.getParent(), false);
-        listAdapter = new AvailableFinishWorkAdapter(checkList);
-        listAdapter.setEmptyView(emptyView);
-        listAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
-        rcStorageCheckList.setLayoutManager(new LinearLayoutManager(this));
-        rcStorageCheckList.setAdapter(listAdapter);
-        // 卡片项点击事件
-        listAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-            @Override
-            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                //showLoadDialog("开始调整查验...");
-            }
-        });
-    }
-
-    private class AvailableFinishWorkAdapter extends BaseQuickAdapter<JSONObject, BaseViewHolder> {
-        public AvailableFinishWorkAdapter(List<JSONObject> data) {
-            super(R.layout.item_storage_check_list, data);
-        }
-
-        @Override
-        protected void convert(BaseViewHolder holder, JSONObject jsonObject) {
-            XLog.e(jsonObject);
-            try {
-                holder.setText(R.id.mt_order_number, jsonObject.has("order_number")?jsonObject.getString("order_number"):"");
-                holder.setText(R.id.mt_inbound_pieces, jsonObject.has("order_number")?jsonObject.getString("inbound_pieces"):"");
-                holder.setText(R.id.mt_load_date, jsonObject.has("order_number")?jsonObject.getString("inbound_date"):"");
-            } catch (Exception e) {
-                XLog.e("查询结果数据渲染失败:"+e.getMessage());
-                e.printStackTrace();
-            }
-
-        }
-    }
-
-
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-
-
-
-
-
-    @OnClick({})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 0 - 377
app/src/main/java/com/fxy/fms/putOut/StorageFinishMainActivity.java

@@ -1,377 +0,0 @@
-package com.fxy.fms.putOut;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Message;
-import android.support.v7.widget.RecyclerView;
-import android.view.KeyEvent;
-import android.view.View;
-import android.widget.LinearLayout;
-
-import androidx.annotation.RequiresApi;
-
-import com.elvishew.xlog.XLog;
-import com.google.gson.Gson;
-import com.luck.picture.lib.config.PictureConfig;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.R;
-import com.fxy.common.PictureSelectorUpload;
-import com.fxy.bean.ActionBean;
-import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-
-public class StorageFinishMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-
-    @BindView(R.id.rv_show_img)
-    RecyclerView rvShowImg;
-
-    @BindView(R.id.ll_storage_details)
-    LinearLayout llStorageDetails;
-
-    private PictureSelectorUpload pictureSelectorUpload;
-
-    private ViewLogic viewLogic;
-
-    protected String action;
-
-    //订单信息对象
-    private JSONObject outboundObject;
-
-    //装柜信息
-    private JSONObject storageObject;
-
-
-    private JSONObject postParam = new JSONObject();
-
-    private Unbinder unbinder;
-
-    private String isConfirm = "N";
-
-    private ArrayList photoList =new ArrayList<>();
-
-
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_storage_finish;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        try {
-            outboundObject = new JSONObject(bundle.getString("outbound_object"));
-            action = bundle.getString("action","storage");
-        } catch (JSONException e) {
-            XLog.e("接收数据解析:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (resultCode == RESULT_OK) {
-            if (requestCode == PictureConfig.CHOOSE_REQUEST) {// 图片选择结果回调
-                pictureSelectorUpload.getSelectImg(data);
-            }
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("完成装柜");
-        viewLogic = new ViewLogic(llStorageDetails);
-        initData();
-        initEdit();
-        pictureSelectorUpload = new PictureSelectorUpload(StorageFinishMainActivity.this,rvShowImg,"load");
-    }
-
-
-    private void initData(){
-
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("outbound_number",outboundObject.getString("outbound_number"));
-
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_GET_OUTBOUND_INFO).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    storageObject = new JSONObject(bean.data);
-                                    viewLogic.setOutbound(storageObject,outboundObject);
-                                }else{
-
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                showWarningToast("获取获取排舱解析错误:"+e.getMessage());
-                                e.printStackTrace();
-                                XLog.e("获取获取排舱解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            showWarningToast(e.getMessage());
-            XLog.e("请求获取排舱信息错误:",e);
-        }
-    }
-
-
-
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                finishStorage();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-
-
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-    }
-
-    private void initEdit() {
-
-
-    }
-
-
-
-    private void finishStorage() {
-
-        //校验数据
-        if (!validate()){
-            return;
-        }
-        try {
-            Gson gson = new Gson();
-            postParam.put("outbound_number",outboundObject.getString("outbound_number"));
-            postParam.put("is_confirm",isConfirm);
-            postParam.put("photo",gson.toJson(photoList));
-
-
-            if (!checkRepeat(Urls.FMS_FINISH_STORAGE+(postParam.toString()))){return;}
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_FINISH_STORAGE).upJson(postParam)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    showSuccessToast(bean.msg);
-                                    Intent intent = new Intent();
-                                    intent.putExtra("opt_status", "success");
-                                    setResult(200, intent);//返回值,200 是改返回的标志,也会返回
-                                    finish();
-
-                                }else{
-
-                                    JSONObject result = new JSONObject();
-                                    if (bean.data!=null && !bean.data.isEmpty()){
-                                        result = new JSONObject(bean.data);
-                                    }
-                                    //is_warning
-                                    if (result.has("is_warning") && result.getInt("is_warning")==1) {
-                                        new AlertDialog.Builder(mContext)
-                                                .setTitle(R.string.dl_hint)
-                                                .setMessage(bean.msg)
-                                                .setNegativeButton(R.string.str_submit, new DialogInterface.OnClickListener() {
-                                                    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
-                                                    @Override
-                                                    public void onClick(DialogInterface dialogInterface, int i) {
-                                                        isConfirm = "Y";
-                                                        finishStorage();
-                                                    }
-                                                }).setPositiveButton(R.string.str_cancel, new DialogInterface.OnClickListener() {
-                                            @Override
-                                            public void onClick(DialogInterface dialogInterface, int i) {
-                                                //取消不做操作
-
-                                            }
-                                        }).show();
-
-                                    }else{
-                                        showWarningToast(bean.msg);
-                                        isConfirm = "N";
-                                    }
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                XLog.e("添加理货数据结果返回错误",e.getMessage());
-                            }
-                        }
-                    });
-        } catch (JSONException e) {
-            showEmptyView("数据组装失败:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-
-    }
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        photoList = pictureSelectorUpload.getPhotoList();
-        if (photoList.size()==0){
-            showWarningToast("请拍照拍照");
-            return false;
-        }
-        return true;
-    }
-
-
-
-
-    @OnClick({R.id.btn_empty_remake,R.id.btn_finish,R.id.tv_not_look,R.id.tv_has_look})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-            case R.id.btn_empty_remake:
-                pictureSelectorUpload.emptyRemake();
-
-                break;
-            case R.id.btn_finish:
-                finishStorage();
-                break;
-            case R.id.tv_not_look:
-                toChecklist(10);
-                break;
-            case R.id.tv_has_look:
-                toChecklist(20);
-                break;
-
-            default:
-                break;
-        }
-    }
-
-    private void toChecklist(int status){
-        Bundle bundle = new Bundle();
-        try {
-            //PC-2021032611414
-            JSONObject paramObject = new JSONObject();
-            paramObject.put("outbound_number",outboundObject.getString("outbound_number"));
-            paramObject.put("status",status);
-            bundle.putString("param_object",paramObject.toString());
-            bundle.putString("action",action);
-            intentPageResult(this, StorageChecklistMainActivity.class, bundle,200);
-        } catch (JSONException e) {
-            XLog.e("调整参数错误"+e.getMessage());
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-        pictureSelectorUpload.removeHandler();
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-
-    }
-
-
-}

+ 0 - 623
app/src/main/java/com/fxy/fms/putOut/StorageStartMainActivity.java

@@ -1,623 +0,0 @@
-package com.fxy.fms.putOut;
-
-import android.annotation.SuppressLint;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.widget.EditText;
-import android.widget.ImageButton;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.elvishew.xlog.XLog;
-import com.google.zxing.Result;
-import com.jaredrummler.materialspinner.MaterialSpinner;
-import com.lzy.okgo.OkGo;
-import com.lzy.okgo.model.Response;
-import com.fxy.baselibrary.base.BaseActivity;
-import com.fxy.baselibrary.bean.BaseEventBusBean;
-import com.fxy.baselibrary.interfaces.OnRxScanerListener;
-import com.fxy.baselibrary.qrcode.ActivityScanerCode;
-import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.baselibrary.util.StringUtils;
-import com.fxy.R;
-import com.fxy.bean.ActionBean;
-import com.fxy.bean.ScanBean;
-import com.fxy.constant.BaseConfig;
-import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
-import com.fxy.net.MyDialogCallback;
-import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-import butterknife.Unbinder;
-import sto.android.app.StoJNI;
-import sto.android.app.StoPdaKeyEvent;
-import sto.android.app.StoTongJNI;
-
-public class StorageStartMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
-    /**
-     * 列表适配器
-     */
-    Context mContext = this;
-    //单号清除
-    @BindView(R.id.ib_order_no_clear)
-    ImageButton ibOrderNoClear;
-
-    //单号
-    @BindView(R.id.et_order_no)
-    EditText etOrderNo;
-
-
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
-
-
-    @BindView(R.id.ms_docker_list)
-    MaterialSpinner DockerSpinner;
-
-    @BindView(R.id.ll_storage_info)
-    LinearLayout llStorageInfo;
-
-
-
-    //扫码扫码动作
-    private ScanBean scanBean;
-
-    protected String action;
-
-    //订单信息对象
-    private JSONObject outboundObject;
-
-
-
-
-    private Unbinder unbinder;
-
-    //订单号
-    private String orderNumber;
-
-    //搬运工队列
-    private JSONArray dockerList;
-
-    private Integer selectId=0;
-
-
-    @Override
-    public int getContentViewResId() {
-        return R.layout.activity_fms_storage_start;
-    }
-
-    @Override
-    public boolean showToolBar() {
-        return true;
-    }
-
-    @Override
-    public boolean openEventBus() {
-        return true;
-    }
-
-    @Override
-    protected void getBundleExtras(Bundle bundle) {
-        action = bundle.getString("action","storage");
-    }
-    //finish的返回监听
-    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
-    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
-    //第三个参数包含了返回的值
-    //如果不需要所跳转的页面返回值,也就不需要这个方法了
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-//        XLog.e("requestCode:"+requestCode);
-//        XLog.e("resultCode:"+resultCode);
-        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
-        {
-            String  opt_status    = data.getStringExtra("opt_status").toString();
-            if (opt_status.equals("success")){
-                clearData();
-            }
-        }else if (resultCode==0){
-
-
-        }
-    }
-
-
-    /**
-     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
-     *
-     * @param event
-     */
-    @Override
-    protected void EventBean(BaseEventBusBean event) {
-//        XLog.e("----------接收返回--------------");
-//        XLog.e("接收返回:"+event.getEventCode());
-        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
-
-        }
-    }
-
-    @Override
-    public boolean isPlayMusic() {
-        return true;
-    }
-
-    @Override
-    protected void initView() {
-        unbinder = ButterKnife.bind(this);
-        setTitleName("出库操作");
-
-        initEdit();
-
-
-        //loadServiceData();
-        initData();
-
-        //监听浮动按钮
-        iv_drag.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if(!iv_drag.isDrag()){
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-            }
-        });
-
-    }
-
-
-    private void initData(){
-
-        try {
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_DOCKER_LIST)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                List<String> spinnerList = new ArrayList<String>();
-                                spinnerList.add("请选择搬运小组");
-                                if(bean.code == 1){
-                                    JSONObject data = new JSONObject(bean.data);
-                                    dockerList = new JSONArray(data.getString("docker_list"));
-
-                                    for (int i = 0;i < dockerList.length(); i++){
-                                        JSONObject jsonObject =dockerList.getJSONObject(i);
-                                        spinnerList.add(jsonObject.getString("name"));
-                                    }
-                                    DockerSpinner.setItems(spinnerList);
-
-                                }else{
-                                    showWarningToast(bean.msg);
-                                }
-                                DockerSpinner.setSelectedIndex(selectId);
-                                initSpinner();
-                            } catch (Exception e) {
-                                showWarningToast("获取搬运小组解析错误:"+e.getMessage());
-                                e.printStackTrace();
-                                XLog.e("获取搬运小组解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            showWarningToast(e.getMessage());
-            XLog.e("请求入库订单信息错误:",e);
-        }
-    }
-
-    /**
-     *  初始化下拉框控件值
-     */
-    private void initSpinner() {
-        DockerSpinner.setOnItemSelectedListener(new MaterialSpinner.OnItemSelectedListener<String>() {
-            @Override public void onItemSelected(MaterialSpinner view, int position, long id, String item) {
-               // XLog.e(id);XLog.e(item);
-                selectId = position;
-                if (position>0){
-                    setEditTextNormal(DockerSpinner,false);
-                }
-            }
-        });
-    }
-
-
-
-
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
-        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER || event.getKeyCode()==KeyEvent.KEYCODE_ENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                startStorage();
-            }
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    //监听按键
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        XLog.e("监听按键:"+keyCode);XLog.e(event);
-        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
-                && event.getRepeatCount() == 0) {
-
-            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
-//
-            } else {
-                StoTongJNI.getIns(mContext).SetScannerStart();
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @SuppressLint("HandlerLeak")
-    Handler scanHandler = new Handler() {
-
-        @Override
-        public void handleMessage(Message msg) {
-            // TODO Auto-generated method stub
-            if (msg.obj != null) {
-
-                String scanResult = msg.obj.toString().trim();
-                if (!scanResult.isEmpty()){
-                    setScanResult(scanResult);
-                }
-            }
-
-        }
-
-    };
-    @Override
-    public void onScanResults(String str) {
-        Message msg = new Message();
-        msg.obj = str;
-        scanHandler.sendMessage(msg);
-
-
-    }
-
-
-    @Override
-    public void onScanResults(String str, int type) {
-
-    }
-    /**
-     * 定义广播接受
-     */
-    BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String scanResult = intent.getStringExtra(scanBean.getDataName());
-            if (scanResult==null){return; }
-            String scanStatus = "";
-            if (!scanBean.getStatusName().isEmpty()){
-                scanStatus = intent.getStringExtra(scanBean.getStatusName());
-            }else{
-                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
-            }
-
-            //新大陆(MT65,MT90) 需要手动关闭
-            if (!scanBean.getActionStop().isEmpty()){
-                Intent stopIntent = new Intent(scanBean.getActionStop());
-                mContext.sendBroadcast(stopIntent);
-            }
-
-            if ("ok".equals(scanStatus)){
-                setScanResult(scanResult);
-            }else{
-                showErrorToast(getString(R.string.scan_failed));
-            }
-        }
-    };
-
-    /**
-     * 注册广播
-     */
-    private void initReceiver(){
-
-        try {
-
-            String scanStr = getScanSetting();
-            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-
-            if (is_broadcast ==1){
-                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
-                this.registerReceiver(mReceiver, mFilter);
-            }else{
-                //不广播进行处理 jni模式
-                String pdaBrand = StoTongJNI.getmPdaBrand();
-                if (!pdaBrand.isEmpty()){
-                    StoTongJNI.getIns(this).setmScanCB(this);
-                    StoTongJNI.getIns(this).SetScannerOn();
-                }
-            }
-
-
-        }catch (Exception e) {
-            showErrorToast("获取扫码配置失败"+e.getMessage());
-            XLog.e("获取扫码配置失败:" + e.getMessage());
-        }
-    }
-
-    private void initEdit() {
-
-        //
-        etOrderNo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-                    String orderNo = etOrderNo.getText().toString().trim();
-                    if (StringUtils.isEmpty(orderNo)) {
-                        setEditTextFocused(v,true);
-                        showWarningToast(v.getHint().toString());
-                        return false;
-                    }
-                    getOutboundInfo();//获取订单信息
-                    return false;
-                }
-                return false;
-            }
-        });
-        etOrderNo.addTextChangedListener(new TextWatcher() {
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                orderNumber = s.toString().trim();
-                if (s.length() > 0 ) {
-                    if (etOrderNo.isEnabled()){
-                        ibOrderNoClear.setVisibility(View.VISIBLE);
-                    }
-                    setEditTextNormal(etOrderNo,true);
-                } else {
-                    ibOrderNoClear.setVisibility(View.INVISIBLE);
-                    setEditTextFocused(etOrderNo,true);
-                }
-            }
-
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-            }
-
-            public void afterTextChanged(Editable s) {
-
-            }
-        });
-        ibOrderNoClear.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                etOrderNo.requestFocus();
-                etOrderNo.getText().clear();
-            }
-        });
-    }
-
-    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
-        @Override
-        public void onSuccess(String type, Result result) {
-            String scanResult = result.getText();
-            switch (type){
-                case BaseConfig.COMMON_SCANNER_ONLY:
-                    setScanResult(scanResult);
-
-                    break;
-            }
-        }
-        @Override
-        public void onFail(String type, String message) {
-
-        }
-    };
-
-    //把扫描结果赋值
-    private void setScanResult(String scanResult){
-        //获取焦点的view对象
-        View view=getWindow().getDecorView().findFocus();
-        //如果是EditText
-        if(view instanceof EditText)
-        {
-            ((EditText) view).setText(scanResult);
-
-            switch (view.getId()) {
-                case R.id.et_order_no:
-                    getOutboundInfo();
-                    break;
-                default:
-            }
-
-
-        }
-    }
-
-
-    private void getOutboundInfo(){
-        final String orderNo = etOrderNo.getText().toString().trim();
-        if (orderNo.isEmpty()){
-            return;
-        }
-        try {
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("outbound_number",orderNo);
-            jsonObject.put("action",action);
-            if (!checkRepeat(Urls.FMS_CHECK_OUTBOUND+(jsonObject.toString()))){
-                Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
-                return;
-            }
-
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_CHECK_OUTBOUND).upJson(jsonObject)
-                    .execute(new MyDialogCallback(this, true, true) {
-                        @Override
-                        public void onSuccess(Response<String> response) {
-                            super.onSuccess(response);
-                            try {
-                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
-                                if(bean.code == 1){
-                                    outboundObject = new JSONObject(bean.data);
-                                    //设置订单信息
-                                    ViewLogic logic = new ViewLogic(llStorageInfo);
-                                    logic.setStorageInfo(outboundObject);
-                                }else{
-                                    outboundObject = null;
-                                    showWarningToast(bean.msg);
-                                }
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                                showEmptyView("入库订单信息解析错误:"+e.getMessage());
-                                XLog.e("获取入库订单信息解析错误",e.getMessage());
-                            }
-                        }
-                    });
-        }catch (Exception e){
-            outboundObject = null;
-            XLog.e("请求入库订单信息错误:",e);
-        }
-    }
-
-
-    private void startStorage() {
-
-        //校验数据
-        if (!validate()){
-            return;
-        }
-        if (outboundObject==null){
-            getOutboundInfo();
-            return;
-        }
-        orderNumber = etOrderNo.getText().toString().trim();
-
-        try {
-            JSONObject param = new JSONObject();
-            JSONObject dockerObject = dockerList.getJSONObject(selectId-1);
-            param.put("docker_id",dockerObject.getInt("id"));
-            param.put("docker_name",dockerObject.getString("name"));
-            param.put("outbound_number",orderNumber);
-            Bundle bundle = new Bundle();
-            bundle.putString("outbound_object",outboundObject.toString());
-            bundle.putString("post_param",param.toString());
-            intentPageResult(this, StorageAddMainActivity.class, bundle,200);
-        } catch (JSONException e) {
-            showEmptyView("数据组装失败:"+e.getMessage());
-            e.printStackTrace();
-        }
-
-
-    }
-
-    /*
-     * 校验必录
-     */
-    private boolean validate(){
-        if (selectId==0){
-            setEditTextFocused(DockerSpinner,false);
-            showWarningToast("请选择搬运小组");
-            return false;
-        }
-        if(!checkNull(etOrderNo)){
-            setEditTextFocused(etOrderNo,true);
-            showWarningToast(getString(R.string.hint_please_scan_no));
-            return false;
-        }
-        return true;
-    }
-
-
-    //清除订单信息
-    private void clearData() {
-        etOrderNo.setText("");
-        etOrderNo.requestFocus();
-        try {
-            JSONObject iniData = new JSONObject();
-            iniData.put("order_number", "");
-            iniData.put("customer_name", "");
-            iniData.put("receive_country", "");
-            iniData.put("product_name", "");
-            iniData.put("forecast_pieces", "");
-            iniData.put("domestic_wms_location", "");
-            ViewLogic logic = new ViewLogic(llStorageInfo);
-            logic.setTallyData(iniData);
-            outboundObject = null;
-
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-
-
-    }
-
-    @OnClick({R.id.ima_or_code,R.id.btn_confirm})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-            case R.id.btn_confirm:
-                startStorage();
-
-                break;
-            case R.id.ima_or_code:
-                if(etOrderNo.isEnabled()){
-                    etOrderNo.requestFocus();
-                    ActivityScanerCode.setScanerListener(mScanerListener);
-                    ActivityScanerCode.intent2Activity(StorageStartMainActivity.this, BaseConfig.COMMON_SCANNER_ONLY);
-                }
-                break;
-
-            default:
-                break;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        unbinder.unbind();
-
-
-        super.onDestroy();
-    }
-    @Override
-    protected void onResume() {
-        super.onResume();
-        initReceiver();
-    }
-    @Override
-    protected void onPause() {
-        super.onPause();
-        //销毁在onResume()方法中的广播
-        try {
-            //停止扫描
-            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
-            if (is_broadcast==0){
-                StoTongJNI.getIns(mContext).SetScannerStop();
-                StoTongJNI.getIns(mContext).SetScannerOff();
-            }else{
-                unregisterReceiver(mReceiver);
-            }
-        }catch (Exception e){
-            XLog.e("销毁广播失败:",e.getMessage());
-        }
-    }
-
-
-}

+ 1 - 1
app/src/main/java/com/fxy/fms/logic/ViewLogic.java

@@ -1,4 +1,4 @@
-package com.fxy.fms.logic;
+package com.fxy.logic;
 
 import android.annotation.SuppressLint;
 import android.content.Context;

+ 0 - 1
app/src/main/java/com/fxy/main/fragment/HomePagerFragment.java

@@ -36,7 +36,6 @@ import com.fxy.baselibrary.tddialog.base.TBaseAdapter;
 import com.fxy.baselibrary.tddialog.list.TListDialog;
 import com.fxy.R;
 import com.fxy.constant.BaseConfig;
-import com.fxy.fms.putIn.TallyStartMainActivity;
 import com.fxy.helper.ScanHelper;
 
 

+ 1 - 1
app/src/main/java/com/fxy/putIn/CheckGoodsDetailsMainActivity.java

@@ -34,7 +34,7 @@ import com.fxy.bean.ScanBean;
 import com.fxy.common.PictureSelectorUpload;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
+import com.fxy.logic.ViewLogic;
 import com.fxy.net.MyDialogCallback;
 import com.fxy.net.Urls;
 import com.google.gson.Gson;

+ 0 - 1
app/src/main/java/com/fxy/putIn/CheckGoodsMainActivity.java

@@ -40,7 +40,6 @@ import com.fxy.bean.ActionBean;
 import com.fxy.bean.ScanBean;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
 import com.fxy.net.MyDialogCallback;
 import com.fxy.net.Urls;
 import com.fxy.view.FloatingImageView;

+ 1 - 4
app/src/main/java/com/fxy/putIn/TallyMainActivity.java

@@ -50,13 +50,10 @@ import com.fxy.common.PictureSelectorUpload;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
 import com.fxy.constant.SPCache;
-import com.fxy.fms.putIn.TallyPictureMainActivity;
-import com.fxy.fms.putIn.TallyVolumeMainActivity;
-import com.fxy.fms.putIn.bean.InboundBean;
+
 import com.fxy.net.MyDialogCallback;
 import com.fxy.net.Urls;
 import com.fxy.view.FloatingImageView;
-import com.fxy.view.PopupWindowManager;
 import com.google.zxing.Result;
 import com.luck.picture.lib.config.PictureConfig;
 import com.lzy.okgo.OkGo;

+ 0 - 2
app/src/main/java/com/fxy/putOut/QualityInspectionMainActivity.java

@@ -49,8 +49,6 @@ import com.fxy.common.PictureSelectorUpload;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
 import com.fxy.constant.SPCache;
-import com.fxy.fms.check.CheckGoodsMainActivity;
-import com.fxy.fms.check.CheckStartMainActivity;
 import com.fxy.net.MyDialogCallback;
 import com.fxy.net.Urls;
 import com.fxy.view.FloatingImageView;

+ 4 - 15
app/src/main/java/com/fxy/workOrder/WorkOrderOptMainActivity.java

@@ -29,44 +29,33 @@ import android.widget.Switch;
 import android.widget.TextView;
 import android.widget.Toast;
 
-import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.BaseViewHolder;
+
 import com.elvishew.xlog.XLog;
 import com.fxy.R;
-import com.fxy.adapter.GoodsAdapter;
 import com.fxy.baselibrary.base.BaseActivity;
 import com.fxy.baselibrary.bean.BaseEventBusBean;
 import com.fxy.baselibrary.interfaces.OnRxScanerListener;
 import com.fxy.baselibrary.util.JsonUtil;
-import com.fxy.baselibrary.views.MarqueeTextView;
-import com.fxy.baselibrary.views.dialog.RxDialogZoomImageView;
 import com.fxy.bean.ActionBean;
 import com.fxy.bean.ScanBean;
-import com.fxy.common.AudioRecoderDialog;
 import com.fxy.common.PictureSelectorUpload;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
-import com.fxy.fms.logic.ViewLogic;
 import com.fxy.net.MyDialogCallback;
 import com.fxy.net.Urls;
-import com.fxy.putOut.QualityInspectionMainActivity;
-import com.fxy.utils.AudioRecoderUtils;
+
 import com.google.gson.Gson;
 import com.google.zxing.Result;
 import com.luck.picture.lib.config.PictureConfig;
-import com.luck.picture.lib.config.PictureMimeType;
-import com.luck.picture.lib.entity.LocalMedia;
+
 import com.lzy.okgo.OkGo;
 import com.lzy.okgo.model.Response;
 
-import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
-import java.io.File;
-import java.io.Serializable;
+
 import java.util.ArrayList;
-import java.util.List;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;

+ 0 - 57
app/src/main/res/layout/activity_fms_check_goods.xml

@@ -1,57 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-
-    <include layout="@layout/item_check_info"/>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="@dimen/dp_10"
-        android:layout_marginRight="@dimen/dp_10"
-        android:background="@null"
-        android:padding="10dp"
-        android:gravity="center_vertical"
-        android:orientation="vertical">
-        <TextView
-            style="@style/fontSize"
-            android:id="@+id/tv_title_num"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textStyle="bold"
-            android:text="@string/str_cargo_manifest">
-        </TextView>
-    </LinearLayout>
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <LinearLayout
-                android:id="@+id/ll_goods_content"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical"
-                >
-                <android.support.v7.widget.RecyclerView
-                    android:id="@+id/rc_check_goods"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent">
-                </android.support.v7.widget.RecyclerView>
-            </LinearLayout>
-
-        </LinearLayout>
-    </ScrollView>
-
-
-</LinearLayout>

+ 0 - 377
app/src/main/res/layout/activity_fms_check_goods_details.xml

@@ -1,377 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <include layout="@layout/item_check_goods"/>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:background="@null"
-                android:padding="@dimen/dp_10"
-                android:gravity="center_vertical"
-                android:orientation="vertical">
-                <TextView
-                    style="@style/tvLeftStyle"
-                    android:id="@+id/tv_title_num"
-                    android:textStyle="bold"
-                    android:text="查验选项">
-                </TextView>
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/ll_check_options"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:background="@drawable/bg_white_et"
-                android:gravity="center_vertical"
-                android:orientation="vertical"
-                android:paddingBottom="5dp"
-                android:paddingTop="5dp"
-                android:paddingRight="10dp">
-                <LinearLayout
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingBottom="5dp"
-                    android:paddingTop="5dp"
-                    android:orientation="horizontal">
-                    <LinearLayout
-                        android:layout_weight="0.5"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:orientation="horizontal">
-                        <TextView
-                            style="@style/tvLeftStyle"
-                            android:layout_width="100dp"
-                            android:gravity="right"
-                            android:text="品名不符" />
-
-
-                        <Switch
-                            android:id="@+id/s_is_product_name_match"
-                            android:layout_marginStart="5dp"
-                            android:textColor="@color/black"
-                            android:layout_width="wrap_content"
-                            android:layout_height="match_parent"
-                            android:track="@drawable/switch_selector_green"
-                            android:thumb="@drawable/switch_white_circle_selector"
-                            android:text=""
-                            />
-                    </LinearLayout>
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="0.5"
-                        android:orientation="horizontal">
-                        <TextView
-                            style="@style/tvLeftStyle"
-                            android:layout_width="100dp"
-                            android:gravity="right"
-                            android:text="品牌不符" />
-                        <Switch
-                            android:id="@+id/s_is_brand_match"
-                            android:gravity="right"
-                            android:layout_marginStart="5dp"
-                            android:textColor="@color/black"
-                            android:layout_width="wrap_content"
-                            android:layout_height="match_parent"
-                            android:track="@drawable/switch_selector_green"
-                            android:thumb="@drawable/switch_white_circle_selector"
-                            android:text=""
-                            />
-                    </LinearLayout>
-
-
-                </LinearLayout>
-                <LinearLayout
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingBottom="5dp"
-                    android:paddingTop="5dp"
-                    android:orientation="horizontal">
-                    <LinearLayout
-                        android:layout_weight="0.5"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:orientation="horizontal">
-                        <TextView
-                            style="@style/tvLeftStyle"
-                            android:layout_width="100dp"
-                            android:gravity="right"
-                            android:text="型号不符" />
-
-
-                        <Switch
-                            android:id="@+id/s_is_model_match"
-                            android:layout_marginStart="5dp"
-                            android:textColor="@color/black"
-                            android:layout_width="wrap_content"
-                            android:layout_height="match_parent"
-                            android:track="@drawable/switch_selector_green"
-                            android:thumb="@drawable/switch_white_circle_selector"
-                            android:text=""
-                            />
-                    </LinearLayout>
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="0.5"
-                        android:orientation="horizontal">
-                        <TextView
-                            style="@style/tvLeftStyle"
-                            android:layout_width="100dp"
-                            android:gravity="right"
-                            android:text="带电" />
-                        <Switch
-                            android:id="@+id/s_is_battery"
-                            android:layout_marginStart="5dp"
-                            android:textColor="@color/black"
-                            android:layout_width="wrap_content"
-                            android:layout_height="match_parent"
-                            android:track="@drawable/switch_selector_green"
-                            android:thumb="@drawable/switch_white_circle_selector"
-                            android:text=""
-                            />
-                    </LinearLayout>
-
-
-                </LinearLayout>
-                <LinearLayout
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingBottom="5dp"
-                    android:paddingTop="5dp"
-                    android:orientation="horizontal">
-                    <LinearLayout
-                        android:layout_weight="0.5"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:orientation="horizontal">
-                        <TextView
-                            style="@style/tvLeftStyle"
-                            android:layout_width="100dp"
-                            android:gravity="right"
-                            android:text="带磁" />
-                        <Switch
-                            android:id="@+id/s_is_magnetic"
-                            android:gravity="right"
-                            android:layout_marginStart="5dp"
-                            android:textColor="@color/black"
-                            android:layout_width="wrap_content"
-                            android:layout_height="match_parent"
-                            android:track="@drawable/switch_selector_green"
-                            android:thumb="@drawable/switch_white_circle_selector"
-                            android:text=""
-                            />
-                    </LinearLayout>
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="0.5"
-                        android:orientation="horizontal">
-                        <TextView
-                            style="@style/tvLeftStyle"
-                            android:layout_width="100dp"
-                            android:gravity="right"
-                            android:text="带木头" />
-
-
-                        <Switch
-                            android:id="@+id/s_is_wood"
-                            android:layout_marginStart="5dp"
-                            android:textColor="@color/black"
-                            android:layout_width="wrap_content"
-                            android:layout_height="match_parent"
-                            android:track="@drawable/switch_selector_green"
-                            android:thumb="@drawable/switch_white_circle_selector"
-                            android:text=""
-                            />
-                    </LinearLayout>
-
-
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingBottom="5dp"
-                    android:paddingTop="5dp"
-                    android:orientation="horizontal">
-                    <LinearLayout
-                        android:layout_weight="0.5"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:orientation="horizontal">
-                        <TextView
-                            style="@style/tvLeftStyle"
-                            android:layout_width="100dp"
-                            android:gravity="right"
-                            android:text="其他异常" />
-
-
-                        <Switch
-                            android:id="@+id/s_is_other"
-                            android:layout_marginStart="5dp"
-                            android:textColor="@color/black"
-                            android:layout_width="wrap_content"
-                            android:layout_height="match_parent"
-                            android:track="@drawable/switch_selector_green"
-                            android:thumb="@drawable/switch_white_circle_selector"
-                            android:text=""
-                            />
-
-                    </LinearLayout>
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="0.5"
-                        android:orientation="horizontal">
-
-
-
-                    </LinearLayout>
-                </LinearLayout>
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingBottom="5dp"
-                    android:paddingTop="5dp"
-                    android:orientation="horizontal">
-
-                </LinearLayout>
-
-
-            </LinearLayout>
-
-
-            <LinearLayout
-                android:id="@+id/ll_take_picture"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:visibility="gone"
-                android:orientation="vertical">
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@null"
-                    android:padding="@dimen/dp_10"
-                    android:gravity="center_vertical"
-                    android:orientation="vertical">
-                    <TextView
-                        style="@style/fontSize"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textStyle="bold"
-                        android:text="拍照">
-                    </TextView>
-                </LinearLayout>
-                <include layout="@layout/fragment_show_img"/>
-            </LinearLayout>
-
-
-            <LinearLayout
-                android:id="@+id/ll_remark_info"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:visibility="gone"
-                android:orientation="vertical">
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="4dp"
-                    android:background="@color/md_grey_100" />
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@null"
-                    android:padding="@dimen/dp_10"
-                    android:gravity="center_vertical"
-                    android:orientation="vertical">
-                    <TextView
-                        style="@style/fontSize"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textStyle="bold"
-                        android:text="备注">
-                    </TextView>
-                </LinearLayout>
-
-
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="4dp"
-                    android:background="@color/md_grey_100" />
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:layout_marginTop="@dimen/dp_4"
-                    android:layout_marginBottom="@dimen/dp_4"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal"
-                    >
-                    <EditText
-                        style="@style/fontSize"
-                        android:id="@+id/et_remark"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:background="@color/white"
-                        android:gravity="left|top"
-                        android:hint="请输入备注信息"
-                        android:minHeight="150dp"
-                        android:padding="10dp"
-                        android:textColor="@color/font_color_6"
-                         />
-                </LinearLayout>
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_marginBottom="@dimen/dp_4"
-                android:background="@drawable/bg_white_et"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:padding="10dp">
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_confirm"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_green_item"
-                    android:gravity="center"
-                    android:text="查验无异常,下一个"
-                    android:padding="10dp"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-            </LinearLayout>
-        </LinearLayout>
-    </ScrollView>
-</LinearLayout>

+ 0 - 25
app/src/main/res/layout/activity_fms_check_start.xml

@@ -1,25 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-
-
-    <LinearLayout
-        style="@style/FromLinearLayoutItem"
-        android:orientation="horizontal">
-        <EditText
-            style="@style/EditTextStyle"
-            android:id="@+id/et_order_no"
-            android:hint="@string/hint_please_scan_no"
-            android:text=""/>
-        <ImageButton
-            style="@style/ClearImg"
-            android:id="@+id/ib_order_no_clear"/>
-        <include layout="@layout/item_image_code" />
-    </LinearLayout>
-    <include layout="@layout/item_float_image" />
-</LinearLayout>

+ 0 - 33
app/src/main/res/layout/activity_fms_check_wait.xml

@@ -1,33 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/dp_10"
-        android:layout_marginLeft="@dimen/dp_10"
-        android:layout_marginRight="@dimen/dp_10"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        android:textSize="@dimen/t24"
-        >
-        <com.jaredrummler.materialspinner.MaterialSpinner
-            style="@style/mSpinnerStyle"
-            android:id="@+id/ms_product_list"
-            />
-    </LinearLayout>
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="4dp"
-        android:background="@color/md_grey_100" />
-    <android.support.v7.widget.RecyclerView
-        android:id="@+id/rc_wait_check"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-    </android.support.v7.widget.RecyclerView>
-</LinearLayout>

+ 0 - 108
app/src/main/res/layout/activity_fms_put_away.xml

@@ -1,108 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-
-
-    <LinearLayout
-        style="@style/FromLinearLayoutItem"
-        android:orientation="horizontal">
-        <EditText
-            style="@style/EditTextStyle"
-            android:id="@+id/et_order_no"
-            android:hint="@string/hint_please_scan_no"
-            android:text=""/>
-        <ImageButton
-            style="@style/ClearImg"
-            android:id="@+id/ib_order_no_clear"
-            />
-        <include layout="@layout/item_image_code" />
-    </LinearLayout>
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="4dp"
-        android:background="@color/md_grey_100" />
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="@dimen/dp_10"
-        android:layout_marginRight="@dimen/dp_10"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        >
-        <com.jaredrummler.materialspinner.MaterialSpinner
-            style="@style/mSpinnerStyle"
-            android:id="@+id/ms_location_list"
-            />
-    </LinearLayout>
-
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="4dp"
-        android:background="@color/md_grey_100" />
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="@dimen/dp_10"
-        android:layout_marginRight="@dimen/dp_10"
-        android:layout_marginTop="5dp"
-        android:layout_marginBottom="5dp"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        >
-        <TextView
-            style="@style/tvLeftStyle"
-            android:layout_marginStart="5dp"
-            android:text="@string/str_put_in_storage" />
-        <TextView
-            style="@style/tvLeftStyle"
-            android:text=":" />
-
-        <TextView
-            style="@style/tvLeftStyle"
-            android:id="@+id/tv_already_location"
-            android:layout_marginStart="5dp"
-            android:text="" />
-    </LinearLayout>
-
-
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="@color/md_grey_100" />
-
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="@dimen/dp_10"
-        android:layout_marginTop="@dimen/dp_10"
-        android:layout_marginRight="@dimen/dp_10"
-        android:layout_marginBottom="@dimen/dp_4"
-        android:background="@drawable/bg_white_et"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        android:padding="10dp">
-        <TextView
-            style="@style/fontSize"
-            android:id="@+id/btn_confirm"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:layout_marginRight="@dimen/dp_10"
-            android:background="@drawable/bg_orange_item"
-            android:gravity="center"
-            android:text="@string/ground"
-            android:padding="10dp"
-            android:textColor="@color/white"
-            android:visibility="visible" />
-    </LinearLayout>
-    <include layout="@layout/item_float_image" />
-</LinearLayout>

+ 0 - 130
app/src/main/res/layout/activity_fms_storage_add.xml

@@ -1,130 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-
-
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-            <LinearLayout
-                style="@style/FromLinearLayoutItem"
-                android:orientation="horizontal">
-
-                <TextView
-                    style="@style/tvLeftStyle"
-                    android:text="排舱编号" />
-                <TextView
-                    style="@style/tvLeftStyle"
-                    android:text=":"/>
-                <com.fxy.baselibrary.views.MarqueeTextView
-                    android:id="@+id/mt_outbound_number"
-                    style="@style/mtRightStyle"
-                    />
-            </LinearLayout>
-            <LinearLayout
-                style="@style/FromLinearLayoutItem"
-                android:orientation="horizontal">
-
-                <EditText
-                    style="@style/EditTextStyle"
-                    android:id="@+id/et_order_no"
-                    android:hint="@string/hint_please_scan_no"
-                    android:text="" />
-                <ImageButton
-                    style="@style/ClearImg"
-                    android:id="@+id/ib_order_no_clear"
-                    />
-                <include layout="@layout/item_image_code" />
-            </LinearLayout>
-            <LinearLayout
-                style="@style/FromLinearLayoutItem"
-                android:orientation="horizontal">
-                <EditText
-                    style="@style/EditTextStyle"
-                    android:id="@+id/et_order_qty"
-                    android:hint="请输入货物件数"
-                    android:inputType="number"
-                    android:text="" />
-            </LinearLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="4dp"
-                android:background="@color/md_grey_100" />
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="4dp"
-                android:background="@color/md_grey_100" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_marginBottom="@dimen/dp_4"
-                android:background="@drawable/bg_white_et"
-                android:gravity= "center"
-                android:orientation="horizontal"
-                android:padding="10dp">
-
-                <TextView
-                    android:id="@+id/btn_add_loader"
-                    style="@style/fontSize"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_orange_item"
-                    android:gravity="center"
-                    android:paddingLeft="40dp"
-                    android:paddingTop="@dimen/dp_10"
-                    android:paddingRight="40dp"
-                    android:paddingBottom="@dimen/dp_10"
-                    android:text="装柜"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_finish"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_blue_item"
-                    android:gravity="center"
-                    android:text="完成"
-                    android:paddingRight="40dp"
-                    android:paddingLeft="40dp"
-                    android:paddingTop="@dimen/dp_10"
-                    android:paddingBottom="@dimen/dp_10"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-
-            </LinearLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="4dp"
-                android:background="@color/md_grey_100" />
-
-            <include layout="@layout/item_storage_details" />
-
-        </LinearLayout>
-    </ScrollView>
-    <include layout="@layout/item_float_image" />
-</LinearLayout>

+ 0 - 93
app/src/main/res/layout/activity_fms_storage_cancel.xml

@@ -1,93 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-
-
-    <LinearLayout
-        style="@style/FromLinearLayoutItem"
-        android:orientation="horizontal">
-        <EditText
-            style="@style/EditTextStyle"
-            android:id="@+id/et_outbound_number"
-            android:hint="@string/hint_please_scan_manifest_no"
-            android:text=""/>
-        <ImageButton
-            style="@style/ClearImg"
-            android:id="@+id/ib_outbound_number_clear"
-            />
-        <include layout="@layout/item_image_code" />
-    </LinearLayout>
-
-    <LinearLayout
-        style="@style/FromLinearLayoutItem"
-        android:orientation="horizontal">
-
-        <EditText
-            style="@style/EditTextStyle"
-            android:id="@+id/et_order_no"
-            android:hint="@string/hint_please_scan_no"
-            android:text="" />
-
-        <ImageButton
-            style="@style/ClearImg"
-            android:id="@+id/ib_order_no_clear"
-           />
-
-        <ImageView
-            android:id="@+id/ima_or_code_two"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="7dp"
-            android:src="@drawable/ic_scanning_gray">
-        </ImageView>
-    </LinearLayout>
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="4dp"
-        android:background="@color/md_grey_100" />
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="4dp"
-        android:background="@color/md_grey_100" />
-
-
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="@color/md_grey_100" />
-
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="@dimen/dp_10"
-        android:layout_marginTop="@dimen/dp_10"
-        android:layout_marginRight="@dimen/dp_10"
-        android:layout_marginBottom="@dimen/dp_4"
-        android:background="@drawable/bg_white_et"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        android:padding="10dp">
-        <TextView
-            style="@style/fontSize"
-            android:id="@+id/btn_confirm"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:layout_marginRight="@dimen/dp_10"
-            android:background="@drawable/bg_orange_item"
-            android:gravity="center"
-            android:text="撤销装柜"
-            android:padding="10dp"
-            android:textColor="@color/white"
-            android:visibility="visible" />
-    </LinearLayout>
-    <include layout="@layout/item_float_image" />
-</LinearLayout>

+ 0 - 18
app/src/main/res/layout/activity_fms_storage_check_list.xml

@@ -1,18 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="4dp"
-        android:background="@color/md_grey_100" />
-    <android.support.v7.widget.RecyclerView
-        android:id="@+id/rc_storage_check_list"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-    </android.support.v7.widget.RecyclerView>
-</LinearLayout>

+ 0 - 103
app/src/main/res/layout/activity_fms_storage_finish.xml

@@ -1,103 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-            <include layout="@layout/item_storage_details"/>
-
-            <LinearLayout
-                android:id="@+id/ll_take_picture"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:visibility="visible"
-                android:orientation="vertical">
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@null"
-                    android:paddingLeft="@dimen/dp_10"
-                    android:paddingTop="@dimen/dp_10"
-                    android:gravity="center_vertical"
-                    android:orientation="vertical">
-                    <TextView
-                        style="@style/fontSize"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textStyle="bold"
-                        android:text="拍照">
-                    </TextView>
-                </LinearLayout>
-                <include layout="@layout/fragment_show_img"/>
-            </LinearLayout>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="4dp"
-                android:background="@color/md_grey_100" />
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_marginBottom="@dimen/dp_4"
-                android:background="@drawable/bg_white_et"
-                android:gravity= "center"
-                android:orientation="horizontal"
-                android:padding="10dp">
-
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_empty_remake"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_blue_item"
-                    android:gravity="center"
-                    android:text="清空重拍"
-                    android:paddingRight="10dp"
-                    android:paddingLeft="10dp"
-                    android:paddingTop="@dimen/dp_10"
-                    android:paddingBottom="@dimen/dp_10"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_finish"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_orange_item"
-                    android:gravity="center"
-                    android:text="完成装柜"
-                    android:paddingRight="10dp"
-                    android:paddingLeft="10dp"
-                    android:paddingTop="@dimen/dp_10"
-                    android:paddingBottom="@dimen/dp_10"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-
-            </LinearLayout>
-
-        </LinearLayout>
-    </ScrollView>
-
-    <include layout="@layout/item_float_image" />
-</LinearLayout>

+ 0 - 81
app/src/main/res/layout/activity_fms_storage_start.xml

@@ -1,81 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:textSize="@dimen/t24"
-    android:orientation="vertical">
-
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="4dp"
-                android:background="@color/md_grey_100" />
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                >
-                <com.jaredrummler.materialspinner.MaterialSpinner
-                    style="@style/mSpinnerStyle"
-                    android:id="@+id/ms_docker_list"
-                    />
-            </LinearLayout>
-            <LinearLayout
-                style="@style/FromLinearLayoutItem"
-                android:orientation="horizontal">
-                <EditText
-                    android:id="@+id/et_order_no"
-                    style="@style/EditTextStyle"
-                    android:hint="@string/hint_please_scan_manifest_no"
-                    android:text=""/>
-                <ImageButton
-                    android:id="@+id/ib_order_no_clear"
-                    style="@style/ClearImg" />
-                <include layout="@layout/item_image_code" />
-            </LinearLayout>
-
-            <include layout="@layout/item_storage_info"/>
-
-            <LinearLayout
-
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_margin="@dimen/dp_10"
-                android:background="@drawable/bg_white_et"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:padding="10dp">
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_confirm"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_orange_item"
-                    android:gravity="center"
-                    android:text="开始作业"
-                    android:padding="10dp"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-            </LinearLayout>
-        </LinearLayout>
-    </ScrollView>
-
-    <include layout="@layout/item_float_image" />
-</LinearLayout>

+ 0 - 96
app/src/main/res/layout/activity_fms_tally_picture.xml

@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-
-            <include layout="@layout/item_tally_info"/>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="5dp"
-                android:background="@color/md_grey_100" />
-
-
-            <include layout="@layout/fragment_show_img"/>
-
-            <LinearLayout
-                android:id="@+id/ll_volume_content"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical"
-                >
-            </LinearLayout>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1dp"
-                android:background="@color/md_grey_100" />
-            <LinearLayout
-                android:id="@+id/ll_add_volume"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:background="@drawable/bg_white_et"
-                android:gravity="center_vertical"
-                android:orientation="vertical"
-                android:paddingTop="5dp"
-                android:paddingBottom="5dp">
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/tv_clear_pictures"
-                    android:layout_width="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:background="@drawable/bg_blue_item"
-                    android:gravity="center"
-                    android:layout_weight="1"
-                    android:text="清空重拍"
-                    android:padding="10dp"
-                    android:textColor="@color/white"
-                    android:visibility="visible"
-                    android:layout_height="wrap_content">
-                </TextView>
-
-            </LinearLayout>
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_marginBottom="@dimen/dp_4"
-                android:background="@drawable/bg_white_et"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:padding="10dp">
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_confirm"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_orange_item"
-                    android:gravity="center"
-                    android:text="提交数据"
-                    android:padding="10dp"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-            </LinearLayout>
-        </LinearLayout>
-    </ScrollView>
-    <include layout="@layout/item_float_image" />
-</LinearLayout>

+ 0 - 124
app/src/main/res/layout/activity_fms_tally_start.xml

@@ -1,124 +0,0 @@
-<?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"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="4dp"
-                android:background="@color/md_grey_100" />
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_marginTop="@dimen/dp_4"
-                android:layout_marginBottom="@dimen/dp_4"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                >
-                <com.jaredrummler.materialspinner.MaterialSpinner
-                    style="@style/mSpinnerStyle"
-                    android:id="@+id/ms_docker_list"
-                    />
-            </LinearLayout>
-            <LinearLayout
-                style="@style/FromLinearLayoutItem"
-                android:orientation="horizontal">
-
-                <EditText
-                    style="@style/EditTextStyle"
-                    android:id="@+id/et_order_no"
-                    android:hint="@string/hint_please_scan_no"
-                    android:text=""/>
-
-                <ImageButton
-                    style="@style/ClearImg"
-                    android:id="@+id/ib_order_no_clear"
-                    />
-
-                <include layout="@layout/item_image_code" />
-            </LinearLayout>
-
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="4dp"
-                android:background="@color/md_grey_100" />
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_marginTop="5dp"
-                android:layout_marginBottom="5dp"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                >
-                <CheckBox
-                    android:id="@+id/checkBox_tag"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    android:background="@null"
-                    android:checked="true"/>
-                <TextView
-                    style="@style/tvLeftStyle"
-                    android:layout_marginLeft="5dp"
-                    android:text="@string/str_tag_library" />
-            </LinearLayout>
-
-
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1dp"
-                android:background="@color/md_grey_100" />
-
-            <include layout="@layout/item_tally_info"/>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_marginBottom="@dimen/dp_4"
-                android:background="@drawable/bg_white_et"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:padding="10dp">
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_confirm"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_orange_item"
-                    android:gravity="center"
-                    android:text="@string/str_record_volume_weight"
-                    android:padding="10dp"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-            </LinearLayout>
-        </LinearLayout>
-    </ScrollView>
-
-
-    <include layout="@layout/item_float_image" />
-</LinearLayout>

+ 0 - 79
app/src/main/res/layout/activity_fms_tally_volume.xml

@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/md_grey_100"
-    android:orientation="vertical">
-    <ScrollView
-        android:id="@+id/ll_scroll_view"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars="none">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <include layout="@layout/item_tally_info"/>
-            <LinearLayout
-                android:id="@+id/ll_volume_content"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical"
-                >
-            </LinearLayout>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1dp"
-                android:background="@color/md_grey_100" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_margin="@dimen/dp_10"
-                android:background="@drawable/bg_white_et"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:padding="10dp">
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/tv_add_pallet"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_orange_item"
-                    android:gravity="center"
-                    android:text="添加卡板"
-                    android:padding="10dp"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-            </LinearLayout>
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_margin="@dimen/dp_10"
-                android:background="@drawable/bg_white_et"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:padding="10dp">
-                <TextView
-                    style="@style/fontSize"
-                    android:id="@+id/btn_confirm"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="@dimen/dp_10"
-                    android:layout_marginRight="@dimen/dp_10"
-                    android:background="@drawable/bg_orange_item"
-                    android:gravity="center"
-                    android:text="提交数据"
-                    android:padding="10dp"
-                    android:textColor="@color/white"
-                    android:visibility="visible" />
-            </LinearLayout>
-        </LinearLayout>
-    </ScrollView>
-    <include layout="@layout/item_float_image" />
-</LinearLayout>