From 3d2a161ca245484a3162b439cadf348b2f3a75fa Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期三, 23 四月 2025 15:06:37 +0800
Subject: [PATCH] 初始化

---
 src/main/java/com/zy/core/thread/LedThread.java |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/LedThread.java b/src/main/java/com/zy/core/thread/LedThread.java
index de41c18..3305f41 100644
--- a/src/main/java/com/zy/core/thread/LedThread.java
+++ b/src/main/java/com/zy/core/thread/LedThread.java
@@ -100,14 +100,21 @@
             page.newLine("鐩爣绔欙細"+command.getStaNo());
             if (!command.isEmptyMk()) {
                 for (MatDto matDto : command.getMatDtos()) {
-                    page.newLine(matDto.getMaknx() + "銆愭暟閲�" + matDto.getCount() +"銆�");
+                    //鍘绘帀灏忔暟鐐�
+                    String strQty = matDto.getCount().toString();
+                    int idx = strQty.lastIndexOf(".");
+                    if(idx >= 0){
+                        strQty.substring(0,idx);
+                    }
+                    page.newLine(matDto.getMaknx() + "[鏁伴噺" + strQty +"]");
+//                    page.newLine(matDto.getMaknx() + "銆愭暟閲�" + matDto.getCount() +"銆�");
                 }
             }
             page.newLine("\n");
         }
 
         // 璁剧疆瀛椾綋
-        page.setFont(new Font("瀹嬩綋",Font.PLAIN,12));
+        page.setFont(new Font("瀹嬩綋",Font.PLAIN,10));
         // 璁剧疆鏂囨湰棰滆壊
         page.setForeground(Color.red);
         // 璁剧疆鏄剧ず鐗规妧涓哄揩閫熸墦鍑�
@@ -151,7 +158,7 @@
             }
         } else {
             page.newLine("鑷姩鍖栫珛浣撲粨搴�");
-            page.newLine("瑗挎牸閭佽偂浠芥湁闄愬叕鍙�");
+            page.newLine("瑗挎牸杩堣偂浠芥湁闄愬叕鍙�");
         }
 
         // 璁剧疆瀛椾綋
@@ -198,6 +205,13 @@
 
 
     public static void main(String[] args) throws Exception {
+        String strQty = "1234";
+        int index = strQty.lastIndexOf(".");
+        if(index>=0) {
+            strQty=strQty.substring(0, index);
+        }
+        System.out.println("2==>>"+strQty);
+
         Bx5GEnv.initial(3000);
         Bx5GScreenClient screen = new Bx5GScreenClient("my");
         DisplayStyleFactory.DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyleFactory.DisplayStyle[0]);

--
Gitblit v1.9.1