Commit ae731566 authored by litengwei's avatar litengwei

Merge remote-tracking branch 'origin/developer' into developer

# Conflicts: # amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-dev3.properties
parents 3b39edbb ca2dda60
package com.yeejoin.amos.boot.biz.common;
public class Test {
public static void main(String[] args) {
System.out.println("dddddddddddddd");
}
}
...@@ -17,7 +17,17 @@ public class IndexDto { ...@@ -17,7 +17,17 @@ public class IndexDto {
private String address;// 指标地址 private String address;// 指标地址
private String createdTime;// '上报时间', private String createdTime;// '上报时间',
private String equipmentSpecificName;// private String equipmentSpecificName;//
private String equipmentNumber;
private String value; private String value;
private int count; private int count;
private String equipmentsIdx; private String equipmentsIdx;
private String equipmentIndexName; // 指标名称【风机状态名称】
private String longitude; // 经度
private String latitude; // 纬度
private String frontModule;
private String unit; // 单位
private String F;//风机编号 -- 适应大屏
private String state; // 指标名称【风机状态名称】
private String countString;
private String color;
} }
...@@ -99,5 +99,8 @@ public class StationBasicDto extends BaseDto { ...@@ -99,5 +99,8 @@ public class StationBasicDto extends BaseDto {
//新增 场站第三方编号 //新增 场站第三方编号
private String stationNumber; private String stationNumber;
//新增场站 设备检测网关 //新增场站 设备检测网关
private String gatewayId; private String fanGatewayId;
//升压站网管
private String boosterGatewayId;
} }
...@@ -45,7 +45,8 @@ public class MonitorFanIndicator extends BaseEntity { ...@@ -45,7 +45,8 @@ public class MonitorFanIndicator extends BaseEntity {
private String addressGateway;//地址加网管 private String addressGateway;//地址加网管
@TableField("equipment_number") @TableField("equipment_number")
private String equipmentNumber; //设备编号 private String equipmentNumber; //设备编号
@TableField("data_type")
private String dataType; //设备编号
} }
...@@ -144,11 +144,12 @@ public class StationBasic extends BaseEntity { ...@@ -144,11 +144,12 @@ public class StationBasic extends BaseEntity {
//新增 场站第三方编号 //新增 场站第三方编号
@TableField("station_number") @TableField("station_number")
private String stationNumber; private String stationNumber;
//新增场站 设备检测网关 //风机网管
@TableField("gateway_id") @TableField("fan_gateway_id")
private String gatewayId; private String fanGatewayId;
//升压站网管
@TableField("booster_gateway_id")
private String boosterGatewayId;
} }
...@@ -30,11 +30,6 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato ...@@ -30,11 +30,6 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato
@Param("offset") int offset); @Param("offset") int offset);
Object getIndicatoralueAvage(String gateway,String indicator); Object getIndicatoralueAvage(String gateway,String indicator);
List<RunRecord> queryRunRecord(@Param("size") long size,
@Param("list") String[] list,
@Param("offset") long offset);
int queryRunRecordTotal( @Param("list") String[] list);
Object getIndicatoralueTotal(String gateway,String indicator); Object getIndicatoralueTotal(String gateway,String indicator);
......
...@@ -78,34 +78,6 @@ ...@@ -78,34 +78,6 @@
WHERE gateway=#{gateway} and WHERE gateway=#{gateway} and
indicator like concat('%',#{indicator},'%') indicator like concat('%',#{indicator},'%')
</select> </select>
<select id="queryRunRecord" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.RunRecord">
SELECT
t.equipment_number AS FanName,
(SELECT indicator_value FROM monitor_fan_indicator WHERE equipment_number=t.equipment_number AND gateway=t.gateway and indicator="有功功率") AS 'power',
(SELECT indicator_value FROM monitor_fan_indicator WHERE equipment_number=t.equipment_number AND gateway=t.gateway and indicator="瞬时风速") AS 'windSpeed',
(SELECT indicator_value FROM monitor_fan_indicator WHERE equipment_number=t.equipment_number AND gateway=t.gateway and indicator="60秒平均风向角") AS 'windDirection',
(SELECT indicator_value FROM monitor_fan_indicator WHERE equipment_number=t.equipment_number AND gateway=t.gateway and indicator="日发电量") AS 'PowerGeneration'
FROM
(select
DISTINCT a.equipment_number,a.gateway
from monitor_fan_indicator a where a.equipment_number is not null and a.gateway in
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
#{item}
</foreach>
ORDER BY a.equipment_number ) AS t
limit #{offset}, #{size}
</select>
<select id="queryRunRecordTotal" resultType="java.lang.Integer">
select
count(DISTINCT a.equipment_number) num
from monitor_fan_indicator a where a.equipment_number is not null and a.gateway in
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</select>
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
station_basic.station_type stationType, station_basic.station_type stationType,
station_basic.station_flag stationFlag, station_basic.station_flag stationFlag,
station_basic.area_code areaCode, station_basic.area_code areaCode,
station_basic.jumpPath, station_basic.jump_path,
station_basic.risk_level riskLevel, station_basic.risk_level riskLevel,
station_basic.belong_area belongArea, station_basic.belong_area belongArea,
station_coordinate.longitude, station_coordinate.longitude,
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<select id="getStationListByRegionCode" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto"> <select id="getStationListByRegionCode" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto">
select select
station_name as name, station_name as name,
station_code as code, sequence_nbr as code,
station_type as parentCode, station_type as parentCode,
sequence_nbr as id, sequence_nbr as id,
'1' as isOnclick '1' as isOnclick
......
...@@ -175,7 +175,7 @@ public class StationBasicController extends BaseController { ...@@ -175,7 +175,7 @@ public class StationBasicController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "场站地图数据", notes = "场站地图数据") @ApiOperation(httpMethod = "GET", value = "场站地图数据", notes = "场站地图数据")
@GetMapping(value = "/listforMap") @GetMapping(value = "/listforMap")
public ResponseModel<List<StationInfoDto>> getStationList(@RequestParam(value = "areaCode", required = false) String areaCode,@RequestParam(value = "type", required = false) String type) { public ResponseModel<List<StationInfoDto>> getStationList(@RequestParam(value = "areaCode", required = false) String areaCode,@RequestParam(value = "type", required = false,defaultValue = "qj") String type) {
return ResponseHelper.buildResponse(stationBasicServiceImpl.getStationList(areaCode,type)); return ResponseHelper.buildResponse(stationBasicServiceImpl.getStationList(areaCode,type));
} }
} }
...@@ -19,9 +19,9 @@ public class MapUtils { ...@@ -19,9 +19,9 @@ public class MapUtils {
double radLat = Math.toRadians(latitude); double radLat = Math.toRadians(latitude);
// 计算x、y、z坐标值 // 计算x、y、z坐标值
double x = EARTH_RADIUS * Math.cos(radLat) * Math.cos(radLng)+ Math.random()*1000 ; double x = EARTH_RADIUS * Math.cos(radLat) * Math.cos(radLng)+ 100 ;
double y = EARTH_RADIUS * Math.cos(radLat) * Math.sin(radLng)-Math.random()*1000; double y = EARTH_RADIUS * Math.cos(radLat) * Math.sin(radLng)+10;
double z = EARTH_RADIUS * Math.sin(radLat)+Math.random()*1000; double z = EARTH_RADIUS * Math.sin(radLat)+2;
arrayList.add(x); arrayList.add(x);
arrayList.add(y); arrayList.add(y);
arrayList.add(z); arrayList.add(z);
......
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-commons/2.3.9.RELEASE/spring-data-commons-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/plugin/transport-netty4-client/7.15.2/transport-netty4-client-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-buffer/4.1.65.Final/netty-buffer-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-codec/4.1.65.Final/netty-codec-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-codec-http/4.1.65.Final/netty-codec-http-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-common/4.1.65.Final/netty-common-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-handler/4.1.65.Final/netty-handler-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-resolver/4.1.65.Final/netty-resolver-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-transport/4.1.65.Final/netty-transport-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/client/elasticsearch-rest-high-level-client/7.15.2/elasticsearch-rest-high-level-client-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/elasticsearch/7.15.2/elasticsearch-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/elasticsearch-core/7.15.2/elasticsearch-core-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/elasticsearch-secure-sm/7.15.2/elasticsearch-secure-sm-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/elasticsearch-x-content/7.15.2/elasticsearch-x-content-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.11.4/jackson-dataformat-smile-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.11.4/jackson-dataformat-yaml-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.11.4/jackson-dataformat-cbor-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/elasticsearch-geo/7.15.2/elasticsearch-geo-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-core/8.9.0/lucene-core-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-analyzers-common/8.9.0/lucene-analyzers-common-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-backward-codecs/8.9.0/lucene-backward-codecs-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-grouping/8.9.0/lucene-grouping-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-highlighter/8.9.0/lucene-highlighter-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-join/8.9.0/lucene-join-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-memory/8.9.0/lucene-memory-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-misc/8.9.0/lucene-misc-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-queries/8.9.0/lucene-queries-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-queryparser/8.9.0/lucene-queryparser-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-sandbox/8.9.0/lucene-sandbox-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-spatial-extras/8.9.0/lucene-spatial-extras-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-spatial3d/8.9.0/lucene-spatial3d-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-suggest/8.9.0/lucene-suggest-8.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/elasticsearch-cli/7.15.2/elasticsearch-cli-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/jopt-simple/jopt-simple/5.0.2/jopt-simple-5.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/carrotsearch/hppc/0.8.1/hppc-0.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/tdunning/t-digest/3.2/t-digest-3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/jna/5.7.0-1/jna-5.7.0-1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/elasticsearch-plugin-classloader/7.15.2/elasticsearch-plugin-classloader-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/client/elasticsearch-rest-client/7.15.2/elasticsearch-rest-client-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpasyncclient/4.1.4/httpasyncclient-4.1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore-nio/4.4.14/httpcore-nio-4.4.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/plugin/mapper-extras-client/7.15.2/mapper-extras-client-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/plugin/parent-join-client/7.15.2/parent-join-client-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/plugin/aggs-matrix-stats-client/7.15.2/aggs-matrix-stats-client-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/plugin/rank-eval-client/7.15.2/rank-eval-client-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/elasticsearch/plugin/lang-mustache-client/7.15.2/lang-mustache-client-7.15.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/spullara/mustache/java/compiler/0.9.6/compiler-0.9.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-component-rule/1.7.9-SNAPSHOT/amos-component-rule-1.7.9-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-component-emq/1.1.21/tyboot-component-emq-1.1.21.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-eureka-client/2.2.5.RELEASE/spring-cloud-starter-netflix-eureka-client-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-thymeleaf/2.3.11.RELEASE/spring-boot-starter-thymeleaf-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/thymeleaf-spring5/3.0.12.RELEASE/thymeleaf-spring5-3.0.12.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/thymeleaf/3.0.12.RELEASE/thymeleaf-3.0.12.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/attoparser/attoparser/2.0.5.RELEASE/attoparser-2.0.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/unbescape/unbescape/1.1.6.RELEASE/unbescape-1.1.6.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/extras/thymeleaf-extras-java8time/3.0.4.RELEASE/thymeleaf-extras-java8time-3.0.4.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-workflow/1.8.5-SNAPSHOT/amos-feign-workflow-1.8.5-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/com/vastdata/vastbase/1.0.0.2/vastbase-1.0.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.11.4/jackson-databind-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.11.4/jackson-annotations-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.11.4/jackson-core-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-component-event/1.1.23-SNAPSHOT/tyboot-component-event-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-aop/2.3.11.RELEASE/spring-boot-starter-aop-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/2.3.11.RELEASE/spring-boot-starter-logging-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-mock/2.0.8/spring-mock-2.0.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.13.2/junit-4.13.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-rule/1.7.0/amos-feign-rule-1.7.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-component-security/1.7.13-SNAPSHOT/amos-component-security-1.7.13-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-security/2.3.11.RELEASE/spring-boot-starter-security-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-config/5.3.9.RELEASE/spring-security-config-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/5.3.9.RELEASE/spring-security-core-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-web/5.3.9.RELEASE/spring-security-web-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/de/codecentric/spring-boot-admin-starter-client/2.4.1/spring-boot-admin-starter-client-2.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/de/codecentric/spring-boot-admin-client/2.4.1/spring-boot-admin-client-2.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-component-cache/1.1.23-SNAPSHOT/tyboot-component-cache-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-redis/2.3.11.RELEASE/spring-boot-starter-data-redis-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/lettuce/lettuce-core/5.3.7.RELEASE/lettuce-core-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-rdbms/1.1.23-SNAPSHOT/tyboot-core-rdbms-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/8.0.25/mysql-connector-java-8.0.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-restful/1.1.23-SNAPSHOT/tyboot-core-restful-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-auth/1.1.23-SNAPSHOT/tyboot-core-auth-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-generator/3.2.0/mybatis-plus-generator-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-extension/3.2.0/mybatis-plus-extension-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-core/3.2.0/mybatis-plus-core-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-annotation/3.2.0/mybatis-plus-annotation-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis/3.5.2/mybatis-3.5.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-boot-starter/3.2.0/mybatis-plus-boot-starter-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus/3.2.0/mybatis-plus-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/2.3.11.RELEASE/spring-boot-autoconfigure-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jdbc/2.3.11.RELEASE/spring-boot-starter-jdbc-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/5.2.15.RELEASE/spring-jdbc-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/spring/boot/mybatis-spring-boot-starter/2.1.2/mybatis-spring-boot-starter-2.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/2.1.2/mybatis-spring-boot-autoconfigure-2.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis-spring/2.0.4/mybatis-spring-2.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/afterturn/easypoi-base/4.0.0/easypoi-base-4.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi/4.0.0/poi-4.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.14/commons-codec-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-collections4/4.2/commons-collections4-4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ognl/ognl/3.2.6/ognl-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/afterturn/easypoi-web/3.0.3/easypoi-web-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/5.2.15.RELEASE/spring-core-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jcl/5.2.15.RELEASE/spring-jcl-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/afterturn/easypoi-annotation/3.0.3/easypoi-annotation-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/itextpdf/itextpdf/5.5.13/itextpdf-5.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/itextpdf/itext-asian/5.2.0/itext-asian-5.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/zxing/core/3.3.0/core-3.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/pagehelper/pagehelper/5.1.10/pagehelper-5.1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jsqlparser/jsqlparser/2.0/jsqlparser-2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-eureka-server/2.2.5.RELEASE/spring-cloud-starter-netflix-eureka-server-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter/2.2.5.RELEASE/spring-cloud-starter-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-context/2.2.5.RELEASE/spring-cloud-context-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-crypto/5.3.9.RELEASE/spring-security-crypto-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-commons/2.2.5.RELEASE/spring-cloud-commons-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-rsa/1.0.9.RELEASE/spring-security-rsa-1.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.64/bcpkix-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-eureka-server/2.2.5.RELEASE/spring-cloud-netflix-eureka-server-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-actuator/2.3.11.RELEASE/spring-boot-starter-actuator-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator-autoconfigure/2.3.11.RELEASE/spring-boot-actuator-autoconfigure-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator/2.3.11.RELEASE/spring-boot-actuator-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/micrometer/micrometer-core/1.5.14/micrometer-core-1.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-freemarker/2.3.11.RELEASE/spring-boot-starter-freemarker-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context-support/5.2.15.RELEASE/spring-context-support-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-hystrix/2.2.5.RELEASE/spring-cloud-netflix-hystrix-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-eureka-client/2.2.5.RELEASE/spring-cloud-netflix-eureka-client-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/eureka/eureka-client/1.9.25/eureka-client-1.9.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jettison/jettison/1.3.7/jettison-1.3.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-eventbus/0.3.0/netflix-eventbus-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-infix/0.3.0/netflix-infix-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-math/2.2/commons-math-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/servo/servo-core/0.12.21/servo-core-0.12.21.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-core/1.19.1/jersey-core-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/contribs/jersey-apache-client4/1.19.1/jersey-apache-client4-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.14/httpcore-4.4.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/inject/guice/4.1.0/guice-4.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-servlet/1.19.1/jersey-servlet-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-server/1.19.1/jersey-server-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-client/1.19.1/jersey-client-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/eureka/eureka-core/1.9.25/eureka-core-1.9.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/woodstox/woodstox-core/5.3.0/woodstox-core-5.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/archaius/archaius-core/0.7.6/archaius-core-0.7.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.11.4/jackson-dataformat-xml-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.11.4/jackson-module-jaxb-annotations-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/thoughtworks/xstream/xstream/1.4.11.1/xstream-1.4.11.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-archaius/2.2.5.RELEASE/spring-cloud-starter-netflix-archaius-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-ribbon/2.2.5.RELEASE/spring-cloud-netflix-ribbon-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-archaius/2.2.5.RELEASE/spring-cloud-netflix-archaius-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-configuration/commons-configuration/1.8/commons-configuration-1.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-ribbon/2.2.5.RELEASE/spring-cloud-starter-netflix-ribbon-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon/2.3.0/ribbon-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-transport/2.3.0/ribbon-transport-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty-contexts/0.4.9/rxnetty-contexts-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty-servo/0.4.9/rxnetty-servo-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty/0.4.9/rxnetty-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-core/2.3.0/ribbon-core-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-httpclient/2.3.0/ribbon-httpclient-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-commons-util/0.3.0/netflix-commons-util-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-loadbalancer/2.3.0/ribbon-loadbalancer-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-statistics/0.1.1/netflix-statistics-0.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxjava/1.3.8/rxjava-1.3.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-loadbalancer/2.2.5.RELEASE/spring-cloud-starter-loadbalancer-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-loadbalancer/2.2.5.RELEASE/spring-cloud-loadbalancer-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-validation/2.3.11.RELEASE/spring-boot-starter-validation-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/validator/hibernate-validator/6.1.7.Final/hibernate-validator-6.1.7.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/addons/reactor-extra/3.3.6.RELEASE/reactor-extra-3.3.6.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-cache/2.3.11.RELEASE/spring-boot-starter-cache-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/stoyanr/evictor/1.0.0/evictor-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-eureka/2.3.0/ribbon-eureka-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-runtime/2.3.4/jaxb-runtime-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/txw2/2.3.4/txw2-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/istack/istack-commons-runtime/3.0.12/istack-commons-runtime-3.0.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/2.3.11.RELEASE/spring-boot-starter-web-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/2.3.11.RELEASE/spring-boot-starter-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/2.3.11.RELEASE/spring-boot-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-json/2.3.11.RELEASE/spring-boot-starter-json-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.4/jackson-datatype-jdk8-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.4/jackson-datatype-jsr310-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.4/jackson-module-parameter-names-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/2.3.11.RELEASE/spring-boot-starter-tomcat-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/9.0.46/tomcat-embed-core-9.0.46.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.46/tomcat-embed-websocket-9.0.46.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/5.2.15.RELEASE/spring-web-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/5.2.15.RELEASE/spring-beans-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/5.2.15.RELEASE/spring-webmvc-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/5.2.15.RELEASE/spring-aop-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/5.2.15.RELEASE/spring-context-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/5.2.15.RELEASE/spring-expression-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/hystrix/hystrix-javanica/1.5.18/hystrix-javanica-1.5.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/hystrix/hystrix-core/1.5.18/hystrix-core-1.5.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.9.6/aspectjweaver-1.9.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/fastjson/1.2.83/fastjson-1.2.83.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/easyexcel/2.0.5/easyexcel-2.0.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cglib/cglib/3.1/cglib-3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ehcache/ehcache/3.8.1/ehcache-3.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.18/commons-compress-1.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-scratchpad/4.0.1/poi-scratchpad-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml/4.0.1/poi-ooxml-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/virtuald/curvesapi/1.05/curvesapi-1.05.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/fr/opensagres/xdocreport/xdocreport/1.0.6/xdocreport-1.0.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml-schemas/4.0.1/poi-ooxml-schemas-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlbeans/xmlbeans/3.0.2/xmlbeans-3.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/ooxml-schemas/1.3/ooxml-schemas-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jsoup/jsoup/1.11.3/jsoup-1.11.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.4/joda-time-2.10.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.10/commons-lang3-3.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/velocity/velocity-engine-core/2.1/velocity-engine-core-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/freemarker/freemarker/2.3.31/freemarker-2.3.31.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-websocket/2.3.11.RELEASE/spring-boot-starter-websocket-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-messaging/5.2.15.RELEASE/spring-messaging-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-websocket/5.2.15.RELEASE/spring-websocket-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-jexl/2.1.1/commons-jexl-2.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-stream/5.3.7.RELEASE/spring-integration-stream-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-core/5.3.7.RELEASE/spring-integration-core-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/5.2.15.RELEASE/spring-tx-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/retry/spring-retry/1.2.5.RELEASE/spring-retry-1.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/reactor-core/3.3.17.RELEASE/reactor-core-3.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-mqtt/5.3.7.RELEASE/spring-integration-mqtt-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/paho/org.eclipse.paho.client.mqttv3/1.2.4/org.eclipse.paho.client.mqttv3-1.2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-boot-starter/2.0.7/knife4j-spring-boot-starter-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-boot-autoconfigure/2.0.7/knife4j-spring-boot-autoconfigure-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring/2.0.7/knife4j-spring-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-annotations/2.0.7/knife4j-annotations-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-core/2.0.7/knife4j-core-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-models/1.5.22/swagger-models-1.5.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger2/2.10.5/springfox-swagger2-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spi/2.10.5/springfox-spi-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-core/2.10.5/springfox-core-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy/1.10.22/byte-buddy-1.10.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-schema/2.10.5/springfox-schema-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger-common/2.10.5/springfox-swagger-common-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spring-web/2.10.5/springfox-spring-web-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/classgraph/classgraph/4.1.7/classgraph-4.1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/plugin/spring-plugin-core/2.0.0.RELEASE/spring-plugin-core-2.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/plugin/spring-plugin-metadata/2.0.0.RELEASE/spring-plugin-metadata-2.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mapstruct/mapstruct/1.3.1.Final/mapstruct-1.3.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-bean-validators/2.10.5/springfox-bean-validators-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spring-webmvc/2.10.5/springfox-spring-webmvc-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-ui/2.0.7/knife4j-spring-ui-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-systemctl/1.7.10-SNAPSHOT/amos-feign-systemctl-1.7.10-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-foundation/1.1.23-SNAPSHOT/tyboot-core-foundation-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/belerweb/pinyin4j/2.5.0/pinyin4j-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/esotericsoftware/reflectasm/reflectasm/1.09/reflectasm-1.09.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/axet/kaptcha/0.0.9/kaptcha-0.0.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/jhlabs/filters/2.0.235/filters-2.0.235.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-component-feign/1.7.10-SNAPSHOT/amos-component-feign-1.7.10-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-openfeign/2.2.5.RELEASE/spring-cloud-starter-openfeign-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-openfeign-core/2.2.5.RELEASE/spring-cloud-openfeign-core-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/form/feign-form-spring/3.8.0/feign-form-spring-3.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/form/feign-form/3.8.0/feign-form-3.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.2/commons-io-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-core/10.10.1/feign-core-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-slf4j/10.10.1/feign-slf4j-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-hystrix/10.10.1/feign-hystrix-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/servlet/javax.servlet-api/4.0.1/javax.servlet-api-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-redis/1.4.5.RELEASE/spring-boot-starter-redis-1.4.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-redis/2.3.9.RELEASE/spring-data-redis-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-keyvalue/2.3.9.RELEASE/spring-data-keyvalue-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-oxm/5.2.15.RELEASE/spring-oxm-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/redis/clients/jedis/3.3.0/jedis-3.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-pool2/2.8.1/commons-pool2-2.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/brave/brave/5.12.3/brave-5.12.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/reporter2/zipkin-reporter-brave/2.15.0/zipkin-reporter-brave-2.15.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/reporter2/zipkin-reporter/2.15.0/zipkin-reporter-2.15.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/zipkin2/zipkin/2.21.1/zipkin-2.21.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-annotations/1.5.13/swagger-annotations-1.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-privilege/1.7.10-SNAPSHOT/amos-feign-privilege-1.7.10-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
package com.yeejoin.amos.boot.module.jxiop.biz.controller; package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto;
import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic; import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test; import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl;
...@@ -15,24 +19,25 @@ import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils; ...@@ -15,24 +19,25 @@ import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
import com.yeejoin.amos.component.influxdb.InfluxDbConnection; import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; import org.slf4j.Logger;
import org.influxdb.dto.QueryResult; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import java.util.ArrayList; import java.util.*;
import java.util.Date; import java.util.concurrent.TimeUnit;
import java.util.List; import java.util.*;
import java.util.Map;
@RestController @RestController
@Api(tags = "Demo-test") @Api(tags = "Demo-test")
@RequestMapping(value = "/demo") @RequestMapping(value = "/demo")
public class DemoController extends BaseController { public class DemoController extends BaseController {
Logger logger = LoggerFactory.getLogger(DemoController.class);
@Autowired @Autowired
StationBasicServiceImpl stationBasicServiceimpl; StationBasicServiceImpl stationBasicServiceimpl;
...@@ -53,7 +58,11 @@ public class DemoController extends BaseController { ...@@ -53,7 +58,11 @@ public class DemoController extends BaseController {
MonitorFanIndicatorImpl monitorFanIndicatorImpl; MonitorFanIndicatorImpl monitorFanIndicatorImpl;
@Autowired @Autowired
InfluxDButils influxDButils; InfluxDButils influxDButils;
@Autowired
EmqKeeper emqKeeper;
@Autowired
private MonitorFanIndicatorMapper monitorFanIndicatorregionMapper;
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "demo测试prodcutcion 库") @ApiOperation(value = "demo测试prodcutcion 库")
...@@ -79,10 +88,57 @@ public class DemoController extends BaseController { ...@@ -79,10 +88,57 @@ public class DemoController extends BaseController {
@ApiOperation(value = "测试获取风速平均值") @ApiOperation(value = "测试获取风速平均值")
@GetMapping("/test4") @GetMapping("/test4")
public void demoTest3() { public void demoTest3() {
Object o=this.monitorFanIndicatorImpl.getIndicatoralueAvage("1668801435891929089","60秒平均风速"); // Object o=this.monitorFanIndicatorImpl.getIndicatoralueAvage("1668801435891929089","60秒平均风速");
System.out.println(o.toString()); // System.out.println(o.toString());
QueryWrapper<MonitorFanIndicator> QueryWrapper= new QueryWrapper<>();
QueryWrapper.eq("gateway","1668801435891929089");
long DATE =new Date().getTime();
System.out.println(DATE);
List<MonitorFanIndicator> list=monitorFanIndicatorregionMapper.selectList(QueryWrapper);
for (MonitorFanIndicator monitorFanIndicator : list) {
Map<String, String> tag = new HashMap<>();
Map<String, Object> maps2 = new HashMap<>();
tag.put("address",monitorFanIndicator.getIndexAddress() );
tag.put("dataType", monitorFanIndicator.getDataType());
tag.put("equipmentSpecificName",monitorFanIndicator.getFanCode() );
tag.put("equipmentsIdx",monitorFanIndicator.getAddressGateway() );
tag.put("gatewayId", monitorFanIndicator.getGateway());
tag.put("isAlarm", monitorFanIndicator.getIsAlarm());
maps2.put("createdTime", "2023-07-05 18:30:26");
maps2.put("unit", monitorFanIndicator.getUnit());
maps2.put("value", "");
maps2.put("valueLabel","" );
maps2.put("traceId", "");
maps2.put("equipmentIndexName", monitorFanIndicator.getIndicator());
maps2.put("equipmentNumber", monitorFanIndicator.getEquipmentNumber());
maps2.put("frontModule", monitorFanIndicator.getFrontModule());
maps2.put("systemType", monitorFanIndicator.getSystemType());
influxDbConnection.insert("indicators_"+monitorFanIndicator.getGateway(), tag, maps2,1688558007051L, TimeUnit.MILLISECONDS);
} }
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "测试消息发送")
@GetMapping("/test5")
public void demoTest4() {
HashMap<String, String> hashMap = new HashMap<>();
hashMap.put("test", String.valueOf(Math.random() *1000));
hashMap.put("test1", String.valueOf(Math.random() *100));
try {
emqKeeper.getMqttClient().publish("test_topic", JSON.toJSON(hashMap).toString().getBytes("UTF-8"), 1, true);
emqKeeper.getMqttClient().publish("test_topic1", JSON.toJSON(hashMap).toString().getBytes("UTF-8"), 1, true);
logger.info("++++++++++++++++++++++++++++++++++发送消息成功++++++++++++++++++++++++++++++++++++++");
} catch (Exception exception) {
logger.error("============================================================发送消息报错");
}
}
} }
...@@ -2,10 +2,11 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller; ...@@ -2,10 +2,11 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.api.dto.DeviceDto;
import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto;
import com.yeejoin.amos.boot.module.jxiop.api.dto.PersonAccountDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.ColModel;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.RegionNationWideDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.DataGridMock;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils; import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -20,6 +21,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -20,6 +21,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -34,50 +36,27 @@ import java.util.List; ...@@ -34,50 +36,27 @@ import java.util.List;
public class DeviceController extends BaseController { public class DeviceController extends BaseController {
@Autowired @Autowired
InfluxDButils influxDButils; MonitorFanIndicatorImpl monitorFanIndicatorImpl;
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取告警数据") @ApiOperation(value = "获取每个风机实时告警数据")
@GetMapping("/nationwide") @GetMapping("/nationwide")
public ResponseModel<Page<IndexDto>> getNationWideInfo(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<ResultsData> getNationWideInfo(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size,@RequestParam(value = "gateway") String gateway) { (value = "size") int size,@RequestParam(value = "stationBasicId") String stationBasicId,@RequestParam(value = "equipmentNumber" , required = false ) String equipmentNumber) {
Page<IndexDto> page = new Page<IndexDto>(); ResultsData resultsData=monitorFanIndicatorImpl.getNationWideInfo( current, size, stationBasicId, equipmentNumber);
page.setCurrent(current); return ResponseHelper.buildResponse(resultsData);
page.setSize(size);
StringBuffer querysql = new StringBuffer("SELECT createdTime ,gatewayId,address,valueLabel,equipmentSpecificName,value FROM iot_data WHERE isAlarm='1' and value!='0.0' and time > now() - 1d ");
StringBuffer querysqlcount = new StringBuffer("SELECT count(value) FROM iot_data WHERE isAlarm='1' and value!='0.0' and time > now() - 1d ");
if(StringUtils.isNotEmpty(gateway)){
String[] da= gateway.split(",");
for (int i = 0; i < da.length; i++) {
if(i==0){
querysql.append("and ( gatewayId = ").append("'"+da[i]+"'");
querysqlcount.append("and ( gatewayId = ").append("'"+da[i]+"'");
}else if(i==da.length-1){
querysql.append(" or gatewayId = ").append("'"+da[i]+"'").append(") ");
querysqlcount.append(" or gatewayId = ").append("'"+da[i]+"'").append(") ");
}else{
querysql.append(" or gatewayId = ").append("'"+da[i]+"'");
querysqlcount.append(" or gatewayId = ").append("'"+da[i]+"'");
}
}
}
querysql.append(" ORDER BY time desc LIMIT ").append(page.getSize()).append(" OFFSET ").append((page.getCurrent() - 1)*page.getSize());
//每个分机的指标数据
List<IndexDto> list = influxDButils.getListData(querysql.toString(),IndexDto.class);
List<IndexDto> list1 = influxDButils.getListData(querysqlcount.toString(),IndexDto.class);
page.setRecords(list);
if(list1!=null&&list1.size()>0){
page.setTotal(list1.get(0).getCount());
}
return ResponseHelper.buildResponse(page);
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取历史告警数据")
@GetMapping("/historyNationwide")
public ResponseModel<ResultsData> getLSNationWideInfo(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size,@RequestParam(value = "stationBasicId") String stationBasicId,@RequestParam(value = "equipmentNumber" , required = false ) String equipmentNumber) {
ResultsData resultsData=monitorFanIndicatorImpl.getLsNationWideInfo( current, size, stationBasicId, equipmentNumber);
return ResponseHelper.buildResponse(resultsData);
}
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto;
import com.yeejoin.amos.boot.module.jxiop.api.dto.RunRecord; import com.yeejoin.amos.boot.module.jxiop.api.dto.RunRecord;
import com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto;
import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator; import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator;
...@@ -19,7 +20,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -19,7 +20,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@RestController @RestController
@Api(tags = "大屏相关API") @Api(tags = "大屏相关API")
...@@ -34,14 +38,15 @@ public class MonitorFanIdxController extends BaseController { ...@@ -34,14 +38,15 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据设备编号、网关ID、前段展示模块查询表数据") @ApiOperation(value = "根据设备编号、场站id、前段展示模块、系统类型查询表数据")
@GetMapping("/getFanIdxInfoByPage") @GetMapping("/getFanIdxInfoByPage")
public ResponseModel<IPage<MonitorFanIndicator>> getFanIdxInfoByPage(@RequestParam(value = "equipmentNumber", required = false) String equipmentNumber, public ResponseModel<IPage<IndexDto>> getFanIdxInfoByPage(@RequestParam(value = "equipNum", required = false) String equipNum,
@RequestParam(value = "gateway", required = false) String gateway, @RequestParam(value = "stationId", required = false) String stationId,
@RequestParam(value = "frontModule", required = false) String frontModule, @RequestParam(value = "frontModule", required = false) String frontModule,
@RequestParam(value = "systemType", required = false) String systemType,
@RequestParam(value = "current", required = false) int current, @RequestParam(value = "current", required = false) int current,
@RequestParam(value = "size", required = false) int size) { @RequestParam(value = "size", required = false) int size) {
return ResponseHelper.buildResponse(monitorFanIndicator.getFanIdxInfoByPage(equipmentNumber, gateway, frontModule, current, size)); return ResponseHelper.buildResponse(monitorFanIndicator.getFanIdxInfoByPage(equipNum, stationId, frontModule, current, size, systemType));
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
...@@ -53,19 +58,54 @@ public class MonitorFanIdxController extends BaseController { ...@@ -53,19 +58,54 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "运行记录") @ApiOperation(value = "风机布置图 - 风机状态列表")
@GetMapping("/runRecord") @GetMapping("/getFanStatusList")
public ResponseModel<IPage<RunRecord>> runRecord( public ResponseModel<IPage<IndexDto>> getFanStatusList(@RequestParam(value = "stationId", required = false) String stationId,
@RequestParam(value = "gateway", required = false) String gateway,
@RequestParam(value = "current", required = false) int current, @RequestParam(value = "current", required = false) int current,
@RequestParam(value = "size", required = false) int size) { @RequestParam(value = "size", required = false) int size) {
List<IndexDto> fanStatusList = monitorFanIndicator.getFanStatusList(stationId);
String[] gateways=gateway.split(","); Page<IndexDto> page = new Page<>(current, size);
IPage<RunRecord> page= monitorFanIndicator.queryRunRecord( size,gateways, current); List<IndexDto> collect = fanStatusList.stream()
.skip((long) (current - 1) * size)
.limit(size)
.collect(Collectors.toList());
page.setTotal(fanStatusList.size());
page.setRecords(collect);
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "风机布置图 - 风机状态统计")
@GetMapping("/getFanStatusStatistics")
public ResponseModel<IPage<IndexDto>> getFanStatusStatistics(@RequestParam(value = "stationId", required = false) String stationId,
@RequestParam(value = "current", required = false) int current,
@RequestParam(value = "size", required = false) int size) {
List<IndexDto> fanStatusStatistics = monitorFanIndicator.getFanStatusStatistics(stationId);
Page<IndexDto> page = new Page<>(current, size);
List<IndexDto> collect = fanStatusStatistics.stream()
.skip((long) (current - 1) * size)
.limit(size)
.collect(Collectors.toList());
page.setTotal(fanStatusStatistics.size());
page.setRecords(collect);
return ResponseHelper.buildResponse(page);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "风机布置图 - 风机基础信息")
@GetMapping("/getFanBasicInfoByEquipNum")
public ResponseModel<IndexDto> getFanBasicInfoByEquipNum(@RequestParam(value = "equipNum", required = false) String equipNum,
@RequestParam(value = "stationId", required = false) String stationId) {
return ResponseHelper.buildResponse(monitorFanIndicator.getFanBasicInfoByEquipNum(equipNum, stationId));
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取当前表记的实时温度")
@GetMapping("/getRealTimeTemperature")
public ResponseModel<HashMap<String, List<String>>> getRealTimeTemperature(@RequestParam(value = "equipNum", required = false) String equipNum,
@RequestParam(value = "stationId", required = false) String stationId,
@RequestParam(value = "frontModule", required = false) String frontModule) {
return ResponseHelper.buildResponse(monitorFanIndicator.getRealTimeTemperature(equipNum, stationId, frontModule)) ;
}
} }
...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic; ...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.api.service.IMapRegionService; import com.yeejoin.amos.boot.module.jxiop.api.service.IMapRegionService;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.RegionNationWideDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.RegionNationWideDto;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test; import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitoringServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitoringServiceImpl;
...@@ -40,17 +41,17 @@ public class MonitoringMapController extends BaseController { ...@@ -40,17 +41,17 @@ public class MonitoringMapController extends BaseController {
@Autowired @Autowired
MonitoringServiceImpl monitoringServiceImpl; MonitoringServiceImpl monitoringServiceImpl;
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取监盘全国地图数据") @ApiOperation(value = "获取监盘全国地图数据")
@GetMapping("/nationwide") @GetMapping("/nationwide")
public ResponseModel<List<RegionNationWideDto>> getNationWideInfo(@RequestParam (value = "provinceName", required = false)String provinceName) { public ResponseModel<List<RegionNationWideDto>> getNationWideInfo(@RequestParam (value = "provinceName", required = false)String provinceName) {
return ResponseHelper.buildResponse(monitoringServiceImpl.getNationWideInfo(provinceName)); return ResponseHelper.buildResponse(monitoringServiceImpl.getNationWideInfo(provinceName));
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取社会贡献") @ApiOperation(value = "获取区域电量指标完成情况")
@GetMapping("/getTotalSocialContribution") @GetMapping("/getCompletionOfPowerIndicatorsByProvinceName")
public ResponseModel<List<SocialContributionDto>> getTotalSocialContribution() { public ResponseModel<ResultsData> getCompletionOfPowerIndicatorsByProvinceName(@RequestParam(required = true) int current, @RequestParam(required = true) int size, @RequestParam(required = true) String provinceName) {
return ResponseHelper.buildResponse(monitoringServiceImpl.getTotalSocialContribution()); return ResponseHelper.buildResponse(monitoringServiceImpl.getCompletionOfPowerIndicatorsByProvinceName(current,size,provinceName));
} }
} }
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
/**
* @description:
* @author: tw
* @createDate: 2023/7/6
*/
@Data
public class ColModel {
private String fid;
private String dataIndex;
private String name;
private String title;
private String type;
private String key;
public ColModel(String fid, String dataIndex, String name, String title, String type, String key) {
this.fid = fid;
this.dataIndex = dataIndex;
this.name = name;
this.title = title;
this.type = type;
this.key = key;
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
@Data
public class CompletionOfPowerIndicatorsDto {
//场站名称
private String stationName;
//装机容量
private String installCapactity;
//风速或者辐照度
private String windSpeedOrIrradiance;
// 有功功率
private String activePower;
//日发电量
private String dailyPower;
//月发电量
private String monthlyPower;
//年发电量
private String annualPower;
}
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;
import java.util.List;
/**
* @description:
* @author: tw
* @createDate: 2023/7/6
*/
@Data
public class DataGridMock {
private int current;
private int total;
private boolean pagination;
private int totalPage;
private List dataList;
public DataGridMock(int current, int total, boolean pagination, int totalPage, List dataList) {
this.current = current;
this.total = total;
this.pagination = pagination;
this.totalPage = totalPage;
this.dataList = dataList;
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
/**
* 指标dto-用于接收influxdb里边查询的到的数据
*/
@Data
public class IndicatorsDto {
private String address;
private String createdTime;
private String dataType;
private String equipmentIndex;
private String equipmentIndexName;
private String equipmentNumber;
private String equipmentSpecificName;
private String equipmentsIdx;
private String frontModule;
private String gatewayId;
private String isAlarm;
private String systemType;
private String traceId;
private String unit;
private String value;
private String valueLabel;
}
...@@ -10,6 +10,8 @@ import java.util.HashMap; ...@@ -10,6 +10,8 @@ import java.util.HashMap;
public class RegionNationWideDto { public class RegionNationWideDto {
@ApiModelProperty(value = "省份名称") @ApiModelProperty(value = "省份名称")
private String name; private String name;
@ApiModelProperty(value = "省份名称")
private String staitionId;
@ApiModelProperty(value = "光伏电站数量") @ApiModelProperty(value = "光伏电站数量")
private String guangfu = "0"; private String guangfu = "0";
@ApiModelProperty(value = "风机电站数量") @ApiModelProperty(value = "风机电站数量")
......
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;
import java.util.List;
/**
* @description:
* @author: tw
* @createDate: 2023/7/6
*/
@Data
public class ResultsData {
private DataGridMock dataGridMock;
private List<ColModel> colModel;
public ResultsData(DataGridMock dataGridMock, List<ColModel> colModel) {
this.dataGridMock = dataGridMock;
this.colModel = colModel;
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
@Data
public class TestDto {
// "date": "2020-12-12 12:12:12",
// "address": "陕西省西安市雁塔区太白南路A座C区",
// "level": "紧急",
// "name": "咸阳机场项目",
// "id": "1",
// "status": "研发中"
private String createdTime;
private String equipmentIndex;
private String equipmentIndexName;
private String traceId;
private String value;
private String valueLabel;
private String unit;
}
package com.yeejoin.amos.boot.module.jxiop.api.service; package com.yeejoin.amos.boot.module.jxiop.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mysql.cj.x.protobuf.MysqlxCrud;
import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto;
import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator; import com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;
...@@ -16,4 +15,6 @@ public interface IMonitorFanIndicator { ...@@ -16,4 +15,6 @@ public interface IMonitorFanIndicator {
//批量修改指标值 //批量修改指标值
void UpdateMonitorFanIndicator(List<IndexDto> list); void UpdateMonitorFanIndicator(List<IndexDto> list);
ResultsData getNationWideInfo( int current, int size, String stationBasicId, String equipmentNumber);
ResultsData getLsNationWideInfo( int current, int size, String stationBasicId, String equipmentNumber);
} }
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IndicatorsDto;
import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class CommonServiceImpl {
@Autowired
InfluxDButils influxDButils;
/**
* @deprecated 获取指标值总和
* @param gatewayId 网关id 用于拼接sql语句
* @param indicator 指标名称 查询条件-根据指标名称获取风速
* @return 指标值总和
*/
public Double getTotalByIndicatior(String gatewayId,String indicator){
String sql = "SELECT * FROM indicators_"+gatewayId+" where equipmentIndexName='"+indicator+"'";
Double totalvalue = 0.0;
List<IndicatorsDto> indicatorsDtoList = influxDButils.getListData(sql,IndicatorsDto.class);
List<Double> doubleList = indicatorsDtoList.stream().map(indicatorsDto -> Double.parseDouble(indicatorsDto.getValue())).collect(Collectors.toList());
totalvalue = doubleList.stream().mapToDouble(Double::doubleValue).sum();
return totalvalue;
}
/**
* @deprecated 获取指标值平均值
* @param gatewayId 网关id 用于拼接sql语句
* @param indicator 指标名称 查询条件-根据指标名称获取风速
* @return 指标值总和
*/
public Double getAvgvalueByIndicatior(String gatewayId,String indicator){
String sql = "SELECT * FROM indicators_"+gatewayId+" where equipmentIndexName='"+indicator+"'";
Double avageValue = 0.0;
List<IndicatorsDto> indicatorsDtoList = influxDButils.getListData(sql,IndicatorsDto.class);
List<Double> doubleList = indicatorsDtoList.stream().map(indicatorsDto -> Double.parseDouble(indicatorsDto.getValue())).collect(Collectors.toList());
avageValue = doubleList.stream().mapToDouble(Double::doubleValue).average().getAsDouble();
return avageValue;
}
}
...@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto;
import com.yeejoin.amos.boot.module.jxiop.api.dto.RunRecord;
import com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto;
import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator; import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator;
import com.yeejoin.amos.boot.module.jxiop.api.entity.Region; import com.yeejoin.amos.boot.module.jxiop.api.entity.Region;
...@@ -14,14 +13,19 @@ import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic; ...@@ -14,14 +13,19 @@ import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.api.service.IMonitorFanIndicator; import com.yeejoin.amos.boot.module.jxiop.biz.dto.ColModel;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.DataGridMock;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.TpriDmpDatabook;
import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IMonitorFanIndicator;
import com.yeejoin.amos.component.robot.BadRequest; import com.yeejoin.amos.component.robot.BadRequest;
import org.apache.ibatis.annotations.Param; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays; import java.util.*;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -41,22 +45,118 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -41,22 +45,118 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
@Autowired @Autowired
private RegionMapper regionMapper; private RegionMapper regionMapper;
@Autowired
InfluxDButils influxDButils;
@Autowired
SjglZsjZsbtzServiceImpl sjglZsjZsbtzServiceImpl;
@Autowired
TpriDmpDatabookServiceImpl tpriDmpDatabookServiceImpl;
@Autowired
StationDataTaskImpl stationDataTask;
@Override @Override
public void UpdateMonitorFanIndicator(List<IndexDto> list) { public void UpdateMonitorFanIndicator(List<IndexDto> list) {
monitorFanIndicatorregionMapper.UpdateMonitorFanIndicator(list); monitorFanIndicatorregionMapper.UpdateMonitorFanIndicator(list);
}
@Override
public ResultsData getNationWideInfo(int current, int size, String stationBasicId, String equipmentNumber) {
StationBasic stationBasic = stationBasicMapper.selectById(stationBasicId);
String gateway = stationBasic.getFanGatewayId();
Page<IndexDto> page = new Page<IndexDto>();
page.setCurrent(current);
page.setSize(size);
String table = gateway;
StringBuffer querysql = new StringBuffer("SELECT createdTime ,equipmentNumber,gatewayId,address,valueLabel,equipmentSpecificName,value FROM indicators_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s ORDER BY time desc LIMIT %d OFFSET %d ");
StringBuffer querysqlcount = new StringBuffer("SELECT count(value) FROM indicators_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s ");
if (StringUtils.isNotEmpty(equipmentNumber)) {
String date = "'%s' and equipmentNumber = '%s' ";
gateway = String.format(date, gateway, equipmentNumber);
} else {
gateway = String.format("'%s'", gateway);
}
String querysqln = String.format(querysql.toString(), table, gateway, (int) page.getSize(), (int) (page.getCurrent() - 1) * page.getSize());
String querysqlcountn = String.format(querysqlcount.toString(), table, gateway);
//每个分机的指标数据
List<IndexDto> list = influxDButils.getListData(querysqln, IndexDto.class);
List<IndexDto> list1 = influxDButils.getListData(querysqlcountn, IndexDto.class);
page.setRecords(list);
//构建平台数据
DataGridMock DataGridMock = new DataGridMock(current, list1 != null ? list1.get(0).getCount() : 0, false, current, list);
ColModel colModelequipmentNumber = new ColModel("equipmentNumber", "equipmentNumber", "风机号", "风机号", "dataGrid", "equipmentNumber");
ColModel colModelvalueLabel = new ColModel("valueLabel", "valueLabel", "事件描述", "事件描述", "dataGrid", "valueLabel");
ColModel colModelcreatedTime = new ColModel("createdTime", "createdTime", "发生时间", "发生时间", "dataGrid", "createdTime");
ColModel colModelvalue = new ColModel("value", "value", "告警值", "告警值", "dataGrid", "value");
List<ColModel> listColModel = new ArrayList<>();
listColModel.add(colModelequipmentNumber);
listColModel.add(colModelvalueLabel);
listColModel.add(colModelcreatedTime);
listColModel.add(colModelvalue);
ResultsData resultsData = new ResultsData(DataGridMock, listColModel);
return resultsData;
}
@Override
public ResultsData getLsNationWideInfo(int current, int size, String stationBasicId, String equipmentNumber) {
StationBasic stationBasic = stationBasicMapper.selectById(stationBasicId);
String gateway = stationBasic.getFanGatewayId();
Page<IndexDto> page = new Page<IndexDto>();
page.setCurrent(current);
page.setSize(size);
String table = gateway;
StringBuffer querysql = new StringBuffer("SELECT createdTime ,gatewayId,address,valueLabel,equipmentSpecificName,value FROM iot_data_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s ORDER BY time desc LIMIT %d OFFSET %d ");
StringBuffer querysqlcount = new StringBuffer("SELECT count(value) FROM iot_data_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s ");
if (StringUtils.isNotEmpty(equipmentNumber)) {
String date = " '%s' and equipmentSpecificName=~/.*%s风机.*/ ";
gateway = String.format(date, gateway, equipmentNumber);
} else {
gateway = String.format("'%s'", gateway);
}
String querysqln = String.format(querysql.toString(), table, gateway, (int) page.getSize(), (int) (page.getCurrent() - 1) * page.getSize());
String querysqlcountn = String.format(querysqlcount.toString(), table, gateway);
//每个分机的指标数据
List<IndexDto> list = influxDButils.getListData(querysqln, IndexDto.class);
List<IndexDto> list1 = influxDButils.getListData(querysqlcountn, IndexDto.class);
page.setRecords(list);
//构建平台数据
DataGridMock DataGridMock = new DataGridMock(current, list1 != null ? list1.get(0).getCount() : 0, false, current, list);
ColModel colModelequipmentNumber = new ColModel("equipmentNumber", "equipmentSpecificName", "风机号", "风机号", "dataGrid", "equipmentNumber");
ColModel colModelvalueLabel = new ColModel("valueLabel", "valueLabel", "事件描述", "事件描述", "dataGrid", "valueLabel");
ColModel colModelcreatedTime = new ColModel("createdTime", "createdTime", "发生时间", "发生时间", "dataGrid", "createdTime");
ColModel colModelvalue = new ColModel("value", "value", "告警值", "告警值", "dataGrid", "value");
List<ColModel> listColModel = new ArrayList<>();
listColModel.add(colModelequipmentNumber);
listColModel.add(colModelvalueLabel);
listColModel.add(colModelcreatedTime);
listColModel.add(colModelvalue);
ResultsData resultsData = new ResultsData(DataGridMock, listColModel);
return resultsData;
} }
public IPage<MonitorFanIndicator> getFanIdxInfoByPage(String equipmentNumber, String gateway, String frontModule, int current, int size) { public IPage<IndexDto> getFanIdxInfoByPage(String equipNum, String stationId, String frontModule, int current, int size, String systemType) {
Page<MonitorFanIndicator> page = new Page<>(current, size); StationBasic stationBasic = getOneByStationNumber(stationId);
Integer integer = monitorFanIndicatorregionMapper.queryByPageTotal(equipmentNumber, gateway, frontModule); Page<IndexDto> page = new Page<>(current, size);
List<MonitorFanIndicator> monitorFanIndicators = monitorFanIndicatorregionMapper.queryByPage(page.getSize(), equipmentNumber, gateway, frontModule, (current - 1) * size); String sql = "";
page.setTotal(integer); if (StringUtils.isNotEmpty(systemType)) {
page.setRecords(monitorFanIndicators); sql = String.format("SELECT equipmentIndexName, value, frontModule, unit FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/ and systemType =~/%s/ ", stationBasic.getFanGatewayId(), equipNum, frontModule, systemType);
} else {
sql = String.format("SELECT equipmentIndexName, value, frontModule, unit FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/", stationBasic.getFanGatewayId(), equipNum, frontModule);
}
List<IndexDto> influxDBList = influxDButils.getListData(sql, IndexDto.class);
List<IndexDto> collect = influxDBList.stream()
.skip((long) (current - 1) * size)
.limit(size)
.collect(Collectors.toList());
page.setTotal(influxDBList.size());
page.setRecords(collect);
return page; return page;
} }
...@@ -100,40 +200,106 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -100,40 +200,106 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
/** /**
* 根据网关与指标获取指标的平均值 * 根据网关与指标获取指标的平均值
*
* @param gateway * @param gateway
* @param indicator * @param indicator
* @return * @return
*/ */
public Object getIndicatoralueAvage(String gateway,String indicator){ public Object getIndicatoralueAvage(String gateway, String indicator) {
return monitorFanIndicatorregionMapper.getIndicatoralueAvage(gateway,indicator); return monitorFanIndicatorregionMapper.getIndicatoralueAvage(gateway, indicator);
} }
/**
* 根据网关与指标获取指标的总值
*
* @param gateway
* @param indicator
* @return
*/
public Object getIndicatoralueTotal(String gateway, String indicator) {
return monitorFanIndicatorregionMapper.getIndicatoralueTotal(gateway, indicator);
}
private StationBasic getOneByStationNumber(String stationId) {
return stationBasicMapper.selectById(stationId);
}
public IPage<RunRecord> queryRunRecord(long size,String[] gateway, int current){ public List<IndexDto> getFanStatusList(String stationId) {
StationBasic stationBasic = getOneByStationNumber(stationId);
Page<RunRecord> page = new Page<>(current, size); String sql = String.format("SELECT equipmentNumber, equipmentIndexName as state FROM \"indicators_%s\" WHERE equipmentIndexName =~/^正常运行|告警运行|正常停机|故障停机|限功率|待机状态|维护状态|通讯中断$/ and value = 'true'", stationBasic.getFanGatewayId());
Integer integer = monitorFanIndicatorregionMapper.queryRunRecordTotal(gateway); List<IndexDto> influxDBList = influxDButils.getListData(sql, IndexDto.class);
List<RunRecord> runRecord = monitorFanIndicatorregionMapper.queryRunRecord(page.getSize(), gateway, (current - 1) * size); Map<String, String> collect = influxDBList.stream().collect(Collectors.toMap(IndexDto::getEquipmentNumber, IndexDto::getState));
page.setTotal(integer); String sqlEquipNumList = String.format("SELECT (DISTINCT equipmentNumber) as equipmentNumber FROM \"indicators_%s\"", stationBasic.getFanGatewayId());
page.setRecords(runRecord); List<IndexDto> equipNumList = influxDButils.getListData(sqlEquipNumList, IndexDto.class);
return page; equipNumList.forEach(item -> {
item.setState(collect.get(item.getEquipmentNumber()));
});
return equipNumList;
}
public List<IndexDto> getFanStatusStatistics(String stationId) {
StationBasic stationBasic = getOneByStationNumber(stationId);
String sql = String.format("SELECT equipmentNumber, equipmentIndexName FROM \"indicators_%s\" WHERE equipmentIndexName =~/^正常运行|告警运行|正常停机|故障停机|限功率|待机状态|维护状态|通讯中断$/ and value = 'true'", stationBasic.getFanGatewayId());
List<IndexDto> influxDBList = influxDButils.getListData(sql, IndexDto.class);
Map<String, Long> collect = influxDBList.stream().collect(Collectors.groupingBy(IndexDto::getEquipmentIndexName, Collectors.counting()));
List<String> list = Arrays.asList("正常运行", "告警运行", "正常停机", "故障停机", "限功率", "待机状态", "维护状态", "通讯中断");
HashMap<String, String> colorMap = new HashMap<>();
colorMap.put("正常运行", "#00aa00");
colorMap.put("告警运行", "#ffc400");
colorMap.put("正常停机", "#0055ff");
colorMap.put("故障停机", "#00aaff");
colorMap.put("限功率", "#a3f5aa");
colorMap.put("待机状态", "#ff0000");
colorMap.put("维护状态", "#ff00ff");
colorMap.put("通讯中断", "#7d8e95");
List<IndexDto> resultList = new ArrayList<>();
list.forEach(item -> {
IndexDto indexDto = new IndexDto();
indexDto.setCountString(collect.containsKey(item) ? String.valueOf(collect.get(item)) : "0");
indexDto.setEquipmentIndexName(item);
indexDto.setColor(colorMap.get(item));
resultList.add(indexDto);
});
return resultList;
}
public IndexDto getFanBasicInfoByEquipNum(String equipNum, String stationId) {
StationBasic stationBasic = getOneByStationNumber(stationId);
String sql = String.format("SELECT equipmentNumber, equipmentSpecificName, equipmentIndexName FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and value = 'true' order by time desc limit 1", stationBasic.getFanGatewayId(), equipNum);
List<IndexDto> influxDBList = influxDButils.getListData(sql, IndexDto.class);
if (CollectionUtils.isNotEmpty(influxDBList)) {
String equipmentSpecificName = influxDBList.get(0).getEquipmentSpecificName();
influxDBList.get(0).setEquipmentSpecificName(equipmentSpecificName.substring(0, equipmentSpecificName.indexOf("#")));
return influxDBList.get(0);
}
return new IndexDto();
} }
/** /**
* 根据网关与指标获取指标的总值 * 根据风机号 场站号 模块获取实时温度
* @param gateway * @param equipNum
* @param indicator * @param stationId
* @return * @param frontModule
* @return 风机的实时温度数据
*/ */
public Object getIndicatoralueTotal(String gateway,String indicator){ public HashMap<String, List<String>> getRealTimeTemperature(String equipNum, String stationId, String frontModule) {
return monitorFanIndicatorregionMapper.getIndicatoralueTotal(gateway,indicator); HashMap<String, List<String>> realTimeTemperatureResult = new HashMap<>();
StationBasic stationBasic = getOneByStationNumber(stationId);
String sql = String.format("SELECT equipmentIndexName, value, frontModule, unit FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/", stationBasic.getFanGatewayId(), equipNum, frontModule);
List<IndexDto> influxDBList = influxDButils.getListData(sql, IndexDto.class);
List<String> xList = new ArrayList<>();
List<String> yList = new ArrayList<>();
for (int i = 0; i < influxDBList.size(); i++) {
IndexDto indexDto = influxDBList.get(i);
if(indexDto.getEquipmentIndexName().contains("温度")){
xList.add(indexDto.getEquipmentIndexName());
yList.add(indexDto.getValue());
}
}
realTimeTemperatureResult.put("axisData", xList);
realTimeTemperatureResult.put("seriesData", yList);
return realTimeTemperatureResult;
} }
} }
\ No newline at end of file
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.entity.Region;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.component.emq.EmqKeeper;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
@Async
@Service
public class MonitoringServiceIMQTTmpl {
Logger logger = LoggerFactory.getLogger(MonitoringServiceIMQTTmpl.class);
/**
* 场站mapper
*/
@Autowired
StationBasicMapper stationBasicMapper;
@Autowired
CommonServiceImpl commonServiceImpl;
@Autowired
RegionMapper regionMapper;
@Autowired
EmqKeeper emqKeeper;
@Scheduled(cron = "0 0/1 * * * *")
public void getTotalSocialContribution() {
Page<SocialContributionDto> socialContributionDtoPage = new Page<SocialContributionDto>();
logger.error("--------------------------社会贡献定时执行----------------------------------------------");
List<SocialContributionDto> socialContributionDtoList = new ArrayList<>();
//定义社会贡献列表
AtomicReference<Double> totalSocialContribution = new AtomicReference<>(0.0);
//获取所有网关id不为空的数据
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("fan_gateway_id"));
stationBasicList.forEach(stationBasic -> {
totalSocialContribution.updateAndGet(v -> v + commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "年发电量"));
});
//二氧化碳贡献数
SocialContributionDto co2 = new SocialContributionDto();
//标准煤贡献度
SocialContributionDto coal = new SocialContributionDto();
//碳粉尘计算公式
SocialContributionDto toner = new SocialContributionDto();
//二氧化硫贡献度
SocialContributionDto so2 = new SocialContributionDto();
/** 社会贡献原始计算公式,后边的数据已经经过处理
//二氧化碳计算公式 *10000*832/10000/1000/1000
//标准煤计算公式 *10000*304.9/10000/1000/1000
//碳粉尘计算公式 *10000*0.032/1000/1000
//二氧化硫计算公式 =A2*10000*0.16/1000/1000
*/
co2.setUnit("二氧化碳减排量(万t)");
co2.setTitle(totalSocialContribution.get() * 0.000832);
socialContributionDtoList.add(co2);
coal.setUnit("节约标准煤(万t)");
coal.setTitle(totalSocialContribution.get() * 0.0003049);
socialContributionDtoList.add(coal);
toner.setUnit("碳粉尘减排量(万t)");
toner.setTitle(totalSocialContribution.get() * 0.00032);
socialContributionDtoList.add(toner);
so2.setUnit("二氧化硫减排量(万t)");
so2.setTitle(totalSocialContribution.get() * 0.0016);
socialContributionDtoList.add(so2);
socialContributionDtoPage.setRecords(socialContributionDtoList);
socialContributionDtoPage.setTotal(100);
socialContributionDtoPage.setCurrent(1);
try {
emqKeeper.getMqttClient().publish("socialcontribution_topic", JSON.toJSON(socialContributionDtoPage).toString().getBytes("UTF-8"), 1, true);
logger.info("-----------------发送社会贡献消息=================== 成功!" + JSON.toJSONString(socialContributionDtoPage));
} catch (Exception exception) {
logger.error("-----------------发送社会贡献消息=================== 失败!");
}
}
@Scheduled(cron = "0/30 * * * * *")
public void getCompletionOfPowerIndicatorsByProvinceName() {
Page<SocialContributionDto> socialContributionDtoPage = new Page<SocialContributionDto>();
logger.error("--------------------------区域实时数据消息开始发送----------------------------------------------");
List<SocialContributionDto> socialContributionDtoList = new ArrayList<>();
Region region = this.regionMapper.selectOne(new QueryWrapper<Region>().eq("level", 1).eq("region_name", "江西省"));
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode()));
//日发电量
AtomicReference<Double> dailyPower = new AtomicReference<>(0.0);
//月发电量
AtomicReference<Double> monthlyPower = new AtomicReference<>(0.0);
//年发电量
AtomicReference<Double> annualPower = new AtomicReference<>(0.0);
//年发电量完成比例
Double completionRatio = 23.11;
//年利用小时数
AtomicReference<Double> useHours = new AtomicReference<>(0.01);
stationBasicList.forEach(stationBasic -> {
dailyPower.updateAndGet(v -> v + commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "日发电量"));
monthlyPower.updateAndGet(v -> v + commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "月发电量"));
annualPower.updateAndGet(v -> v + commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "年发电量"));
useHours.updateAndGet(v -> v + commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "日工作时间"));
});
SocialContributionDto dailyPowerdto = new SocialContributionDto();
dailyPowerdto.setTitle(dailyPower.get());
dailyPowerdto.setUnit("万kWh");
SocialContributionDto monthlyPowerdto = new SocialContributionDto();
monthlyPowerdto.setTitle(monthlyPower.get());
monthlyPowerdto.setUnit("万kWh");
SocialContributionDto annualPowerdto = new SocialContributionDto();
annualPowerdto.setTitle(annualPower.get());
annualPowerdto.setUnit("万kWh");
SocialContributionDto completionRatioDto = new SocialContributionDto();
completionRatioDto.setTitle(completionRatio);
completionRatioDto.setUnit("%");
SocialContributionDto useHoursDto = new SocialContributionDto();
useHoursDto.setTitle(useHours.get());
useHoursDto.setUnit("h");
socialContributionDtoList.add(dailyPowerdto);
socialContributionDtoList.add(monthlyPowerdto);
socialContributionDtoList.add(annualPowerdto);
socialContributionDtoList.add(completionRatioDto);
socialContributionDtoList.add(useHoursDto);
socialContributionDtoPage.setRecords(socialContributionDtoList);
socialContributionDtoPage.setTotal(100);
socialContributionDtoPage.setCurrent(1);
try {
emqKeeper.getMqttClient().publish("completionofpowerindicator_topic", JSON.toJSON(socialContributionDtoPage).toString().getBytes("UTF-8"), 1, true);
logger.info("-----------------发送区域实时生产数据消息=================== 成功!" + JSON.toJSONString(socialContributionDtoPage));
} catch (Exception exception) {
logger.error("-----------------发送区域实时生产数据消息=================== 失败!");
}
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.injector.methods.SelectOne; import com.baomidou.mybatisplus.core.injector.methods.SelectOne;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.entity.Region; import com.yeejoin.amos.boot.module.jxiop.api.entity.Region;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic; import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationCoordinate; import com.yeejoin.amos.boot.module.jxiop.api.entity.StationCoordinate;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationCoordinateMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationCoordinateMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.RegionNationWideDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.*;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto; import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import java.net.URLDecoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@Service @Service
public class MonitoringServiceImpl { public class MonitoringServiceImpl {
Logger logger = LoggerFactory.getLogger(MonitoringServiceImpl.class);
/** /**
* 区域mapper * 区域mapper
*/ */
...@@ -42,24 +53,32 @@ public class MonitoringServiceImpl { ...@@ -42,24 +53,32 @@ public class MonitoringServiceImpl {
@Autowired @Autowired
SjglZsjZsbtzServiceImpl SjglZsjZsbtzServiceImpl; SjglZsjZsbtzServiceImpl SjglZsjZsbtzServiceImpl;
@Autowired
CommonServiceImpl commonServiceImpl;
/** /**
* 热工院-数据字典表 * 根据场站编号获取该场站的装机容量
*
* @param werks
* @return
*/ */
@Autowired public Double getStationCaPACITYL(String werks) {
TpriDmpDatabookServiceImpl TpriDmpDatabookServiceImpl; return this.SjglZsjZsbtzServiceImpl.getStationCapactityByStationWerks(werks);
}
@Autowired
MonitorFanIndicatorImpl monitorFanIndicatorImpl;
/** /**
* 根据省份名称查询电站详情 * 根据省份名称查询电站详情
*
* @param provinceName * @param provinceName
* @return * @return
*/ */
public List<RegionNationWideDto> getNationWideInfo(String provinceName){ public List<RegionNationWideDto> getNationWideInfo(String provinceName) {
List<RegionNationWideDto> regionNationWideDtoList= new ArrayList<>(); List<RegionNationWideDto> regionNationWideDtoList = new ArrayList<>();
//如果 provinceName 为空则表示当前为全国地图 否则则为省份地图 //如果 provinceName 为空则表示当前为全国地图 否则则为省份地图
if(ObjectUtils.isEmpty(provinceName)||provinceName.equals("")){ if (ObjectUtils.isEmpty(provinceName) || provinceName.equals("")) {
List<Region> regionList = this.regionMapper.selectList(new QueryWrapper<Region>().eq("level",1)); List<Region> regionList = this.regionMapper.selectList(new QueryWrapper<Region>().eq("level", 1));
for (int i = 0; i < regionList.size(); i++) { for (int i = 0; i < regionList.size(); i++) {
RegionNationWideDto regionNationWideDto = new RegionNationWideDto(); RegionNationWideDto regionNationWideDto = new RegionNationWideDto();
AtomicReference<Double> guangfuMW = new AtomicReference<>(0.0); AtomicReference<Double> guangfuMW = new AtomicReference<>(0.0);
...@@ -67,15 +86,15 @@ public class MonitoringServiceImpl { ...@@ -67,15 +86,15 @@ public class MonitoringServiceImpl {
AtomicReference<Integer> guangfu = new AtomicReference<>(0); AtomicReference<Integer> guangfu = new AtomicReference<>(0);
AtomicReference<Integer> fengdian = new AtomicReference<>(0); AtomicReference<Integer> fengdian = new AtomicReference<>(0);
Region region = regionList.get(i); Region region = regionList.get(i);
List<StationBasic> list = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area",region.getRegionCode())); List<StationBasic> list = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode()));
list.forEach(stationBasic -> { list.forEach(stationBasic -> {
if(!ObjectUtils.isEmpty(stationBasic.getGatewayId())&&!ObjectUtils.isEmpty(stationBasic.getStationNumber())){ if (!ObjectUtils.isEmpty(stationBasic.getFanGatewayId()) && !ObjectUtils.isEmpty(stationBasic.getStationNumber())) {
regionNationWideDto.setJsJoin(true); regionNationWideDto.setJsJoin(true);
} }
if(stationBasic.getStationType().equals("FDZ")){ if (stationBasic.getStationType().equals("FDZ")) {
fengdianMW.set(getStationCaPACITYL(stationBasic.getStationNumber())); fengdianMW.set(getStationCaPACITYL(stationBasic.getStationNumber()));
fengdian.getAndSet(fengdian.get() + 1); fengdian.getAndSet(fengdian.get() + 1);
}else { } else {
guangfuMW.set(getStationCaPACITYL(stationBasic.getStationNumber())); guangfuMW.set(getStationCaPACITYL(stationBasic.getStationNumber()));
guangfu.getAndSet(guangfu.get() + 1); guangfu.getAndSet(guangfu.get() + 1);
} }
...@@ -87,26 +106,36 @@ public class MonitoringServiceImpl { ...@@ -87,26 +106,36 @@ public class MonitoringServiceImpl {
regionNationWideDto.setName(region.getRegionName()); regionNationWideDto.setName(region.getRegionName());
regionNationWideDtoList.add(regionNationWideDto); regionNationWideDtoList.add(regionNationWideDto);
} }
}else { } else {
Region region = this.regionMapper.selectOne(new QueryWrapper<Region>().eq("level",1).eq("region_name",provinceName)); if(provinceName.contains("%")){
List<StationBasic> list = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area",region.getRegionCode())); try {
HashMap<String,Double> hashMap = new HashMap<>(); provinceName = URLDecoder.decode(provinceName,"UTF-8");
for (int i = 0; i <list.size() ; i++) { }catch (Exception e){
}
}
Region region = this.regionMapper.selectOne(new QueryWrapper<Region>().eq("level", 1).eq("region_name", provinceName));
List<StationBasic> list = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode()));
HashMap<String, Double> hashMap = new HashMap<>();
for (int i = 0; i < list.size(); i++) {
StationBasic stationBasic = list.get(i); StationBasic stationBasic = list.get(i);
RegionNationWideDto regionNationWideDto =new RegionNationWideDto(); RegionNationWideDto regionNationWideDto = new RegionNationWideDto();
regionNationWideDto.setStaitionId(String.valueOf(stationBasic.getSequenceNbr()));
regionNationWideDto.setStaitionName(stationBasic.getStationName()); regionNationWideDto.setStaitionName(stationBasic.getStationName());
regionNationWideDto.setStaitionType(stationBasic.getStationType()); regionNationWideDto.setStaitionType(stationBasic.getStationType());
String speendOrirradiate = ""; String speendOrirradiate = "";
if(stationBasic.getStationType().equals("FDZ")){ regionNationWideDto.setStationCapacity(String.valueOf(getStationCaPACITYL(stationBasic.getStationNumber())));
speendOrirradiate = String.valueOf( getIndicatoralueAvage(stationBasic.getGatewayId(),"30秒平均风速")); if (stationBasic.getStationType().equals("FDZ")) {
speendOrirradiate = String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(), "30秒平均风速"));
regionNationWideDto.setSpeendOrirradiate(speendOrirradiate); regionNationWideDto.setSpeendOrirradiate(speendOrirradiate);
}else{ } else {
regionNationWideDto.setSpeendOrirradiate(String.valueOf(Math.random()*1000)); regionNationWideDto.setSpeendOrirradiate(String.valueOf(Math.random() * 1000));
} }
StationCoordinate stationCoordinate = stationCoordinateMapper.selectOne(new QueryWrapper<StationCoordinate>().eq("station_id",stationBasic.getSequenceNbr()).eq("is_main_coordinate",0)); StationCoordinate stationCoordinate = stationCoordinateMapper.selectOne(new QueryWrapper<StationCoordinate>().eq("station_id", stationBasic.getSequenceNbr()).eq("is_main_coordinate", 0));
hashMap.put("lng", Double.valueOf(stationCoordinate.getLongitude())); hashMap.put("lng", Double.valueOf(stationCoordinate.getLongitude()));
hashMap.put("lat", Double.valueOf(stationCoordinate.getLaitude())); hashMap.put("lat", Double.valueOf(stationCoordinate.getLaitude()));
regionNationWideDto.setPosition(hashMap); regionNationWideDto.setPosition(hashMap);
regionNationWideDtoList.add(regionNationWideDto); regionNationWideDtoList.add(regionNationWideDto);
} }
...@@ -114,64 +143,41 @@ public class MonitoringServiceImpl { ...@@ -114,64 +143,41 @@ public class MonitoringServiceImpl {
return regionNationWideDtoList; return regionNationWideDtoList;
} }
/**
* 根据场站编号获取该场站的装机容量
* @param werks
* @return
*/
public Double getStationCaPACITYL(String werks){
return this.SjglZsjZsbtzServiceImpl.getStationCapactityByStationWerks(werks);
}
/**
* 根据网关id以及指标值 获取同一网关下指标的平均值
* @param gateway 网关id
* @param indicatorcName 指标名称
* @return 同一网关下指标的平均值
*/
public Object getIndicatoralueAvage (String gateway ,String indicatorcName){
return this.monitorFanIndicatorImpl.getIndicatoralueAvage(gateway,indicatorcName);
}
/**
* 根据网关id以及指标值 同一网关下指标的值总和
* @param gateway 网关id
* @param indicatorcName 指标名称
* @return 同一网关下指标的值总和
*/
public Object getIndicatoralueTotal (String gateway ,String indicatorcName){
return this.monitorFanIndicatorImpl.getIndicatoralueTotal(gateway,indicatorcName);
}
public List<SocialContributionDto> getTotalSocialContribution(){ public ResultsData getCompletionOfPowerIndicatorsByProvinceName(int current, int size, String provinceName) {
List<SocialContributionDto> socialContributionDtoList =new ArrayList<>(); Region region = this.regionMapper.selectOne(new QueryWrapper<Region>().eq("level", 1).eq("region_name", provinceName));
AtomicReference<Double> totalSocialContribution = new AtomicReference<>(0.0); List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode()));
//获取所有网关id不为空的数据 List<ColModel> colModels = new ArrayList<>();
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("gateway_id")); List<CompletionOfPowerIndicatorsDto> completionOfPowerIndicatorsDtoList = new ArrayList<>();
ColModel colModelStatitonName = new ColModel("stationName", "stationName", "场站", "场站", "dataGrid", "stationName");
ColModel colModelInstallCapactity = new ColModel("installCapactity", "installCapactity", "装机容量", "装机容量", "dataGrid", "installCapactity");
ColModel colModelWindSpeedOrIrradiance = new ColModel("windSpeedOrIrradiance", "windSpeedOrIrradiance", "风度/辐照度", "风度/辐照度", "dataGrid", "windSpeedOrIrradiance");
ColModel colModelActivePower = new ColModel("activePower", "activePower", "有功", "有功", "dataGrid", "activePower");
ColModel colModelDailyPower = new ColModel("dailyPower", "dailyPower", "日发电量", "日发电量", "dataGrid", "dailyPower");
ColModel colModelMonthlyPower = new ColModel("monthlyPower", "monthlyPower", "月发电量", "月发电量", "dataGrid", "monthlyPower");
ColModel colModelAnnualPower = new ColModel("annualPower", "annualPower", "年发电量", "年发电量", "dataGrid", "annualPower");
colModels.add(colModelStatitonName);
colModels.add(colModelInstallCapactity);
colModels.add(colModelWindSpeedOrIrradiance);
colModels.add(colModelActivePower);
colModels.add(colModelDailyPower);
colModels.add(colModelMonthlyPower);
colModels.add(colModelAnnualPower);
//遍历列表
stationBasicList.forEach(stationBasic -> { stationBasicList.forEach(stationBasic -> {
totalSocialContribution.updateAndGet(v -> v + (Double) monitorFanIndicatorImpl.getIndicatoralueTotal(stationBasic.getGatewayId(), "年发电量")); CompletionOfPowerIndicatorsDto completionOfPowerIndicatorsDto = new CompletionOfPowerIndicatorsDto();
completionOfPowerIndicatorsDto.setStationName(stationBasic.getStationName());
completionOfPowerIndicatorsDto.setInstallCapactity(String.valueOf(getStationCaPACITYL(stationBasic.getStationNumber())));
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(),"30秒平均风速")));
completionOfPowerIndicatorsDto.setActivePower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"有功功率")));
completionOfPowerIndicatorsDto.setDailyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"日发电量")));
completionOfPowerIndicatorsDto.setMonthlyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"月发电量")));
completionOfPowerIndicatorsDto.setAnnualPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"年发电量")));
completionOfPowerIndicatorsDtoList.add(completionOfPowerIndicatorsDto);
}); });
SocialContributionDto co2 = new SocialContributionDto(); Integer allsize = completionOfPowerIndicatorsDtoList.size();
SocialContributionDto coal = new SocialContributionDto(); DataGridMock dataGridMock = new DataGridMock(current, allsize, false, allsize/size+1,completionOfPowerIndicatorsDtoList);
SocialContributionDto toner = new SocialContributionDto(); ResultsData resultsData = new ResultsData(dataGridMock, colModels);
SocialContributionDto so2 = new SocialContributionDto(); return resultsData;
/** 社会贡献原始计算公式,后边的数据已经经过处理
//二氧化碳计算公式 *10000*832/10000/1000/1000
//标准煤计算公式 *10000*304.9/10000/1000/1000
//碳粉尘计算公式 *10000*0.032/1000/1000
//二氧化硫计算公式 =A2*10000*0.16/1000/1000
*/
co2.setUnit("二氧化碳减排量(万t)");
co2.setTitle(totalSocialContribution.get() * 0.000832);
socialContributionDtoList.add(co2);
coal.setUnit("节约标准煤(万t)");
coal.setTitle(totalSocialContribution.get() * 0.0003049);
socialContributionDtoList.add(coal);
toner.setUnit("碳粉尘减排量(万t)");
toner.setTitle(totalSocialContribution.get() * 0.00032);
socialContributionDtoList.add(toner);
so2.setUnit("二氧化硫减排量(万t)");
so2.setTitle(totalSocialContribution.get() * 0.0016);
socialContributionDtoList.add(so2);
return socialContributionDtoList;
} }
} }
...@@ -78,7 +78,7 @@ public class StationDataTaskImpl { ...@@ -78,7 +78,7 @@ public class StationDataTaskImpl {
return deviceDtoList; return deviceDtoList;
} }
@Async("jxiopAsyncExecutor") // @Async("jxiopAsyncExecutor")
public List<IndexDto> getIndexDto(DeviceDto deviceDto) { public List<IndexDto> getIndexDto(DeviceDto deviceDto) {
String querysql ="SELECT createdTime ,gatewayId,address,valueLabel ,equipmentsIdx FROM iot_data WHERE equipmentSpecificName=~/.*"+deviceDto.getNumberName()+"风机"+".*/ and gatewayId='"+deviceDto.getGateway()+"' ORDER BY time desc LIMIT 600"; String querysql ="SELECT createdTime ,gatewayId,address,valueLabel ,equipmentsIdx FROM iot_data WHERE equipmentSpecificName=~/.*"+deviceDto.getNumberName()+"风机"+".*/ and gatewayId='"+deviceDto.getGateway()+"' ORDER BY time desc LIMIT 600";
//每个分机的指标数据 //每个分机的指标数据
......
...@@ -26,7 +26,7 @@ public class StationDataTask { ...@@ -26,7 +26,7 @@ public class StationDataTask {
//定时获取场站指标最新数据 //定时获取场站指标最新数据
@Scheduled(cron = "${station.task.cron}") // @Scheduled(cron = "${station.task.cron}")
public void getStationDataTask(){ public void getStationDataTask(){
//获取所有场站信息 //获取所有场站信息
List<StationTaksDto> list=stationDataTask.getListStationBasic(); List<StationTaksDto> list=stationDataTask.getListStationBasic();
......
...@@ -5,6 +5,7 @@ import org.influxdb.dto.QueryResult; ...@@ -5,6 +5,7 @@ import org.influxdb.dto.QueryResult;
import org.springframework.beans.BeanWrapperImpl; import org.springframework.beans.BeanWrapperImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -48,4 +49,46 @@ public class InfluxDButils { ...@@ -48,4 +49,46 @@ public class InfluxDButils {
} }
return list; return list;
} }
public <T> List<T> getListData1(String sql, Class<T> clazz) {
List<T> list = new ArrayList<>();
try {
QueryResult query = influxDbConnection.query(sql);
List<QueryResult.Result> queryResults = query.getResults();
for (QueryResult.Result result : queryResults) {
List<QueryResult.Series> series = result.getSeries();
if (series == null) {
continue;
}
for (QueryResult.Series serie : series) {
List<List<Object>> values = serie.getValues();
List<String> columns = serie.getColumns();
for (int i = 0; i < values.size(); ++i) {
T object = clazz.newInstance();
BeanWrapperImpl bean = new BeanWrapperImpl(object);
for (int j = 0; j < columns.size(); ++j) {
String k = columns.get(j).replace("last_","");
Object v = values.get(i).get(j);
System.out.println(k);
System.out.println(v);
if ("time".equals(k)) {
continue;
} else {
// if(ObjectUtils.isEmpty(v)){
// bean.setPropertyValue(k, "");
// }else{
bean.setPropertyValue(k, v);
// }
}
}
list.add(object);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return list;
}
} }
...@@ -53,9 +53,13 @@ lettuce.timeout=10000 ...@@ -53,9 +53,13 @@ lettuce.timeout=10000
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.3.18:2883 emqx.broker=tcp://172.16.10.220:1883
emqx.user-name=super emqx.user-name=admin
emqx.password=a123456 emqx.password=public
mqtt.scene.host=mqtt://172.16.10.220:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000
emqx.max-inflight=1000 emqx.max-inflight=1000
......
...@@ -66,8 +66,8 @@ privilege.fegin.name=AMOS-API-PRIVILEGE ...@@ -66,8 +66,8 @@ privilege.fegin.name=AMOS-API-PRIVILEGE
feign.client.config.default.connect-timeout=20000 feign.client.config.default.connect-timeout=20000
feign.client.config.default.read-timeout=20000 feign.client.config.default.read-timeout=20000
#场站实时数据 #场站实时数据
station.task.cron=0/10 * * * * ? station.task.cron=* * */10 * * ?
#是否切片 #是否切片
station.isok=true station.isok=false
#风机更新数据切片量 #风机更新数据切片量
station.section=10 station.section=1000
\ No newline at end of file \ No newline at end of file
...@@ -12,6 +12,11 @@ public class UseUnitCreditCodeCategoryDto { ...@@ -12,6 +12,11 @@ public class UseUnitCreditCodeCategoryDto {
* 使用单位编码 * 使用单位编码
*/ */
private String useUnitCreditCode; private String useUnitCreditCode;
/**
* 管辖机构编码
*/
private String orgBranchCode;
/** /**
* 状态 * 状态
*/ */
......
package com.yeejoin.amos.boot.module.tzs.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum ImageSizeEnums {
/**
* 导出监管码、96333码尺寸
*/
// 监管码-大
JG_BIG("JG_BIG", "bigBg.png", 350, 350, 60, 720, 190, 0, 0, 780, 680),
// 监管码-中
JG_MID("JG_MID", "centreBg.png", 230, 230, 40, 480, 170, 0, 0, 520, 525),
// 监管码-小
JG_MIN("JG_MIN", "smallBg.png", 170, 170, 30, 360, 110, 0, 0, 380, 355),
// 96333电梯码
DT("DT", "dt.png", 170, 170, 30, 30, 110, 0, 0, 330, 355);
String code;
String bgPath;
Integer with;
Integer height;
Integer size;
Integer imagesX;
Integer imagesY;
Integer text1X;
Integer text1Y;
Integer text2X;
Integer text2Y;
public static ImageSizeEnums getEnumByCode(String code) {
for (ImageSizeEnums value : ImageSizeEnums.values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}
}
...@@ -39,7 +39,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -39,7 +39,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
Map<String, Object> getCategoryAndDefineByRecord(@Param("record") String record); Map<String, Object> getCategoryAndDefineByRecord(@Param("record") String record);
List<Map<String, Object>> getAllUnit(@Param("unitCodes")List<String> unitCodes); List<Map<String, Object>> getAllUnit(@Param("unitCodes")List<String> unitCodes,@Param("orgBranchCodes")List<String> orgBranchCodes);
List<Map<String, Object>> getCategoryData(String level, String orgCode, String companyCode); List<Map<String, Object>> getCategoryData(String level, String orgCode, String companyCode);
......
...@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.SuperviseInfo; ...@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.SuperviseInfo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 特种设备基本信息-监督管理信息 Mapper 接口 * 特种设备基本信息-监督管理信息 Mapper 接口
...@@ -16,7 +17,7 @@ public interface SuperviseInfoMapper extends BaseMapper<SuperviseInfo> { ...@@ -16,7 +17,7 @@ public interface SuperviseInfoMapper extends BaseMapper<SuperviseInfo> {
void updateRecordBatch(@Param("recordList") List<String> recordList); void updateRecordBatch(@Param("recordList") List<String> recordList);
List<String> selectUnitCodeList(@Param("records") List<String> records); List<Map<String,Object>> selectUnitCodeList(@Param("records") List<String> records);
List<String> selectSuperviseCodeList(@Param("records") List<String> records); List<String> selectSuperviseCodeList(@Param("records") List<String> records);
void deleteDataAll(@Param("records") List<String> records); void deleteDataAll(@Param("records") List<String> records);
......
...@@ -84,6 +84,7 @@ public interface IdxFeignService { ...@@ -84,6 +84,7 @@ public interface IdxFeignService {
FeignClientResult<String> submit(@RequestParam(value = "pageId") long pageId, FeignClientResult<String> submit(@RequestParam(value = "pageId") long pageId,
@RequestParam(value = "taskId",required = false) String taskId, @RequestParam(value = "taskId",required = false) String taskId,
@RequestParam(value = "planInstanceId", required = false) String planInstanceId, @RequestParam(value = "planInstanceId", required = false) String planInstanceId,
@RequestParam(value = "bizField", required = false) String bizField,
@RequestParam(value = "topic", required = false) String topic, @RequestParam(value = "topic", required = false) String topic,
@RequestParam(value = "tableName", required = false) String tableName, @RequestParam(value = "tableName", required = false) String tableName,
@RequestBody Map<String, Object> kv) throws Exception; @RequestBody Map<String, Object> kv) throws Exception;
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
<if test="status != null and status != ''"> <if test="status != null and status != ''">
and status = #{status} and status = #{status}
</if> </if>
ORDER BY CODE96333 DESC LIMIT 1 <if test="status != 2 ">ORDER BY CODE96333 DESC LIMIT 1 </if>
<if test="status == 2 ">ORDER BY CODE96333 ASC LIMIT 1 </if>
</select> </select>
<select id="selectEquipInfo" resultType="com.yeejoin.amos.boot.module.tzs.api.dto.EquInfoDto"> <select id="selectEquipInfo" resultType="com.yeejoin.amos.boot.module.tzs.api.dto.EquInfoDto">
......
...@@ -129,22 +129,27 @@ ...@@ -129,22 +129,27 @@
<select id="getAllUnit" resultType="java.util.Map"> <select id="getAllUnit" resultType="java.util.Map">
SELECT SELECT
DISTINCT (USE_UNIT_CREDIT_CODE) use_code, ibjui.USE_UNIT_CREDIT_CODE use_code,
ifnull(ORG_BRANCH_CODE,50) supervise_org_code ibjsi.ORG_BRANCH_CODE supervise_org_code
FROM FROM
idx_biz_jg_use_info ibjui idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_supervision_info ibjsi ON ibjui."RECORD" = ibjsi."RECORD" LEFT JOIN idx_biz_jg_supervision_info ibjsi ON ibjui."RECORD" = ibjsi."RECORD"
WHERE WHERE
USE_UNIT_CREDIT_CODE <![CDATA[ <> ]]> '' ibjui.USE_UNIT_CREDIT_CODE <![CDATA[ <> ]]> ''
AND (lengthb(USE_UNIT_CREDIT_CODE)= 15 or lengthb(USE_UNIT_CREDIT_CODE)= 18) AND (lengthb(ibjui.USE_UNIT_CREDIT_CODE)= 15 or lengthb(ibjui.USE_UNIT_CREDIT_CODE)= 18)
<if test="unitCodes !=null and unitCodes.size>0"> <if test="unitCodes !=null and unitCodes.size>0">
and USE_UNIT_CREDIT_CODE in and ibjui.USE_UNIT_CREDIT_CODE in
<foreach collection="unitCodes" separator="," item="unitCode" open="(" close=")"> <foreach collection="unitCodes" separator="," item="unitCode" open="(" close=")">
#{unitCode} #{unitCode}
</foreach> </foreach>
</if> </if>
GROUP BY use_code <if test="orgBranchCodes !=null and orgBranchCodes.size>0">
ORDER BY use_code and ibjsi.ORG_BRANCH_CODE in
<foreach collection="orgBranchCodes" separator="," item="orgBranchCode" open="(" close=")">
#{orgBranchCode}
</foreach>
</if>
GROUP BY use_code,supervise_org_code
</select> </select>
<select id="getCategoryData" resultType="java.util.Map"> <select id="getCategoryData" resultType="java.util.Map">
...@@ -301,6 +306,7 @@ ...@@ -301,6 +306,7 @@
<select id="useUnitCreditCodeCategoryCount" resultType="com.yeejoin.amos.boot.module.tzs.api.dto.UseUnitCreditCodeCategoryDto"> <select id="useUnitCreditCodeCategoryCount" resultType="com.yeejoin.amos.boot.module.tzs.api.dto.UseUnitCreditCodeCategoryDto">
SELECT SELECT
ibjsi."ORG_BRANCH_CODE",
ibjui."USE_UNIT_CREDIT_CODE", ibjui."USE_UNIT_CREDIT_CODE",
ibjoi."CLAIM_STATUS", ibjoi."CLAIM_STATUS",
ibjri."EQU_LIST", ibjri."EQU_LIST",
...@@ -309,12 +315,12 @@ ...@@ -309,12 +315,12 @@
idx_biz_jg_use_info ibjui idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_register_info ibjri ON ibjui.RECORD = ibjri.RECORD LEFT JOIN idx_biz_jg_register_info ibjri ON ibjui.RECORD = ibjri.RECORD
LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjui.RECORD = ibjoi.RECORD LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjui.RECORD = ibjoi.RECORD
LEFT JOIN idx_biz_jg_supervision_info ibjsi ON ibjsi."RECORD" = ibjui."RECORD"
where where
ibjoi."CLAIM_STATUS" <![CDATA[ <> ]]> '' ibjoi."CLAIM_STATUS" <![CDATA[ <> ]]> ''
and ibjui."USE_UNIT_CREDIT_CODE" <![CDATA[ <> ]]> '' and ibjui."USE_UNIT_CREDIT_CODE" <![CDATA[ <> ]]> ''
and ibjri."EQU_LIST" <![CDATA[ <> ]]> '' and ibjri."EQU_LIST" <![CDATA[ <> ]]> ''
GROUP BY ibjui."USE_UNIT_CREDIT_CODE", ibjoi."CLAIM_STATUS",ibjri."EQU_LIST" GROUP BY ibjui."USE_UNIT_CREDIT_CODE",ibjsi."ORG_BRANCH_CODE", ibjoi."CLAIM_STATUS",ibjri."EQU_LIST"
ORDER BY ibjui."USE_UNIT_CREDIT_CODE"
</select> </select>
<select id="getEquipExportData" resultType="com.yeejoin.amos.boot.module.tzs.api.vo.EquipExportVo"> <select id="getEquipExportData" resultType="com.yeejoin.amos.boot.module.tzs.api.vo.EquipExportVo">
select ORG_BRANCH_NAME as orgBranchName, select ORG_BRANCH_NAME as orgBranchName,
...@@ -345,6 +351,7 @@ ...@@ -345,6 +351,7 @@
<if test="dto.ORG_BRANCH_NAME != '' and dto.ORG_BRANCH_NAME != null">and ORG_BRANCH_NAME = #{dto.ORG_BRANCH_NAME}</if> <if test="dto.ORG_BRANCH_NAME != '' and dto.ORG_BRANCH_NAME != null">and ORG_BRANCH_NAME = #{dto.ORG_BRANCH_NAME}</if>
<if test="dto.USE_PLACE != '' and dto.USE_PLACE != null">and USE_PLACE = #{dto.USE_PLACE}</if> <if test="dto.USE_PLACE != '' and dto.USE_PLACE != null">and USE_PLACE = #{dto.USE_PLACE}</if>
<if test="dto.STATUS != '' and dto.STATUS != null">and STATUS = #{dto.STATUS}</if> <if test="dto.STATUS != '' and dto.STATUS != null">and STATUS = #{dto.STATUS}</if>
<if test="dto.EQU_CATEGORY != '' and dto.EQU_CATEGORY != null">and EQU_CATEGORY = #{dto.EQU_CATEGORY}</if>
<if test="dto.USE_UNIT_CREDIT_CODE != '' and dto.USE_UNIT_CREDIT_CODE != null">and USE_UNIT_CREDIT_CODE like concat('%', #{dto.USE_UNIT_CREDIT_CODE},'%')</if> <if test="dto.USE_UNIT_CREDIT_CODE != '' and dto.USE_UNIT_CREDIT_CODE != null">and USE_UNIT_CREDIT_CODE like concat('%', #{dto.USE_UNIT_CREDIT_CODE},'%')</if>
<if test="dto.ORG_BRANCH_CODE != '' and dto.ORG_BRANCH_CODE != null">and ORG_BRANCH_CODE like concat('%', #{dto.ORG_BRANCH_CODE},'%')</if> <if test="dto.ORG_BRANCH_CODE != '' and dto.ORG_BRANCH_CODE != null">and ORG_BRANCH_CODE like concat('%', #{dto.ORG_BRANCH_CODE},'%')</if>
<if test='dto.ids != null'> and SEQUENCE_NBR in <if test='dto.ids != null'> and SEQUENCE_NBR in
......
...@@ -9,15 +9,18 @@ ...@@ -9,15 +9,18 @@
</foreach> </foreach>
</update> </update>
<select id="selectUnitCodeList" resultType="java.lang.String"> <select id="selectUnitCodeList" resultType="java.util.Map">
SELECT SELECT
DISTINCT ( USE_UNIT_CREDIT_CODE ) unitCode ui."USE_UNIT_CREDIT_CODE" unitCode,
si."ORG_BRANCH_CODE" orgBranchCode
FROM FROM
idx_biz_jg_use_info ui idx_biz_jg_use_info ui
left join idx_biz_jg_supervision_info si ON ui."RECORD" = si."RECORD"
WHERE ui."RECORD" in WHERE ui."RECORD" in
<foreach collection="records" separator="," item="record" open="(" close=")"> <foreach collection="records" separator="," item="record" open="(" close=")">
#{record} #{record}
</foreach> </foreach>
GROUP BY unitCode,orgBranchCode
</select> </select>
<select id="selectSuperviseCodeList" resultType="java.lang.String"> <select id="selectSuperviseCodeList" resultType="java.lang.String">
......
package com.yeejoin.amos.boot.module.tzs.biz.controller; package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...@@ -13,13 +14,16 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.EquipExportDto; ...@@ -13,13 +14,16 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.EquipExportDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto; import com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo; import com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo;
import com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory; import com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.tzs.api.enums.ImageSizeEnums;
import com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper; import com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService; import com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService;
import com.yeejoin.amos.boot.module.tzs.api.vo.EquipExportVo; import com.yeejoin.amos.boot.module.tzs.api.vo.EquipExportVo;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.EquipmentCategoryServiceImpl; import com.yeejoin.amos.boot.module.tzs.biz.service.impl.EquipmentCategoryServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.utils.ImageUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -30,10 +34,12 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel; ...@@ -30,10 +34,12 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList; import java.io.*;
import java.util.Collection; import java.net.URL;
import java.util.List; import java.util.*;
import java.util.Map; import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/** /**
* 装备分类 * 装备分类
...@@ -55,6 +61,13 @@ public class EquipmentCategoryController extends BaseController { ...@@ -55,6 +61,13 @@ public class EquipmentCategoryController extends BaseController {
EquipmentCategoryMapper equipmentCategoryMapper; EquipmentCategoryMapper equipmentCategoryMapper;
@Value("${regulatory_code_prefix}")
String REGULATORY_CODE_PREFIX ;
/**
* 监管码背景图路径
*/
private static final String BASE_PATH = "amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/temp/";
/** /**
* 新增装备分类 * 新增装备分类
...@@ -374,6 +387,64 @@ public class EquipmentCategoryController extends BaseController { ...@@ -374,6 +387,64 @@ public class EquipmentCategoryController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/exportImage")
@ApiOperation(httpMethod = "GET", value = "设备监管码下载", notes = "设备监管码下载")
public void exportImage(HttpServletResponse response, @RequestParam("code") String code, @RequestParam("type") String type) throws IOException {
FileInputStream bgImgFile = null;
ImageSizeEnums imageSizeEnums = ImageSizeEnums.getEnumByCode(type);
try {
bgImgFile = new FileInputStream(BASE_PATH + imageSizeEnums.getBgPath());
} catch (FileNotFoundException e) {
e.printStackTrace();
}
File QrCodeFile = new File(BASE_PATH + code + ".png");
ImageUtils.creatQRCode(QrCodeFile, bgImgFile, imageSizeEnums.getWith(), imageSizeEnums.getHeight(), REGULATORY_CODE_PREFIX+code, "", code, imageSizeEnums.getSize(), imageSizeEnums.getImagesX(), imageSizeEnums.getImagesY(), imageSizeEnums.getText1X(), imageSizeEnums.getText1Y(), imageSizeEnums.getText2X(), imageSizeEnums.getText2Y());
ImageUtils.downloadResource(code + ".png", BASE_PATH + code + ".png", response);
QrCodeFile.delete();
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/exportImageZip")
@ApiOperation(httpMethod = "GET", value = "设备信息导出", notes = "设备信息导出")
public void exportImageZip(HttpServletResponse response, EquipExportDto dto, @RequestParam("type") String type) throws IOException {
File delete = new File(BASE_PATH + "images");
if (!delete.exists()) {
delete.mkdir();
}
ImageSizeEnums imageSizeEnums = ImageSizeEnums.getEnumByCode(type);
//创建list 存放图片
List<File> fileList = new ArrayList<>();
List<EquipExportVo> equipExportData = equipmentCategoryServiceImpl.getEquipExportData(dto);
List<EquipExportVo> unique = equipExportData.stream().collect(
Collectors. collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getSupervisoryCode() + ";" + o.getCode96333()))), ArrayList::new)
);
for (EquipExportVo equipExportDatum : unique) {
FileInputStream bgImgFile = new FileInputStream(BASE_PATH + imageSizeEnums.getBgPath());
if ("DT".equals(type) && !ObjectUtils.isEmpty(equipExportDatum.getCode96333())) {
File QrCodeFile = new File(BASE_PATH + "images/" + equipExportDatum.getCode96333() + ".png");
ImageUtils.creatQRCode(QrCodeFile, bgImgFile, imageSizeEnums.getWith(), imageSizeEnums.getHeight(), REGULATORY_CODE_PREFIX+equipExportDatum.getCode96333(), "", equipExportDatum.getCode96333(), imageSizeEnums.getSize(), imageSizeEnums.getImagesX(), imageSizeEnums.getImagesY(), imageSizeEnums.getText1X(), imageSizeEnums.getText1Y(), imageSizeEnums.getText2X(), imageSizeEnums.getText2Y());
fileList.add(new File(BASE_PATH + "images/" + equipExportDatum.getCode96333() + ".png"));
} else if (!ObjectUtils.isEmpty(equipExportDatum.getSupervisoryCode())) {
File QrCodeFile = new File(BASE_PATH + "images/" + equipExportDatum.getSupervisoryCode() + ".png");
ImageUtils.creatQRCode(QrCodeFile, bgImgFile, imageSizeEnums.getWith(), imageSizeEnums.getHeight(), REGULATORY_CODE_PREFIX+equipExportDatum.getSupervisoryCode(), "", equipExportDatum.getSupervisoryCode(), imageSizeEnums.getSize(), imageSizeEnums.getImagesX(), imageSizeEnums.getImagesY(), imageSizeEnums.getText1X(), imageSizeEnums.getText1Y(), imageSizeEnums.getText2X(), imageSizeEnums.getText2Y());
fileList.add(new File(BASE_PATH + "images/" + equipExportDatum.getSupervisoryCode() + ".png"));
}
bgImgFile.close();
}
File zipFile = new File(BASE_PATH + "images/imageZip.zip");
zipFile.createTempFile("imageZip", ".zip");
// 调用压缩方法
ImageUtils.zipFiles(fileList, zipFile);
ImageUtils.downloadResourceZip("imageZip.zip", BASE_PATH + "images/imageZip.zip", response);
zipFile.delete();
ImageUtils.deleteAllFilesOfDir(delete);
if (delete.exists()) {
ImageUtils.deleteAllFilesOfDir(delete);
}
}
} }
...@@ -162,6 +162,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -162,6 +162,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private static String USE_CODE = "use_code"; private static String USE_CODE = "use_code";
private static String ORG_BRANCH_CODE = "supervise_org_code";
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -495,6 +497,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -495,6 +497,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
categoryOtherInfo = categoryOtherInfoMapper.selectElevatorCode(prefix, EquipmentCategoryEnum.WSY.getCode()); categoryOtherInfo = categoryOtherInfoMapper.selectElevatorCode(prefix, EquipmentCategoryEnum.WSY.getCode());
//如果存在未使用的电梯码则启用未使用的否则创建 //如果存在未使用的电梯码则启用未使用的否则创建
String elevator = ObjectUtils.isEmpty(categoryOtherInfo) ? createElevatorCode(city, county) : categoryOtherInfo.getCode(); String elevator = ObjectUtils.isEmpty(categoryOtherInfo) ? createElevatorCode(city, county) : categoryOtherInfo.getCode();
if(!ObjectUtils.isEmpty(categoryOtherInfo)){
supervisoryCodeInfoMapper.delete(new QueryWrapper<SupervisoryCodeInfo>().eq("code96333",categoryOtherInfo.getCode()));
}
elevatorCode.append(elevator); elevatorCode.append(elevator);
resultMap.put("creatStatus",CREATE); resultMap.put("creatStatus",CREATE);
} else { } else {
...@@ -692,10 +697,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -692,10 +697,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
Long count = bizJdbcTemplate.queryForObject(countSql, Long.class); Long count = bizJdbcTemplate.queryForObject(countSql, Long.class);
String finalSelectSql = selectSql; String finalSelectSql = selectSql;
System.out.println("列表查询sql为--------->>>>>>>>" + finalSelectSql);
List<Map<String, Object>> mapList = bizJdbcTemplate.queryForList(finalSelectSql); List<Map<String, Object>> mapList = bizJdbcTemplate.queryForList(finalSelectSql);
page.setTotal(count); page.setTotal(count);
page.setRecords(mapList); page.setRecords(mapList);
return page; return page;
} }
...@@ -707,6 +712,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -707,6 +712,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
*/ */
private static final String LEVEL = "company"; private static final String LEVEL = "company";
private static final String EQUSTATE = "EQU_STATE"; private static final String EQUSTATE = "EQU_STATE";
private static final String USEPLACE = "USE_PLACE";
public Page<Map<String, Object>> getTable(Map<String, Object> map) { public Page<Map<String, Object>> getTable(Map<String, Object> map) {
...@@ -716,6 +722,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -716,6 +722,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
ResponseModel<Page<Map<String, Object>>> model = new ResponseModel<>(); ResponseModel<Page<Map<String, Object>>> model = new ResponseModel<>();
List<JSONObject> objectList = getCompanyType(); List<JSONObject> objectList = getCompanyType();
List<Map<String, Object>> res = new ArrayList<>(); List<Map<String, Object>> res = new ArrayList<>();
if (!ObjectUtils.isEmpty(map.get(USEPLACE))) {
String uesPlace = map.get(USEPLACE).toString();
String address = uesPlace.substring(1, uesPlace.length() - 1);
address = address.replace(", ", "/");
map.put(USEPLACE, address);
}
Long total = 0L; Long total = 0L;
for (JSONObject object : objectList) { for (JSONObject object : objectList) {
String level = object.getString("level"); String level = object.getString("level");
...@@ -855,15 +867,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -855,15 +867,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
log.info("初始化一码通总览数据开始"); log.info("初始化一码通总览数据开始");
} }
equipmentCategoryDataService.remove(new QueryWrapper<>()); equipmentCategoryDataService.remove(new QueryWrapper<>());
getCategoryData(null); getCategoryData(null,null);
} }
private List<EquipmentCategoryData> getCategoryData(List<String> unitCodes) { private List<EquipmentCategoryData> getCategoryData(List<String> unitCodes,List<String> orgBranchCodes) {
StopWatch stopWatch = new StopWatch(); StopWatch stopWatch = new StopWatch();
stopWatch.start(); stopWatch.start();
List<EquipmentCategoryData> list = new ArrayList<>(); List<EquipmentCategoryData> list = new ArrayList<>();
// 查询所有单位 // 查询所有单位
List<Map<String, Object>> allUnitList = equipmentCategoryMapper.getAllUnit(unitCodes); List<Map<String, Object>> allUnitList = equipmentCategoryMapper.getAllUnit(unitCodes,orgBranchCodes);
// 统计查询不同单位、不同装备定义、不同状态下的设备数量 // 统计查询不同单位、不同装备定义、不同状态下的设备数量
List<UseUnitCreditCodeCategoryDto> equipCountList = equipmentCategoryMapper.useUnitCreditCodeCategoryCount(); List<UseUnitCreditCodeCategoryDto> equipCountList = equipmentCategoryMapper.useUnitCreditCodeCategoryCount();
// 查询8大类设备定义 // 查询8大类设备定义
...@@ -878,6 +890,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -878,6 +890,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
equipmentCategoryData.setUnitCode(map.get(USE_CODE).toString()); equipmentCategoryData.setUnitCode(map.get(USE_CODE).toString());
// 指定单位的设备统计信息 // 指定单位的设备统计信息
List<UseUnitCreditCodeCategoryDto> unitEquipCountList = equipCountList.stream().filter(r->r.getUseUnitCreditCode().equals(map.get(USE_CODE).toString())).collect(Collectors.toList()); List<UseUnitCreditCodeCategoryDto> unitEquipCountList = equipCountList.stream().filter(r->r.getUseUnitCreditCode().equals(map.get(USE_CODE).toString())).collect(Collectors.toList());
unitEquipCountList = unitEquipCountList.stream().filter(r->r.getOrgBranchCode().equals(map.get(ORG_BRANCH_CODE).toString())).collect(Collectors.toList());
for (EquipmentCategory category : equipmentCategories) { for (EquipmentCategory category : equipmentCategories) {
Map<String, Object> data = new HashMap<>(); Map<String, Object> data = new HashMap<>();
data.put("waitClaim", unitEquipCountList.stream().filter(r->r.getEquList().equals(category.getCode()) && EquipmentCategoryEnum.DRL.getName().equals(r.getClaimStatus())).collect(Collectors.summarizingLong(UseUnitCreditCodeCategoryDto::getTotal)).getSum()); data.put("waitClaim", unitEquipCountList.stream().filter(r->r.getEquList().equals(category.getCode()) && EquipmentCategoryEnum.DRL.getName().equals(r.getClaimStatus())).collect(Collectors.summarizingLong(UseUnitCreditCodeCategoryDto::getTotal)).getSum());
...@@ -888,14 +901,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -888,14 +901,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
equipmentCategoryData.setRecDate(new Date()); equipmentCategoryData.setRecDate(new Date());
list.add(equipmentCategoryData); list.add(equipmentCategoryData);
} }
if(ObjectUtils.isEmpty(unitCodes)){ if(!ObjectUtils.isEmpty(unitCodes)){
equipmentCategoryDataService.saveOrUpdateBatch(list); equipmentCategoryDataMapper.delete(new QueryWrapper<EquipmentCategoryData>().in("unit_code",unitCodes));
} else {
for (EquipmentCategoryData equipmentCategoryData : list) {
equipmentCategoryDataService.update(equipmentCategoryData,
new QueryWrapper<EquipmentCategoryData>().eq("unit_code", equipmentCategoryData.getUnitCode()));
}
} }
equipmentCategoryDataService.saveOrUpdateBatch(list);
stopWatch.stop(); stopWatch.stop();
if(log.isInfoEnabled()){ if(log.isInfoEnabled()){
log.info("总览数据刷新结束,耗时:{} 秒",stopWatch.getTotalTimeSeconds()); log.info("总览数据刷新结束,耗时:{} 秒",stopWatch.getTotalTimeSeconds());
...@@ -944,11 +953,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -944,11 +953,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
private EquipmentCategoryData updateEquipmentCategoryData(String unitCode) { private List<EquipmentCategoryData> updateEquipmentCategoryData(String unitCode,String orgBranchCode) {
List<String> unitCodeList = new ArrayList<>(); List<String> unitCodeList = new ArrayList<>();
unitCodeList.add(unitCode); unitCodeList.add(unitCode);
List<EquipmentCategoryData> equipmentCategoryData = getCategoryData(unitCodeList); List<String> orgBranchCodeList = new ArrayList<>();
return equipmentCategoryData.get(0); orgBranchCodeList.add(orgBranchCode);
List<EquipmentCategoryData> equipmentCategoryData = getCategoryData(unitCodeList,null);
return equipmentCategoryData;
} }
@Override @Override
...@@ -958,7 +969,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -958,7 +969,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List<String> records = new ArrayList<>(); List<String> records = new ArrayList<>();
List<ESEquipmentCategoryDto> list = new ArrayList<>(); List<ESEquipmentCategoryDto> list = new ArrayList<>();
if(recordList.toString().contains(",")){ if(recordList.toString().contains("[")){
for (String record : (List<String>) recordList) { for (String record : (List<String>) recordList) {
records.add(record); records.add(record);
ESEquipmentCategoryDto esEquipmentCategoryDto = new ESEquipmentCategoryDto(); ESEquipmentCategoryDto esEquipmentCategoryDto = new ESEquipmentCategoryDto();
...@@ -973,7 +984,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -973,7 +984,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
//删除监管码表数据 //删除监管码表数据
List<String> superviseCodeList = superviseInfoMapper.selectSuperviseCodeList(records); List<String> superviseCodeList = superviseInfoMapper.selectSuperviseCodeList(records);
List<String> unitCodeList = superviseInfoMapper.selectUnitCodeList(records); List<Map<String, Object>> unitCodeAndOrgBranchCodeList = superviseInfoMapper.selectUnitCodeList(records);
List<String> unitCodeList = new ArrayList<>();
List<String> orgBranchCodeList = new ArrayList<>();
for (Map<String, Object> objectMap : unitCodeAndOrgBranchCodeList) {
unitCodeList.add(String.valueOf(objectMap.get("unitCode")));
orgBranchCodeList.add(String.valueOf(objectMap.get("orgBranchCode")));
}
if(!ObjectUtils.isEmpty(superviseCodeList)){ if(!ObjectUtils.isEmpty(superviseCodeList)){
supervisoryCodeInfoMapper.updateStatus(superviseCodeList); supervisoryCodeInfoMapper.updateStatus(superviseCodeList);
} }
...@@ -982,7 +1000,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -982,7 +1000,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
superviseInfoMapper.deleteDataAll(records); superviseInfoMapper.deleteDataAll(records);
// 根据统一信用代码更新总览表 // 根据统一信用代码更新总览表
if(!ObjectUtils.isEmpty(unitCodeList)){ if(!ObjectUtils.isEmpty(unitCodeList)){
getCategoryData(unitCodeList); getCategoryData(unitCodeList,orgBranchCodeList);
} }
//删除es中的数据 //删除es中的数据
esEquipmentCategory.deleteAll(list); esEquipmentCategory.deleteAll(list);
...@@ -992,22 +1010,21 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -992,22 +1010,21 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseModel submit(Map<String, Object> map) { public ResponseModel submit(Map<String, Object> map) {
StopWatch stopWatch = new StopWatch();
stopWatch.start();
SupervisoryCodeInfo supervisoryCodeInfo = new SupervisoryCodeInfo(); SupervisoryCodeInfo supervisoryCodeInfo = new SupervisoryCodeInfo();
ResponseModel responseModel = new ResponseModel(); ResponseModel responseModel = new ResponseModel();
LinkedHashMap useInfoFrom = (LinkedHashMap) map.get(USE_INFO_FROM_ID); LinkedHashMap useInfoFrom = (LinkedHashMap) map.get(USE_INFO_FROM_ID);
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
useInfoFrom.put("REC_DATE", dateFormat.format(calendar.getTime())); useInfoFrom.put("REC_DATE", dateFormat.format(calendar.getTime()));
LinkedHashMap superviseMap = (LinkedHashMap) map.get("data");
String unitCode = String.valueOf(useInfoFrom.get("USE_UNIT_CREDIT_CODE")); String unitCode = String.valueOf(useInfoFrom.get("USE_UNIT_CREDIT_CODE"));
String code96333 = String.valueOf(superviseMap.get("code96333")); LinkedHashMap supervisionMap = (LinkedHashMap) map.get(SUPERVISION_FROM_ID);
String supervisionCode = String.valueOf(superviseMap.get("supervisionCode")); String orgBranchCode = String.valueOf(supervisionMap.get("ORG_BRANCH_CODE"));
supervisoryCodeInfo.setCode96333("null".equals(code96333) ? null : code96333);
supervisoryCodeInfo.setSupervisoryCode("null".equals(supervisionCode) ? null : supervisionCode);
try { try {
LinkedHashMap superviseMap = (LinkedHashMap) map.get("data");
String claimStatus = String.valueOf(superviseMap.get("claimStatus")); String claimStatus = String.valueOf(superviseMap.get("claimStatus"));
String code96333 = String.valueOf(superviseMap.get("code96333"));
String operateType = String.valueOf(superviseMap.get("operateType")); String operateType = String.valueOf(superviseMap.get("operateType"));
//生成码 //生成码
Map<String, String> codeMap; Map<String, String> codeMap;
...@@ -1016,16 +1033,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1016,16 +1033,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String city = String.valueOf(superviseMap.get("city")); String city = String.valueOf(superviseMap.get("city"));
String county = String.valueOf(superviseMap.get("county")); String county = String.valueOf(superviseMap.get("county"));
String equCategory = String.valueOf(superviseMap.get("equCategory")); String equCategory = String.valueOf(superviseMap.get("equCategory"));
String supervisionCode = String.valueOf(superviseMap.get("supervisionCode"));
//生成码 //生成码
codeMap = creatCode(city, county, equCategory, code96333, supervisionCode); codeMap = creatCode(city, county, equCategory, code96333, supervisionCode);
log.info("已生成对应监管码或96333电梯识别码"); log.info("已生成对应监管码或96333电梯识别码");
//删除map中的冗余数据,添加对应监管码和96333码调用idx多表单页提交接口吧保存数据 //删除map中的冗余数据,添加对应监管码和96333码调用idx多表单页提交接口吧保存数据
map.remove("data"); map.remove("data");
LinkedHashMap supervisionMap = (LinkedHashMap) map.get(SUPERVISION_FROM_ID);
supervisionMap.put("CODE96333", codeMap.get("code96333")); supervisionMap.put("CODE96333", codeMap.get("code96333"));
supervisionMap.put("SUPERVISORY_CODE", codeMap.get("superviseCode")); supervisionMap.put("SUPERVISORY_CODE", codeMap.get("superviseCode"));
supervisoryCodeInfo.setCode96333(codeMap.get("code96333"));
supervisoryCodeInfo.setSupervisoryCode(codeMap.get("superviseCode"));
map.put(SUPERVISION_FROM_ID, supervisionMap); map.put(SUPERVISION_FROM_ID, supervisionMap);
//根据操作状态判断是调用新增还是修改接口 //根据操作状态判断是调用新增还是修改接口
responseModel = "save".equals(operateType) ? idxFeignService.batchSubmit(null, null, null, null, map) : responseModel = "save".equals(operateType) ? idxFeignService.batchSubmit(null, null, null, null, map) :
...@@ -1037,7 +1052,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1037,7 +1052,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
} else if (EquipmentCategoryEnum.DRL.getName().equals(claimStatus)) { } else if (EquipmentCategoryEnum.DRL.getName().equals(claimStatus)) {
map.remove("data"); map.remove("data");
LinkedHashMap supervisionMap = (LinkedHashMap) map.get(SUPERVISION_FROM_ID);
supervisionMap.put("CODE96333", "null".equals(code96333) ? null : code96333); supervisionMap.put("CODE96333", "null".equals(code96333) ? null : code96333);
map.put(SUPERVISION_FROM_ID, supervisionMap); map.put(SUPERVISION_FROM_ID, supervisionMap);
//根据操作状态判断是调用新增还是修改接口 //根据操作状态判断是调用新增还是修改接口
...@@ -1047,16 +1061,22 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1047,16 +1061,22 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
map.remove("data"); map.remove("data");
responseModel = idxFeignService.batchUpdate(null, null, map); responseModel = idxFeignService.batchUpdate(null, null, map);
} }
stopWatch.stop();
if(log.isInfoEnabled()){
log.info("通用提交耗时:{} 秒",stopWatch.getTotalTimeSeconds());
}
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(),e);
supervisoryCodeInfo.setStatus(EquipmentCategoryEnum.BF.getCode()); supervisoryCodeInfo.setStatus(EquipmentCategoryEnum.BF.getCode());
ResponseModel<Object> response = new ResponseModel(); ResponseModel<Object> response = new ResponseModel<>();
response.setDevMessage(e.getMessage());
response.setResult(null); response.setResult(null);
response.setMessage("操作失败,请检查数据输入后重新提交"); response.setMessage("操作失败,请检查数据输入后重新提交");
response.setStatus(HttpStatus.BAD_REQUEST.value()); response.setStatus(HttpStatus.BAD_REQUEST.value());
return response; return response;
} finally { } finally {
updateEquipmentCategoryData(unitCode); updateEquipmentCategoryData(unitCode,orgBranchCode);
supervisoryCodeInfoMapper.update(supervisoryCodeInfo, new QueryWrapper<SupervisoryCodeInfo>().eq("supervisory_code", supervisoryCodeInfo.getSupervisoryCode())); supervisoryCodeInfoMapper.update(supervisoryCodeInfo,new QueryWrapper<SupervisoryCodeInfo>().eq("supervisory_code",supervisoryCodeInfo.getSupervisoryCode()));
} }
return responseModel; return responseModel;
} }
......
package com.yeejoin.amos.boot.module.tzs.biz.utils;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.common.BitMatrix;
import com.itextpdf.text.pdf.qrcode.ErrorCorrectionLevel;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
public class ImageUtils {
private static final int QRCOLOR = 0x201f1f; // 二维码颜色:黑色
private static final int BGWHITE = 0xFFFFFF; //二维码背景颜色:白色
private static Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>() {
private static final long serialVersionUID = 1L;
{
put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M);// 设置QR二维码的纠错级别(H为最高级别)
put(EncodeHintType.CHARACTER_SET, "utf-8");// 设置编码方式
put(EncodeHintType.MARGIN, 0);// 白边
}
};
/**
* 生成二维码图片+背景+文字描述
*
* @param codeFile 生成图地址
* @param bgImgFile 背景图地址
* @param width 二维码宽度
* @param height 二维码高度
* @param qrUrl 内容
* @param note 文字说明
* @param tui 文字说明2
* @param size 文字大小
* @param imagesX 二维码x轴方向
* @param imagesY 二维码y轴方向
* @param text1X 文字描述1x轴方向
* @param text1Y 文字描述1y轴方向
* @param text2X 文字描述2x轴方向
* @param text2Y 文字描述2y轴方向
*/
public static void creatQRCode(File codeFile, FileInputStream bgImgFile, Integer width, Integer height, String qrUrl,
String note, String tui, Integer size, Integer imagesX, Integer imagesY, Integer text1X, Integer text1Y
, Integer text2X, Integer text2Y) throws IOException {
try {
MultiFormatWriter multiFormatWriter = new MultiFormatWriter();
BitMatrix bm = multiFormatWriter.encode(qrUrl, BarcodeFormat.QR_CODE, width, height, hints);
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, bm.get(x, y) ? QRCOLOR : BGWHITE);
}
}
BufferedImage backgroundImage = ImageIO.read(bgImgFile);
int bgWidth = backgroundImage.getWidth();
int qrWidth = image.getWidth();
int disx = (bgWidth - qrWidth) - imagesX;
int disy = imagesY;
Graphics2D rng = backgroundImage.createGraphics();
rng.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP));
rng.drawImage(image, disx, disy, width, height, null);
// 抗锯齿
rng.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
// 文字描述参数设置
Color textColor = Color.white;
rng.setColor(textColor);
rng.drawImage(backgroundImage, 0, 0, null);
// 设置字体类型和大小(BOLD加粗/ PLAIN平常)
rng.setFont(new Font("Microsoft YaHei", Font.BOLD, size));
// 设置字体颜色
rng.setColor(Color.black);
int strWidth = rng.getFontMetrics().stringWidth(note);
// 文字1显示位置
int disx1 = (bgWidth - strWidth) - text1X;//左右
rng.drawString(note, disx1, text1Y);//上下
// 文字2显示位置
int disx2 = (bgWidth - strWidth) - text2X;//左右
rng.drawString(tui, disx2, text2Y);//上下
rng.dispose();
image = backgroundImage;
image.flush();
ImageIO.write(image, "png", codeFile);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (null != bgImgFile) {
bgImgFile.close();
}
}
}
/**
* 下载图片
*
* @param fileName
* @param resourceName
* @param response
*/
public static void downloadResource(String fileName, String resourceName, HttpServletResponse response) {
DataInputStream in = null;
OutputStream out = null;
InputStream fileInputStream = null;
try {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setHeader("content-Type", "image/png");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
fileInputStream = new FileInputStream(resourceName);
in = new DataInputStream(fileInputStream);
out = response.getOutputStream();
int bytes = 0;
byte[] bufferOut = new byte[1024];
while ((bytes = in.read(bufferOut)) != -1) {
out.write(bufferOut, 0, bytes);
}
} catch (Exception e) {
e.printStackTrace();
response.reset();
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException e) {
e.printStackTrace();
}
try {
if (in != null) {
in.close();
}
} catch (IOException e) {
e.printStackTrace();
}
try {
if (fileInputStream != null) {
fileInputStream.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* 下载压缩包
*
* @param fileName
* @param resourceName
* @param response
*/
public static void downloadResourceZip(String fileName, String resourceName, HttpServletResponse response) {
DataInputStream in = null;
OutputStream out = null;
InputStream fileInputStream = null;
try {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setHeader("content-Type", "application/zip");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
fileInputStream = new FileInputStream(resourceName);
in = new DataInputStream(fileInputStream);
out = response.getOutputStream();
int bytes = 0;
byte[] bufferOut = new byte[1024];
while ((bytes = in.read(bufferOut)) != -1) {
out.write(bufferOut, 0, bytes);
}
} catch (Exception e) {
e.printStackTrace();
response.reset();
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException e) {
e.printStackTrace();
}
try {
if (in != null) {
in.close();
}
} catch (IOException e) {
e.printStackTrace();
}
try {
if (fileInputStream != null) {
fileInputStream.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* 压缩文件
*
* @param srcFiles
* @param zipFile
*/
public static void zipFiles(List<File> srcFiles, File zipFile) {
try {
if (srcFiles.size() != 0) {
// 判断压缩后的文件存在不,不存在则创建
if (!zipFile.exists()) {
zipFile.createNewFile();
} else {
zipFile.delete();
zipFile.createNewFile();
}
// 创建 FileInputStream 对象
InputStream fileInputStream = null;
// 实例化 FileOutputStream 对象
FileOutputStream fileOutputStream = new FileOutputStream(zipFile);
// 实例化 ZipOutputStream 对象
ZipOutputStream zipOutputStream = new ZipOutputStream(fileOutputStream);
// 创建 ZipEntry 对象
ZipEntry zipEntry = null;
// 遍历源文件数组
// for (int i = 0; i < srcFiles.size(); i++) {
// // 将源文件数组中的当前文件读入 FileInputStream 流中
// File file = srcFiles.get(i);
// fileInputStream = new FileInputStream(file);
// // 实例化 ZipEntry 对象,源文件数组中的当前文件
// zipEntry = new ZipEntry(i + ".jpg");
// zipOutputStream.putNextEntry(zipEntry);
// // 该变量记录每次真正读的字节个数
// int len;
// // 定义每次读取的字节数组
// byte[] buffer = new byte[1024];
// while ((len = fileInputStream.read(buffer)) > 0) {
// zipOutputStream.write(buffer, 0, len);
// }
// }
for (File srcFile : srcFiles) {
fileInputStream = new FileInputStream(srcFile);
// 实例化 ZipEntry 对象,源文件数组中的当前文件
zipEntry = new ZipEntry(srcFile.getName());
zipOutputStream.putNextEntry(zipEntry);
// 该变量记录每次真正读的字节个数
int len;
// 定义每次读取的字节数组
byte[] buffer = new byte[1024];
while ((len = fileInputStream.read(buffer)) > 0) {
zipOutputStream.write(buffer, 0, len);
}
}
zipOutputStream.closeEntry();
zipOutputStream.close();
fileInputStream.close();
fileOutputStream.close();
System.out.println("下载完成");
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 删除文件夹(强制删除)
*
* @param file
*/
public static void deleteAllFilesOfDir(File file) {
if (null != file) {
if (!file.exists())
return;
if (file.isFile()) {
boolean result = file.delete();
int tryCount = 0;
while (!result && tryCount++ < 10) {
System.gc(); // 回收资源
result = file.delete();
}
}
File[] files = file.listFiles();
if (null != files) {
for (int i = 0; i < files.length; i++) {
deleteAllFilesOfDir(files[i]);
}
}
file.delete();
}
}
}
...@@ -780,18 +780,19 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -780,18 +780,19 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
String userIdsTask = String.join(",", task); String userIdsTask = String.join(",", task);
// 添加被检查企业下的人员id // 添加被检查企业下的人员id
objectMap.put("CHECKED_COMPANY_USERS", userIds); objectMap.put("CHECKED_COMPANY_USERS", userIds);
objectMap.put("CHECKED_COMPANY_USER_ids", userIdsTask);
// 表单信息提交 // 表单信息提交
FeignClientResult<String> submit = idxFeignService.submit(pageId, taskId, planInstanceId, topic, tableName, objectMap); FeignClientResult<String> submit = idxFeignService.submit(pageId, taskId, planInstanceId,"CHECKED_COMPANY_USER_ids", topic, tableName, objectMap);
if ("200".equals(String.valueOf(submit.getStatus()))) { // if ("200".equals(String.valueOf(submit.getStatus()))) {
JSONObject jsonObject = new JSONObject(); // JSONObject jsonObject = new JSONObject();
jsonObject.put("title", "企业整改"); // jsonObject.put("title", "企业整改");
jsonObject.put("userIds", userIdsTask); // jsonObject.put("userIds", userIdsTask);
logger.info("idx执行任务更新参数,{}", JSONObject.toJSONString(jsonObject)); // logger.info("idx执行任务更新参数,{}", JSONObject.toJSONString(jsonObject));
//FeignClientResult<JSONObject> jsonObjectFeignClientResult = idxFeignService.updateAmosTask(taskId, jsonObject); // //FeignClientResult<JSONObject> jsonObjectFeignClientResult = idxFeignService.updateAmosTask(taskId, jsonObject);
updateAmosTask(taskId, jsonObject); // updateAmosTask(taskId, jsonObject);
//logger.info("idx执行任务更新任务返回参数,{}", JSONObject.toJSONString(jsonObjectFeignClientResult)); // //logger.info("idx执行任务更新任务返回参数,{}", JSONObject.toJSONString(jsonObjectFeignClientResult));
//
} // }
return "ok"; return "ok";
} }
......
...@@ -153,6 +153,9 @@ tzs.cylinder.info.cron=0 0 1 * * ? ...@@ -153,6 +153,9 @@ tzs.cylinder.info.cron=0 0 1 * * ?
# ?????????? # ??????????
minio.url.path=http://172.16.10.210:9000/ minio.url.path=http://172.16.10.210:9000/
## ɼǰ׺
regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560 outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO amos.system.user.app-key=AMOS_STUDIO
......
...@@ -12,7 +12,8 @@ mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl ...@@ -12,7 +12,8 @@ mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
spring.liquibase.change-log = classpath:/db/changelog/changelog-master.xml spring.liquibase.change-log = classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled= true spring.liquibase.enabled= true
feign.client.config.default.connect-timeout=30000
feign.client.config.default.read-timeout=30000
## eureka properties: ## eureka properties:
eureka.client.registry-fetch-interval-seconds=5 eureka.client.registry-fetch-interval-seconds=5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment