Browse Source

区域入侵能力接口添加报警置信度

curry 1 year ago
parent
commit
1565cafbc6
3 changed files with 8 additions and 4 deletions
  1. 2 2
      config.yaml
  2. 2 2
      go.mod
  3. 4 0
      isapi/isapi_smart_fieldDetection.go

+ 2 - 2
config.yaml

@@ -22,7 +22,7 @@ captcha:
   open-captcha-timeout: 3600  #有效期
 logrus:
 mysql:
-  path: 127.0.0.1
+  path: 192.168.110.69
   port: "3306"
   config: charset=utf8mb4&parseTime=True&loc=Local
   db-name: lcfns
@@ -51,7 +51,7 @@ HttpHostNotificationList:
 #调用外部接口
 foreign:
   securityRewindUrl: "http://106.52.134.22:9099"
-  gatewayServer: "192.168.110.69:9001"
+  gatewayServer: "192.168.110.253:9001"
 #海康摄像头统一配置
 hikvision:
   user: admin

+ 2 - 2
go.mod

@@ -8,8 +8,10 @@ require (
 	github.com/gin-gonic/gin v1.9.1
 	github.com/go-redis/redis/v8 v8.11.4
 	github.com/go-sql-driver/mysql v1.7.1
+	github.com/goccy/go-json v0.10.2
 	github.com/gofrs/uuid/v5 v5.0.0
 	github.com/golang-jwt/jwt/v4 v4.5.0
+	github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f
 	github.com/mojocn/base64Captcha v1.3.5
 	github.com/redis/go-redis/v9 v9.0.5
 	github.com/sirupsen/logrus v1.9.3
@@ -41,7 +43,6 @@ require (
 	github.com/go-playground/universal-translator v0.18.1 // indirect
 	github.com/go-playground/validator/v10 v10.15.4 // indirect
 	github.com/go-test/deep v1.1.0 // indirect
-	github.com/goccy/go-json v0.10.2 // indirect
 	github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
 	github.com/golang-sql/sqlexp v0.1.0 // indirect
 	github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
@@ -56,7 +57,6 @@ require (
 	github.com/klauspost/cpuid/v2 v2.2.5 // indirect
 	github.com/kr/pretty v0.3.1 // indirect
 	github.com/leodido/go-urn v1.2.4 // indirect
-	github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f // indirect
 	github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect
 	github.com/mattn/go-isatty v0.0.19 // indirect
 	github.com/microsoft/go-mssqldb v1.1.0 // indirect

+ 4 - 0
isapi/isapi_smart_fieldDetection.go

@@ -68,6 +68,10 @@ func (c *Client) GetFieldDetectionCap() (resp FieldDetectionCap, err error) {
 		return
 	}
 	err = xml.Unmarshal(bytes, &resp)
+	detection, _ := c.GetFieldDetection()
+	for i, v := range detection.FieldDetectionRegionList.FieldDetectionRegion {
+		resp.FieldDetectionRegionList.FieldDetectionRegion[i].AlarmConfidence.Text = v.AlarmConfidence
+	}
 	return
 }