浏览代码

import JSONObject包

ChengJH 2 年之前
父节点
当前提交
15843201d7
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      app/src/main/java/com/uas/uas_mes_zb_p/fragment/BarcodeInfoCollectFragment.java

+ 11 - 0
app/src/main/java/com/uas/uas_mes_zb_p/fragment/BarcodeInfoCollectFragment.java

@@ -15,6 +15,7 @@ import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
 import com.google.gson.Gson;
 import com.uas.uas_mes_zb_p.R;
@@ -577,6 +578,15 @@ public class BarcodeInfoCollectFragment extends BaseFragment {
                 @Override
                 public void onSuccess(int flag, Object o) throws Exception {
                     progressDialog.dismiss();
+                    String result = o.toString();
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONObject dataObject = resultObject.getJSONObject("data");
+                    if (dataObject!=null){
+                        String bar_location = FastjsonUtil.getText(dataObject, "bar_location");
+                        mLocationEditText.setText(bar_location);//仓位
+                    }
+
+
                     if (!material_in_collect_old_et.getText().toString().isEmpty()
                             &&!mLotEditText.getText().toString().isEmpty()
                             &&!mDateEditText.getText().toString().isEmpty()
@@ -589,6 +599,7 @@ public class BarcodeInfoCollectFragment extends BaseFragment {
 
 
 
+
                 }
 
                 @Override