Przeglądaj źródła

修改项目配置与百分比

wangchao 4 lat temu
rodzic
commit
0b9425ebe9
26 zmienionych plików z 218 dodań i 137 usunięć
  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. 15 10
      location-rescue-service/src/main/resources/application.properties
  7. 7 6
      location-rescue-service/src/main/resources/ipu-cache.xml
  8. 5 5
      location-rescue-service/src/main/resources/sso.properties
  9. 1 1
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/model/AlarmIdenResultDto.java
  10. 1 1
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/model/FaceIdenResultDto.java
  11. 2 2
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/ClothingCodeAiIden.java
  12. 2 2
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/FaceAiIden.java
  13. 2 2
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/SafetyHelmetAiIden.java
  14. 1 1
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/SmokeAiIden.java
  15. 13 13
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/aiIden/StrangerAiIden.java
  16. 24 16
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/impl/KafkaProcessImpl.java
  17. 14 14
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/utils/AiIdenUtils.java
  18. 2 2
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/utils/KafkaProducerConfig.java
  19. 11 11
      monitor-manage-service/src/main/resources/application.properties
  20. 27 0
      monitor-manage-service/src/test/java/com/ai/bss/monitorManage/PictureProcessServiceTest.java
  21. 44 16
      monitor-manage-service/src/test/resources/application.properties
  22. 1 1
      security-protection-service/src/main/java/com/ai/bss/security/protection/config/MyCorsFilter.java
  23. 6 3
      security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/LoginServiceImpl.java
  24. 3 3
      security-protection-service/src/main/resources/application-minio.properties
  25. 7 8
      security-protection-service/src/main/resources/application.properties
  26. 5 5
      security-protection-service/src/main/resources/sso.properties

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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