|
|
|
@ -114,6 +114,7 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
filetitle = getElementText(element, filetitleKey.split(","));
|
|
|
|
|
// downurl = element.element(downurlKey).getText();
|
|
|
|
|
downurl = getElementText(element, downurlKey.split(","));
|
|
|
|
|
downurl = handleDownUrl(downurl);
|
|
|
|
|
reportDownScanFileDto = new ReportDownScanFileDto();
|
|
|
|
|
reportDownScanFileDto.setDownurl(downurl);
|
|
|
|
|
reportDownScanFileDto.setFiletitle(filetitle);
|
|
|
|
@ -160,6 +161,48 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 特殊处理字符
|
|
|
|
|
*
|
|
|
|
|
* @param downurl
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private String handleDownUrl(String downurl) {
|
|
|
|
|
String url = "";
|
|
|
|
|
int pdfIndex = -1;
|
|
|
|
|
int httpIndex = downurl.indexOf("http");
|
|
|
|
|
if (httpIndex == -1) {
|
|
|
|
|
return downurl;
|
|
|
|
|
}
|
|
|
|
|
if (downurl.indexOf(".pdf") == -1) {
|
|
|
|
|
if (downurl.indexOf(".PDF") == -1) {
|
|
|
|
|
if (downurl.indexOf(".jpg") == -1) {
|
|
|
|
|
if (downurl.indexOf(".JPG") == -1) {
|
|
|
|
|
if (downurl.indexOf(".png") == -1) {
|
|
|
|
|
if (downurl.indexOf(".PNG") == -1) {
|
|
|
|
|
return downurl;
|
|
|
|
|
} else {
|
|
|
|
|
pdfIndex = downurl.indexOf(".PNG") + 4;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
pdfIndex = downurl.indexOf(".png") + 4;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
pdfIndex = downurl.indexOf(".JPG") + 4;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
pdfIndex = downurl.indexOf(".jpg") + 4;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
pdfIndex = downurl.indexOf(".PDF") + 4;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
pdfIndex = downurl.indexOf(".pdf") + 4;
|
|
|
|
|
}
|
|
|
|
|
url = downurl.substring(httpIndex, pdfIndex);
|
|
|
|
|
return url;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String EmrDocumentArchive(String xml) {
|
|
|
|
|
return pushSurveyReport(xml);
|
|
|
|
@ -232,7 +275,7 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
if (split.length > 1) {
|
|
|
|
|
for (String spi : split) {
|
|
|
|
|
byElement1 = byElement.element(spi);
|
|
|
|
|
if (byElement1 != null) {
|
|
|
|
|
if (byElement1 != null && StringUtils.isNotBlank(byElement1.getText())) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|