Compare commits
No commits in common. "8eaf7598a9f5bd416af5890539d58936eb65f329" and "c009ca2b14aa2da05655ed8948fc2d789b92369d" have entirely different histories.
8eaf7598a9
...
c009ca2b14
@ -4,7 +4,6 @@ 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;
|
||||
@ -78,8 +77,7 @@ public class EstimateSyncConfiguration implements JobExecutionListener {
|
||||
@Bean
|
||||
public ItemWriter<PlanSyncResponse> estimateSyncWriter() {
|
||||
return items -> {
|
||||
List<PlanSyncResponse> planList = new ArrayList<>(items.getItems());
|
||||
estimateService.setEstimateSyncSave(planList);
|
||||
estimateService.setEstimateSyncSave((List<PlanSyncResponse>) items.getItems());
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ 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;
|
||||
@ -31,6 +32,7 @@ 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;
|
||||
@ -1443,7 +1445,7 @@ public class EstimateService {
|
||||
InputStream imageInputStream = getClass().getResourceAsStream(imagePath);
|
||||
|
||||
if (imageInputStream != null) {
|
||||
byte[] degImg = imageInputStream.readAllBytes();
|
||||
byte[] degImg = Util.toByteArray(imageInputStream);
|
||||
roofInfoResponse.setCompasDegImg(degImg);
|
||||
imageInputStream.close();
|
||||
} else {
|
||||
@ -2990,7 +2992,7 @@ public class EstimateService {
|
||||
}
|
||||
}
|
||||
try (InputStream imageInputStream = connection.getInputStream()) {
|
||||
return imageInputStream.readAllBytes();
|
||||
return Util.toByteArray(imageInputStream);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to load drawing image. url={}", url, e);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user