From d0226747665355acecd5b4f2b5c0beb020586729 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 17 一月 2025 15:37:32 +0800
Subject: [PATCH] # 23. PDA拣货单据,勾选或点击确认按钮后,完成当前单据 (已完成) 24. PDA出库成功后,界面数据重置,避免重复操作 (已修复) 25. PDA接口请求,添加一个Loading遮档 (已修复) 27. 非平库单据,在平库可做入库操作 (已修复) 28. 平库已组拖数据,组拖完成后依然可组拖 (已修复) 29. 平库入库后,订单明细没有添加(已修复) 30. 平库入库后,单据类型没有修改(已修复) 31. 没有绑定播种位,不能进行播种,前后端都需加判定(已修复) 33. 平库入库未修改入库已完成数量(已修复) 34. cacheSite缓存站点逻辑需重新梳理,入库生成波次时(已完成) 35. PDA添加发货确认,默认全选 (已修复) 36. 大屏获取任务时,是由容器到达的拖盘码确认通知 (已修复) 37. 拣货单序号不显示 问题修复 (已修复) 42. pda发货确认,添加不同颜色区分是否全部完成拣货,绿色全部拣货完成,红色完成部分拣货(已修复) 43. CTU入库完成后,订单明细没有删除,执行中数量清空(已修复) 44. 平库入库完成后,历史档明细完成数量没有更新 (已修复) 45. PDA料号不显示 (已修复) 46. 发货完成后,波次管理数据未加入历史档 (已修复)
---
zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/RadixTools.java | 326 +++++++++++++++++++++++++++---------------------------
1 files changed, 163 insertions(+), 163 deletions(-)
diff --git a/zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/RadixTools.java b/zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/RadixTools.java
index f29b5da..ff5757c 100644
--- a/zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/RadixTools.java
+++ b/zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/RadixTools.java
@@ -1,163 +1,163 @@
-package com.zy.asrs.framework.common;
-
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.Charset;
-
-/**
- * radix tools
- * Created by vincent on 2018/10/6
- */
-public class RadixTools {
-
- public static void main(String[] args) {
- String s = RadixTools.toBinaryString((byte) 1);
- System.out.println(s);
- for(int i=s.length()-1;i>=0;i--){
- char c=s.charAt(i);
- if (i == 7 && c =='1'){
- System.out.println("===");
- }
- }
- }
-
- /************************************** BinaryString **********************************************/
-
- public static String toBinaryString(byte b){
- return Long.toBinaryString((b & 0xFF) + 0x100).substring(1);
- }
-
- public static String toBinaryString(byte[] bytes){
- StringBuilder sb = new StringBuilder();
- for (byte aByte : bytes) {
- sb.append(Long.toBinaryString((aByte & 0xFF) + 0x100).substring(1));
- }
- return sb.toString();
- }
-
- /************************************** HexString **********************************************/
-
- public static byte[] hexStringToBytes(String hexString) {
- if (hexString == null || hexString.equals("")) {
- return null;
- }
- hexString = hexString.toUpperCase();
- int length = hexString.length() / 2;
- char[] hexChars = hexString.toCharArray();
- byte[] d = new byte[length];
- for (int i = 0; i < length; i++) {
- int pos = i * 2;
- d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
- }
- return d;
- }
-
- public static String bytesToHexStr(byte[] bytes){
- StringBuilder buf = new StringBuilder(bytes.length * 2);
- for(byte b : bytes) {
- buf.append(String.format("%02x", b & 0xff));
- }
-
- return buf.toString();
- }
-
- private static byte charToByte(char c) {
- return (byte) "0123456789ABCDEF".indexOf(c);
- }
-
-
- /************************************** String **********************************************/
-
- public static String bytesToStr(byte[] bytes){
- return bytesToStr(bytes, Charset.forName("gbk"));
- }
-
- public static String bytesToStr(byte[] bytes, Charset charset){
- return new String(bytes, charset).trim().toUpperCase();
- }
-
- public static byte[] strToBytes(String str) throws UnsupportedEncodingException {
- return str.getBytes("gbk");
- }
-
- /************************************** long **********************************************/
-
- public static byte[] longToBytes(long number) {
- long temp = number;
- byte[] b = new byte[8];
- for (int i = 0; i < b.length; i++) {
- b[i] = new Long(temp & 0xff).byteValue();// 灏嗘渶浣庝綅淇濆瓨鍦ㄦ渶浣庝綅
- temp = temp >> 8; // 鍚戝彸绉�8浣�
- }
- return b;
- }
-
- public static long bytesToLong(byte[] bytes) {
- long s = 0;
- long s0 = bytes[0] & 0xff;// 鏈�浣庝綅
- long s1 = bytes[1] & 0xff;
- long s2 = bytes[2] & 0xff;
- long s3 = bytes[3] & 0xff;
- long s4 = bytes[4] & 0xff;// 鏈�浣庝綅
- long s5 = bytes[5] & 0xff;
- long s6 = bytes[6] & 0xff;
- long s7 = bytes[7] & 0xff;
-
- // s0涓嶅彉
- s1 <<= 8;
- s2 <<= 16;
- s3 <<= 24;
- s4 <<= 8 * 4;
- s5 <<= 8 * 5;
- s6 <<= 8 * 6;
- s7 <<= 8 * 7;
- s = s0 | s1 | s2 | s3 | s4 | s5 | s6 | s7;
- return s;
- }
-
-
- /************************************** int **********************************************/
-
- public static byte[] intToBytes(int n) {
- byte[] b = new byte[4];
- b[3] = (byte) (n & 0xff);
- b[2] = (byte) (n >> 8 & 0xff);
- b[1] = (byte) (n >> 16 & 0xff);
- b[0] = (byte) (n >> 24 & 0xff);
- return b;
- }
-
-
- public static int bytesToInt(byte[] b) {
- int s = 0;
- int s0 = b[0] & 0xff;// 鏈�浣庝綅
- int s1 = b[1] & 0xff;
- int s2 = b[2] & 0xff;
- int s3 = b[3] & 0xff;
- s0 <<= 24;
- s1 <<= 16;
- s2 <<= 8;
- s = s0 | s1 | s2 | s3;
- return s;
- }
-
- /************************************** short **********************************************/
-
- public static short byteToShort(byte[] b) {
- short s = 0;
- short s0 = (short) (b[1] & 0xff);// 鏈�浣庝綅
- short s1 = (short) (b[0] & 0xff);
- s1 <<= 8;
- s = (short) (s0 | s1);
- return s;
- }
-
- public static byte[] shortToByte(short s){
- byte[] b = new byte[2];
- for(int i = 0; i < 2; i++){
- int offset = 16 - (i+1)*8; //鍥犱负byte鍗�4涓瓧鑺傦紝鎵�浠ヨ璁$畻鍋忕Щ閲�
- b[i] = (byte)((s >> offset)&0xff); //鎶�16浣嶅垎涓�2涓�8浣嶈繘琛屽垎鍒瓨鍌�
- }
- return b;
- }
-
-}
+package com.zy.asrs.framework.common;
+
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
+
+/**
+ * radix tools
+ * Created by vincent on 2018/10/6
+ */
+public class RadixTools {
+
+ public static void main(String[] args) {
+ String s = RadixTools.toBinaryString((byte) 1);
+ System.out.println(s);
+ for(int i=s.length()-1;i>=0;i--){
+ char c=s.charAt(i);
+ if (i == 7 && c =='1'){
+ System.out.println("===");
+ }
+ }
+ }
+
+ /************************************** BinaryString **********************************************/
+
+ public static String toBinaryString(byte b){
+ return Long.toBinaryString((b & 0xFF) + 0x100).substring(1);
+ }
+
+ public static String toBinaryString(byte[] bytes){
+ StringBuilder sb = new StringBuilder();
+ for (byte aByte : bytes) {
+ sb.append(Long.toBinaryString((aByte & 0xFF) + 0x100).substring(1));
+ }
+ return sb.toString();
+ }
+
+ /************************************** HexString **********************************************/
+
+ public static byte[] hexStringToBytes(String hexString) {
+ if (hexString == null || hexString.equals("")) {
+ return null;
+ }
+ hexString = hexString.toUpperCase();
+ int length = hexString.length() / 2;
+ char[] hexChars = hexString.toCharArray();
+ byte[] d = new byte[length];
+ for (int i = 0; i < length; i++) {
+ int pos = i * 2;
+ d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
+ }
+ return d;
+ }
+
+ public static String bytesToHexStr(byte[] bytes){
+ StringBuilder buf = new StringBuilder(bytes.length * 2);
+ for(byte b : bytes) {
+ buf.append(String.format("%02x", b & 0xff));
+ }
+
+ return buf.toString();
+ }
+
+ private static byte charToByte(char c) {
+ return (byte) "0123456789ABCDEF".indexOf(c);
+ }
+
+
+ /************************************** String **********************************************/
+
+ public static String bytesToStr(byte[] bytes){
+ return bytesToStr(bytes, Charset.forName("gbk"));
+ }
+
+ public static String bytesToStr(byte[] bytes, Charset charset){
+ return new String(bytes, charset).trim().toUpperCase();
+ }
+
+ public static byte[] strToBytes(String str) throws UnsupportedEncodingException {
+ return str.getBytes("gbk");
+ }
+
+ /************************************** long **********************************************/
+
+ public static byte[] longToBytes(long number) {
+ long temp = number;
+ byte[] b = new byte[8];
+ for (int i = 0; i < b.length; i++) {
+ b[i] = new Long(temp & 0xff).byteValue();// 灏嗘渶浣庝綅淇濆瓨鍦ㄦ渶浣庝綅
+ temp = temp >> 8; // 鍚戝彸绉�8浣�
+ }
+ return b;
+ }
+
+ public static long bytesToLong(byte[] bytes) {
+ long s = 0;
+ long s0 = bytes[0] & 0xff;// 鏈�浣庝綅
+ long s1 = bytes[1] & 0xff;
+ long s2 = bytes[2] & 0xff;
+ long s3 = bytes[3] & 0xff;
+ long s4 = bytes[4] & 0xff;// 鏈�浣庝綅
+ long s5 = bytes[5] & 0xff;
+ long s6 = bytes[6] & 0xff;
+ long s7 = bytes[7] & 0xff;
+
+ // s0涓嶅彉
+ s1 <<= 8;
+ s2 <<= 16;
+ s3 <<= 24;
+ s4 <<= 8 * 4;
+ s5 <<= 8 * 5;
+ s6 <<= 8 * 6;
+ s7 <<= 8 * 7;
+ s = s0 | s1 | s2 | s3 | s4 | s5 | s6 | s7;
+ return s;
+ }
+
+
+ /************************************** int **********************************************/
+
+ public static byte[] intToBytes(int n) {
+ byte[] b = new byte[4];
+ b[3] = (byte) (n & 0xff);
+ b[2] = (byte) (n >> 8 & 0xff);
+ b[1] = (byte) (n >> 16 & 0xff);
+ b[0] = (byte) (n >> 24 & 0xff);
+ return b;
+ }
+
+
+ public static int bytesToInt(byte[] b) {
+ int s = 0;
+ int s0 = b[0] & 0xff;// 鏈�浣庝綅
+ int s1 = b[1] & 0xff;
+ int s2 = b[2] & 0xff;
+ int s3 = b[3] & 0xff;
+ s0 <<= 24;
+ s1 <<= 16;
+ s2 <<= 8;
+ s = s0 | s1 | s2 | s3;
+ return s;
+ }
+
+ /************************************** short **********************************************/
+
+ public static short byteToShort(byte[] b) {
+ short s = 0;
+ short s0 = (short) (b[1] & 0xff);// 鏈�浣庝綅
+ short s1 = (short) (b[0] & 0xff);
+ s1 <<= 8;
+ s = (short) (s0 | s1);
+ return s;
+ }
+
+ public static byte[] shortToByte(short s){
+ byte[] b = new byte[2];
+ for(int i = 0; i < 2; i++){
+ int offset = 16 - (i+1)*8; //鍥犱负byte鍗�4涓瓧鑺傦紝鎵�浠ヨ璁$畻鍋忕Щ閲�
+ b[i] = (byte)((s >> offset)&0xff); //鎶�16浣嶅垎涓�2涓�8浣嶈繘琛屽垎鍒瓨鍌�
+ }
+ return b;
+ }
+
+}
--
Gitblit v1.9.1