亚威待办列表
This commit is contained in:
parent
cb353085b5
commit
56a0dab87f
|
@ -439,6 +439,46 @@ public class ResourceController {
|
|||
}
|
||||
}
|
||||
|
||||
@GetMapping("ZywMessage/yaweiApproveStatus")
|
||||
@ApiOperation("资源列表转发")
|
||||
@LogOperation("资源列表转发")
|
||||
public Result yaweiApproveStatus(@ApiParam("页数") Integer page,
|
||||
@ApiParam("页大小") Integer size,
|
||||
@ApiParam("资源模糊搜索") String title) {
|
||||
|
||||
if (page == null) page = 1;
|
||||
if (size == null) size = 10;
|
||||
|
||||
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx";
|
||||
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" +
|
||||
" <ZySPPort xmlns=\"http://tempuri.org/\">\n" +
|
||||
" <userguid>e8d2fb43-f512-4918-ab47-1141b925af10</userguid>\n" +
|
||||
" <pagenum>1</pagenum>\n" +
|
||||
" <pagesize>10</pagesize>\n" +
|
||||
" <title></title>\n" +
|
||||
" </ZySPPort>\n" +
|
||||
" </soap:Body>\n" +
|
||||
"</soap:Envelope>";
|
||||
HttpHeaders requestHeaders = new HttpHeaders();
|
||||
requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort");
|
||||
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 = "<ZWCJ_mainPortResult>";
|
||||
String endTag = "</ZWCJ_mainPortResult>";
|
||||
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("qdyjjWeather")
|
||||
@ApiOperation("青岛应急局-查询青岛市地区天气信息")
|
||||
@LogOperation("青岛应急局-查询青岛市地区天气信息")
|
||||
|
|
Loading…
Reference in New Issue