From 37ad8fa7b80b2a39451389fb23cd2b134916c55c Mon Sep 17 00:00:00 2001 From: wangh <123456> Date: Wed, 13 Mar 2024 17:41:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=20=E4=BF=9D=E4=BF=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 30 +- .../jingyuan_mes/HomePageActivity.java | 2 + .../jingyuan_mes/base/BaseActivity.java | 2 +- .../check/CheckDisposalActivity.java | 1 + .../check/CheckSelectActivity.java | 1 + .../jingyuan_mes/device/BxActivity.java | 18 ++ .../entity/check/CheckDisposalBeen.java | 5 +- app/src/main/res/layout/activity_bx.xml | 262 ++++++++++++++++++ 8 files changed, 302 insertions(+), 19 deletions(-) create mode 100644 app/src/main/java/com/example/jingyuan_mes/device/BxActivity.java create mode 100644 app/src/main/res/layout/activity_bx.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6c677fc..8df2557 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -7,14 +7,16 @@ android:required="false" /> - - - - + android:name=".device.BxActivity" + android:exported="false" /> - - - + @@ -96,10 +96,10 @@ - - - - + + + + - - - - diff --git a/app/src/main/java/com/example/jingyuan_mes/HomePageActivity.java b/app/src/main/java/com/example/jingyuan_mes/HomePageActivity.java index 5935911..af55194 100644 --- a/app/src/main/java/com/example/jingyuan_mes/HomePageActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/HomePageActivity.java @@ -14,6 +14,7 @@ import com.example.jingyuan_mes.base.MyResult; import com.example.jingyuan_mes.check.CheckActivity; import com.example.jingyuan_mes.check.CheckSelectActivity; import com.example.jingyuan_mes.databinding.ActivityHomePageBinding; +import com.example.jingyuan_mes.device.BxActivity; import com.example.jingyuan_mes.entity.MenuBeen; import com.example.jingyuan_mes.entity.store.PdaRouters; import com.example.jingyuan_mes.store.AssemblyOutActivity; @@ -69,6 +70,7 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall { map.put("物料质检", CheckActivity.class); map.put("物料质检列表", CheckSelectActivity.class); map.put("不合格处置", CheckSelectActivity.class); + map.put("故障报修", BxActivity.class); } private void initRequest() { 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 07bf612..af22399 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 @@ -31,7 +31,7 @@ public class BaseActivity extends AppCompatActivity { public Gson gson; public MediaType JSON = MediaType.parse("application/json; charset=utf-8"); private MyReceiver myReceiver; - public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjNkMjIxYzYzLWEyZGEtNDFlZi1iZjRmLWVlNjQwNTQxNmM5YyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.erdvjHcWd6JDpy854nPauWeHdksSkIiv-GeRrpCjpdMBI5enOE-17ayCmTduS71_8Dg9DGtR4ZBLjLiwpuu9Jg"; + public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjA4MGY0Yjc2LWYxM2EtNDM5ZC1hYTE4LTNhYjdhMzU2OTU0NiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.x3TIVswwbxV6hbV5ZUgVX2D2pxvZgHW0jN0y-NvgfipcHaaEkLak_ZeTwAdg3YMrm8GMNbHMb8_LoqEhLrjbzA"; public Context context; public SimpleDateFormat format= new SimpleDateFormat( "yyyyMMdd_HHmmss"); @Override diff --git a/app/src/main/java/com/example/jingyuan_mes/check/CheckDisposalActivity.java b/app/src/main/java/com/example/jingyuan_mes/check/CheckDisposalActivity.java index 5b79be2..6afd4ef 100644 --- a/app/src/main/java/com/example/jingyuan_mes/check/CheckDisposalActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/check/CheckDisposalActivity.java @@ -115,6 +115,7 @@ public class CheckDisposalActivity extends BaseActivity implements DisposalFileA return; } filesList.remove(position); + files.remove(position); fileAdapter.notifyDataSetChanged(); } diff --git a/app/src/main/java/com/example/jingyuan_mes/check/CheckSelectActivity.java b/app/src/main/java/com/example/jingyuan_mes/check/CheckSelectActivity.java index d89d147..7ab4ba0 100644 --- a/app/src/main/java/com/example/jingyuan_mes/check/CheckSelectActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/check/CheckSelectActivity.java @@ -87,6 +87,7 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall { var checkResult = list.get(position); var checkResultId = checkResult.getCheckResultId(); var checkMode = checkResult.getCheckModeText(); + Log.e("TAG", "onClick:" + checkMode); var checkSample = checkResult.getCheckSample(); var materialBatch = checkResult.getMaterialBatch(); intent1.putExtra("checkResultId", checkResultId); 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 new file mode 100644 index 0000000..159d350 --- /dev/null +++ b/app/src/main/java/com/example/jingyuan_mes/device/BxActivity.java @@ -0,0 +1,18 @@ +package com.example.jingyuan_mes.device; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.databinding.DataBindingUtil; + +import android.os.Bundle; + +import com.example.jingyuan_mes.R; +import com.example.jingyuan_mes.base.BaseActivity; + +public class BxActivity extends BaseActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + DataBindingUtil. setContentView(this,R.layout.activity_bx); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/jingyuan_mes/entity/check/CheckDisposalBeen.java b/app/src/main/java/com/example/jingyuan_mes/entity/check/CheckDisposalBeen.java index a4bdccb..b6829f5 100644 --- a/app/src/main/java/com/example/jingyuan_mes/entity/check/CheckDisposalBeen.java +++ b/app/src/main/java/com/example/jingyuan_mes/entity/check/CheckDisposalBeen.java @@ -1,6 +1,9 @@ package com.example.jingyuan_mes.entity.check; +import com.bumptech.glide.load.Option; + import java.util.List; +import java.util.Optional; /** * @author wanghao @@ -83,8 +86,8 @@ public class CheckDisposalBeen { } public String getCheckMode() { + return Optional.ofNullable(checkMode).map(t->t.equals("1") ? "全检" : "抽检").orElse(null); - return checkMode.equals("1") ? "全检" : "抽检"; } public void setCheckMode(String checkMode) { diff --git a/app/src/main/res/layout/activity_bx.xml b/app/src/main/res/layout/activity_bx.xml new file mode 100644 index 0000000..6cf5af3 --- /dev/null +++ b/app/src/main/res/layout/activity_bx.xml @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +