Compare commits

..

No commits in common. "51aaaf2ae4dfb643f529b56ad2d1d61746d403aa" and "8a8ea7cb272190c4e2db11138cff421f3f25b8d9" have entirely different histories.

View File

@ -9,8 +9,6 @@ import java.math.BigDecimal;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -18,7 +16,6 @@ import java.util.stream.Collectors;
import com.interplug.qcast.biz.canvaspopupstatus.CanvasPopupStatusService;
import com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus;
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
@ -29,7 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Service;
import org.springframework.web.util.HtmlUtils;
import org.springframework.web.util.UriComponentsBuilder;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.interplug.qcast.biz.canvasStatus.CanvasStatusService;
@ -1425,7 +1421,16 @@ public class EstimateService {
// 각도 매핑 함수 호출
String mappedDegree = excelUtil.mapCompassDegree(degreeValue);
// 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);
// }
try {
// classpath에서 리소스 파일을 읽어옵니다
@ -1464,31 +1469,6 @@ public class EstimateService {
for (ItemResponse itemResponse : estimateItemList) {
itemResponse.setNo(String.valueOf(j++));
// itemName 디코딩 HTML Unescape 처리
String itemName = itemResponse.getItemName();
if (StringUtils.isNotEmpty(itemName)) {
try {
// 1. URL 디코딩 (% 처리)
if (itemName.contains("%")) {
itemName = URLDecoder.decode(itemName, StandardCharsets.UTF_8);
}
// 2. HTML Unescape 처리 (& 포함된 경우만)
// Φ1 -> Φ1 -> Φ1 순차적으로 복원
if (itemName.contains("&")) {
String prevName;
do {
prevName = itemName;
itemName = HtmlUtils.htmlUnescape(itemName);
} while (!prevName.equals(itemName) && itemName.contains("&"));
}
itemResponse.setItemName(itemName);
} catch (Exception e) {
log.warn("Excel itemName processing failed: {}", itemName);
}
}
// 문자열 통화로 변환 처리
itemResponse.setSalePrice(
String.format("%1$,.0f", Double.parseDouble(itemResponse.getSalePrice())));