Sfoglia il codice sorgente

打码代码更新

oyq28 2 anni fa
parent
commit
795832ac81

+ 1 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskNodeServiceImpl.java

@@ -2457,7 +2457,7 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
 
     @Override
     public R printCode(Map<String, Object> map) {
-        ZplPrinter p = new ZplPrinter("\\192.168.11.247\\ZDesigner ZT210-200dpi ZPL");
+        ZplPrinter p = new ZplPrinter("\\\\192.168.11.247\\ZDesigner ZT210-200dpi ZPL");
         String content = map.containsKey("uniqueCode")? map.get("uniqueCode").toString() : "";
         if(StringUtil.isEmpty(content))
             return R.fail("编码为空");

+ 2 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/util/ZplPrinter.java

@@ -48,7 +48,7 @@ public class ZplPrinter {
         PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
         if (services != null && services.length > 0) {
             for (PrintService service : services) {
-                if (printerURI.equals(service.getName())) {
+                if (service.getName().equals(printerURI)) {
                     printService = service;
                     break;
                 }
@@ -240,7 +240,7 @@ public class ZplPrinter {
     }
 
     public static void main(String[] args) {
-        ZplPrinter p = new ZplPrinter("\\192.168.11.247\\ZDesigner ZT210-200dpi ZPL");
+        ZplPrinter p = new ZplPrinter("\\\\192.168.11.247\\ZDesigner ZT210-200dpi ZPL");
         p.printBarcode(p, "D21066000101");
 
     }