From 844597b5813ff8589de503cd7d7b1bbd0586d287 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期一, 13 五月 2024 19:38:03 +0800
Subject: [PATCH] 1.添加水量单价 2.修复发现的bug

---
 qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/tools/NfcReadHelper.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/tools/NfcReadHelper.java b/qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/tools/NfcReadHelper.java
index dff0d49..295e31c 100644
--- a/qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/tools/NfcReadHelper.java
+++ b/qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/tools/NfcReadHelper.java
@@ -135,8 +135,10 @@
                     byte[] data = mfc.readBlock(bIndex + 0);
                     if (data != null && data.length > 0) {
                         String hex = HexUtil.bytesToHex(Arrays.copyOfRange(data, 0, 4));
+                        hex = HexUtil.spaceHex(hex);
+                        hex = HexUtil.HighLowHex(hex);
                         Log.i("NFCWreatActivity", "hex===" + hex);
-                        return hex;
+                        return hex.toUpperCase();
                     }
                 }
 
@@ -176,6 +178,8 @@
                     byte[] data = mfc.readBlock(bIndex + 0);
                     if (data != null && data.length > 0) {
                         String hex = HexUtil.bytesToHex(Arrays.copyOfRange(data, 0, 4));
+                        hex = HexUtil.spaceHex(hex);
+                        hex = HexUtil.HighLowHex(hex);
                         strData.append(hex);
                         strData.append(",");
                         Log.i("NFCWreatActivity", "hex===" + hex);
@@ -193,7 +197,7 @@
                         String hex = HexUtil.byteToHex(data[0]);
                         strData.append(hex);
                         Log.i("NFCWreatActivity", "hex===" + hex);
-                        return strData.toString();
+                        return strData.toString().toUpperCase();
                     }
                 } else {
                     Log.i("NFCWreatActivity", "isOpen===" + isOpen);

--
Gitblit v1.8.0