|
@@ -149,6 +149,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
private IpAndwuliPortAdapter ipAndwuliPortAdapter;
|
|
|
private ArrayList<LineCodeEntity> wulilist;
|
|
|
private String li_code;
|
|
|
+ private String sr_linecode;
|
|
|
+ private String sr_badname;
|
|
|
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
@@ -230,7 +232,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
|
|
|
@Override
|
|
|
protected void initDatas() {
|
|
|
- recycleDataone();
|
|
|
+// recycleDataone();
|
|
|
recycleDatathree();
|
|
|
|
|
|
|
|
@@ -522,21 +524,21 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
JSONObject data = FastjsonUtil.getJSONObject(o.toString(), "data");
|
|
|
String badcode = FastjsonUtil.getText(data, "badcode");
|
|
|
String ngreason = FastjsonUtil.getText(data, "ngreason")+"|其他";
|
|
|
- if (!StringUtil.isEmpty(badcode)){
|
|
|
- mFeededListone.clear();
|
|
|
- if (badcode.contains("|")){
|
|
|
- String[] split = badcode.split("\\|");
|
|
|
- for (int i=0;i<split.length;i++){
|
|
|
- StorageRechargeAloneBean bean=new StorageRechargeAloneBean(split[i]);
|
|
|
- mFeededListone.add(bean);
|
|
|
- }
|
|
|
-
|
|
|
- }else {
|
|
|
- StorageRechargeAloneBean bean=new StorageRechargeAloneBean(badcode);
|
|
|
- mFeededListone.add(bean);
|
|
|
- }
|
|
|
- setAdapterone(mFeededListone);
|
|
|
- }
|
|
|
+// if (!StringUtil.isEmpty(badcode)){
|
|
|
+// mFeededListone.clear();
|
|
|
+// if (badcode.contains("|")){
|
|
|
+// String[] split = badcode.split("\\|");
|
|
|
+// for (int i=0;i<split.length;i++){
|
|
|
+// StorageRechargeAloneBean bean=new StorageRechargeAloneBean(split[i]);
|
|
|
+// mFeededListone.add(bean);
|
|
|
+// }
|
|
|
+//
|
|
|
+// }else {
|
|
|
+// StorageRechargeAloneBean bean=new StorageRechargeAloneBean(badcode);
|
|
|
+// mFeededListone.add(bean);
|
|
|
+// }
|
|
|
+// setAdapterone(mFeededListone);
|
|
|
+// }
|
|
|
if (!StringUtil.isEmpty(ngreason)){
|
|
|
mFeededListthree.clear();
|
|
|
if (ngreason.contains("|")){
|
|
@@ -680,7 +682,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
public void getfuzzySearchData(String inoutNo,String sone){
|
|
|
|
|
|
VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
- .url(GloableParams.ADDRESS_SMT_FUZZY_SEARCH)
|
|
|
+ .url(GloableParams.ADDRESS_SPM_FUZZYSEARCHBADCODE)
|
|
|
.method(Request.Method.GET)
|
|
|
.addParam("inoutNo", inoutNo)
|
|
|
.build(), new HttpCallback() {
|
|
@@ -708,10 +710,14 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
for(Object index:dataArrayone){
|
|
|
JSONObject data = (JSONObject) index;
|
|
|
LinecodeBean bean = new LinecodeBean();
|
|
|
+ bean.setMA_ID(data.getString("MA_ID"));
|
|
|
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_ID(data.getString("MA_ID"));
|
|
|
bean.setMA_BOMVERSION(data.getString("MA_BOMVERSION"));
|
|
|
|
|
|
linecodeBeanList.add(bean);
|
|
@@ -1175,7 +1181,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
/**
|
|
|
* 不良现象
|
|
|
*/
|
|
|
- public void recycleDataone(){
|
|
|
+ public void recycleDataone(String cdename){
|
|
|
mFeededListone = new ArrayList<>();
|
|
|
myAdapterone = new SelectAdapterone(mFeededListone);
|
|
|
LinearLayoutManager layoutmanager = new LinearLayoutManager(mActivity);
|
|
@@ -1185,36 +1191,21 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
rv_one.setLayoutManager(layout);
|
|
|
setAdapterone(mFeededListone);
|
|
|
rv_one.setAdapter(myAdapterone);
|
|
|
-// List<String> list=new ArrayList<>();
|
|
|
-// list.add("无输出");
|
|
|
-// list.add("电压高");
|
|
|
-// list.add("电压低");
|
|
|
-// list.add("电流高");
|
|
|
-// list.add("电流低");
|
|
|
-// list.add("纹波大");
|
|
|
-// list.add("起机慢");
|
|
|
-// list.add("短路");
|
|
|
-// list.add("OCP不保护");
|
|
|
-// list.add("指示灯不亮");
|
|
|
-// list.add("耐压不良");
|
|
|
-// list.add("绝缘电阻");
|
|
|
-// list.add("误测");
|
|
|
-// list.add("能效不良");
|
|
|
-// list.add("纹波小");
|
|
|
-// list.add("其他");
|
|
|
-// JSONObject jsonObject = new JSONObject();
|
|
|
-// JSONArray jsonArray = new JSONArray();
|
|
|
-// JSONObject object_1 = new JSONObject();
|
|
|
-// for (int i=0;i<list.size();i++){
|
|
|
-// StorageRechargeAloneBean bean=new StorageRechargeAloneBean(list.get(i));
|
|
|
-// object_1.put("alone", list.get(i));
|
|
|
-// jsonArray.add(bean);
|
|
|
-// }
|
|
|
-//
|
|
|
-// jsonObject.put("formStore", jsonArray);
|
|
|
-//
|
|
|
-// JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
|
|
|
-// handleFeededDataone(dataArray);
|
|
|
+ List<String> list=new ArrayList<>();
|
|
|
+ list.add(cdename);
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ JSONArray jsonArray = new JSONArray();
|
|
|
+ JSONObject object_1 = new JSONObject();
|
|
|
+ for (int i=0;i<list.size();i++){
|
|
|
+ StorageRechargeAloneBean bean=new StorageRechargeAloneBean(list.get(i));
|
|
|
+ object_1.put("alone", list.get(i));
|
|
|
+ jsonArray.add(bean);
|
|
|
+ }
|
|
|
+
|
|
|
+ jsonObject.put("formStore", jsonArray);
|
|
|
+
|
|
|
+ JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
|
|
|
+ handleFeededDataone(dataArray);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1372,7 +1363,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
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);
|
|
|
-
|
|
|
+ edit_et.setText(tv_macode.getText().toString().trim());
|
|
|
RecyclerView rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
|
|
|
rv_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
|
|
|
rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
|
|
@@ -1400,9 +1391,6 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
});
|
|
|
|
|
|
ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Override
|
|
|
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
|
|
ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
|
|
@@ -1411,6 +1399,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
pr_code = ipAndPortBeans.get(position).getPR_CODE();
|
|
|
pr_detail = ipAndPortBeans.get(position).getPR_DETAIL();
|
|
|
ma_bomversion = ipAndPortBeans.get(position).getMA_BOMVERSION();
|
|
|
+ sr_linecode = ipAndPortBeans.get(position).getSR_LINECODE();
|
|
|
+ sr_badname = ipAndPortBeans.get(position).getSR_BADNAME();
|
|
|
for (int i = 0; i < ipAndPortBeans.size(); i++) {
|
|
|
ipAndPortBeans.get(i).setChecked(false);
|
|
|
}
|
|
@@ -1432,11 +1422,14 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
tv_gonema_code.setText(ma_code);
|
|
|
tv_pr_code.setText(""+ma_bomversion);
|
|
|
tv_pr_detail.setText(""+pr_detail);
|
|
|
- tv_macode.setText(""+ma_code);
|
|
|
+ tv_macode.setText(""+ma_code);//
|
|
|
+ ce_wuli.setText(sr_linecode);
|
|
|
at_station.clearFocus();
|
|
|
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();
|
|
|
}
|
|
@@ -1928,11 +1921,11 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
|
|
|
//设置条目状态
|
|
|
(( SelectAdapterone.ListItemViewHolder) holder).mainTitle.setText(mList.get(i).getAlonedata());
|
|
|
- if (mList.get(i).getAlonedata().equals("其他")){
|
|
|
- (( SelectAdapterone.ListItemViewHolder) holder).ce_other.setVisibility(View.VISIBLE);
|
|
|
- }else {
|
|
|
- (( SelectAdapterone.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
|
|
|
- }
|
|
|
+// if (mList.get(i).getAlonedata().equals("其他")){
|
|
|
+// (( SelectAdapterone.ListItemViewHolder) holder).ce_other.setVisibility(View.VISIBLE);
|
|
|
+// }else {
|
|
|
+// (( SelectAdapterone.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
|
|
|
+// }
|
|
|
|
|
|
// ((ListItemViewHolder) holder).checkBox.setChecked();
|
|
|
//checkBox的监听
|
|
@@ -2263,7 +2256,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, LinecodeBean item) {
|
|
|
- helper.setText(R.id.macode_ip__Tv,item.getMA_ID()+"-"+item.getMA_CODE()+"-"+item.getPR_CODE()+"-"+item.getPR_DETAIL());
|
|
|
+ helper.setText(R.id.macode_ip__Tv,item.getMA_ID()+"-"+item.getMA_CODE()+"-"+item.getSR_LINECODE()+"-"+item.getSR_BADNAME());
|
|
|
LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
|
|
|
if (item.getChecked()) {
|
|
|
line_true.setSelected(true);
|