From d98500ae699aff29a30b0a7dcb4db59445e64cd0 Mon Sep 17 00:00:00 2001 From: wangh <123456> Date: Mon, 25 Mar 2024 09:12:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20-=20=E8=BF=94=E4=BF=AE?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8F=90=E4=BA=A4=E5=B7=A5=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/aucma_mes/CheckActivity.java | 9 ++++++--- .../main/java/com/example/aucma_mes/MainActivity.java | 2 +- .../java/com/example/aucma_mes/base/BaseActivity.java | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) 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");