Compare commits
No commits in common. "319452ab3c43d56ab5d78265b7e761a5d552af94" and "108e807586934a6d50d943c91d5ffbb7118caab5" have entirely different histories.
319452ab3c
...
108e807586
@ -9,8 +9,6 @@ import java.math.BigDecimal;
|
|||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.net.URLDecoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
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.CanvasPopupStatusService;
|
||||||
import com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus;
|
import com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus;
|
||||||
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse;
|
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse;
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
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.beans.factory.annotation.Value;
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.util.HtmlUtils;
|
|
||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.interplug.qcast.biz.canvasStatus.CanvasStatusService;
|
import com.interplug.qcast.biz.canvasStatus.CanvasStatusService;
|
||||||
@ -1425,7 +1421,16 @@ public class EstimateService {
|
|||||||
|
|
||||||
// 각도 매핑 함수 호출
|
// 각도 매핑 함수 호출
|
||||||
String mappedDegree = excelUtil.mapCompassDegree(degreeValue);
|
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 {
|
try {
|
||||||
// classpath에서 리소스 파일을 읽어옵니다
|
// classpath에서 리소스 파일을 읽어옵니다
|
||||||
@ -1464,31 +1469,6 @@ public class EstimateService {
|
|||||||
for (ItemResponse itemResponse : estimateItemList) {
|
for (ItemResponse itemResponse : estimateItemList) {
|
||||||
itemResponse.setNo(String.valueOf(j++));
|
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(
|
itemResponse.setSalePrice(
|
||||||
String.format("%1$,.0f", Double.parseDouble(itemResponse.getSalePrice())));
|
String.format("%1$,.0f", Double.parseDouble(itemResponse.getSalePrice())));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user