解决梅州标签问题

master
lzy 3 years ago
parent b335b041a3
commit 8853e83e8b

@ -1,56 +1,58 @@
{
//-----------------------
//,
"ResHead":"Response,RetInfo",
"ResHead":"Response,Result",
//
"ResCode":"RetCode",
"ResCode":"Code",
//
"ResMsg":"RetCon",
"ResMsg":"Msg",
//
"successCode":"0",
"successCode":"1",
//
"errorCode":"1",
"errorCode":"0",
//,
"directory":["Msg"],
"directory":[],
//
"indexFlag":"PatInfo,INHOSP_NO",
"indexFlag":"VISITING_SERIAL_NUMBER",
//
"serialnum":"ReportInfo,UPDATE_REPORT_NO",
"serialnum":"UNIQUE_ID",
//
"filetitle":"ExamInfo,EXAM_SUBCLASS",
"filetitle":"DOCUMENT_TITLE",
//,&
"downurl":"ReportInfo,REPORT_URL",
"downurl":"BASE64&ORIGINAL_URL",
//id
"assortid":"63E20FC9AAB74C5FB6446083EBA5607D",
"assortid":"",
//id
"collectorid":"12",
"collectorid":"2",
//id
"assortidParamKey":"DOCUMENT_TOPIC",
//( 1:2)
"filesource":1,
//(1:2ftp3)
"filestoragetype":1,
//
"uploadConnector":"http://192.9.100.171:9291/api/downplatform/report",
"uploadConnector":"http://127.0.0.1:9291/api/downplatform/report",
//doubleBasic
"basicDirectory":["Msg","ReportInfo"],
"basicDirectory":[""],
//
"doubleBasic":["TestItemInfo","BioTestInfo"],
//--------------/---------------
/// 01
"isJudge":"1",
"isJudge":"0",
//
"judgeDirectory":["Msg","ReportInfo"],
"judgeDirectory":[""],
//,0-1-2-
"judgeIndex":"REPORT_STATUS_FLAG",
"judgeIndex":"",
//--------------------
//,
"repealDirectory":["Msg","ReportInfo"],
"repealDirectory":["DOCUMENT"],
//
"repealSerialnum":"REPORT_STATUS_FLAG",
"repealSerialnum":"UNIQUE_ID",
//
"repoalConnector":"http://192.9.100.171:9291/api/down/cancel"
"repoalConnector":"http://127.0.0.1:9291/api/down/cancel"
}

@ -12,7 +12,7 @@
"errorCode":"0",
//,
"directory":[""],
"directory":[],
//
"indexFlag":"VISITING_SERIAL_NUMBER",
//

@ -190,6 +190,19 @@ public class TBasicWebService implements ITBasicWebService {
*/
private String handleDownUrl(String downurl) {
String url = "";
try {
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(downurl.getBytes("UTF-8")));
if (null != xmlUtils) {
url=downurl;
url = downurl.replaceAll("<REST>", "");
url = url.replaceAll("</REST>", "");
url = url.replaceAll("<SQW>", "");
url = url.replaceAll("</SQW>", "");
}
} catch (Exception e) {
}
int pdfIndex = -1;
int httpIndex = downurl.indexOf("http");
if (httpIndex == -1) {
@ -261,7 +274,12 @@ public class TBasicWebService implements ITBasicWebService {
* @return
*/
private CanlcelDto getCanlCelDtoByXml(String xml) throws UnsupportedEncodingException {
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(xml.getBytes("UTF-8")));
XmlUtils xmlUtils = null;
try {
xmlUtils = new XmlUtils(new ByteArrayInputStream(xml.getBytes("UTF-8")));
} catch (Exception e) {
e.printStackTrace();
}
//采集流水号所在位置目录
List<String> repealDirectory = (List<String>) FileUtils.getJsonByName("repealDirectory");
Element element = xmlUtils.getElement(repealDirectory);

@ -12,12 +12,16 @@ import com.docus.bgts.mapper.AfInterfaceCollectMapper;
import com.docus.bgts.mapper.AfInterfaceCollectSubMapper;
import com.docus.bgts.utils.FileUtils;
import com.docus.bgts.utils.HttpUtils;
import com.docus.bgts.utils.XmlUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@ -133,7 +137,7 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
//上传接口地址
Map<String, Object> headMap = new HashMap<>();
headMap.put("Content-Type", "application/json");
log.info("开始文件撤回操作:"+canlcelDto);
log.info("开始文件撤回操作:" + canlcelDto);
String post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.REPOAL.getMessage())), headMap, JSON.parseObject(JSON.toJSONString(canlcelDto), Map.class));
Map resMap = JSON.parseObject(post, Map.class);
if (String.valueOf(resMap.get("code")).equals("500")) {

@ -19,6 +19,10 @@ public class XmlUtils {
private SAXReader saxReader;
private Document document;
public Document getDocument() {
return document;
}
public XmlUtils(String path) {
//获取解析器
saxReader = new SAXReader();
@ -31,16 +35,12 @@ public class XmlUtils {
}
}
public XmlUtils(InputStream path) {
public XmlUtils(InputStream path) throws Exception{
//获取解析器
saxReader = new SAXReader();
try {
//获取文档对象
document = saxReader.read(path);
} catch (DocumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**

@ -1,5 +1,5 @@
server:
port: 9403
port: 9701
# http
mybatis-plus:
@ -15,8 +15,8 @@ beat:
url: http://localhost:9399/beat
system:
code: "204_P_WS_BLBGTS"
prop: 9203
code: "EmrDocAr"
prop: 9801
# web service

Loading…
Cancel
Save