Преглед на файлове

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
    private static final int PORT = 8042;
36
    private static final int PORT = 8042;
37
37
38
//    private static String kafkaServers = "47.105.160.21:9090";
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
    @Value("${kafka.producer.servers}")
42
    @Value("${kafka.producer.servers}")
42
    private static String servers;
43
    private static String servers;

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

26
26
27
    @Value("${kafka.producer.servers:Empty}")
27
    @Value("${kafka.producer.servers:Empty}")
28
//    private static String servers = "47.105.160.21:9090";
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
    @Value("${kafka.producer.retries:0}")
31
    @Value("${kafka.producer.retries:0}")
31
    private  int retries;
32
    private  int retries;
32
    @Value("${kafka.producer.batch.size:4096}")
33
    @Value("${kafka.producer.batch.size:4096}")
110
        }
111
        }
111
        return true;
112
        return true;
112
    }
113
    }
113
}
114
}

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

15
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
15
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
16
#spring.datasource.username=cmp
16
#spring.datasource.username=cmp
17
#spring.datasource.password=cmp@123
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
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
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
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
23
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
24
#spring.jpa.database=default
24
#spring.jpa.database=default
41
41
42
42
43
#============== kafka ===================
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
kafka.consumer.enable.auto.commit=true
50
kafka.consumer.enable.auto.commit=true
47
kafka.consumer.session.timeout=6000
51
kafka.consumer.session.timeout=6000
48
kafka.consumer.auto.commit.interval=100
52
kafka.consumer.auto.commit.interval=100
51
kafka.consumer.group.id=productMessage
55
kafka.consumer.group.id=productMessage
52
kafka.consumer.concurrency=10
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
kafka.producer.retries=0
61
kafka.producer.retries=0
56
kafka.producer.batch.size=4096
62
kafka.producer.batch.size=4096
57
kafka.producer.linger=1
63
kafka.producer.linger=1
58
kafka.producer.buffer.memory=40960
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
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
11
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
12
#spring.datasource.username=comon_frm
12
#spring.datasource.username=comon_frm
13
#spring.datasource.password=1qaz@WSX
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
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
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
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
20
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
20
#spring.jpa.database=default
21
#spring.jpa.database=default
31
32
32
# LOGGING
33
# LOGGING
33
logging.level.com.ai=info
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
    public FilterRegistrationBean mySessionUserFilter(){
53
    public FilterRegistrationBean mySessionUserFilter(){
54
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
54
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
55
        registrationBean.setFilter(new SessionUserFilter());
55
        registrationBean.setFilter(new SessionUserFilter());
56
        registrationBean.setUrlPatterns(Arrays.asList("/*"));
56
        registrationBean.setUrlPatterns(Arrays.asList("/sfsdafsadf"));
57
        Map<String, String> initParameters = new HashMap<String,String>();
57
        Map<String, String> initParameters = new HashMap<String,String>();
58
        initParameters.put("impl-classname","com.ai.sso.external.DefaultPopedomImpl");
58
        initParameters.put("impl-classname","com.ai.sso.external.DefaultPopedomImpl");
59
        initParameters.put("ALLOWPATH","gif;jpg;jpeg;png;login;checkLogin;genVerificationCode;logout;stomp;");
59
        initParameters.put("ALLOWPATH","gif;jpg;jpeg;png;login;checkLogin;genVerificationCode;logout;stomp;");
60
        registrationBean.setInitParameters(initParameters);
60
        registrationBean.setInitParameters(initParameters);
61
        return registrationBean;
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
    @Value("${aap.iot.passWord:123456}")
29
    @Value("${aap.iot.passWord:123456}")
30
    private String passWord;
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
    private String iotLoginUrl;
33
    private String iotLoginUrl;
34
34
35
    @Value("${url.iot.service:http://60.205.219.67:80/dmp/terminalNorthApi/}")
35
    @Value("${url.iot.service:http://60.205.219.67:80/dmp/terminalNorthApi/}")

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

7
7
8
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
8
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
9
#spring.datasource.url=jdbc:mysql://localhost:3306/cmp
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
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
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
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
19
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
16
#spring.jpa.database=default
20
#spring.jpa.database=default
24
#kafka
28
#kafka
25
#kafka.bootstrap-servers=47.105.160.21:9090
29
#kafka.bootstrap-servers=47.105.160.21:9090
26
#http://10.19.90.34:8187/mock/startMackData?sId=26&f=5&topic0=DeviceLocationA&topic1=IndividualAlarmA
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
#kafka.topic.deviceLocation=DeviceLocationA
35
#kafka.topic.deviceLocation=DeviceLocationA
31
#kafka.topic.alarm=IndividualAlarmA
36
#kafka.topic.alarm=IndividualAlarmA
32
kafka.producer.batch-size=16785
37
kafka.producer.batch-size=16785
45
kafka.listener.poll-timeout=1500
50
kafka.listener.poll-timeout=1500
46
51
47
#minio
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
minio.accessKey=minioadmin
55
minio.accessKey=minioadmin
51
minio.secretKey=minioadmin
56
minio.secretKey=minioadmin
52
minio.secure=false
57
minio.secure=false
67
# \u5f15\u5165gis\u548ciot\u7684\u914d\u7f6e\u6587\u4ef6
72
# \u5f15\u5165gis\u548ciot\u7684\u914d\u7f6e\u6587\u4ef6
68
spring.profiles.active=iot,gis
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
uspa.login.vercode=Hiz#8uAqkjhoPmXu8%aaa
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
	       <!-- <server ip="121.42.183.206" port="7104" /> -->
9
	       <!-- <server ip="121.42.183.206" port="7104" /> -->
10
	       <!-- <server ip="121.42.183.206" port="7105" /> -->
10
	       <!-- <server ip="121.42.183.206" port="7105" /> -->
11
	       <!-- <server ip="121.42.183.206" port="7106" /> -->
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
	    </servers>
14
	    </servers>
14
		<!-- 客户端类型:Jedis,JedisCluster -->
15
		<!-- 客户端类型:Jedis,JedisCluster -->
15
	    <config name="clientType" value="Jedis"/>
16
	    <config name="clientType" value="Jedis"/>
16
	    <!-- 访问redis的密码,可以为空 -->
17
	    <!-- 访问redis的密码,可以为空 -->
17
	    <config name="auth" value="Ipu@321!"/>
18
	    <config name="auth" value="ebc@redis"/>
18
	    <!-- redis池的可用连接实例的最大数目,缺省为8 -->
19
	    <!-- redis池的可用连接实例的最大数目,缺省为8 -->
19
	    <config name="poolSize" value="10"/>
20
	    <config name="poolSize" value="10"/>
20
	    <!-- redis池最多有多少个状态为idle(空闲的)的jedis实例,缺省为8,空闲连接大于这个数会进行回收 -->
21
	    <!-- redis池最多有多少个状态为idle(空闲的)的jedis实例,缺省为8,空闲连接大于这个数会进行回收 -->
28
	    <!-- 出现异常最大重试次数 -->
29
	    <!-- 出现异常最大重试次数 -->
29
	    <config name="maxAttempts"/>
30
	    <config name="maxAttempts"/>
30
	</cache>
31
	</cache>
31
	
32
32
	<cache name="SSN_CACHE" type="redis">
33
	<cache name="SSN_CACHE" type="redis">
33
		<servers>
34
		<servers>
34
	        <!-- 如果不是cluster,则只使用第一个redis -->
35
	        <!-- 如果不是cluster,则只使用第一个redis -->
56
	    <!-- 出现异常最大重试次数 -->
57
	    <!-- 出现异常最大重试次数 -->
57
	    <config name="maxAttempts"/>
58
	    <config name="maxAttempts"/>
58
	</cache>
59
	</cache>
59
	
60
60
	<cache name="client_route" type="redis">
61
	<cache name="client_route" type="redis">
61
		<servers>
62
		<servers>
62
	        <!-- 如果不是cluster,则只使用第一个redis -->
63
	        <!-- 如果不是cluster,则只使用第一个redis -->
84
	    <!-- 出现异常最大重试次数 -->
85
	    <!-- 出现异常最大重试次数 -->
85
	    <config name="maxAttempts"/>
86
	    <config name="maxAttempts"/>
86
	</cache>
87
	</cache>
87
	
88
88
	<cache name="pushServer_route" type="redis">
89
	<cache name="pushServer_route" type="redis">
89
		<servers>
90
		<servers>
90
	        <!-- 如果不是cluster,则只使用第一个redis -->
91
	        <!-- 如果不是cluster,则只使用第一个redis -->
112
	    <!-- 出现异常最大重试次数 -->
113
	    <!-- 出现异常最大重试次数 -->
113
	    <config name="maxAttempts"/>
114
	    <config name="maxAttempts"/>
114
	</cache>
115
	</cache>
115
</caches>
116
</caches>

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

15
TENANT_REGISTER_CLASS=com.ai.customermanager.services.impl.CustRegisterVercodeImpl
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
##    public boolean set(String key,String value)
19
##    public boolean set(String key,String value)
20
##    public String get(String key)
20
##    public String get(String key)
21
##    public boolean del(String key);
21
##    public boolean del(String key);
53
53
54
#redis.single=10.11.20.117:6379
54
#redis.single=10.11.20.117:6379
55
#redis.password=luMZulgbotmo71aa
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
redis.pool.maxTotal=1000
59
redis.pool.maxTotal=1000
60
redis.pool.minIdle=5
60
redis.pool.minIdle=5
68
68
69
SESSION_DEFAULT_VERCODE=Hiz#8uAqkjhoPmXu8%aaa
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
is_check_interface=0
72
is_check_interface=0
73
73
74
74
78
USER_LOGIN_AUTH_CLASS=com.wframe.usermanager.services.impl.UserLoginAuthImpl
78
USER_LOGIN_AUTH_CLASS=com.wframe.usermanager.services.impl.UserLoginAuthImpl
79
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByTokenImpl
79
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByTokenImpl
80
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByToken4XblImpl
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
    private String alarmType;
11
    private String alarmType;
12
    private String alarmMemo;
12
    private String alarmMemo;
13
    private String alarmEmployeeRoleId;
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
14
15
    private int isMatch;
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
					idenResultDto.setAlarmType("");
86
					idenResultDto.setAlarmType("");
87
					idenResultDto.setAlarmMemo("已穿工作服");
87
					idenResultDto.setAlarmMemo("已穿工作服");
88
88
89
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
89
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
90
					idenResultDto.setBox(boxIntArr);
90
					idenResultDto.setBox(boxIntArr);
91
91
92
					successList.add(idenResultDto);
92
					successList.add(idenResultDto);
99
					idenResultDto.setAlarmType(MonitorManageConsts.AI_ALARM_TYPE_WEA);
99
					idenResultDto.setAlarmType(MonitorManageConsts.AI_ALARM_TYPE_WEA);
100
					idenResultDto.setAlarmMemo("未穿工作服");
100
					idenResultDto.setAlarmMemo("未穿工作服");
101
101
102
					int[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
102
					double[] boxIntArr = AiIdenUtils.getBoxArray(resultObject.getJSONArray("box"), imageParam);
103
					idenResultDto.setBox(boxIntArr);
103
					idenResultDto.setBox(boxIntArr);
104
104
105
					alarmIdenResultDtosList.add(idenResultDto);
105
					alarmIdenResultDtosList.add(idenResultDto);

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

82
					BigDecimal score = resultObject.getBigDecimal("score");
82
					BigDecimal score = resultObject.getBigDecimal("score");
83
					resultDto.setSimi(score.setScale(4, BigDecimal.ROUND_HALF_UP).floatValue());
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
					resultDto.setBox(boxIntArr);
86
					resultDto.setBox(boxIntArr);
87
87
88
					aiIdenLogDto.setIdenResultType(MonitorManageConsts.AI_IDENTIFY_RESULT);
88
					aiIdenLogDto.setIdenResultType(MonitorManageConsts.AI_IDENTIFY_RESULT);
97
					BigDecimal score = resultObject.getBigDecimal("score");
97
					BigDecimal score = resultObject.getBigDecimal("score");
98
					resultDto.setSimi(score.setScale(4, BigDecimal.ROUND_HALF_UP).floatValue());
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
					resultDto.setBox(boxIntArr);
101
					resultDto.setBox(boxIntArr);
102
102
103
					aiIdenLogDto.setRelateEmployeeRoleId(faceId);
103
					aiIdenLogDto.setRelateEmployeeRoleId(faceId);

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

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

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

77
				idenResultDto.setAlarmMemo("违规吸烟");
77
				idenResultDto.setAlarmMemo("违规吸烟");
78
78
79
				JSONObject resultObj = JSONObject.parseObject(jsonArray.get(i).toString());
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
				idenResultDto.setBox(boxIntArr);
81
				idenResultDto.setBox(boxIntArr);
82
82
83
				alarmIdenResultDtosList.add(idenResultDto);
83
				alarmIdenResultDtosList.add(idenResultDto);

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

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

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

7
import java.util.Map;
7
import java.util.Map;
8
8
9
import org.apache.commons.lang.StringUtils;
9
import org.apache.commons.lang.StringUtils;
10
import org.apache.logging.log4j.util.Strings;
10
import org.slf4j.Logger;
11
import org.slf4j.Logger;
11
import org.slf4j.LoggerFactory;
12
import org.slf4j.LoggerFactory;
12
import org.springframework.beans.factory.annotation.Autowired;
13
import org.springframework.beans.factory.annotation.Autowired;
43
@Slf4j
44
@Slf4j
44
@Service
45
@Service
45
public class KafkaProcessImpl implements KafkaProcess {
46
public class KafkaProcessImpl implements KafkaProcess {
46
	
47
47
	private static final Logger logger = LoggerFactory.getLogger(KafkaProcessImpl.class);
48
	private static final Logger logger = LoggerFactory.getLogger(KafkaProcessImpl.class);
48
49
49
//    EBC设备tcp连接服务地址
50
//    EBC设备tcp连接服务地址
51
	// private static final int PORT = 8042;
52
	// private static final int PORT = 8042;
52
53
53
//    private static String kafkaServers = "47.105.160.21:9090";
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
	@Value("${kafka.producer.servers}")
58
	@Value("${kafka.producer.servers}")
57
	private static String servers;
59
	private static String servers;
167
					: resourceToolInfoMap.get("resourceToolName").toString());
169
					: resourceToolInfoMap.get("resourceToolName").toString());
168
			aiIdenLogDto.setTopic(topicAiTask);
170
			aiIdenLogDto.setTopic(topicAiTask);
169
171
170
			
172
171
			// 代理实现接口
173
			// 代理实现接口
172
			String className = getClassByAiIdenModel(aiIdenModel);
174
			String className = getClassByAiIdenModel(aiIdenModel);
173
			Class<?> myClass = Class.forName(className);
175
			Class<?> myClass = Class.forName(className);
174
			//AiIdenInterfaces proxy = (AiIdenInterfaces) new ProxyFactory(myClass).getProxyInstance();
176
			//AiIdenInterfaces proxy = (AiIdenInterfaces) new ProxyFactory(myClass).getProxyInstance();
175
			
177
176
			ProxyFactory proxy = new ProxyFactory(myClass.newInstance());
178
			ProxyFactory proxy = new ProxyFactory(myClass.newInstance());
177
			//ProxyFactory proxy = new ProxyFactory(SpringApplicationContext.getBean(myClass));
179
			//ProxyFactory proxy = new ProxyFactory(SpringApplicationContext.getBean(myClass));
178
			AiIdenInterfaces aiIdenInterfaces =(AiIdenInterfaces) proxy.Instance();   //获得代理对象
180
			AiIdenInterfaces aiIdenInterfaces =(AiIdenInterfaces) proxy.Instance();   //获得代理对象
179
			List<AlarmIdenResultDto> alarmResult = aiIdenInterfaces.executeAiIden(aiIdenLogDto, filePath, imageParam, isHuman);
181
			List<AlarmIdenResultDto> alarmResult = aiIdenInterfaces.executeAiIden(aiIdenLogDto, filePath, imageParam, isHuman);
180
182
181
			
183
182
			if (!CollectionUtils.isEmpty(alarmResult)) {
184
			if (!CollectionUtils.isEmpty(alarmResult)) {
183
				alarmIdenResultDtosList.addAll(alarmResult);
185
				alarmIdenResultDtosList.addAll(alarmResult);
184
			}
186
			}
187
				if (isHuman){
189
				if (isHuman){
188
					aiIdenLogDto = faceAiRecog(aiIdenLogDto, filePath,imageParam);
190
					aiIdenLogDto = faceAiRecog(aiIdenLogDto, filePath,imageParam);
189
				}
191
				}
190
			
192
191
			} else if (MonitorManageConsts.AI_MODEL_SAFETY_HELMET.equals(aiIdenModel)) {
193
			} else if (MonitorManageConsts.AI_MODEL_SAFETY_HELMET.equals(aiIdenModel)) {
192
				if (isHuman) {
194
				if (isHuman) {
193
					aiIdenLogDto = aiHelmetDetect(aiIdenLogDto, filePath,imageParam);
195
					aiIdenLogDto = aiHelmetDetect(aiIdenLogDto, filePath,imageParam);
194
				}
196
				}
195
			
197
196
			}else if (MonitorManageConsts.AI_MODEL_SMOKE.equals(aiIdenModel)) {
198
			}else if (MonitorManageConsts.AI_MODEL_SMOKE.equals(aiIdenModel)) {
197
					if (isHuman){
199
					if (isHuman){
198
						aiIdenLogDto = smokingDetect(aiIdenLogDto, filePath,imageParam);//吸烟识别
200
						aiIdenLogDto = smokingDetect(aiIdenLogDto, filePath,imageParam);//吸烟识别
199
				}
201
				}
200
			
202
201
			}else if (MonitorManageConsts.AI_MODEL_CLOTHING_CODE.equals(aiIdenModel)) {
203
			}else if (MonitorManageConsts.AI_MODEL_CLOTHING_CODE.equals(aiIdenModel)) {
202
					if (isHuman){
204
					if (isHuman){
203
						aiIdenLogDto=workClothesDetect(aiIdenLogDto, filePath,imageParam);//工作服识别
205
						aiIdenLogDto=workClothesDetect(aiIdenLogDto, filePath,imageParam);//工作服识别
204
					}
206
					}
205
				}
207
				}
206
			
208
207
			else if (MonitorManageConsts.AI_MODEL_INSTRUMENT.equals(aiIdenModel)) {
209
			else if (MonitorManageConsts.AI_MODEL_INSTRUMENT.equals(aiIdenModel)) {
208
				aiIdenLogDto=instrumentDetect(aiIdenLogDto,filePath);//仪表识别
210
				aiIdenLogDto=instrumentDetect(aiIdenLogDto,filePath);//仪表识别
209
			
211
210
			} else if (MonitorManageConsts.AI_MODEL_STRANGER.equals(aiIdenModel)){
212
			} else if (MonitorManageConsts.AI_MODEL_STRANGER.equals(aiIdenModel)){
211
				if (isHuman) {
213
				if (isHuman) {
212
					aiIdenLogDto = strangerDetect(aiIdenLogDto, filePath, imageParam);//陌生人识别
214
					aiIdenLogDto = strangerDetect(aiIdenLogDto, filePath, imageParam);//陌生人识别
213
				}
215
				}
214
			
216
215
			} else {
217
			} else {
216
			
218
217
			}*/
219
			}*/
218
220
219
		}
