|
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
@ -1865,32 +1866,29 @@ public class Sndb01Controller extends ApplicationController {
|
|
|
|
|
DataObject sample = new Advntce().createSampleData();
|
|
|
|
|
dataObjectList.add(sample);
|
|
|
|
|
} else {
|
|
|
|
|
SprtQuery sprtQuery = new SprtQuery().setCrdnIds(crdnIds);
|
|
|
|
|
dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < dataObjectList.size(); i++) {
|
|
|
|
|
DataObject dataObject = dataObjectList.get(i);
|
|
|
|
|
String crdnId = dataObject.string("CRDN_ID");
|
|
|
|
|
|
|
|
|
|
FileQuery fileQuery = new FileQuery();
|
|
|
|
|
fileQuery.setInfoType(Crdn.INF_TYPE);
|
|
|
|
|
fileQuery.setInfoKeys(crdnId);
|
|
|
|
|
|
|
|
|
|
List<DataObject> fileInfoList = fileBean.getFileList(fileQuery);
|
|
|
|
|
if (!isEmpty(fileInfoList)) {
|
|
|
|
|
for (int j = 0; j < fileInfoList.size(); j++) {
|
|
|
|
|
DataObject fileInfo = fileInfoList.get(j);
|
|
|
|
|
dataObject.set("CRDN_PHOTO"+(j+1), fileInfo.string("URL"));
|
|
|
|
|
String fileID = fileInfo.string("FILE_ID");
|
|
|
|
|
dataObject.set("CRDN_PHOTO"+(j+1)+"KEY", fileID);
|
|
|
|
|
|
|
|
|
|
List<DataObject> mosSet = mediaBean.getMosaicList(fileID);
|
|
|
|
|
if (mosSet != null && !mosSet.isEmpty()) {
|
|
|
|
|
dataObject.set("MOS"+fileID, mosSet);
|
|
|
|
|
}
|
|
|
|
|
dataObjectList = integrationSearchMapper.selectIntegrationDataList(new SprtQuery().setCrdnIds(crdnIds));
|
|
|
|
|
Map<String, List<DataObject>> fileList = fileBean.getFileList(
|
|
|
|
|
new FileQuery().setInfoType(Crdn.INF_TYPE).setInfoKeys(crdnIds)
|
|
|
|
|
).stream()
|
|
|
|
|
.collect(Collectors.groupingBy(row -> row.string("INF_ID")));
|
|
|
|
|
|
|
|
|
|
dataObjectList.forEach(row -> {
|
|
|
|
|
String crdnId = row.string("CRDN_ID");
|
|
|
|
|
List<DataObject> files = fileList.get(crdnId);
|
|
|
|
|
if (isEmpty(files)) return;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < files.size(); ++i) {
|
|
|
|
|
DataObject fileInfo = files.get(i);
|
|
|
|
|
row.set("CRDN_PHOTO"+(i+1), fileInfo.string("URL"));
|
|
|
|
|
String fileID = fileInfo.string("FILE_ID");
|
|
|
|
|
row.set("CRDN_PHOTO"+(i+1)+"KEY", fileID);
|
|
|
|
|
|
|
|
|
|
List<DataObject> mosSet = mediaBean.getMosaicList(fileID);
|
|
|
|
|
if (mosSet != null && !mosSet.isEmpty()) {
|
|
|
|
|
row.set("MOS"+fileID, mosSet);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Print print = new Print();
|
|
|
|
|
|