Compare commits

...

6 Commits

Author SHA1 Message Date
wangliwen fb33764365 Merge remote-tracking branch 'origin/master' 2022-06-17 18:26:58 +08:00
wangliwen b780d1bdc3 打包排除生产环境 2022-06-17 18:26:23 +08:00
huangweixiong 508047c9a4 资源目录列表增加分页总数 2022-06-17 18:09:05 +08:00
huangweixiong 593aa55e24 Merge branch 'master' of http://221.0.232.152:9393/ability-center/share-platform
* 'master' of http://221.0.232.152:9393/ability-center/share-platform:
  能力导入采用全异步;所属部门不存在时默认deptId 为1

# Conflicts:
#	renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java
2022-06-17 15:04:25 +08:00
huangweixiong 7fa6cb05e5 Merge branch 'master' of http://221.0.232.152:9393/ability-center/share-platform
* 'master' of http://221.0.232.152:9393/ability-center/share-platform:
  导入表头升序处理
  ...
  web导入能力实现
  能力数据导入
  屮

# Conflicts:
#	renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java
2022-06-17 14:58:38 +08:00
huangweixiong c01f7c913d 目录资源转发对接 2022-06-17 11:31:11 +08:00
2 changed files with 41 additions and 2 deletions

View File

@ -302,7 +302,7 @@
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<excludes> <excludes>
<!-- 排除生产环境配置 --> <!-- 排除生产环境配置 -->
<!-- <exclude>application-prod.yml</exclude>--> <exclude>application-prod.yml</exclude>
</excludes> </excludes>
</resource> </resource>
<resource> <resource>

View File

@ -38,8 +38,8 @@ import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
/** /**
* 资源表 * 资源表
* *
@ -295,6 +295,45 @@ public class ResourceController {
} }
} }
@GetMapping("ZywMessage/list")
@ApiOperation("资源列表转发")
public Result ZywMessageList(Integer page, Integer size) {
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" +
" <ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" +
String.format("<pagenum>%d</pagenum>\n <pagesize>%d</pagesize>\n",page, size) +
" </ZWCJ_mainPort>\n" +
" </soap:Body>\n" +
"</soap:Envelope>";
HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort");
requestHeaders.setContentType(MediaType.TEXT_XML);
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 = JSONObject.parseObject(json, HashMap.class);
List<Map> rows = (List<Map>) result.get("data");
List<Object> objects = rows.stream()
.filter(item -> item.get("main") != null)
.map(item -> item.get("main"))
.collect(Collectors.toList());
result.put("data", objects);
return new Result().ok(result);
} catch (Exception e) {
e.printStackTrace();
return new Result().ok(new ArrayList(0));
}
}
@GetMapping("qdyjjWeather") @GetMapping("qdyjjWeather")
@ApiOperation("青岛应急局-查询青岛市地区天气信息") @ApiOperation("青岛应急局-查询青岛市地区天气信息")
public Result qdyjjWeather(String cityName) { public Result qdyjjWeather(String cityName) {