[1219] 견적서 엑셀에 방위각도 추가 - 이미지 경로 변경

This commit is contained in:
ysCha 2025-08-01 13:21:56 +09:00
parent 48eeb8114a
commit a2e9d2833e
25 changed files with 24 additions and 8 deletions

View File

@ -1427,15 +1427,31 @@ public class EstimateService {
// 각도 매핑 함수 호출
String mappedDegree = excelUtil.mapCompassDegree(degreeValue);
String compasDegImgUrl = frontUrl + "/static/images/canvas/deg/" + mappedDegree + ".png";
// String compasDegImgUrl = frontUrl + "/static/images/canvas/deg/" + mappedDegree + ".png";
URL url = new URL(compasDegImgUrl);
URLConnection con = url.openConnection();
HttpURLConnection exitCode = (HttpURLConnection)con;
if (exitCode.getResponseCode() == 200) {
InputStream imageInputStream = new URL(compasDegImgUrl).openStream();
byte[] degImg = Util.toByteArray(imageInputStream);
roofInfoResponse.setCompasDegImg(degImg);
// URL url = new URL(compasDegImgUrl);
// URLConnection con = url.openConnection();
// HttpURLConnection exitCode = (HttpURLConnection)con;
// if (exitCode.getResponseCode() == 200) {
// InputStream imageInputStream = new URL(compasDegImgUrl).openStream();
// byte[] degImg = Util.toByteArray(imageInputStream);
// roofInfoResponse.setCompasDegImg(degImg);
// }
try {
// classpath에서 리소스 파일을 읽어옵니다
String imagePath = "/img/compass/" + mappedDegree + ".png";
InputStream imageInputStream = getClass().getResourceAsStream(imagePath);
if (imageInputStream != null) {
byte[] degImg = Util.toByteArray(imageInputStream);
roofInfoResponse.setCompasDegImg(degImg);
imageInputStream.close();
} else {
log.warn("Compass image not found: {}", imagePath);
}
} catch (IOException e) {
log.error("Error reading compass image: {}", e.getMessage(), e);
}
roofInfoResponse.setCompasDeg(compasDeg);

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB