guilin 1 hónapja
szülő
commit
607a9e8eea

+ 8 - 2
app/src/main/AndroidManifest.xml

@@ -254,7 +254,11 @@
             android:windowSoftInputMode="stateHidden|adjustPan"
             android:screenOrientation="portrait"
             tools:ignore="LockedOrientationActivity"/>
-
+        <activity
+            android:name=".detection.BoxMakeMainActivity"
+            android:windowSoftInputMode="stateHidden|adjustPan"
+            android:screenOrientation="portrait"
+            tools:ignore="LockedOrientationActivity"/>
         <activity
             android:name=".detection.DetectionWorkMainActivity"
             android:windowSoftInputMode="stateHidden|adjustPan"
@@ -281,7 +285,8 @@
             android:screenOrientation="sensor"
             android:configChanges="orientation|keyboardHidden|screenSize"
             tools:ignore="LockedOrientationActivity"/>
- <activity
+
+        <activity
             android:name=".detection.ScanPhotosMainActivity"
             android:windowSoftInputMode="stateHidden|adjustPan"
             android:screenOrientation="sensor"
@@ -289,6 +294,7 @@
             tools:ignore="LockedOrientationActivity"/>
 
 
+
         <activity
             android:name=".workOrder.WorkOrderOptMainActivity"
             android:windowSoftInputMode="stateHidden|adjustPan"

+ 52 - 5
app/src/main/java/com/fxy/common/AsyncPictureUpload.java

@@ -55,6 +55,7 @@ import java.util.UUID;
 
 import io.reactivex.functions.Consumer;
 import io.realm.Realm;
