diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index c569d0d9..e6a572f7 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -558,21 +558,53 @@ public class ResourceController { " \n" + " \n" + // " e8d2fb43-f512-4918-ab47-1141b925af10\n" + - String.format("%s", sysUser.getGuid()) + - String.format("%d", page) + - String.format("%d", size) + - title != null ? String.format("%s", title) : "" + + String.format(" %s", sysUser.getGuid()) + + String.format(" %d\n", page) + + String.format(" %d\n", size) + + String.format(" %s\n", title==null ? "" : title) + " \n" + " \n" + ""; 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"))); HttpEntity requestEntity = new HttpEntity<>(parame, requestHeaders); try { String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody(); - String startTag = ""; - String endTag = ""; + String startTag = ""; + String endTag = ""; + 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 = "\n" + + "\n" + + " \n" + + " \n" + + String.format(" %s\n", applyGuid) + + String.format(" %s\n", deptGuid) + + " \n" + + " \n" + + ""; + HttpHeaders requestHeaders = new HttpHeaders(); + requestHeaders.set("SOAPAction", "http://tempuri.org/ZyShowrecord"); + requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8"))); + HttpEntity requestEntity = new HttpEntity<>(parame, requestHeaders); + try { + String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody(); + String startTag = ""; + String endTag = ""; String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag)); HashMap result = JSON.parseObject(json, HashMap.class);