Selaa lähdekoodia

二维码地址配置

徐展城 1 päivä sitten
vanhempi
commit
03e8f066c6

+ 9 - 4
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorderissuereport/BoilerTaskOrderIssueReportServiceImpl.java

@@ -173,6 +173,9 @@ public class BoilerTaskOrderIssueReportServiceImpl extends ServiceImpl<BoilerTas
     @Value("${tz.minio.hostouter}")
     private String minioHostouter;
 
+    @Value("${tz.qrCodeWebUrl.boiler}")
+    private String boilerQrCodeUrl;
+
     @Resource
     private CommonThread commonThread;
 
@@ -967,10 +970,12 @@ public class BoilerTaskOrderIssueReportServiceImpl extends ServiceImpl<BoilerTas
 
         byte[] pdf = pdfService.pdf(dynamicTbDO.getId(), instanceId);
 
-        String qrcode = String.format("https://yudao-h5.hofo.co/mp/pagesSub/reportInfoList/index?id=%s&type=0",id);
-        if(env.equals("uat")){
-            qrcode = String.format("https://tjt.gzsei.cn/mp/pagesSub/reportInfoList/index?id=%s&type=0",id);
-        }
+//        String qrcode = String.format("https://yudao-h5.hofo.co/mp/pagesSub/reportInfoList/index?id=%s&type=0",id);
+//        if(env.equals("uat")){
+//            qrcode = String.format("https://tjt.gzsei.cn/mp/pagesSub/reportInfoList/index?id=%s&type=0",id);
+//        }
+
+        String qrcode = String.format(boilerQrCodeUrl,id);
 
         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
         byteArrayOutputStream.write(pdf);

+ 11 - 5
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorderitemreport/BoilerTaskOrderItemReportServiceImpl.java

@@ -761,6 +761,9 @@ public class BoilerTaskOrderItemReportServiceImpl extends ServiceImpl<BoilerTask
     @Value("${tz.env.name}")
     private String env;
 
+    @Value("${tz.qrCodeWebUrl.boiler}")
+    private String boilerQrCodeUrl;
+
     @Resource
     private EquipBoilerMapper equipBoilerMapper;
 
