yawei待办详情
This commit is contained in:
parent
8763e4c6f6
commit
37dc9e7223
|
@ -559,20 +559,52 @@ public class ResourceController {
|
||||||
" <ZySPPort xmlns=\"http://tempuri.org/\">\n" +
|
" <ZySPPort xmlns=\"http://tempuri.org/\">\n" +
|
||||||
// " <userguid>e8d2fb43-f512-4918-ab47-1141b925af10</userguid>\n" +
|
// " <userguid>e8d2fb43-f512-4918-ab47-1141b925af10</userguid>\n" +
|
||||||
String.format(" <userguid>%s</userguid>", sysUser.getGuid()) +
|
String.format(" <userguid>%s</userguid>", sysUser.getGuid()) +
|
||||||
String.format("<pagenum>%d</pagenum>", page) +
|
String.format(" <pagenum>%d</pagenum>\n", page) +
|
||||||
String.format("<pagesize>%d</pagesize>", size) +
|
String.format(" <pagesize>%d</pagesize>\n", size) +
|
||||||
title != null ? String.format("<title>%s</title>", title) : "" +
|
String.format(" <title>%s</title>\n", title==null ? "" : title) +
|
||||||
" </ZySPPort>\n" +
|
" </ZySPPort>\n" +
|
||||||
" </soap:Body>\n" +
|
" </soap:Body>\n" +
|
||||||
"</soap:Envelope>";
|
"</soap:Envelope>";
|
||||||
HttpHeaders requestHeaders = new HttpHeaders();
|
HttpHeaders requestHeaders = new HttpHeaders();
|
||||||
requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort");
|
requestHeaders.set("SOAPAction", "http://tempuri.org/ZySPPort");
|
||||||
requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8")));
|
requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8")));
|
||||||
HttpEntity<String> requestEntity = new HttpEntity<>(parame, requestHeaders);
|
HttpEntity<String> requestEntity = new HttpEntity<>(parame, requestHeaders);
|
||||||
try {
|
try {
|
||||||
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
|
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
|
||||||
String startTag = "<ZWCJ_mainPortResult>";
|
String startTag = "<ZySPPortResult>";
|
||||||
String endTag = "</ZWCJ_mainPortResult>";
|
String endTag = "</ZySPPortResult>";
|
||||||
|
String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag));
|
||||||
|
HashMap result = JSON.parseObject(json, HashMap.class);
|
||||||
|
|
||||||
|
return new Result().ok(result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return new Result().ok(new ArrayList(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("ZywMessage/yaweiApproveDetails")
|
||||||
|
@ApiOperation("数据资源审批详情转发")
|
||||||
|
@LogOperation("数据资源审批详情转发")
|
||||||
|
public Result yaweiApproveDetails(@ApiParam("申请guid") String applyGuid, @ApiParam("部门guid") String deptGuid) {
|
||||||
|
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx?op=ZyShowrecord";
|
||||||
|
String parame = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
|
||||||
|
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
|
||||||
|
" <soap:Body>\n" +
|
||||||
|
" <ZyShowrecord xmlns=\"http://tempuri.org/\">\n" +
|
||||||
|
String.format(" <guid>%s</guid>\n", applyGuid) +
|
||||||
|
String.format(" <bmguid>%s</bmguid>\n", deptGuid) +
|
||||||
|
" </ZyShowrecord>\n" +
|
||||||
|
" </soap:Body>\n" +
|
||||||
|
"</soap:Envelope>";
|
||||||
|
HttpHeaders requestHeaders = new HttpHeaders();
|
||||||
|
requestHeaders.set("SOAPAction", "http://tempuri.org/ZyShowrecord");
|
||||||
|
requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8")));
|
||||||
|
HttpEntity<String> requestEntity = new HttpEntity<>(parame, requestHeaders);
|
||||||
|
try {
|
||||||
|
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
|
||||||
|
String startTag = "<ZyShowrecordResult>";
|
||||||
|
String endTag = "</ZyShowrecordResult>";
|
||||||
String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag));
|
String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag));
|
||||||
HashMap result = JSON.parseObject(json, HashMap.class);
|
HashMap result = JSON.parseObject(json, HashMap.class);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue