瀏覽代碼

产出统计,岗位资源列表字天改大;
产量统计增加500,1000,1500;
物理线体增加放大镜选择;

ChengJH 2 年之前
父節點
當前提交
990c2b0324

+ 1 - 1
app/src/main/java/com/uas/collection/activity/FunctionActivity.java

@@ -87,7 +87,7 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
                 case GloableParams.TEXT_FAULT_INSPECTION://性能维修
                     mFragment = new BreakdownRepairFragment();
                     break;
-                case GloableParams.TEXT_QUANTITY_STATISTICS://产出数量统计
+                case GloableParams.TEXT_QUANTITY_STATISTICS://产出统计
                     mFragment = new QuantityStatisticsFragment();
                     break;
                 case GloableParams.GRIDNAME_SETTING://设置

+ 1 - 1
app/src/main/java/com/uas/collection/activity/HomeActivity.java

@@ -145,7 +145,7 @@ public class HomeActivity extends BaseActivity implements AdapterView.OnItemClic
                 intent.putExtra(DataSourceManager.KEY_GRID_ITEMNAME, itemName);
                 startActivity(intent);
                 break;
-            case GloableParams.TEXT_QUANTITY_STATISTICS://产出数量统计
+            case GloableParams.TEXT_QUANTITY_STATISTICS://产出统计
                 intent.putExtra(DataSourceManager.KEY_GRID_ITEMNAME, itemName);
                 startActivity(intent);
                 break;

+ 32 - 0
app/src/main/java/com/uas/collection/bean/LineCodeEntity.java

@@ -0,0 +1,32 @@
+package com.uas.collection.bean;
+
+
+public class LineCodeEntity {
+    private String LI_CODE;
+    private String LI_NAME;
+    private boolean checked;
+
+    public boolean getChecked() {
+        return checked;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+
+    public String getLI_CODE() {
+        return LI_CODE;
+    }
+
+    public void setLI_CODE(String LI_CODE) {
+        this.LI_CODE = LI_CODE;
+    }
+
+    public String getLI_NAME() {
+        return LI_NAME;
+    }
+
+    public void setLI_NAME(String LI_NAME) {
+        this.LI_NAME = LI_NAME;
+    }
+}

+ 236 - 14
app/src/main/java/com/uas/collection/fragment/DataCollectionFragment.java

@@ -54,6 +54,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
 import com.uas.collection.R;
 import com.uas.collection.activity.FunctionActivity;
 import com.uas.collection.bean.IpAndPortBean;
+import com.uas.collection.bean.LineCodeEntity;
 import com.uas.collection.bean.LinecodeBean;
 import com.uas.collection.bean.ResourcesBean;
 import com.uas.collection.bean.StorageRechargeAloneBean;
@@ -71,6 +72,7 @@ import com.uas.collection.util.JsonUtils;
 import com.uas.collection.util.LogUtil;
 import com.uas.collection.util.MyArrayAdapter;
 import com.uas.collection.util.StringUtil;
+import com.uas.collection.util.VolleyRequest;
 import com.uas.collection.util.VollyRequest;
 import com.uas.collection.view.ClearableEditText;
 
@@ -170,6 +172,10 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     private String ce_bit_original;
     private String ma_bomversion;
     private InputMethodManager imm;
+    private ArrayList<LineCodeEntity> codeEntityArrayList;
+    private GetLinePortAdapter getLinePortAdapter;
+    private String li_code;
+    private RecyclerView rv_getline_ip_port_data;
 
 
     @Override
@@ -241,6 +247,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     @Override
     protected void initDatas() {
         resourcesBeanList = new ArrayList<>();
+        codeEntityArrayList = new ArrayList<>();
         WindowManager wm = mActivity.getWindowManager();
         int screenWith = wm.getDefaultDisplay().getWidth()/3;
         mSmartTable.getConfig().setMinTableWidth(screenWith)
@@ -560,23 +567,11 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                 }
             }
         });
+
         iv_dc_line.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                tv_dc_line.requestFocus();
-                if (CameraUtil.hasCamera()) {
-                    if (root.findFocus() != null) {
-                        mFocusId = root.findFocus().getId();
-                        Intent intent = new Intent();
-                        intent.setClass(mActivity, CaptureActivity.class);
-                        startActivityForResult(intent, SCAN_BARCODE_LINE);
-                        SharedPreUtil.saveString(mActivity, Constants.STORAGEERECHADD, "NO");
-                    } else {
-                        CommonUtil.toastNoRepeat(mActivity, "请选择您要操作的输入框");
-                    }
-                } else {
-                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
-                }
+                initgetLinePopupWindow();
             }
         });
 
@@ -903,6 +898,45 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     }
 
 
+    private class GetLinePortAdapter extends BaseQuickAdapter<LineCodeEntity, BaseViewHolder> {
+        private List<LineCodeEntity> mmmmList;
+
+        public List<LineCodeEntity> getmList() {
+            return mmmmList;
+        }
+
+        public void setmList(List<LineCodeEntity> mList) {
+            this.mmmmList = mList;
+        }
+        public LineCodeEntity getBeanByPositon(int position){
+            return mmmmList.get(position);
+        }
+
+        private GetLinePortAdapter(@Nullable List<LineCodeEntity> data) {
+            super(R.layout.fuzzy_ipandport_item, data);
+            this.mmmmList = data;
+        }
+        @Override
+        protected void convert(BaseViewHolder helper, LineCodeEntity item) {
+            helper.setText(R.id.macode_ip__Tv,item.getLI_NAME()+"("+item.getLI_CODE()+")");
+            LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
+            if (item.getChecked()) {
+                line_true.setSelected(true);
+            } else {
+                line_true.setSelected(false);
+            }
+        }
+    }
+
+
+
+
+
+
+
+
+
+
     private class IpAndunhealthyPortAdapter extends BaseQuickAdapter<ResourcesBean, BaseViewHolder> {
         private List<ResourcesBean> mmmmList;
 
@@ -2072,6 +2106,194 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     }
 
 
+    /**
+     * 关于物理线体弹框
+     */
+
+    private void initgetLinePopupWindow() {
+        getLinePortAdapter = new GetLinePortAdapter(codeEntityArrayList);
+        View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_line_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);
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        line_top.setVisibility(View.GONE);
+        rv_getline_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_getline_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_getline_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        getLinePortAdapter.setmList(codeEntityArrayList);
+        rv_getline_ip_port_data.setAdapter(getLinePortAdapter);
+        requestLines();
+
+        editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        editPW.setTouchable(true);
+        editPW.setBackgroundDrawable(new BitmapDrawable());
+        editPW.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeListPopupWindow();
+            }
+        });
+        View parentView = mActivity.getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+        editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+        search_im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+            }
+        });
+
+        getLinePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                List<LineCodeEntity> lineCodeEntities = getLinePortAdapter.getmList();
+                li_code = lineCodeEntities.get(position).getLI_CODE();
+                for (int i = 0; i < lineCodeEntities.size(); i++) {
+                    lineCodeEntities.get(i).setChecked(false);
+                }
+                lineCodeEntities.get(position).setChecked(true);
+                getLinePortAdapter.notifyDataSetChanged();
+            }
+        });
+
+        //确定
+        sure_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                if (!StringUtil.isEmpty(li_code)){
+                    tv_dc_line.setText(li_code);
+                }else {
+                    CommonUtil.toastNoRepeat(mActivity,"请选择物理线体");
+                    return;
+                }
+                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 (resourcesBeanList.isEmpty()){
+//                    getfuzzySearchSourceData(edit_et.getText().toString().trim(),"不良");
+//                }
+//                if (s.length() >= 0) {
+//                    String mSearchStr = s.toString().trim();
+//                    LogUtil.i("mSearchStr",mSearchStr);
+//                    List<ResourcesBean> thisList = new ArrayList<>();
+//                    for(int i=0;i<resourcesBeanList.size();i++){
+//                        if(resourcesBeanList.get(i).getSC_CODE().contains(mSearchStr)){
+//                            thisList.add(resourcesBeanList.get(i));
+//                        }
+//                        if(i == resourcesBeanList.size() -1){
+//                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
+//                            rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+//                        }
+//                    }
+//                    ipAndResourcesPortAdapter.notifyDataSetChanged();
+//
+//                } else {
+//
+//                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(resourcesBeanList);
+//                    rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//
+//                }
+//                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+//                    @Override
+//                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+//                        List<ResourcesBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
+//                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+//                            ipAndPortBeans.get(i).setChecked(false);
+//                        }
+//                        ipAndPortBeans.get(position).setChecked(true);
+//                        ipAndResourcesPortAdapter.notifyDataSetChanged();
+//                    }
+//                });
+//            }
+//
+//        });
+
+
+    }
+
+    private void requestLines() {
+//        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_SPM_GETLINE)
+                .method(Request.Method.POST)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                codeEntityArrayList.clear();
+                try {
+                    String result = o.toString();
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONArray dataArray = resultObject.getJSONArray("data");
+                    if (dataArray != null) {
+                        for (int i = 0; i < dataArray.size(); i++) {
+                            JSONObject dataObject = dataArray.getJSONObject(i);
+                            if (dataObject != null) {
+                                LineCodeEntity lineCodeEntity = new LineCodeEntity();
+                                lineCodeEntity.setLI_CODE(FastjsonUtil.getText(dataObject, "LI_CODE"));
+                                lineCodeEntity.setLI_NAME(FastjsonUtil.getText(dataObject, "LI_NAME"));
+
+                                codeEntityArrayList.add(lineCodeEntity);
+                            }
+                        }
+                    }
+                    if (codeEntityArrayList.size() == 0) {
+                        CommonUtil.toastNoRepeat(mActivity, "线别数据为空");
+                    } else {
+                        setcodelineAdapter(codeEntityArrayList);
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+            }
+        });
+    }
+
+    private void setcodelineAdapter(ArrayList<LineCodeEntity> mList) {
+        getLinePortAdapter.setmList(codeEntityArrayList);
+        getLinePortAdapter.notifyDataSetChanged();
+        rv_getline_ip_port_data.setAdapter(getLinePortAdapter);
+    }
+
+
+
+
+
+
+
+
+
+
+
+
 
     public class SelectAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
         private int checkedPosition = -1;

