Procházet zdrojové kódy

小票内容修改

linbl před 2 dny
rodič
revize
e07f3a9149

+ 2 - 2
src/main/java/com/gzlh/api/OpenApi.java

@@ -89,7 +89,7 @@ public class OpenApi {
         printBO.setWWB_CST_OWNER("货主单位");
         printBO.setWWB_TRUCKNO("车号");
         printBO.setWWB_DATE_FST("一次过磅时间");
-        printBO.setWWB_CAR_GW("10.65");
+        printBO.setWWB_CAR_GW(10.65);
         printBO.setWWB_DATE_SEC("2024:12:12 22:00:12");
         printBO.setWWB_CAR_WGT(16.3);
         printBO.setWWB_CAR_NW(10.2);
@@ -247,7 +247,7 @@ public class OpenApi {
                 .setWWB_GTVOL(weightReport.getWwbGtvol())
                 .setWWB_PKSPAC(weightReport.getWwbPkspac())
                 .setWWB_ID(weightReport.getWwbId())
-                .setWB_MARKERNO(weightReport.getWbMarkern())
+                .setWB_MARKERNO(weightReport.getWbMarkerno())
                 .setWWB_CAR_WGT(weightReport.getWwbCarWgt())
                 .setTK_REMARK(weightReport.getTkRemark());
         printBO.setTitle(title);

+ 1 - 1
src/main/java/com/gzlh/config/ModuleEnum.java

@@ -7,7 +7,7 @@ import lombok.Getter;
 @Getter
 public enum ModuleEnum {
     LED_MODULE("led显示屏","LED"),
-    WEIGHBRIDGE_MODULE("地磅表","WEIGHBRIDGE"),
+    WEIGHBRIDGE_MODULE("地磅表","WEIGHBRIDGE"),
     INFRARED_MODULE("红外","INFRARED"),
     TRAFFIC_MODULE("红绿灯","TRAFFIC"),
     GATE_MODULE("道闸","GATE"),

+ 3 - 3
src/main/java/com/gzlh/device/print/bo/BeiHaiWeightReport.java

@@ -78,7 +78,7 @@ public class BeiHaiWeightReport {
      * 毛重
      */
     @JsonProperty("WWB_CAR_GW")
-    private String WWB_CAR_GW;
+    private Double WWB_CAR_GW;
     /**
      * 皮重
      */
@@ -101,12 +101,12 @@ public class BeiHaiWeightReport {
      * 备注
      */
     @JsonProperty("WWB_REMARK")
-    private String WWB_REMARK = "";
+    private String WWB_REMARK;
     /**
      * 客户备注
      */
     @JsonProperty("TK_REMARK")
-    private String TK_REMARK = "";
+    private String TK_REMARK;
     /**
      * 仓单号
      */

+ 3 - 3
src/main/java/com/gzlh/device/print/bo/WeightReport.java

@@ -41,7 +41,7 @@ public class WeightReport {
 
     private String wwbTruckno;
 
-    private String wwbCarGw;
+    private Double wwbCarGw;
 
     private Double wwbCarWgt;
 
@@ -61,13 +61,13 @@ public class WeightReport {
     /**
      * 唛头
      */
-    private String wbMarkern;
+    private String wbMarkerno;
     /**
      * 操作类型
      */
     private String wwtOpType;
 
-    private String tkRemark="";
+    private String tkRemark;
 
     private Integer wwbPkspac;
     private Integer businessType;

+ 4 - 3
src/main/java/com/gzlh/device/print/test/JMPrintThread.java

@@ -77,7 +77,8 @@ public class JMPrintThread implements Runnable {
                             "  船名: " + printBO.getWWB_VLS_VCNNM() + "\n" +
                             "  船次: " + printBO.getWWB_VIW_VOYAGE() + " \n" +
                             "  唛头: " + printBO.getWB_MARKERNO() + " \n" +
-                            "  电子单号: " + printBO.getWWB_ID() + " \n" +
+                            "  磅单号: " + printBO.getWWB_ID() + " \n" +
+                            "  申请单号: " + printBO.getWWB_WB_BANO() + " \n" +
                             "  货名: " + printBO.getWWB_GOODSNAME() + "\n" +
                             "  车号: " + printBO.getWWB_TRUCKNO() + "\n" +
                             "  毛重: " + printBO.getWWB_CAR_GW() + "吨\n" +
@@ -85,8 +86,7 @@ public class JMPrintThread implements Runnable {
                             "  净重: " + printBO.getWWB_CAR_NW() + "吨\n" +
                             "  过磅地点: " + printBO.getWWB_PLACE_CODE() + "\n" +
                             "  二次过磅时间: " + printBO.getWWB_DATE_SEC() + "\n" +
-                            "  客户备注: " + printBO.getTK_REMARK() + "\n" +
-                            "  地磅备注: " + printBO.getWWB_REMARK();
+                            "  客户备注: " + printBO.getTK_REMARK();
             int len = text.length();
             byte[] printData = new byte[]{};
             for (int i = 0; i < len; i++) {
@@ -120,6 +120,7 @@ public class JMPrintThread implements Runnable {
             log.info("print done======:{}", JSONUtil.toJsonStr(printBO));
             ledFactory.handler(SysConfig.serialSetting.getLed().getBrand()).sendMsg("已成功打印小票,请取走小票", options);
         } catch (IOException e) {
+            ledFactory.handler(SysConfig.serialSetting.getLed().getBrand()).sendMsg("小票打印失败", options);
             throw new RuntimeException(e);
         }