|
|
|
@ -26,6 +26,8 @@ import com.example.tyre.entity.AjaxResult;
|
|
|
|
import com.example.tyre.entity.BaseCar;
|
|
|
|
import com.example.tyre.entity.BaseCar;
|
|
|
|
import com.example.tyre.entity.BaseTyre;
|
|
|
|
import com.example.tyre.entity.BaseTyre;
|
|
|
|
import com.example.tyre.entity.EPC;
|
|
|
|
import com.example.tyre.entity.EPC;
|
|
|
|
|
|
|
|
import com.example.tyre.maintenance.base.MyRecultCall;
|
|
|
|
|
|
|
|
import com.example.tyre.maintenance.base.MyResult;
|
|
|
|
import com.example.tyre.util.CarSelectionDialog;
|
|
|
|
import com.example.tyre.util.CarSelectionDialog;
|
|
|
|
import com.example.tyre.util.CommonDialog;
|
|
|
|
import com.example.tyre.util.CommonDialog;
|
|
|
|
import com.example.tyre.util.MyUrl;
|
|
|
|
import com.example.tyre.util.MyUrl;
|
|
|
|
@ -162,15 +164,20 @@ public class TyreLayoutActivity extends AppCompatActivity {
|
|
|
|
super.onDestroy();
|
|
|
|
super.onDestroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private void performSearch(String carNo) {
|
|
|
|
private void performSearch(String carNo) {
|
|
|
|
OkGo.<String>post(MyUrl.url + "/tyre/car/PdaQueryCarList")
|
|
|
|
OkGo.<MyResult>post(MyUrl.url + "/tyre/car/PdaQueryCarList")
|
|
|
|
.tag(this).params("carNo", carNo)
|
|
|
|
.tag(this).params("carNo", carNo)
|
|
|
|
.execute(new StringCallback() {
|
|
|
|
.execute(
|
|
|
|
|
|
|
|
new MyRecultCall(progressDialog,this){
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onSuccess(Response<String> response) {
|
|
|
|
public void onSuccess(Response<MyResult> response) {
|
|
|
|
hideLoadingDialog();
|
|
|
|
super.onSuccess(response);
|
|
|
|
String body = response.body();
|
|
|
|
var body = response.body();
|
|
|
|
|
|
|
|
if (body.getCode()==0) {
|
|
|
|
Gson gson = new Gson();
|
|
|
|
Gson gson = new Gson();
|
|
|
|
List<BaseCar> baseCarList = gson.fromJson(body, new TypeToken<List<BaseCar>>(){}.getType());
|
|
|
|
|
|
|
|
|
|
|
|
List<BaseCar> baseCarList =
|
|
|
|
|
|
|
|
gson.fromJson(body.getJson(), new TypeToken<List<BaseCar>>() {
|
|
|
|
|
|
|
|
}.getType());
|
|
|
|
Log.e("EPC", "listepc:+ " + baseCarList.size());
|
|
|
|
Log.e("EPC", "listepc:+ " + baseCarList.size());
|
|
|
|
if (baseCarList != null && baseCarList.size() > 0) {
|
|
|
|
if (baseCarList != null && baseCarList.size() > 0) {
|
|
|
|
List<String> carNoList = new ArrayList<>();
|
|
|
|
List<String> carNoList = new ArrayList<>();
|
|
|
|
@ -181,7 +188,22 @@ public class TyreLayoutActivity extends AppCompatActivity {
|
|
|
|
showCarSelectionDialog(carNoList);
|
|
|
|
showCarSelectionDialog(carNoList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*new StringCallback() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSuccess(Response<String> response) {
|
|
|
|
|
|
|
|
hideLoadingDialog();
|
|
|
|
|
|
|
|
String body = response.body();
|
|
|
|
|
|
|
|
Gson gson=new Gson();
|
|
|
|
|
|
|
|
AjaxResult ajaxResult=gson.fromJson(body, AjaxResult.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}*/);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private void showCarSelectionDialog(List<String> carNoList) {
|
|
|
|
private void showCarSelectionDialog(List<String> carNoList) {
|
|
|
|
CarSelectionDialog dialog = new CarSelectionDialog(this, carNoList);
|
|
|
|
CarSelectionDialog dialog = new CarSelectionDialog(this, carNoList);
|
|
|
|
|