|
|
@@ -73,6 +73,7 @@ import com.uas.hycollection.util.StringUtil;
|
|
|
import com.uas.hycollection.util.VolleyRequest;
|
|
|
import com.uas.hycollection.util.VollyRequest;
|
|
|
import com.uas.hycollection.view.ClearableEditText;
|
|
|
+import com.umeng.commonsdk.debug.E;
|
|
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
import org.json.JSONException;
|
|
|
@@ -158,6 +159,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
private GetLinePortAdapter getLinePortAdapter;
|
|
|
private String li_personne_id;
|
|
|
private RecyclerView rv_getline_ip_port_data;
|
|
|
+ private String SR_NGQTY = "-1";
|
|
|
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
@@ -241,18 +243,15 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
|
|
|
@Override
|
|
|
protected void initDatas() {
|
|
|
-// recycleDataone();
|
|
|
+// recycleDataone("alonedata");
|
|
|
+ recycleDataone("");
|
|
|
recycleDatathree();
|
|
|
|
|
|
-
|
|
|
-
|
|
|
recycleDatatwo();
|
|
|
|
|
|
getclassify();
|
|
|
getqty();
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**--------------------------------工单号----------------------------**/
|
|
|
linecodeBeanList = new ArrayList<>();
|
|
|
ce_work_code.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
@@ -290,7 +289,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-
|
|
|
iv_work_code.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
@@ -300,8 +298,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
tv_pr_code.setText("");
|
|
|
tv_pr_detail.setText("");
|
|
|
tv_macode.setText("");
|
|
|
-
|
|
|
-
|
|
|
+ SR_NGQTY = "-1";
|
|
|
+ selectAdapterQty.notifyDataSetChanged();
|
|
|
}
|
|
|
});
|
|
|
iv_popuwindow.setOnClickListener(new View.OnClickListener() {
|
|
|
@@ -392,8 +390,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
});
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**----------------------------人员编号------------------------------------**/
|
|
|
tv_dc_emcode.addTextChangedListener(new TextWatcher() {
|
|
|
@Override
|
|
|
@@ -492,6 +488,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+// mFeededListone = new ArrayList<>();
|
|
|
+// myAdapterone = new SelectAdapterone(mFeededListone);
|
|
|
+
|
|
|
sc_codecollethree = SharedPreUtil.getString(mActivity, "sc_codecollethree", null);
|
|
|
at_station.setText(sc_codecollethree);
|
|
|
getReapirInfo(sc_codecollethree,tv_macode.getText().toString().trim(),ce_wuli.getText().toString().trim());
|
|
|
@@ -576,7 +575,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
StorageRechargeAloneBean bean=new StorageRechargeAloneBean(split[i]);
|
|
|
mFeededListthree.add(bean);
|
|
|
}
|
|
|
-
|
|
|
}else {
|
|
|
StorageRechargeAloneBean bean=new StorageRechargeAloneBean(ngreason);
|
|
|
mFeededListthree.add(bean);
|
|
|
@@ -592,13 +590,10 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
String temeindate;
|
|
|
public void addDataSamart(String sr_badname,String sr_reason,String sr_badlocationremark,String sr_ngqty,String input_classTwo){
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
@@ -643,13 +638,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
private boolean pepolerboolean = false;
|
|
|
public void getOrImage(String em_code){
|
|
|
progressDialog.show();
|
|
|
@@ -688,10 +676,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
tv_dc_emcode.setFocusable(false);
|
|
|
pepolerboolean= true;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -709,11 +694,11 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
//工单号
|
|
|
public void getfuzzySearchData(String inoutNo,String sone){
|
|
|
-
|
|
|
VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
.url(GloableParams.ADDRESS_SPM_FUZZYSEARCHBADCODE)
|
|
|
.method(Request.Method.GET)
|
|
|
.addParam("inoutNo", inoutNo)
|
|
|
+ .addParam("type", "性能")
|
|
|
.build(), new HttpCallback() {
|
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
@@ -743,17 +728,14 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
bean.setMA_CODE(data.getString("MA_CODE"));
|
|
|
bean.setSR_LINECODE(data.getString("SR_LINECODE"));
|
|
|
bean.setSR_BADNAME(data.getString("SR_BADNAME"));
|
|
|
-
|
|
|
-
|
|
|
bean.setPR_CODE(data.getString("PR_CODE"));
|
|
|
bean.setPR_DETAIL(data.getString("PR_DETAIL"));
|
|
|
bean.setMA_BOMVERSION(data.getString("MA_BOMVERSION"));
|
|
|
-
|
|
|
+ bean.setSR_NGQTY(data.getString("SR_NGQTY"));
|
|
|
linecodeBeanList.add(bean);
|
|
|
}
|
|
|
ipAndlinecodePortAdapter.setmList(linecodeBeanList);
|
|
|
ipAndlinecodePortAdapter.notifyDataSetChanged();
|
|
|
-
|
|
|
}
|
|
|
else {
|
|
|
if (dataArray != null) {
|
|
|
@@ -931,12 +913,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
rv_dataclassify.setAdapter(classifyAdapter);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 不良数量
|
|
|
*/
|
|
|
@@ -990,7 +966,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
String ec_passqtytrim;
|
|
|
String number ="";
|
|
|
public void getNewSaveData(){
|
|
|
@@ -1430,6 +1405,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
ma_bomversion = ipAndPortBeans.get(position).getMA_BOMVERSION();
|
|
|
sr_linecode = ipAndPortBeans.get(position).getSR_LINECODE();
|
|
|
sr_badname = ipAndPortBeans.get(position).getSR_BADNAME();
|
|
|
+ SR_NGQTY = ipAndPortBeans.get(position).getSR_NGQTY(); //不良品数量
|
|
|
+
|
|
|
for (int i = 0; i < ipAndPortBeans.size(); i++) {
|
|
|
ipAndPortBeans.get(i).setChecked(false);
|
|
|
}
|
|
|
@@ -1463,10 +1440,10 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
ce_work_code.clearFocus();
|
|
|
tv_dc_emcode.requestFocus();
|
|
|
ce_work_code.setFocusable(false);
|
|
|
- recycleDataone(sr_badname);
|
|
|
|
|
|
getReapirInfo(at_station.getText().toString().trim(),ma_code,ce_wuli.getText().toString().trim());
|
|
|
closeListPopupWindow();
|
|
|
+ selectAdapterQty.notifyDataSetChanged();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -1847,8 +1824,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
ipAndwuliPortAdapter.notifyDataSetChanged();
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
} else {
|
|
|
ipAndwuliPortAdapter = new IpAndwuliPortAdapter(wulilist);
|
|
|
rv_line_ip_port_data.setAdapter(ipAndwuliPortAdapter);
|
|
|
@@ -1886,7 +1861,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-
|
|
|
//确定
|
|
|
sure_tv.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
@@ -1897,10 +1871,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
CommonUtil.toastNoRepeat(mActivity,"请选择物理线体");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
getReapirInfo(at_station.getText().toString().trim(),tv_macode.getText().toString().trim(),li_code);
|
|
|
-
|
|
|
-
|
|
|
closeListPopupWindow();
|
|
|
}
|
|
|
});
|
|
|
@@ -1909,16 +1880,11 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
cancle_tv.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
-
|
|
|
closeListPopupWindow();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public class SelectAdapterone extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
|
|
private int checkedPosition = -1;
|
|
|
private boolean onBind;
|
|
|
@@ -2056,15 +2022,10 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
this.mainTitle = (TextView) view.findViewById(R.id.text);
|
|
|
this.checkBox = (CheckBox) view.findViewById(R.id.select_checkbox);
|
|
|
this.ce_other = (ClearableEditText) view.findViewById(R.id.ce_other);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public class SelectAdaptertwo extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
|
|
private int checkedPosition = -1;
|
|
|
private boolean onBind;
|
|
|
@@ -2142,10 +2103,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
amount--;
|
|
|
((ListItemViewHolder) holder).ce_qty.setText(String.valueOf(amount));
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
// ((ListItemViewHolder) holder).checkBox.setChecked();
|
|
|
@@ -2266,7 +2224,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
this.line_vis = (LinearLayout) view.findViewById(R.id.line_vis);
|
|
|
this.btnIncrease = (TextView) view.findViewById(R.id.btnIncrease);
|
|
|
this.btnDecrease = (TextView) view.findViewById(R.id.btnDecrease);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2332,7 +2289,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
private class IpAndwuliPortAdapter extends BaseQuickAdapter<LineCodeEntity, BaseViewHolder> {
|
|
|
private List<LineCodeEntity> mmmmList;
|
|
|
|
|
|
@@ -2362,13 +2318,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
public class SelectAdapterthree extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
|
|
private int checkedPosition = -1;
|
|
|
@@ -2517,7 +2466,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
private ArrayList<StorageRechargeAloneBean> mList = new ArrayList<>();
|
|
|
private SparseBooleanArray mSelectedPositions = new SparseBooleanArray();
|
|
|
private boolean mIsSelectable = false;
|
|
|
-
|
|
|
+ private boolean isCheckReRefresh = false;
|
|
|
|
|
|
public SelectAdapterQty(ArrayList<StorageRechargeAloneBean> list) {
|
|
|
if (list == null) {
|
|
|
@@ -2533,7 +2482,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
// ab.setTitle("已选择" + 0 + "项");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
|
View itemView = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recyclerview_item, viewGroup, false);
|
|
|
@@ -2545,7 +2493,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
@SuppressLint("SetTextI18n")
|
|
|
@Override
|
|
|
public void onBindViewHolder(final RecyclerView.@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int i) {
|
|
|
-
|
|
|
+ if (-1 == Integer.parseInt(SR_NGQTY)) {
|
|
|
+ ((SelectAdapterQty.ListItemViewHolder) holder).checkBox.setChecked(false);
|
|
|
+ }
|
|
|
//设置条目状态
|
|
|
(( SelectAdapterQty.ListItemViewHolder) holder).mainTitle.setTextSize(15);
|
|
|
(( SelectAdapterQty.ListItemViewHolder) holder).mainTitle.setText(mList.get(i).getAlonedata());
|
|
|
@@ -2556,16 +2506,13 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
(( SelectAdapterQty.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
// ((ListItemViewHolder) holder).checkBox.setChecked();
|
|
|
//checkBox的监听
|
|
|
((SelectAdapterQty.ListItemViewHolder) holder).checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
@Override
|
|
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
|
|
if (isChecked == true) {
|
|
|
+ isCheckReRefresh = true;
|
|
|
map.clear();
|
|
|
map.put(i, true);
|
|
|
checkedPosition = i;
|
|
|
@@ -2581,6 +2528,11 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
});
|
|
|
onBind = true;
|
|
|
+ if (!isCheckReRefresh && (i+1) == Integer.parseInt(SR_NGQTY)) {
|
|
|
+ map.clear();
|
|
|
+ map.put(i, true);
|
|
|
+ checkedPosition = i;
|
|
|
+ }
|
|
|
if (map != null && map.containsKey(i)) {
|
|
|
(( SelectAdapterQty.ListItemViewHolder) holder).checkBox.setChecked(true);
|
|
|
} else {
|
|
|
@@ -2588,8 +2540,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
onBind = false;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
(( SelectAdapterQty.ListItemViewHolder) holder).ce_other.addTextChangedListener(new TextWatcher() {
|
|
|
@Override
|
|
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
@@ -2862,7 +2812,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
if (!mSearchStr.isEmpty()) {
|
|
|
List<LineCodeEntity> thisList = new ArrayList<>();
|
|
|
for(int i=0;i<personnelList.size();i++){
|
|
|
- if(personnelList.get(i).getLI_CODE().contains(mSearchStr)){
|
|
|
+ if(personnelList.get(i).getLI_CODE().contains(mSearchStr) ||
|
|
|
+ personnelList.get(i).getLI_NAME().contains(mSearchStr)
|
|
|
+ ){
|
|
|
thisList.add(personnelList.get(i));
|
|
|
}
|
|
|
if(i == personnelList.size() -1){
|