221
		}
222
			aiIdenLogDto.setIdenResultType(MonitorManageConsts.AI_IDENTIFY_RESULT_ALARM);
224
			aiIdenLogDto.setIdenResultType(MonitorManageConsts.AI_IDENTIFY_RESULT_ALARM);
223
			aiIdenLogDto.setIdenResult(JSON.toJSONString(alarmIdenResultDtosList));
225
			aiIdenLogDto.setIdenResult(JSON.toJSONString(alarmIdenResultDtosList));
224
			aiIdenLogDto.setRelateEmployeeRoleId(MonitorManageConsts.alarmEmployeeRoleId);
226
			aiIdenLogDto.setRelateEmployeeRoleId(MonitorManageConsts.alarmEmployeeRoleId);
225
			
227
226
			log.info("AI识别结果为报警,推送KAFKA消息:"+JSONObject.toJSONString(aiIdenLogDto));
228
			log.info("AI识别结果为报警,推送KAFKA消息:"+JSONObject.toJSONString(aiIdenLogDto));
227
			processKafka(aiIdenLogDto.getTopic(), JSONObject.toJSONString(aiIdenLogDto));
229
			processKafka(aiIdenLogDto.getTopic(), JSONObject.toJSONString(aiIdenLogDto));
228
			log.info("消息推送完成");
