Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
refined-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
refined-platform
Commits
cba37d01
Commit
cba37d01
authored
Apr 21, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加服务追踪
parent
514e8130
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
143 additions
and
165 deletions
+143
-165
refined-manager-ui/admin/src/views/device/list.vue
refined-manager-ui/admin/src/views/device/list.vue
+3
-5
refined-manager/pom.xml
refined-manager/pom.xml
+19
-8
refined-manager/src/main/java/com/mortals/xhx/base/system/task/web/TaskController.java
.../com/mortals/xhx/base/system/task/web/TaskController.java
+11
-1
refined-manager/src/main/java/com/mortals/xhx/busiz/req/SmsThirdPartyReq.java
...main/java/com/mortals/xhx/busiz/req/SmsThirdPartyReq.java
+3
-2
refined-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/SubEventStartedService.java
...xhx/daemon/applicationservice/SubEventStartedService.java
+2
-3
refined-manager/src/main/java/com/mortals/xhx/daemon/task/CreateBlackPlanToHikByDayTaskImpl.java
...ls/xhx/daemon/task/CreateBlackPlanToHikByDayTaskImpl.java
+5
-1
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteDeviceTaskImpl.java
...a/com/mortals/xhx/daemon/task/SyncSiteDeviceTaskImpl.java
+42
-133
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSubmitAppointTaskImpl.java
...om/mortals/xhx/daemon/task/SyncSubmitAppointTaskImpl.java
+2
-2
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareRecordsServiceImpl.java
.../xhx/module/care/service/impl/CareRecordsServiceImpl.java
+17
-8
refined-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
...ava/com/mortals/xhx/module/device/model/DeviceEntity.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/model/req/CameraListReq.java
...ortals/xhx/module/hik/camera/model/req/CameraListReq.java
+6
-0
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/model/req/CameraReq.java
...om/mortals/xhx/module/hik/camera/model/req/CameraReq.java
+17
-0
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/model/req/ExpressionsItem.java
...tals/xhx/module/hik/camera/model/req/ExpressionsItem.java
+11
-0
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/service/IHikCameraService.java
...tals/xhx/module/hik/camera/service/IHikCameraService.java
+1
-0
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/service/impl/HikCameraServiceImpl.java
.../module/hik/camera/service/impl/HikCameraServiceImpl.java
+2
-1
refined-manager/src/main/resources/bootstrap.yml
refined-manager/src/main/resources/bootstrap.yml
+1
-0
No files found.
refined-manager-ui/admin/src/views/device/list.vue
View file @
cba37d01
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
设备ID
"
,
prop
:
"
deviceId
"
},
{
label
:
"
设备名称
"
,
prop
:
"
deviceName
"
},
{
label
:
"
设备名称
"
,
prop
:
"
deviceName
"
},
...
@@ -60,10 +59,9 @@
...
@@ -60,10 +59,9 @@
{
label
:
"
楼栋
"
,
prop
:
"
build
"
,
formatter
:
this
.
formatter
},
{
label
:
"
楼栋
"
,
prop
:
"
build
"
,
formatter
:
this
.
formatter
},
/* {label: "超时时间", prop: "timeOutPeriod",formatter: this.formatter},
{
label
:
"
超时时间
"
,
prop
:
"
timeOutPeriod
"
,
formatter
:
this
.
formatter
},
{label: "临近时间", prop: "nearTime",formatter: this.formatter},*/
{
label
:
"
临近时间
"
,
prop
:
"
nearTime
"
,
formatter
:
this
.
formatter
},
{
label
:
"
设备状态
"
,
prop
:
"
deviceStatus
"
,
formatter
:
this
.
formatter
},
{
label
:
"
设备状态
"
,
prop
:
"
deviceStatus
"
,
formatter
:
this
.
formatter
},
...
@@ -73,7 +71,7 @@
...
@@ -73,7 +71,7 @@
width
:
240
,
width
:
240
,
formatter
:
row
=>
{
formatter
:
row
=>
{
return
(
return
(
<
table
-
buttons
noAdd
noEdit
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
<
table
-
buttons
noAdd
noEdit
noDel
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
);
);
}
}
}
}
...
...
refined-manager/pom.xml
View file @
cba37d01
...
@@ -32,9 +32,10 @@
...
@@ -32,9 +32,10 @@
<profiles.log.level>
info
</profiles.log.level>
<profiles.log.level>
info
</profiles.log.level>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.php.host>
http://192.168.0.98:8090
</profiles.php.host>
<profiles.php.host>
http://192.168.0.98:8090
</profiles.php.host>
<profiles.sms.smsSendUrl>
http://sms.wx3.com.cn
</profiles.sms.smsSendUrl>
<profiles.sms.smsSendUrl>
http://sms.wx3.com.cn
/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
ADsUXLrS81vZDU95
</profiles.sms.apiId>
<profiles.sms.apiId>
ADsUXLrS81vZDU95
</profiles.sms.apiId>
<profiles.hik.host>
8.136.255.30:8001
</profiles.hik.host>
<profiles.hik.host>
8.136.255.30:8001
</profiles.hik.host>
<profiles.hik.protocol>
http://
</profiles.hik.protocol>
<profiles.hik.appKey>
25128371
</profiles.hik.appKey>
<profiles.hik.appKey>
25128371
</profiles.hik.appKey>
<profiles.hik.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
<profiles.hik.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
<profiles.hik.callback>
http://8.136.255.30:11080/refined/hik/eventRcv
</profiles.hik.callback>
<profiles.hik.callback>
http://8.136.255.30:11080/refined/hik/eventRcv
</profiles.hik.callback>
...
@@ -59,6 +60,7 @@
...
@@ -59,6 +60,7 @@
<profiles.sms.smsSendUrl>
http://sms.wx3.com.cn
</profiles.sms.smsSendUrl>
<profiles.sms.smsSendUrl>
http://sms.wx3.com.cn
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
ADsUXLrS81vZDU95
</profiles.sms.apiId>
<profiles.sms.apiId>
ADsUXLrS81vZDU95
</profiles.sms.apiId>
<profiles.hik.host>
8.136.255.30:8001
</profiles.hik.host>
<profiles.hik.host>
8.136.255.30:8001
</profiles.hik.host>
<profiles.hik.protocol>
http://
</profiles.hik.protocol>
<profiles.hik.appKey>
25128371
</profiles.hik.appKey>
<profiles.hik.appKey>
25128371
</profiles.hik.appKey>
<profiles.hik.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
<profiles.hik.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
<profiles.hik.callback>
http://8.136.255.30:11080/refined/hik/eventRcv
</profiles.hik.callback>
<profiles.hik.callback>
http://8.136.255.30:11080/refined/hik/eventRcv
</profiles.hik.callback>
...
@@ -67,18 +69,27 @@
...
@@ -67,18 +69,27 @@
</properties>
</properties>
</profile>
</profile>
<profile>
<profile>
<id>
product
</id>
<id>
yibin
</id>
<properties>
<properties>
<profiles.active>
test
</profiles.active>
<profiles.active>
yibin
</profiles.active>
<profiles.server.port>
21080
</profiles.server.port>
<profiles.server.port>
21080
</profiles.server.port>
<profiles.server.port>
21080
</profiles.server.port>
<profiles.server.path>
/refined
</profiles.server.path>
<profiles.server.path>
/refined
</profiles.server.path>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.nacos.server-addr>
172.15.28.120:8848
</profiles.nacos.server-addr>
<profiles.nacos.server-addr>
192.168.0.252:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.log.path>
/mortals/app/logs
</profiles.log.path>
<profiles.log.level>
INFO
</profiles.log.level>
<profiles.log.level>
info
</profiles.log.level>
<package.environment>
test
</package.environment>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.php.host>
http://172.15.28.116:8090
</profiles.php.host>
<profiles.sms.smsSendUrl>
http://172.15.28.113:8901/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
ADsUXLrS81vZDU95
</profiles.sms.apiId>
<profiles.hik.host>
10.12.177.245:443
</profiles.hik.host>
<profiles.hik.protocol>
https://
</profiles.hik.protocol>
<profiles.hik.appKey>
25128371
</profiles.hik.appKey>
<profiles.hik.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
<profiles.hik.callback>
http://10.12.185.213:11080/refined/hik/eventRcv
</profiles.hik.callback>
<package.environment>
build
</package.environment>
<skipUi>
false
</skipUi>
<skipUi>
false
</skipUi>
</properties>
</properties>
</profile>
</profile>
...
...
refined-manager/src/main/java/com/mortals/xhx/base/system/task/web/TaskController.java
View file @
cba37d01
...
@@ -3,12 +3,15 @@ package com.mortals.xhx.base.system.task.web;
...
@@ -3,12 +3,15 @@ package com.mortals.xhx.base.system.task.web;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.task.model.TaskQuery
;
import
com.mortals.xhx.base.system.task.model.TaskQuery
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -48,19 +51,26 @@ public class TaskController extends BaseCRUDJsonBodyMappingController<TaskServic
...
@@ -48,19 +51,26 @@ public class TaskController extends BaseCRUDJsonBodyMappingController<TaskServic
status
.
put
(
"status"
,
TaskExcuteStatusEnum
.
getEnumMap
());
status
.
put
(
"status"
,
TaskExcuteStatusEnum
.
getEnumMap
());
status
.
put
(
"excuteStrategy"
,
TaskExcuteStrategyEnum
.
getEnumMap
());
status
.
put
(
"excuteStrategy"
,
TaskExcuteStrategyEnum
.
getEnumMap
());
status
.
put
(
"interimExcuteStatus"
,
TaskInterimExcuteStatusEnum
.
getEnumMap
());
status
.
put
(
"interimExcuteStatus"
,
TaskInterimExcuteStatusEnum
.
getEnumMap
());
Set
<
String
>
existServiceSet
=
this
.
service
.
find
(
new
TaskQuery
()).
stream
().
map
(
i
->
i
.
getExcuteService
()).
collect
(
Collectors
.
toSet
());
Map
<
String
,
ITaskExcuteService
>
serviceMap
=
GlobalSysInfo
.
getBeansByType
(
ITaskExcuteService
.
class
);
Map
<
String
,
ITaskExcuteService
>
serviceMap
=
GlobalSysInfo
.
getBeansByType
(
ITaskExcuteService
.
class
);
Map
<
String
,
Object
>
serviceList
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
serviceList
=
new
HashMap
<
String
,
Object
>();
if
(
serviceMap
!=
null
)
{
if
(
serviceMap
!=
null
)
{
try
{
try
{
serviceMap
.
forEach
((
k
,
v
)
->
{
serviceMap
.
forEach
((
k
,
v
)
->
{
if
(
null
!=
v
)
{
if
(
null
!=
v
)
{
serviceList
.
put
(
k
,
k
);
if
(!
existServiceSet
.
contains
(
k
)){
serviceList
.
put
(
k
,
k
);
}
}
}
});
});
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
log
.
error
(
""
,
ex
);
log
.
error
(
""
,
ex
);
}
}
}
}
model
.
put
(
"excuteService"
,
serviceList
);
model
.
put
(
"excuteService"
,
serviceList
);
model
.
put
(
KEY_RESULT_DICT
,
status
);
model
.
put
(
KEY_RESULT_DICT
,
status
);
}
}
...
...
refined-manager/src/main/java/com/mortals/xhx/busiz/req/SmsThirdPartyReq.java
View file @
cba37d01
package
com.mortals.xhx.busiz.req
;
package
com.mortals.xhx.busiz.req
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -33,7 +34,7 @@ public class SmsThirdPartyReq {
...
@@ -33,7 +34,7 @@ public class SmsThirdPartyReq {
/**
/**
* 内容
* 内容
*/
*/
private
String
json
;
private
JSONObject
json
;
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
@@ -42,7 +43,7 @@ public class SmsThirdPartyReq {
...
@@ -42,7 +43,7 @@ public class SmsThirdPartyReq {
smsThirdPartyReq
.
setAppid
(
"12"
);
smsThirdPartyReq
.
setAppid
(
"12"
);
smsThirdPartyReq
.
setPhone
(
"31"
);
smsThirdPartyReq
.
setPhone
(
"31"
);
smsThirdPartyReq
.
setType
(
"123"
);
smsThirdPartyReq
.
setType
(
"123"
);
smsThirdPartyReq
.
setJson
(
"13213"
);
smsThirdPartyReq
.
setJson
(
new
JSONObject
()
);
System
.
out
.
println
(
JSON
.
toJSONString
(
smsThirdPartyReq
));
System
.
out
.
println
(
JSON
.
toJSONString
(
smsThirdPartyReq
));
...
...
refined-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/SubEventStartedService.java
View file @
cba37d01
...
@@ -30,6 +30,7 @@ import com.mortals.xhx.module.hik.face.service.IHikPlanService;
...
@@ -30,6 +30,7 @@ import com.mortals.xhx.module.hik.face.service.IHikPlanService;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -41,7 +42,7 @@ import static com.mortals.xhx.common.key.ParamKey.PARAM_FACE_GROUP;
...
@@ -41,7 +42,7 @@ import static com.mortals.xhx.common.key.ParamKey.PARAM_FACE_GROUP;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
PARAM_FACE_GROUP_REGISTER
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
PARAM_FACE_GROUP_REGISTER
;
//
@Component
@Component
@Slf4j
@Slf4j
public
class
SubEventStartedService
implements
IApplicationStartedService
{
public
class
SubEventStartedService
implements
IApplicationStartedService
{
...
@@ -79,8 +80,6 @@ public class SubEventStartedService implements IApplicationStartedService {
...
@@ -79,8 +80,6 @@ public class SubEventStartedService implements IApplicationStartedService {
//查询本地指定人脸分组 如果没有则添加 并更新
//查询本地指定人脸分组 如果没有则添加 并更新
String
groupStr
=
GlobalSysInfo
.
getParamValue
(
PARAM_FACE_GROUP
,
PARAM_FACE_GROUP_REGISTER
);
String
groupStr
=
GlobalSysInfo
.
getParamValue
(
PARAM_FACE_GROUP
,
PARAM_FACE_GROUP_REGISTER
);
List
<
String
>
groupList
=
StrUtil
.
split
(
groupStr
,
","
.
charAt
(
0
));
List
<
String
>
groupList
=
StrUtil
.
split
(
groupStr
,
","
.
charAt
(
0
));
...
...
refined-manager/src/main/java/com/mortals/xhx/daemon/task/CreateBlackPlanToHikByDayTaskImpl.java
View file @
cba37d01
...
@@ -121,6 +121,10 @@ public class CreateBlackPlanToHikByDayTaskImpl implements ITaskExcuteService {
...
@@ -121,6 +121,10 @@ public class CreateBlackPlanToHikByDayTaskImpl implements ITaskExcuteService {
planRecognBlackReq
.
setThreshold
(
threshold
);
planRecognBlackReq
.
setThreshold
(
threshold
);
//设置人脸分组
//设置人脸分组
FaceGroupEntity
faceGroupEntity
=
faceGroupService
.
selectOne
(
new
FaceGroupQuery
().
name
(
PARAM_FACE_GROUP_REGISTER
));
FaceGroupEntity
faceGroupEntity
=
faceGroupService
.
selectOne
(
new
FaceGroupQuery
().
name
(
PARAM_FACE_GROUP_REGISTER
));
if
(
ObjectUtils
.
isEmpty
(
faceGroupEntity
))
{
log
.
info
(
"人脸组不存在!"
);
return
;
}
List
<
String
>
faceGroupIndexCodes
=
new
ArrayList
<>();
List
<
String
>
faceGroupIndexCodes
=
new
ArrayList
<>();
faceGroupIndexCodes
.
add
(
faceGroupEntity
.
getIndexCode
());
faceGroupIndexCodes
.
add
(
faceGroupEntity
.
getIndexCode
());
planRecognBlackReq
.
setFaceGroupIndexCodes
(
faceGroupIndexCodes
);
planRecognBlackReq
.
setFaceGroupIndexCodes
(
faceGroupIndexCodes
);
...
@@ -147,7 +151,7 @@ public class CreateBlackPlanToHikByDayTaskImpl implements ITaskExcuteService {
...
@@ -147,7 +151,7 @@ public class CreateBlackPlanToHikByDayTaskImpl implements ITaskExcuteService {
//更新计划
//更新计划
planRecognBlackReq
.
setIndexCode
(
planRecognWhiteInfo
.
getIndexCode
());
planRecognBlackReq
.
setIndexCode
(
planRecognWhiteInfo
.
getIndexCode
());
Rest
<
Boolean
>
planRecognWhiteUpdateRest
=
hikPlanService
.
planRecognWhiteUpdate
(
planRecognBlackReq
);
Rest
<
Boolean
>
planRecognWhiteUpdateRest
=
hikPlanService
.
planRecognWhiteUpdate
(
planRecognBlackReq
);
if
(
planRecognWhiteUpdateRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
()
&&
planRecognWhiteUpdateRest
.
getData
())
{
if
(
planRecognWhiteUpdateRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
()
&&
planRecognWhiteUpdateRest
.
getData
())
{
FacePlanEntity
whitePlan
=
facePlanService
.
selectOne
(
new
FacePlanQuery
().
indexCode
(
planRecognWhiteInfo
.
getIndexCode
()));
FacePlanEntity
whitePlan
=
facePlanService
.
selectOne
(
new
FacePlanQuery
().
indexCode
(
planRecognWhiteInfo
.
getIndexCode
()));
whitePlan
.
setUpdateTime
(
new
Date
());
whitePlan
.
setUpdateTime
(
new
Date
());
...
...
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteDeviceTaskImpl.java
View file @
cba37d01
...
@@ -10,6 +10,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
...
@@ -10,6 +10,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
import
com.mortals.xhx.module.device.model.DeviceQuery
;
import
com.mortals.xhx.module.device.model.DeviceQuery
;
import
com.mortals.xhx.module.device.service.DeviceService
;
import
com.mortals.xhx.module.device.service.DeviceService
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraListReq
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraListReq
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraReq
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraDataInfo
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraDataInfo
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraInfo
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraInfo
;
import
com.mortals.xhx.module.hik.camera.service.IHikCameraService
;
import
com.mortals.xhx.module.hik.camera.service.IHikCameraService
;
...
@@ -18,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -18,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -44,51 +46,49 @@ public class SyncSiteDeviceTaskImpl implements ITaskExcuteService {
...
@@ -44,51 +46,49 @@ public class SyncSiteDeviceTaskImpl implements ITaskExcuteService {
}
}
/**
/**
*
"altitude": null,
* "altitude": null,
*
"cameraIndexCode": "d271545ad77c4fb28728101d765d76bb",
* "cameraIndexCode": "d271545ad77c4fb28728101d765d76bb",
*
"cameraName": "Camera 02",
* "cameraName": "Camera 02",
*
"cameraType": 0,
* "cameraType": 0,
*
"cameraTypeName": "枪机",
* "cameraTypeName": "枪机",
*
"capabilitySet": "event_audio,io,MixMixedRoot,MixRoot,event_veh_recognition,face,event_vss,record,vss,ptz,event_io,net,maintenance,event_device,status,event_body,event_face,event_rule,event_veh",
* "capabilitySet": "event_audio,io,MixMixedRoot,MixRoot,event_veh_recognition,face,event_vss,record,vss,ptz,event_io,net,maintenance,event_device,status,event_body,event_face,event_rule,event_veh",
*
"capabilitySetName": "音频事件能力,IO能力,,,车辆识别事件能力,人脸识别能力,视频事件能力,录像能力,视频能力,云台能力,IO事件能力,网络参数配置能力,设备维护能力,设备事件能力,状态能力,人体事件能力,人脸事件能力,行为分析事件能力,车辆事件能力",
* "capabilitySetName": "音频事件能力,IO能力,,,车辆识别事件能力,人脸识别能力,视频事件能力,录像能力,视频能力,云台能力,IO事件能力,网络参数配置能力,设备维护能力,设备事件能力,状态能力,人体事件能力,人脸事件能力,行为分析事件能力,车辆事件能力",
*
"intelligentSet": null,
* "intelligentSet": null,
*
"intelligentSetName": null,
* "intelligentSetName": null,
*
"channelNo": "2",
* "channelNo": "2",
*
"channelType": "analog",
* "channelType": "analog",
*
"channelTypeName": "模拟通道",
* "channelTypeName": "模拟通道",
*
"createTime": "2023-04-10T13:59:08.194+08:00",
* "createTime": "2023-04-10T13:59:08.194+08:00",
*
"encodeDevIndexCode": "f01277c1d6f842b581e6931fa7cc34b4",
* "encodeDevIndexCode": "f01277c1d6f842b581e6931fa7cc34b4",
*
"encodeDevResourceType": null,
* "encodeDevResourceType": null,
*
"encodeDevResourceTypeName": null,
* "encodeDevResourceTypeName": null,
*
"gbIndexCode": null,
* "gbIndexCode": null,
*
"installLocation": null,
* "installLocation": null,
*
"keyBoardCode": null,
* "keyBoardCode": null,
*
"latitude": null,
* "latitude": null,
*
"longitude": null,
* "longitude": null,
*
"pixel": null,
* "pixel": null,
*
"ptz": null,
* "ptz": null,
*
"ptzName": null,
* "ptzName": null,
*
"ptzController": null,
* "ptzController": null,
*
"ptzControllerName": null,
* "ptzControllerName": null,
*
"recordLocation": null,
* "recordLocation": null,
*
"recordLocationName": null,
* "recordLocationName": null,
*
"regionIndexCode": "root000000",
* "regionIndexCode": "root000000",
*
"status": null,
* "status": null,
*
"statusName": null,
* "statusName": null,
*
"transType": 1,
* "transType": 1,
*
"transTypeName": "TCP",
* "transTypeName": "TCP",
*
"treatyType": null,
* "treatyType": null,
*
"treatyTypeName": null,
* "treatyTypeName": null,
*
"viewshed": null,
* "viewshed": null,
*
"updateTime": "2023-04-10T15:11:56.446+08:00"
* "updateTime": "2023-04-10T15:11:56.446+08:00"
*/
*/
private
void
syncDevice
()
{
private
void
syncDevice
()
{
CameraListReq
cameraListReq
=
new
CameraListReq
();
CameraListReq
cameraListReq
=
new
CameraListReq
();
cameraListReq
.
setPageNo
(
1
);
cameraListReq
.
setPageNo
(
1
);
cameraListReq
.
setPageSize
(
200
);
cameraListReq
.
setPageSize
(
200
);
cameraListReq
.
setRegionIndexCode
(
"root000000"
);
Rest
<
CameraDataInfo
>
rest
=
hikCameraService
.
findCameraList
(
cameraListReq
);
Rest
<
CameraDataInfo
>
rest
=
hikCameraService
.
findCameraList
(
cameraListReq
);
if
(
rest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
if
(
rest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
List
<
CameraInfo
>
cameraDataInfoList
=
rest
.
getData
().
getList
();
List
<
CameraInfo
>
cameraDataInfoList
=
rest
.
getData
().
getList
();
...
@@ -142,103 +142,12 @@ public class SyncSiteDeviceTaskImpl implements ITaskExcuteService {
...
@@ -142,103 +142,12 @@ public class SyncSiteDeviceTaskImpl implements ITaskExcuteService {
if
(!
ObjectUtils
.
isEmpty
(
delDeviceList
))
{
if
(!
ObjectUtils
.
isEmpty
(
delDeviceList
))
{
log
.
info
(
"设备删除,size:{}"
,
delDeviceList
.
size
());
log
.
info
(
"设备删除,size:{}"
,
delDeviceList
.
size
());
deviceService
.
remove
(
delDeviceList
,
null
);
deviceService
.
remove
(
delDeviceList
,
null
);
}
}
}
}
}
else
{
}
else
{
log
.
info
(
"同步设备异常=>{}"
,
JSON
.
toJSONString
(
rest
));
log
.
info
(
"同步设备异常=>{}"
,
JSON
.
toJSONString
(
rest
));
}
}
// planRecognBlackListReq.set
//hikCameraService.findPlanRecognBlackList()
/* SitePdu sitePdu = new SitePdu();
sitePdu.setId(1L);
Rest<List<SitePdu>> siteRest = siteFeign.getFlatSitesBySiteId(sitePdu);
if (siteRest.getCode() == YesNoEnum.YES.getValue()) {
log.info("站点总数量:{}", siteRest.getData().size());
siteRest.getData().forEach(site -> {
log.info("站点名称:{}",site.getSiteName());
DevicePdu devicePdu = new DevicePdu();
devicePdu.setProductCode("ybj");
devicePdu.setSize(-1);
Rest<RespData<List<DevicePdu>>> deviceRest = deviceFeign.list(devicePdu);
log.info("deviceRest:{}",JSON.toJSONString(deviceRest));
if (YesNoEnum.YES.getValue() == deviceRest.getCode()) {
List<DevicePdu> devicePduList = deviceRest.getData().getData();
log.info("样表机总数量:{}", devicePduList.size());
if (!ObjectUtils.isEmpty(devicePduList)) {
List<DeviceEntity> newDeviceList = devicePduList.stream().map(newDevice -> {
DeviceEntity deviceEntity = new DeviceEntity();
deviceEntity.initAttrValue();
BeanUtils.copyProperties(newDevice, deviceEntity, BeanUtil.getNullPropertyNames(newDevice));
return deviceEntity;
}).collect(Collectors.toList());
List<DeviceEntity> oldDeviceList = deviceService.find(new DeviceQuery().siteId(site.getId()));
Map<String, DeviceEntity> oldDeviceMap = oldDeviceList.stream().collect(Collectors.toMap(x -> x.getDeviceCode(), y -> y, (o, n) -> n));
Map<String, DeviceEntity> newDeviceMap = newDeviceList.stream().collect(Collectors.toMap(x -> x.getDeviceCode(), y -> y, (o, n) -> n));
List<DeviceEntity> updateDeviceLsit = newDeviceList.stream().map(item -> {
if (oldDeviceMap.containsKey(item.getDeviceCode())) {
item.setId(oldDeviceMap.get(item.getDeviceCode()).getId());
item.setDeviceId(item.getId());
item.setProductCode(oldDeviceMap.get(item.getDeviceCode()).getProductCode());
item.setProductName(oldDeviceMap.get(item.getDeviceCode()).getProductName());
item.setUpdateTime(new Date());
return item;
}
return null;
}).filter(f -> f != null).collect(Collectors.toList());
List<DeviceEntity> saveDeviceList = newDeviceList.stream().map(item -> {
if (!oldDeviceMap.containsKey(item.getDeviceCode())) {
item.setDeviceId(item.getId());
item.setCreateUserId(1L);
item.setCreateUserName("系统管理员");
item.setCreateTime(new Date());
return item;
}
return null;
}).filter(f -> f != null).collect(Collectors.toList());
//做差集
List<Long> delDeviceList = oldDeviceList.stream().map(item -> {
if (!newDeviceMap.containsKey(item.getDeviceCode())) {
return item.getId();
}
return null;
}).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(updateDeviceLsit)) {
log.info("设备更新,size:{}", updateDeviceLsit.size());
deviceService.update(updateDeviceLsit);
}
if (!ObjectUtils.isEmpty(saveDeviceList)) {
log.info("设备新增,size:{}", saveDeviceList.size());
deviceService.save(saveDeviceList);
}
if (!ObjectUtils.isEmpty(delDeviceList)) {
log.info("设备删除,size:{}", delDeviceList.size());
deviceService.remove(delDeviceList,null);
}
}
} else {
log.info("设备列表查询异常,{}", JSON.toJSONString(deviceRest));
}
});
} else {
log.info("站点列表查询异常,{}", JSON.toJSONString(siteRest));
}*/
}
}
...
...
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSubmitAppointTaskImpl.java
View file @
cba37d01
...
@@ -41,9 +41,9 @@ public class SyncSubmitAppointTaskImpl implements ITaskExcuteService {
...
@@ -41,9 +41,9 @@ public class SyncSubmitAppointTaskImpl implements ITaskExcuteService {
@Override
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
log
.
info
(
"同步提交预约任务"
);
log
.
debug
(
"同步提交预约任务"
);
syncSubmitAppoint
();
syncSubmitAppoint
();
log
.
info
(
"同步提交预约任务完成"
);
log
.
debug
(
"同步提交预约任务完成"
);
}
}
...
...
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareRecordsServiceImpl.java
View file @
cba37d01
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.care.service.impl;
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.care.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.TypeReference
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -117,20 +118,28 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
...
@@ -117,20 +118,28 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
smsThirdPartyReq
.
setAppid
(
apiId
);
smsThirdPartyReq
.
setAppid
(
apiId
);
smsThirdPartyReq
.
setPhone
(
careRecordsEntity
.
getContact
());
smsThirdPartyReq
.
setPhone
(
careRecordsEntity
.
getContact
());
smsThirdPartyReq
.
setType
(
ParamKey
.
SYS_PARAM_SMS_PERSON_CARE_TYPE
);
smsThirdPartyReq
.
setType
(
ParamKey
.
SYS_PARAM_SMS_PERSON_CARE_TYPE
);
Map
<
String
,
String
>
form
=
new
HashMap
<>();
smsThirdPartyReq
.
setJson
(
new
JSONObject
());
EntityUtil
.
entityToMap
(
smsThirdPartyReq
,
form
);
resp
=
HttpUtil
.
doPost
(
smsSendUrl
,
form
);
Map
<
String
,
Object
>
form
=
BeanUtil
.
beanToMap
(
smsThirdPartyReq
,
false
,
true
);
log
.
info
(
"sms req sendUrl:{} params:{}"
,
smsSendUrl
,
JSON
.
toJSONString
(
form
));
resp
=
cn
.
hutool
.
http
.
HttpUtil
.
post
(
smsSendUrl
,
form
);
log
.
info
(
"sms resp:{}"
,
resp
);
// resp = HttpUtil.doPost(smsSendUrl, form);
ApiSmsResp
<
Void
>
apiSmsResp
=
JSON
.
parseObject
(
resp
,
new
TypeReference
<
ApiSmsResp
<
Void
>>()
{
ApiSmsResp
<
Void
>
apiSmsResp
=
JSON
.
parseObject
(
resp
,
new
TypeReference
<
ApiSmsResp
<
Void
>>()
{
});
});
//更新发送数量
CareRecordsQuery
condition
=
new
CareRecordsQuery
();
condition
.
setId
(
careRecordsEntity
.
getId
());
condition
.
setSmsCountIncrement
(
1
);
condition
.
setCareCount
(
1
);
if
(
apiSmsResp
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
if
(
apiSmsResp
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
//更新发送数量
CareRecordsQuery
condition
=
new
CareRecordsQuery
();
condition
.
setId
(
careRecordsEntity
.
getId
());
condition
.
setSmsCountIncrement
(
1
);
this
.
update
(
condition
,
context
);
this
.
update
(
condition
,
context
);
return
Rest
.
ok
();
return
Rest
.
ok
();
}
else
{
}
else
{
throw
new
AppException
(
apiSmsResp
.
getMessage
());
this
.
update
(
condition
,
context
);
return
Rest
.
fail
(
apiSmsResp
.
getMessage
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
refined-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
View file @
cba37d01
...
@@ -496,7 +496,7 @@ public class DeviceEntity extends DeviceVo {
...
@@ -496,7 +496,7 @@ public class DeviceEntity extends DeviceVo {
this
.
deviceMac
=
""
;
this
.
deviceMac
=
""
;
this
.
deviceLocation
=
"
2
"
;
this
.
deviceLocation
=
""
;
this
.
lon
=
""
;
this
.
lon
=
""
;
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/model/req/CameraListReq.java
View file @
cba37d01
...
@@ -8,4 +8,10 @@ import java.util.List;
...
@@ -8,4 +8,10 @@ import java.util.List;
public
class
CameraListReq
{
public
class
CameraListReq
{
private
int
pageNo
;
private
int
pageNo
;
private
int
pageSize
;
private
int
pageSize
;
private
String
cameraIndexCodes
;
private
String
encodeDevIndexCode
;
private
String
regionIndexCode
;
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/model/req/CameraReq.java
0 → 100644
View file @
cba37d01
package
com.mortals.xhx.module.hik.camera.model.req
;
import
java.util.List
;
import
lombok.Data
;
@Data
public
class
CameraReq
{
private
List
<
String
>
regionIndexCodes
;
private
String
orderType
;
private
int
pageNo
;
private
String
name
;
private
List
<
String
>
authCodes
;
private
int
pageSize
;
private
String
orderBy
;
private
List
<
ExpressionsItem
>
expressions
;
private
boolean
isSubRegion
;
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/model/req/ExpressionsItem.java
0 → 100644
View file @
cba37d01
package
com.mortals.xhx.module.hik.camera.model.req
;
import
java.util.List
;
import
lombok.Data
;
@Data
public
class
ExpressionsItem
{
private
List
<
String
>
values
;
private
String
key
;
private
int
operator
;
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/service/IHikCameraService.java
View file @
cba37d01
...
@@ -3,6 +3,7 @@ package com.mortals.xhx.module.hik.camera.service;
...
@@ -3,6 +3,7 @@ package com.mortals.xhx.module.hik.camera.service;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraListReq
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraListReq
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraReq
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraDataInfo
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraDataInfo
;
/**
/**
...
...
refined-manager/src/main/java/com/mortals/xhx/module/hik/camera/service/impl/HikCameraServiceImpl.java
View file @
cba37d01
...
@@ -8,6 +8,7 @@ import com.mortals.framework.common.Rest;
...
@@ -8,6 +8,7 @@ import com.mortals.framework.common.Rest;
import
com.mortals.xhx.module.hik.AbstractHikService
;
import
com.mortals.xhx.module.hik.AbstractHikService
;
import
com.mortals.xhx.module.hik.HikApiRest
;
import
com.mortals.xhx.module.hik.HikApiRest
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraListReq
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraListReq
;
import
com.mortals.xhx.module.hik.camera.model.req.CameraReq
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraDataInfo
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraDataInfo
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraInfo
;
import
com.mortals.xhx.module.hik.camera.model.rsp.CameraInfo
;
import
com.mortals.xhx.module.hik.camera.service.IHikCameraService
;
import
com.mortals.xhx.module.hik.camera.service.IHikCameraService
;
...
@@ -30,7 +31,7 @@ public class HikCameraServiceImpl extends AbstractHikService implements IHikCame
...
@@ -30,7 +31,7 @@ public class HikCameraServiceImpl extends AbstractHikService implements IHikCame
@Override
@Override
public
Rest
<
CameraDataInfo
>
findCameraList
(
CameraListReq
cameraListReq
)
{
public
Rest
<
CameraDataInfo
>
findCameraList
(
CameraListReq
cameraListReq
)
{
ArtemisConfig
config
=
getArtemisConfig
();
ArtemisConfig
config
=
getArtemisConfig
();
String
getCamsApi
=
ARTEMIS_PATH
+
"/api/resource/v1/camera
s
"
;
String
getCamsApi
=
ARTEMIS_PATH
+
"/api/resource/v1/camera
/advance/cameraList
"
;
path
.
put
(
protocol
,
getCamsApi
);
path
.
put
(
protocol
,
getCamsApi
);
try
{
try
{
log
.
info
(
"camera list req=>{}"
,
JSON
.
toJSONString
(
cameraListReq
));
log
.
info
(
"camera list req=>{}"
,
JSON
.
toJSONString
(
cameraListReq
));
...
...
refined-manager/src/main/resources/bootstrap.yml
View file @
cba37d01
...
@@ -66,5 +66,6 @@ php:
...
@@ -66,5 +66,6 @@ php:
hik
:
hik
:
host
:
@
profiles.hik.host@
host
:
@
profiles.hik.host@
appKey
:
@
profiles.hik.appKey@
appKey
:
@
profiles.hik.appKey@
protocol
:
@
profiles.hik.protocol@
appSecret
:
@
profiles.hik.appSecret@
appSecret
:
@
profiles.hik.appSecret@
callback
:
@
profiles.hik.callback@
callback
:
@
profiles.hik.callback@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment