|
|
@ -472,14 +472,13 @@ public class IntegrationSearchServiceBean extends AbstractServiceBean implements
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
InputStream is = null;
|
|
|
|
if(!imagePath.startsWith("files")) {
|
|
|
|
if(imagePath.startsWith("files")) {
|
|
|
|
imagePath = CmmnUtil.copyStaticResource(imagePath);
|
|
|
|
File imageFile = new File(imagePath);
|
|
|
|
|
|
|
|
is = new FileInputStream(imageFile);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
is = new ClassPathResource(imagePath).getInputStream();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
File imageFile = new File(imagePath);
|
|
|
|
|
|
|
|
InputStream is = new FileInputStream(imageFile);
|
|
|
|
|
|
|
|
|
|
|
|
String imageKey = "";
|
|
|
|
String imageKey = "";
|
|
|
|
if(otptArtclNm.equals("rprsCrdnPhoto")) {
|
|
|
|
if(otptArtclNm.equals("rprsCrdnPhoto")) {
|
|
|
|
imageKey = pdfFormat.getMappingValue(otptArtclNm+"Key",defaultValue,forPost,dataObject,printOption,pdfPrintUtil);
|
|
|
|
imageKey = pdfFormat.getMappingValue(otptArtclNm+"Key",defaultValue,forPost,dataObject,printOption,pdfPrintUtil);
|
|
|
@ -488,13 +487,8 @@ public class IntegrationSearchServiceBean extends AbstractServiceBean implements
|
|
|
|
|
|
|
|
|
|
|
|
if(otptArtclNm.equals("rprsCrdnPhoto") && !imageKey.equals("")) {
|
|
|
|
if(otptArtclNm.equals("rprsCrdnPhoto") && !imageKey.equals("")) {
|
|
|
|
|
|
|
|
|
|
|
|
InputStream is0 = null;
|
|
|
|
File imageFile0 = new File(imagePath);
|
|
|
|
if(imagePath.startsWith("files")) {
|
|
|
|
InputStream is0 = new FileInputStream(imageFile0);
|
|
|
|
File imageFile0 = new File(imagePath);
|
|
|
|
|
|
|
|
is0 = new FileInputStream(imageFile0);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
is0 = new ClassPathResource(imagePath).getInputStream();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<PstnAndSize> transformedMosaicInfos = mediaBean.getTransformedMosaic(
|
|
|
|
List<PstnAndSize> transformedMosaicInfos = mediaBean.getTransformedMosaic(
|
|
|
|
imageKey, is0, new PstnAndSize(pstn[0],pstn[1], size[0], size[1])
|
|
|
|
imageKey, is0, new PstnAndSize(pstn[0],pstn[1], size[0], size[1])
|
|
|
@ -537,34 +531,30 @@ public class IntegrationSearchServiceBean extends AbstractServiceBean implements
|
|
|
|
|
|
|
|
|
|
|
|
for (int i=0; i< devideInfos.size(); i++){
|
|
|
|
for (int i=0; i< devideInfos.size(); i++){
|
|
|
|
PstnAndSize devideInfo = devideInfos.get(i);
|
|
|
|
PstnAndSize devideInfo = devideInfos.get(i);
|
|
|
|
String imagePath = imagePaths.get(i);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ifEmpty(imagePath, ()-> "").equals("")) {
|
|
|
|
if(ifEmpty(imagePaths.get(i), ()-> "").equals("")) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
InputStream is = null;
|
|
|
|
if(!imagePaths.get(i).startsWith("files")) {
|
|
|
|
if(imagePaths.get(i).startsWith("files")) {
|
|
|
|
imagePaths.set(i, CmmnUtil.copyStaticResource(imagePaths.get(i)));
|
|
|
|
File imageFile = new File(imagePath);
|
|
|
|
|
|
|
|
is = new FileInputStream(imageFile);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
is = new ClassPathResource(imagePath).getInputStream();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String imagePath = imagePaths.get(i);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
File imageFile = new File(imagePath);
|
|
|
|
|
|
|
|
InputStream is = new FileInputStream(imageFile);
|
|
|
|
|
|
|
|
|
|
|
|
pdfPrintUtil.insertImage(doc, contentStream, is,
|
|
|
|
pdfPrintUtil.insertImage(doc, contentStream, is,
|
|
|
|
devideInfo.getPstn().to2Float(), devideInfo.getSize().to2Float());
|
|
|
|
devideInfo.getPstn().to2Float(), devideInfo.getSize().to2Float());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(otptArtclNm.equals("crdnPhoto") && !imageKeys.isEmpty()) {
|
|
|
|
if(otptArtclNm.equals("crdnPhoto") && !imageKeys.isEmpty()) {
|
|
|
|
|
|
|
|
|
|
|
|
InputStream is0 = null;
|
|
|
|
|
|
|
|
String imagePath0 = imagePaths.get(i);
|
|
|
|
String imagePath0 = imagePaths.get(i);
|
|
|
|
if(imagePath0.startsWith("files")) {
|
|
|
|
|
|
|
|
File imageFile0 = new File(imagePath0);
|
|
|
|
File imageFile0 = new File(imagePath0);
|
|
|
|
is0 = new FileInputStream(imageFile0);
|
|
|
|
InputStream is0 = new FileInputStream(imageFile0);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
is0 = new ClassPathResource(imagePath0).getInputStream();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<PstnAndSize> transformedMosaicInfos = mediaBean.getTransformedMosaic(
|
|
|
|
List<PstnAndSize> transformedMosaicInfos = mediaBean.getTransformedMosaic(
|
|
|
|
imageKeys.get(i), is0, devideInfo
|
|
|
|
imageKeys.get(i), is0, devideInfo
|
|
|
@ -670,17 +660,15 @@ public class IntegrationSearchServiceBean extends AbstractServiceBean implements
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
InputStream orgnFileInputStream = null;
|
|
|
|
if(!orgnFilePath.startsWith("files")) {
|
|
|
|
|
|
|
|
orgnFilePath = CmmnUtil.copyStaticResource(orgnFilePath);;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(orgnFilePath.startsWith("files")) {
|
|
|
|
File orgnFile = new File(orgnFilePath);
|
|
|
|
File orgnFile = new File(orgnFilePath);
|
|
|
|
if(!orgnFile.exists() || !orgnFile.canRead()) {
|
|
|
|
if(!orgnFile.exists() || !orgnFile.canRead()) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
orgnFileInputStream = new FileInputStream(orgnFile);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
orgnFileInputStream = new ClassPathResource(orgnFilePath).getInputStream();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
InputStream orgnFileInputStream = new FileInputStream(orgnFile);
|
|
|
|
|
|
|
|
|
|
|
|
String modifiedFileName = "P"+fileInfo.string("INF_KEY")+CmmnUtil.indexToAlphabet(j, true, true)+"."+"JPG";
|
|
|
|
String modifiedFileName = "P"+fileInfo.string("INF_KEY")+CmmnUtil.indexToAlphabet(j, true, true)+"."+"JPG";
|
|
|
|
|
|
|
|
|
|
|
|