From 55b196ea2e28a8d859c85326f2147a4f7b7196de Mon Sep 17 00:00:00 2001
From: zuojincheng <lf_zuo@163.com>
Date: 星期四, 10 四月 2025 10:58:32 +0800
Subject: [PATCH] feat(general): 新增开卡信息保存功能并优化界面布局- 新增 CardRegistrationBean 数据模型用于保存开卡信息 - 在数据库中添加 card_registration 表用于存储开卡记录 - 优化 NewCard2Activity 界面布局,调整样式和间距 - 添加协程支持,实现异步保存开卡信息到数据库 - 更新颜色配置,统一使用新加的 base_blue_bg 和 base_green_bg颜色

---
 qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/card/RegionCard.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/card/RegionCard.java b/qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/card/RegionCard.java
index fb4443a..2db7a51 100644
--- a/qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/card/RegionCard.java
+++ b/qihealonelibrary/src/main/java/com/dayu/qihealonelibrary/card/RegionCard.java
@@ -69,13 +69,15 @@
         public byte[] toByte() {
             byte[] data = new byte[16];
             data[0] = HexUtil.hexToByte(cardType);
-
-            byte[] regionBytes = HexUtil.hexToByteArray(HexUtil.get10To16LowHigh(region));
+            byte[] regionBytes = new byte[2];
+            byte[] regionDatas = HexUtil.hexToByteArray(HexUtil.get10To16LowHigh(region));
+            System.arraycopy(regionDatas, 0, regionBytes, 0, regionDatas.length);
             if (regionBytes != null) {
                 System.arraycopy(regionBytes, 0, data, 1, regionBytes.length);
             }
-
-            byte[] controllerCodelBytes = HexUtil.hexToByteArray(HexUtil.get10To16LowHigh(controllerCodel));
+            byte[] controllerCodelBytes = new byte[2];
+            byte[] controllerCodelDatas = HexUtil.hexToByteArray(HexUtil.get10To16LowHigh(controllerCodel));
+            System.arraycopy(controllerCodelDatas, 0, controllerCodelBytes, 0, controllerCodelDatas.length);
             if (controllerCodelBytes != null) {
                 System.arraycopy(controllerCodelBytes, 0, data, 3, controllerCodelBytes.length);
             }

--
Gitblit v1.8.0