From abc2b9b07b1bda5bd0586899de9be737ad9ed168 Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Thu, 26 Aug 2021 09:56:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=88=90=E5=93=81=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=8A=A0=E9=A1=B9=E7=9B=AE=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../foreverwin/mesnac/common/dto/LabelPrintDto.java | 11 +++++++++++ .../common/service/impl/ProdReadyTaskServiceImpl.java | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/dto/LabelPrintDto.java b/common/src/main/java/com/foreverwin/mesnac/common/dto/LabelPrintDto.java index 9a63900e..dc3b9043 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/dto/LabelPrintDto.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/dto/LabelPrintDto.java @@ -19,6 +19,9 @@ public class LabelPrintDto implements Serializable { //原材料标签参数 //物料编码 private String item; + + private String itemNumber; + //物料描述 private String itemDescription; //供应商 @@ -45,6 +48,14 @@ public class LabelPrintDto implements Serializable { //打印张数 private Integer printNum; + public String getItemNumber() { + return itemNumber; + } + + public void setItemNumber(String itemNumber) { + this.itemNumber = itemNumber; + } + public String getShopOrder() { return shopOrder; } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java index 1dd3f23e..ceeba0f5 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java @@ -474,7 +474,9 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl Date: Thu, 26 Aug 2021 10:01:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=89=93=E5=8D=B0=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/common/service/impl/PrintLogServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java index 541629ed..aff0d58d 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java @@ -77,6 +77,7 @@ public class PrintLogServiceImpl extends ServiceImpl i list.get(i).setPrintNum(printList.get(i).getPrintNum()); } + // 访问打印服务 printServer(list); // 更新打印记录:是否已打印、使用的打印机、打印次数 @@ -115,10 +116,14 @@ public class PrintLogServiceImpl extends ServiceImpl i public void sfcLabelPrint(Map map) { Integer qty = (Integer) map.get("qty"); List labelPrintDtoList = (List) map.get("labelPrintDtoList"); - printServer(labelPrintDtoList); + // 解决无法获取list中对象的问题 String parse = JSON.toJSONString(labelPrintDtoList); List labelPrintDtos = JSONObject.parseArray(parse, LabelPrintDto.class); + + // 访问打印服务 + printServer(labelPrintDtos); + // 打印张数 Integer printNum = 0; for (LabelPrintDto labelP:labelPrintDtos) {