From 220bce6f3eafe9712dafada91205c91efb978d16 Mon Sep 17 00:00:00 2001 From: wanghao Date: Thu, 31 Oct 2024 15:08:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=8A=A5=E4=BF=AE?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0deviceId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/jingyuan_mes/base/BaseActivity.java | 4 ++-- .../java/com/example/jingyuan_mes/device/BxActivity.java | 2 +- .../jingyuan_mes/device/DeviceRepairListActivity.java | 3 ++- app/src/main/res/layout/activity_maintain_info.xml | 9 +++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/example/jingyuan_mes/base/BaseActivity.java b/app/src/main/java/com/example/jingyuan_mes/base/BaseActivity.java index 52a5bc6..d3cf5d7 100644 --- a/app/src/main/java/com/example/jingyuan_mes/base/BaseActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/base/BaseActivity.java @@ -44,8 +44,8 @@ public class BaseActivity extends AppCompatActivity { public static final int CAMERA_PHOTO = 1; // public static String url = "http://192.168.100.199:7018/dev-api";//测试 - // public static String url = "http://175.27.215.92:7018/prod-api"; - public static String url = "http://10.11.40.120:7018/dev-api"; + public static String url = "http://175.27.215.92:7018/prod-api"; + // public static String url = "http://10.11.40.120:7018/dev-api"; public ProgressDialog dialog; public Gson gson; public MediaType JSON = MediaType.parse("application/json; charset=utf-8"); diff --git a/app/src/main/java/com/example/jingyuan_mes/device/BxActivity.java b/app/src/main/java/com/example/jingyuan_mes/device/BxActivity.java index 1e03ea6..c2f292f 100644 --- a/app/src/main/java/com/example/jingyuan_mes/device/BxActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/device/BxActivity.java @@ -181,7 +181,7 @@ public class BxActivity extends BaseActivity implements DisposalFileAdapter.Item OkGo.post(url + "/dms/mobile/insertFaultInstsanceActivity") .headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")) - .params("checkResultId", been.getDeviceld()) + .params("deviceId", been.getDeviceld()) .params("faultType", been.getFaultType()) .params("faultDescription", been.getFaultDescription()) .params("designOperations", been.getDesignOperations()) diff --git a/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairListActivity.java b/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairListActivity.java index b4655c5..4a277ce 100644 --- a/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairListActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairListActivity.java @@ -75,7 +75,8 @@ public class DeviceRepairListActivity extends BaseActivity implements DeviceRepa startActivity(intent); return; } - Toast.makeText(DeviceRepairListActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show(); + String msg = body.getMsg(); + Toast.makeText(context, msg==null?"服务器500":msg, Toast.LENGTH_SHORT).show(); } }); } diff --git a/app/src/main/res/layout/activity_maintain_info.xml b/app/src/main/res/layout/activity_maintain_info.xml index 5dc32b3..49cdc9a 100644 --- a/app/src/main/res/layout/activity_maintain_info.xml +++ b/app/src/main/res/layout/activity_maintain_info.xml @@ -24,15 +24,16 @@ + + android:background="@color/white" + android:padding="5dp" + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> +