230
			log.info("消息推送完成");
343
			/*// 安全帽识别
345
			/*// 安全帽识别
344
			String aiResponseData = ebcAiService.workClothesDetect(ImageBase64Converter.convertFileToBase64(aifilePath),
346
			String aiResponseData = ebcAiService.workClothesDetect(ImageBase64Converter.convertFileToBase64(aifilePath),
345
					true, true, 0.9f);
347
					true, true, 0.9f);
346
			
348
347
			JSONObject jsonObject = JSONObject.parseObject(aiResponseData);// JSONUtil.formatJsonStr(aiResponseData);
349
			JSONObject jsonObject = JSONObject.parseObject(aiResponseData);// JSONUtil.formatJsonStr(aiResponseData);
348
			if (jsonObject.getString("Status").equals("Ok")) {
350
			if (jsonObject.getString("Status").equals("Ok")) {
349
				JSONArray jsonoArray = JSONArray.parseArray(jsonObject.getString("Result"));
351
				JSONArray jsonoArray = JSONArray.parseArray(jsonObject.getString("Result"));
358
			}*/
360
			}*/
359
361
360
			log.info("开始AI人数识别处理...");
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
			JSONObject jsonObject = JSONObject.parseObject(aiResponseData);
369
			JSONObject jsonObject = JSONObject.parseObject(aiResponseData);
