浏览代码

Merge branch 'master' of http://10.1.235.20:3000/asiainfo/ebc.git

konghl 4 年之前
父节点
当前提交
e6ddd08981
共有 40 个文件被更改,包括 371 次插入281 次删除
  1. 2 1
      ebc-mock-service/src/main/java/com/ai/bss/mock/service/impl/MockProcessImpl.java
  2. 3 2
      ebc-mock-service/src/main/java/com/ai/bss/mock/utils/KafkaProducerConfig.java
  3. 13 7
      ebc-mock-service/src/main/resources/application.properties
  4. 5 4
      ebc-mock-service/src/test/resources/application.properties
  5. 2 1
      location-rescue-service/src/main/java/com/ai/bss/location/rescue/config/MyCorsFilter.java
  6. 1 1
      location-rescue-service/src/main/java/com/ai/bss/location/rescue/util/NorthboundInterfaceUtil.java
  7. 15 10
      location-rescue-service/src/main/resources/application.properties
  8. 7 6
      location-rescue-service/src/main/resources/ipu-cache.xml
  9. 5 5
      location-rescue-service/src/main/resources/sso.properties
  10. 1 1
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/model/AlarmIdenResultDto.java
  11. 1 1
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/model/FaceIdenResultDto.java
  12. 2 2
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/ClothingCodeAiIden.java
  13. 2 2
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/FaceAiIden.java
  14. 2 2
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/SafetyHelmetAiIden.java
  15. 1 1
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/SmokeAiIden.java
  16. 13 13
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/StrangerAiIden.java
  17. 24 16
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/impl/KafkaProcessImpl.java
  18. 14 14
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/utils/AiIdenUtils.java
  19. 2 2
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/utils/KafkaProducerConfig.java
  20. 12 11
      monitor-manage-service/src/main/resources/application.properties
  21. 27 0
      monitor-manage-service/src/test/java/com/ai/bss/monitorManage/PictureProcessServiceTest.java
  22. 44 16
      monitor-manage-service/src/test/resources/application.properties
  23. 5 4
      security-protection-platform/.aid/aid.js
  24. 1 1
      security-protection-platform/src/conf/axios.config.js
  25. 2 2
      security-protection-platform/src/layout/index.vue
  26. 14 7
      security-protection-platform/src/modules/access/component/instrumentRecord/index.vue
  27. 13 13
      security-protection-platform/src/modules/access/component/io-record/index.vue
  28. 65 65
      security-protection-platform/src/modules/dashboard/index.vue
  29. 1 1
      security-protection-platform/src/modules/system/devicemana/components/modal/addDeviceModal.vue
  30. 2 2
      security-protection-platform/src/modules/usermana/components/modal/addUser.vue
  31. 20 20
      security-protection-platform/src/modules/videoSurveillance/components/ReplayDialog/index.vue
  32. 7 7
      security-protection-platform/src/modules/videoSurveillance/distinguishRecord/index.vue
  33. 14 14
      security-protection-platform/src/router.js
  34. 3 3
      security-protection-service/src/main/java/com/ai/bss/security/protection/SecurityProtectionApp.java
  35. 1 1
      security-protection-service/src/main/java/com/ai/bss/security/protection/config/MyCorsFilter.java
  36. 4 4
      security-protection-service/src/main/java/com/ai/bss/security/protection/controller/AiAlarmManageController.java
  37. 6 3
      security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/LoginServiceImpl.java
  38. 3 3
      security-protection-service/src/main/resources/application-minio.properties
  39. 7 8
      security-protection-service/src/main/resources/application.properties
  40. 5 5
      security-protection-service/src/main/resources/sso.properties

+ 2 - 1
ebc-mock-service/src/main/java/com/ai/bss/mock/service/impl/MockProcessImpl.java

@ -36,7 +36,8 @@ public class MockProcessImpl implements MockProcess {
36 36
    private static final int PORT = 8042;
37 37
38 38
//    private static String kafkaServers = "47.105.160.21:9090";
39
    private static String kafkaServers = "10.19.90.34:9090";
39
   // private static String kafkaServers = "10.19.90.34:9090";
40
    private static String kafkaServers = "10.1.194.17:9092";
40 41
41 42
    @Value("${kafka.producer.servers}")
42 43
    private static String servers;

+ 3 - 2
ebc-mock-service/src/main/java/com/ai/bss/mock/utils/KafkaProducerConfig.java

@ -26,7 +26,8 @@ public class KafkaProducerConfig {
26 26
27 27
    @Value("${kafka.producer.servers:Empty}")
28 28
//    private static String servers = "47.105.160.21:9090";
29
    private static String servers = "10.19.90.34:9090";
29
    //private static String servers = "10.19.90.34:9090";
30
    private static String servers = "10.1.194.17:9092";
30 31
    @Value("${kafka.producer.retries:0}")
31 32
    private  int retries;
32 33
    @Value("${kafka.producer.batch.size:4096}")
@ -110,4 +111,4 @@ public class KafkaProducerConfig {
110 111
        }
111 112
        return true;
112 113
    }
113
}
114
}

+ 13 - 7
ebc-mock-service/src/main/resources/application.properties

@ -15,10 +15,10 @@ server.port=8086
15 15
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
16 16
#spring.datasource.username=cmp
17 17
#spring.datasource.password=cmp@123
18
spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
18
spring.datasource.url=jdbc:mysql://10.1.252.196:3306/energy?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
19 19
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
20
spring.datasource.username=ebc
21
spring.datasource.password=ebc@123
20
spring.datasource.username=root
21
spring.datasource.password=asdsadadaUda4u!@
22 22
23 23
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
24 24
#spring.jpa.database=default
@ -41,8 +41,12 @@ logging.level.org.springframework.data=info
41 41
42 42
43 43
#============== kafka ===================
44
kafka.consumer.zookeeper.connect=47.105.160.21:2100
45
kafka.consumer.servers=47.105.160.21:9090
44
#kafka.consumer.zookeeper.connect=47.105.160.21:2100
45
#kafka.consumer.servers=47.105.160.21:9090
46
47
kafka.consumer.zookeeper.connect=10.1.194.17:2181
48
kafka.consumer.servers=10.1.194.17:9092
49
46 50
kafka.consumer.enable.auto.commit=true
47 51
kafka.consumer.session.timeout=6000
48 52
kafka.consumer.auto.commit.interval=100
@ -51,9 +55,11 @@ kafka.consumer.topic=productMessage
51 55
kafka.consumer.group.id=productMessage
52 56
kafka.consumer.concurrency=10
53 57
54
kafka.producer.servers=47.105.160.21:9090
58
#kafka.producer.servers=47.105.160.21:9090
59
60
kafka.producer.servers=10.1.194.17:9092
55 61
kafka.producer.retries=0
56 62
kafka.producer.batch.size=4096
57 63
kafka.producer.linger=1
58 64
kafka.producer.buffer.memory=40960
59
kafka.producer.topic=67message
65
kafka.producer.topic=67message

+ 5 - 4
ebc-mock-service/src/test/resources/application.properties

@ -11,10 +11,11 @@ server.port=8086
11 11
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
12 12
#spring.datasource.username=comon_frm
13 13
#spring.datasource.password=1qaz@WSX
14
spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?useUnicode=true&ampcharacterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
14
#spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?useUnicode=true&ampcharacterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
15
spring.datasource.url=jdbc:mysql://10.1.252.196:3306/energy?useUnicode=true&ampcharacterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
15 16
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
16
spring.datasource.username=ebc
17
spring.datasource.password=ebc@123
17
spring.datasource.username=root
18
spring.datasource.password=asdsadadaUda4u!@
18 19
19 20
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
20 21
#spring.jpa.database=default
@ -31,4 +32,4 @@ spring.main.allow-bean-definition-overriding=true
31 32
32 33
# LOGGING
33 34
logging.level.com.ai=info
34
logging.level.org.springframework.data=info
35
logging.level.org.springframework.data=info

+ 2 - 1
location-rescue-service/src/main/java/com/ai/bss/location/rescue/config/MyCorsFilter.java

@ -53,11 +53,12 @@ public class MyCorsFilter {
53 53
    public FilterRegistrationBean mySessionUserFilter(){
54 54
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
55 55
        registrationBean.setFilter(new SessionUserFilter());
56
        registrationBean.setUrlPatterns(Arrays.asList("/*"));
56
        registrationBean.setUrlPatterns(Arrays.asList("/sfsdafsadf"));
57 57
        Map<String, String> initParameters = new HashMap<String,String>();
58 58
        initParameters.put("impl-classname","com.ai.sso.external.DefaultPopedomImpl");
59 59
        initParameters.put("ALLOWPATH","gif;jpg;jpeg;png;login;checkLogin;genVerificationCode;logout;stomp;");
60 60
        registrationBean.setInitParameters(initParameters);
61 61
        return registrationBean;
62 62
    }
63
63 64
}

+ 1 - 1
location-rescue-service/src/main/java/com/ai/bss/location/rescue/util/NorthboundInterfaceUtil.java

