From de8ddbdc3296d31a8ad9ea88ea0dbb9f8930580e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAPTOP-S9HJSOEB=5C=E6=98=8A=E5=A4=A9?= Date: Tue, 18 Jun 2024 09:30:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=B6=E4=BB=96=E8=B4=A7?= =?UTF-8?q?=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zhehekeji/web/Application.java | 2 ++ .../zhehekeji/web/pojo/stock/StockStatus.java | 1 + .../com/zhehekeji/web/service/PlcService.java | 26 +++++++------------ .../web/service/ksec/KsecDecoder.java | 5 +++- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/web/src/main/java/com/zhehekeji/web/Application.java b/web/src/main/java/com/zhehekeji/web/Application.java index fd31041..9822bb1 100644 --- a/web/src/main/java/com/zhehekeji/web/Application.java +++ b/web/src/main/java/com/zhehekeji/web/Application.java @@ -4,7 +4,9 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.EnableCaching; +import springfox.documentation.swagger2.annotations.EnableSwagger2; +@EnableSwagger2 //加入EnableSwagger2 @SpringBootApplication(scanBasePackages = {"com.zhehekeji"}) @MapperScan("com.zhehekeji.**.mapper.**") public class Application { diff --git a/web/src/main/java/com/zhehekeji/web/pojo/stock/StockStatus.java b/web/src/main/java/com/zhehekeji/web/pojo/stock/StockStatus.java index 7bd5197..527bb30 100644 --- a/web/src/main/java/com/zhehekeji/web/pojo/stock/StockStatus.java +++ b/web/src/main/java/com/zhehekeji/web/pojo/stock/StockStatus.java @@ -13,6 +13,7 @@ public enum StockStatus { SUCCESS(2, "盘点准确"), ERROR(1, "核对错误"), + OTHER(4, "其他"), MANUAL(3,"人工核对") ; private Integer status; diff --git a/web/src/main/java/com/zhehekeji/web/service/PlcService.java b/web/src/main/java/com/zhehekeji/web/service/PlcService.java index dc03c6d..1af7da8 100644 --- a/web/src/main/java/com/zhehekeji/web/service/PlcService.java +++ b/web/src/main/java/com/zhehekeji/web/service/PlcService.java @@ -386,20 +386,7 @@ public class PlcService { } public static void main(String[] args) { - String str = "GPE&001/5/7&823&20240425095316&2&130681&30&1&.\\\\storeData\\\\001\\\\2\\\\71\\\\4.PNG;.\\\\fileData\\\\1234\\\\814\\\\4.PNG;.\\\\fileData\\\\1234\\\\814\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\71\\\\4.PNG;.\\\\fileData\\\\1234\\\\815\\\\4.PNG;.\\\\fileData\\\\1234\\\\815\\\\4.PNG;.\\\\fileData\\\\1234\\\\816\\\\4.PNG;.\\\\fileData\\\\1234\\\\816\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\71\\\\4.PNG;.\\\\fileData\\\\1234\\\\817\\\\4.PNG;.\\\\fileData\\\\1234\\\\817\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\67\\\\4.PNG;.\\\\storeData\\\\001\\\\8\\\\54\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\44\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\32\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\17\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\17\\\\4.PNG;.\\\\storeData\\\\001\\\\9\\\\5\\\\4.PNG;.\\\\storeData\\\\001\\\\9\\\\5\\\\4.PNG;.\\\\storeData\\\\001\\\\9\\\\5\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\1\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\7\\\\3.PNG;.\\\\storeData\\\\001\\\\4\\\\25\\\\3.PNG;.\\\\storeData\\\\001\\\\8\\\\34\\\\3.PNG;.\\\\storeData\\\\001\\\\6\\\\51\\\\3.PNG;.\\\\storeData\\\\001\\\\9\\\\66\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\8\\\\64\\\\4.PNG;.\\\\storeData\\\\001\\\\8\\\\64\\\\3.PNG;.\\\\storeData\\\\001\\\\3\\\\63\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\8\\\\43\\\\3.PNG;.\\\\storeData\\\\001\\\\3\\\\55\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\55\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\55\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\55\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\33\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\33\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\68\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\68\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\68\\\\3.PNG;.\\\\storeData\\\\001\\\\4\\\\64\\\\3.PNG;.\\\\storeData\\\\001\\\\4\\\\64\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\64\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\25\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\25\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\32\\\\3.PNG;.\\\\storeData\\\\001\\\\2\\\\32\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\19\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\19\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\21\\\\3.PNG;.\\\\storeData\\\\001\\\\2\\\\21\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\21\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\40\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\40\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\44\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\21\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\21\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\35\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\35\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\35\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\66\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\20\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\20\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\20\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\20\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\20\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\55\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\55\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\21\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\21\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\21\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\42\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\42\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\22\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\22\\\\3.PNG;.\\\\storeData\\\\001\\\\4\\\\22\\\\3.PNG;.\\\\storeData\\\\001\\\\8\\\\52\\\\3.PNG;.\\\\storeData\\\\001\\\\3\\\\33\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\33\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\70\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\51\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\51\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\51\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\51\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\24\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\69\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\69\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\44\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\44\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\61\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\61\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\47\\\\3.PNG;.\\\\storeData\\\\001\\\\7\\\\47\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\47\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\64\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\64\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\64\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\28\\\\3.PNG;.\\\\storeData\\\\001\\\\6\\\\28\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\35\\\\3.PNG;.\\\\storeData\\\\001\\\\8\\\\69\\\\4.PNG;.\\\\storeData\\\\001\\\\8\\\\69\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\19\\\\3.PNG;.\\\\storeData\\\\001\\\\2\\\\19\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\19\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\6\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\36\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\36\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\57\\\\4.PNG;.\\\\storeData\\\\001\\\\7\\\\57\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\65\\\\4.PNG;.\\\\storeData\\\\001\\\\4\\\\65\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\4\\\\53\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\43\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\43\\\\4.PNG;.\\\\storeData\\\\001\\\\9\\\\45\\\\3.PNG;.\\\\storeData\\\\001\\\\8\\\\26\\\\3.PNG;.\\\\storeData\\\\001\\\\8\\\\26\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\43\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\43\\\\4.PNG;.\\\\storeData\\\\001\\\\3\\\\19\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\1\\\\71\\\\3.PNG;.\\\\storeData\\\\001\\\\5\\\\71\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\20\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\20\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\20\\\\4.PNG;.\\\\storeData\\\\001\\\\2\\\\20\\\\3.PNG;.\\\\fileData\\\\20240425095316\\\\821\\\\3.PNG;.\\\\fileData\\\\20240425095316\\\\823\\\\4.PNG>\""; - Charset charset = StandardCharsets.UTF_8; - CharsetEncoder encoder = charset.newEncoder(); - -// 获取编码所需的缓冲区大小 - int byteCount = 0; - try { - byteCount = (int) encoder.encode(CharBuffer.wrap(str)).limit(); - } catch (CharacterCodingException e) { - throw new RuntimeException(e); - } - - System.out.println("The string occupies " + byteCount + " bytes using UTF-8 encoding."); - System.out.println("".length()); + System.out.println("330101".length() != 6); } @@ -720,7 +707,9 @@ public class PlcService { stock.setWmsCategoryName(dataInfo.getCategoryName()); stock.setTaskId((dataInfo.getTaskId())); //默认未盘点 - stock.setStatus(StockStatus.PENDING.getStatus()); + if(stock.getCategory().length() == 6) { + stock.setStatus(StockStatus.PENDING.getStatus()); + } stock.setExportTime(LocalDateTime.now()); if (stock.getId() == null) { stockMapper.insert(stock); @@ -734,6 +723,7 @@ public class PlcService { //取货完成进行拍照 try { Thread.sleep(50L); + //不为其他状态进入队列 if (lock.tryLock()) { //队列中没有任务,发送取图指令 //只采用队列,队列中有数据则自动发送 @@ -767,7 +757,11 @@ public class PlcService { CheckLog checkLog = checkLogMapper.selectById(transmissionPojo.getCheckId()); Stock stock = stockMapper.selectOne(new QueryWrapper().eq("check_Num", checkLog.getId())); Street street = streetService.getStreetByPlcId(transmissionPojo.getStreetNumber()); - if (transmissionPojo.getResult() != null && transmissionPojo.getResult() == 1) { + if( stock.getCategory() != null && stock.getCategory().length() != 6) { + + checkLog.setStatus(StockStatus.OTHER.getStatus()); + stock.setStatus(StockStatus.OTHER.getStatus()); + }else if (transmissionPojo.getResult() != null && transmissionPojo.getResult() == 1) { checkLog.setStatus(StockStatus.SUCCESS.getStatus()); stock.setStatus(StockStatus.SUCCESS.getStatus()); } else { diff --git a/web/src/main/java/com/zhehekeji/web/service/ksec/KsecDecoder.java b/web/src/main/java/com/zhehekeji/web/service/ksec/KsecDecoder.java index 3258ae8..7018634 100644 --- a/web/src/main/java/com/zhehekeji/web/service/ksec/KsecDecoder.java +++ b/web/src/main/java/com/zhehekeji/web/service/ksec/KsecDecoder.java @@ -14,7 +14,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.StringUtils; +import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; @@ -70,7 +72,8 @@ public class KsecDecoder extends DelimiterBasedFrameDecoder { @Override public void run() { - String body = in.toString(Charset.forName("UTF-8")); + String body = in.toString(StandardCharsets.UTF_8); + //String body = in.toString(); tcpLogger.info(body); if (body.startsWith("<")){ // 去掉首尾标识符