+import io.realm.RealmQuery;
 import io.realm.RealmResults;
 
 public class AsyncPictureUpload {
@@ -102,6 +103,8 @@ public class AsyncPictureUpload {
 
     private boolean allowUpload = true;
 
+    //
+    private boolean isAllRe =false;
 
 
     public AsyncPictureUpload(Activity activity){
@@ -164,10 +167,39 @@ public class AsyncPictureUpload {
         return  realmResults.size();
     }
 
+    /**
+     * 获取所有待推送数据
+     * @return
+     */
     public int getAllAwaitNum(){
+        if (isAllRe){
+            Integer[] pushStatus = {0,1};
+            RealmResults<AsyncUploadRealm> realmResults  = mRealm.where(AsyncUploadRealm.class)
+                    .equalTo("isDelete",0)
+                    .in("pushStatus",pushStatus)
+                    .sort("pushStatus").findAll();
+            realmResults.load();
+            return  realmResults.size();
+        }else{
+            RealmResults<AsyncUploadRealm> realmResults  = mRealm.where(AsyncUploadRealm.class)
+                    .equalTo("isDelete",0)
+                    .equalTo("pushStatus",0)
+                    .sort("pushStatus").findAll();
+            realmResults.load();
+            return  realmResults.size();
+        }
+
+    }
+
+    /**
+     * 返回错误数量
+     * @return int
+     */
+    public int getFailNum(){
+        Integer[] pushStatus = {1};
         RealmResults<AsyncUploadRealm> realmResults  = mRealm.where(AsyncUploadRealm.class)
                 .equalTo("isDelete",0)
-                .equalTo("pushStatus",0)
+                .in("pushStatus",pushStatus)
                 .sort("pushStatus").findAll();
         realmResults.load();
         return  realmResults.size();
@@ -366,6 +398,9 @@ public class AsyncPictureUpload {
         allowUpload = true;
         asyncUpload();
     }
+    public void setIsAllRe(){
+        isAllRe = true;
+    }
 
     public void setStopUpload(){
         allowUpload = false;
@@ -405,13 +440,25 @@ public class AsyncPictureUpload {
         //更新值
         mRealm.beginTransaction();
         Integer[] isFinish = {0,1,2};
-        RealmResults<AsyncUploadRealm> realmResults  = mRealm.where(AsyncUploadRealm.class)
+        RealmResults<AsyncUploadRealm> realmResults ;
+        RealmQuery<AsyncUploadRealm> queryRealm =  mRealm.where(AsyncUploadRealm.class)
                 .equalTo("isDelete",0)
-                .equalTo("pushStatus",0)
-                .in("isFinish",isFinish)
+                .in("isFinish",isFinish);
+        if (isAllRe){
+            Integer[] pushStatus = {0,1};
+            queryRealm.in("pushStatus",pushStatus)
+//                    .equalTo("notifyKey",fileKey)
+//                    .equalTo("uploadType",uploadType)
+                    ;
+        }else{
+            queryRealm.equalTo("pushStatus",0)
 //                    .equalTo("notifyKey",fileKey)
 //                    .equalTo("uploadType",uploadType)
-                .sort("createTime").findAll();
+                    ;
+        }
+        realmResults = queryRealm.sort("createTime").findAll();
+
+
         // 遍历结果并修改
         for (AsyncUploadRealm item : realmResults) {
             item.setIsFinish(1);

+ 124 - 0
app/src/main/java/com/fxy/common/UploadDialog.java

@@ -0,0 +1,124 @@
+package com.fxy.common;
+
+
+import android.app.Activity;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+
+import com.fxy.baselibrary.bean.BaseEventBusBean;
+import com.fxy.constant.EventCode;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+import org.greenrobot.eventbus.ThreadMode;
+
+import java.util.HashMap;
+import java.util.Objects;
+
+public class UploadDialog {
+    private OnEventCallback callback;
+    private Activity mActivity;
+    private EventBus eventBus;
+    private ProgressDialog progressDialog;
+    private AsyncPictureUpload asyncPictureUpload ;
+    private boolean currentUploadStatus = false;
+    private int awaitNum = 0;
+
+    public UploadDialog(Activity activity, OnEventCallback onEventCallback){
+        callback= onEventCallback;
+        mActivity = activity;
+        initData();
+    }
+    public UploadDialog(Activity activity){
+        mActivity = activity;
+        initData();
+    }
+
+    private void initData(){
+        asyncPictureUpload = new AsyncPictureUpload(Objects.requireNonNull(mActivity));
+        asyncPictureUpload.setIsAllRe();
+        progressDialog = new ProgressDialog(mActivity);
+        progressDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
+            @Override
+            public void onDismiss(DialogInterface dialog) {
+                // 当对话框关闭时执行的操作
+                asyncPictureUpload.setStopUpload();
+            }
+        });
+        // 注册当前Fragment作为事件监听器
+        EventBus.getDefault().register(this);
+    }
+
+    /**
+     * eventbus在主线程接收方法
+     *
+     * @param event BaseEventBusBean
+     */
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    public void onEvent(BaseEventBusBean event) {
+        assert event != null;
+        switch (event.getEventCode()){
+
+            case EventCode.file_upload_lister:
+                awaitNum = asyncPictureUpload.getAllAwaitNum();
+                if (callback != null) {
+                    callback.onUploadStatus("succeed");
+                }
+
+                if (awaitNum>0){
+                    progressDialog.setTitle("待上传文件"+awaitNum+"个");
+                }else{
+                    asyncPictureUpload.setStopUpload();
+                    currentUploadStatus = false;
+                    progressDialog.dismiss();
+                }
+                break;
+            case EventCode.file_upload_progress_lister:
+                HashMap hashMap = (HashMap) event.getData();
+                int process = Integer.parseInt(hashMap.get("process").toString());
+                progressDialog.setProgress(process);
+                break;
+        }
+    }
+
+    public void pictureStartUpload(){
+        awaitNum = asyncPictureUpload.getAllAwaitNum();
+        progressDialog.setTitle("待上传文件"+awaitNum+"个");
+        progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+        progressDialog.setCanceledOnTouchOutside(false);
+        progressDialog.setProgress(0);
+        progressDialog.show();
+        if (!currentUploadStatus){
+            asyncPictureUpload.setStartUpload();
+            currentUploadStatus = false;
+        }
+    }
+
+    public int getAwaitNum(){
+        return asyncPictureUpload.getAllAwaitNum();
+    }
+
+    public int getFailNum(){
+        return  asyncPictureUpload.getFailNum();
+    }
+
+
+    public void unregister() {
+        eventBus.unregister(this);
+        if (asyncPictureUpload!=null){
+            asyncPictureUpload.setStopUpload();
+            asyncPictureUpload.removeHandler();
+        }
+     }
+
+    public void setCallback(OnEventCallback callback) {
+        this.callback = callback;
+    }
+    public interface OnEventCallback {
+        void onUploadStatus(String message);
+    }
+
+
+}
+
+

+ 689 - 0
app/src/main/java/com/fxy/detection/BoxMakeMainActivity.java

@@ -0,0 +1,689 @@
+package com.fxy.detection;
+
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.app.Dialog;
+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.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+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 androidx.annotation.RequiresApi;
+
+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.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.MarqueeTextView;
+import com.fxy.bean.ActionBean;
+import com.fxy.bean.ScanBean;
+import com.fxy.constant.BaseConfig;
+import com.fxy.constant.EventCode;
+import com.fxy.constant.SPCache;
+import com.fxy.detection.bean.MakeBoxBean;
+import com.fxy.detection.bean.RecordBean;
+import com.fxy.net.MyDialogCallback;
+import com.fxy.net.Urls;
+import com.fxy.view.FloatingImageView;
+import com.google.zxing.Result;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+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 BoxMakeMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
+    /**
+     * 列表适配器
+     */
+    Context mContext = this;
+    //单号
+    @BindView(R.id.et_box_number)
+    EditText etBoxNumber;
+    //单号
+    @BindView(R.id.et_unit_code)
+    EditText etUnitCode;
+
+    @BindView(R.id.mt_goods_type)
+    MarqueeTextView mtGoodsType;
+
+    @BindView(R.id.mt_customer_code)
+    MarqueeTextView mtCustomerCode;
+
+
+
+
+
+    @BindView(R.id.recyclerview)
+    RecyclerView recyclerView;
+
+    //浮动按钮
+    @BindView(R.id.iv_drag)
+    FloatingImageView iv_drag;
+
+    @BindView(R.id.tv_ctn_qty)
+    TextView tvCtnQty;
+
+
+    private View notDataView;   //没有数据显示页
+    private View errorView;     //错误显示页
+    private View emptyView;     //空显示页
+    /**
+     * 列表适配器
+     */
+    private FinishWorkAdapter mAdapter;
+
+    //扫码扫码动作
+    private ScanBean scanBean;
+
+
+    private Unbinder unbinder;
+
+
+    //箱号数据
+    private List<RecordBean> tallyDataList = new ArrayList<>();
+    
+    private MakeBoxBean makeBoxBean = new MakeBoxBean();
+    //箱号对象
+
+    @Override
+    public int getContentViewResId() {
+        return R.layout.activity_fxy_detection_box_make;
+    }
+
+    @Override
+    public boolean showToolBar() {
+        return true;
+    }
+
+    @Override
+    public boolean openEventBus() {
+        return true;
+    }
+
+    @Override
+    protected void getBundleExtras(Bundle bundle) {
+
+    }
+    //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)//之前提到的两个标志,在这里显示出了作用
+        {
+        }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("检修装箱");
+
+        initAdapter();
+        initData();
+        initEdit();
+        initDialog();
+        //监听浮动按钮
+        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);
+                }
+            }
+        });
+
+        initUpload();
+
+
+    }
+
+
+    private void initUpload(){
+    }
+
+
+    private void initData(){
+        
+    }
+
+
+    private void initDialog(){
+     
+
+
+    }
+
+
+
+
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        //XLog.e("Action:"+event.getAction()+"---event:"+event.getKeyCode());
+        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
+            if(validate()){
+                doPutIn();
+            }
+            return true;
+        }
+        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());
+        }
+    }
+
+
+    //统一按钮回调
+    public void callbackEditor(View v){
+        switch (v.getId()) {
+            case R.id.et_box_number:
+                getBoxInfo();
+                break;
+            case R.id.et_unit_code:
+                doPutIn();
+                break;
+            default:
+        }
+    }
+
+
+
+
+
+    private void initEdit() {
+        List<EditText> list = new ArrayList<>();
+        list.add(etBoxNumber);
+        list.add(etUnitCode);
+        unifyEdit(list);
+    }
+
+    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);
+            //执行回调
+            callbackEditor(view);
+        }
+    }
+
+    /**
+     * 获取打托信息
+     */
+    private void getBoxInfo(){
+        final String boxCode = etBoxNumber.getText().toString().trim();
+        if (boxCode.isEmpty()){
+            setEditTextFocused(etBoxNumber,true);
+            showWarningToast(etBoxNumber.getHint().toString());
+            return ;
+        }
+        try {
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.put("box_number",boxCode);
+
+            if (!checkRepeat(Urls.FXY_DETECTION_PACK_SCAN_BOX+(jsonObject.toString()))){return;}
+
+            makeBoxBean = null;
+            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_PACK_SCAN_BOX).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);
+
+                                makeBoxBean = new MakeBoxBean();
+                                if (bean.data!=null && !bean.data.isEmpty() && !bean.data.equals("[]")){
+                                    makeBoxBean = JsonUtil.getObject(bean.data, MakeBoxBean.class);
+                                }
+
+                                if(bean.code == 1){
+                                    setPageViewData();
+                                    etBoxNumber.setEnabled(false);
+                                    etUnitCode.setEnabled(true);
+                                    etUnitCode.requestFocus();
+                                }else{
+                                    showWarningToast(bean.msg);
+                                    etBoxNumber.selectAll();
+                                }
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                                showEmptyView("箱号信息解析错误:"+e.getMessage());
+                                XLog.e("获取箱号信息解析错误",e.getMessage());
+                            }
+                        }
+                    });
+        }catch (Exception e){
+            makeBoxBean = null;
+            XLog.e("请求箱号信息错误:"+e.getMessage(),e);
+        }
+    }
+
+
+    public void doPutIn() {
+        //校验数据
+        if (!validate()){
+            return;
+        }
+
+        try {
+            String unit_code = etUnitCode.getText().toString().trim();
+            final String box_number = etBoxNumber.getText().toString().trim();
+            JSONObject param = new JSONObject();
+            param.put("unit_code",unit_code);
+            param.put("box_number",box_number);
+
+            if (!checkRepeat(Urls.FXY_DETECTION_PACK_SCAN_UNIT+(param.toString()))){return;}
+
+            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_PACK_SCAN_UNIT)
+                    .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.data!=null && !bean.data.isEmpty() && !bean.data.equals("[]")){
+                                    makeBoxBean = JsonUtil.getObject(bean.data, MakeBoxBean.class);
+                                }
+                                setPageViewData();
+                                if(bean.code == 1){
+                                    showSuccessToast(bean.msg);
+                                    clearData(false);
+                                }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(etUnitCode)){
+            setEditTextFocused(etUnitCode,true);
+            showWarningToast(etUnitCode.getHint().toString());
+            return false;
+        }
+        if(!checkNull(etBoxNumber)){
+            setEditTextFocused(etBoxNumber,true);
+            showWarningToast(etBoxNumber.getHint().toString());
+            return false;
+        }
+
+        return true;
+    }
+
+    private static class FinishWorkAdapter extends BaseQuickAdapter<RecordBean, BaseViewHolder>{
+        public FinishWorkAdapter(List<RecordBean> data){
+            super(R.layout.item_putin_scan, data);
+        }
+
+        @Override
+        protected void convert(BaseViewHolder helper, RecordBean item) {
+            helper.addOnClickListener(R.id.ib_clear);//定义setOnItemChildClickListener 事件点击
+            helper.setText(R.id.tv_number,item.getUnitCode());
+            helper.setVisible(R.id.ib_clear,false);
+        }
+    }
+    private void initAdapter(){
+        emptyView = this.getLayoutInflater().inflate(R.layout.pager_empty, (ViewGroup) recyclerView.getParent(), false);
+        errorView = this.getLayoutInflater().inflate(R.layout.pager_error, (ViewGroup) recyclerView.getParent(), false);
+        notDataView = emptyView;
+
+        mAdapter  = new FinishWorkAdapter(tallyDataList);
+        mAdapter.setEmptyView(emptyView);
+        mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
+        recyclerView.setLayoutManager(new LinearLayoutManager(this));
+        recyclerView.setAdapter(mAdapter);
+
+    }
+
+
+
+    private void setPageViewData(){
+
+        tallyDataList.clear();
+        tallyDataList = makeBoxBean.getZuijinNums();
+        mAdapter.setNewData(tallyDataList);
+        mAdapter.notifyDataSetChanged();
+        mtCustomerCode.setText(makeBoxBean.getCustomerCode());
+        mtGoodsType.setText(makeBoxBean.getGoodsRes());
+        tvCtnQty.setText(String.valueOf(makeBoxBean.getBenBoxQty()));
+    }
+    //清除订单信息
+    private void clearData(boolean isAll) {
+        etUnitCode.setText("");
+        if (isAll){
+            etBoxNumber.setText("");
+            tvCtnQty.setText("0");
+            tallyDataList.clear();
+            mAdapter.notifyDataSetChanged();
+            etBoxNumber.setEnabled(true);
+            etBoxNumber.requestFocus();
+        }else{
+            etUnitCode.requestFocus();
+        }
+        setEditTextNormal(etUnitCode,true);
+        setEditTextNormal(etBoxNumber,true);
+
+    }
+
+    @OnClick({R.id.btn_confirm})
+    public void onViewClicked(View view) {
+        Bundle bundle = new Bundle();
+        switch (view.getId()) {
+            case R.id.btn_confirm:
+                clearData(true);
+                break;
+            default:
+                break;
+        }
+    }
+
+    /**
+     * 统一设置Edit监听
+     * @param  list
+     */
+    public void unifyEdit(List<EditText> list){
+        for (int i=0;i<list.size();i++){
+            EditText editText = list.get(i);
+
+            LinearLayout linearLayout = (LinearLayout)editText.getParent();
+            ImageButton imageButton = getChildImageButton(linearLayout);
+
+
+            //监听按确定
+            editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+                @Override
+                public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                    //XLog.e("actionId:"+actionId);
+                    if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE   ) {
+                        if (v.getText().toString().trim().isEmpty()) {
+                            setEditTextFocused(v,true);
+                            showWarningToast(v.getHint().toString());
+                            return false;
+                        }else{
+                            setEditTextNormal(v,true);
+                        }
+
+                        callbackEditor(v);
+
+                        return false;
+                    }
+                    return false;
+                }
+            });
+            editText.addTextChangedListener(new TextWatcher() {
+                public void onTextChanged(CharSequence s, int start, int before, int count) {
+                    EditText currentEditText = null;
+                    ImageButton currentImage = null;
+                    //获取焦点的view对象
+                    View view=getWindow().getDecorView().findFocus();
+                    //如果是EditText
+                    if(view instanceof EditText){
+                        currentEditText = (EditText) view;
+                        currentImage = getChildImageButton((LinearLayout)currentEditText.getParent());
+                    }
+
+                    if (s.length() > 0  ) {
+
+                        if (currentImage !=null ){
+                            currentImage.setVisibility(View.VISIBLE);
+                        }
+                        if (currentEditText!=null){
+                            setEditTextNormal(currentEditText,true);
+                        }
+
+                    } else {
+                        if (currentImage !=null ){
+                            currentImage.setVisibility(View.INVISIBLE);
+                        }
+                        if (currentEditText!=null){
+                            setEditTextFocused(currentEditText,true);
+                        }
+                    }
+                }
+
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+                }
+
+                public void afterTextChanged(Editable s) {
+
+                }
+            });
+
+            if (imageButton !=null ){
+                unifyClearEdit(imageButton);
+            }
+        }
+    }
+
+
+    @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());
+        }
+    }
+
+
+}

