Просмотр исходного кода

增加选择岗位弹窗,点击确定选择展示,退出时删除展示数据;

ChengJH 3 лет назад
Родитель
Сommit
4aec7f484a
100 измененных файлов с 753 добавлено и 1167 удалено
  1. 283 38
      app/src/main/java/com/uas/esop/activity/IndexActivity.java
  2. 40 0
      app/src/main/java/com/uas/esop/adapter/PdfOrImageAdapter.java
  3. 62 0
      app/src/main/java/com/uas/esop/bean/IpAndPortBean.java
  4. 0 4
      app/src/main/java/com/uas/esop/fragment/IOCInMakeMaterialFragment.java
  5. 1 1
      app/src/main/java/com/uas/esop/fragment/IndexSettingFragment.java
  6. 0 2
      app/src/main/java/com/uas/esop/fragment/SCFeederPrepareFragment.java
  7. 0 1
      app/src/main/java/com/uas/esop/fragment/SCMakePrepareGetFragment.java
  8. 0 2
      app/src/main/java/com/uas/esop/fragment/SCMakePrepareListFragment.java
  9. 2 2
      app/src/main/java/com/uas/esop/fragment/WHBatchContentFragment.java
  10. 0 645
      app/src/main/java/com/uas/esop/fragment/WHCombineBatchFragment.java
  11. 9 3
      app/src/main/java/com/uas/esop/global/GloableParams.java
  12. 61 14
      app/src/main/java/com/uas/esop/util/QpushClient.java
  13. BIN
      app/src/main/res/drawable-hdpi/ic_delete.png
  14. BIN
      app/src/main/res/drawable-hdpi/ic_finished_goods_storage.png
  15. BIN
      app/src/main/res/drawable-hdpi/ic_material_storage.png
  16. BIN
      app/src/main/res/drawable-hdpi/ic_quality_manage.png
  17. BIN
      app/src/main/res/drawable-hdpi/ic_random_check.png
  18. BIN
      app/src/main/res/drawable-hdpi/ic_stock_barcode.png
  19. BIN
      app/src/main/res/drawable-hdpi/ic_storage_inspection.png
  20. BIN
      app/src/main/res/drawable-hdpi/ic_storage_iqc.png
  21. BIN
      app/src/main/res/drawable-hdpi/ic_storage_material_in.png
  22. BIN
      app/src/main/res/drawable-hdpi/ic_storage_recharge.png
  23. BIN
      app/src/main/res/drawable-hdpi/ic_submit.png
  24. BIN
      app/src/main/res/drawable-hdpi/index_smt_check.png
  25. BIN
      app/src/main/res/drawable-hdpi/mainmenu_outinstorage.png
  26. BIN
      app/src/main/res/drawable-hdpi/mainmenu_storehousemanager.png
  27. BIN
      app/src/main/res/drawable-hdpi/mainmenu_workhousemanager.png
  28. BIN
      app/src/main/res/drawable-hdpi/refresh_succeed.png
  29. BIN
      app/src/main/res/drawable-hdpi/scanner_collect.png
  30. BIN
      app/src/main/res/drawable-hdpi/scanner_verify.png
  31. BIN
      app/src/main/res/drawable-hdpi/search.png
  32. BIN
      app/src/main/res/drawable-hdpi/setting_default.png
  33. BIN
      app/src/main/res/drawable-hdpi/setting_master.png
  34. BIN
      app/src/main/res/drawable-hdpi/setting_printer.png
  35. BIN
      app/src/main/res/drawable-hdpi/setting_refresh.png
  36. BIN
      app/src/main/res/drawable-hdpi/setting_style.png
  37. BIN
      app/src/main/res/drawable-hdpi/staffchange.png
  38. BIN
      app/src/main/res/drawable-hdpi/storage_msd_manager.png
  39. BIN
      app/src/main/res/drawable-hdpi/unfolder_more.png
  40. BIN
      app/src/main/res/drawable-hdpi/user_img.png
  41. BIN
      app/src/main/res/drawable-hdpi/warn_small.png
  42. BIN
      app/src/main/res/drawable-hdpi/workhousemenu_fd_add.png
  43. BIN
      app/src/main/res/drawable-hdpi/workhousemenu_material_prepare.png
  44. BIN
      app/src/main/res/drawable-hdpi/workhousemenu_recurrence.png
  45. BIN
      app/src/main/res/drawable-hdpi/workhousemenu_smt_add.png
  46. BIN
      app/src/main/res/drawable-xhdpi/face_backgroud.png
  47. BIN
      app/src/main/res/drawable-xhdpi/face_button_1.png
  48. BIN
      app/src/main/res/drawable-xhdpi/face_button_2.png
  49. BIN
      app/src/main/res/drawable-xhdpi/face_chang_1.9.png
  50. BIN
      app/src/main/res/drawable-xhdpi/face_chang_2.9.png
  51. BIN
      app/src/main/res/drawable-xhdpi/ic_delete.png
  52. BIN
      app/src/main/res/drawable-xhdpi/ic_quality_manage.png
  53. BIN
      app/src/main/res/drawable-xhdpi/ic_stock_barcode.png
  54. BIN
      app/src/main/res/drawable-xhdpi/ic_storage_inspection.png
  55. BIN
      app/src/main/res/drawable-xhdpi/ic_storage_iqc.png
  56. BIN
      app/src/main/res/drawable-xhdpi/ic_storage_material_in.png
  57. BIN
      app/src/main/res/drawable-xhdpi/ic_storage_recharge.png
  58. BIN
      app/src/main/res/drawable-xhdpi/index_smt_check.png
  59. BIN
      app/src/main/res/drawable-xhdpi/mainmenu_outinstorage.png
  60. BIN
      app/src/main/res/drawable-xhdpi/mainmenu_storehousemanager.png
  61. BIN
      app/src/main/res/drawable-xhdpi/mainmenu_workhousemanager.png
  62. BIN
      app/src/main/res/drawable-xhdpi/staffchange.png
  63. BIN
      app/src/main/res/drawable-xhdpi/storage_msd_manager.png
  64. BIN
      app/src/main/res/drawable-xxhdpi/ic_delete.png
  65. BIN
      app/src/main/res/drawable-xxhdpi/ic_quality_manage.png
  66. BIN
      app/src/main/res/drawable-xxhdpi/ic_stock_barcode.png
  67. BIN
      app/src/main/res/drawable-xxhdpi/ic_storage_inspection.png
  68. BIN
      app/src/main/res/drawable-xxhdpi/ic_storage_iqc.png
  69. BIN
      app/src/main/res/drawable-xxhdpi/ic_storage_material_in.png
  70. BIN
      app/src/main/res/drawable-xxhdpi/ic_storage_recharge.png
  71. BIN
      app/src/main/res/drawable-xxhdpi/index_smt_check.png
  72. BIN
      app/src/main/res/drawable-xxhdpi/mainmenu_outinstorage.png
  73. BIN
      app/src/main/res/drawable-xxhdpi/mainmenu_storehousemanager.png
  74. BIN
      app/src/main/res/drawable-xxhdpi/mainmenu_workhousemanager.png
  75. BIN
      app/src/main/res/drawable-xxhdpi/staffchange.png
  76. BIN
      app/src/main/res/drawable-xxhdpi/storage_msd_manager.png
  77. 0 9
      app/src/main/res/drawable/face_chang_bg.xml
  78. 10 0
      app/src/main/res/drawable/login_technological_bg.xml
  79. 5 0
      app/src/main/res/drawable/login_technological_process.xml
  80. 13 0
      app/src/main/res/drawable/un_login_technological_bg.xml
  81. 43 20
      app/src/main/res/layout-large/activity_index.xml
  82. 2 9
      app/src/main/res/layout-large/fragment_inmake.xml
  83. 1 1
      app/src/main/res/layout-large/fragment_scmake_prepare.xml
  84. 0 1
      app/src/main/res/layout-large/fragment_scmake_prepareget.xml
  85. 1 0
      app/src/main/res/layout-large/fragment_setting.xml
  86. 30 0
      app/src/main/res/layout-large/fuzzy_ipandport_item.xml
  87. 3 2
      app/src/main/res/layout-large/fuzzy_search_item.xml
  88. 78 59
      app/src/main/res/layout-large/index_edit_pup.xml
  89. 0 129
      app/src/main/res/layout-large/item_list_whcombatchfragment.xml
  90. 4 2
      app/src/main/res/layout-large/popupwin_inmake_search.xml
  91. 0 57
      app/src/main/res/layout-large/refresh_head.xml
  92. 42 17
      app/src/main/res/layout/activity_index.xml
  93. 2 9
      app/src/main/res/layout/fragment_inmake.xml
  94. 1 1
      app/src/main/res/layout/fragment_scmake_prepareget.xml
  95. 30 0
      app/src/main/res/layout/fuzzy_ipandport_item.xml
  96. 3 2
      app/src/main/res/layout/fuzzy_search_item.xml
  97. 26 7
      app/src/main/res/layout/index_edit_pup.xml
  98. 0 129
      app/src/main/res/layout/item_list_whcombatchfragment.xml
  99. 1 1
      app/src/main/res/layout/popupwin_inmake_search.xml
  100. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.png

+ 283 - 38
app/src/main/java/com/uas/esop/activity/IndexActivity.java

@@ -22,7 +22,6 @@ import android.text.TextWatcher;
 import android.util.Base64;
 import android.util.Log;
 import android.view.Gravity;
-import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
@@ -51,14 +50,15 @@ import com.chad.library.adapter.base.BaseViewHolder;
 import com.google.gson.Gson;
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
 import com.uas.esop.R;
+import com.uas.esop.adapter.PdfOrImageAdapter;
 import com.uas.esop.application.PdaApplication;
+import com.uas.esop.bean.IpAndPortBean;
 import com.uas.esop.bean.Master;
 import com.uas.esop.bean.ResourcefileBean;
 import com.uas.esop.bean.TCPEventBusBean;
 import com.uas.esop.fragment.BaseFragment;
 import com.uas.esop.fragment.WorkOrderSearchFragment;
 import com.uas.esop.global.GloableParams;
-import com.uas.esop.listener.MyEditorActionListener;
 import com.uas.esop.tools.DataSourceManager;
 import com.uas.esop.tools.SharedPreUtil;
 import com.uas.esop.tools.VolleyUtil;
@@ -137,6 +137,13 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     private InputStream is;
     private BufferedReader br;
     private SwitchView sound_monitor_vibration_sv;
+    private List<IpAndPortBean> delists;
+    private IpAndPortAdapter andPortAdapter;
+    private LinearLayout line_login_post;
+    private RecyclerView ra_dataurl;
+    private List<ResourcefileBean.DataBean.UrlBean> urlBeanList;
+    private PdfOrImageAdapter pdfOrImageAdapter;
+    private String ss_nametext;
 
     @Override
     protected void onDestroy() {
@@ -172,6 +179,8 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         rv_data = findViewById(R.id.rv_data);
         rela_dimss = findViewById(R.id.rela_dimss);
         rv_datawork = findViewById(R.id.rv_datawork);
+        line_login_post = findViewById(R.id.line_login_post);
+        ra_dataurl = findViewById(R.id.ra_dataurl);
 
         sound_monitor_vibration_sv = findViewById(R.id.sound_monitor_Vibration_sv);
         TextView btn_sengMessage = findViewById(R.id.btn_sengMessage);
@@ -193,6 +202,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         view.findViewById(R.id.pop_exit_cancel_tv).setOnClickListener(this);
         view.findViewById(R.id.pop_exit_minimize_tv).setOnClickListener(this);
         view.findViewById(R.id.pop_exit_exit_tv).setOnClickListener(this);
+        line_login_post.setOnClickListener(this);
 
         mExitPopupWindow = new PopupWindow(view, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
         mExitPopupWindow.setBackgroundDrawable(new BitmapDrawable());
@@ -215,21 +225,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
 //                }
 //            }
 //        },500);
-        /**
-         * tcp初始化
-         */
-        new Thread(new Runnable() {
-            @Override
-            public void run() {
-                mTcpClient = new Tcpclient();
-                mTcpClient.setConnectTimeOut(5000)//设置连接超时
-                        .setSocket("192.168.23.74",10001);//设置连接ip和端口10.1.162.69
-            }
-        }).start();
-
 
 
-        getPrintTemplate();
+//        getPrintTemplate();//请求打印模板
         String filepath="https://magpie-pic.oss-cn-shenzhen.aliyuncs.com/MTPTXS099039202211110020661.pdf";
 
         btn_get.setOnClickListener(new View.OnClickListener() {
@@ -245,6 +243,14 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                 startActivity(intent);
             }
         });
+
+        urlBeanList = new ArrayList<>();
+        pdfOrImageAdapter = new PdfOrImageAdapter(urlBeanList);
+        ra_dataurl.addItemDecoration(new DividerItemDecoration(this, LinearLayout.VERTICAL));
+        ra_dataurl.setLayoutManager(new LinearLayoutManager(this));
+        pdfOrImageAdapter.setmList(urlBeanList);
+        ra_dataurl.setAdapter(pdfOrImageAdapter);
+
         /**
          * ----------------------------------------岗位资源列表-------------------------------------------
          */
@@ -258,9 +264,12 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             @Override
             public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                 ComDataBean bean = myAdapter.getBeanByPositon(position);
+
                 String itemCode = bean.getItemName();
 //                String itemName= bean.getItemremark();
                 mPositionR.setText(itemCode);
+
+                myAdapter.notifyDataSetChanged();
                 rv_data.setVisibility(View.GONE);
 
             }
@@ -306,6 +315,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                         mPositionR.setText(itemCode);
                         mPositionR.setSelection(mPositionR.getText().toString().trim().length());
                         rv_data.setVisibility(View.GONE);
+
+
+
                     }
                 });
             }
@@ -368,20 +380,25 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         rela_dimss.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                rv_data.setVisibility(View.GONE);
+//                rv_data.setVisibility(View.GONE);
                 rv_datawork.setVisibility(View.GONE);
             }
         });
 
 
 
-//        historyData();
-
-
+        debughistoryData();
 
+        sound_monitor_vibration_sv.setChecked(false);
         sound_monitor_vibration_sv.setOnCheckedChangeListener(new SwitchView.OnCheckedChangeListener() {
             @Override
             public void onCheckedChanged(View view, boolean isChecked) {
+                Log.e("isChecked",isChecked+"");
+                if (isChecked==true){
+                    historyData();
+                }else {
+                    destoryhistoryData();
+                }
 
             }
         });
@@ -419,6 +436,13 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                 finish();
             }
         });
+        String ss_name = SharedPreUtil.getString(IndexActivity.this, "ss_name", null);
+        if (!StringUtil.isEmpty(ss_name)){
+            mEmCodeTv.setText(ss_name);
+        }else {
+            mEmCodeTv.setText("");
+        }
+
     }
 
     @Override
@@ -441,10 +465,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
 //                intent2.putExtra("title", "岗位资源");
 //                intent2.putExtra("type", 1);
 //                startActivityForResult(intent2, Constants.FLAG.GET_COMMON_ITEM);
-//                initEditPopupWindow();
                 getSC_CODEData();
-
-
                 break;
             case R.id.btn_actionbar_scan_iv:
                 if (CameraUtil.hasCamera()) {
@@ -460,7 +481,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                 intent.putExtra(DataSourceManager.KEY_GRID_ITEMNAME, GloableParams.GRIDNAME_SETTING);
                 startActivity(intent);
                 break;
-
+            case R.id.line_login_post:
+                initEditPopupWindow();
+                break;
 
             default:
         }
@@ -486,7 +509,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                 if(result.contains("(")){
 //                    handleCode(result.split("\\(")[0], true);
                     mPositionR.setText(result.split("\\(")[0]);
-                    mEmCodeTv.setText(result.split("\\(")[1]);
+//                    mEmCodeTv.setText(result.split("\\(")[1]);
 //                    mEmCodeTv.setSelection(result.split("\\(")[0].length());
                 }
             }
@@ -499,13 +522,27 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
 
     }
 
+    /**
+     * ip和port(端口)
+     */
     private void initEditPopupWindow() {
+        delists = new ArrayList<>();
+        andPortAdapter = new IpAndPortAdapter(delists);
         View contView = LayoutInflater.from(this).inflate(R.layout.index_edit_pup, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
         TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
         TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
         ImageView search_im = contView.findViewById(R.id.search_im);
 
+        RecyclerView rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_ip_port_data.addItemDecoration(new DividerItemDecoration(this, LinearLayout.VERTICAL));
+        rv_ip_port_data.setLayoutManager(new LinearLayoutManager(this));
+        andPortAdapter.setmList(delists);
+        rv_ip_port_data.setAdapter(andPortAdapter);
+        getdeBugData();
+
+
+
 //        search_im.setVisibility(View.GONE);
         editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
         editPW.setTouchable(true);
@@ -520,11 +557,17 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
         CommonUtil.setBackgroundAlpha(this, 0.5f);
 
-        sure_tv.setOnClickListener(new View.OnClickListener() {
+
+        andPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
             @Override
-            public void onClick(View v) {
-                String code = edit_et.getText().toString().trim();
-//                handleCode(code, true);
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                List<IpAndPortBean> comDataBeans = andPortAdapter.getmList();
+                ss_nametext = comDataBeans.get(position).getSS_NAME();
+                for (int i = 0; i < comDataBeans.size(); i++) {
+                    comDataBeans.get(i).setChecked(false);
+                }
+                comDataBeans.get(position).setChecked(true);
+                andPortAdapter.notifyDataSetChanged();
             }
         });
 
@@ -537,19 +580,78 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                 startActivityForResult(intent, Constants.FLAG.GET_COMMON_ITEM);
             }
         });
-        CommonUtil.setEditorActionListener(edit_et, new MyEditorActionListener() {
+
+        //确定
+        sure_tv.setOnClickListener(new View.OnClickListener() {
             @Override
-            public void MyEditorAction(String text, int actionId, KeyEvent event) {
-                String code = edit_et.getText().toString().trim();
-//                handleCode(code, true);
+            public void onClick(View v) {
+                SharedPreUtil.saveString(IndexActivity.this,"ss_name", ss_nametext);
+                mEmCodeTv.setText(ss_nametext);
+                closeListPopupWindow();
             }
         });
+
+        //取消
         cancle_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
+
                 closeListPopupWindow();
             }
         });
+
+
+        edit_et.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) { }
+            @Override
+            public void afterTextChanged(Editable s) {
+                if (delists.isEmpty()){
+                    getdeBugData();
+                }
+                if (s.length() >= 0) {
+                    String mSearchStr = s.toString().trim();
+                    LogUtil.i("mSearchStr",mSearchStr);
+                    List<IpAndPortBean> thisList = new ArrayList<>();
+                    for(int i=0;i<delists.size();i++){
+                        if(delists.get(i).getSS_STEPCODE().contains(mSearchStr) || delists.get(i).getSS_NAME().contains(mSearchStr)
+                        ||delists.get(i).getSS_CODE().contains(mSearchStr)){
+                            thisList.add(delists.get(i));
+                        }
+                        if(i == delists.size() -1){
+                            andPortAdapter = new IpAndPortAdapter(thisList);
+                            rv_ip_port_data.setAdapter(andPortAdapter);
+                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+                        }
+                    }
+                    andPortAdapter.notifyDataSetChanged();
+
+                } else {
+
+                    andPortAdapter = new IpAndPortAdapter(delists);
+                    rv_ip_port_data.setAdapter(andPortAdapter);
+
+                }
+                andPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+                    @Override
+                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                        List<IpAndPortBean> comDataBeans = andPortAdapter.getmList();
+                        String itemName = comDataBeans.get(position).getSS_NAME();
+                        mPositionR.setText(itemName);
+                        for (int i = 0; i < comDataBeans.size(); i++) {
+                            comDataBeans.get(i).setChecked(false);
+                        }
+                        comDataBeans.get(position).setChecked(true);
+                        andPortAdapter.notifyDataSetChanged();
+                    }
+                });
+            }
+
+        });
+
+
     }
 
     //修改岗位资源操作
@@ -1083,23 +1185,25 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     }
 
     public void getPdfOrImage(){
+
+
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(GloableParams.ASTATIONTHE_RESOURCEFILE)
                         .method(Request.Method.GET)
-//                        .addParam("sourcecode",mPositionR.getText().toString().trim())//岗位资源
-//                        .addParam("makecode",mCurDoc.getText().toString().trim())//工序单号
-//                        .addParam("prodcode",index_prodcode.getText().toString().trim())//产品编号
-                        .addParam("id","157043")
+                        .addParam("sourcecode",mPositionR.getText().toString().trim())//岗位资源
+                        .addParam("makecode",mCurDoc.getText().toString().trim())//工序单号
+                        .addParam("prodcode",index_prodcode.getText().toString().trim())//产品编号
+//                        .addParam("id","157043")
                         .tag("Tag" + "getSourceByEmp")
                         .flag(0)
                         .build(), new HttpCallback() {
 
                     private String filename;
-
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
+                        urlBeanList.clear();
                         progressDialog.dismiss();
                         Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
                         if (isSuccess){
@@ -1120,6 +1224,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                                 String path = urlBean.getPath();
                                 String str2 = new String(Base64.decode(path.getBytes(),Base64.DEFAULT));
                                 list.add(str2);
+                                urlBeanList.add(urlBean);
                                 Log.e("res===",str2);
                                 Log.e("path",path);
                                 Log.e("filename", filename);
@@ -1138,6 +1243,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                                 CommonUtil.toastNoRepeat(IndexActivity.this,"此文件无法打开");
                             }
 
+                            pdfOrImageAdapter.setmList(urlBeanList);
+                            pdfOrImageAdapter.notifyDataSetChanged();
+
                         }
                     }
 
@@ -1277,6 +1385,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     }
 
 
+    /**
+     * 岗位资源
+     */
     private void getSC_CODEData() {
         rv_data.setVisibility(View.VISIBLE);
         progressDialog.show();
@@ -1322,6 +1433,57 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                 });
 
     }
+
+
+    /**
+     * 站点
+     */
+    private void getdeBugData() {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ASTATIONTHE_GETSOPSOURCE)
+                        .method(Request.Method.GET)
+                        .tag(Tag + "getSourceByEmp")
+                        .flag(0)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        if (isSuccess){
+                            JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(),"data");
+                            if (dataArray == null || dataArray.size() == 0){
+                                CommonUtil.toastNoRepeat(IndexActivity.this,"未搜索到匹配数据");
+                            }
+                            for(Object index:dataArray){
+                                JSONObject data = (JSONObject) index;
+                                IpAndPortBean bean = new IpAndPortBean();
+                                bean.setSS_STEPCODE(data.getString("SS_STEPCODE"));
+                                bean.setSS_NAME(data.getString("SS_NAME"));
+                                bean.setSS_CODE(data.getString("SS_CODE"));
+                                delists.add(bean);
+                            }
+                            andPortAdapter.setmList(delists);
+                            andPortAdapter.notifyDataSetChanged();
+
+                        }else {
+
+                        }
+
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(IndexActivity.this, failStr);
+                        rv_datawork.setVisibility(View.GONE);
+                    }
+
+                });
+
+    }
+
     private class ComListAdapter extends BaseQuickAdapter<ComDataBean, BaseViewHolder> {
         private List<ComDataBean> mmmmList;
 
@@ -1344,11 +1506,26 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         protected void convert(BaseViewHolder helper, ComDataBean item) {
             helper.setText(R.id.macode_Tv,item.getItemName());
             helper.setText(R.id.remark_Tv,item.getItemremark());
+            LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
+            if (item.getChecked()) {
+                line_true.setSelected(true);
+            } else {
+                line_true.setSelected(false);
+            }
         }
     }
     private class ComDataBean{
         String itemName = null;
         String itemremark = null;
+        boolean isChecked;
+
+        public boolean getChecked() {
+            return isChecked;
+        }
+
+        public void setChecked(boolean checked) {
+            isChecked = checked;
+        }
 
         public String getItemName() {
             return itemName;
@@ -1390,6 +1567,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         @Override
         protected void convert(BaseViewHolder helper, FuzzyBean item) {
             helper.setText(R.id.macode_Tv,item.getMA_CODE());
+
         }
     }
 
@@ -1436,6 +1614,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     }
     //发送+接收
     private void setMessageData(){
+        mTcpClient = new Tcpclient();
+        mTcpClient.setConnectTimeOut(5000)//设置连接超时
+                .setSocket("192.168.23.74",10001);//设置连接ip和端口10.1.162.69
         new Thread(new Runnable() {
             @Override
             public void run() {
@@ -1468,14 +1649,78 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         QpushClient.getInstance(new Handler(new Handler.Callback() {
             @Override
             public boolean handleMessage(Message msg) {
+                Log.e("服务器数据",msg.obj.toString());
+                return false;
+            }
+        })).init("mes.ubtob.net",8099);
+    }
+
+    /**
+     * 测试连接
+     */
+    public void debughistoryData(){
+        //测试连接,连接后断开
+        QpushClient.getInstance(new Handler(new Handler.Callback() {
+            @Override
+            public boolean handleMessage(Message msg) {
+                if (msg.obj.toString().equals("debugtrue")){//测试连接成功
+                    CommonUtil.toastNoRepeat(IndexActivity.this,msg.obj.toString());
+                }else {//测试连接失败 和拿到handler消息
+                    if (msg.obj.toString().equals("newdata")){
+                        CommonUtil.toastNoRepeat(IndexActivity.this,"更新数据");
+                    }
+                    CommonUtil.toastNoRepeat(IndexActivity.this,msg.obj.toString());
+
+                }
+                Log.e("服务器返回",msg.obj.toString());
                 return false;
             }
-        })).init("10.1.162.69",10001);
+        })).debugconnect("mes.ubtob.net",8099);
+
+    }
 
