From 379f5730ad581421bd470fb21f323b8d4bf6a830 Mon Sep 17 00:00:00 2001
From: 邱宇豪 <qyh123230312>
Date: 星期一, 06 十一月 2023 15:53:30 +0800
Subject: [PATCH] 20231106_qiuyh_修改扫描地址
---
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/controller/TSteelPrintController.java | 47 ++++++++++++++++++++---------------------------
1 files changed, 20 insertions(+), 27 deletions(-)
diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/controller/TSteelPrintController.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/controller/TSteelPrintController.java
index 0b2db2a..863ee11 100644
--- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/controller/TSteelPrintController.java
+++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/controller/TSteelPrintController.java
@@ -8,6 +8,7 @@
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.thhy.general.common.BasicResult;
import com.thhy.materials.modules.biz.rebarprint.service.TSteelPrintService;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -26,6 +27,21 @@
@Resource
private TSteelPrintService steelPrintService;
+
+ @Value("${pipePrint.baseUrl}")
+ private String baseUrl;
+
+ @Value("${pipePrint.deviceInfoUrl}")
+ private String deviceInfoUrl;
+
+ @Value("${pipePrint.pipeHistoryInfoUrl}")
+ private String pipeHistoryInfoUrl;
+
+ @Value("${pipePrint.modelUrl}")
+ private String modelUrl;
+
+ @Value("${pipePrint.steelInfoUrl}")
+ private String steelInfoUrl;
//钢筋笼打印添加
@PostMapping("/steelPrintInsert")
@@ -62,39 +78,16 @@
String content = num;
if (type != null){
if(type == 1){
- // content = "http://111.30.93.212:8089/pipe/#/scanDetail?num="+num;
- content = "https://pipe.thhy-tj.com/pipe/#/scanDetail?bigDeviceId="+bigDeviceId;
- //content = "http://192.168.0.99:8080/#/scanDetail?num="+num;
+ content = baseUrl + deviceInfoUrl + bigDeviceId;
}else if (type == 2){
- //content = "http://111.30.93.212:8089/pipe/#/ScanBear?num="+num;
- content = "https://pipe.thhy-tj.com/pipe/#/ScanBear?num="+num;
- //content = "http://192.168.0.99:8080/#/ScanBear?num="+num;
+ content = baseUrl + pipeHistoryInfoUrl + num;
}else if(type == 3){
- //content = "http://111.30.93.212:8089/pipe/#/massInfo?mouldId="+mouldId;
- content = "https://pipe.thhy-tj.com/pipe/#/massInfo?mouldId="+mouldId;
- //content = "http://192.168.0.99:8080/#/massInfo?mouldId="+mouldId;
+ content = baseUrl + modelUrl + mouldId;
}else if(type == 4){
- //content = "http://111.30.93.212:8089/pipe/#/reinInfo?num="+num;
- content = "https://pipe.thhy-tj.com/pipe/#/reinInfo?num="+num;
- //content = "http://192.168.0.99:8080/#/reinInfo?num="+num;
+ content = baseUrl + steelInfoUrl + num;
}
}
System.out.println("steelProduceId=============="+steelProduceId);
-// Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>();
-// // 指定编码格式
-// hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");
-// // 指定纠错级别(L--7%,M--15%,Q--25%,H--30%)
-// hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
-// // 编码内容,编码类型(这里指定为二维码),生成图片宽度,生成图片高度,设置参数
-// BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, 200, 200, hints);
-// //设置请求头
-// response.setHeader("Content-Type","application/octet-stream");
-// response.setHeader("Content-Disposition", "attachment;filename=" + "编码.png");
-// OutputStream outputStream = response.getOutputStream();
-// MatrixToImageWriter.writeToStream(bitMatrix, "png", outputStream);
-// outputStream.flush();
-// outputStream.close();
-
BufferedImage bufferedImage = ImageUtils.createQr(content);
OutputStream outputStream = null;
--
Gitblit v1.9.3