+ 82 - 0
app/src/main/java/com/fxy/detection/bean/MakeBoxBean.java

@@ -0,0 +1,82 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MakeBoxBean implements Parcelable {
+      private String customer_code= "";
+      private String goods_res= "";
+      private int ben_box_qty = 0;
+      private List<RecordBean> zuijin_nums = new ArrayList<>();
+
+      public MakeBoxBean(){
+
+      }
+
+      protected MakeBoxBean(Parcel in) {
+            customer_code = in.readString();
+            goods_res = in.readString();
+            ben_box_qty = in.readInt();
+            zuijin_nums = in.createTypedArrayList(RecordBean.CREATOR);
+      }
+
+      @Override
+      public void writeToParcel(Parcel dest, int flags) {
+            dest.writeString(customer_code);
+            dest.writeString(goods_res);
+            dest.writeInt(ben_box_qty);
+            dest.writeTypedList(zuijin_nums);
+      }
+
+      @Override
+      public int describeContents() {
+            return 0;
+      }
+
+      public static final Creator<MakeBoxBean> CREATOR = new Creator<MakeBoxBean>() {
+            @Override
+            public MakeBoxBean createFromParcel(Parcel in) {
+                  return new MakeBoxBean(in);
+            }
+
+            @Override
+            public MakeBoxBean[] newArray(int size) {
+                  return new MakeBoxBean[size];
+            }
+      };
+
+      public String getCustomerCode() {
+            return customer_code;
+      }
+
+      public void setCustomerCode(String customer_code) {
+            this.customer_code = customer_code;
+      }
+
+      public String getGoodsRes() {
+            return goods_res;
+      }
+
+      public void setGoodsRes(String goods_res) {
+            this.goods_res = goods_res;
+      }
+
+      public int getBenBoxQty() {
+            return ben_box_qty;
+      }
+
+      public void setBenBoxQty(int ben_box_qty) {
+            this.ben_box_qty = ben_box_qty;
+      }
+
+      public List<RecordBean> getZuijinNums() {
+            return zuijin_nums;
+      }
+
+      public void setZuijinNums(List<RecordBean> zuijin_nums) {
+            this.zuijin_nums = zuijin_nums;
+      }
+}