364
			JSONArray jsonArray = jsonObject.getJSONArray("Result");
370
			JSONArray jsonArray = jsonObject.getJSONArray("Result");
365
			if (!CollectionUtils.isEmpty(jsonArray)) {
371
			if (!CollectionUtils.isEmpty(jsonArray)) {
389
		return result.toString();
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
	 *
31
	 *
32
	 * @return boxIntArr
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
		if (CollectionUtils.isEmpty(jsonArray) || jsonArray.size() != 4 || CollectionUtils.isEmpty(getImageParam)) {
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
		/*int[] boxIntArr=new int[jsonArray.size()];
39
		/*int[] boxIntArr=new int[jsonArray.size()];
42
		    boxIntArr[i] =boxValue.intValue();
42
		    boxIntArr[i] =boxValue.intValue();
43
		}*/
43
		}*/
44
44
45
		int[] boxIntArr = new int[4];
45
		double[] boxLongArr = new double[4];
46
		try {
46
		try {
47
			BigDecimal boxValue = (BigDecimal) jsonArray.get(0);
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
			boxValue = (BigDecimal) jsonArray.get(1);
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
			boxValue = (BigDecimal) jsonArray.get(2);
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
			boxValue = (BigDecimal) jsonArray.get(3);
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
		} catch (Exception e) {
60
		} catch (Exception e) {
60
			log.error("getBoxArray is error: errorMsg=" + e.getMessage() + ", jsonArray=" + jsonArray);
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
133
133
		return result.toString();
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
26
27
    @Value("${kafka.producer.servers:Empty}")
27
    @Value("${kafka.producer.servers:Empty}")
28
//    private static String servers = "47.105.160.21:9090";
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
    @Value("${kafka.producer.retries:0}")
30
    @Value("${kafka.producer.retries:0}")
31
    private  int retries;
31
    private  int retries;
32
    @Value("${kafka.producer.batch.size:4096}")
32
    @Value("${kafka.producer.batch.size:4096}")
110
        }
110
        }
111
        return true;
111
        return true;
112
    }
112
    }
113
}
113
}

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