+ 225 - 18
app/src/main/java/com/uas/collection/fragment/QuantityStatisticsFragment.java

@@ -55,6 +55,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
 import com.uas.collection.R;
 import com.uas.collection.activity.FunctionActivity;
 import com.uas.collection.bean.IpAndPortBean;
+import com.uas.collection.bean.LineCodeEntity;
 import com.uas.collection.bean.LinecodeBean;
 import com.uas.collection.bean.ResourcesBean;
 import com.uas.collection.bean.StorageRechargeAloneBean;
@@ -72,6 +73,7 @@ import com.uas.collection.util.JsonUtils;
 import com.uas.collection.util.LogUtil;
 import com.uas.collection.util.MyArrayAdapter;
 import com.uas.collection.util.StringUtil;
+import com.uas.collection.util.VolleyRequest;
 import com.uas.collection.util.VollyRequest;
 import com.uas.collection.view.ClearableEditText;
 
@@ -172,6 +174,10 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
     private String ma_bomversion;
     private boolean pepolerboolean = false;
     private InputMethodManager imm;
+    private ArrayList<LineCodeEntity> codeEntityArrayList;
+    private GetLinePortAdapter getLinePortAdapter;
+    private String li_code;
+    private RecyclerView rv_getline_ip_port_data;
     @Override
     protected int getLayout() {
         return R.layout.fragment_quantitystatistics;
@@ -241,6 +247,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
     @Override
     protected void initDatas() {
         resourcesBeanList = new ArrayList<>();
+        codeEntityArrayList = new ArrayList<>();
         WindowManager wm = mActivity.getWindowManager();
         int screenWith = wm.getDefaultDisplay().getWidth()/3;
         mSmartTable.getConfig().setMinTableWidth(screenWith)
@@ -559,20 +566,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
         iv_dc_line.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                tv_dc_line.requestFocus();
-                if (CameraUtil.hasCamera()) {
-                    if (root.findFocus() != null) {
-                        mFocusId = root.findFocus().getId();
-                        Intent intent = new Intent();
-                        intent.setClass(mActivity, CaptureActivity.class);
-                        startActivityForResult(intent, SCAN_BARCODE_LINE);
-                        SharedPreUtil.saveString(mActivity, Constants.STORAGEERECHADD, "NO");
-                    } else {
-                        CommonUtil.toastNoRepeat(mActivity, "请选择您要操作的输入框");
-                    }
-                } else {
-                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
-                }
+                initgetLinePopupWindow();
             }
         });
 
@@ -596,7 +590,6 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
 
 
 
-
     }
     private void handleFeededDataTwo(JSONArray dataArray) {
         StorageRechargeAloneBean bean;
@@ -626,6 +619,185 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
         }
 
     }
+
+    /**
+     * 关于物理线体弹框
+     */
+
+    private void initgetLinePopupWindow() {
+        getLinePortAdapter = new GetLinePortAdapter(codeEntityArrayList);
+        View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_line_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);
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        line_top.setVisibility(View.GONE);
+        rv_getline_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_getline_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_getline_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        getLinePortAdapter.setmList(codeEntityArrayList);
+        rv_getline_ip_port_data.setAdapter(getLinePortAdapter);
+        requestLines();
+
+        editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        editPW.setTouchable(true);
+        editPW.setBackgroundDrawable(new BitmapDrawable());
+        editPW.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeListPopupWindow();
+            }
+        });
+        View parentView = mActivity.getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+        editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+        search_im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+            }
+        });
+
+        getLinePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                List<LineCodeEntity> lineCodeEntities = getLinePortAdapter.getmList();
+                li_code = lineCodeEntities.get(position).getLI_CODE();
+                for (int i = 0; i < lineCodeEntities.size(); i++) {
+                    lineCodeEntities.get(i).setChecked(false);
+                }
+                lineCodeEntities.get(position).setChecked(true);
+                getLinePortAdapter.notifyDataSetChanged();
+            }
+        });
+
+        //确定
+        sure_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                if (!StringUtil.isEmpty(li_code)){
+                    tv_dc_line.setText(li_code);
+                }else {
+                    CommonUtil.toastNoRepeat(mActivity,"请选择物理线体");
+                    return;
+                }
+                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 (resourcesBeanList.isEmpty()){
+//                    getfuzzySearchSourceData(edit_et.getText().toString().trim(),"不良");
+//                }
+//                if (s.length() >= 0) {
+//                    String mSearchStr = s.toString().trim();
+//                    LogUtil.i("mSearchStr",mSearchStr);
+//                    List<ResourcesBean> thisList = new ArrayList<>();
+//                    for(int i=0;i<resourcesBeanList.size();i++){
+//                        if(resourcesBeanList.get(i).getSC_CODE().contains(mSearchStr)){
+//                            thisList.add(resourcesBeanList.get(i));
+//                        }
+//                        if(i == resourcesBeanList.size() -1){
+//                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
+//                            rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+//                        }
+//                    }
+//                    ipAndResourcesPortAdapter.notifyDataSetChanged();
+//
+//                } else {
+//
+//                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(resourcesBeanList);
+//                    rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//
+//                }
+//                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+//                    @Override
+//                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+//                        List<ResourcesBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
+//                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+//                            ipAndPortBeans.get(i).setChecked(false);
+//                        }
+//                        ipAndPortBeans.get(position).setChecked(true);
+//                        ipAndResourcesPortAdapter.notifyDataSetChanged();
+//                    }
+//                });
+//            }
+//
+//        });
+
+
+    }
+
+    private void requestLines() {
+//        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_SPM_GETLINE)
+                .method(Request.Method.POST)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                codeEntityArrayList.clear();
+                try {
+                    String result = o.toString();
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONArray dataArray = resultObject.getJSONArray("data");
+                    if (dataArray != null) {
+                        for (int i = 0; i < dataArray.size(); i++) {
+                            JSONObject dataObject = dataArray.getJSONObject(i);
+                            if (dataObject != null) {
+                                LineCodeEntity lineCodeEntity = new LineCodeEntity();
+                                lineCodeEntity.setLI_CODE(FastjsonUtil.getText(dataObject, "LI_CODE"));
+                                lineCodeEntity.setLI_NAME(FastjsonUtil.getText(dataObject, "LI_NAME"));
+
+                                codeEntityArrayList.add(lineCodeEntity);
+                            }
+                        }
+                    }
+                    if (codeEntityArrayList.size() == 0) {
+                        CommonUtil.toastNoRepeat(mActivity, "线别数据为空");
+                    } else {
+                        setcodelineAdapter(codeEntityArrayList);
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+            }
+        });
+    }
+
+    private void setcodelineAdapter(ArrayList< LineCodeEntity > mList) {
+        getLinePortAdapter.setmList(codeEntityArrayList);
+        getLinePortAdapter.notifyDataSetChanged();
+        rv_getline_ip_port_data.setAdapter(getLinePortAdapter);
+    }
+
+
     /**
      * 关于人员资料
      */
@@ -877,8 +1049,11 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
         }
         @Override
         protected void convert(BaseViewHolder helper, ResourcesBean item) {
+            TextView macode_ip__Tv = helper.itemView.findViewById(R.id.macode_ip__Tv);
+            macode_ip__Tv.setTextSize(30);
             helper.setText(R.id.macode_ip__Tv,item.getSC_CODE());
             LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
+
             if (item.getChecked()) {
                 line_true.setSelected(true);
             } else {
@@ -1473,6 +1648,9 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
             list.add("16");
             list.add("100");
             list.add("200");
+            list.add("500");
+            list.add("1000");
+            list.add("1500");
             list.add("其他");
         }else {
             list.add("50");
@@ -1788,11 +1966,11 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
     private void getlineDataList(){
         List<String> linelist=new ArrayList<>();
         linelist.add("插件投产");
-        linelist.add("插件产出");
+//        linelist.add("插件产出");
         linelist.add("组装投产");
-        linelist.add("组装产出");
+//        linelist.add("组装产出");
         linelist.add("包装投产");
-        linelist.add("包装产出");
+//        linelist.add("包装产出");
         JSONObject jsonObject = new JSONObject();
         JSONArray jsonArray = new JSONArray();
         JSONObject object_1 = new JSONObject();
@@ -2904,6 +3082,35 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
         }
 
     }
+    private class GetLinePortAdapter extends BaseQuickAdapter<LineCodeEntity, BaseViewHolder> {
+        private List<LineCodeEntity> mmmmList;
+
+        public List<LineCodeEntity> getmList() {
+            return mmmmList;
+        }
+
+        public void setmList(List<LineCodeEntity> mList) {
+            this.mmmmList = mList;
+        }
+        public LineCodeEntity getBeanByPositon(int position){
+            return mmmmList.get(position);
+        }
+
+        private GetLinePortAdapter(@Nullable List<LineCodeEntity> data) {
+            super(R.layout.fuzzy_ipandport_item, data);
+            this.mmmmList = data;
+        }
+        @Override
+        protected void convert(BaseViewHolder helper, LineCodeEntity item) {
+            helper.setText(R.id.macode_ip__Tv,item.getLI_NAME()+"("+item.getLI_CODE()+")");
+            LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
+            if (item.getChecked()) {
+                line_true.setSelected(true);
+            } else {
+                line_true.setSelected(false);
+            }
+        }
+    }
     @Override
     public void onDestroy() {
         super.onDestroy();

+ 1 - 1
app/src/main/java/com/uas/collection/fragment/StorageRechargeListFragment.java

@@ -1371,7 +1371,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         List<String> list=new ArrayList<>();
         list.add("来料");
         list.add("制程");
-        list.add("外观维修");
+        list.add("设计");
         list.add("其他");
         JSONObject jsonObject = new JSONObject();
         JSONArray jsonArray = new JSONArray();

+ 5 - 4
app/src/main/java/com/uas/collection/global/GloableParams.java

@@ -333,7 +333,7 @@ public class GloableParams {
     public static String ASTATIONTHE_SELECT_FUZZYSEARCHSOURCE;
     public static String ASTATIONTHE_SELECT_TESTCOLLECTDATA;
     public static String ASTATIONTHE_SELECT_GETMAKERECORD;
-
+    public static String ADDRESS_SPM_GETLINE;
 
     /**
      * 新版设备管理
@@ -366,7 +366,8 @@ public class GloableParams {
     public static String ADDRESSTAIL_GET_FUZZYSEARCHSOURCE="/api/pda/smt/fuzzySearchSource.action";
     public static String ADDRESSTAIL_GET_TESTCOLLECTDATA="/api/pda/smt/testcollectData.action";
     public static String ADDRESSTAIL_GET_GETMAKERECORD="/oa/device/getMakerecord.action";
-
+    //线别筛选
+    private static final String ADDRESSTAIL_SPM_GETLINE = "/api/pda/spm/getLine.action";
 
 
 
@@ -975,7 +976,7 @@ public class GloableParams {
     public static final String WAREHOUSINGMANAGEMENT = "数据采集";
     public static final String HOME_QUALITY_MANAGE = "外观维修";
     public static final String TEXT_FAULT_INSPECTION = "性能维修";
-    public static final String TEXT_QUANTITY_STATISTICS = "产出数量统计";
+    public static final String TEXT_QUANTITY_STATISTICS = "产出统计";
     public static final String GRIDNAME_SETTING = "设置";
 //    public static final String QUERYSTATIONINFORMATION = "过站信息";
     public static String[] homeMenuNames = {
@@ -1501,6 +1502,6 @@ public class GloableParams {
         GloableParams.ASTATIONTHE_SELECT_FUZZYSEARCHSOURCE = uriHead + GloableParams.ADDRESSTAIL_GET_FUZZYSEARCHSOURCE;
         GloableParams.ASTATIONTHE_SELECT_TESTCOLLECTDATA = uriHead + GloableParams.ADDRESSTAIL_GET_TESTCOLLECTDATA;
         GloableParams.ASTATIONTHE_SELECT_GETMAKERECORD = uriHead + GloableParams.ADDRESSTAIL_GET_GETMAKERECORD;
-
+        GloableParams.ADDRESS_SPM_GETLINE = uriHead + GloableParams.ADDRESSTAIL_SPM_GETLINE;
     }
 }

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

@@ -297,6 +297,7 @@
                                                         style="@style/EditTextLineStyle"
                                                         android:layout_height="24dp"
                                                         android:layout_marginLeft="23dp"
+                                                        android:focusable="false"
                                                         android:hint="请输入物理线体" />
 
                                                     <ImageView
@@ -312,11 +313,12 @@
                                                 <ImageView
                                                     android:id="@+id/iv_dc_line"
                                                     android:layout_width="30dp"
-                                                    android:layout_height="wrap_content"
+                                                    android:layout_height="match_parent"
                                                     android:layout_gravity="center"
+                                                    android:background="@drawable/bg_button"
                                                     android:layout_marginRight="10dp"
                                                     android:layout_marginLeft="5dp"
-                                                    android:clickable="false"
+                                                    android:src="@drawable/search_48"
                                                     />
                                             </LinearLayout>
 

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

@@ -298,6 +298,7 @@
                                             style="@style/EditTextLineStyle"
                                             android:layout_height="24dp"
                                             android:layout_marginLeft="23dp"
+                                            android:fadeScrollbars="false"
                                             android:hint="请输入物理线体" />
 
                                         <ImageView
@@ -313,11 +314,13 @@
                                     <ImageView
                                         android:id="@+id/iv_dc_line"
                                         android:layout_width="30dp"
-                                        android:layout_height="wrap_content"
+                                        android:layout_height="match_parent"
                                         android:layout_gravity="center"
                                         android:layout_marginRight="10dp"
                                         android:layout_marginLeft="5dp"
                                         android:clickable="false"
+                                        android:background="@drawable/bg_button"
+                                        android:src="@drawable/search_48"
                                         />
                                 </LinearLayout>
 

+ 92 - 0
app/src/main/res/layout-large/index_line_pup.xml

@@ -0,0 +1,92 @@
+<?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"
+    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="请采集岗位资源" />
+
+    <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">
+
+        <com.uas.collection.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"/>
+
+        <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>
+    <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:layout_marginTop="30dp">
+    </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">
+
+
+        <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" />
+        <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>
+
+
+
+
+
+
+</RelativeLayout>

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

@@ -297,6 +297,7 @@
                                             style="@style/EditTextLineStyle"
                                             android:layout_height="24dp"
                                             android:layout_marginLeft="23dp"
+                                            android:focusable="false"
                                             android:hint="请输入物理线体" />
 
                                         <ImageView
@@ -312,11 +313,12 @@
                                     <ImageView
                                         android:id="@+id/iv_dc_line"
                                         android:layout_width="30dp"
-                                        android:layout_height="wrap_content"
+                                        android:layout_height="match_parent"
                                         android:layout_gravity="center"
+                                        android:background="@drawable/bg_button"
                                         android:layout_marginRight="10dp"
                                         android:layout_marginLeft="5dp"
-                                        android:clickable="false"
+                                        android:src="@drawable/search_48"
                                         />
                                 </LinearLayout>
 

+ 4 - 1
app/src/main/res/layout/fragment_quantitystatistics.xml

@@ -298,6 +298,7 @@
                                             style="@style/EditTextLineStyle"
                                             android:layout_height="24dp"
                                             android:layout_marginLeft="23dp"
+                                            android:fadeScrollbars="false"
                                             android:hint="请输入物理线体" />
 
                                         <ImageView
@@ -313,11 +314,13 @@
                                     <ImageView
                                         android:id="@+id/iv_dc_line"
                                         android:layout_width="30dp"
-                                        android:layout_height="wrap_content"
+                                        android:layout_height="match_parent"
                                         android:layout_gravity="center"
                                         android:layout_marginRight="10dp"
                                         android:layout_marginLeft="5dp"
                                         android:clickable="false"
+                                        android:background="@drawable/bg_button"
+                                        android:src="@drawable/search_48"
                                         />
                                 </LinearLayout>
 

+ 92 - 0
app/src/main/res/layout/index_line_pup.xml

@@ -0,0 +1,92 @@
+<?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"
+    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="请采集岗位资源" />
+
+    <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">
+
+        <com.uas.collection.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"/>
+
+        <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>
+    <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:layout_marginTop="30dp">
+    </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">
+
+
+        <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" />
+        <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>
+
+
+
+
+
+
+</RelativeLayout>

+ 1 - 1
app/src/main/res/values/strings.xml

@@ -313,7 +313,7 @@
     <!-- TODO: Remove or change this placeholder text -->
     <string name="hello_blank_fragment">Hello blank fragment</string>
     <string name="title_storage_in">数据采集</string>
-    <string name="quantity_statistics">产出数量统计</string>
+    <string name="quantity_statistics">产出统计</string>
     <string name="title_storage_maintain">外观维修</string>
     <string name="title_storage_breakdown">性能维修</string>
     <string name="title_requisition_transfer">领用转移</string>

+ 2 - 2
build.gradle

@@ -58,8 +58,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 14,
-            versionName      : "v1.0.4"
+            versionCode      : 16,
+            versionName      : "v1.0.6"
     ]
 
     depsVersion = [