java 버전 맞춤 #451

Merged
ysCha merged 1 commits from dev into dev-deploy 2026-04-01 13:31:43 +09:00
2 changed files with 5 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import com.interplug.qcast.biz.estimate.EstimateService;
import com.interplug.qcast.biz.estimate.dto.EstimateSyncResponse; import com.interplug.qcast.biz.estimate.dto.EstimateSyncResponse;
import com.interplug.qcast.biz.estimate.dto.PlanSyncResponse; import com.interplug.qcast.biz.estimate.dto.PlanSyncResponse;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.springframework.batch.core.Job; import org.springframework.batch.core.Job;
@ -77,7 +78,8 @@ public class EstimateSyncConfiguration implements JobExecutionListener {
@Bean @Bean
public ItemWriter<PlanSyncResponse> estimateSyncWriter() { public ItemWriter<PlanSyncResponse> estimateSyncWriter() {
return items -> { return items -> {
estimateService.setEstimateSyncSave((List<PlanSyncResponse>) items.getItems()); List<PlanSyncResponse> planList = new ArrayList<>(items.getItems());
estimateService.setEstimateSyncSave(planList);
}; };
} }
} }

View File

@ -20,7 +20,6 @@ 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.estimate.dto.*; import com.interplug.qcast.biz.estimate.dto.*;
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.Cell; import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.CellStyle;
@ -32,7 +31,6 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory; import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jxls.util.Util;
import org.springframework.beans.factory.annotation.Autowired; 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;
@ -1445,7 +1443,7 @@ public class EstimateService {
InputStream imageInputStream = getClass().getResourceAsStream(imagePath); InputStream imageInputStream = getClass().getResourceAsStream(imagePath);
if (imageInputStream != null) { if (imageInputStream != null) {
byte[] degImg = Util.toByteArray(imageInputStream); byte[] degImg = imageInputStream.readAllBytes();
roofInfoResponse.setCompasDegImg(degImg); roofInfoResponse.setCompasDegImg(degImg);
imageInputStream.close(); imageInputStream.close();
} else { } else {
@ -2992,7 +2990,7 @@ public class EstimateService {
} }
} }
try (InputStream imageInputStream = connection.getInputStream()) { try (InputStream imageInputStream = connection.getInputStream()) {
return Util.toByteArray(imageInputStream); return imageInputStream.readAllBytes();
} }
} catch (Exception e) { } catch (Exception e) {
log.warn("Failed to load drawing image. url={}", url, e); log.warn("Failed to load drawing image. url={}", url, e);