chenxiaofei 1 сар өмнө
parent
commit
6c0ef8ae91

+ 1 - 1
iot-platform-manager/src/main/java/com/platform/api/manager/WeighbridgeRecordManage.java

@@ -54,7 +54,7 @@ public class WeighbridgeRecordManage {
     private final ValidateLicensePlateService validateLicensePlateService;
 
     private final WeighbridgePushService externalWeighbridgePushService;
-    @Value("${weighbridge.image.storage-prefix-path:/www/wwwroot/resources}")
+    @Value("${weighbridgeResource.image.storage-prefix-path:/www/wwwroot/resources}")
     private String oreStoragePath;
 
     @Resource

+ 6 - 6
iot-platform-manager/src/main/java/com/platform/service/XpCloudPrintService.java

@@ -55,10 +55,10 @@ public class XpCloudPrintService {
 
     private final KwsPrintReceiptRecordRepository kwsPrintReceiptRecordRepository;
 
-    @Value("weigh.weigher")
+    @Value("${weigh.weigher:defaultWeigher}")
     private String weigher;
-    @Value("weigh.copies")
-    private Integer weighbridgeCopies;
+    @Value("${weigh.copies:1}")
+    private String weighbridgeCopies;
 
     /**
      * 调用芯烨云 {@code open.xpyun.net} 开放接口(小票 {@code /xprinter/print})的 HTTP 客户端。
@@ -480,7 +480,7 @@ public class XpCloudPrintService {
             return null;
         }
         String unit = goodsInfo.getUnit();
-        return "皮重:" + formatWeight(goodsInfo.getTareWeight(), unit)
+        return formatWeight(goodsInfo.getTareWeight(), unit)
                 + "  毛重:" + formatWeight(goodsInfo.getGrossWeight(), unit)
                 + "  净重:" + formatWeight(goodsInfo.getNetWeight(), unit);
     }
@@ -522,7 +522,7 @@ public class XpCloudPrintService {
                 + "\n\n**************车辆信息**************"
                 + "\n车牌号:" + content.getPlateNo()
                 + "\n车辆轴数: " + content.getVehicleAxleDesc()
-                + "\n\n**************目的地**************"
+                + "\n\n**************目的地****************"
                 + "\n目的地:" + content.getDestination()
                 + "\n\n**************打印信息**************"
                 + "\n<L><N>打印时间:" + content.getPrintTime()
@@ -611,7 +611,7 @@ public class XpCloudPrintService {
         body.put("content", xmlContent);     // 打印内容(XML 格式)
 
         // 5. 处理打印份数:若未指定则默认为 1 份
-        Integer copies = Objects.nonNull(weighbridgeCopies) ? weighbridgeCopies : 1;
+        Integer copies = StringUtils.isNotBlank(weighbridgeCopies) ? Integer.parseInt(weighbridgeCopies) : 1;
         body.put("copies", copies);
 
         // 6. 可选参数:打印模式(0:云端排队, 1:即时打印)