Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
LegalPersonMonitor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiachenqi
LegalPersonMonitor
Commits
9ad12350
Commit
9ad12350
authored
Feb 09, 2018
by
gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
频次认证
parent
9d1609e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
SendToWeixin.java
...ain/java/com/legalPersonMonitor/monitor/SendToWeixin.java
+1
-1
ServiceStateMonitoring.java
...om/legalPersonMonitor/monitor/ServiceStateMonitoring.java
+29
-29
No files found.
src/main/java/com/legalPersonMonitor/monitor/SendToWeixin.java
View file @
9ad12350
...
...
@@ -20,7 +20,7 @@ public class SendToWeixin {
// private static String startTime="1517722200000";
private
static
String
endTime
=
""
;
public
void
sendToWeixinMain
(){
public
static
void
sendToWeixinMain
(){
endTime
=
FormatBytesUtil
.
getTimestamp
();
String
msgServiceState
=
"0X4F模式下的法人代理返回结果:"
+
ServiceStateMonitoring
.
serviceStateMonitoringServer
();
String
msgTrustedPlatformStatus
=
"0X4F模式下的可信平台返回结果:"
+
new
TrustedPlatformStatusMonitoring
().
trustedPlatformStatusMonitoringServer
();
...
...
src/main/java/com/legalPersonMonitor/monitor/ServiceStateMonitoring.java
View file @
9ad12350
...
...
@@ -16,35 +16,35 @@ import java.util.*;
* 服务状态监控
*/
public
class
ServiceStateMonitoring
{
private
static
String
msgDescription
=
""
;
private
static
PreAuthResponseBean
preAuthResponseBean
;
public
static
String
serviceStateMonitoringServer
(){
try
{
String
preAuthRespStr
=
HttpClientPool
.
postRequest
(
"http://121.22.111.251:9002/legalPerson/v2.0/auth_app"
,
ParameterConfig
.
PREAUTH_JSONSTR
);
JSONObject
preAuthApply
=
JSONObject
.
fromObject
(
preAuthRespStr
);
preAuthResponseBean
=
(
PreAuthResponseBean
)
JSONObject
.
toBean
(
preAuthApply
,
PreAuthResponseBean
.
class
);
if
(!
preAuthResponseBean
.
getSuccess
())
{
msgDescription
=
preAuthResponseBean
.
getErrorDesc
();
private
static
String
msgDescription
=
""
;
private
static
PreAuthResponseBean
preAuthResponseBean
;
public
static
String
serviceStateMonitoringServer
(){
try
{
String
preAuthRespStr
=
HttpClientPool
.
postRequest
(
"http://121.22.111.251:9002/legalPerson/v2.0/auth_app"
,
ParameterConfig
.
PREAUTH_JSONSTR
);
JSONObject
preAuthApply
=
JSONObject
.
fromObject
(
preAuthRespStr
);
preAuthResponseBean
=
(
PreAuthResponseBean
)
JSONObject
.
toBean
(
preAuthApply
,
PreAuthResponseBean
.
class
);
if
(!
preAuthResponseBean
.
getSuccess
())
{
msgDescription
=
preAuthResponseBean
.
getErrorDesc
();
}
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
ParameterConfig
.
AUTH_JSONSTR
);
Map
config
=
new
HashMap
();
config
.
put
(
"authApplyRetainData"
,
AuthApplyRetainBean
.
class
);
AuthRequestBean
authRequestBean
=
(
AuthRequestBean
)
JSONObject
.
toBean
(
jsonObject
,
AuthRequestBean
.
class
,
config
);
authRequestBean
.
setBusinessSerialNumber
(
preAuthResponseBean
.
getBusinessSerialNumber
());
String
authResStr
=
JSONObject
.
fromObject
(
authRequestBean
).
toString
();
String
authRespStr
=
HttpClientPool
.
postRequest
(
"http://121.22.111.251:9002/legalPerson/v2.0/authen_req"
,
authResStr
);
JSONObject
authApply
=
JSONObject
.
fromObject
(
authRespStr
);
AuthResponseBean
authResponseBean
=
(
AuthResponseBean
)
JSONObject
.
toBean
(
authApply
,
AuthResponseBean
.
class
);
if
(!
authResponseBean
.
getSuccess
()){
msgDescription
=
authResponseBean
.
getErrorDesc
();
}
msgDescription
=
authResponseBean
.
getAuthResult
();
}
catch
(
Exception
e
){
msgDescription
=
"法人代理监控超时错误"
;
}
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
ParameterConfig
.
AUTH_JSONSTR
);
Map
config
=
new
HashMap
();
config
.
put
(
"authApplyRetainData"
,
AuthApplyRetainBean
.
class
);
AuthRequestBean
authRequestBean
=
(
AuthRequestBean
)
JSONObject
.
toBean
(
jsonObject
,
AuthRequestBean
.
class
,
config
);
authRequestBean
.
setBusinessSerialNumber
(
preAuthResponseBean
.
getBusinessSerialNumber
());
String
authResStr
=
JSONObject
.
fromObject
(
authRequestBean
).
toString
();
String
authRespStr
=
HttpClientPool
.
postRequest
(
"http://121.22.111.251:9002/legalPerson/v2.0/authen_req"
,
authResStr
);
JSONObject
authApply
=
JSONObject
.
fromObject
(
authRespStr
);
AuthResponseBean
authResponseBean
=
(
AuthResponseBean
)
JSONObject
.
toBean
(
authApply
,
AuthResponseBean
.
class
);
if
(!
authResponseBean
.
getSuccess
()){
msgDescription
=
authResponseBean
.
getErrorDesc
();
}
msgDescription
=
authResponseBean
.
getAuthResult
();
}
catch
(
Exception
e
){
msgDescription
=
"法人代理监控超时错误"
;
}
return
msgDescription
;
return
msgDescription
;
}
}
/**
* 正确率查询
...
...
@@ -59,12 +59,12 @@ public class ServiceStateMonitoring {
}
JSONObject
correctRateQueryStrJson
=
JSONObject
.
fromObject
(
correctRateQueryStr
);
String
str
=
"法人代理在"
+
FormatBytesUtil
.
stampToDate
(
startTime
)+
"时 至"
+
FormatBytesUtil
.
stampToDate
(
endTime
)+
"时 时间段内认证认证成功率是"
+
correctRateQueryStrJson
.
get
(
"correctRate"
);
return
str
;
return
str
;
}
public
static
String
authCount
(
String
startTime
,
String
endTime
){
String
authCountStr
=
""
;
try
{
authCountStr
=
HttpClientPool
.
getRequest
(
"http://121.22.111.251:9002/legalPerson/v1.0/authQtyStats?startTime="
+
startTime
+
"&endTime="
+
endTime
+
"&customer=gtyx01"
);
authCountStr
=
HttpClientPool
.
getRequest
(
"http://121.22.111.251:9002/legalPerson/v1.0/authQtyStats?startTime="
+
startTime
+
"&endTime="
+
endTime
+
"&customer
Number
=gtyx01"
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
...
...
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