@ -29,7 +29,7 @@ public class NorthboundInterfaceUtil {
29 29
    @Value("${aap.iot.passWord:123456}")
30 30
    private String passWord;
31 31
32
    @Value("${url.iot.login:http://60.205.219.67:80/sso/login}")
32
    @Value("${url.iot.login:http://60.205.219.67:80/sso}")
33 33
    private String iotLoginUrl;
34 34
35 35
    @Value("${url.iot.service:http://60.205.219.67:80/dmp/terminalNorthApi/}")

+ 15 - 10
location-rescue-service/src/main/resources/application.properties

@ -7,10 +7,14 @@ server.servlet.context-path=/lr
7 7
8 8
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
9 9
#spring.datasource.url=jdbc:mysql://localhost:3306/cmp
10
spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
10
#spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
11
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
12
#spring.datasource.username=ebc
13
#spring.datasource.password=ebc@123
14
spring.datasource.url=jdbc:mysql://10.1.252.196:3306/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
11 15
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
12
spring.datasource.username=ebc
13
spring.datasource.password=ebc@123
16
spring.datasource.username=root
17
spring.datasource.password=asdsadadaUda4u!@
14 18
15 19
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
16 20
#spring.jpa.database=default
@ -24,9 +28,10 @@ spring.main.allow-bean-definition-overriding=true
24 28
#kafka
25 29
#kafka.bootstrap-servers=47.105.160.21:9090
26 30
#http://10.19.90.34:8187/mock/startMackData?sId=26&f=5&topic0=DeviceLocationA&topic1=IndividualAlarmA
27
kafka.bootstrap-servers=10.19.90.34:9090
28
kafka.topic.deviceLocation=Topic_IoT_DeviceLocation_1
29
kafka.topic.alarm=Topic_IoT_IndividualAlarm_1
31
#kafka.bootstrap-servers=10.19.90.34:9090
32
kafka.bootstrap-servers=10.1.194.17:9092
33
kafka.topic.deviceLocation=Topic_IoT_DeviceLocation
34
kafka.topic.alarm=Topic_IoT_IndividualAlarm
30 35
#kafka.topic.deviceLocation=DeviceLocationA
31 36
#kafka.topic.alarm=IndividualAlarmA
32 37
kafka.producer.batch-size=16785
@ -45,8 +50,8 @@ kafka.listener.concurrencys=3,6
45 50
kafka.listener.poll-timeout=1500
46 51
47 52
#minio
48
minio.endpoint=http://10.19.90.34
49
minio.port=19000
53
minio.endpoint=http://10.1.194.18
54
minio.port=9000
50 55
minio.accessKey=minioadmin
51 56
minio.secretKey=minioadmin
52 57
minio.secure=false
@ -67,7 +72,7 @@ logging.level.org.springframework.data=debug
67 72
# \u5f15\u5165gis\u548ciot\u7684\u914d\u7f6e\u6587\u4ef6
68 73
spring.profiles.active=iot,gis
69 74
70
uspa.login.url=http://10.19.90.34:20000/usermng/login
75
uspa.login.url=http://10.1.194.17:20000/usermng/login
71 76
uspa.login.vercode=Hiz#8uAqkjhoPmXu8%aaa
72 77
73
uspa.login.menuUrl=http://10.19.90.34:20000/usermng/process/com.wframe.usermanager.services.impl.QueryMenuByUser
78
uspa.login.menuUrl=http://10.1.194.17:20000/usermng/process/com.wframe.usermanager.services.impl.QueryMenuByUser

+ 7 - 6
location-rescue-service/src/main/resources/ipu-cache.xml

@ -9,12 +9,13 @@
9 9
	       <!-- <server ip="121.42.183.206" port="7104" /> -->
10 10
	       <!-- <server ip="121.42.183.206" port="7105" /> -->
11 11
	       <!-- <server ip="121.42.183.206" port="7106" /> -->
12
			<server ip="10.19.90.34" port="6379" />
12
<!--			<server ip="10.19.90.34" port="6379" />-->
13
			<server ip="10.1.194.17" port="6379" />
13 14
	    </servers>
14 15
		<!-- 客户端类型:Jedis,JedisCluster -->
15 16
	    <config name="clientType" value="Jedis"/>
16 17
	    <!-- 访问redis的密码,可以为空 -->
17
	    <config name="auth" value="Ipu@321!"/>
18
	    <config name="auth" value="ebc@redis"/>
18 19
	    <!-- redis池的可用连接实例的最大数目,缺省为8 -->
19 20
	    <config name="poolSize" value="10"/>
20 21
	    <!-- redis池最多有多少个状态为idle(空闲的)的jedis实例,缺省为8,空闲连接大于这个数会进行回收 -->
@ -28,7 +29,7 @@
28 29
	    <!-- 出现异常最大重试次数 -->
29 30
	    <config name="maxAttempts"/>
30 31
	</cache>
31
	
32
32 33
	<cache name="SSN_CACHE" type="redis">
33 34
		<servers>
34 35
	        <!-- 如果不是cluster,则只使用第一个redis -->
@ -56,7 +57,7 @@
56 57
	    <!-- 出现异常最大重试次数 -->
57 58
	    <config name="maxAttempts"/>
58 59
	</cache>
59
	
60
60 61
	<cache name="client_route" type="redis">
61 62
		<servers>
62 63
	        <!-- 如果不是cluster,则只使用第一个redis -->
@ -84,7 +85,7 @@
84 85
	    <!-- 出现异常最大重试次数 -->
85 86
	    <config name="maxAttempts"/>
86 87
	</cache>
87
	
88
88 89
	<cache name="pushServer_route" type="redis">
89 90
		<servers>
90 91
	        <!-- 如果不是cluster,则只使用第一个redis -->
@ -112,4 +113,4 @@
112 113
	    <!-- 出现异常最大重试次数 -->
113 114
	    <config name="maxAttempts"/>
114 115
	</cache>
115
</caches>
116
</caches>

+ 5 - 5
location-rescue-service/src/main/resources/sso.properties

@ -15,7 +15,7 @@ COOKIE_MAXAGE=-1
15 15
TENANT_REGISTER_CLASS=com.ai.customermanager.services.impl.CustRegisterVercodeImpl
16 16
17 17
18
##\u8fdc\u7a0b\u7f13\u5b58\u8c03\u7528\u7c7b\uff0c\u8fd9\u4e2a\u7c7b\u5fc5\u987b\u6709\u4e09\u4e2a\u51fd\u6570 
18
##\u8fdc\u7a0b\u7f13\u5b58\u8c03\u7528\u7c7b\uff0c\u8fd9\u4e2a\u7c7b\u5fc5\u987b\u6709\u4e09\u4e2a\u51fd\u6570
19 19
##    public boolean set(String key,String value)
20 20
##    public String get(String key)
21 21
##    public boolean del(String key);
@ -53,8 +53,8 @@ RETURN_TAG={"MESSAGE":"NOLOGIN","CODE":999999,"FLAG":"FAIL","RESULT":{"URL":"htt
53 53
54 54
#redis.single=10.11.20.117:6379
55 55
#redis.password=luMZulgbotmo71aa
56
redis.single=10.19.90.34:6379
57
redis.password=Ipu@321!
56
redis.single=10.1.194.17:6379
57
redis.password=ebc@redis
58 58
59 59
redis.pool.maxTotal=1000
60 60
redis.pool.minIdle=5
@ -68,7 +68,7 @@ redis.pool.timeBetweenEvictionRunsMillis=10000
68 68
69 69
SESSION_DEFAULT_VERCODE=Hiz#8uAqkjhoPmXu8%aaa
70 70
71
#\u662f\u5426\u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236 1 \u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236 
71
#\u662f\u5426\u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236 1 \u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236
72 72
is_check_interface=0
73 73
74 74
@ -78,4 +78,4 @@ is_check_interface=0
78 78
USER_LOGIN_AUTH_CLASS=com.wframe.usermanager.services.impl.UserLoginAuthImpl
79 79
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByTokenImpl
80 80
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByToken4XblImpl
81
SIGN_KEY_CODE=TENANT_CODE
81
SIGN_KEY_CODE=TENANT_CODE

+ 1 - 1
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/model/AlarmIdenResultDto.java

@ -11,6 +11,6 @@ public class AlarmIdenResultDto implements Serializable {
11 11
    private String alarmType;
12 12
    private String alarmMemo;
13 13
    private String alarmEmployeeRoleId;
14
    private int[] box;
14
    private double[] box;
15 15
16 16
}

+ 1 - 1
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/model/FaceIdenResultDto.java

@ -14,6 +14,6 @@ public class FaceIdenResultDto implements Serializable {
14 14
15 15
    private int isMatch;
16 16
17
    private int[] box;
17
    private double[] box;
18 18
19 19
}

+ 2 - 2
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/ClothingCodeAiIden.java

@ -86,7 +86,7 @@ public class ClothingCodeAiIden implements AiIdenInterfaces {
86 86
					idenResultDto.setAlarmType("");
87 87
					idenResultDto.setAlarmMemo("已穿工作服");
88 88
89
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
89
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
90 90
					idenResultDto.setBox(boxIntArr);
91 91
92 92
					successList.add(idenResultDto);
@ -99,7 +99,7 @@ public class ClothingCodeAiIden implements AiIdenInterfaces {
99 99
					idenResultDto.setAlarmType(MonitorManageConsts.AI_ALARM_TYPE_WEA);
100 100
					idenResultDto.setAlarmMemo("未穿工作服");
101 101
102
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
102
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
103 103
					idenResultDto.setBox(boxIntArr);
104 104
105 105
					alarmIdenResultDtosList.add(idenResultDto);

+ 2 - 2
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/FaceAiIden.java

@ -82,7 +82,7 @@ public class FaceAiIden implements AiIdenInterfaces {
82 82
					BigDecimal score = resultObject.getBigDecimal("score");
83 83
					resultDto.setSimi(score.setScale(4, BigDecimal.ROUND_HALF_UP).floatValue());
84 84
85
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
85
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
86 86
					resultDto.setBox(boxIntArr);
87 87
88 88
					aiIdenLogDto.setIdenResultType(MonitorManageConsts.AI_IDENTIFY_RESULT);
@ -97,7 +97,7 @@ public class FaceAiIden implements AiIdenInterfaces {
97 97
					BigDecimal score = resultObject.getBigDecimal("score");
98 98
					resultDto.setSimi(score.setScale(4, BigDecimal.ROUND_HALF_UP).floatValue());
99 99
100
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
100
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
101 101
					resultDto.setBox(boxIntArr);
102 102
103 103
					aiIdenLogDto.setRelateEmployeeRoleId(faceId);

+ 2 - 2
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/SafetyHelmetAiIden.java

@ -89,7 +89,7 @@ public class SafetyHelmetAiIden implements AiIdenInterfaces {
89 89
					idenResultDto.setAlarmType("");
90 90
					idenResultDto.setAlarmMemo("已戴安全帽");
91 91
92
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObj.getJSONArray("box"), imageParam);
92
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObj.getJSONArray("box"), imageParam);
93 93
					idenResultDto.setBox(boxIntArr);
94 94
95 95
					successList.add(idenResultDto);
@ -102,7 +102,7 @@ public class SafetyHelmetAiIden implements AiIdenInterfaces {
102 102
					idenResultDto.setAlarmType(MonitorManageConsts.AI_ALARM_TYPE_WEA);
103 103
					idenResultDto.setAlarmMemo("未戴安全帽");
104 104
105
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObj.getJSONArray("box"), imageParam);
105
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObj.getJSONArray("box"), imageParam);
106 106
					idenResultDto.setBox(boxIntArr);
107 107
108 108
					alarmIdenResultDtosList.add(idenResultDto);

+ 1 - 1
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/SmokeAiIden.java

@ -77,7 +77,7 @@ public class SmokeAiIden implements AiIdenInterfaces {
77 77
				idenResultDto.setAlarmMemo("违规吸烟");
78 78
79 79
				JSONObject resultObj = JSONObject.parseObject(jsonArray.get(i).toString());
80
				int[] boxIntArr = AiIdenUtils.getBoxArray(resultObj.getJSONArray("box"), imageParam);
80
				double[] boxIntArr = AiIdenUtils.getBoxArray(resultObj.getJSONArray("box"), imageParam);
81 81
				idenResultDto.setBox(boxIntArr);
82 82
83 83
				alarmIdenResultDtosList.add(idenResultDto);

+ 13 - 13
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/StrangerAiIden.java

@ -31,13 +31,13 @@ import lombok.extern.slf4j.Slf4j;
31 31
@Slf4j
32 32
@Component
33 33
public class StrangerAiIden implements AiIdenInterfaces {
34
	
34
35 35
	@Autowired
36 36
	private EbcAiService ebcAiService;
37
	
37
38 38
    @Autowired
39 39
    private KafkaProcess kafkaProcess;
40
    
40
41 41
	@Override
42 42
	public List<AlarmIdenResultDto> executeAiIden(AiIdenLogDto aiIdenLogDto, String filePath,
43 43
			Map<String, Integer> imageParam, boolean isHuman) {
@ -46,9 +46,9 @@ public class StrangerAiIden implements AiIdenInterfaces {
46 46
			log.info("陌生人识别:没有识别到人......");
47 47
			return null;
48 48
		}
49
		
49
50 50
		List<AlarmIdenResultDto> alarmIdenResultDtosList = new ArrayList<AlarmIdenResultDto>();
51
		
51
52 52
		try {
53 53
			log.info("开始AI陌生人识别处理......");
54 54
			String aiResponseData = ebcAiService.faceAiRecog(ImageBase64Converter.convertFileToBase64(filePath));
@ -75,35 +75,35 @@ public class StrangerAiIden implements AiIdenInterfaces {
75 75
				idenResultDto = new AlarmIdenResultDto();
76 76
				JSONObject resultObject = JSONObject.parseObject(resultList.get(i).toString());
77 77
				String faceId = resultObject.getString("faceid");
78
				
78
79 79
				if (StringUtils.isBlank(faceId) || "null".equals(faceId) || "Unknow".equals(faceId)) {
80 80
					// 陌生人
81 81
					log.debug("陌生人");
82
					
82
83 83
					idenResultDto.setAlarmEmployeeRoleId(MonitorManageConsts.alarmEmployeeRoleId);
84 84
					idenResultDto.setAlarmType(MonitorManageConsts.AI_ALARM_TYPE_STA);
85 85
					idenResultDto.setAlarmMemo("陌生人");
86 86
87
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
87
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
88 88
					idenResultDto.setBox(boxIntArr);
89 89
90 90
					alarmIdenResultDtosList.add(idenResultDto);
91
					
91
92 92
				}else {
93 93
					// 非陌生人
94 94
					log.debug("不是陌生人");
95
					
95
96 96
					idenResultDto.setAlarmEmployeeRoleId(faceId);
97 97
					idenResultDto.setAlarmType("");
98 98
					idenResultDto.setAlarmMemo("不是陌生人");
99 99
100
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
100
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
101 101
					idenResultDto.setBox(boxIntArr);
102 102
103 103
					successList.add(idenResultDto);
104 104
				}
105 105
			}
106
			
106
107 107
			if (CollectionUtils.isEmpty(alarmIdenResultDtosList)) {
108 108
				aiIdenLogDto.setIdenResult(JSON.toJSONString(successList));
109 109
				aiIdenLogDto.setIdenResultType(MonitorManageConsts.AI_IDENTIFY_RESULT);
@ -117,7 +117,7 @@ public class StrangerAiIden implements AiIdenInterfaces {
117 117
		} catch (Exception e) {
118 118
			log.error("陌生人识别AI处理异常:"+e.getMessage());
119 119
		}
120
		
120
121 121
		return alarmIdenResultDtosList;
122 122
	}
123 123

+ 24 - 16
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/impl/KafkaProcessImpl.java

@ -7,6 +7,7 @@ import java.util.List;
7 7
import java.util.Map;
8 8
9 9
import org.apache.commons.lang.StringUtils;
10
import org.apache.logging.log4j.util.Strings;
10 11
import org.slf4j.Logger;
11 12
import org.slf4j.LoggerFactory;
12 13
import org.springframework.beans.factory.annotation.Autowired;
@ -43,7 +44,7 @@ import lombok.extern.slf4j.Slf4j;
43 44
@Slf4j
44 45
@Service
45 46
public class KafkaProcessImpl implements KafkaProcess {
46
	
47
47 48
	private static final Logger logger = LoggerFactory.getLogger(KafkaProcessImpl.class);
48 49
49 50
//    EBC设备tcp连接服务地址
@ -51,7 +52,8 @@ public class KafkaProcessImpl implements KafkaProcess {
51 52
	// private static final int PORT = 8042;
52 53
53 54
//    private static String kafkaServers = "47.105.160.21:9090";
54
	private static String kafkaServers = "10.19.90.34:9090";
55
	//private static String kafkaServers = "10.19.90.34:9090";
56
	private static String kafkaServers = "10.1.194.17:9092";
55 57
56 58
	@Value("${kafka.producer.servers}")
57 59
	private static String servers;
@ -167,18 +169,18 @@ public class KafkaProcessImpl implements KafkaProcess {
167 169
					: resourceToolInfoMap.get("resourceToolName").toString());
168 170
			aiIdenLogDto.setTopic(topicAiTask);
169 171
170
			
172
171 173
			// 代理实现接口
172 174
			String className = getClassByAiIdenModel(aiIdenModel);
173 175
			Class<?> myClass = Class.forName(className);
174 176
			//AiIdenInterfaces proxy = (AiIdenInterfaces) new ProxyFactory(myClass).getProxyInstance();
175
			
177
176 178
			ProxyFactory proxy = new ProxyFactory(myClass.newInstance());
177 179
			//ProxyFactory proxy = new ProxyFactory(SpringApplicationContext.getBean(myClass));
178 180
			AiIdenInterfaces aiIdenInterfaces =(AiIdenInterfaces) proxy.Instance();   //获得代理对象
179 181
			List<AlarmIdenResultDto> alarmResult = aiIdenInterfaces.executeAiIden(aiIdenLogDto, filePath, imageParam, isHuman);
180 182
181
			
183
182 184
			if (!CollectionUtils.isEmpty(alarmResult)) {
183 185
				alarmIdenResultDtosList.addAll(alarmResult);
184 186
			}
@ -187,33 +189,33 @@ public class KafkaProcessImpl implements KafkaProcess {
187 189
				if (isHuman){
188 190
					aiIdenLogDto = faceAiRecog(aiIdenLogDto, filePath,imageParam);
189 191
				}
190
			
192
191 193
			} else if (MonitorManageConsts.AI_MODEL_SAFETY_HELMET.equals(aiIdenModel)) {
192 194
				if (isHuman) {
193 195
					aiIdenLogDto = aiHelmetDetect(aiIdenLogDto, filePath,imageParam);
194 196
				}
195
			
197
196 198
			}else if (MonitorManageConsts.AI_MODEL_SMOKE.equals(aiIdenModel)) {
197 199
					if (isHuman){
198 200
						aiIdenLogDto = smokingDetect(aiIdenLogDto, filePath,imageParam);//吸烟识别
199 201
				}
200
			
202
201 203
			}else if (MonitorManageConsts.AI_MODEL_CLOTHING_CODE.equals(aiIdenModel)) {
202 204
					if (isHuman){
203 205
						aiIdenLogDto=workClothesDetect(aiIdenLogDto, filePath,imageParam);//工作服识别
204 206
					}
205 207
				}
206
			
208
207 209
			else if (MonitorManageConsts.AI_MODEL_INSTRUMENT.equals(aiIdenModel)) {
208 210
				aiIdenLogDto=instrumentDetect(aiIdenLogDto,filePath);//仪表识别
209
			
211
210 212
			} else if (MonitorManageConsts.AI_MODEL_STRANGER.equals(aiIdenModel)){
211 213
				if (isHuman) {
212 214
					aiIdenLogDto = strangerDetect(aiIdenLogDto, filePath, imageParam);//陌生人识别
213 215
				}
214
			
216
215 217
			} else {
216
			
218
217 219
			}*/
218 220
219 221
		}
@ -222,7 +224,7 @@ public class KafkaProcessImpl implements KafkaProcess {
222 224
			aiIdenLogDto.setIdenResultType(MonitorManageConsts.AI_IDENTIFY_RESULT_ALARM);
223 225
			aiIdenLogDto.setIdenResult(JSON.toJSONString(alarmIdenResultDtosList));
224 226
			aiIdenLogDto.setRelateEmployeeRoleId(MonitorManageConsts.alarmEmployeeRoleId);
225
			
227
226 228
			log.info("AI识别结果为报警,推送KAFKA消息:"+JSONObject.toJSONString(aiIdenLogDto));
227 229
			processKafka(aiIdenLogDto.getTopic(), JSONObject.toJSONString(aiIdenLogDto));
228 230
			log.info("消息推送完成");
@ -343,7 +345,7 @@ public class KafkaProcessImpl implements KafkaProcess {
343 345
			/*// 安全帽识别
344 346
			String aiResponseData = ebcAiService.workClothesDetect(ImageBase64Converter.convertFileToBase64(aifilePath),
345 347
					true, true, 0.9f);
346
			
348
347 349
			JSONObject jsonObject = JSONObject.parseObject(aiResponseData);// JSONUtil.formatJsonStr(aiResponseData);
348 350
			if (jsonObject.getString("Status").equals("Ok")) {
349 351
				JSONArray jsonoArray = JSONArray.parseArray(jsonObject.getString("Result"));
@ -358,8 +360,12 @@ public class KafkaProcessImpl implements KafkaProcess {
358 360
			}*/
359 361
360 362
			log.info("开始AI人数识别处理...");
361
			String aiResponseData = ebcAiService.headDetect(ImageBase64Converter.convertFileToBase64(aifilePath), true,
362
					0.9f);
363
			//暂时用安全帽识别判断是否有人
364
			String aiResponseData = ebcAiService.helmetDetect(ImageBase64Converter.convertFileToBase64(aifilePath),
365
					Strings.EMPTY, Strings.EMPTY);
366
367
			/*String aiResponseData = ebcAiService.headDetect(ImageBase64Converter.convertFileToBase64(aifilePath), true,
368
					0.9f);*/
363 369
			JSONObject jsonObject = JSONObject.parseObject(aiResponseData);
364 370
			JSONArray jsonArray = jsonObject.getJSONArray("Result");
365 371
			if (!CollectionUtils.isEmpty(jsonArray)) {
@ -389,4 +395,6 @@ public class KafkaProcessImpl implements KafkaProcess {
389 395
		return result.toString();
390 396
	}
391 397
398
399
392 400
}

+ 14 - 14
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/utils/AiIdenUtils.java

@ -31,9 +31,9 @@ public class AiIdenUtils {
31 31
	 *
32 32
	 * @return boxIntArr
33 33
	 */
34
	public static int[] getBoxArray(JSONArray jsonArray, Map<String, Integer> getImageParam) {
34
	public static double[] getBoxArray(JSONArray jsonArray, Map<String, Integer> getImageParam) {
35 35
		if (CollectionUtils.isEmpty(jsonArray) || jsonArray.size() != 4 || CollectionUtils.isEmpty(getImageParam)) {
36
			return new int[4];
36
			return new double[4];
37 37
		}
38 38
39 39
		/*int[] boxIntArr=new int[jsonArray.size()];
@ -42,24 +42,25 @@ public class AiIdenUtils {
42 42
		    boxIntArr[i] =boxValue.intValue();
43 43
		}*/
44 44
45
		int[] boxIntArr = new int[4];
45
		double[] boxLongArr = new double[4];
46 46
		try {
47 47
			BigDecimal boxValue = (BigDecimal) jsonArray.get(0);
48
			boxIntArr[0] = boxValue.divide(new BigDecimal(getImageParam.get("width")), 0, BigDecimal.ROUND_FLOOR)
49
					.intValue();
48
49
			boxLongArr[0] = boxValue.divide(new BigDecimal(getImageParam.get("width")), 4, BigDecimal.ROUND_HALF_UP).doubleValue();
50
50 51
			boxValue = (BigDecimal) jsonArray.get(1);
51
			boxIntArr[1] = boxValue.divide(new BigDecimal(getImageParam.get("height")), 0, BigDecimal.ROUND_FLOOR)
52
					.intValue();
52
			boxLongArr[1] = boxValue.divide(new BigDecimal(getImageParam.get("height")), 4, BigDecimal.ROUND_HALF_UP)
53
					.doubleValue();
53 54
			boxValue = (BigDecimal) jsonArray.get(2);
54
			boxIntArr[2] = boxValue.divide(new BigDecimal(getImageParam.get("width")), 0, BigDecimal.ROUND_CEILING)
55
					.intValue();
55
			boxLongArr[2] = boxValue.divide(new BigDecimal(getImageParam.get("width")), 4, BigDecimal.ROUND_HALF_UP)
56
					.doubleValue();
56 57
			boxValue = (BigDecimal) jsonArray.get(3);
57
			boxIntArr[3] = boxValue.divide(new BigDecimal(getImageParam.get("height")), 0, BigDecimal.ROUND_CEILING)
58
					.intValue();
58
			boxLongArr[3] = boxValue.divide(new BigDecimal(getImageParam.get("height")), 4, BigDecimal.ROUND_HALF_UP)
59
					.doubleValue();
59 60
		} catch (Exception e) {
60 61
			log.error("getBoxArray is error: errorMsg=" + e.getMessage() + ", jsonArray=" + jsonArray);
61 62
		}
62
		return boxIntArr;
63
		return boxLongArr;
63 64
	}
64 65
65 66
	/**
@ -132,5 +133,4 @@ public class AiIdenUtils {
132 133
133 134
		return result.toString();
134 135
	}
135
136
}
136
}

+ 2 - 2
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/utils/KafkaProducerConfig.java

@ -26,7 +26,7 @@ public class KafkaProducerConfig {
26 26
27 27
    @Value("${kafka.producer.servers:Empty}")
28 28
//    private static String servers = "47.105.160.21:9090";
29
    private static String servers = "10.19.90.34:9090";
29
    private static String servers = "10.1.194.17:9092";
30 30
    @Value("${kafka.producer.retries:0}")
31 31
    private  int retries;
32 32
    @Value("${kafka.producer.batch.size:4096}")
@ -110,4 +110,4 @@ public class KafkaProducerConfig {
110 110
        }
111 111
        return true;
112 112
    }
113
}
113
}

+ 12 - 11
monitor-manage-service/src/main/resources/application.properties

@ -10,10 +10,10 @@ server.servlet.context-path=/sp
10 10
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
11 11
#spring.datasource.username=comon_frm
12 12
#spring.datasource.password=1qaz@WSX
13
spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
13
spring.datasource.url=jdbc:mysql://10.1.252.196:3306/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
14 14
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
15
spring.datasource.username=ebc
16
spring.datasource.password=ebc@123
15
spring.datasource.username=root
16
spring.datasource.password=asdsadadaUda4u!@
17 17
18 18
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
19 19
#spring.jpa.database=default
@ -26,7 +26,7 @@ spring.main.allow-bean-definition-overriding=true
26 26
27 27
#kafka
28 28
#kafka.bootstrap-servers=47.105.160.21:9090
29
kafka.bootstrap-servers=10.19.90.34:9090
29
kafka.bootstrap-servers=10.1.194.17:9092
30 30
#kafka.topic.deviceLocation=Topic_IoT_DeviceLocation_111
31 31
#kafka.topic.alarm=Topic_IoT_IndividualAlarm_111
32 32
#kafka.topic.deviceLocation=DeviceLocationA
@ -47,8 +47,8 @@ kafka.listener.concurrencys=3,6
47 47
kafka.listener.poll-timeout=1500
48 48
49 49
#minio
50
minio.endpoint=http://10.19.90.34
51
minio.port=19000
50
minio.endpoint=http://10.1.194.18
51
minio.port=9000
52 52
minio.accessKey=minioadmin
53 53
minio.secretKey=minioadmin
54 54
minio.secure=false
@ -73,8 +73,8 @@ logging.level.com.ai=debug
73 73
logging.level.org.springframework.data=debug
74 74
75 75
#\u76d1\u63a7\u6587\u4ef6\u5939
76
camera.filePath=/home/puaiuc/data/DAHUA
77
#camera.filePath=E:\\data\\DAHUA
76
camera.filePath=/root/ebc/data/DAHUA
77
#camera.filePath=D:\\data\\DAHUA
78 78
79 79
#AI\u05b4\u56fe\u7247
80 80
#kafka.topic.aitask=topicTaskTest
@ -85,8 +85,8 @@ kafka.topic.aivideo=topic_ai_video
85 85
86 86
87 87
#AI\u5931\u8d25\u8bf7\u6c42\u5730\u5740
88
#ebc.ai.head-det-url=http://10.1.251.211:7001/todo/api/v1.4/control/online/IMAGE/HEAD/PREDICT
89
ebc.ai.head-det-url=http://10.1.251.211:7001/todo/api/v1.4/control/online/IMAGE/HUMAN/PREDICT
88
ebc.ai.head-det-url=http://10.1.251.211:7001/todo/api/v1.4/control/online/IMAGE/HEAD/PREDICT
89
#ebc.ai.head-det-url=http://10.1.251.211:7003/todo/api/v1.4/control/online/IMAGE/HUMAN/PREDICT
90 90
ebc.ai.helmet-det-url=http://10.1.251.211:7003/todo/api/v1.4/control/online/IMAGE/HELMET/PREDICT
91 91
ebc.ai.smokingdet-url=http://10.1.251.213:5125/smokingdet
92 92
ebc.ai.instrument-det-url=http://10.1.251.213:19100/predict
@ -95,5 +95,6 @@ ebc.ai.work-clothes-det-url=http://10.1.251.211:7003/todo/api/v1.4/control/onlin
95 95
#ebc.ai.face-recog-service-url=http://10.21.10.28:9018/api/face/recog
96 96
ebc.ai.face-recog-service-url=http://10.1.251.211:7002/todo/api/v1.4/control/online/IMAGE/FACE/PREDICT
97 97
98
98 99
#AI\u4efb\u52a1\u8bf7\u6c42\u5730\u5740
99
ebc.protection.resource-url=http://10.19.90.34:8018/sp/resourceTool/getResourceToolAllInfo
100
ebc.protection.resource-url=http://10.1.252.196:8018/sp/resourceTool/getResourceToolAllInfo

+ 27 - 0
monitor-manage-service/src/test/java/com/ai/bss/monitorManage/PictureProcessServiceTest.java

@ -1,8 +1,11 @@
1 1
package com.ai.bss.monitorManage;
2 2
3 3
4
import com.ai.bss.components.common.util.ImageBase64Converter;
5
import com.ai.bss.components.ebcai.service.EbcAiService;
4 6
import com.ai.bss.monitorManage.service.interfaces.MonitorManageService;
5 7
import lombok.extern.slf4j.Slf4j;
8
import org.apache.logging.log4j.util.Strings;
6 9
import org.junit.Test;
7 10
import org.junit.runner.RunWith;
8 11
import org.springframework.beans.factory.annotation.Autowired;
@ -16,9 +19,33 @@ public class PictureProcessServiceTest {
16 19
    @Autowired
17 20
    MonitorManageService pictureProcessService;
18 21
22
    @Autowired
23
    EbcAiService ebcAiService;
19 24
20 25
    @Test
21 26
    public void loadPictureFromDirectory() throws InterruptedException {
22 27
        pictureProcessService.loadPictureFromDirectory();
23 28
    }
29
30
31
32
    @Test
33
    public void setPictureProcessService11()  {
34
/*
35
        String aiResponseData = ebcAiService.workClothesDetect(ImageBase64Converter.convertFileToBase64("D:\\data\\DAHUA\\6L04C6FPAGFD039\\images\\12120210203112625221.jpg"),
36
                true, true, 0.9f);*/
37
        String aiResponseData = ebcAiService.faceAiRecog(ImageBase64Converter.convertFileToBase64("D:\\data\\DAHUA\\6L04C6FPAGFD039\\images\\12120210203112625221.jpg"));
38
        log.info("AI人脸识别结果: " + aiResponseData);
39
40
      /* String aiResponseData = ebcAiService.helmetDetect(ImageBase64Converter.convertFileToBase64("D:\\data\\DAHUA\\6L04C6FPAGFD039\\images\\12120210203112625221.jpg"),
41
                Strings.EMPTY, Strings.EMPTY);*/
42
43
      /*String aiResponseData = ebcAiService.headDetect(ImageBase64Converter.convertFileToBase64("D:\\data\\DAHUA\\6L04C6FPAGFD039\\images\\12120210203112625221.jpg"), true,
44
                0.9f);
45
*/
46
     /*   String aiResponseData = ebcAiService.instrumentDetect(ImageBase64Converter.convertFileToBase64("D:\\data\\DAHUA\\6L04C6FPAGFD039\\images\\12120210203112625221111222.jpg"),
47
                Strings.EMPTY, Strings.EMPTY, Strings.EMPTY);*/
48
        System.out.println(aiResponseData);
49
    }
50
24 51
}

+ 44 - 16
monitor-manage-service/src/test/resources/application.properties

@ -1,8 +1,8 @@
1 1
spring.application.name=WorkTaskSpec
2 2
3
server.port=8018
3
server.port=8028
4 4
5
server.servlet.context-path=/sp
5
server.servlet.context-path=/
6 6
7 7
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
8 8
#spring.datasource.url=jdbc:mysql://localhost:3306/cmp
@ -10,10 +10,10 @@ server.servlet.context-path=/sp
10 10
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
11 11
#spring.datasource.username=comon_frm
12 12
#spring.datasource.password=1qaz@WSX
13
spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
13
spring.datasource.url=jdbc:mysql://10.1.252.196:3306/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
14 14
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
15
spring.datasource.username=ebc
16
spring.datasource.password=ebc@123
15
spring.datasource.username=root
16
spring.datasource.password=asdsadadaUda4u!@
17 17
18 18
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
19 19
#spring.jpa.database=default
@ -26,9 +26,9 @@ spring.main.allow-bean-definition-overriding=true
26 26
27 27
#kafka
28 28
#kafka.bootstrap-servers=47.105.160.21:9090
29
kafka.bootstrap-servers=10.19.90.34:9090
30
kafka.topic.deviceLocation=Topic_IoT_DeviceLocation_111
31
kafka.topic.alarm=Topic_IoT_IndividualAlarm_111
29
kafka.bootstrap-servers=10.1.194.17:9092
30
#kafka.topic.deviceLocation=Topic_IoT_DeviceLocation_111
31
#kafka.topic.alarm=Topic_IoT_IndividualAlarm_111
32 32
#kafka.topic.deviceLocation=DeviceLocationA
33 33
#kafka.topic.alarm=IndividualAlarmA
34 34
kafka.producer.batch-size=16785
@ -47,18 +47,22 @@ kafka.listener.concurrencys=3,6
47 47
kafka.listener.poll-timeout=1500
48 48
49 49
#minio
50
minio.endpoint=http://10.19.90.34
51
minio.port=19000
50
minio.endpoint=http://10.1.194.18
51
minio.port=9000
52 52
minio.accessKey=minioadmin
53 53
minio.secretKey=minioadmin
54 54
minio.secure=false
55 55
minio.bucketHeaderImage=prod-dev
56
minio.faceAddServiceUrl=http://10.21.10.28:9018/api/face/add
57
minio.face-del-service-url=http://10.21.10.28:9018/api/face/del
58
minio.face-recog-service-url=http://10.21.10.28:9018/api/face/recog
56
#minio.faceAddServiceUrl=http://10.21.10.28:9018/api/face/add
57
#minio.face-del-service-url=http://10.21.10.28:9018/api/face/del
58
#minio.face-recog-service-url=http://10.21.10.28:9018/api/face/recog
59
minio.faceAddServiceUrl=http://10.1.251.211:7002/todo/api/v1.4/control/online/IMAGE/FACE/PREDICT
60
minio.face-del-service-url=http://10.1.251.211:7002/todo/api/v1.4/control/online/IMAGE/FACE/PREDICT
61
minio.face-recog-service-url=http://10.1.251.211:7002/todo/api/v1.4/control/online/IMAGE/FACE/PREDICT
62
minio.face-recog-mincosin-value=0.5
59 63
60
myminio.bucketWorkToolImage=tool-image
61
myminio.bucketWorkToolView=tool-view
64
myminio.bucketAiImage=ai-image
65
myminio.bucketAiVideo=ai-video
62 66
63 67
# CACHE
64 68
#spring.cache.type=ehcache
@ -68,5 +72,29 @@ myminio.bucketWorkToolView=tool-view
68 72
logging.level.com.ai=debug
69 73
logging.level.org.springframework.data=debug
70 74
75
#\u76d1\u63a7\u6587\u4ef6\u5939
76
camera.filePath=/root/ebc/data/DAHUA
77
#camera.filePath=D:\\data\\DAHUA
71 78
72
camera.filePath=D:\\resource\\upload\\file\\20200107
79
#AI\u05b4\u56fe\u7247
80
#kafka.topic.aitask=topicTaskTest
81
kafka.topic.aitask=topic_ai_task
82
#AI\u89c6\u9891
83
#kafka.topic.aivideo=topicVideoTest
84
kafka.topic.aivideo=topic_ai_video
85
86
87
#AI\u5931\u8d25\u8bf7\u6c42\u5730\u5740
88
#ebc.ai.head-det-url=http://10.1.251.211:7001/todo/api/v1.4/control/online/IMAGE/HEAD/PREDICT
89
ebc.ai.head-det-url=http://10.1.251.211:7001/todo/api/v1.4/control/online/IMAGE/HUMAN/PREDICT
90
ebc.ai.helmet-det-url=http://10.1.251.211:7003/todo/api/v1.4/control/online/IMAGE/HELMET/PREDICT
91
ebc.ai.smokingdet-url=http://10.1.251.213:5125/smokingdet
92
ebc.ai.instrument-det-url=http://10.1.251.213:19100/predict
93
ebc.ai.work-clothes-det-url=http://10.1.251.211:7003/todo/api/v1.4/control/online/IMAGE/HUMAN/PREDICT
94
95
#ebc.ai.face-recog-service-url=http://10.21.10.28:9018/api/face/recog
96
ebc.ai.face-recog-service-url=http://10.1.251.211:7002/todo/api/v1.4/control/online/IMAGE/FACE/PREDICT
97
98
99
#AI\u4efb\u52a1\u8bf7\u6c42\u5730\u5740
100
ebc.protection.resource-url=http://localhost:8018/sp/resourceTool/getResourceToolAllInfo

+ 5 - 4
security-protection-platform/.aid/aid.js

@ -61,11 +61,12 @@ module.exports = {
61 61
    {
62 62
      url: '/sp',
63 63
      options: {
64
        target: 'http://10.19.90.34:8018',
64
        target: 'http://10.1.252.196:8018',
65
        // target: 'http://10.1.74.27:8018',
65 66
        changeOrigin: true,
66
        pathRewrite: {
67
          '^/sp': '/'
68
        }
67
        // pathRewrite: {
68
        //   '^/sp': '/'
69
        // }
69 70
      }
70 71
    },
71 72
  ]

+ 1 - 1
security-protection-platform/src/conf/axios.config.js

@ -44,7 +44,7 @@ const conf = {
44 44
        baseURL: '/sp'
45 45
    },
46 46
    picurl: {
47
      baseURL: 'http://10.19.90.34:19000/tool-image/'
47
      baseURL: 'http://10.1.194.18:9000/tool-image/'
48 48
    }
49 49
50 50
  }

+ 2 - 2
security-protection-platform/src/layout/index.vue

@ -46,12 +46,12 @@ export default {
46 46
  },
47 47
  mounted() {
48 48
    // 镜屏调用
49
    // this.connect()
49
    this.connect()
50 50
  },
51 51
  methods: {
52 52
    connect() {
53 53
      if (this.stompClient == null || !this.stompClient.connected()) {
54
        this.stompClient = new StompClient('ws://10.19.90.34:7200/stomp')
54
        this.stompClient = new StompClient('ws://10.1.252.196:7200/stomp')
55 55
        this.stompClient.connect('zhangsan', '123456', () => { this.connectCallback() }, () => { this.errorCallback() })
56 56
      } else {
57 57
        console.log('当前处于连接状态')

+ 14 - 7
security-protection-platform/src/modules/access/component/instrumentRecord/index.vue

@ -19,7 +19,7 @@
19 19
        <t-button color="primary" @click="btnsearch">查询</t-button>
20 20
        <t-button @click="reset">重置</t-button>
21 21
      </div>
22
       <t-button  icon="upload" style="width:128px;height:32px" class="upload">导出至Excel</t-button>
22
      <t-button color="primary" icon="upload" style="width:128px;height:32px" class="upload">导出至Excel</t-button>
23 23
24 24
    </div> -->
25 25
    <div class="track-container">
@ -36,9 +36,9 @@
36 36
            </div>
37 37
          </div>
38 38
          <div class="btns">
39
            <t-button icon="upload" style="width:128px;height:32px" class="upload">导出至Excel</t-button>
39
            <t-button color="primary" icon="upload" style="width:128px;height:32px" class="upload">导出至Excel</t-button>
40 40
            <t-dropdown :visibled="customVisibled" trigger-mode="custom">
41
              <t-button slot="trigger" color="secondary" icon="tile-four-outline" class="trigger-button" @click="onTriggerClick"></t-button>
41
              <t-button slot="trigger" color="secondary" icon="tile-four-outline" @click="onTriggerClick"></t-button>
42 42
              <div slot="popper">
43 43
                <div style="border-radius: 5px;padding: 20px 20px 20px 20px;background-color: white;">
44 44
                  <t-checkbox-group v-model="social" vertical @change="checkAllGroupChange">
@ -54,6 +54,7 @@
54 54
                </div>
55 55
              </div>
56 56
            </t-dropdown>
57
            <t-button color="secondary" icon="loading" class="reset-btn" @click="reset"></t-button>
57 58
          </div>
58 59
        </div>
59 60
        <div class="animate-demo-wrapper">
@ -61,13 +62,12 @@
61 62
            <div v-show="slideVisible" class="transition-box allCondition">
62 63
              <div class="input-rule">
63 64
                <span>开始时间:</span>
64
                <t-date-picker :confirm="false" v-model="searchdata.beginDay" placeholder="请选择开始时间" style="width:320px;height:32px"></t-date-picker>
65
                <t-date-picker :confirm="false" v-model="searchdata.beginDay" placeholder="请选择开始时间" style="width:200px;height:32px"></t-date-picker>
65 66
              </div>
66 67
              <div class="input-rule">
67 68
                <span>结束时间:</span>
68 69
                <t-date-picker :confirm="false" v-model="searchdata.endDay" placeholder="请选择结束时间" style="width:320px;height:32px"></t-date-picker>
69 70
              </div>
70
              <a style="float:right;color:#0089d4;" @click="reset" href="javascript:;">重置</a>
71 71
            </div>
72 72
          </transition>
73 73
        </div>
@ -462,6 +462,11 @@ export default {
462 462
            onImgLoaded()
463 463
          }, 3)
464 464
        } else {
465
          debugger
466
          e.box[0] = imgObject.width * e.box[0]
467
          e.box[1] = imgObject.height * e.box[1]
468
          e.box[2] = imgObject.width * e.box[2]
469
          e.box[3] = imgObject.height * e.box[3]
465 470
          that.newimage = getImagePortion(imgObject, e.box[2] - e.box[0], e.box[3] - e.box[1], e.box[0], e.box[1])
466 471
        }
467 472
      }
@ -590,12 +595,14 @@ export default {
590 595
      justify-content: space-between;
591 596
      border: 1px solid rgba(0, 0, 0, 0.09);
592 597
      background-color: #f8f9fa;
593
      flex-wrap: nowrap;
598
      flex-wrap: wrap;
594 599
      padding: 20px;
595 600
      margin: 5px auto;
596
      align-items: center;
597 601
      .input-rule {
598 602
        flex: 1;
603
        width: 50%;
604
        min-width: 50%;
605
        max-width: 50%;
599 606
        padding: 10px 0 10px 20px;
600 607
      }
601 608
    }

+ 13 - 13
security-protection-platform/src/modules/access/component/io-record/index.vue

@ -20,7 +20,7 @@
20 20
        <t-button @click="reset">重置</t-button>
21 21
      </div>
22 22
23
       <t-button  icon="upload" style="width:128px;height:32px" class="upload">导出至Excel</t-button>
23
      <t-button color="primary" icon="upload" style="width:128px;height:32px" class="upload">导出至Excel</t-button>
24 24
25 25
    </div> -->
26 26
    <div class="track-container">
@ -37,9 +37,9 @@
37 37
            </div>
38 38
          </div>
39 39
          <div class="btns">
40
            <t-button icon="upload" style="width:128px;height:32px" class="upload">导出至Excel</t-button>
40
            <t-button color="primary" icon="upload" style="width:128px;height:32px" class="upload">导出至Excel</t-button>
41 41
            <t-dropdown :visibled="customVisibled" trigger-mode="custom">
42
              <t-button slot="trigger" color="secondary" icon="tile-four-outline" class="trigger-button" @click="onTriggerClick"></t-button>
42
              <t-button slot="trigger" color="secondary" icon="tile-four-outline" @click="onTriggerClick"></t-button>
43 43
              <div slot="popper">
44 44
                <div style="border-radius: 5px;padding: 20px 20px 20px 20px;background-color: white;">
45 45
                  <t-checkbox-group v-model="social" vertical @change="checkAllGroupChange">
@ -55,6 +55,7 @@
55 55
                </div>
56 56
              </div>
57 57
            </t-dropdown>
58
            <t-button color="secondary" icon="loading" class="reset-btn" @click="reset"></t-button>
58 59
          </div>
59 60
        </div>
60 61
        <div class="animate-demo-wrapper">
@ -62,13 +63,12 @@
62 63
            <div v-show="slideVisible" class="transition-box allCondition">
63 64
              <div class="input-rule">
64 65
                <span>开始时间:</span>
65
                <t-date-picker :confirm="false" v-model="searchdata.beginDay" placeholder="请选择开始时间" style="width:320px;height:32px"></t-date-picker>
66
                <t-date-picker :confirm="false" v-model="searchdata.beginDay" placeholder="请选择开始时间" style="width:200px;height:32px"></t-date-picker>
66 67
              </div>
67 68
              <div class="input-rule">
68 69
                <span>结束时间:</span>
69 70
                <t-date-picker :confirm="false" v-model="searchdata.endDay" placeholder="请选择结束时间" style="width:320px;height:32px"></t-date-picker>
70 71
              </div>
71
              <a style="float:right;color:#0089d4;" @click="reset" href="javascript:;">重置</a>
72 72
            </div>
73 73
          </transition>
74 74
        </div>
@ -87,9 +87,6 @@
87 87
      <t-table-column v-if="columns[4].show" :formatter="date_formatter" label="职务" prop="employeePositionZh" width="80px">
88 88
      </t-table-column>
89 89
      <t-table-column v-if="columns[5].show" :formatter="date_formatter" prop="simi" label="相似度" width="75px">
90
        <template v-slot="{row}">
91
          {{ getSimi(row) }}
92
        </template>
93 90
      </t-table-column>
94 91
      <t-table-column v-if="columns[6].show" :formatter="date_formatter" label="进出时间" prop="taskExecuteTime" width="160px">
95 92
      </t-table-column>
@ -504,6 +501,10 @@ export default {
504 501
            onImgLoaded()
505 502
          }, 3)
506 503
        } else {
504
          e.box[0] = imgObject.width * e.box[0]
505
          e.box[1] = imgObject.height * e.box[1]
506
          e.box[2] = imgObject.width * e.box[2]
507
          e.box[3] = imgObject.height * e.box[3]
507 508
          that.newimage = getImagePortion(imgObject, e.box[2] - e.box[0], e.box[3] - e.box[1], e.box[0], e.box[1])
508 509
        }
509 510
      }
@ -571,9 +572,6 @@ export default {
571 572
      } else {
572 573
        return cellValue
573 574
      }
574
    },
575
    getSimi (row) {
576
      return (row.simi.split('%')[0] - 0).toFixed(2) + '%'
577 575
    }
578 576
    // //将分数转换为小数
579 577
    // toPoint (percent) {
@ -635,12 +633,14 @@ export default {
635 633
      justify-content: space-between;
636 634
      border: 1px solid rgba(0, 0, 0, 0.09);
637 635
      background-color: #f8f9fa;
638
      flex-wrap: nowrap;
639
      align-items: center;
636
      flex-wrap: wrap;
640 637
      padding: 20px;
641 638
      margin: 5px auto;
642 639
      .input-rule {
643 640
        flex: 1;
641
        width: 50%;
642
        min-width: 50%;
643
        max-width: 50%;
644 644
        padding: 10px 0 10px 20px;
645 645
      }
646 646
    }

+ 65 - 65
security-protection-platform/src/modules/dashboard/index.vue

@ -1,6 +1,6 @@
1 1
<template>
2 2
  <div class="index" style="overflow:hidden;">
3
    <div :style="`background-image: url(${imgBg})`" class="top">
3
    <div :style="`background-image: url(${imgBg})`" class="top" >
4 4
      <img src="@/assets/images/AsiainfoLogo.png" class="top-logo">
5 5
      <div style="position: absolute;top:50%;left:54%;transform: translate(-50%,-50%);vertical-align: middle; color: white; font-size: 14px">
6 6
        <b> | AISI安防一体化平台</b>
@ -21,7 +21,7 @@
21 21
          <div id="doughnut" style="height: 100%;width: 100%"></div>
22 22
        </div>
23 23
        <div :style="`height:34%;margin-top: 3%;`" class="body-left-item">
24
          <div id="div1" :style="`background-image: url(${titleImgBg})`" class="title">
24
          <div :style="`background-image: url(${titleImgBg})`" class="title" id="div1">
25 25
            <span class="title-span">告警分析</span>
26 26
          </div>
27 27
          <div id="bar" style="height: 100%;width: 100%"></div>
@ -46,8 +46,8 @@
46 46
          <span class="title-span">重点区域监控</span>
47 47
        </div>
48 48
        <!--        <video-player ref="videoPlayer" :options="videoOptions" :playsinline="true" class="vjs-custom-skin videoPlayer"></video-player>-->
49
        <div id="div11">
50
          <video-player v-if="videoOptions !== {}" id="div111" ref="videoPlayer" :options="videoOptions" :playsinline="true" class="vjs-custom-skin videoPlayer">
49
        <div id="div11" style="padding-right: 7%;padding-left: 7%">
50
          <video-player v-if="videoOptions !== {}" ref="videoPlayer" :options="videoOptions" :playsinline="true"  id="div111" class="vjs-custom-skin videoPlayer">
51 51
52 52
          </video-player>
53 53
        </div>
@ -102,7 +102,7 @@ import 'video.js/dist/video-js.css'
102 102
import 'vue-video-player/src/custom-theme.css'
103 103
import 'videojs-flash'
104 104
import videojs from 'video.js'
105
import EventBus from '../../bus'
105
import EventBus from "../../bus";
106 106
window.videojs = videojs
107 107
108 108
require('video.js/dist/lang/zh-CN.js')
@ -116,27 +116,27 @@ export default {
116 116
      month >= 10 ? month : '0' + month
117 117
      var day = value.getDate() >= 10 ? value.getDate() : '0' + value.getDate()
118 118
      var hours =
119
        value.getHours() >= 10 ? value.getHours() : '0' + value.getHours()
119
          value.getHours() >= 10 ? value.getHours() : '0' + value.getHours()
120 120
      var minutes =
121
        value.getMinutes() >= 10
122
          ? value.getMinutes()
123
          : '0' + value.getMinutes()
121
          value.getMinutes() >= 10
122
              ? value.getMinutes()
123
              : '0' + value.getMinutes()
124 124
      var seconds =
125
        value.getSeconds() >= 10
126
          ? value.getSeconds()
127
          : '0' + value.getSeconds()
125
          value.getSeconds() >= 10
126
              ? value.getSeconds()
127
              : '0' + value.getSeconds()
128 128
      return (
129
        year +
130
        '年' +
131
        month +
132
        '月' +
133
        day +
134
        '日 ' +
135
        hours +
136
        ':' +
137
        minutes +
138
        ':' +
139
        seconds
129
          year +
130
          '年' +
131
          month +
132
          '月' +
133
          day +
134
          '日 ' +
135
          hours +
136
          ':' +
137
          minutes +
138
          ':' +
139
          seconds
140 140
      )
141 141
    }
142 142
  },
@ -180,8 +180,6 @@ export default {
180 180
    setInterval(() => { // 识别记录
181 181
      this.initRecognition()
182 182
    }, 5000)
183
    // console.log(textDom.nextSibling)
184
    // textDom.nextSibling.nodeValue = ''
185 183
    // EventBus.$on('sendAiData', (msg) => { // 获取镜屏推送消息
186 184
    //   console.log('已接收镜屏消息...')
187 185
    //   var oDiv = document.getElementById("div111");
@ -199,44 +197,45 @@ export default {
199 197
    // })
200 198
  },
201 199
  methods: {
202
    testHKK (box, alarmMemo) {
200
    testHKK(box, alarmMemo) {
203 201
      var width = box[2] - box[0]
204 202
      var height = box[3] - box[1]
205
      var oDiv = document.getElementById('div111')
203
      var oDiv = document.getElementById("div111");
206 204
      // var aBox = this.getByClass(oDiv,"vjs-tech");
207 205
      // alert(aBox.length);
208
      var e = oDiv
209
      var div = document.createElement('div')
206
      var e = oDiv;
207
      var div = document.createElement("div");
210 208
      // div.className = "form-group";
211 209
      var del = document.createElement('p')
212 210
      var x = 10 + this.hkk
213
      this.hkk++
214
      del.innerHTML = '<div class="hkk" style="color: white;border: 2px solid #00d8f3;position: absolute;top: ' + box[1] + 'px;left: ' + box[0] + 'px;width: ' + width + 'px;height: ' + height + 'px;"> ' + alarmMemo + ' </div>'
215
      div.appendChild(del)
216
      e.appendChild(div)
217
      setTimeout(function () {
218
        del.remove()
211
      this.hkk ++
212
      del.innerHTML = '<div class="hkk" style="color: white;border: 2px solid #00d8f3;position: absolute;top: ' + box[1] + 'px;left: ' + box[0] + 'px;width: ' + width + 'px;height: ' + height + 'px;"> ' + alarmMemo + ' </div>';
213
      div.appendChild(del);
214
      e.appendChild(div);
215
      setTimeout(function() {
216
        del.remove();
219 217
      }, 3000)
220 218
    },
221 219
222
    findInArr (arr, n) {
223
      for (var i = 0; i < arr.length; i++) {
224
        if (arr[i] == n) {
225
          return true
220
221
    findInArr(arr,n){
222
      for(var i=0;i<arr.length;i++){
223
        if(arr[i] == n){
224
          return true;
226 225
        }
227 226
      }
228
      return false
227
      return false;
229 228
    },
230
    getByClass (oParent, sClass) {
231
      var ret = []
232
      var aEle = oParent.getElementsByTagName('*')
233
      for (var i = 0; i < aEle.length; i++) {
234
        var _aTmp = aEle[i].className.split(' ')
235
        if (this.findInArr(_aTmp, sClass)) {
236
          ret.push(aEle[i])
229
    getByClass(oParent,sClass){
230
      var ret = [];
231
      var aEle = oParent.getElementsByTagName("*");
232
      for(var i = 0; i < aEle.length; i++){
233
        var _aTmp = aEle[i].className.split(" ");
234
        if(this.findInArr(_aTmp,sClass)){
235
          ret.push(aEle[i]);
237 236
        }
238 237
      }
239
      return ret
238
      return ret;
240 239
    },
241 240
    async createMyButton () {
242 241
      this.$nextTick(() => {
@ -245,13 +244,6 @@ export default {
245 244
        let start = document.getElementsByClassName('vjs-play-control vjs-control vjs-button')
246 245
        let volume = document.getElementsByClassName('vjs-volume-panel vjs-control vjs-volume-panel-horizontal')
247 246
        let text = document.getElementsByClassName('vjs-live-control vjs-control')
248
        // 删除直播文本节点
249
        let textDoms = document.querySelectorAll('.vjs-live-control .vjs-live-display .vjs-control-text')
250
        textDoms.forEach(item => {
251
          // 这样设置没用 不知道为啥 明明在nextTick中 真正的“直播”文本节点还是没选到
252
          item.nextSibling.nodeValue = ''
253
          // item.nextSibling.data = ''
254
        })
255 247
        bars.forEach((item, index) => {
256 248
          time.forEach(item => {
257 249
            item.remove()
@ -281,7 +273,7 @@ export default {
281 273
          loop: false, // 导致视频一结束就重新开始。
282 274
          preload: 'auto', // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
283 275
          language: 'zh-CN',
284
          aspectRatio: '16:10', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
276
          aspectRatio: '4:3', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
285 277
          // fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
286 278
          // 是否流体自适应容器宽高
287 279
          fluid: true,
@ -394,16 +386,20 @@ export default {
394 386
          data = data.slice(0, 4)
395 387
        }
396 388
        data.forEach(e => {
397
          if (e.employeeName == null || e.employeeName == '') {
389
          if (e.employeeName == null || e.employeeName == ''){
398 390
            e.employeeCode = '未识别成功'
399 391
          }
400
          e.simi = e.simi.split('.')[0] + '%'
392
          if (e.simi){
393
            e.simi = e.simi.split('.')[0] + '%'
394
          }else {
395
            e.simi = '0%'
396
          }
401 397
          e.newImg = e.idenPictureUrl
402 398
          var loadTimer
403 399
          var imgObject = new Image()
404 400
          imgObject.setAttribute('crossOrigin', 'anonymous')
405 401
          imgObject.src = e.idenPictureUrl
406
          imgObject.onLoad = onImgLoaded()
402
          imgObject.onload = onImgLoaded()
407 403
          function onImgLoaded () {
408 404
            if (loadTimer != null) clearTimeout(loadTimer)
409 405
            if (!imgObject.complete) {
@ -411,6 +407,10 @@ export default {
411 407
                onImgLoaded()
412 408
              }, 3)
413 409
            } else {
410
              e.box[0] = imgObject.width * e.box[0]
411
              e.box[1] = imgObject.height * e.box[1]
412
              e.box[2] = imgObject.width * e.box[2]
413
              e.box[3] = imgObject.height * e.box[3]
414 414
              e.newImg = getImagePortion(imgObject, e.box[2] - e.box[0], e.box[3] - e.box[1], e.box[0], e.box[1])
415 415
            }
416 416
          }
@ -575,11 +575,11 @@ export default {
575 575
            itemStyle: {
576 576
              normal: {
577 577
                color: new echarts.graphic.LinearGradient(
578
                  0, 0, 0, 1,
579
                  [
580
                    { offset: 0, color: '#00FEFF' },
581
                    { offset: 1, color: '#0C7EFC' }
582
                  ]
578
                    0, 0, 0, 1,
579
                    [
580
                      { offset: 0, color: '#00FEFF' },
581
                      { offset: 1, color: '#0C7EFC' }
582
                    ]
583 583
                ),
584 584
                label: {
585 585
                  show: true, // 是否展示
@ -865,7 +865,7 @@ export default {
865 865
.vjs-tech {
866 866
  pointer-events: none;
867 867
}
868
.checkedIndex {
868
.checkedIndex{
869 869
  border: 1px solid #009bf3;
870 870
}
871 871
</style>

+ 1 - 1
security-protection-platform/src/modules/system/devicemana/components/modal/addDeviceModal.vue

@ -92,7 +92,7 @@ export default {
92 92
      },
93 93
      // 提交表单是否显示loading
94 94
      loadingSubmit: false,
95
      action: 'http://10.19.90.34:8018/sp/resourceTool/uploadResourceToolPicture',
95
      action: 'http://10.1.252.196:8018/sp/resourceTool/uploadResourceToolPicture',
96 96
      uploadList: () => []
97 97
    }
98 98
  },

+ 2 - 2
security-protection-platform/src/modules/usermana/components/modal/addUser.vue

@ -40,7 +40,7 @@
40 40
            multiple
41 41
            style="width:120px;height:160px;background-color:#FFFFFF;"
42 42
            type="drag"
43
            action="http://10.19.90.34:8018/sp/employeeManagement/uploadEmployeePicture"
43
            action="http://10.1.252.196:8018/sp/employeeManagement/uploadEmployeePicture"
44 44
            class="demo-upload-list"
45 45
            @success = "$_onUploadSuccess"
46 46
          >
@ -61,7 +61,7 @@
61 61
            :before-upload="$_onUploadBeforeUpload"
62 62
            multiple
63 63
            type="drag"
64
            action="http://10.19.90.34:8018/sp/employeeManagement/uploadEmployeePicture"
64
            action="http://10.1.252.196:8018/sp/employeeManagement/uploadEmployeePicture"
65 65
            class="upload-edit"
66 66
            @success = "$_onUploadSuccess"
67 67
          >

+ 20 - 20
security-protection-platform/src/modules/videoSurveillance/components/ReplayDialog/index.vue

@ -223,33 +223,33 @@ export default {
223 223
    /*
224 224
   * 获取真实视频地址
225 225
   */
226
    // async getOriVideoUrl (fileId) {
227
    //   const res = await sysapi.getFileUrl(fileId)
228
    //   // fake
229
    //   return new Promise((resolve, reject) => {
230
    //     setTimeout(() => {
231
    //       const url = res.data.data.fileUrl
232
    //       resolve({
233
    //         url
234
    //       })
235
    //     }, 1000)
236
    //   })
237
    // },
226
    async getOriVideoUrl (fileId) {
227
      const res = await sysapi.getFileUrl(fileId)
228
      // fake
229
      return new Promise((resolve, reject) => {
230
        setTimeout(() => {
231
          const url = res.data.data.fileUrl
232
          resolve({
233
            url
234
          })
235
        }, 1000)
236
      })
237
    },
238 238
    getData () {
239 239
      this.$emit('get-list', { beginDay: this.beginDay, endDay: this.endDay })
240 240
    },
241 241
    resetData () {
242 242
      this.beginDay = formatDateTime(new Date(+new Date() - 10 * 60 * 1000), 'yyyy-MM-dd hh:mm:ss')
243 243
      this.endDay = formatDateTime(new Date(), 'yyyy-MM-dd hh:mm:ss')
244
      // this.getData()
245
    }
244
      this.getData()
245
    },
246 246
    // 刷新组件
247
    // reload () {
248
    //   this.isShow = false
249
    //   this.$nextTick(() => {
250
    //     this.isShow = true
251
    //   })
252
    // }
247
    reload () {
248
      this.isShow = false
249
      this.$nextTick(() => {
250
        this.isShow = true
251
      })
252
    }
253 253
  }
254 254
}
255 255
</script>

+ 7 - 7
security-protection-platform/src/modules/videoSurveillance/distinguishRecord/index.vue

@ -47,7 +47,7 @@
47 47
        <t-carousel dots="none" :speed="10000000000" arrow="always" style="width: 100%">
48 48
          <t-carousel-item v-for="(item1,index1) in dataImgList" :key="index1" style="width: 100%;padding-left: 10%">
49 49
            <div v-for="(item, index) in item1" :key="index" :src="item.idenPictureUrl" class="image-carousel">
50
              <img :src="'http://10.19.90.34:19000/ai-image/'+item.idenPictureUrl" class="img-viewer-size" @click="getParticularsData(item.aiIdenLogId,index)">
50
              <img :src="'http://10.1.194.18:9000/ai-image/'+item.idenPictureUrl" class="img-viewer-size" @click="getParticularsData(item.aiIdenLogId,index)">
51 51
              <span :class="{'fileName' : index === fileNameIndex}" style="width: 132px;margin-right: 14px;text-align:center">{{ item.fileName }}</span>
52 52
            </div>
53 53
          </t-carousel-item>
@ -81,17 +81,17 @@ export default {
81 81
        aspectRatio: '13:10', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
82 82
        // fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
83 83
        // 是否流体自适应容器宽高
84
        fluid: false,
84
        fluid: true,
85 85
        // // 设置视频播放器的显示宽度(以像素为单位)
86
        // width: '500px',
86
        // width: '100px',
87 87
        // // 设置视频播放器的显示高度(以像素为单位)
88
        height: 380,
88
        // height: '300px',
89 89
        sources: [{
90
          type: 'video/mp4', // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
90
          type: 'application/x-mpegURL', // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
91 91
          src: '' // url地址
92 92
        }],
93 93
94
        notSupportedMessage: '暂无视频可播放,请稍后再试', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
94
        notSupportedMessage: '此视频暂无法播放,请稍后再试', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
95 95
        controlBar: {
96 96
          timeDivider: true,
97 97
          // durationDisplay: true,
@ -174,7 +174,7 @@ export default {
174 174
        this.defineResult = res.data.data.alarmInfo.alarmMemo
175 175
        this.captureTIme = res.data.data.pictureInfo.fileDateTimeStr
176 176
        this.distinguishUrl = res.data.data.pictureInfo.fileUrl
177
        this.playerOptions.sources[0].src = res.data.data.videoInfo.videoFileUrl
177
        this.playerOptions.sources[0].src = res.data.data.videoInfo
178 178
      })
179 179
    },
180 180
    // 重置数据

+ 14 - 14
security-protection-platform/src/router.js

@ -39,21 +39,21 @@ export default () => {
39 39
     * 单客户端判断。
40 40
     * 参见src/frame.vue和src/store.js文件中的逻辑。
41 41
     */
42
    let isLogged = router.app.$options.store.getters.getLogged || sessionStorage.getItem('isLogged')
43
    console.log(isLogged)
44
    if (to.meta.ignoreAuth === true) {
45
      if (isLogged === true && to.path === '/login') {
46
        router.replace({ name: 'dashboard' })
47
      } else {
42
    // let isLogged = router.app.$options.store.getters.getLogged || sessionStorage.getItem('isLogged')
43
    // console.log(isLogged)
44
    // if (to.meta.ignoreAuth === true) {
45
    //   if (isLogged === true && to.path === '/login') {
46
    //     router.replace({ name: 'dashboard' })
47
    //   } else {
48
    //     next()
49
    //   }
50
    // } else {
51
    //   if (isLogged === false) {
52
    //     router.replace({ name: 'login' })
53
    //   } else {
48 54
        next()
49
      }
50
    } else {
51
      if (isLogged === false) {
52
        router.replace({ name: 'login' })
53
      } else {
54
        next()
55
      }
56
    }
55
    //   }
56
    // }
57 57
  })
58 58
59 59
  router.afterEach(() => {

+ 3 - 3
security-protection-service/src/main/java/com/ai/bss/security/protection/SecurityProtectionApp.java

@ -21,13 +21,13 @@ import org.springframework.scheduling.annotation.EnableAsync;
21 21
@SpringBootApplication
22 22
public class SecurityProtectionApp {
23 23
    public static void main(String[] args) throws Exception {
24
        System.setProperty("websocket.port", "7200");
24
     /*   System.setProperty("websocket.port", "7200");
25 25
26 26
        //注册镜屏服务
27 27
        ConnectServerManager.registerServer("websocket.port", new WebSocketStompServer("/stomp"));
28 28
        //镜屏服务启动
29
        ConnectServerStart.start(args, false);
29
        ConnectServerStart.start(args, false);*/
30 30
31 31
        SpringApplication.run(SecurityProtectionApp.class, args);
32 32
    }
33
}
33
}

+ 1 - 1
security-protection-service/src/main/java/com/ai/bss/security/protection/config/MyCorsFilter.java

@ -54,7 +54,7 @@ public class MyCorsFilter {
54 54
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
55 55
        registrationBean.setFilter(new SessionUserFilter());
56 56
        //registrationBean.setUrlPatterns(Arrays.asList("/mySessionUserFilter"));
57
        registrationBean.setUrlPatterns(Arrays.asList("/login/*"));
57
        registrationBean.setUrlPatterns(Arrays.asList("/sdfsdafsafasf"));
58 58
        Map<String, String> initParameters = new HashMap<String,String>();
59 59
        initParameters.put("impl-classname","com.ai.sso.external.DefaultPopedomImpl");
60 60
        initParameters.put("ALLOWPATH","gif;jpg;jpeg;png;login;checkLogin;genVerificationCode;logout;");

+ 4 - 4
security-protection-service/src/main/java/com/ai/bss/security/protection/controller/AiAlarmManageController.java

@ -48,7 +48,7 @@ public class AiAlarmManageController {
48 48
	*                            statusList: 处理状态列表
49 49
	* @return 结果集,具体如下:
50 50
	*                            状态、状态时间、处理详情、报警类型、报警描述、设备名称、设备编号、设备位置、报警时间、处理人、处理时间、图片url、视频url
51
	 * @throws Exception 
51
	 * @throws Exception
52 52
	*/
53 53
	@ResponseBody
54 54
	@RequestMapping("/queryPageAiAlarm")
@ -65,7 +65,7 @@ public class AiAlarmManageController {
65 65
		params.put("workEmployeeRoleId", aiQuery.getWorkEmployeeRoleId());
66 66
		params.put("beginTime", aiQuery.getBeginTime());
67 67
		params.put("endTime", aiQuery.getEndTime());
68
		
68
69 69
		if (StringUtils.isNotBlank(aiQuery.getStatusList())) {
70 70
			ArrayList<Object> statusList = new ArrayList<>();
71 71
			statusList.add(aiQuery.getStatusList());
@ -100,7 +100,7 @@ public class AiAlarmManageController {
100 100
		workTask.setStatus(aiQuery.getStatus());
101 101
		workTask.setWorkTaskId(aiQuery.getWorkTaskId());
102 102
		workTask.setProcessMemo(aiQuery.getProcessMemo());
103
		
103
104 104
		// 申请人ID和部门
105 105
		JSONObject userInfo = new LoginUserInfoUtil().getUserInfo(request);
106 106
		workTask.setOpId(userInfo.get("STAFF_ID").toString());
@ -142,5 +142,5 @@ public class AiAlarmManageController {
142 142
		List<Map<String, Object>> resultList=aiAlarmManageService.queryAiAlarmCount(params);
143 143
		return CommonResponse.ok(resultList);
144 144
	}
145
	
145
146 146
}

+ 6 - 3
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/LoginServiceImpl.java

@ -98,20 +98,23 @@ public class LoginServiceImpl implements LoginService {
98 98
99 99
            String result = HttpServiceUtil.sendPost(menuUrl, paramsMap, charset,headerMap1 );
100 100
            //将返回结果转为map
101
            logger.error("返回结果json: " + result);
101 102
            resultMap = JSON.parseObject(result, Map.class);
102
103
            logger.error("返回结果resultMap: " + resultMap.toString());
103 104
            String result1 = (String)resultMap.get("RESULT");
104 105
            if(null!=result1&&!"".equals(result1)){
105 106
                //如果result有值返回正确,将返回结果转为List
107
108
                logger.error("返回结果result1: " + result1);
106 109
                List<Map<String,List<Map>>> list = JSON.parseObject(result1, List.class);
110
                logger.error("返回结果list: " + list.toString());
107 111
                resultMap.put("RESULT",list);
108 112
            }
109 113
        } catch (Exception e) {
110 114
            logger.error("调用uspa获取菜单接口失败: " + e.getMessage());
111
112 115
            return resultMap;
113 116
        }
114 117
        return resultMap;
115 118
    }
116 119
117
}
120
}

+ 3 - 3
security-protection-service/src/main/resources/application-minio.properties

@ -1,6 +1,6 @@
1 1
#minio
2
minio.endpoint=http://10.19.90.34
3
minio.port=19000
2
minio.endpoint=http://10.1.194.18
3
minio.port=9000
4 4
minio.accessKey=minioadmin
5 5
minio.secretKey=minioadmin
6 6
minio.secure=false
@ -22,4 +22,4 @@ spminio.bucketAiVideo=ai-video
22 22
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
23 23
spminio.bucketAiImage=ai-image
24 24
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
25
spminio.bucketM3U8=m3u8-index
25
spminio.bucketM3U8=m3u8-index

+ 7 - 8
security-protection-service/src/main/resources/application.properties

@ -10,10 +10,10 @@ server.servlet.context-path=/sp
10 10
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
11 11
#spring.datasource.username=comon_frm
12 12
#spring.datasource.password=1qaz@WSX
13
spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
13
spring.datasource.url=jdbc:mysql://10.1.252.196:3306/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
14 14
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
15
spring.datasource.username=ebc
16
spring.datasource.password=ebc@123
15
spring.datasource.username=root
16
spring.datasource.password=asdsadadaUda4u!@
17 17
18 18
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
19 19
#spring.jpa.database=default
@ -26,7 +26,7 @@ spring.main.allow-bean-definition-overriding=true
26 26
27 27
#kafka
28 28
#kafka.bootstrap-servers=47.105.160.21:9090
29
kafka.bootstrap-servers=10.19.90.34:9090
29
kafka.bootstrap-servers=10.1.194.17:9092
30 30
kafka.topic.aitask=topic_ai_task
31 31
kafka.topic.aivideo=topic_ai_video
32 32
#kafka.topic.aitask=topicTaskTest
@ -68,11 +68,10 @@ spring.servlet.multipart.resolve-lazily=false
68 68
logging.level.com.ai=debug
69 69
logging.level.org.springframework.data=debug
70 70
71
uspa.login.url=http://10.19.90.34:20000/usermng/login
71
uspa.login.url=http://10.1.194.17:20000/usermng/login
72 72
uspa.login.vercode=Hiz#8uAqkjhoPmXu8%aaa
73 73
74
uspa.login.menuUrl=http://10.19.90.34:20000/usermng/process/com.wframe.usermanager.services.impl.QueryMenuByUser
75
76
74
uspa.login.menuUrl=http://10.1.194.17:20000/usermng/process/com.wframe.usermanager.services.impl.QueryMenuByUser
75
        
77 76
# \u5f15\u5165minio\u548ciot\u7684\u914d\u7f6e\u6587\u4ef6
78 77
spring.profiles.active=iot,minio

+ 5 - 5
security-protection-service/src/main/resources/sso.properties

@ -15,7 +15,7 @@ COOKIE_MAXAGE=-1
15 15
TENANT_REGISTER_CLASS=com.ai.customermanager.services.impl.CustRegisterVercodeImpl
16 16
17 17
18
##\u8fdc\u7a0b\u7f13\u5b58\u8c03\u7528\u7c7b\uff0c\u8fd9\u4e2a\u7c7b\u5fc5\u987b\u6709\u4e09\u4e2a\u51fd\u6570 
18
##\u8fdc\u7a0b\u7f13\u5b58\u8c03\u7528\u7c7b\uff0c\u8fd9\u4e2a\u7c7b\u5fc5\u987b\u6709\u4e09\u4e2a\u51fd\u6570
19 19
##    public boolean set(String key,String value)
20 20
##    public String get(String key)
21 21
##    public boolean del(String key);
@ -53,8 +53,8 @@ RETURN_TAG={"MESSAGE":"NOLOGIN","CODE":999999,"FLAG":"FAIL","RESULT":{"URL":"htt
53 53
54 54
#redis.single=10.11.20.117:6379
55 55
#redis.password=luMZulgbotmo71aa
56
redis.single=10.19.90.34:6379
57
redis.password=Ipu@321!
56
redis.single=10.1.194.17:6379
57
redis.password=ebc@redis
58 58
59 59
redis.pool.maxTotal=1000
60 60
redis.pool.minIdle=5
@ -68,7 +68,7 @@ redis.pool.timeBetweenEvictionRunsMillis=10000
68 68
69 69
SESSION_DEFAULT_VERCODE=Hiz#8uAqkjhoPmXu8%aaa
70 70
71
#\u662f\u5426\u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236 1 \u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236 
71
#\u662f\u5426\u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236 1 \u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236
72 72
is_check_interface=0
73 73
74 74
@ -78,4 +78,4 @@ is_check_interface=0
78 78
USER_LOGIN_AUTH_CLASS=com.wframe.usermanager.services.impl.UserLoginAuthImpl
79 79
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByTokenImpl
80 80
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByToken4XblImpl
81
SIGN_KEY_CODE=TENANT_CODE
81
SIGN_KEY_CODE=TENANT_CODE