From 865e425cdf7395fece0a53a6def75e2c84d6dbf0 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期二, 15 十月 2024 09:56:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java
index ae74ff0..e57dd51 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java
@@ -1,9 +1,8 @@
package com.mes;
-import com.mes.job.CacheGlassTask;
-import com.mes.md.entity.Account;
import com.mes.md.mapper.AccountMapper;
import com.mes.md.service.AccountService;
+import com.mes.tools.HexConversion;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -11,9 +10,10 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
-import java.util.Arrays;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.Random;
/**
* @Author : yanzhixin
@@ -39,12 +39,31 @@
log.info("瀹屾暣璺緞");
}
@Test
+ public void testByte() {
+ //String url = getClass().getResource("").getPath();
+ //log.info("瀹屾暣璺緞锛歿}", Arrays.asList(url));
+ byte[] msgs = new byte[2048];
+ msgs[0]=(byte)0;
+ msgs[1]=Byte.parseByte("1") ;
+ int g=HexConversion.bytesToInt(msgs,0);
+
+ String message = HexConversion.byteToHexString(4, msgs);
+ byte font=msgs[1];
+ String[] fontBit=String.format("%8s", Integer.toBinaryString((int)font)).replace(" ", "0").split("");
+ byte[] bit=new byte[1];
+ bit[0]=Byte.parseByte(fontBit[7]) ;
+ log.info("缁撴灉:{},{}",fontBit,bit);
+ //log.info("缁撴灉:{},{},{},{},{}",msgs,message,g,(msgs[0] & 0xFF),((msgs[1] & 0xFF)<<8));
+ }
+ @Test
public void testFindAccount() {
- Map<String, Object> Account=accountService.selectAccount("admin","12345");
+ Map<String, Object> Account=accountService.selectAccount("beibo","57858555");
if(Account.isEmpty()){
System.out.println("鎴愬姛");
}
log.info("{}",Account);
}
+
+
}
--
Gitblit v1.8.0