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
Expand all
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 @@
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
设备ID
"
,
prop
:
"
deviceId
"
},
{
label
:
"
设备名称
"
,
prop
:
"
deviceName
"
},
...
...
@@ -60,10 +59,9 @@
{
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
},
...
...
@@ -73,7 +71,7 @@
width
:
240
,
formatter
:
row
=>
{
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 @@
<profiles.log.level>
info
</profiles.log.level>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<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.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.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
<profiles.hik.callback>
http://8.136.255.30:11080/refined/hik/eventRcv
</profiles.hik.callback>
...
...
@@ -59,6 +60,7 @@
<profiles.sms.smsSendUrl>
http://sms.wx3.com.cn
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
ADsUXLrS81vZDU95
</profiles.sms.apiId>
<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.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
<profiles.hik.callback>
http://8.136.255.30:11080/refined/hik/eventRcv
</profiles.hik.callback>
...
...
@@ -67,18 +69,27 @@
</properties>
</profile>
<profile>
<id>
product
</id>
<id>
yibin
</id>
<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.path>
/refined
</profiles.server.path>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.nacos.server-addr>
192.168.0.252:8848
</profiles.nacos.server-addr>
<profiles.nacos.server-addr>
172.15.28.120:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.log.level>
INFO
</profiles.log.level>
<package.environment>
test
</package.environment>
<profiles.log.path>
/mortals/app/logs
</profiles.log.path>
<profiles.log.level>
info
</profiles.log.level>
<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>
</properties>
</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;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
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.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -48,19 +51,26 @@ public class TaskController extends BaseCRUDJsonBodyMappingController<TaskServic
status
.
put
(
"status"
,
TaskExcuteStatusEnum
.
getEnumMap
());
status
.
put
(
"excuteStrategy"
,
TaskExcuteStrategyEnum
.
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
,
Object
>
serviceList
=
new
HashMap
<
String
,
Object
>();
if
(
serviceMap
!=
null
)
{
try
{
serviceMap
.
forEach
((
k
,
v
)
->
{
if
(
null
!=
v
)
{
serviceList
.
put
(
k
,
k
);
if
(!
existServiceSet
.
contains
(
k
)){
serviceList
.
put
(
k
,
k
);
}
}
});
}
catch
(
Exception
ex
)
{
log
.
error
(
""
,
ex
);
}
}
model
.
put
(
"excuteService"
,
serviceList
);
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
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.Data
;
...
...
@@ -33,7 +34,7 @@ public class SmsThirdPartyReq {
/**
* 内容
*/
private
String
json
;
private
JSONObject
json
;
public
static
void
main
(
String
[]
args
)
{
...
...
@@ -42,7 +43,7 @@ public class SmsThirdPartyReq {
smsThirdPartyReq
.
setAppid
(
"12"
);
smsThirdPartyReq
.
setPhone
(
"31"
);
smsThirdPartyReq
.
setType
(
"123"
);
smsThirdPartyReq
.
setJson
(
"13213"
);
smsThirdPartyReq
.
setJson
(
new
JSONObject
()
);
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;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
...
...
@@ -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
;
//
@Component
@Component
@Slf4j
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
);
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 {
planRecognBlackReq
.
setThreshold
(
threshold
);
//设置人脸分组
FaceGroupEntity
faceGroupEntity
=
faceGroupService
.
selectOne
(
new
FaceGroupQuery
().
name
(
PARAM_FACE_GROUP_REGISTER
));
if
(
ObjectUtils
.
isEmpty
(
faceGroupEntity
))
{
log
.
info
(
"人脸组不存在!"
);
return
;
}
List
<
String
>
faceGroupIndexCodes
=
new
ArrayList
<>();
faceGroupIndexCodes
.
add
(
faceGroupEntity
.
getIndexCode
());
planRecognBlackReq
.
setFaceGroupIndexCodes
(
faceGroupIndexCodes
);
...
...
@@ -147,7 +151,7 @@ public class CreateBlackPlanToHikByDayTaskImpl implements ITaskExcuteService {
//更新计划
planRecognBlackReq
.
setIndexCode
(
planRecognWhiteInfo
.
getIndexCode
());
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
()));
whitePlan
.
setUpdateTime
(
new
Date
());
...
...
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteDeviceTaskImpl.java
View file @
cba37d01
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSubmitAppointTaskImpl.java
View file @
cba37d01
...
...
@@ -41,9 +41,9 @@ public class SyncSubmitAppointTaskImpl implements ITaskExcuteService {
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
log
.
info
(
"同步提交预约任务"
);
log
.
debug
(
"同步提交预约任务"
);
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;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -117,20 +118,28 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
smsThirdPartyReq
.
setAppid
(
apiId
);
smsThirdPartyReq
.
setPhone
(
careRecordsEntity
.
getContact
());
smsThirdPartyReq
.
setType
(
ParamKey
.
SYS_PARAM_SMS_PERSON_CARE_TYPE
);
Map
<
String
,
String
>
form
=
new
HashMap
<>();
EntityUtil
.
entityToMap
(
smsThirdPartyReq
,
form
);
resp
=
HttpUtil
.
doPost
(
smsSendUrl
,
form
);
smsThirdPartyReq
.
setJson
(
new
JSONObject
());
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
>>()
{
});
//更新发送数量
CareRecordsQuery
condition
=
new
CareRecordsQuery
();
condition
.
setId
(
careRecordsEntity
.
getId
());
condition
.
setSmsCountIncrement
(
1
);
condition
.
setCareCount
(
1
);
if
(
apiSmsResp
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
//更新发送数量
CareRecordsQuery
condition
=
new
CareRecordsQuery
();
condition
.
setId
(
careRecordsEntity
.
getId
());
condition
.
setSmsCountIncrement
(
1
);
this
.
update
(
condition
,
context
);
return
Rest
.
ok
();
}
else
{
throw
new
AppException
(
apiSmsResp
.
getMessage
());
this
.
update
(
condition
,
context
);
return
Rest
.
fail
(
apiSmsResp
.
getMessage
());
}
}
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 {
this
.
deviceMac
=
""
;
this
.
deviceLocation
=
"
2
"
;
this
.
deviceLocation
=
""
;
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;
public
class
CameraListReq
{
private
int
pageNo
;
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;
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.CameraReq
;
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;
import
com.mortals.xhx.module.hik.AbstractHikService
;
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.CameraReq
;
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.service.IHikCameraService
;
...
...
@@ -30,7 +31,7 @@ public class HikCameraServiceImpl extends AbstractHikService implements IHikCame
@Override
public
Rest
<
CameraDataInfo
>
findCameraList
(
CameraListReq
cameraListReq
)
{
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
);
try
{
log
.
info
(
"camera list req=>{}"
,
JSON
.
toJSONString
(
cameraListReq
));
...
...
refined-manager/src/main/resources/bootstrap.yml
View file @
cba37d01
...
...
@@ -66,5 +66,6 @@ php:
hik
:
host
:
@
profiles.hik.host@
appKey
:
@
profiles.hik.appKey@
protocol
:
@
profiles.hik.protocol@
appSecret
:
@
profiles.hik.appSecret@
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