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
e5c908b0
Commit
e5c908b0
authored
Feb 11, 2018
by
gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改频次认证
parent
67a9fc50
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
25 deletions
+33
-25
LegalPersonMonitor_jar.xml
.idea/artifacts/LegalPersonMonitor_jar.xml
+2
-2
MANIFEST.MF
META-INF/MANIFEST.MF
+12
-0
ParameterConfig.java
...n/java/com/legalPersonMonitor/config/ParameterConfig.java
+2
-2
SendToWeixin.java
...ain/java/com/legalPersonMonitor/monitor/SendToWeixin.java
+2
-2
ServiceStateMonitoring.java
...om/legalPersonMonitor/monitor/ServiceStateMonitoring.java
+7
-8
FormatBytesUtil.java
...in/java/com/legalPersonMonitor/utils/FormatBytesUtil.java
+2
-2
test.java
src/main/java/com/test/test.java
+5
-9
applicationContext.xml
src/main/resources/applicationContext.xml
+1
-0
No files found.
.idea/artifacts/LegalPersonMonitor_jar.xml
View file @
e5c908b0
...
...
@@ -11,16 +11,16 @@
<element
id=
"library"
level=
"project"
name=
"Maven: com.fasterxml.jackson.core:jackson-core:2.9.2"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: com.fasterxml.jackson.core:jackson-databind:2.9.2"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: commons-beanutils:commons-beanutils:1.8.0"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: commons-collections:commons-collections:3.2.1"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: commons-codec:commons-codec:1.9"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: commons-collections:commons-collections:3.2.1"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: commons-lang:commons-lang:2.5"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: commons-logging:commons-logging:1.1.1"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: org.springframework:spring-beans:4.3.10.RELEASE"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: net.sf.ezmorph:ezmorph:1.0.6"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: net.sf.json-lib:json-lib:jdk15:2.4"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: org.apache.httpcomponents:httpclient:4.5.3"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: org.apache.httpcomponents:httpcore:4.4.6"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: org.springframework:spring-aop:4.3.10.RELEASE"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: org.springframework:spring-beans:4.3.10.RELEASE"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: org.springframework:spring-context-support:4.3.10.RELEASE"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: org.springframework:spring-context:4.3.10.RELEASE"
/>
<element
id=
"library"
level=
"project"
name=
"Maven: org.springframework:spring-core:4.3.10.RELEASE"
/>
...
...
META-INF/MANIFEST.MF
0 → 100644
View file @
e5c908b0
Manifest-Version: 1.0
Class-Path: commons-beanutils-1.8.0.jar spring-beans-4.3.10.RELEASE.ja
r jackson-core-2.9.2.jar json-lib-2.4-jdk15.jar spring-context-4.3.10
.RELEASE.jar jackson-annotations-2.9.0.jar httpcore-4.4.6.jar spring-
context-support-4.3.10.RELEASE.jar commons-lang-2.5.jar spring-expres
sion-4.3.10.RELEASE.jar commons-collections-3.2.1.jar commons-httpcli
ent-3.1.jar commons-logging-1.1.1.jar jit-pkitool-2.3.0.25-beta2.jar
jit-pkivstk-jdk15-1.0.jar httpclient-4.5.3.jar jackson-databind-2.9.2
.jar commons-logging-1.1.1.jar ezmorph-1.0.6.jar spring-aop-4.3.10.RE
LEASE.jar spring-core-4.3.10.RELEASE.jar commons-codec-1.9.jar
Main-Class: com.legalPersonMonitor.server.StartUpTask
src/main/java/com/legalPersonMonitor/config/ParameterConfig.java
View file @
e5c908b0
...
...
@@ -49,12 +49,12 @@ public class ParameterConfig {
" \"cardReaderVersion\": \"v1.0.0.1\",\n"
+
" \"customerNumber\": \"gtyx01\",\n"
+
" \"liveDetectionControlVersion\": \"v1.0.0.1\",\n"
+
" \"timeStamp\": \"1
40322323233325
\"\n"
+
" \"timeStamp\": \"1
516346177047
\"\n"
+
" }"
;
public
static
final
String
AUTH_JSONSTR
=
"{\n"
+
" \"customerNumber\":\"gtyx01\",\n"
+
" \"appName\":\"国投盈信\",\n"
+
" \"timeStamp\":\"151634
1838068
\",\n"
+
" \"timeStamp\":\"151634
6177047
\",\n"
+
" \"businessSerialNumber\":\"413034243240499C2D\",\n"
+
" \"authMode\":\"0x4f\",\n"
+
" \"authApplyRetainData\":\n"
+
...
...
src/main/java/com/legalPersonMonitor/monitor/SendToWeixin.java
View file @
e5c908b0
...
...
@@ -16,8 +16,8 @@ import java.util.Date;
* Created by gaoxiang on 2018/1/22.
*/
public
class
SendToWeixin
{
private
static
String
startTime
=
"15
03123818
000"
;
private
static
String
endTime
=
"
1517305049000
"
;
private
static
String
startTime
=
"15
18328800
000"
;
private
static
String
endTime
=
""
;
public
static
void
sendToWeixinMain
(){
endTime
=
FormatBytesUtil
.
getTimestamp
();
...
...
src/main/java/com/legalPersonMonitor/monitor/ServiceStateMonitoring.java
View file @
e5c908b0
...
...
@@ -19,7 +19,7 @@ public class ServiceStateMonitoring {
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
);
String
preAuthRespStr
=
HttpClientPool
.
postRequest
(
"http://121.22.111.251:9002/legalPerson/
api/
v2.0/auth_app"
,
ParameterConfig
.
PREAUTH_JSONSTR
);
JSONObject
preAuthApply
=
JSONObject
.
fromObject
(
preAuthRespStr
);
preAuthResponseBean
=
(
PreAuthResponseBean
)
JSONObject
.
toBean
(
preAuthApply
,
PreAuthResponseBean
.
class
);
if
(!
preAuthResponseBean
.
getSuccess
())
{
...
...
@@ -31,7 +31,7 @@ public class ServiceStateMonitoring {
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
);
String
authRespStr
=
HttpClientPool
.
postRequest
(
"http://121.22.111.251:9002/legalPerson/
api/
v2.0/authen_req"
,
authResStr
);
JSONObject
authApply
=
JSONObject
.
fromObject
(
authRespStr
);
AuthResponseBean
authResponseBean
=
(
AuthResponseBean
)
JSONObject
.
toBean
(
authApply
,
AuthResponseBean
.
class
);
if
(!
authResponseBean
.
getSuccess
()){
...
...
@@ -52,7 +52,7 @@ public class ServiceStateMonitoring {
String
correctRateQueryStr
=
""
;
try
{
correctRateQueryStr
=
HttpClientPool
.
getRequest
(
"http://121.22.111.251:9002/legalPerson/v1.0/authSucStats?startTime="
+
startTime
+
"&endTime="
+
endTime
+
"&customerNumber=gtyx01"
);
correctRateQueryStr
=
HttpClientPool
.
getRequest
(
"http://121.22.111.251:9002/legalPerson/
api/
v1.0/authSucStats?startTime="
+
startTime
+
"&endTime="
+
endTime
+
"&customerNumber=gtyx01"
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -63,7 +63,7 @@ public class ServiceStateMonitoring {
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
+
"&customerNumber=gtyx01"
);
authCountStr
=
HttpClientPool
.
getRequest
(
"http://121.22.111.251:9002/legalPerson/
api/
v1.0/authQtyStats?startTime="
+
startTime
+
"&endTime="
+
endTime
+
"&customerNumber=gtyx01"
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -80,9 +80,8 @@ public class ServiceStateMonitoring {
String
value
=
""
;
int
i
=
1
;
try
{
authFrequencyStr
=
HttpClientPool
.
getRequest
(
"http://121.22.111.251:900
3/legalPerson
/v1.0/authFreqStats?startTime="
+
startTime
+
"&endTime="
+
endTime
+
"&customerNumber=gtyx01&units=Hour"
);
authFrequencyStr
=
HttpClientPool
.
getRequest
(
"http://121.22.111.251:900
2/legalPerson/api
/v1.0/authFreqStats?startTime="
+
startTime
+
"&endTime="
+
endTime
+
"&customerNumber=gtyx01&units=Hour"
);
authFrequencyList
=
JSONArray
.
fromObject
(
authFrequencyStr
);
System
.
out
.
println
(
authFrequencyList
);
}
catch
(
IOException
e
)
{
return
"法人代理频次请求失败"
;
}
...
...
@@ -91,9 +90,9 @@ public class ServiceStateMonitoring {
str
=
"<div>"
+
str
+
FormatBytesUtil
.
stampToDate
(
startTime
)+
"时至"
+
FormatBytesUtil
.
stampToDate
(
endTime
)+
"时 时间段内没有认证"
+
"</div>"
;
return
str
;
}
if
(
authFrequencyList
.
size
()==
1
){
if
(
authFrequencyList
.
size
()==
1
&&!
value
.
equals
(
"0"
)
){
key
=
(
JSONObject
.
fromObject
(
authFrequencyList
.
get
(
0
)).
get
(
"time"
)).
toString
();
str
=
"<div>"
+
str
+
key
+
"时至"
+
FormatBytesUtil
.
dateAddOneHour
(
key
)+
"时 时间段内认证"
+
value
+
"</div>"
;
str
=
"<div>"
+
str
+
key
+
"时至"
+
FormatBytesUtil
.
dateAddOneHour
(
key
)+
"时 时间段内认证"
+
value
+
"
次
</div>"
;
return
str
;
}
i
=
authFrequencyList
.
size
();
...
...
src/main/java/com/legalPersonMonitor/utils/FormatBytesUtil.java
View file @
e5c908b0
...
...
@@ -72,7 +72,7 @@ public class FormatBytesUtil {
*/
public
static
String
stampToDate
(
String
s
){
String
res
;
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH
:mm
"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH"
);
long
lt
=
new
Long
(
s
);
Date
date
=
new
Date
(
lt
);
res
=
simpleDateFormat
.
format
(
date
);
...
...
@@ -106,7 +106,7 @@ public class FormatBytesUtil {
*/
public
static
String
dateToStamp
(
String
s
)
{
String
res
;
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH
:mm
"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH"
);
Date
date
=
null
;
try
{
date
=
simpleDateFormat
.
parse
(
s
);
...
...
src/main/java/com/test/test.java
View file @
e5c908b0
...
...
@@ -16,14 +16,10 @@ public class test {
private
static
String
startTime
=
"1503123818000"
;
private
static
String
endTime
=
"1517305049000"
;
public
static
void
main
(
String
[]
args
){
String
authFrequencyStr
=
ServiceStateMonitoring
.
authFrequency
(
"1503123818000"
,
"1517305049000"
);
System
.
out
.
println
(
authFrequencyStr
);
// String authFrequencyStr= ServiceStateMonitoring.authFrequency("1516581614000","1516585214000");
// System.out.println(authFrequencyStr);
// String aa="2018-02-09 16:18:35";
// if(aa.substring(12,16).equals("2018-02-09 16:18")){
// System.out.println(111);
// }
// System.out.println( aa.substring(14,16));
// Object s = FormatBytesUtil.dateAddOneHour("2018-02-09 16");
// System.out.println(s);
...
...
@@ -31,8 +27,8 @@ public class test {
// Object s1 = FormatBytesUtil.stampToDate("1518163200000");
// System.out.println(s1);
//
// Object s2 = FormatBytesUtil.dateToStamp("2018-02-09 17
");
// System.out.println("222 "+
s2);
Object
s2
=
FormatBytesUtil
.
dateToStamp
(
"2018-02-11 14
"
);
System
.
out
.
println
(
s2
);
/*微信推送频率*/
...
...
src/main/resources/applicationContext.xml
View file @
e5c908b0
...
...
@@ -10,6 +10,7 @@
<bean
id=
"checkXMLInput"
class=
"com.legalPersonMonitor.monitor.SendToWeixin"
/>
<task:scheduled-tasks>
<!--<task:scheduled ref="checkXMLInput" method="sendToWeixinMain" initial-delay="2000" fixed-delay="5000"/>-->
<task:scheduled
ref=
"checkXMLInput"
method=
"sendToWeixinMain"
cron=
"0 00 8 ? * *"
/>
<task:scheduled
ref=
"checkXMLInput"
method=
"sendToWeixinMain"
cron=
"0 00 11 ? * *"
/>
<task:scheduled
ref=
"checkXMLInput"
method=
"sendToWeixinMain"
cron=
"0 00 14 ? * *"
/>
...
...
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