+    /**
+     * 断开socket
+     */
+    public void destoryhistoryData(){
+        QpushClient.getInstance(new Handler(new Handler.Callback() {
+            @Override
+            public boolean handleMessage(Message msg) {
+                return false;
+            }
+        })).onDestory();
     }
 
 
+    private class IpAndPortAdapter extends BaseQuickAdapter<IpAndPortBean, BaseViewHolder> {
+        private List<IpAndPortBean> mmmmList;
+
+        public List<IpAndPortBean> getmList() {
+            return mmmmList;
+        }
+
+        public void setmList(List<IpAndPortBean> mList) {
+            this.mmmmList = mList;
+        }
+        public IpAndPortBean getBeanByPositon(int position){
+            return mmmmList.get(position);
+        }
 
+        private IpAndPortAdapter(@Nullable List<IpAndPortBean> data) {
+            super(R.layout.fuzzy_ipandport_item, data);
+            this.mmmmList = data;
+        }
+        @Override
+        protected void convert(BaseViewHolder helper, IpAndPortBean item) {
+            helper.setText(R.id.macode_ip__Tv,item.getSS_CODE()+"-"+item.getSS_STEPCODE()+"-"+item.getSS_NAME());
+            LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
+            if (item.getChecked()) {
+                line_true.setSelected(true);
+            } else {
+                line_true.setSelected(false);
+            }
+        }
+    }
 
 
 

+ 40 - 0
app/src/main/java/com/uas/esop/adapter/PdfOrImageAdapter.java

@@ -0,0 +1,40 @@
+package com.uas.esop.adapter;
+
+import android.support.annotation.Nullable;
+import android.util.Base64;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.esop.R;
+import com.uas.esop.bean.ResourcefileBean;
+
+import java.util.List;
+
+/**
+ * Created by cjh-sail on 2022-11-29
+ */
+public class PdfOrImageAdapter extends BaseQuickAdapter<ResourcefileBean.DataBean.UrlBean, BaseViewHolder> {
+    private List<ResourcefileBean.DataBean.UrlBean> mList;
+
+    public List<ResourcefileBean.DataBean.UrlBean> getmList() {
+        return mList;
+    }
+
+    public void setmList(List<ResourcefileBean.DataBean.UrlBean> mList) {
+        this.mList = mList;
+    }
+    public ResourcefileBean.DataBean.UrlBean getBeanByPositon(int position){
+        return mList.get(position);
+    }
+
+    public PdfOrImageAdapter(@Nullable List<ResourcefileBean.DataBean.UrlBean> data) {
+        super(R.layout.fuzzy_search_item, data);
+    }
+    @Override
+    protected void convert(BaseViewHolder helper, ResourcefileBean.DataBean.UrlBean item) {
+        String str2 = new String(Base64.decode(item.getPath().getBytes(),Base64.DEFAULT));
+        helper.setText(R.id.macode_Tv,item.getFilename());
+        helper.setText(R.id.remark_Tv,str2);
+    }
+
+}

+ 62 - 0
app/src/main/java/com/uas/esop/bean/IpAndPortBean.java

@@ -0,0 +1,62 @@
+package com.uas.esop.bean;
+
+/**
+ * Created by cjh-sail on 2022-11-28
+ */
+public class IpAndPortBean {
+
+     String SS_LINECODE;
+     String SS_STEPCODE;
+     String SS_NAME;
+     String SS_CODE;
+     String SS_WCCODE;
+     boolean isChecked;
+
+    public String getSS_LINECODE() {
+        return SS_LINECODE;
+    }
+
+    public void setSS_LINECODE(String SS_LINECODE) {
+        this.SS_LINECODE = SS_LINECODE;
+    }
+
+    public String getSS_STEPCODE() {
+        return SS_STEPCODE;
+    }
+
+    public void setSS_STEPCODE(String SS_STEPCODE) {
+        this.SS_STEPCODE = SS_STEPCODE;
+    }
+
+    public String getSS_NAME() {
+        return SS_NAME;
+    }
+
+    public void setSS_NAME(String SS_NAME) {
+        this.SS_NAME = SS_NAME;
+    }
+
+    public String getSS_CODE() {
+        return SS_CODE;
+    }
+
+    public void setSS_CODE(String SS_CODE) {
+        this.SS_CODE = SS_CODE;
+    }
+
+    public String getSS_WCCODE() {
+        return SS_WCCODE;
+    }
+
+    public void setSS_WCCODE(String SS_WCCODE) {
+        this.SS_WCCODE = SS_WCCODE;
+    }
+
+    public boolean getChecked() {
+        return isChecked;
+    }
+
+    public void setChecked(boolean checked) {
+        isChecked = checked;
+    }
+}

+ 0 - 4
app/src/main/java/com/uas/esop/fragment/IOCInMakeMaterialFragment.java

@@ -100,7 +100,6 @@ public class IOCInMakeMaterialFragment extends BaseFragment implements View.OnCl
         //List
         ptrlLocal = ((PullToRefreshLayout) root.findViewById(R.id.refresh_view));
         localList = (ListView) root.findViewById(R.id.content_view);
-        headView = root.findViewById(R.id.head_view);
         loadView = root.findViewById(R.id.loadmore_view);
         //数据变化回调
         DataSourceManager.getDataSourceManager().setNotifyData(this);
@@ -309,7 +308,6 @@ public class IOCInMakeMaterialFragment extends BaseFragment implements View.OnCl
         searchEditText = (EditText) view.findViewById(R.id.et_search_inmake);
         nullItemSearch = (RelativeLayout) view.findViewById(R.id.rl_nulldata);
         refreshView = view.findViewById(R.id.refresh_view);
-        searchHeadView = view.findViewById(R.id.head_view);
         //List
         ptrlSearch = (PullToRefreshLayout) view.findViewById(R.id.refresh_view);
         ptrlSearch.setOnRefreshListener(new InoutMakeListListener());
@@ -333,7 +331,6 @@ public class IOCInMakeMaterialFragment extends BaseFragment implements View.OnCl
         });
 
         //页面配置,禁止下拉
-        searchHeadView.setVisibility(View.GONE);
 
         //popwin捕获焦点
         popupWindow.setFocusable(true);