+ 44 - 0
app/src/main/java/com/fxy/detection/bean/RecordBean.java

@@ -0,0 +1,44 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class RecordBean  implements Parcelable  {
+    private String unit_code = ""; //内件
+     public RecordBean(){
+     }
+
+    public String getUnitCode() {
+        return unit_code;
+    }
+
+    public void setUnitCode(String unit_code) {
+        this.unit_code = unit_code;
+    }
+
+    protected RecordBean(Parcel in) {
+        unit_code = in.readString();
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(unit_code);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<RecordBean> CREATOR = new Creator<RecordBean>() {
+        @Override
+        public RecordBean createFromParcel(Parcel in) {
+            return new RecordBean(in);
+        }
+
+        @Override
+        public RecordBean[] newArray(int size) {
+            return new RecordBean[size];
+        }
+    };
+}

+ 35 - 4
app/src/main/java/com/fxy/main/fragment/HomePagerFragment.java

@@ -1,6 +1,8 @@
 package com.fxy.main.fragment;
 
 import android.Manifest;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
 import android.content.pm.PackageManager;
 import android.os.Build;
 import android.os.Bundle;
@@ -11,9 +13,11 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.widget.LinearLayout;
 
+import com.fxy.common.UploadDialog;
 import com.fxy.common.VersionUpgrades;
 import com.elvishew.xlog.XLog;
 import com.fxy.constant.SPCache;
+import com.fxy.detection.BoxMakeMainActivity;
 import com.fxy.detection.BoxPutInMainActivity;
 import com.fxy.detection.DetectionConfirmGoodsMainActivity;
 import com.fxy.detection.DetectionDestroyOutboundMainActivity;
@@ -71,6 +75,8 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
     Unbinder bind;
     public static final String TYPE = "type";
 
+    private   UploadDialog uploadDialog;
+
     @Nullable
     public static HomePagerFragment newInstance(@Nullable String steRes) {
         Bundle bundle = new Bundle();
@@ -129,6 +135,30 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
         //设备空闲
         JobUtils.deviceIdleJob(getContext());
 
+
+        uploadDialog = new UploadDialog(getActivity(), new UploadDialog.OnEventCallback() {
+            @Override
+            public void onUploadStatus(String message) {
+            }
+        });
+        int num = uploadDialog.getAwaitNum();
+        if (num>0){
+            new AlertDialog.Builder(mActivity)
+                    .setTitle(R.string.dl_hint)
+                    .setMessage("还"+num+"张图片未上传,需要立即上传吗?")
+                    .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) {
+                    uploadDialog.pictureStartUpload();
+                }
+            }).show();
+        }
+
     }
 
     @Override
