From 4cc10691cd2197f72c205723a642a62478c33273 Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期二, 31 五月 2022 09:04:22 +0800
Subject: [PATCH] # ycq
---
src/main/java/com/zy/core/thread/LedThread.java | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/LedThread.java b/src/main/java/com/zy/core/thread/LedThread.java
index 197b219..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);
// 璁剧疆鏄剧ず鐗规妧涓哄揩閫熸墦鍑�
@@ -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