@@ -465,7 +462,6 @@ public class IOCInMakeMaterialFragment extends BaseFragment implements View.OnCl
     private void showSelectPopWindow() {
         LayoutInflater inflater = getActivity().getLayoutInflater();
         View view = inflater.inflate(R.layout.popupwin_inmake_select, null, false);
-        View searchHeadView = view.findViewById(R.id.head_view);
         View searchLoadView = view.findViewById(R.id.loadmore_view);
         //显示选择界面
         selectPopWin = new PopupWindow(view, ActionBar.LayoutParams.FILL_PARENT, ActionBar.LayoutParams.FILL_PARENT);

+ 1 - 1
app/src/main/java/com/uas/esop/fragment/IndexSettingFragment.java

@@ -403,7 +403,7 @@ public class IndexSettingFragment extends BaseFragment implements View.OnClickLi
                                 VolleyUtil.setVolleyHandler(mHandler);
                                 //连接服务器
                                 VolleyUtil.getVolleyUtil().requestConnectServer(getActivity(), GloableParams.ADDRESS_LOGOUT_APPLY, VolleyUtil.METHOD_GET, VolleyUtil.FRAGMENT_LOGOUT);
-
+                                SharedPreUtil.removeString(getContext(),"ss_name");
                                 /*PdaApplication.mRequestQueue.cancelAll(TAG + "logout");
 
                                 mStringRequest = new StringRequest(Request.Method.GET, GloableParams.ADDRESS_LOGOUT_APPLY,

+ 0 - 2
app/src/main/java/com/uas/esop/fragment/SCFeederPrepareFragment.java

@@ -206,7 +206,6 @@ public class SCFeederPrepareFragment extends BaseFragment implements DataSourceM
         searchEditText = (EditText) view.findViewById(R.id.et_search_inmake);
         nullItemLayoutSearch = (RelativeLayout) view.findViewById(R.id.rl_nulldata);
         refreshView = view.findViewById(R.id.refresh_view);
-        searchHeadView = view.findViewById(R.id.head_view);
         searchLayout = (LinearLayout) view.findViewById(R.id.ll_search_inmake);
         upperLayout = (LinearLayout) view.findViewById(R.id.ll_upperlayout_inmake);
         //List
@@ -233,7 +232,6 @@ public class SCFeederPrepareFragment extends BaseFragment implements DataSourceM
         });
         popupWindow.setOnDismissListener(this);
         //页面配置,禁止下拉
-        searchHeadView.setVisibility(View.GONE);
 
         //popwin捕获焦点
         popupWindow.setFocusable(true);

+ 0 - 1
app/src/main/java/com/uas/esop/fragment/SCMakePrepareGetFragment.java

@@ -80,7 +80,6 @@ public class SCMakePrepareGetFragment extends BaseFragment implements DataSource
         tvNotice = (TextView) root.findViewById(R.id.tv_innernotice);
         btnCollect = (TextView) root.findViewById(R.id.btn_collect_scmake);
         //->ListView
-        headView = root.findViewById(R.id.head_view);
         tailView = root.findViewById(R.id.loadmore_view);
         nullUnCollectView = (RelativeLayout) root.findViewById(R.id.rl_nulldata);
         //->Notice&Message

+ 0 - 2
app/src/main/java/com/uas/esop/fragment/SCMakePrepareListFragment.java

@@ -219,7 +219,6 @@ public class SCMakePrepareListFragment extends BaseFragment implements DataSourc
         nullItemLayoutSearch = (RelativeLayout) view.findViewById(R.id.rl_nulldata);
         refreshView = view.findViewById(R.id.refresh_view);
         //->ListView
-        searchHeadView = view.findViewById(R.id.head_view);
         searchLoadView= view.findViewById(R.id.loadmore_view);
         searchLayout = (LinearLayout) view.findViewById(R.id.ll_search_inmake);
         upperLayout = (LinearLayout) view.findViewById(R.id.ll_upperlayout_inmake);
@@ -248,7 +247,6 @@ public class SCMakePrepareListFragment extends BaseFragment implements DataSourc
         popupWindow.setOnDismissListener(this);
 
         //页面配置,禁止下拉
-        searchHeadView.setVisibility(View.GONE);
         searchLoadView.setVisibility(View.GONE);
         //popwin捕获焦点
         popupWindow.setFocusable(true);

+ 2 - 2
app/src/main/java/com/uas/esop/fragment/WHBatchContentFragment.java

@@ -80,8 +80,8 @@ public class WHBatchContentFragment extends BaseFragment implements AdapterView.
                 break;
             //合并批次
             case R.string.title_combinebatch:
-                getFragmentManager().beginTransaction().addToBackStack(null)
-                        .replace(R.id.container_function_fragment, new WHCombineBatchFragment()).commit();
+//                getFragmentManager().beginTransaction().addToBackStack(null)
+//                        .replace(R.id.container_function_fragment, new WHCombineBatchFragment()).commit();
                 break;
             //包装分拆
             case R.string.title_breakpackage:

+ 0 - 645
app/src/main/java/com/uas/esop/fragment/WHCombineBatchFragment.java

@@ -1,645 +0,0 @@
-package com.uas.esop.fragment;
-
-import android.app.Activity;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.graphics.drawable.BitmapDrawable;
-import android.net.Uri;
-import android.os.Build;
-import android.os.Handler;
-import android.os.Message;
-import android.support.v4.content.FileProvider;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.inputmethod.EditorInfo;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.ListView;
-import android.widget.PopupWindow;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.android.volley.AuthFailureError;
-import com.android.volley.Request;
-import com.android.volley.RequestQueue;
-import com.android.volley.Response;
-import com.android.volley.VolleyError;
-import com.android.volley.toolbox.StringRequest;
-import com.android.volley.toolbox.Volley;
-import com.google.gson.Gson;
-import com.uas.esop.R;
-import com.uas.esop.activity.FunctionActivity;
-import com.uas.esop.bean.WHBreakingBatchGetBarcodeData;
-import com.uas.esop.bean.WHCombineBatchFragmentCombineBtnClickEvent;
-import com.uas.esop.global.GloableParams;
-import com.uas.esop.tools.VolleyUtil;
-import com.uas.esop.util.CameraUtil;
-import com.uas.esop.util.CommonUtil;
-import com.uas.esop.util.Constants;
-import com.uas.esop.util.FileUtils;
-import com.uas.esop.util.JsonTools;
-import com.uas.esop.util.LogUtil;
-import com.uas.esop.view.ClearableEditText;
-import com.uuzuche.lib_zxing.activity.CaptureActivity;
-import com.uuzuche.lib_zxing.activity.CodeUtils;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @note:合并批次页面
- */
-
-public class WHCombineBatchFragment extends BaseFragment implements View.OnClickListener {
-    private static final int SCAN_BARCODE_CODE = 102;
-    private View popView;
-    private PopupWindow pop;
-    private Button btnConfirm, btnMerge;
-    private TextView tvToatal;
-    private EditText etBarCode;
-    private RequestQueue mRequestQueue;
-    private StringRequest stringRequest, stringRequest2, stringRequest3;
-    private ListView listView;
-    private MyAdapter myAdapter;
-    private List<WHBreakingBatchGetBarcodeData.DataBeanX.DataBean> dataList = new ArrayList<>();
-    private List<WHCombineBatchFragmentCombineBtnClickEvent.DataBean> dataPrintList = new ArrayList<>();
-    private double sum;
-    private String strDataList;
-    private String strPrintDataList;
-    private int lastPress = 0;
-    private boolean delState = false;
-    private String mPrintUrl = "";
-    private Handler mHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            super.handleMessage(msg);
-            switch (msg.what) {
-                case Constants.CONSTANT.PRINT_SUCCESS:
-                    if (progressDialog.isShowing())
-                        progressDialog.dismiss();
-                    closePopupWindow();
-                    Toast.makeText(mActivity, R.string.obtain_print_file_success, Toast.LENGTH_LONG).show();
-                    try {
-                        Intent intent = new Intent();
-                        ComponentName comp = new ComponentName("com.dynamixsoftware.printershare", "com.dynamixsoftware.printershare.ActivityPrintPDF");
-                        intent = new Intent();
-                        intent.setComponent(comp);
-                        intent.setAction("android.intent.action.VIEW");
-                        intent.setType("application/pdf");
-                        intent.setData(Uri.fromFile(new File(Constants.CONSTANT.PRINT_FILE_PATH, Constants.CONSTANT.PRINT_FILE_NAME)));
-                        startActivity(intent);
-                    } catch (Exception e) {
-                        Toast.makeText(mActivity, "打印失败", Toast.LENGTH_LONG).show();
-                        e.printStackTrace();
-                    }
-                    break;
-                case Constants.CONSTANT.PRINT_FAILED:
-                    if (progressDialog.isShowing())
-                        progressDialog.dismiss();
-                    Toast.makeText(mActivity, R.string.obtain_print_file_failed, Toast.LENGTH_LONG).show();
-                    break;
-                case Constants.CONSTANT.PRINT_OVERLOAD:
-                    if (progressDialog.isShowing())
-                        progressDialog.dismiss();
-                    Toast.makeText(mActivity, R.string.obtain_print_file_overload, Toast.LENGTH_LONG).show();
-                    break;
-                default:
-                    break;
-            }
-        }
-    };
-    private ImageView mScanImageView;
-    private int mFocusId;
-
-    @Override
-    protected int getLayout() {
-        return R.layout.fragment_whcombine_batch;
-    }
-
-    @Override
-    protected void initViews() {
-        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.title_combinebatch));
-        ((FunctionActivity) mActivity).setScanIvVisible(true);
-
-        etBarCode = (EditText) root.findViewById(R.id.et_bar_code);
-        btnConfirm = (Button) root.findViewById(R.id.btn_confirm);
-        tvToatal = (TextView) root.findViewById(R.id.tv_total);
-        listView = (ListView) root.findViewById(R.id.list_view);
-        mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
-
-        myAdapter = new MyAdapter(getActivity(), R.layout.item_list_whcombatchfragment, dataList);
-        listView.setAdapter(myAdapter);
-        btnMerge = (Button) root.findViewById(R.id.btn_merge);
-    }
-
-    @Override
-    protected void initEvents() {
-        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                if (delState) {
-                    if (lastPress < parent.getCount()) {
-                        View childView = parent.getChildAt(lastPress - listView.getFirstVisiblePosition());
-                        if (childView != null) {
-                            View delView = childView.findViewById(R.id.linear_del);
-                            if (null != delView) {
-                                delView.setVisibility(View.GONE);
-                            }
-                        }
-                        //一定要加上   delState = false;    return;
-                        delState = false;
-                        return;
-                    } else {
-                        Log.d("click:", position + "");
-                    }
-                }
-            }
-        });
-        listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
-            private View delview;
-
-            @Override
-            public boolean onItemLongClick(AdapterView<?> parent, View view, final int position, long id) {
-                if (lastPress < parent.getCount()) {
-                    View childView = parent.getChildAt(lastPress - listView.getFirstVisiblePosition());
-                    if (childView != null)
-                        delview = childView.findViewById(R.id.linear_del);
-                    if (null != delview) {
-                        delview.setVisibility(View.GONE);
-                    }
-                }
-                delview = view.findViewById(R.id.linear_del);
-                delview.setVisibility(View.VISIBLE);
-                delState = true;
-                lastPress = position;
-                delview.findViewById(R.id.tv_del).setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        //bar_remain总数减去移除的部分
-                        sum = CommonUtil.doublesubtract(sum, dataList.get(position).getBAR_REMAIN());
-                        tvToatal.setText(CommonUtil.doubleFormat(sum));
-                        dataList.remove(position);
-                        myAdapter.notifyDataSetChanged();
-                        if (dataList.size() <= 1) {
-                            btnMerge.setEnabled(false);
-                        } else {
-                            btnMerge.setEnabled(true);
-                        }
-                        delview.setVisibility(View.GONE);
-                        delState = false;
-                    }
-                });
-                delview.findViewById(R.id.tv_cancel).setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        delview.setVisibility(View.GONE);
-                        delState = false;
-                    }
-                });
-                return true;
-            }
-        });
-        btnConfirm.setOnClickListener(this);
-        btnMerge.setOnClickListener(this);
-
-        CommonUtil.editTextGetFocus(etBarCode);
-        CommonUtil.setEnabled(etBarCode, btnConfirm);
-        etBarCode.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_SEND
-                        || actionId == EditorInfo.IME_ACTION_DONE
-                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
-                    String str = etBarCode.getText().toString().trim();
-                    etBarCode.setText("");
-                    if (TextUtils.isEmpty(str)) {
-                        ((ClearableEditText) etBarCode).setWarnIconVisible();
-                        return true;
-                    }
-                    for (int i = 0; i < dataList.size(); i++) {
-                        if (str.equals(dataList.get(i).getBAR_CODE())) {
-                            Toast.makeText(getActivity().getApplicationContext(), "条码重复", Toast.LENGTH_LONG).show();
-                            CommonUtil.editTextGetFocus(etBarCode);
-                            return true;
-                        }
-                    }
-                    CommonUtil.closeKeybord(etBarCode, mActivity);
-                    getLoadingView();
-                    confirmBtnClick(str);
-                    etBarCode.setText("");
-                    return true;
-                }
-                return false;
-            }
-        });
-
-        mScanImageView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (CameraUtil.hasCamera()) {
-                    if (root.findFocus() != null) {
-                        mFocusId = root.findFocus().getId();
-                        Intent intent = new Intent();
-                        intent.setClass(mActivity, CaptureActivity.class);
-                        startActivityForResult(intent, SCAN_BARCODE_CODE);
-                    }
-                } else {
-                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
-                }
-            }
-        });
-    }
-
-    @Override
-    protected void initDatas() {
-
-    }
-
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (resultCode != Activity.RESULT_OK) {
-            return;
-        }
-
-        if (requestCode == SCAN_BARCODE_CODE && data != null) {
-            if (data.getExtras() != null) {
-                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
-                if (mFocusId == R.id.et_bar_code) {
-                    etBarCode.setText(result);
-                    etBarCode.setSelection(result.length());
-                }
-            }
-        }
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        return false;
-    }
-
-    @Override
-    public boolean onFragmentBackPressed() {
-        return false;
-    }
-
-    @Override
-    public void onClick(View v) {
-        switch (v.getId()) {
-            case R.id.btn_confirm:
-                String str = etBarCode.getText().toString().trim();
-                if (TextUtils.isEmpty(str)) {
-                    ((ClearableEditText) etBarCode).setWarnIconVisible();
-                    Toast.makeText(getActivity().getApplicationContext(), "还有必填项值为空", Toast.LENGTH_SHORT).show();
-                    return;
-                }
-                if (!str.matches(Constants.REGEX.NO_SYMBOL)) {
-                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
-                    return;
-                }
-
-                for (int i = 0; i < dataList.size(); i++) {
-                    if (str.equals(dataList.get(i).getBAR_CODE())) {
-                        Toast.makeText(getActivity().getApplicationContext(), "条码重复", Toast.LENGTH_LONG).show();
-
-                        return;
-                    }
-                }
-                CommonUtil.closeKeybord(etBarCode, mActivity);
-                //请求详细数据
-                btnConfirm.setEnabled(false);
-                getLoadingView();
-                confirmBtnClick(str);
-                break;
-            case R.id.btn_merge:
-                //返回值只有一条数据,使用popupWindow的方法显示出来
-                if (dataList.size() > 1) {
-                    combineBtnClickEvent();
-                }
-
-                break;
-            case R.id.btn_print:
-                if (!CommonUtil.appIsInstalled(getActivity(), Constants.CONSTANT.PRINT_SHARE_PACKAGE)) {
-                    new android.app.AlertDialog.Builder(getActivity()).setTitle("提示")
-                            .setMessage("您还未安装打印程序,点击确认开始安装")
-                            .setPositiveButton("确认", new DialogInterface.OnClickListener() {
-                                @Override
-                                public void onClick(DialogInterface dialog, int which) {
-                                    Intent intent = new Intent(Intent.ACTION_VIEW);
-                                    File assetsFileToCacheDir = FileUtils.getAssetsFileToCacheDir(getActivity(), "PrinterShare.apk");
-                                    if (Build.VERSION.SDK_INT >= 24) {
-                                        Uri apkUri = FileProvider.getUriForFile(mActivity, "com.uas.esop.fileprovider", assetsFileToCacheDir);
-                                        //Granting Temporary Permissions to a URI
-                                        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
-                                        intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
-                                    } else {
-                                        intent.setDataAndType(Uri.fromFile(assetsFileToCacheDir), "application/vnd.android.package-archive");
-                                    }
-                                    getActivity().startActivity(intent);
-
-                                }
-                            })
-                            .setNegativeButton("取消", null).create().show();
-                } else {
-                    getPrintData();
-                }
-                break;
-            case R.id.btn_close:
-                closePopupWindow();
-                break;
-        }
-    }
-
-
-    /**
-     * 创建PopupWindow
-     */
-    protected void initPopuptWindow(String code, String remain) {
-        LayoutInflater inflater = LayoutInflater.from(getActivity());
-        popView = inflater.inflate(R.layout.popupwindow_whcombine_bach, null);
-        TextView tvNewBarCode = (TextView) popView.findViewById(R.id.tv_new_bar_code);
-        TextView tvTotal = (TextView) popView.findViewById(R.id.tv_total);
-        tvNewBarCode.setText(code);
-        tvTotal.setText(remain);
-        Button btnPrint = (Button) popView.findViewById(R.id.btn_print);
-        Button btnClose = (Button) popView.findViewById(R.id.btn_close);
-        btnPrint.setOnClickListener(this);
-        btnClose.setOnClickListener(this);
-        // PopupWindow实例化
-        pop = new PopupWindow(popView, LinearLayout.LayoutParams.WRAP_CONTENT,
-                LinearLayout.LayoutParams.WRAP_CONTENT, true);
-        pop.setAnimationStyle(R.style.MenuAnimationFade);
-        pop.setBackgroundDrawable(new BitmapDrawable());
-        pop.setOnDismissListener(new PopupWindow.OnDismissListener() {
-            @Override
-            public void onDismiss() {
-                closePopupWindow();
-            }
-        });
-        // 弹出窗口显示内容视图,默认以锚定视图的左下角为起点,这里为点击按钮
-        pop.showAtLocation(btnConfirm, Gravity.CENTER, 0, 0);
-        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
-
-    }
-
-    /**
-     * 关闭窗口
-     */
-    private void closePopupWindow() {
-        if (pop != null) {
-            pop.dismiss();
-            pop = null;
-            CommonUtil.setBackgroundAlpha(mActivity, 1f);
-        }
-    }
-
-
-    /**
-     * 并且获取条码的剩余数量
-     */
-    public static final String CONFIRMBTNCLICK = "confirmBtnClick";
-
-    private void confirmBtnClick(String code) {
-        mRequestQueue = Volley.newRequestQueue(getActivity());
-        String url = GloableParams.ADDRESS_CONFIRMBTNCLICK + "?code=" + code + "&pr_ismsd=" + "false";
-        try {
-            url = GloableParams.ADDRESS_CONFIRMBTNCLICK + "?code=" + URLEncoder.encode(code, "utf-8") + "&pr_ismsd=" + "false";
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-
-        stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {
-            @Override
-            public void onResponse(String s) {
-                WHBreakingBatchGetBarcodeData whc = JsonTools.parseJsonToBean(s, WHBreakingBatchGetBarcodeData.class);
-                dataList.add(whc.getData().getData());
-                strDataList = new Gson().toJson(dataList);
-                LogUtil.e("dataList ", strDataList);
-                myAdapter.notifyDataSetChanged();
-                getLoadingView();
-                sum = CommonUtil.doubleAddition(sum, whc.getData().getData().getBAR_REMAIN());
-                tvToatal.setText(CommonUtil.doubleFormat(sum));
-                CommonUtil.editTextGetFocus(etBarCode);
-                etBarCode.setText("");
-                btnConfirm.setEnabled(false);
-                if (sum > 0 && dataList.size() > 1) {
-                    btnMerge.setEnabled(true);
-                } else {
-                    btnMerge.setEnabled(false);
-                }
-
-            }
-        }, new Response.ErrorListener() {
-            @Override
-            public void onErrorResponse(VolleyError error) {
-                CommonUtil.showErrorToast(error);
-                if (progressDialog.isShowing())
-                    progressDialog.dismiss();
-                etBarCode.setText(null);
-                CommonUtil.editTextGetFocus(etBarCode);
-            }
-        }) {
-            @Override
-            public Map<String, String> getHeaders() throws AuthFailureError {
-                return VolleyUtil.getVolleyUtil().setCookies();
-            }
-        };
-        stringRequest.setTag(CONFIRMBTNCLICK);
-        mRequestQueue.add(stringRequest);
-    }
-
-    /**
-     * 合并按钮点击事件
-     */
-    public static final String COMBINEBTNCLICKEVENT = "combineBtnClickEvent";
-    WHCombineBatchFragmentCombineBtnClickEvent whc2;
-
-    private void combineBtnClickEvent() {
-        Map<String, String> params = new HashMap<>();
-        params.put("total_remain", tvToatal.getText().toString().trim());
-        params.put("data", strDataList);
-        JSONObject jsonObject = new JSONObject(params);
-        LogUtil.e("or_barcode", jsonObject.toString());
-        String url = GloableParams.ADDRESS_COMBINEBTNCLICKEVENT + "?total_remain=" + tvToatal.getText().toString().trim();
-//                + "&data=" + strDataList;
-
-        stringRequest2 = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
-            @Override
-            public void onResponse(String s) {
-                LogUtil.e("combineBtnClickEvent onResponse  =", s);
-                whc2 = JsonTools.parseJsonToBean(s, WHCombineBatchFragmentCombineBtnClickEvent.class);
-                dataPrintList.add(whc2.getData());
-                strPrintDataList = new Gson().toJson(dataPrintList);
-                LogUtil.e("strPrintDataList", strPrintDataList);
-                //如果返回成功则初始化状态
-                delState = false;
-                dataList.clear();
-                myAdapter.notifyDataSetChanged();
-                sum = 0;
-                tvToatal.setText(sum + "");
-                btnMerge.setEnabled(false);
-                initPopuptWindow(whc2.getData().getBAR_CODE(), CommonUtil.doubleFormat(whc2.getData().getBAR_REMAIN()));
-            }
-        }, new Response.ErrorListener() {
-            @Override
-            public void onErrorResponse(VolleyError volleyError) {
-                CommonUtil.showErrorToast(volleyError);
-            }
-        }) {
-            @Override
-            public Map<String, String> getHeaders() throws AuthFailureError {
-                Map map = VolleyUtil.getVolleyUtil().setCookies();
-                //不用改动
-                map.put("Content-Type", "text/html; charset=UTF-8");
-                return map;
-            }
-
-            //不用改动
-            @Override
-            public byte[] getBody() throws AuthFailureError {
-                byte[] paramByte = new byte[0];
-                try {
-                    //pararm为要传递的参数
-                    paramByte = strDataList.getBytes("UTF-8");
-                } catch (UnsupportedEncodingException e) {
-                    e.printStackTrace();
-                }
-                Log.e("getBody", new String(paramByte));
-                return paramByte;
-            }
-        };
-
-        stringRequest2.setTag(COMBINEBTNCLICKEVENT);
-        mRequestQueue.add(stringRequest2);
-
-    }
-
-    public static final String GETPRINTDATA = "getPrintData";
-
-    private void getPrintData() {
-        progressDialog.show();
-        String url = GloableParams.ADDRESS_LABELPRINT + "?data=" + strPrintDataList;
-
-        stringRequest3 = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {
-            @Override
-            public void onResponse(String s) {
-                try {
-                    JSONObject resultObject = new JSONObject(s);
-                    if (resultObject.optBoolean("success")) {
-                        mPrintUrl = resultObject.optString("data");
-                        FileUtils.printBarcode(mPrintUrl, mHandler);
-                    }
-                } catch (JSONException e) {
-                    if (progressDialog.isShowing())
-                        progressDialog.dismiss();
-                    e.printStackTrace();
-                }
-            }
-        }, new Response.ErrorListener() {
-            @Override
-            public void onErrorResponse(VolleyError volleyError) {
-                if (progressDialog.isShowing())
-                    progressDialog.dismiss();
-                CommonUtil.showErrorToast(volleyError);
-            }
-        }) {
-            @Override
-            public Map<String, String> getHeaders() throws AuthFailureError {
-                Map map = VolleyUtil.getVolleyUtil().setCookies();
-                //不用改动
-                map.put("Content-Type", "text/html; charset=UTF-8");
-                return map;
-            }
-        };
-        stringRequest3.setTag(GETPRINTDATA);
-        mRequestQueue.add(stringRequest3);
-    }
-
-
-    @Override
-    public void onDestroy() {
-        progressDialog.dismiss();
-        CommonUtil.closeKeybord(etBarCode, mActivity);
-        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(R.string.title_batch_content);
-        ((FunctionActivity) mActivity).setScanIvVisible(false);
-        super.onDestroy();
-
-    }
-
-    /**
-     * 显示loadingView
-     */
-    private void getLoadingView() {
-        if (!progressDialog.isShowing()) {
-            progressDialog.show();
-        } else {
-            progressDialog.dismiss();
-        }
-    }
-
-    @Override
-    public void onStop() {
-        super.onStop();
-        if (mRequestQueue != null) {
-            mRequestQueue.cancelAll(CONFIRMBTNCLICK);
-            mRequestQueue.cancelAll(COMBINEBTNCLICKEVENT);
-            mRequestQueue.cancelAll(GETPRINTDATA);
-        }
-    }
-
-    private class MyAdapter extends ArrayAdapter<WHBreakingBatchGetBarcodeData.DataBeanX.DataBean> {
-        private int resourceId;
-
-        public MyAdapter(Context context, int resource, List<WHBreakingBatchGetBarcodeData.DataBeanX.DataBean> objects) {
-            super(context, resource, objects);
-            resourceId = resource;
-        }
-
-        @Override
-        public View getView(final int position, View convertView, final ViewGroup parent) {
-            WHBreakingBatchGetBarcodeData.DataBeanX.DataBean person = getItem(position);
-            convertView = LayoutInflater.from(getContext()).inflate(resourceId, null);
-
-            TextView tv_bar_code = (TextView) convertView.findViewById(R.id.tv_bar_code);
-            TextView tv_bar_remain = (TextView) convertView.findViewById(R.id.tv_bar_remain);
-            TextView tv_bar_prodcode = (TextView) convertView.findViewById(R.id.tv_bar_prodcode);
-            TextView tv_pr_detail = (TextView) convertView.findViewById(R.id.tv_pr_detail);
-            TextView tv_bar_whcode = (TextView) convertView.findViewById(R.id.tv_bar_whcode);
-            TextView tv_bar_location = (TextView) convertView.findViewById(R.id.tv_bar_location);
-            TextView tv_bar_batch = (TextView) convertView.findViewById(R.id.tv_bar_batch);
-            LinearLayout deleteLayout = (LinearLayout) convertView.findViewById(R.id.linear_del);
-
-            tv_bar_code.setText(person.getBAR_CODE());
-            tv_bar_remain.setText(person.getBAR_REMAIN() + "");
-            tv_bar_prodcode.setText(person.getBAR_PRODCODE());
-            tv_pr_detail.setText(person.getPR_DETAIL());
-            tv_bar_whcode.setText(person.getBAR_WHCODE());
-            tv_bar_location.setText(person.getBAR_LOCATION());
-            tv_bar_batch.setText(person.getBAR_BATCHCODE());
-
-            if (lastPress == position && delState) {
-                deleteLayout.setVisibility(View.VISIBLE);
-            }
-            return convertView;
-        }
-    }
-}

