Merge pull request '[1219] 견적서 엑셀에 방위각도 추가 - 이미지 경로 변경' (#214) from dev into dev-deploy

Reviewed-on: #214
This commit is contained in:
ysCha 2025-08-01 13:22:54 +09:00
commit 31ec55e2f0
25 changed files with 24 additions and 8 deletions

View File

@ -1427,15 +1427,31 @@ public class EstimateService {
// 각도 매핑 함수 호출 // 각도 매핑 함수 호출
String mappedDegree = excelUtil.mapCompassDegree(degreeValue); 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); // URL url = new URL(compasDegImgUrl);
URLConnection con = url.openConnection(); // URLConnection con = url.openConnection();
HttpURLConnection exitCode = (HttpURLConnection)con; // HttpURLConnection exitCode = (HttpURLConnection)con;
if (exitCode.getResponseCode() == 200) { // if (exitCode.getResponseCode() == 200) {
InputStream imageInputStream = new URL(compasDegImgUrl).openStream(); // InputStream imageInputStream = new URL(compasDegImgUrl).openStream();
byte[] degImg = Util.toByteArray(imageInputStream); // byte[] degImg = Util.toByteArray(imageInputStream);
roofInfoResponse.setCompasDegImg(degImg); // 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); 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