10
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
10
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
11
#spring.datasource.username=comon_frm
11
#spring.datasource.username=comon_frm
12
#spring.datasource.password=1qaz@WSX
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
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
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
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
18
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
19
#spring.jpa.database=default
19
#spring.jpa.database=default
26
26
27
#kafka
27
#kafka
28
#kafka.bootstrap-servers=47.105.160.21:9090
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
#kafka.topic.deviceLocation=Topic_IoT_DeviceLocation_111
30
#kafka.topic.deviceLocation=Topic_IoT_DeviceLocation_111
31
#kafka.topic.alarm=Topic_IoT_IndividualAlarm_111
31
#kafka.topic.alarm=Topic_IoT_IndividualAlarm_111
32
#kafka.topic.deviceLocation=DeviceLocationA
32
#kafka.topic.deviceLocation=DeviceLocationA
47
kafka.listener.poll-timeout=1500
47
kafka.listener.poll-timeout=1500
48
48
49
#minio
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
minio.accessKey=minioadmin
52
minio.accessKey=minioadmin
53
minio.secretKey=minioadmin
53
minio.secretKey=minioadmin
54
minio.secure=false
54
minio.secure=false
73
logging.level.org.springframework.data=debug
73
logging.level.org.springframework.data=debug
74
74
75
#\u76d1\u63a7\u6587\u4ef6\u5939
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
#AI\u05b4\u56fe\u7247
79
#AI\u05b4\u56fe\u7247
80
#kafka.topic.aitask=topicTaskTest
80
#kafka.topic.aitask=topicTaskTest
85
85
86
86
87
#AI\u5931\u8d25\u8bf7\u6c42\u5730\u5740
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
ebc.ai.helmet-det-url=http://10.1.251.211:7003/todo/api/v1.4/control/online/IMAGE/HELMET/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
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
92
ebc.ai.instrument-det-url=http://10.1.251.213:19100/predict
95
#ebc.ai.face-recog-service-url=http://10.21.10.28:9018/api/face/recog
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
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
#AI\u4efb\u52a1\u8bf7\u6c42\u5730\u5740
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
package com.ai.bss.monitorManage;
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
import com.ai.bss.monitorManage.service.interfaces.MonitorManageService;
6
import com.ai.bss.monitorManage.service.interfaces.MonitorManageService;
5
import lombok.extern.slf4j.Slf4j;
7
import lombok.extern.slf4j.Slf4j;
8
import org.apache.logging.log4j.util.Strings;
6
import org.junit.Test;
9
import org.junit.Test;
7
import org.junit.runner.RunWith;
10
import org.junit.runner.RunWith;
8
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.beans.factory.annotation.Autowired;
16
    @Autowired
19
    @Autowired
17
    MonitorManageService pictureProcessService;
20
    MonitorManageService pictureProcessService;
18
21
22
    @Autowired
23
    EbcAiService ebcAiService;
19
24
20
    @Test
25
    @Test