+ 9 - 3
app/src/main/java/com/uas/esop/global/GloableParams.java

@@ -316,6 +316,7 @@ public class GloableParams {
     public static String ADDRESS_COUNTING_CLEARSTOCKDIFF;
     public static String ASTATIONTHEQURETHEQURE;
     public static String ASTATIONTHE_RESOURCEFILE;
+    public static String ASTATIONTHE_GETSOPSOURCE;
     /**
      * 高登
      */
@@ -811,6 +812,9 @@ public class GloableParams {
     private static final String ADDRESSTAIL_PAD_FEEDEDLOADDING = "/api/pdashop/loading/loading.action";
     //获取当前账号可使用的岗位资源
     private static final String ADDRESSTAIL_PAD_GETSOURCEBYEMP = "/api/pdashop/getSource.action";
+    //查询站点接口
+    private static final String ADDRESSTAIL_GETSOPSOURCE = "/api/pda/ESOP/getSopSource.action";
+
     /**
      * 工步移交
      */
@@ -898,8 +902,8 @@ public class GloableParams {
     //过站信息查询
     private static final String ASTATIONTHEQURE= "/api/pdashop/getLotInfo.action";
     //获取资源文件
-//    private static final String ADDRESSTAIL_RESOURCEFILE = "/api/pda/ESOP/getESOP.action";
-    private static final String ADDRESSTAIL_RESOURCEFILE = "/common/downloadbyId.action";
+    private static final String ADDRESSTAIL_RESOURCEFILE = "/api/pda/ESOP/getESOP.action";
+//    private static final String ADDRESSTAIL_RESOURCEFILE = "/common/downloadbyId.action";
 
 
     /***********************************************************************************************/
@@ -1037,7 +1041,7 @@ public class GloableParams {
     public static final String[] feederListNames = {LISTNAME_FEEDER_IN, LISTNAME_FEEDER_JOIN, LISTNAME_FEEDER_CHANGE, LISTNAME_FEEDER_DOWN,
             LISTNAME_FEEDER_DOWNALL, LISTNAME_FEEDER_QUERY, LISTNAME_FEEDER_SWITCH, LISTNAME_FEEDER_CHECK, LISTNAME_FEEDER_MACHINE};
     public static final int[] feederListImgs = {R.drawable.index_smt_up, R.drawable.index_smt_joint, R.drawable.index_smt_change,
-            R.drawable.index_smt_down, R.drawable.index_smt_downall, R.drawable.index_smt_query, R.drawable.index_smt_switch, R.drawable.index_smt_check, R.drawable.index_smt_machine};
+            R.drawable.index_smt_down, R.drawable.index_smt_downall, R.drawable.index_smt_query, R.drawable.index_smt_switch, R.drawable.index_smt_machine, R.drawable.index_smt_machine};
 
     //-->入库管理
     public static final String MENU_STORAGE_RECHARGE = "收料";
@@ -1423,5 +1427,7 @@ public class GloableParams {
         GloableParams.ASTATIONTHEQURETHEQURE = uriHead + GloableParams.ASTATIONTHEQURE;
 
         GloableParams.ASTATIONTHE_RESOURCEFILE = uriHead + GloableParams.ADDRESSTAIL_RESOURCEFILE;
+
+        GloableParams.ASTATIONTHE_GETSOPSOURCE = uriHead + GloableParams.ADDRESSTAIL_GETSOPSOURCE;
     }
 }

+ 61 - 14
app/src/main/java/com/uas/esop/util/QpushClient.java

@@ -3,10 +3,6 @@ package com.uas.esop.util;
 import android.os.Handler;
 import android.util.Log;
 
-import com.uas.esop.bean.TCPEventBusBean;
-
-import org.greenrobot.eventbus.EventBus;
-
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.IOException;
@@ -83,11 +79,55 @@ public class QpushClient implements Runnable {
         if (mClientSocket.isConnected()) {
             //开始登陆
 //            sendMsg("login");
-            recvMsg();
+            recvMsg(2);
             keepHeartBeat();
         }
     }
 
+    /**
+     * 测试连接
+     * @param mHostw
+     * @param mPortw
+     */
+    public void debugconnect(String mHostw,int mPortw){
+//        EventBus.getDefault().post(new TCPEventBusBean("111111"));
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                try {
+
+
+                mAddress = new InetSocketAddress(mHostw, mPortw);
+                if (mClientSocket == null) {
+                    mClientSocket = new Socket();
+                }
+
+                //尝试连接,若未连接,则设置尝试次数
+                while (!mClientSocket.isConnected() && mConnectCount < CONNECT_TRY_TIMES) {
+                    connect();
+                    if (!mClientSocket.isConnected()) {
+                        mConnectCount++;
+                        sleep(CONNECT_PERIOD);
+                    } else {
+                        mConnectCount = 0;//连接上,则恢复置0
+                    }
+                }
+                if (mClientSocket.isConnected()) {
+                    mHandler.obtainMessage(1, "debugtrue").sendToTarget();
+                    mHandler.removeCallbacksAndMessages(null);
+                    onDestory();
+                }
+                    }catch (Exception e){
+
+                }
+            }
+        }).start();
+
+
+
+    }
+
+
     private void connect() {
         try {
             mClientSocket.connect(mAddress);
@@ -114,11 +154,15 @@ public class QpushClient implements Runnable {
     /**
      * 不断的检测是否有服务器推送的数据过来
      */
-    public void recvMsg() {
+    public void recvMsg(int ports) {
+        if (ports==1){
+            isStartRecieveMsg=false;
+        }
         while (mClientSocket != null && mClientSocket.isConnected() && !mClientSocket.isClosed()) {
             try {
                 mReader = new BufferedReader(new InputStreamReader(mClientSocket.getInputStream(), "utf-8"));
                 while (isStartRecieveMsg) {
+
                     Log.e(TAG, "recvMsg5");
                     if (mReader.ready()) {
                         Log.e(TAG, "recvMsg6");
@@ -128,11 +172,8 @@ public class QpushClient implements Runnable {
                             直到接收到新的消息,代码才会往下走*/
                         String data = mReader.readLine();
                         Log.e(TAG,"isStartRecieveMsg data="+data);
-                        EventBus.getDefault().post(new TCPEventBusBean("111111"));
-
-
                         //handler发送消息,在handleMessage()方法中接收
-//                        handlerMsg(data);
+                        handlerMsg(data);
                     }
                     Thread.sleep(200);
                 }
@@ -147,7 +188,7 @@ public class QpushClient implements Runnable {
         }
         if (!mClientSocket.isConnected()) {
             connect();
-            recvMsg();
+            recvMsg(2);
         }
         sleep(CHECK_PERIOD);
     }
@@ -167,12 +208,18 @@ public class QpushClient implements Runnable {
         if (mClientSocket != null) {
             try {
                 mClientSocket.close();
+                recvMsg(1);
             } catch (IOException e) {
                 e.printStackTrace();
             }
             mClientSocket = null;
         }
     }
+
+    /**
+     * 发送
+     * @param message
+     */
     public void sendMsg(String message) {
         PrintWriter writer;
         try {
@@ -206,16 +253,16 @@ public class QpushClient implements Runnable {
         //对数据进行protobuf解析
 
         //消息类型:1=登录成功、2=心跳检测、3=推送消息
-        int msgType=1;
+        int msgType=3;
         switch(msgType){
             case 1:
                 sendMsg("success");
                 break;
             case 2:
-                sendMsg("success");
+                sendMsg("error");
                 break;
             case 3: //需要通知service
-                sendMsg("success");
+//                sendMsg("success");
                 mHandler.obtainMessage(1, data).sendToTarget();
                 break;
 

BIN
app/src/main/res/drawable-hdpi/ic_delete.png


BIN
app/src/main/res/drawable-hdpi/ic_finished_goods_storage.png


BIN
app/src/main/res/drawable-hdpi/ic_material_storage.png


BIN
app/src/main/res/drawable-hdpi/ic_quality_manage.png


BIN
app/src/main/res/drawable-hdpi/ic_random_check.png


BIN
app/src/main/res/drawable-hdpi/ic_stock_barcode.png


BIN
app/src/main/res/drawable-hdpi/ic_storage_inspection.png


BIN
app/src/main/res/drawable-hdpi/ic_storage_iqc.png


BIN
app/src/main/res/drawable-hdpi/ic_storage_material_in.png


BIN
app/src/main/res/drawable-hdpi/ic_storage_recharge.png


BIN
app/src/main/res/drawable-hdpi/ic_submit.png


BIN
app/src/main/res/drawable-hdpi/index_smt_check.png


BIN
app/src/main/res/drawable-hdpi/mainmenu_outinstorage.png


BIN
app/src/main/res/drawable-hdpi/mainmenu_storehousemanager.png


BIN
app/src/main/res/drawable-hdpi/mainmenu_workhousemanager.png


BIN
app/src/main/res/drawable-hdpi/refresh_succeed.png


BIN
app/src/main/res/drawable-hdpi/scanner_collect.png


BIN
app/src/main/res/drawable-hdpi/scanner_verify.png


BIN
app/src/main/res/drawable-hdpi/search.png


BIN
app/src/main/res/drawable-hdpi/setting_default.png


BIN
app/src/main/res/drawable-hdpi/setting_master.png


BIN
app/src/main/res/drawable-hdpi/setting_printer.png


BIN
app/src/main/res/drawable-hdpi/setting_refresh.png


BIN
app/src/main/res/drawable-hdpi/setting_style.png


BIN
app/src/main/res/drawable-hdpi/staffchange.png


BIN
app/src/main/res/drawable-hdpi/storage_msd_manager.png


BIN
app/src/main/res/drawable-hdpi/unfolder_more.png


BIN
app/src/main/res/drawable-hdpi/user_img.png


BIN
app/src/main/res/drawable-hdpi/warn_small.png


BIN
app/src/main/res/drawable-hdpi/workhousemenu_fd_add.png


BIN
app/src/main/res/drawable-hdpi/workhousemenu_material_prepare.png


BIN
app/src/main/res/drawable-hdpi/workhousemenu_recurrence.png


BIN
app/src/main/res/drawable-hdpi/workhousemenu_smt_add.png


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


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


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


BIN
app/src/main/res/drawable-xhdpi/face_chang_1.9.png


BIN
app/src/main/res/drawable-xhdpi/face_chang_2.9.png


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


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


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


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


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


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


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


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


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


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


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


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


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


BIN
app/src/main/res/drawable-xxhdpi/ic_delete.png


BIN
app/src/main/res/drawable-xxhdpi/ic_quality_manage.png


BIN
app/src/main/res/drawable-xxhdpi/ic_stock_barcode.png


BIN
app/src/main/res/drawable-xxhdpi/ic_storage_inspection.png


BIN
app/src/main/res/drawable-xxhdpi/ic_storage_iqc.png


BIN
app/src/main/res/drawable-xxhdpi/ic_storage_material_in.png


BIN
app/src/main/res/drawable-xxhdpi/ic_storage_recharge.png


BIN
app/src/main/res/drawable-xxhdpi/index_smt_check.png


BIN
app/src/main/res/drawable-xxhdpi/mainmenu_outinstorage.png


BIN
app/src/main/res/drawable-xxhdpi/mainmenu_storehousemanager.png


BIN
app/src/main/res/drawable-xxhdpi/mainmenu_workhousemanager.png


BIN
app/src/main/res/drawable-xxhdpi/staffchange.png


BIN
app/src/main/res/drawable-xxhdpi/storage_msd_manager.png


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

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:drawable="@drawable/face_chang_1" android:state_enabled="true" android:state_focused="true" android:state_pressed="false"/>
-    <item android:drawable="@drawable/face_chang_2" android:state_enabled="true" android:state_pressed="true"/>
-    <item android:drawable="@drawable/face_chang_2" android:state_checked="true" android:state_enabled="true"/>
-    <item android:drawable="@drawable/face_chang_1"/>
-
-</selector>

+ 10 - 0
app/src/main/res/drawable/login_technological_bg.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+    <solid android:color="@color/bg_recycle"/>
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/bg_recycle"/>
+
+</shape>

+ 5 - 0
app/src/main/res/drawable/login_technological_process.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/login_technological_bg" android:state_selected="true" />
+    <item android:drawable="@drawable/un_login_technological_bg" />
+</selector>

+ 13 - 0
app/src/main/res/drawable/un_login_technological_bg.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+
+    <corners android:radius="4dp"/>
+
+    <solid android:color="@color/white"/>
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/white"/>
+
+</shape>

+ 43 - 20
app/src/main/res/layout-large/activity_index.xml

@@ -157,6 +157,7 @@
                             android:padding="8dp">
 
                             <LinearLayout
+                                android:id="@+id/line_login_post"
                                 android:layout_gravity="center"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
@@ -170,27 +171,16 @@
                                 <TextView
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:text="ip:10.1.162.69"
+                                    android:text="登录岗位:"
                                     android:textColor="#333333"
-                                    android:textSize="@dimen/textsize_20" />
-
-                                <TextView
-                                    android:layout_marginLeft="@dimen/dp_10"
-                                    android:id="@+id/em_name_tv"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:textColor="#333333"
-                                    android:textSize="@dimen/textsize_20"
-                                    tools:text="port:10007" />
-
+                                    android:textSize="@dimen/space_top_line_15" />
                                 <TextView
-                                    android:visibility="gone"
                                     android:id="@+id/em_code_tv"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
                                     android:layout_marginLeft="10dp"
                                     android:textColor="#333333"
-                                    android:textSize="@dimen/textsize_20" />
+                                    android:textSize="@dimen/space_top_line_15" />
 
                             </LinearLayout>
 
@@ -203,7 +193,26 @@
                         android:layout_height="25dp"
                         android:layout_marginLeft="@dimen/textsize_20"
                         android:layout_centerVertical="true"/>
-
+                    <TextView
+                        android:layout_centerVertical="true"
+                        android:text="@string/string_monitor_socket"
+                        android:textSize="@dimen/space_top_line_15"
+                        android:layout_toRightOf="@id/sound_monitor_Vibration_sv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+                    </TextView>
+                    <TextView
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:id="@+id/em_name_tv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:textColor="#333333"
+                        android:layout_centerVertical="true"
+                        android:layout_alignParentRight="true"
+                        android:layout_marginRight="@dimen/textsize_20"
+                        android:textSize="@dimen/space_top_line_15"
+                        android:text="(ip:10.1.162.69 port:10007)"
+                        />
 
                 </RelativeLayout>
 
@@ -236,7 +245,7 @@
                                 android:id="@+id/index_position_resource"
                                 style="@style/EditTextLineStyle"
                                 android:layout_width="match_parent"
-                                android:hint="请输入工序编号"
+                                android:hint="输入产品索引SOP"
                                 android:imeOptions="actionSend" />
                         </LinearLayout>
 
@@ -252,17 +261,19 @@
                     </LinearLayout>
 
                 </LinearLayout>
+
                 <ImageView
-                    android:layout_gravity="center"
                     android:id="@+id/index_edit"
                     android:layout_width="20dp"
                     android:layout_height="24dp"
+                    android:layout_gravity="center"
                     android:layout_marginLeft="@dimen/dp_10"
-                    android:src="@mipmap/magnifyingglass"
-                    android:layout_marginRight="@dimen/textsize_20"/>
+                    android:layout_marginRight="@dimen/textsize_20"
+                    android:src="@mipmap/magnifyingglass" />
 
             </LinearLayout>
             <LinearLayout
+                android:visibility="gone"
                 android:id="@+id/linethree"
                 android:layout_marginTop="@dimen/dp_10"
                 android:orientation="horizontal"
@@ -321,6 +332,7 @@
 
             </LinearLayout>
             <LinearLayout
+                android:visibility="gone"
                 android:id="@+id/linefour"
                 android:orientation="horizontal"
                 android:layout_width="match_parent"
@@ -366,6 +378,17 @@
                     android:layout_marginLeft="@dimen/dp_10"/>
 
             </LinearLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/ra_dataurl"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/linethree"
+                android:layout_marginLeft="30dp"
+                android:layout_marginRight="30dp"
+                android:layout_marginTop="@dimen/dp_10">
+            </android.support.v7.widget.RecyclerView>
+
             <TextView
                 android:id="@+id/btn_get"
                 android:text="播放SOP"
@@ -373,7 +396,7 @@
                 android:layout_marginRight="20dp"
                 android:layout_width="match_parent"
                 android:layout_height="50dp"
-                android:layout_below="@id/linethree"
+                android:layout_below="@id/ra_dataurl"
                 android:gravity="center"
                 android:layout_centerInParent="true"
                 android:layout_marginTop="100dp"

+ 2 - 9
app/src/main/res/layout-large/fragment_inmake.xml

@@ -26,14 +26,8 @@
         android:layout_height="match_parent">
 
         <!--List-->
-        <com.uas.esop.view.PullToRefreshLayout
-            android:id="@+id/refresh_view"
-            android:layout_marginLeft="16dp"
-            android:layout_marginRight="16dp"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" >
-
-            <include layout="@layout/refresh_head" />
+
+
             <!-- 支持所有实现Pullable接口的View -->
 
             <com.uas.esop.view.PullableListView
@@ -46,7 +40,6 @@
 
             <include layout="@layout/load_more" />
 
-        </com.uas.esop.view.PullToRefreshLayout>
         <include layout="@layout/null_item"/>
     </RelativeLayout>
 </LinearLayout>

+ 1 - 1
app/src/main/res/layout-large/fragment_scmake_prepare.xml

@@ -13,7 +13,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent" >
 
-        <include layout="@layout/refresh_head" />
+
         <!-- 支持所有实现Pullable接口的View -->
 
         <com.uas.esop.view.PullableListView

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

@@ -49,7 +49,6 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent" >
 
-                <include layout="@layout/refresh_head" />
                 <!-- 支持所有实现Pullable接口的View -->
 
                 <com.uas.esop.view.PullableListView

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

@@ -175,6 +175,7 @@
                         android:visibility="gone" />
                 </RelativeLayout>
                 <RelativeLayout
+                    android:visibility="gone"
                     android:id="@+id/setting_monitor_rl"
                     style="@style/SettingListItemStyle">
 

+ 30 - 0
app/src/main/res/layout-large/fuzzy_ipandport_item.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    tools:ignore="MissingDefaultResource">
+
+    <LinearLayout
+        android:background="@drawable/login_technological_process"
+        android:id="@+id/line_true"
+        android:layout_marginTop="5dp"
+        android:layout_marginLeft="30dp"
+        android:layout_marginRight="30dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="5dp">
+
+        <TextView
+            android:id="@+id/macode_ip__Tv"
+            android:gravity="center"
+            android:text=""
+            android:layout_gravity="center"
+            android:layout_width="0dp"
+            android:layout_weight="5"
+            android:layout_height="wrap_content"
+            />
+
+    </LinearLayout>
+</RelativeLayout>

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

@@ -5,14 +5,15 @@
     >
 
     <LinearLayout
+        android:background="@drawable/login_technological_process"
+        android:id="@+id/line_true"
         android:layout_marginTop="5dp"
         android:layout_marginLeft="30dp"
         android:layout_marginRight="30dp"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="5dp"
-        >
+        android:layout_marginBottom="5dp">
 
         <TextView
             android:id="@+id/macode_Tv"

+ 78 - 59
app/src/main/res/layout-large/index_edit_pup.xml

@@ -1,72 +1,91 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_margin="12dp"
     android:background="@color/background"
     android:orientation="vertical">
+        <TextView
+            android:visibility="gone"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:padding="14dp"
+            android:text="请采集岗位资源" />
 
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:padding="14dp"
-        android:text="请采集岗位资源" />
+        <LinearLayout
+            android:layout_marginTop="@dimen/dp_10"
+            android:id="@+id/line_top"
+            android:layout_width="match_parent"
+            android:layout_height="36dp"
+            android:background="@color/white"
+            android:orientation="horizontal">
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="36dp"
-        android:background="@color/white"
-        android:orientation="horizontal">
+            <com.uas.esop.view.ClearableEditText
+                android:id="@+id/edit_et"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="16dp"
+                android:layout_marginRight="16dp"
+                android:layout_weight="1"
+                android:background="@drawable/bg_line_edittext"
+                android:gravity="center_vertical"
+                android:hint="请输入要搜索的站点资源"
+                android:padding="5dp"
+                android:textSize="14sp"/>
 
-        <com.uas.esop.view.ClearableEditText
-            android:id="@+id/edit_et"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_marginLeft="16dp"
-            android:layout_marginRight="16dp"
-            android:layout_weight="1"
-            android:background="@color/white"
-            android:gravity="center_vertical"
-            android:hint="请采集岗位资源"
-            android:padding="5dp"
-            android:textSize="14sp" />
+            <ImageView
+                android:visibility="gone"
+                android:id="@+id/search_im"
+                android:layout_width="46dp"
+                android:layout_height="match_parent"
+                android:layout_marginRight="10dp"
+                android:background="@drawable/bg_button"
+                android:src="@drawable/search_48" />
+        </LinearLayout>
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/rv_ip_port_data"
+            android:layout_centerHorizontal="true"
+            android:layout_width="match_parent"
+            android:layout_marginLeft="@dimen/dp_10"
+            android:layout_marginRight="@dimen/dp_10"
+            android:layout_below="@+id/line_top"
+            android:layout_height="200dp">
+        </android.support.v7.widget.RecyclerView>
+        <LinearLayout
+            android:layout_below="@+id/rv_ip_port_data"
+            android:layout_centerHorizontal="true"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:layout_marginBottom="10dp">
 
-        <ImageView
-            android:id="@+id/search_im"
-            android:layout_width="46dp"
-            android:layout_height="match_parent"
-            android:layout_marginRight="10dp"
-            android:background="@drawable/bg_button"
-            android:src="@drawable/search_48" />
-    </LinearLayout>
+            <Button
+                android:id="@+id/sure_tv"
+                android:layout_width="0dp"
+                android:layout_height="36dp"
+                android:layout_margin="12dp"
+                android:layout_weight="1"
+                android:background="@drawable/selector_confirm_bg"
+                android:gravity="center"
+                android:text="确定"
+                android:textColor="@color/white" />
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="10dp"
-        android:layout_marginBottom="10dp">
+            <Button
+                android:id="@+id/cancle_tv"
+                android:layout_width="0dp"
+                android:layout_height="36dp"
+                android:layout_margin="12dp"
+                android:layout_weight="1"
+                android:background="@drawable/selector_cancel_bg"
+                android:gravity="center"
+                android:text="取消"
+                android:textColor="@color/selector_cancel_text_color" />
+        </LinearLayout>
 
-        <Button
-            android:id="@+id/sure_tv"
-            android:layout_width="0dp"
-            android:layout_height="36dp"
-            android:layout_margin="12dp"
-            android:layout_weight="1"
-            android:background="@drawable/selector_confirm_bg"
-            android:gravity="center"
-            android:text="确定"
-            android:textColor="@color/white" />
 
-        <Button
-            android:id="@+id/cancle_tv"
-            android:layout_width="0dp"
-            android:layout_height="36dp"
-            android:layout_margin="12dp"
-            android:layout_weight="1"
-            android:background="@drawable/selector_cancel_bg"
-            android:gravity="center"
-            android:text="取消"
-            android:textColor="@color/selector_cancel_text_color" />
-    </LinearLayout>
-</LinearLayout>
+
+
+
+
+</RelativeLayout>

+ 0 - 129
app/src/main/res/layout-large/item_list_whcombatchfragment.xml

@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--表格ListItem:四列-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:background="#FFFFFF"
-                android:padding="5dp">
-
-    <TableLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-
-        android:stretchColumns="1">
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_code"/>
-
-            <TextView
-                android:id="@+id/tv_bar_code"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_remain"/>
-
-            <TextView
-                android:id="@+id/tv_bar_remain"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_prodcode"/>
-
-            <TextView
-                android:id="@+id/tv_bar_prodcode"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/pr_detail"/>
-
-            <TextView
-                android:id="@+id/tv_pr_detail"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_whcode"/>
-
-            <TextView
-                android:id="@+id/tv_bar_whcode"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_batch"/>
-
-            <TextView
-                android:id="@+id/tv_bar_batch"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_location"/>
-
-            <TextView
-                android:id="@+id/tv_bar_location"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-    </TableLayout>
-
-
-    <LinearLayout
-        android:id="@+id/linear_del"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_centerInParent="true"
-        android:background="#88867f7f"
-            android:visibility="gone">
-
-        <LinearLayout android:layout_width="match_parent"
-                      android:layout_height="50dp"
-                      android:layout_gravity="center_vertical"
-                      android:orientation="horizontal">
-            <TextView
-                android:id="@+id/tv_del"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:background="#ed553d"
-                android:gravity="center"
-                android:text="删除"
-                android:textColor="#ffffff"
-                android:textSize="@dimen/written_words"/>
-
-            <TextView
-                android:id="@+id/tv_cancel"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:background="#a6a6a9"
-                android:gravity="center"
-                android:text="取消"
-                android:textColor="#ffffff"
-                android:textSize="@dimen/written_words"/>
-        </LinearLayout>
-
-    </LinearLayout>
-</RelativeLayout>

+ 4 - 2
app/src/main/res/layout-large/popupwin_inmake_search.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--入库单搜索PopWin 备料单搜索PopWin 飞达搜索PopWin-->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:id="@+id/ll_inmake_search"
@@ -49,9 +50,10 @@
             android:layout_marginLeft="16dp"
             android:layout_marginRight="16dp"
             android:layout_width="match_parent"
-            android:layout_height="match_parent">
+            android:layout_height="match_parent"
+            tools:ignore="MissingClass">
+
 
-            <include layout="@layout/refresh_head" />
             <!-- 支持所有实现Pullable接口的View -->
 
             <com.uas.esop.view.PullableListView

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

@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/head_view"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/transparent" >
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:paddingBottom="20dp"
-        android:paddingTop="20dp" >
-
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_centerInParent="true" >
-
-            <ImageView
-                android:id="@+id/pull_icon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="60dp"
-                android:background="@drawable/pull_icon_big" />
-
-            <ImageView
-                android:id="@+id/refreshing_icon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="60dp"
-                android:background="@drawable/list_load_refresh"
-                android:visibility="gone" />
-
-            <TextView
-                android:id="@+id/state_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerInParent="true"
-                android:text="@string/pull_to_refresh"
-                android:textColor="@color/text_search"
-                android:textSize="16sp" />
-
-            <ImageView
-                android:id="@+id/state_iv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginRight="8dp"
-                android:layout_toLeftOf="@id/state_tv"
-                android:visibility="gone" />
-        </RelativeLayout>
-    </RelativeLayout>
-
-</RelativeLayout>

+ 42 - 17
app/src/main/res/layout/activity_index.xml

@@ -157,6 +157,7 @@
                             android:padding="8dp">
 
                             <LinearLayout
+                                android:id="@+id/line_login_post"
                                 android:layout_gravity="center"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
@@ -168,20 +169,11 @@
                                     android:src="@mipmap/infoimage">
                                 </ImageView>
                                 <TextView
-                                    android:visibility="gone"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:text="账号:"
+                                    android:text="登录岗位:巴达姆伊姆"
                                     android:textColor="#333333"
-                                    android:textSize="@dimen/textsize_20" />
-
-                                <TextView
-                                    android:id="@+id/em_name_tv"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:textSize="@dimen/textsize_20"
-                                    tools:text="吴雨潇" />
-
+                                    android:textSize="@dimen/space_top_line_15" />
                                 <TextView
                                     android:visibility="gone"
                                     android:id="@+id/em_code_tv"
@@ -202,7 +194,26 @@
                         android:layout_height="25dp"
                         android:layout_marginLeft="@dimen/textsize_20"
                         android:layout_centerVertical="true"/>
-
+                    <TextView
+                        android:layout_centerVertical="true"
+                        android:text="@string/string_monitor_socket"
+                        android:textSize="@dimen/space_top_line_15"
+                        android:layout_toRightOf="@id/sound_monitor_Vibration_sv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+                    </TextView>
+                    <TextView
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:id="@+id/em_name_tv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:textColor="#333333"
+                        android:layout_centerVertical="true"
+                        android:layout_alignParentRight="true"
+                        android:layout_marginRight="@dimen/textsize_20"
+                        android:textSize="@dimen/space_top_line_15"
+                        android:text="(ip:10.1.162.69 port:10007)"
+                        />
 
                 </RelativeLayout>
 
@@ -235,7 +246,7 @@
                                 android:id="@+id/index_position_resource"
                                 style="@style/EditTextLineStyle"
                                 android:layout_width="match_parent"
-                                android:hint="请输入岗位资源"
+                                android:hint="输入产品索引SOP"
                                 android:imeOptions="actionSend" />
                         </LinearLayout>
 
@@ -251,17 +262,19 @@
                     </LinearLayout>
 
                 </LinearLayout>
+
                 <ImageView
-                    android:layout_gravity="center"
                     android:id="@+id/index_edit"
                     android:layout_width="20dp"
                     android:layout_height="24dp"
+                    android:layout_gravity="center"
                     android:layout_marginLeft="@dimen/dp_10"
-                    android:src="@mipmap/magnifyingglass"
-                    android:layout_marginRight="@dimen/textsize_20"/>
+                    android:layout_marginRight="@dimen/textsize_20"
+                    android:src="@mipmap/magnifyingglass" />
 
             </LinearLayout>
             <LinearLayout
+                android:visibility="gone"
                 android:id="@+id/linethree"
                 android:layout_marginTop="@dimen/dp_10"
                 android:orientation="horizontal"
@@ -320,6 +333,7 @@
 
             </LinearLayout>
             <LinearLayout
+                android:visibility="gone"
                 android:id="@+id/linefour"
                 android:orientation="horizontal"
                 android:layout_width="match_parent"
@@ -365,6 +379,17 @@
                     android:layout_marginLeft="@dimen/dp_10"/>
 
             </LinearLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/ra_dataurl"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/linethree"
+                android:layout_marginLeft="30dp"
+                android:layout_marginRight="30dp"
+                android:layout_marginTop="@dimen/dp_10">
+            </android.support.v7.widget.RecyclerView>
+
             <TextView
                 android:id="@+id/btn_get"
                 android:text="播放SOP"
@@ -372,7 +397,7 @@
                 android:layout_marginRight="20dp"
                 android:layout_width="match_parent"
                 android:layout_height="50dp"
-                android:layout_below="@id/linethree"
+                android:layout_below="@id/ra_dataurl"
                 android:gravity="center"
                 android:layout_centerInParent="true"
                 android:layout_marginTop="100dp"

+ 2 - 9
app/src/main/res/layout/fragment_inmake.xml

@@ -26,14 +26,8 @@
         android:layout_height="match_parent">
 
         <!--List-->
-        <com.uas.esop.view.PullToRefreshLayout
-            android:id="@+id/refresh_view"
-            android:layout_marginLeft="16dp"
-            android:layout_marginRight="16dp"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" >
-
-            <include layout="@layout/refresh_head" />
+
+
             <!-- 支持所有实现Pullable接口的View -->
 
             <com.uas.esop.view.PullableListView
@@ -46,7 +40,6 @@
 
             <include layout="@layout/load_more" />
 
-        </com.uas.esop.view.PullToRefreshLayout>
         <include layout="@layout/null_item"/>
     </RelativeLayout>
 </LinearLayout>

+ 1 - 1
app/src/main/res/layout/fragment_scmake_prepareget.xml

@@ -49,7 +49,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent" >
 
-                <include layout="@layout/refresh_head" />
+
                 <!-- 支持所有实现Pullable接口的View -->
 
                 <com.uas.esop.view.PullableListView

+ 30 - 0
app/src/main/res/layout/fuzzy_ipandport_item.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    tools:ignore="MissingDefaultResource">
+
+    <LinearLayout
+        android:background="@drawable/login_technological_process"
+        android:id="@+id/line_true"
+        android:layout_marginTop="5dp"
+        android:layout_marginLeft="30dp"
+        android:layout_marginRight="30dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="5dp">
+
+        <TextView
+            android:id="@+id/macode_ip__Tv"
+            android:gravity="center"
+            android:text=""
+            android:layout_gravity="center"
+            android:layout_width="0dp"
+            android:layout_weight="5"
+            android:layout_height="wrap_content"
+            />
+
+    </LinearLayout>
+</RelativeLayout>

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

@@ -5,14 +5,15 @@
     >
 
     <LinearLayout
+        android:background="@drawable/login_technological_process"
+        android:id="@+id/line_true"
         android:layout_marginTop="5dp"
         android:layout_marginLeft="30dp"
         android:layout_marginRight="30dp"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="5dp"
-        >
+        android:layout_marginBottom="5dp">
 
         <TextView
             android:id="@+id/macode_Tv"

+ 26 - 7
app/src/main/res/layout/index_edit_pup.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_margin="12dp"
     android:background="@color/background"
     android:orientation="vertical">
-
     <TextView
+        android:visibility="gone"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:gravity="center"
@@ -14,6 +14,8 @@
         android:text="请采集岗位资源" />
 
     <LinearLayout
+        android:layout_marginTop="@dimen/dp_10"
+        android:id="@+id/line_top"
         android:layout_width="match_parent"
         android:layout_height="36dp"
         android:background="@color/white"
@@ -26,13 +28,14 @@
             android:layout_marginLeft="16dp"
             android:layout_marginRight="16dp"
             android:layout_weight="1"
-            android:background="@color/white"
+            android:background="@drawable/bg_line_edittext"
             android:gravity="center_vertical"
-            android:hint="请采集岗位资源"
+            android:hint="请输入要搜索的站点资源"
             android:padding="5dp"
-            android:textSize="14sp" />
+            android:textSize="14sp"/>
 
         <ImageView
+            android:visibility="gone"
             android:id="@+id/search_im"
             android:layout_width="46dp"
             android:layout_height="match_parent"
@@ -40,8 +43,18 @@
             android:background="@drawable/bg_button"
             android:src="@drawable/search_48" />
     </LinearLayout>
-
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/rv_ip_port_data"
+        android:layout_centerHorizontal="true"
+        android:layout_width="match_parent"
+        android:layout_marginLeft="@dimen/dp_10"
+        android:layout_marginRight="@dimen/dp_10"
+        android:layout_below="@+id/line_top"
+        android:layout_height="200dp">
+    </android.support.v7.widget.RecyclerView>
     <LinearLayout
+        android:layout_below="@+id/rv_ip_port_data"
+        android:layout_centerHorizontal="true"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="10dp"
@@ -69,4 +82,10 @@
             android:text="取消"
             android:textColor="@color/selector_cancel_text_color" />
     </LinearLayout>
-</LinearLayout>
+
+
+
+
+
+
+</RelativeLayout>

+ 0 - 129
app/src/main/res/layout/item_list_whcombatchfragment.xml

@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--表格ListItem:四列-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:background="#FFFFFF"
-                android:padding="5dp">
-
-    <TableLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-
-        android:stretchColumns="1">
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_code"/>
-
-            <TextView
-                android:id="@+id/tv_bar_code"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_remain"/>
-
-            <TextView
-                android:id="@+id/tv_bar_remain"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_prodcode"/>
-
-            <TextView
-                android:id="@+id/tv_bar_prodcode"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/pr_detail"/>
-
-            <TextView
-                android:id="@+id/tv_pr_detail"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_whcode"/>
-
-            <TextView
-                android:id="@+id/tv_bar_whcode"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_batch"/>
-
-            <TextView
-                android:id="@+id/tv_bar_batch"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:text="@string/bar_location"/>
-
-            <TextView
-                android:id="@+id/tv_bar_location"
-                style="@style/tl_tv_content_style"/>
-        </TableRow>
-    </TableLayout>
-
-
-    <LinearLayout
-        android:id="@+id/linear_del"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_centerInParent="true"
-        android:background="#88867f7f"
-            android:visibility="gone">
-
-        <LinearLayout android:layout_width="match_parent"
-                      android:layout_height="50dp"
-                      android:layout_gravity="center_vertical"
-                      android:orientation="horizontal">
-            <TextView
-                android:id="@+id/tv_del"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:background="#ed553d"
-                android:gravity="center"
-                android:text="删除"
-                android:textColor="#ffffff"
-                android:textSize="@dimen/written_words"/>
-
-            <TextView
-                android:id="@+id/tv_cancel"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:background="#a6a6a9"
-                android:gravity="center"
-                android:text="取消"
-                android:textColor="#ffffff"
-                android:textSize="@dimen/written_words"/>
-        </LinearLayout>
-
-    </LinearLayout>
-</RelativeLayout>

+ 1 - 1
app/src/main/res/layout/popupwin_inmake_search.xml

@@ -51,7 +51,7 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent">
 
-            <include layout="@layout/refresh_head" />
+
             <!-- 支持所有实现Pullable接口的View -->
 
             <com.uas.esop.view.PullableListView

BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png


Некоторые файлы не были показаны из-за большого количества измененных файлов