Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mid-service
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
赵啸非
mid-service
Commits
2752a50d
Commit
2752a50d
authored
Jan 16, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改pom文件
parent
bc7429ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
src/main/java/com/mortals/xhx/daemon/applicationservice/CaptureStartedService.java
.../xhx/daemon/applicationservice/CaptureStartedService.java
+2
-8
src/main/java/com/mortals/xhx/daemon/applicationservice/CaptureThread.java
.../mortals/xhx/daemon/applicationservice/CaptureThread.java
+17
-5
No files found.
src/main/java/com/mortals/xhx/daemon/applicationservice/CaptureStartedService.java
View file @
2752a50d
...
...
@@ -70,18 +70,12 @@ public class CaptureStartedService implements IApplicationStartedService {
continue
;
}
//读取窗口id
Integer
windowId
=
0
;
boolean
exist
=
FileUtil
.
exist
(
confPath
);
if
(
exist
)
{
Props
props
=
new
Props
(
confPath
);
//获取窗口id 默认值为0
windowId
=
props
.
getInt
(
"windowId"
,
0
);
}
log
.
info
(
"start deviceName:{},ip:{}, is ipv4:{}"
,
device
.
getName
(),
ip
,
ipv4
);
Map
<
String
,
Set
<
String
>>
filterMap
=
DestInfo
.
build
();
//String redirectUrl = "";
CaptureThread
captureThread
=
new
CaptureThread
(
device
,
hcpUrl
,
hcpGovUrl
,
filterMap
,
windowId
);
CaptureThread
captureThread
=
new
CaptureThread
(
device
,
hcpUrl
,
hcpGovUrl
,
filterMap
,
confPath
);
ThreadPool
.
getInstance
().
execute
(
captureThread
);
}
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/mortals/xhx/daemon/applicationservice/CaptureThread.java
View file @
2752a50d
package
com.mortals.xhx.daemon.applicationservice
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.net.Ipv4Util
;
import
cn.hutool.core.net.NetUtil
;
import
cn.hutool.core.util.ReUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.setting.dialect.Props
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.mortals.framework.common.Rest
;
...
...
@@ -48,7 +50,8 @@ public class CaptureThread implements Runnable {
private
String
redirectUrl
;
private
String
hcpGovUrl
;
private
Map
<
String
,
Set
<
String
>>
filterMap
;
private
Integer
windowId
;
private
String
confPath
;
@Override
public
void
run
()
{
...
...
@@ -229,16 +232,25 @@ public class CaptureThread implements Runnable {
return
;
}
//读取窗口id
Integer
windowId
=
0
;
boolean
exist
=
FileUtil
.
exist
(
confPath
);
if
(!
exist
)
{
log
.
info
(
"配置文件不存在,返回!"
);
return
;
}
Props
props
=
new
Props
(
confPath
);
//获取窗口id 默认值为0
windowId
=
props
.
getInt
(
"windowId"
,
0
);
//读取当前设置的窗口id
HcpReq
hcpReq
=
new
HcpReq
();
/* HcpReq hcpReq = new HcpReq();
hcpReq.setWindowid(windowId);//todo 读取窗口 共享文件
String hcpUrl = hcpGovUrl + "?affairCode=" + affairCode;
hcpReq.setUrl(hcpUrl);
String body = JSON.toJSONString(hcpReq);
// log.info("req url:{},body:{}", url, body);
// log.info("req url:{},body:{}", url, body);*/
String
hcpUrl
=
hcpGovUrl
+
"?affairCode="
+
affairCode
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"url"
,
hcpUrl
);
paramMap
.
put
(
"windowid"
,
windowId
);
...
...
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