21
    public void loadPictureFromDirectory() throws InterruptedException {
26
    public void loadPictureFromDirectory() throws InterruptedException {
22
        pictureProcessService.loadPictureFromDirectory();
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
spring.application.name=WorkTaskSpec
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
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
7
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
8
#spring.datasource.url=jdbc:mysql://localhost:3306/cmp
8
#spring.datasource.url=jdbc:mysql://localhost:3306/cmp
10
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
10
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
11
#spring.datasource.username=comon_frm
11
#spring.datasource.username=comon_frm
12
#spring.datasource.password=1qaz@WSX
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
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
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
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
18
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
19
#spring.jpa.database=default
19
#spring.jpa.database=default
26
26
27
#kafka
27
#kafka
28
#kafka.bootstrap-servers=47.105.160.21:9090
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
#kafka.topic.deviceLocation=DeviceLocationA
32
#kafka.topic.deviceLocation=DeviceLocationA
33
#kafka.topic.alarm=IndividualAlarmA
33
#kafka.topic.alarm=IndividualAlarmA
34
kafka.producer.batch-size=16785
34
kafka.producer.batch-size=16785
47
kafka.listener.poll-timeout=1500
47
kafka.listener.poll-timeout=1500
48
48
49
#minio
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
minio.accessKey=minioadmin
52
minio.accessKey=minioadmin
53
minio.secretKey=minioadmin
53
minio.secretKey=minioadmin
54
minio.secure=false
54
minio.secure=false
55
minio.bucketHeaderImage=prod-dev
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
# CACHE
67
# CACHE
64
#spring.cache.type=ehcache
68
#spring.cache.type=ehcache
68
logging.level.com.ai=debug
72
logging.level.com.ai=debug
69
logging.level.org.springframework.data=debug
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
    {
61
    {
62
      url: '/sp',
62
      url: '/sp',
63
      options: {
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
        changeOrigin: true,
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
        baseURL: '/sp'
44
        baseURL: '/sp'
45
    },
45
    },
46
    picurl: {
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
  },
46
  },
47
  mounted() {
47
  mounted() {
48
    // 镜屏调用
48
    // 镜屏调用
49
    // this.connect()
49
    this.connect()
50
  },
50
  },
51
  methods: {
51
  methods: {
52
    connect() {
52
    connect() {
53
      if (this.stompClient == null || !this.stompClient.connected()) {
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
        this.stompClient.connect('zhangsan', '123456', () => { this.connectCallback() }, () => { this.errorCallback() })
55
        this.stompClient.connect('zhangsan', '123456', () => { this.connectCallback() }, () => { this.errorCallback() })
56
      } else {
56
      } else {
57
        console.log('当前处于连接状态')
57
        console.log('当前处于连接状态')

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

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

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

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

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

1
<template>
1
<template>
2
  <div class="index" style="overflow:hidden;">
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
      <img src="@/assets/images/AsiainfoLogo.png" class="top-logo">
4
      <img src="@/assets/images/AsiainfoLogo.png" class="top-logo">
5
      <div style="position: absolute;top:50%;left:54%;transform: translate(-50%,-50%);vertical-align: middle; color: white; font-size: 14px">
5
      <div style="position: absolute;top:50%;left:54%;transform: translate(-50%,-50%);vertical-align: middle; color: white; font-size: 14px">
6
        <b> | AISI安防一体化平台</b>
6
        <b> | AISI安防一体化平台</b>
21
          <div id="doughnut" style="height: 100%;width: 100%"></div>
21
          <div id="doughnut" style="height: 100%;width: 100%"></div>
22
        </div>
22
        </div>
23
        <div :style="`height:34%;margin-top: 3%;`" class="body-left-item">
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
            <span class="title-span">告警分析</span>
25
            <span class="title-span">告警分析</span>
26
          </div>
26
          </div>
27
          <div id="bar" style="height: 100%;width: 100%"></div>
27
          <div id="bar" style="height: 100%;width: 100%"></div>
46
          <span class="title-span">重点区域监控</span>
46
          <span class="title-span">重点区域监控</span>
47
        </div>
47
        </div>
48
        <!--        <video-player ref="videoPlayer" :options="videoOptions" :playsinline="true" class="vjs-custom-skin videoPlayer"></video-player>-->
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
          </video-player>
52
          </video-player>
53
        </div>
53
        </div>
102
import 'vue-video-player/src/custom-theme.css'
102
import 'vue-video-player/src/custom-theme.css'
103
import 'videojs-flash'
103
import 'videojs-flash'
104
import videojs from 'video.js'
104
import videojs from 'video.js'
105
import EventBus from '../../bus'
105
import EventBus from "../../bus";
106
window.videojs = videojs
106
window.videojs = videojs
107
107
108
require('video.js/dist/lang/zh-CN.js')
108
require('video.js/dist/lang/zh-CN.js')
116
      month >= 10 ? month : '0' + month
116
      month >= 10 ? month : '0' + month
117
      var day = value.getDate() >= 10 ? value.getDate() : '0' + value.getDate()
117
      var day = value.getDate() >= 10 ? value.getDate() : '0' + value.getDate()
118
      var hours =
118
      var hours =
119
        value.getHours() >= 10 ? value.getHours() : '0' + value.getHours()
119
          value.getHours() >= 10 ? value.getHours() : '0' + value.getHours()
120
      var minutes =
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
      var seconds =
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
      return (
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
    setInterval(() => { // 识别记录
180
    setInterval(() => { // 识别记录
181
      this.initRecognition()
181
      this.initRecognition()
182
    }, 5000)
182
    }, 5000)
183
    // console.log(textDom.nextSibling)
184
    // textDom.nextSibling.nodeValue = ''
185
    // EventBus.$on('sendAiData', (msg) => { // 获取镜屏推送消息
183
    // EventBus.$on('sendAiData', (msg) => { // 获取镜屏推送消息
186
    //   console.log('已接收镜屏消息...')
184
    //   console.log('已接收镜屏消息...')
187
    //   var oDiv = document.getElementById("div111");
185
    //   var oDiv = document.getElementById("div111");
199
    // })
197
    // })
200
  },
198
  },
201
  methods: {
199
  methods: {
202
    testHKK (box, alarmMemo) {
200
    testHKK(box, alarmMemo) {
203
      var width = box[2] - box[0]
201
      var width = box[2] - box[0]
204
      var height = box[3] - box[1]
202
      var height = box[3] - box[1]
205
      var oDiv = document.getElementById('div111')
203
      var oDiv = document.getElementById("div111");
206
      // var aBox = this.getByClass(oDiv,"vjs-tech");
204
      // var aBox = this.getByClass(oDiv,"vjs-tech");
207
      // alert(aBox.length);
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
      // div.className = "form-group";
208
      // div.className = "form-group";
211
      var del = document.createElement('p')
209
      var del = document.createElement('p')
212
      var x = 10 + this.hkk
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
      }, 3000)
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
    async createMyButton () {
240
    async createMyButton () {
242
      this.$nextTick(() => {
241
      this.$nextTick(() => {
245
        let start = document.getElementsByClassName('vjs-play-control vjs-control vjs-button')
244
        let start = document.getElementsByClassName('vjs-play-control vjs-control vjs-button')
246
        let volume = document.getElementsByClassName('vjs-volume-panel vjs-control vjs-volume-panel-horizontal')
245
        let volume = document.getElementsByClassName('vjs-volume-panel vjs-control vjs-volume-panel-horizontal')
247
        let text = document.getElementsByClassName('vjs-live-control vjs-control')
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
        bars.forEach((item, index) => {
247
        bars.forEach((item, index) => {
256
          time.forEach(item => {
248
          time.forEach(item => {
257
            item.remove()
249
            item.remove()
281
          loop: false, // 导致视频一结束就重新开始。
273
          loop: false, // 导致视频一结束就重新开始。
282
          preload: 'auto', // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
274
          preload: 'auto', // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
283
          language: 'zh-CN',
275
          language: 'zh-CN',
284
          aspectRatio: '16:10', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
276
          aspectRatio: '4:3', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
285
          // fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
277
          // fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
286
          // 是否流体自适应容器宽高
278
          // 是否流体自适应容器宽高
287
          fluid: true,
279
          fluid: true,
394
          data = data.slice(0, 4)
386
          data = data.slice(0, 4)
395
        }
387
        }
396
        data.forEach(e => {
388
        data.forEach(e => {
397
          if (e.employeeName == null || e.employeeName == '') {
389
          if (e.employeeName == null || e.employeeName == ''){
398
            e.employeeCode = '未识别成功'
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
          e.newImg = e.idenPictureUrl
397
          e.newImg = e.idenPictureUrl
402
          var loadTimer
398
          var loadTimer
403
          var imgObject = new Image()
399
          var imgObject = new Image()
404
          imgObject.setAttribute('crossOrigin', 'anonymous')
400
          imgObject.setAttribute('crossOrigin', 'anonymous')
405
          imgObject.src = e.idenPictureUrl
401
          imgObject.src = e.idenPictureUrl
406
          imgObject.onLoad = onImgLoaded()
402
          imgObject.onload = onImgLoaded()
407
          function onImgLoaded () {
403
          function onImgLoaded () {
408
            if (loadTimer != null) clearTimeout(loadTimer)
404
            if (loadTimer != null) clearTimeout(loadTimer)
409
            if (!imgObject.complete) {
405
            if (!imgObject.complete) {
411
                onImgLoaded()
407
                onImgLoaded()
412
              }, 3)
408
              }, 3)
413
            } else {
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
              e.newImg = getImagePortion(imgObject, e.box[2] - e.box[0], e.box[3] - e.box[1], e.box[0], e.box[1])
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
            itemStyle: {
575
            itemStyle: {
576
              normal: {
576
              normal: {
577
                color: new echarts.graphic.LinearGradient(
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
                label: {
584
                label: {
585
                  show: true, // 是否展示
585
                  show: true, // 是否展示
865
.vjs-tech {
865
.vjs-tech {
866
  pointer-events: none;
866
  pointer-events: none;
867
}
867
}
868
.checkedIndex {
868
.checkedIndex{
869
  border: 1px solid #009bf3;
869
  border: 1px solid #009bf3;
870
}
870
}
871
</style>
871
</style>

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

92
      },
92
      },
93
      // 提交表单是否显示loading
93
      // 提交表单是否显示loading
94
      loadingSubmit: false,
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
      uploadList: () => []
96
      uploadList: () => []
97
    }
97
    }
98
  },
98
  },

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

40
            multiple
40
            multiple
41
            style="width:120px;height:160px;background-color:#FFFFFF;"
41
            style="width:120px;height:160px;background-color:#FFFFFF;"
42
            type="drag"
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
            class="demo-upload-list"
44
            class="demo-upload-list"
45
            @success = "$_onUploadSuccess"
45
            @success = "$_onUploadSuccess"
46
          >
46
          >
61
            :before-upload="$_onUploadBeforeUpload"
61
            :before-upload="$_onUploadBeforeUpload"
62
            multiple
62
            multiple
63
            type="drag"
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
            class="upload-edit"
65
            class="upload-edit"
66
            @success = "$_onUploadSuccess"
66
            @success = "$_onUploadSuccess"
67
          >
67
          >

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

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
    getData () {
238
    getData () {
239
      this.$emit('get-list', { beginDay: this.beginDay, endDay: this.endDay })
239
      this.$emit('get-list', { beginDay: this.beginDay, endDay: this.endDay })
240
    },
240
    },
241
    resetData () {
241
    resetData () {
242
      this.beginDay = formatDateTime(new Date(+new Date() - 10 * 60 * 1000), 'yyyy-MM-dd hh:mm:ss')
242
      this.beginDay = formatDateTime(new Date(+new Date() - 10 * 60 * 1000), 'yyyy-MM-dd hh:mm:ss')
243
      this.endDay = formatDateTime(new Date(), 'yyyy-MM-dd hh:mm:ss')
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
</script>
255
</script>

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

47
        <t-carousel dots="none" :speed="10000000000" arrow="always" style="width: 100%">
47
        <t-carousel dots="none" :speed="10000000000" arrow="always" style="width: 100%">
48
          <t-carousel-item v-for="(item1,index1) in dataImgList" :key="index1" style="width: 100%;padding-left: 10%">
48
          <t-carousel-item v-for="(item1,index1) in dataImgList" :key="index1" style="width: 100%;padding-left: 10%">
49
            <div v-for="(item, index) in item1" :key="index" :src="item.idenPictureUrl" class="image-carousel">
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
              <span :class="{'fileName' : index === fileNameIndex}" style="width: 132px;margin-right: 14px;text-align:center">{{ item.fileName }}</span>
51
              <span :class="{'fileName' : index === fileNameIndex}" style="width: 132px;margin-right: 14px;text-align:center">{{ item.fileName }}</span>
52
            </div>
52
            </div>
53
          </t-carousel-item>
53
          </t-carousel-item>
81
        aspectRatio: '13:10', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
81
        aspectRatio: '13:10', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
82
        // fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
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
        sources: [{
89
        sources: [{
90
          type: 'video/mp4', // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
90
          type: 'application/x-mpegURL', // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
91
          src: '' // url地址
91
          src: '' // url地址
92
        }],
92
        }],
93
93
94
        notSupportedMessage: '暂无视频可播放,请稍后再试', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
94
        notSupportedMessage: '此视频暂无法播放,请稍后再试', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
95
        controlBar: {
95
        controlBar: {
96
          timeDivider: true,
96
          timeDivider: true,
97
          // durationDisplay: true,
97
          // durationDisplay: true,
174
        this.defineResult = res.data.data.alarmInfo.alarmMemo
174
        this.defineResult = res.data.data.alarmInfo.alarmMemo
175
        this.captureTIme = res.data.data.pictureInfo.fileDateTimeStr
175
        this.captureTIme = res.data.data.pictureInfo.fileDateTimeStr
176
        this.distinguishUrl = res.data.data.pictureInfo.fileUrl
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
     * 单客户端判断。
39
     * 单客户端判断。
40
     * 参见src/frame.vue和src/store.js文件中的逻辑。
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
        next()
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
  router.afterEach(() => {
59
  router.afterEach(() => {

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

21
@SpringBootApplication
21
@SpringBootApplication
22
public class SecurityProtectionApp {
22
public class SecurityProtectionApp {
23
    public static void main(String[] args) throws Exception {
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
        ConnectServerManager.registerServer("websocket.port", new WebSocketStompServer("/stomp"));
27
        ConnectServerManager.registerServer("websocket.port", new WebSocketStompServer("/stomp"));
28
        //镜屏服务启动
28
        //镜屏服务启动
29
        ConnectServerStart.start(args, false);
29
        ConnectServerStart.start(args, false);*/
30
30
31
        SpringApplication.run(SecurityProtectionApp.class, args);
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
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
54
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
55
        registrationBean.setFilter(new SessionUserFilter());
55
        registrationBean.setFilter(new SessionUserFilter());
56
        //registrationBean.setUrlPatterns(Arrays.asList("/mySessionUserFilter"));
56
        //registrationBean.setUrlPatterns(Arrays.asList("/mySessionUserFilter"));
57
        registrationBean.setUrlPatterns(Arrays.asList("/login/*"));
57
        registrationBean.setUrlPatterns(Arrays.asList("/sdfsdafsafasf"));
58
        Map<String, String> initParameters = new HashMap<String,String>();
58
        Map<String, String> initParameters = new HashMap<String,String>();
59
        initParameters.put("impl-classname","com.ai.sso.external.DefaultPopedomImpl");
59
        initParameters.put("impl-classname","com.ai.sso.external.DefaultPopedomImpl");
60
        initParameters.put("ALLOWPATH","gif;jpg;jpeg;png;login;checkLogin;genVerificationCode;logout;");
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
	*                            statusList: 处理状态列表
48
	*                            statusList: 处理状态列表
49
	* @return 结果集,具体如下:
49
	* @return 结果集,具体如下:
50
	*                            状态、状态时间、处理详情、报警类型、报警描述、设备名称、设备编号、设备位置、报警时间、处理人、处理时间、图片url、视频url
50
	*                            状态、状态时间、处理详情、报警类型、报警描述、设备名称、设备编号、设备位置、报警时间、处理人、处理时间、图片url、视频url
51
	 * @throws Exception 
51
	 * @throws Exception
52
	*/
52
	*/
53
	@ResponseBody
53
	@ResponseBody
54
	@RequestMapping("/queryPageAiAlarm")
54
	@RequestMapping("/queryPageAiAlarm")
65
		params.put("workEmployeeRoleId", aiQuery.getWorkEmployeeRoleId());
65
		params.put("workEmployeeRoleId", aiQuery.getWorkEmployeeRoleId());
66
		params.put("beginTime", aiQuery.getBeginTime());
66
		params.put("beginTime", aiQuery.getBeginTime());
67
		params.put("endTime", aiQuery.getEndTime());
67
		params.put("endTime", aiQuery.getEndTime());
68
		
68
69
		if (StringUtils.isNotBlank(aiQuery.getStatusList())) {
69
		if (StringUtils.isNotBlank(aiQuery.getStatusList())) {
70
			ArrayList<Object> statusList = new ArrayList<>();
70
			ArrayList<Object> statusList = new ArrayList<>();
71
			statusList.add(aiQuery.getStatusList());
71
			statusList.add(aiQuery.getStatusList());
100
		workTask.setStatus(aiQuery.getStatus());
100
		workTask.setStatus(aiQuery.getStatus());
101
		workTask.setWorkTaskId(aiQuery.getWorkTaskId());
101
		workTask.setWorkTaskId(aiQuery.getWorkTaskId());
102
		workTask.setProcessMemo(aiQuery.getProcessMemo());
102
		workTask.setProcessMemo(aiQuery.getProcessMemo());
103
		
103
104
		// 申请人ID和部门
104
		// 申请人ID和部门
105
		JSONObject userInfo = new LoginUserInfoUtil().getUserInfo(request);
105
		JSONObject userInfo = new LoginUserInfoUtil().getUserInfo(request);
106
		workTask.setOpId(userInfo.get("STAFF_ID").toString());
106
		workTask.setOpId(userInfo.get("STAFF_ID").toString());
142
		List<Map<String, Object>> resultList=aiAlarmManageService.queryAiAlarmCount(params);
142
		List<Map<String, Object>> resultList=aiAlarmManageService.queryAiAlarmCount(params);
143
		return CommonResponse.ok(resultList);
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
98
99
            String result = HttpServiceUtil.sendPost(menuUrl, paramsMap, charset,headerMap1 );
99
            String result = HttpServiceUtil.sendPost(menuUrl, paramsMap, charset,headerMap1 );
100
            //将返回结果转为map
100
            //将返回结果转为map
101
            logger.error("返回结果json: " + result);
101
            resultMap = JSON.parseObject(result, Map.class);
102
            resultMap = JSON.parseObject(result, Map.class);
102
103
            logger.error("返回结果resultMap: " + resultMap.toString());
103
            String result1 = (String)resultMap.get("RESULT");
104
            String result1 = (String)resultMap.get("RESULT");
104
            if(null!=result1&&!"".equals(result1)){
105
            if(null!=result1&&!"".equals(result1)){
105
                //如果result有值返回正确,将返回结果转为List
106
                //如果result有值返回正确,将返回结果转为List
107
108
                logger.error("返回结果result1: " + result1);
106
                List<Map<String,List<Map>>> list = JSON.parseObject(result1, List.class);
109
                List<Map<String,List<Map>>> list = JSON.parseObject(result1, List.class);
110
                logger.error("返回结果list: " + list.toString());
107
                resultMap.put("RESULT",list);
111
                resultMap.put("RESULT",list);
108
            }
112
            }
109
        } catch (Exception e) {
113
        } catch (Exception e) {
110
            logger.error("调用uspa获取菜单接口失败: " + e.getMessage());
114
            logger.error("调用uspa获取菜单接口失败: " + e.getMessage());
111
112
            return resultMap;
115
            return resultMap;
113
        }
116
        }
114
        return resultMap;
117
        return resultMap;
115
    }
118
    }
116
119
117
}
120
}

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

1
#minio
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
minio.accessKey=minioadmin
4
minio.accessKey=minioadmin
5
minio.secretKey=minioadmin
5
minio.secretKey=minioadmin
6
minio.secure=false
6
minio.secure=false
22
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
22
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
23
spminio.bucketAiImage=ai-image
23
spminio.bucketAiImage=ai-image
24
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
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
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
10
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
11
#spring.datasource.username=comon_frm
11
#spring.datasource.username=comon_frm
12
#spring.datasource.password=1qaz@WSX
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
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
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
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
18
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
19
#spring.jpa.database=default
19
#spring.jpa.database=default
26
26
27
#kafka
27
#kafka
28
#kafka.bootstrap-servers=47.105.160.21:9090
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
kafka.topic.aitask=topic_ai_task
30
kafka.topic.aitask=topic_ai_task
31
kafka.topic.aivideo=topic_ai_video
31
kafka.topic.aivideo=topic_ai_video
32
#kafka.topic.aitask=topicTaskTest
32
#kafka.topic.aitask=topicTaskTest
68
logging.level.com.ai=debug
68
logging.level.com.ai=debug
69
logging.level.org.springframework.data=debug
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
uspa.login.vercode=Hiz#8uAqkjhoPmXu8%aaa
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
# \u5f15\u5165minio\u548ciot\u7684\u914d\u7f6e\u6587\u4ef6
76
# \u5f15\u5165minio\u548ciot\u7684\u914d\u7f6e\u6587\u4ef6
78
spring.profiles.active=iot,minio
77
spring.profiles.active=iot,minio

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

15
TENANT_REGISTER_CLASS=com.ai.customermanager.services.impl.CustRegisterVercodeImpl
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
##    public boolean set(String key,String value)
19
##    public boolean set(String key,String value)
20
##    public String get(String key)
20
##    public String get(String key)
21
##    public boolean del(String key);
21
##    public boolean del(String key);
53
53
54
#redis.single=10.11.20.117:6379
54
#redis.single=10.11.20.117:6379
55
#redis.password=luMZulgbotmo71aa
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
redis.pool.maxTotal=1000
59
redis.pool.maxTotal=1000
60
redis.pool.minIdle=5
60
redis.pool.minIdle=5
68
68
69
SESSION_DEFAULT_VERCODE=Hiz#8uAqkjhoPmXu8%aaa
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
is_check_interface=0
72
is_check_interface=0
73
73
74
74
78
USER_LOGIN_AUTH_CLASS=com.wframe.usermanager.services.impl.UserLoginAuthImpl
78
USER_LOGIN_AUTH_CLASS=com.wframe.usermanager.services.impl.UserLoginAuthImpl
79
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByTokenImpl
79
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByTokenImpl
80
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByToken4XblImpl
80
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByToken4XblImpl
81
SIGN_KEY_CODE=TENANT_CODE
81
SIGN_KEY_CODE=TENANT_CODE