@@ -150,7 +180,7 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
             R.id.ivt_order_tool,R.id.ivt_check,R.id.ivt_putin_pallet,R.id.ivt_hk_putin,
             R.id.ivt_handle_work_order,R.id.ivt_add_work_order,R.id.ivt_hk_tally,R.id.ivt_hk_outbound,
             R.id.ivt_hk_pallet_location,R.id.ivt_hk_pickup,
-            R.id.ivt_detection_putaway,R.id.ivt_detection_destroy_outbound,
+            R.id.ivt_detection_putaway,R.id.ivt_detection_destroy_outbound,R.id.ivt_detection_make_box,
             R.id.ivt_detection_work,R.id.ivt_scan_photos,R.id.ivt_detection_box_putin,
             R.id.ivt_detection_tray_putin,R.id.ivt_detection_tray_make})
     public void onClick(View v) {
@@ -230,9 +260,9 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
             case R.id.ivt_hk_pickup:
                 intent2Page(getActivity(), HkPickupStartMainActivity.class, false,bundle);;
                 break;
-
-
-
+            case R.id.ivt_detection_make_box:
+                intent2Page(getActivity(), BoxMakeMainActivity.class, false,bundle);
+                break;
             default:
                 showToast("还没有配置点击事件");
                 break;
@@ -247,6 +277,7 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
     public void onDestroy() {
         super.onDestroy();
         bind.unbind();
+        uploadDialog.unregister();
     }
 
 

+ 18 - 57
app/src/main/java/com/fxy/main/fragment/MineFragment.java

@@ -22,6 +22,7 @@ import android.widget.TextView;
 import com.elvishew.xlog.XLog;
 import com.fxy.baselibrary.bean.BaseEventBusBean;
 import com.fxy.common.AsyncPictureUpload;
+import com.fxy.common.UploadDialog;
 import com.fxy.constant.EventCode;
 import com.fxy.utils.JobUtils;
 import com.lzy.okgo.OkGo;
@@ -107,9 +108,7 @@ public class MineFragment extends BaseFragment {
     @BindView(R.id.rl_picture_selector)
     LinearLayout rlPictureSelector;
 
-    private ProgressDialog progressDialog;
-    private AsyncPictureUpload asyncPictureUpload ;
-    private boolean currentUploadStatus = false;
+    private UploadDialog uploadDialog;
 
     /**
      * 系统版本
@@ -129,10 +128,14 @@ public class MineFragment extends BaseFragment {
     @Override
     protected void initView(View rootView) {
         bind = ButterKnife.bind(this, rootView);
-        asyncPictureUpload = new AsyncPictureUpload(Objects.requireNonNull(getActivity()));
-        progressDialog = new ProgressDialog(getActivity());
-        // 注册当前Fragment作为事件监听器
-        EventBus.getDefault().register(this);
+
+
+        uploadDialog = new UploadDialog(getActivity(), new UploadDialog.OnEventCallback() {
+            @Override
+            public void onUploadStatus(String message) {
+                tvAwaitNum.setText(String.valueOf(uploadDialog.getAwaitNum()));
+            }
+        });
 
     }
 
@@ -169,7 +172,7 @@ public class MineFragment extends BaseFragment {
         }
         JobUtils.deviceIdleJob(getContext());
 
-        tvAwaitNum.setText(String.valueOf(asyncPictureUpload.getAllAwaitNum()));
+        tvAwaitNum.setText(String.valueOf(uploadDialog.getAwaitNum()));
 
 
     }
@@ -318,20 +321,10 @@ public class MineFragment extends BaseFragment {
                 intent2Page(PictureSelectorActivity.class, false);
                 break;
             case R.id.rl_upload_async_files:
-
-
-
-                int total = asyncPictureUpload.getAllAwaitNum();
+                tvAwaitNum.setText(String.valueOf(uploadDialog.getAwaitNum()));
+                int total = uploadDialog.getAwaitNum();
                 if (total>0){
-                    progressDialog = new ProgressDialog(getActivity());
-                    progressDialog.setTitle("待上传文件"+total+"个");
-                    progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
-                    progressDialog.setCanceledOnTouchOutside(false);
-                    progressDialog.show();
-                    if (!currentUploadStatus){
-                        asyncPictureUpload.setStartUpload();
-                        currentUploadStatus = false;
-                    }
+                    uploadDialog.pictureStartUpload();
                 }else{
                     showToast("已全部上传");
                 }
@@ -445,7 +438,7 @@ public class MineFragment extends BaseFragment {
                 showErrorToast(getString(R.string.error_no_log));
                 return;
             }
-            String imei = DeviceIdUtils.getIMEI(getContext());
+
             SPCache sp = SPCache.getInstance(getActivity());
             String newsFileName = RxTimeTool.getYestoryDate("MMddHHmmss")+fileName+"-"+sp.getUserName();
             String path_prefix = sp.getResourcePrefix()+"/android/log/"+ RxTimeTool.getYestoryDate("yyyyMMdd")+"/";
@@ -484,46 +477,14 @@ public class MineFragment extends BaseFragment {
 
     }
 
-    /**
-     * eventbus在主线程接收方法
-     *
-     * @param event
-     */
-    @Subscribe(threadMode = ThreadMode.MAIN)
-    public void onEvent(BaseEventBusBean event) {
-        assert event != null;
-        switch (event.getEventCode()){
-
-            case EventCode.file_upload_lister:
-                int total = asyncPictureUpload.getAllAwaitNum();
-                tvAwaitNum.setText(String.valueOf(total));
-                if (total>0){
-                    progressDialog.setTitle("待上传文件"+total+"个");
-                }else{
-                    asyncPictureUpload.setStopUpload();
-                    currentUploadStatus = false;
-                    progressDialog.dismiss();
-                }
-                break;
-            case EventCode.file_upload_progress_lister:
-                HashMap<String,Object> hashMap = (HashMap) event.getData();
-                int process = Integer.parseInt(hashMap.get("process").toString());
-                progressDialog.setProgress(process);
-                break;
-        }
-    }
+
 
 
     @Override
     public void onDestroy() {
         super.onDestroy();
         bind.unbind();
-        if (asyncPictureUpload!=null){
-            asyncPictureUpload.setStopUpload();
-            asyncPictureUpload.removeHandler();
-        }
-
         OkGo.getInstance().cancelTag(this);
-        EventBus.getDefault().unregister(this);
-    }
+        uploadDialog.unregister();
+     }
 }