@@ -835,11 +838,14 @@ public class BoilerTaskOrderItemReportServiceImpl extends ServiceImpl<BoilerTask
         if (TaskOrderItemReportTypeEnum.MAIN_REPORT.getType().equals(taskOrderItemReportDO.getReportType())) {
             // 生成报告qrCode
             String orderItemId = taskOrderItemReportDO.getOrderItemId();
-            String type = "0";
-            String url = String.format("https://yudao-h5.hofo.co/mp/pagesSub/reportInfoList/index?id=%s&type=%s", orderItemId, type);
-            if (EnvEnum.UAT.getEnvName().equals(env)) {
-                url = String.format("https://tjt.gzsei.cn/mp/pagesSub/reportInfoList/index?id=%s&type=%s", orderItemId, type);
-            }
+//            String type = "0";
+//            String url = String.format("https://yudao-h5.hofo.co/mp/pagesSub/reportInfoList/index?id=%s&type=%s", orderItemId, type);
+//            if (EnvEnum.UAT.getEnvName().equals(env)) {
+//                url = String.format("https://tjt.gzsei.cn/mp/pagesSub/reportInfoList/index?id=%s&type=%s", orderItemId, type);
+//            }
+
+            String url = String.format(boilerQrCodeUrl,orderItemId);
+
             byte[] qrCodeBytes = QRCodeUtil.generateQRCodeToBytes(url);
             String file = fileApi.createFile(taskOrderItemReportDO.getOrderItemId() + ".png", null, qrCodeBytes);
             updateObj.setQrCodeUrl(file);

+ 9 - 4
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorderissuereport/PipeTaskOrderIssueReportServiceImpl.java

@@ -169,6 +169,9 @@ public class PipeTaskOrderIssueReportServiceImpl extends ServiceImpl<PipeTaskOrd
     @Value("${tz.minio.hostouter}")
     private String minioHostouter;
 
+    @Value("${tz.qrCodeWebUrl.pipe}")
+    private String pipeQrCodeUrl;
+
     @Resource
     private CommonThread commonThread;
 
@@ -925,10 +928,12 @@ public class PipeTaskOrderIssueReportServiceImpl extends ServiceImpl<PipeTaskOrd
 
         byte[] pdf = pdfService.pdf(dynamicTbDO.getId(), instanceId);
 
-        String qrcode = String.format("https://yudao-h5.hofo.co/mp/pagesSub/reportInfoList/index?id=%s&type=0",id);
-        if(env.equals("uat")){
-            qrcode = String.format("https://tjt.gzsei.cn/mp/pagesSub/reportInfoList/index?id=%s&type=0",id);
-        }
+//        String qrcode = String.format("https://yudao-h5.hofo.co/mp/pagesSub/reportInfoList/index?id=%s&type=0",id);
+//        if(env.equals("uat")){
+//            qrcode = String.format("https://tjt.gzsei.cn/mp/pagesSub/reportInfoList/index?id=%s&type=0",id);
+//        }
+
+        String qrcode = String.format(pipeQrCodeUrl,id);
 
         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
         byteArrayOutputStream.write(pdf);

+ 9 - 5
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorderitemreport/PipeTaskOrderItemReportServiceImpl.java

@@ -669,6 +669,9 @@ public class PipeTaskOrderItemReportServiceImpl extends ServiceImpl<PipeTaskOrde
     @Value("${tz.env.name}")
     private String env;
 
+    @Value("${tz.qrCodeWebUrl.pipe}")
+    private String pipeQrCodeUrl;
+
     @Resource
     private EquipPipeMapper equipPipeMapper;
 
@@ -734,11 +737,12 @@ public class PipeTaskOrderItemReportServiceImpl extends ServiceImpl<PipeTaskOrde
         if (TaskOrderItemReportTypeEnum.MAIN_REPORT.getType().equals(taskOrderItemReportDO.getReportType())) {
             // 生成报告qrCode
             String orderItemId = taskOrderItemReportDO.getOrderItemId();
-            String type = "0";
-            String url = String.format("https://yudao-h5.hofo.co/mp/pagesSub/reportInfoList/index?id=%s&type=%s", orderItemId, type);
-            if (EnvEnum.UAT.getEnvName().equals(env)) {
-                url = String.format("https://tjt.gzsei.cn/mp/pagesSub/reportInfoList/index?id=%s&type=%s", orderItemId, type);
-            }
+//            String type = "0";
+//            String url = String.format("https://yudao-h5.hofo.co/mp/pagesSub/reportInfoList/index?id=%s&type=%s", orderItemId, type);
+//            if (EnvEnum.UAT.getEnvName().equals(env)) {
+//                url = String.format("https://tjt.gzsei.cn/mp/pagesSub/reportInfoList/index?id=%s&type=%s", orderItemId, type);
+//            }
+            String url = String.format(pipeQrCodeUrl,id);
             byte[] qrCodeBytes = QRCodeUtil.generateQRCodeToBytes(url);
             String file = fileApi.createFile(taskOrderItemReportDO.getOrderItemId() + ".png", null, qrCodeBytes);
             updateObj.setQrCodeUrl(file);

+ 3 - 1
tz-module-pressure2/tz-module-pressure2-biz/src/main/resources/application-hsd.yaml

@@ -162,7 +162,9 @@ tz:
         key: 'bowin_jwt-secret'
         header: ''
         tokenValidityInMinutes: 120
-
+    qrCodeWebUrl:
+      pipe: 'http://192.168.0.53/pressure2/qr-report/pipe?id=%s'
+      boiler: 'http://192.168.0.53/pressure2/qr-report/boiler?id=%s'
 
 feign:
   client:

+ 4 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/resources/application-hst.yaml

@@ -147,6 +147,10 @@ tz:
         key: 'bowin_jwt-secret'
         header: ''
         tokenValidityInMinutes: 120
+  qrCodeWebUrl:
+    pipe: 'http://192.168.0.53/pressure2/qr-report/pipe?id=%s'
+    boiler: 'http://192.168.0.53/pressure2/qr-report/boiler?id=%s'
+
 feign:
   client:
     #direct-grape-service: http://127.0.0.1:48010  # 本地测试

+ 3 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/resources/application-uat.yaml

@@ -148,6 +148,9 @@ tz:
         key: 'bowin_jwt-secret'
         header: ''
         tokenValidityInMinutes: 120
+  qrCodeWebUrl:
+    pipe: 'http://192.168.19.165:40081/pressure2/qr-report/pipe?id=%s'
+    boiler: 'http://192.168.19.165:40081/pressure2/qr-report/boiler?id=%s'
 
 
 feign: