chenxiaofei 1 ヶ月 前
コミット
3c76b67db1

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

@@ -53,7 +53,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

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

@@ -54,10 +54,11 @@ public class XpCloudPrintService {
     private final PrintReceiptContentClient printReceiptContentClient;
 
     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 客户端。
@@ -496,7 +497,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);
     }
@@ -538,7 +539,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()
@@ -627,7 +628,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:即时打印)