|
|
@@ -2,6 +2,7 @@ package com.uas.collection.fragment;
|
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
import android.app.Activity;
|
|
|
+import android.content.Context;
|
|
|
import android.content.Intent;
|
|
|
import android.graphics.Color;
|
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
|
@@ -26,6 +27,7 @@ import android.view.ViewGroup;
|
|
|
import android.view.Window;
|
|
|
import android.view.WindowManager;
|
|
|
import android.view.inputmethod.EditorInfo;
|
|
|
+import android.view.inputmethod.InputMethodManager;
|
|
|
import android.widget.AutoCompleteTextView;
|
|
|
import android.widget.CheckBox;
|
|
|
import android.widget.CompoundButton;
|
|
|
@@ -168,7 +170,8 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
private String alonedatamaster;
|
|
|
private String ce_bit_original;
|
|
|
private String ma_bomversion;
|
|
|
-
|
|
|
+ private boolean pepolerboolean = false;
|
|
|
+ private InputMethodManager imm;
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
return R.layout.fragment_quantitystatistics;
|
|
|
@@ -232,7 +235,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
rv_data.setAdapter(myAdapter);
|
|
|
em_name = SharedPreUtil.getString(mActivity, Constants.FLAG.CACHE_USER_EMCODE,null);
|
|
|
tv_em_name.setText("人员编号:"+ em_name);
|
|
|
-
|
|
|
+ imm = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -432,6 +435,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
// getfuzzySearchSourceData(va_code,"");
|
|
|
if (!StringUtil.isEmpty(va_code)){
|
|
|
tv_dc_line.setFocusable(false);
|
|
|
+ imm.hideSoftInputFromWindow(tv_dc_line.getWindowToken(), 0);
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
@@ -572,11 +576,11 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- sc_codecolleone = SharedPreUtil.getString(mActivity, "sc_codecolleone", null);
|
|
|
+ sc_codecolleone = SharedPreUtil.getString(mActivity, "sc_codecollequa", null);
|
|
|
ce_resources.setText(sc_codecolleone);
|
|
|
tv_station.setText(sc_codecolleone);
|
|
|
// getunhealthyDataList(sc_codecolleone);
|
|
|
- recycleDataundesirable("");
|
|
|
+ recycleDataundesirable(ce_resources.getText().toString().trim());
|
|
|
|
|
|
// recyclemaster_copyData(sc_codecolleone);
|
|
|
// recycleoriginal_copyData(sc_codecolleone);
|
|
|
@@ -626,7 +630,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
* 关于人员资料
|
|
|
*/
|
|
|
public void getOrImage(String em_code){
|
|
|
- progressDialog.show();
|
|
|
+// progressDialog.show();
|
|
|
VollyRequest.getInstance().stringRequest(mStringRequest,
|
|
|
new HttpParams.Builder()
|
|
|
.url(GloableParams.ASTATIONTHE_RESOURCEFILE)
|
|
|
@@ -644,6 +648,11 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
JSONArray url = FastjsonUtil.getJSONArray(data, "url");
|
|
|
if (url == null || url.size() == 0){
|
|
|
CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
|
|
|
+ pepolerboolean= false;
|
|
|
+ Glide.with(mActivity).load("").into(iv_personnel_data);
|
|
|
+ tv_dc_emcode.requestFocus();
|
|
|
+ tv_dc_emcode.setSelection(tv_dc_emcode.getText().toString().length());
|
|
|
+ return;
|
|
|
}
|
|
|
for(int i=0;i<url.size();i++){
|
|
|
JSONObject data2 = (JSONObject) url.get(i);
|
|
|
@@ -655,6 +664,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
tv_dc_emcode.clearFocus();
|
|
|
ce_resources.clearFocus();
|
|
|
tv_dc_emcode.setFocusable(false);
|
|
|
+ pepolerboolean= true;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -665,6 +675,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
+ pepolerboolean= false;
|
|
|
}
|
|
|
|
|
|
});
|
|
|
@@ -1079,7 +1090,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
String st_remark = JsonUtils.optStringNotNull(dataObject, "ST_REMARK");
|
|
|
ce_resources.setText(sc_code);
|
|
|
if (!StringUtil.isEmpty(sc_code)){
|
|
|
- SharedPreUtil.saveString(mActivity,"sc_codecolleone",sc_code);
|
|
|
+ SharedPreUtil.saveString(mActivity,"sc_codecollequa",sc_code);
|
|
|
}
|
|
|
|
|
|
tv_station.setText("当前岗位:"+sc_code);
|
|
|
@@ -1199,7 +1210,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
}
|
|
|
String ec_passqtytrim;
|
|
|
public void getNewData(){
|
|
|
- if (tv_dc_emcode.getText().toString().trim().isEmpty()){
|
|
|
+ if (!pepolerboolean){
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请采集人员编号");
|
|
|
return;
|
|
|
}
|
|
|
@@ -1871,7 +1882,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
list.clear();
|
|
|
|
|
|
if (!StringUtil.isEmpty(sc_code)){
|
|
|
- SharedPreUtil.saveString(mActivity,"sc_codecolleone",sc_code);
|
|
|
+ SharedPreUtil.saveString(mActivity,"sc_codecollequa",sc_code);
|
|
|
}else {
|
|
|
CommonUtil.toastNoRepeat(mActivity,"请选择岗位资源");
|
|
|
return;
|
|
|
@@ -1884,7 +1895,7 @@ public class QuantityStatisticsFragment extends BaseFragment implements View.OnC
|
|
|
ce_resources.clearFocus();
|
|
|
|
|
|
// getunhealthyDataList(sc_code);
|
|
|
-// recycleDataundesirable(sc_code);
|
|
|
+ recycleDataundesirable(sc_code);
|
|
|
//
|
|
|
// recyclemaster_copyData(sc_code);
|
|
|
// recycleoriginal_copyData(sc_code);
|