Browse Source

友盛地磅打印机映射改为写死

donglang 6 ngày trước cách đây
mục cha
commit
2827a111e6

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

@@ -70,6 +70,12 @@ public class XpCloudPrintService {
     @Resource
     private io.github.dv996coding.service.PrintService printService;
 
+    // 映射地磅编号和打印机
+    Map<Long, String> map = Map.of(
+            10100111L, "142F4FYCJ39234B", //山下
+            10100112L, "142F4FYCJ39234B",  //山上靠近地磅房
+            10100113L, "1424RPQP6GC5E4A"); // 山上靠近加工厂
+
     /**
      * 调用SDK执行图片打印
      *
@@ -175,8 +181,6 @@ public class XpCloudPrintService {
             //获取打印机编号
             Long weighbridgeId = transportInfo.getWeighbridgeId();
             log.info("[地磅打印机映射]车辆过磅的地磅编号:{}",weighbridgeId);
-            //配置文件
-            Map<Long, String> map = xpCloudProperties.getWeighbridgeCodeMap();
             reqVo.setSn(map.get(weighbridgeId));
 
             // 10. 构建最终发送给芯烨云开放平台的JSON请求体(包含鉴权信息、SN、内容等)