diff --git a/app/src/main/java/com/example/aucma_mes/CheckActivity.java b/app/src/main/java/com/example/aucma_mes/CheckActivity.java index 1e739f6..37c8b0e 100644 --- a/app/src/main/java/com/example/aucma_mes/CheckActivity.java +++ b/app/src/main/java/com/example/aucma_mes/CheckActivity.java @@ -86,7 +86,8 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte private void initStationSum() { OkGo.post(url + "/api/pdaQueryQuantityNumber").tag(this) .headers("Authorization", SharedPreferencesUtils.getstring("token", "")) - .params("stationCode", stationCode).execute(new MyRecultCall(dialog, this) { + .params("stationCode", stationCode) + .execute(new MyRecultCall(dialog, this) { @Override public void onSuccess(Response response) { super.onSuccess(response); @@ -107,9 +108,11 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte @Override protected void sanInfo(String code) { checkViewModel.setCode(code); - OkGo.post(url + "/api/check/select").tag(this) + OkGo.post(url + "/api/check/query").tag(this) .headers("Authorization", SharedPreferencesUtils.getstring("token", "")) - .params("code", code).execute(new MyRecultCall(dialog, this) { + .params("code", code) + .params("station", stationCode) + .execute(new MyRecultCall(dialog, this) { @Override public void onSuccess(Response response) { super.onSuccess(response); diff --git a/app/src/main/java/com/example/aucma_mes/MainActivity.java b/app/src/main/java/com/example/aucma_mes/MainActivity.java index 4d1f8ce..79b7564 100644 --- a/app/src/main/java/com/example/aucma_mes/MainActivity.java +++ b/app/src/main/java/com/example/aucma_mes/MainActivity.java @@ -133,7 +133,7 @@ public class MainActivity extends BaseActivity { public void login(View view) { if (!loginState) { Toast.makeText(this, "设备未注册,不允许登录", Toast.LENGTH_SHORT).show(); - // return; + return; } String teamCode = user.getTeamCode(); if (teamCode==null||teamCode.isEmpty()) return; diff --git a/app/src/main/java/com/example/aucma_mes/base/BaseActivity.java b/app/src/main/java/com/example/aucma_mes/base/BaseActivity.java index 7b7c823..7f72f5f 100644 --- a/app/src/main/java/com/example/aucma_mes/base/BaseActivity.java +++ b/app/src/main/java/com/example/aucma_mes/base/BaseActivity.java @@ -26,8 +26,8 @@ import okhttp3.MediaType; public abstract class BaseActivity extends AppCompatActivity { private MyBroad receiver; - public static String url="http://192.168.137.1:8080"; - // public static String url="http://10.100.72.10:8080"; + // public static String url="http://192.168.137.1:8080"; + public static String url="http://10.100.72.10:8080"; public ProgressDialog dialog; public Gson gson; public MediaType JSON = MediaType.parse("application/json; charset=utf-8");