feature/jp-0331 #526

Open
jungpyo2001 wants to merge 998 commits from feature/jp-0331 into main
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 73da60a017 - Show all commits

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.PlanSyncResponse;
import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.springframework.batch.core.Job;
@ -77,7 +78,8 @@ public class EstimateSyncConfiguration implements JobExecutionListener {
@Bean
public ItemWriter<PlanSyncResponse> estimateSyncWriter() {
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.estimate.dto.*;
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.Cell;
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.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jxls.util.Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
@ -1445,7 +1443,7 @@ public class EstimateService {
InputStream imageInputStream = getClass().getResourceAsStream(imagePath);
if (imageInputStream != null) {
byte[] degImg = Util.toByteArray(imageInputStream);
byte[] degImg = imageInputStream.readAllBytes();
roofInfoResponse.setCompasDegImg(degImg);
imageInputStream.close();
} else {
@ -2992,7 +2990,7 @@ public class EstimateService {
}
}
try (InputStream imageInputStream = connection.getInputStream()) {
return Util.toByteArray(imageInputStream);
return imageInputStream.readAllBytes();
}
} catch (Exception e) {
log.warn("Failed to load drawing image. url={}", url, e);