Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
haikang-client
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
杨立
haikang-client
Commits
16e05229
提交
16e05229
authored
4月 20, 2022
作者:
wangqiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
apq-client
上级
30027566
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
161 行增加
和
33 行删除
+161
-33
PersistentFileServiceImpl.java
...com/priusis/client/service/PersistentFileServiceImpl.java
+0
-2
ConfigController.java
...rc/main/java/com/priusis/controller/ConfigController.java
+9
-0
FacilityController.java
.../main/java/com/priusis/controller/FacilityController.java
+44
-1
ProgramController.java
...c/main/java/com/priusis/controller/ProgramController.java
+29
-10
application-aprod.yml
apq-pc-client/src/main/resources/application-aprod.yml
+1
-0
application-aqprod.yml
apq-pc-client/src/main/resources/application-aqprod.yml
+16
-0
application-prod.yml
apq-pc-client/src/main/resources/application-prod.yml
+7
-6
application.yml
apq-pc-client/src/main/resources/application.yml
+2
-0
apq-client-x32.iss
tools/install-package/boot/apq-client/apq-client-x32.iss
+10
-10
application-prod.yml
...tall-package/boot/apq-client/service/application-prod.yml
+15
-0
app-update.yml
...l-package/client/x32/client-soft/resources/app-update.yml
+4
-0
app.asar
...install-package/client/x32/client-soft/resources/app.asar
+0
-0
childprocess.txt
...age/client/x32/client-soft/resources/bat/childprocess.txt
+13
-0
test.bat
...all-package/client/x32/client-soft/resources/bat/test.bat
+5
-0
elevate.exe
...tall-package/client/x32/client-soft/resources/elevate.exe
+0
-0
apq.exe
tools/install-package/client/x64/client-soft/apq.exe
+0
-0
apq-sign.bat
tools/install-package/sign/apq-sign.bat
+6
-4
没有找到文件。
apq-pc-client/src/main/java/com/priusis/client/service/PersistentFileServiceImpl.java
浏览文件 @
16e05229
package
com
.
priusis
.
client
.
service
;
import
cn.hutool.json.JSONUtil
;
import
com.priusis.ApqClientApplication
;
import
com.priusis.client.service.conf.PcPersistenceConfiguration
;
import
com.priusis.dto.RegisterParamDto
;
import
com.sun.jna.Platform
;
import
lombok.extern.slf4j.Slf4j
;
...
...
apq-pc-client/src/main/java/com/priusis/controller/ConfigController.java
浏览文件 @
16e05229
...
...
@@ -10,6 +10,7 @@ import com.priusis.lib.R;
import
com.priusis.utils.SysConfigUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -33,6 +34,9 @@ public class ConfigController {
@Autowired
private
TenantManagerService
service
;
@Value
(
value
=
"${apq.webrtc_path}"
)
private
String
webrtcPath
;
@GetMapping
(
value
=
"get_download_path"
)
public
R
<
String
>
getDownloadPath
()
throws
IOException
{
String
path
=
SysConfigUtil
.
getProperty
(
"download.path"
,
...
...
@@ -42,6 +46,11 @@ public class ConfigController {
return
R
.
success
(
path
);
}
@GetMapping
(
value
=
"get_webrtc_path"
)
public
R
<
String
>
getWebRtcPath
()
{
return
R
.
success
(
webrtcPath
);
}
@PostMapping
(
value
=
"save_download_path"
)
public
R
<
Void
>
saveDownloadPath
(
@RequestBody
Map
<
String
,
String
>
params
)
throws
IOException
{
String
path
=
params
.
get
(
"path"
);
...
...
apq-pc-client/src/main/java/com/priusis/controller/FacilityController.java
浏览文件 @
16e05229
...
...
@@ -2,22 +2,28 @@ package com.priusis.controller;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.google.common.collect.Maps
;
import
com.priusis.lib.R
;
import
com.priusis.utils.MacAddrUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
/**
* <p>
* 设备表控制器
* </p>
*/
@Slf4j
@RestController
@RequestMapping
(
"/facility"
)
@Validated
...
...
@@ -29,6 +35,24 @@ public class FacilityController {
@Value
(
value
=
"${apq.url.voiceCall}"
)
private
String
voiceCallUrl
;
@Value
(
value
=
"${apq.url.voiceCallPush}"
)
private
String
voiceCallPushUrl
;
@Value
(
value
=
"${apq.url.device_info_g}"
)
private
String
deviceInfoUrl
;
@PostMapping
(
"voiceCallPush"
)
public
R
voiceCallPush
()
{
String
reqUrl
=
gateway
+
voiceCallPushUrl
;
String
mac
=
MacAddrUtil
.
get
();
JSONObject
rsp
=
JSONUtil
.
parseObj
(
HttpUtil
.
post
(
reqUrl
,
JSONUtil
.
createObj
().
set
(
"macAddress"
,
mac
).
toString
()));
if
(
ObjectUtil
.
notEqual
(
rsp
.
getInt
(
"code"
),
0
))
return
R
.
error
(
rsp
.
getStr
(
"msg"
));
return
R
.
success
();
}
@PostMapping
(
"voiceCall"
)
public
R
voiceCall
()
{
String
reqUrl
=
gateway
+
voiceCallUrl
;
...
...
@@ -37,6 +61,25 @@ public class FacilityController {
JSONObject
rsp
=
JSONUtil
.
parseObj
(
HttpUtil
.
post
(
reqUrl
,
JSONUtil
.
createObj
().
set
(
"macAddress"
,
mac
).
toString
()));
if
(
ObjectUtil
.
notEqual
(
rsp
.
getInt
(
"code"
),
0
))
return
R
.
error
(
rsp
.
getStr
(
"msg"
));
return
R
.
success
(
mac
);
JSONObject
rsp2
=
JSONUtil
.
parseObj
(
HttpUtil
.
get
(
gateway
+
StrUtil
.
format
(
deviceInfoUrl
,
mac
)));
if
(
ObjectUtil
.
notEqual
(
rsp2
.
getInt
(
"code"
),
0
))
{
log
.
error
(
"查询设备信息失败, msg: {}"
,
rsp
.
getStr
(
"msg"
));
return
R
.
error
(
"查询设备信息失败"
);
}
Long
operationId
=
rsp2
.
getJSONObject
(
"data"
).
getLong
(
"operationId"
);
Long
sysUserId
=
rsp2
.
getJSONObject
(
"data"
).
getLong
(
"sysUserId"
);
Long
callUserId
=
operationId
;
if
(
null
==
callUserId
)
{
callUserId
=
sysUserId
;
}
if
(
null
==
callUserId
)
{
return
R
.
error
(
"语音通话失败,目前接听用户不存在"
);
}
Map
<
String
,
Object
>
result
=
Maps
.
newHashMap
();
result
.
put
(
"mac"
,
mac
);
result
.
put
(
"callUserId"
,
callUserId
);
return
R
.
success
(
result
);
}
}
apq-pc-client/src/main/java/com/priusis/controller/ProgramController.java
浏览文件 @
16e05229
...
...
@@ -19,6 +19,7 @@ import com.google.common.collect.Lists;
import
com.priusis.cache.InstalledProgramCache
;
import
com.priusis.lib.R
;
import
com.priusis.utils.MacAddrUtil
;
import
com.priusis.utils.ProcessExtensionsApqUtil
;
import
com.priusis.utils.SysConfigUtil
;
import
com.priusis.vo.FacilityProgramVo
;
import
lombok.SneakyThrows
;
...
...
@@ -156,7 +157,7 @@ public class ProgramController {
})
.
collect
(
Collectors
.
toList
());
return
R
.
success
(
page
.
setRecords
(
list
));
}
catch
(
IO
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"客户端系统异常"
,
e
);
return
R
.
error
(
"客户端正在初始化,请稍后再试!"
);
}
...
...
@@ -370,7 +371,7 @@ public class ProgramController {
}
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
,
IOException
{
/*int exitVal = -1;
try {
exitVal = Runtime.getRuntime().exec("cmd /c \"D:\\work\\priusis\\priusis-iot\\apq-iot\\apq-client\\tools\\install-package\boot\\dist\\apq-info-install.exe\"").waitFor();
...
...
@@ -391,30 +392,48 @@ public class ProgramController {
System.out.println(exitVal);*/
// =================================================================
String
url
=
"http://apuqi.oss-cn-zhangjiakou.aliyuncs.com/ossdata/20220420/f65fe478633c43f493a0b60d13717504.exe"
;
String
fileName
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)
+
1
);
System
.
out
.
println
(
fileName
);
Runtime
.
getRuntime
().
exec
(
"cmd /c \"C:\\apqdownloads\\f65fe478633c43f493a0b60d13717504.exe\""
);
System
.
out
.
println
(
11
);
}
@Scheduled
(
fixedDelay
=
6
0000
)
@Scheduled
(
fixedDelay
=
12
0000
)
protected
void
autoUpgradeJob
()
{
try
{
String
controlRequestTimeStr
=
SysConfigUtil
.
getProperty
(
"control.request.time"
);
if
(
StrUtil
.
isNotBlank
(
controlRequestTimeStr
)
&&
System
.
currentTimeMillis
()
-
NumberUtil
.
toBigDecimal
(
controlRequestTimeStr
).
longValue
()
<
10
*
1000
)
{
if
(
StrUtil
.
isNotBlank
(
controlRequestTimeStr
)
&&
System
.
currentTimeMillis
()
-
NumberUtil
.
toBigDecimal
(
controlRequestTimeStr
).
longValue
()
<
1
2
0
*
1000
)
{
boolean
autoUpgrade
=
Convert
.
toBool
(
SysConfigUtil
.
getProperty
(
"auto.upgrade"
),
false
);
if
(!
autoUpgrade
)
return
;
File
dir
=
new
File
(
SysConfigUtil
.
getProperty
(
"download.path"
,
System
.
getProperty
(
"user.dir"
).
substring
(
0
,
3
)
+
"apqdownloads"
));
String
downloadPath
=
SysConfigUtil
.
getProperty
(
"download.path"
,
System
.
getProperty
(
"user.dir"
).
substring
(
0
,
3
)
+
"apqdownloads"
);
File
dir
=
new
File
(
downloadPath
);
if
(!
dir
.
exists
())
dir
.
mkdirs
();
list
(
"upgrade"
,
1
,
10000
).
getData
().
getRecords
()
.
parallelStream
()
.
filter
(
m
->
ObjectUtil
.
notEqual
(
m
.
get
(
"version"
),
m
.
get
(
"localVersion"
)))
.
forEach
(
m
->
{
HttpResponse
rsp
=
HttpUtil
.
createGet
(
m
.
get
(
"url"
)).
execute
(
true
);
File
file
=
rsp
.
writeBodyForFile
(
dir
,
null
);
String
url
=
m
.
get
(
"url"
);
String
fileName
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)
+
1
);
File
fileE
=
new
File
(
downloadPath
+
File
.
separator
+
fileName
);
if
(!
fileE
.
exists
())
{
HttpResponse
rsp
=
HttpUtil
.
createGet
(
url
).
execute
(
true
);
fileE
=
rsp
.
writeBodyForFile
(
dir
,
null
);
}
int
exitVal
=
-
1
;
try
{
exitVal
=
Runtime
.
getRuntime
().
exec
(
"cmd /c \""
+
file
.
getPath
()
+
"\" /sp- /silent /norestart /suppressmsgboxes"
).
waitFor
();
String
exeCmd
=
"autoExe.bat \""
+
fileE
.
getPath
()
+
"\""
;
ProcessExtensionsApqUtil
.
apq_CreateProcessAsUser
(
exeCmd
);
log
.
info
(
"执行安装文件 {} "
,
exeCmd
);
// Runtime.getRuntime().exec("cmd /c \"C:\\apqdownloads\\f65fe478633c43f493a0b60d13717504.exe\" /sp- /silent /norestart /suppressmsgboxes");
}
catch
(
Exception
e
)
{
log
.
error
(
"执行安装文件 {} 失败"
,
file
.
getPath
(),
e
);
log
.
error
(
"执行安装文件 {} 失败"
,
file
E
.
getPath
(),
e
);
}
log
.
info
(
"执行安装文件 =============="
);
if
(
exitVal
==
0
)
{
String
reqUrl
=
gateway
+
StrUtil
.
format
(
upgradeStatusUpIssueUrl
,
MacAddrUtil
.
get
(),
m
.
get
(
"id"
));
HttpUtil
.
post
(
reqUrl
,
(
String
)
null
);
...
...
apq-pc-client/src/main/resources/application-aprod.yml
浏览文件 @
16e05229
apq
:
iot-gateway
:
39.98.116.19:80/api
webrtc_path
:
https://ceshi.priusis.com:8443
client
:
productId
:
286
tenantId
:
138
...
...
apq-pc-client/src/main/resources/application-aqprod.yml
0 → 100644
浏览文件 @
16e05229
apq
:
iot-gateway
:
39.98.116.19:80/api
webrtc_path
:
https://ceshi.priusis.com:8443
client
:
productId
:
292
tenantId
:
252
job
:
type
:
all
control
:
request
:
isTimeSet
:
false
PC_HOST
:
39.98.116.19
PC_PORT
:
1883
vnc-repeater
:
39.98.116.19:5500
\ No newline at end of file
apq-pc-client/src/main/resources/application-prod.yml
浏览文件 @
16e05229
apq
:
iot-gateway
:
10.2.68.40:7033
iot-gateway
:
10.2.68.45:7033
webrtc_path
:
http://10.2.68.41:81
client
:
productId
:
210
tenantId
:
1
56
productId
:
1
tenantId
:
1
48
job
:
type
:
all
control
:
request
:
isTimeSet
:
false
PC_HOST
:
10.2.68.40
vnc-repeater
:
10.2.68.41:5500
\ No newline at end of file
PC_HOST
:
10.2.68.45
vnc-repeater
:
10.2.68.45:5500
\ No newline at end of file
apq-pc-client/src/main/resources/application.yml
浏览文件 @
16e05229
...
...
@@ -42,12 +42,14 @@ apq:
antivirus
:
type
:
P360
iot-gateway
:
192.168.124.19:7002
webrtc_path
:
https://ceshi.priusis.com:8443
client
:
productId
:
210
tenantId
:
156
url
:
device_info_g
:
/facility/facility/getByMacAddress?macAddress={}
voiceCall
:
/facility/facility/voiceCall
voiceCallPush
:
/facility/facility/voiceCallPush
device_info
:
/facility/facility/pcAdd
install
:
/ops/install/getClientList?macAddress={}&pageNum={}&pageSize={}
upgrade
:
/ops/upgrade/getClientList?macAddress={}&pageNum={}&pageSize={}
...
...
tools/install-package/boot/apq-client/apq-client-x32.iss
浏览文件 @
16e05229
...
...
@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "阿普奇检测客户端"
#define MyAppVersion "V1.
0
"
#define MyAppVersion "V1.
2
"
#define MyAppPublisher "阿普奇"
#define MyAppURL "https://www.apq.com/"
#define MyAppDirName "apq-client"
...
...
@@ -19,7 +19,7 @@
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
; Tell Windows Explorer to reload the environment
ChangesEnvironment=yes
DisableDirPage=
no
DisableDirPage=
yes
; AlwaysRestart=yes
AppId={{1394783A-5D3C-48CD-0000-E2DFBB844E42}
AppName={#MyAppName}
...
...
@@ -37,7 +37,7 @@ SetupIconFile=logo.ico
OutputDir=..\dist\
;安装包文件名
OutputBaseFilename={#MyAppName}
_x32
OutputBaseFilename={#MyAppName}
;压缩文件
Compression=lzma
...
...
@@ -63,6 +63,7 @@ Source: "../../runtime/VC_redist.x86.exe"; DestDir: "{app}/service/runtime"; Fla
Source: "../../core/*"; DestDir: "{app}/service/core"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "../../vnc/x32/*"; DestDir: "{app}/vnc"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "../../client/x32/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "../../../../apq-pc-client/target/apq-pc-client-0.0.1-SNAPSHOT-boot.jar"; DestDir: "{app}/service"; Flags: ignoreversion recursesubdirs createallsubdirs;
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
...
...
@@ -103,11 +104,11 @@ begin
//Result := Password;
end;
function CheckPassword(Password: String): Boolean;
begin
if GetMD5OfStringApq(Password)='{#MyAppInstallPwd}' then
result:=true;
end;
//
function CheckPassword(Password: String): Boolean;
//
begin
//
if GetMD5OfStringApq(Password)='{#MyAppInstallPwd}' then
//
result:=true;
//
end;
function CheckProcessRunning( aProcName,
aProcDesc: string ): boolean;
...
...
@@ -165,7 +166,6 @@ begin
DeleteFile( d + f2 );
end;
function AskPassword(): Boolean;
var
Form: TSetupForm;
...
...
@@ -233,7 +233,7 @@ function InitializeSetup: Boolean;
var
CurVer: string;
CurVerStr: string;
begin
begin
// Do not use any user defined vars in here such as {app}
// Result := not ( CheckProcessRunning( 'apq-client-service.exe', 'apq-client-service' ));
CheckProcessRunning( 'apq-control.exe', 'apq客户端插件' )
...
...
tools/install-package/boot/apq-client/service/application-prod.yml
0 → 100644
浏览文件 @
16e05229
apq
:
iot-gateway
:
10.2.68.45:7033
webrtc_path
:
http://10.2.68.44:81
client
:
productId
:
1
tenantId
:
148
job
:
type
:
all
control
:
request
:
isTimeSet
:
false
PC_HOST
:
10.2.68.45
vnc-repeater
:
10.2.68.45:5500
\ No newline at end of file
tools/install-package/client/x32/client-soft/resources/app-update.yml
0 → 100644
浏览文件 @
16e05229
owner
:
PanJiaChen
repo
:
vue-element-admin
provider
:
github
updaterCacheDirName
:
apq-updater
tools/install-package/client/x32/client-soft/resources/app.asar
浏览文件 @
16e05229
No preview for this file type
tools/install-package/client/x32/client-soft/resources/bat/childprocess.txt
0 → 100644
浏览文件 @
16e05229
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
ECHO 处于打开状态。
C:/apqdownloads/82756009c1fa44e3aece58b32ec2ff69.exe
tools/install-package/client/x32/client-soft/resources/bat/test.bat
0 → 100644
浏览文件 @
16e05229
cd /d "%~dp0"
echo %1 >> ./childprocess.txt
start /b cmd /c %1
exit
\ No newline at end of file
tools/install-package/client/x32/client-soft/resources/elevate.exe
0 → 100644
浏览文件 @
16e05229
File added
tools/install-package/client/x64/client-soft/apq.exe
浏览文件 @
16e05229
No preview for this file type
tools/install-package/sign/apq-sign.bat
浏览文件 @
16e05229
"D:\tools\signtool.exe" sign /v /f "D:\tools\apq.pfx" /p apq0011 /t http://timestamp.verisign.com/scripts/timestamp.dll D:\work\priusis\priusis-iot\apq-iot\apq-client\tools\install-package\boot\dist\
阿普奇检测客户端.exe
"D:\tools\signtool.exe" sign /v /f "D:\tools\apq.pfx" /p apq0011 /t http://timestamp.verisign.com/scripts/timestamp.dll D:\work\priusis\priusis-iot\apq-iot\apq-client\tools\install-package\boot\dist\
阿普奇检测客户端
.exe
"D:\tools\signtool.exe" sign /v /f "D:\tools\apq.pfx" /p apq0011 /t http://timestamp.verisign.com/scripts/timestamp.dll D:\work\priusis\priusis-iot\apq-iot\apq-client\tools\install-package\boot\dist\
阿普奇检测客户端_x32
.exe
"D:\tools\signtool.exe" sign /v /f "D:\tools\apq.pfx" /p apq0011 /t http://timestamp.verisign.com/scripts/timestamp.dll D:\work\priusis\priusis-iot\apq-iot\apq-client\tools\install-package\boot\dist\
阿普奇检测客户端
_x32.exe
"D:\tools\signtool.exe" sign /v /f "D:\tools\apq.pfx" /p apq0011 /t http://timestamp.verisign.com/scripts/timestamp.dll D:\work\priusis\priusis-iot\apq-iot\apq-client\tools\install-package\client\x64\client-soft\apq.exe
...
...
@@ -8,4 +8,6 @@
"D:\tools\signtool.exe" sign /v /f "D:\tools\apq.pfx" /p apq0011 /t http://timestamp.verisign.com/scripts/timestamp.dll D:\work\priusis\priusis-iot\apq-iot\apq-client\tools\install-package\java\x64\jre\bin\apq-client.exe
"D:\tools\signtool.exe" sign /v /f "D:\tools\apq.pfx" /p apq0011 /t http://timestamp.verisign.com/scripts/timestamp.dll D:\work\priusis\priusis-iot\apq-iot\apq-client\tools\install-package\java\x32\jre\bin\apq-client.exe
\ No newline at end of file
"D:\tools\signtool.exe" sign /v /f "D:\tools\apq.pfx" /p apq0011 /t http://timestamp.verisign.com/scripts/timestamp.dll D:\work\priusis\priusis-iot\apq-iot\apq-client\tools\install-package\java\x32\jre\bin\apq-client.exe
pause
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论