Compare commits
No commits in common. "31ec55e2f0874498b388c54779c6459e2c4b43fb" and "ebd490bc21853d7784ba524b7c27593cf7380d05" have entirely different histories.
31ec55e2f0
...
ebd490bc21
@ -1427,31 +1427,15 @@ 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);
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |