|
|
@@ -720,7 +720,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, ResourcesBean item) {
|
|
|
- helper.setText(R.id.macode_ip__Tv,item.getSC_CODE());
|
|
|
+ helper.setText(R.id.macode_ip__Tv,item.getSC_NAME()+"("+item.getSC_CODE()+")");
|
|
|
LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
|
|
|
if (item.getChecked()) {
|
|
|
line_true.setSelected(true);
|
|
|
@@ -909,6 +909,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
|
|
|
ResourcesBean bean = new ResourcesBean();
|
|
|
bean.setSC_CODE(data.getString("SC_CODE"));
|
|
|
bean.setST_REMARK(data.getString("ST_REMARK"));
|
|
|
+ bean.setSC_NAME(data.getString("SC_NAME"));
|
|
|
resourcesBeanList.add(bean);
|
|
|
}
|
|
|
ipAndResourcesPortAdapter.setmList(resourcesBeanList);
|
|
|
@@ -1085,7 +1086,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
|
|
|
rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
|
|
|
ipAndlinecodePortAdapter.setmList(linecodeBeanList);
|
|
|
rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
|
|
|
- getfuzzySearchData(et_linecode_smts.getText().toString().trim(),"弹框");
|
|
|
+ getfuzzySearchData(edit_et.getText().toString().trim(),"弹框");
|
|
|
|
|
|
editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
|
|
|
editPW.setTouchable(true);
|
|
|
@@ -1102,7 +1103,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
|
|
|
search_im.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
- getfuzzySearchData(et_linecode_smts.getText().toString().trim(),"弹框");
|
|
|
+ getfuzzySearchData(edit_et.getText().toString().trim(),"弹框");
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -1147,52 +1148,52 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
|
|
|
});
|
|
|
|
|
|
|
|
|
- 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 (linecodeBeanList.isEmpty()){
|
|
|
- getfuzzySearchData(et_linecode_smts.getText().toString().trim(),"弹框");
|
|
|
- }
|
|
|
- if (s.length() >= 0) {
|
|
|
- String mSearchStr = s.toString().trim();
|
|
|
- LogUtil.i("mSearchStr",mSearchStr);
|
|
|
- List<LinecodeBean> thisList = new ArrayList<>();
|
|
|
- for(int i=0;i<linecodeBeanList.size();i++){
|
|
|
- if(linecodeBeanList.get(i).getMA_CODE().contains(mSearchStr)){
|
|
|
- thisList.add(linecodeBeanList.get(i));
|
|
|
- }
|
|
|
- if(i == linecodeBeanList.size() -1){
|
|
|
- ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(thisList);
|
|
|
- rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
|
|
|
- LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
|
|
|
- }
|
|
|
- }
|
|
|
- ipAndlinecodePortAdapter.notifyDataSetChanged();
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
|
|
|
- rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
|
|
|
-
|
|
|
- }
|
|
|
- ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
|
|
- @Override
|
|
|
- public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
|
|
- List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
|
|
|
- for (int i = 0; i < ipAndPortBeans.size(); i++) {
|
|
|
- ipAndPortBeans.get(i).setChecked(false);
|
|
|
- }
|
|
|
- ipAndPortBeans.get(position).setChecked(true);
|
|
|
- ipAndlinecodePortAdapter.notifyDataSetChanged();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
+// 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 (linecodeBeanList.isEmpty()){
|
|
|
+// getfuzzySearchData(et_linecode_smts.getText().toString().trim(),"弹框");
|
|
|
+// }
|
|
|
+// if (s.length() >= 0) {
|
|
|
+// String mSearchStr = s.toString().trim();
|
|
|
+// LogUtil.i("mSearchStr",mSearchStr);
|
|
|
+// List<LinecodeBean> thisList = new ArrayList<>();
|
|
|
+// for(int i=0;i<linecodeBeanList.size();i++){
|
|
|
+// if(linecodeBeanList.get(i).getMA_CODE().contains(mSearchStr)){
|
|
|
+// thisList.add(linecodeBeanList.get(i));
|
|
|
+// }
|
|
|
+// if(i == linecodeBeanList.size() -1){
|
|
|
+// ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(thisList);
|
|
|
+// rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
|
|
|
+// LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// ipAndlinecodePortAdapter.notifyDataSetChanged();
|
|
|
+//
|
|
|
+// } else {
|
|
|
+//
|
|
|
+// ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
|
|
|
+// rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
|
|
|
+//
|
|
|
+// }
|
|
|
+// ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
|
|
+// @Override
|
|
|
+// public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
|
|
+// List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
|
|
|
+// for (int i = 0; i < ipAndPortBeans.size(); i++) {
|
|
|
+// ipAndPortBeans.get(i).setChecked(false);
|
|
|
+// }
|
|
|
+// ipAndPortBeans.get(position).setChecked(true);
|
|
|
+// ipAndlinecodePortAdapter.notifyDataSetChanged();
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+//
|
|
|
+// });
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -1215,7 +1216,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
|
|
|
rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
|
|
|
ipAndResourcesPortAdapter.setmList(resourcesBeanList);
|
|
|
rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
|
|
|
- getfuzzySearchSourceData(ce_resources.getText().toString().trim(),"弹框");
|
|
|
+ getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
|
|
|
|
|
|
editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
|
|
|
editPW.setTouchable(true);
|
|
|
@@ -1299,52 +1300,52 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
|
|
|
});
|
|
|
|
|
|
|
|
|
- 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(ce_resources.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();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
+// 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();
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+//
|
|
|
+// });
|
|
|
|
|
|
|
|
|
}
|