+ 2 - 0
app/src/main/java/com/fxy/net/Urls.java

@@ -179,7 +179,9 @@ public class Urls {
     //托盘箱号内件码
     public static final String FXY_DETECTION_PALLET_BOX_UNIT = "/pda/inbound/QcPalletBoxUnit";
 
+    public static final String FXY_DETECTION_PACK_SCAN_BOX = "/pda/Inbound/QcPackScanBox";
 
+    public static final String FXY_DETECTION_PACK_SCAN_UNIT = "/pda/Inbound/QcPackScanUnit";
 
 
 

+ 209 - 0
app/src/main/res/layout/activity_fxy_detection_box_make.xml

@@ -0,0 +1,209 @@
+<?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:id="@+id/ll_box_number"
+                style="@style/FromLinearLayoutItem"
+                android:orientation="horizontal">
+                <EditText
+                    style="@style/EditTextStyle"
+                    android:id="@+id/et_box_number"
+                    android:hint="扫描或者输入扫描新箱号"
+                    android:text=""/>
+                <include layout="@layout/item_image_close" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="4dp"
+                android:background="@color/md_grey_100" />
+
+            <LinearLayout
+                android:id="@+id/ll_unit_code"
+                style="@style/FromLinearLayoutItem"
+                android:orientation="horizontal">
+                <EditText
+                    style="@style/EditTextStyle"
+                    android:id="@+id/et_unit_code"
+                    android:hint="扫描检修完的内件码"
+                    android:text=""/>
+                <include layout="@layout/item_image_close" />
+
+            </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_marginRight="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:background="@drawable/bg_white_et"
+                android:gravity="center_vertical"
+                android:orientation="vertical"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp">
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:orientation="horizontal">
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="客户代码" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_customer_code"
+                        />
+
+                </LinearLayout>
+
+
+
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:orientation="horizontal">
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="货物类型" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_goods_type"
+                        />
+                </LinearLayout>
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="4dp"
+                android:background="@color/md_grey_100" />
+
+            <LinearLayout
+                style="@style/LinearLayoutLoginStyle"
+                android:paddingBottom="5dp"
+                android:paddingTop="5dp"
+                android:layout_margin="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+
+                    style="@style/tvLeftStyle"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="最近扫描:" />
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:singleLine="true"
+                    android:gravity="right"
+                    android:textSize="@dimen/t24"
+                    android:textColor="@color/actionsheet_red"
+                    android:text="箱数:"
+                    tools:ignore="RtlHardcoded">
+
+                </TextView>
+                <TextView
+                    android:id="@+id/tv_ctn_qty"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textSize="@dimen/t24"
+                    android:layout_marginRight="10dp"
+                    android:textColor="@color/actionsheet_red"
+                    android:text="0">
+
+                </TextView>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/bg_white_et"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:scrollbars="vertical"
+                android:paddingTop="@dimen/dp_10"
+                android:paddingBottom="@dimen/dp_10"
+                >
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/recyclerview"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:background="#fff"
+                    android:overScrollMode="never"/>
+            </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>

+ 17 - 0
app/src/main/res/layout/fragment_homepager.xml

@@ -131,6 +131,7 @@
 
                     </TableRow>
 
+
                 </LinearLayout>
 
                 <LinearLayout
@@ -311,6 +312,22 @@
 
                     </TableRow>
 
+                    <TableRow
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/t12"
+                        android:weightSum="2">
+
+                        <TextView
+                            android:id="@+id/ivt_detection_make_box"
+                            style="@style/ImageViewWithTextStyle.FontSize"
+                            android:drawableTop="@drawable/ic_mapan"
+                            android:drawablePadding="5dp"
+                            android:text="检修装箱" />
+
+
+                    </TableRow>
+
 
 
                     <TableRow

+ 1 - 1
config.gradle

@@ -8,7 +8,7 @@ ext {
             minSdkVersion    : 21,
             targetSdkVersion : 23,
             versionCode      : 1,
-            versionName      : "2.9.6.1",
+            versionName      : "2.9.8",
             versionApi       : "2.9",
             versionRealm     : 2,
     ]