Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InternalLogic
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
CrossProvincialPlatform
InternalLogic
Commits
9191b2e8
Commit
9191b2e8
authored
Sep 28, 2023
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单位销户开发
parent
5b767a4c
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
509 additions
and
31 deletions
+509
-31
src/main/java/net/cdkj/gjj/adapter/ServletInitializer.java
src/main/java/net/cdkj/gjj/adapter/ServletInitializer.java
+13
-0
src/main/java/net/cdkj/gjj/adapter/controller/AlarmTask.java
src/main/java/net/cdkj/gjj/adapter/controller/AlarmTask.java
+15
-0
src/main/java/net/cdkj/gjj/adapter/controller/DeptInfoUpdateController.java
...cdkj/gjj/adapter/controller/DeptInfoUpdateController.java
+4
-1
src/main/java/net/cdkj/gjj/adapter/controller/DeptLogoutController.java
...net/cdkj/gjj/adapter/controller/DeptLogoutController.java
+334
-0
src/main/java/net/cdkj/gjj/adapter/controller/ProvidentFundServicesController.java
...j/adapter/controller/ProvidentFundServicesController.java
+0
-16
src/main/java/net/cdkj/gjj/adapter/domain/BusinessProcessing.java
.../java/net/cdkj/gjj/adapter/domain/BusinessProcessing.java
+8
-14
src/main/java/net/cdkj/gjj/adapter/utils/HttpUtil.java
src/main/java/net/cdkj/gjj/adapter/utils/HttpUtil.java
+105
-0
src/main/resources/application.properties
src/main/resources/application.properties
+2
-0
src/main/webapp/WEB-INF/web.xml
src/main/webapp/WEB-INF/web.xml
+28
-0
No files found.
src/main/java/net/cdkj/gjj/adapter/ServletInitializer.java
0 → 100644
View file @
9191b2e8
package
net.cdkj.gjj.adapter
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
public
class
ServletInitializer
extends
SpringBootServletInitializer
{
@Override
protected
SpringApplicationBuilder
configure
(
SpringApplicationBuilder
application
)
{
return
application
.
sources
(
InternalLogicApplication
.
class
);
}
}
src/main/java/net/cdkj/gjj/adapter/controller/AlarmTask.java
View file @
9191b2e8
...
...
@@ -29,6 +29,8 @@ public class AlarmTask {
@Resource
private
DeptInfoUpdateController
deptInfoUpdateController
;
@Resource
private
DeptLogoutController
deptLogoutController
;
@Resource
private
ProvidentFundServicesController
providentFundServicesController
;
/**
...
...
@@ -68,5 +70,18 @@ public class AlarmTask {
log
.
debug
(
"dwxxbgPullTask 开始时间:{}"
,
InternalUtils
.
getCurrentTime
());
deptInfoUpdateController
.
dwxxbgPull
();
}
@Scheduled
(
initialDelay
=
80
*
1000
,
fixedDelayString
=
"${dwxhPushTaskDelay}"
)
public
void
dwxhPushTask
()
{
log
.
debug
(
"dwxhPushTask 开始时间:{}"
,
InternalUtils
.
getCurrentTime
());
deptLogoutController
.
dwxhPush
();
}
@Scheduled
(
initialDelay
=
100
*
1000
,
fixedDelayString
=
"${dwxhPullTaskDelay}"
)
public
void
dwxhPullTask
()
{
log
.
debug
(
"dwxhPullTask 开始时间:{}"
,
InternalUtils
.
getCurrentTime
());
deptLogoutController
.
dwxhPull
();
}
}
src/main/java/net/cdkj/gjj/adapter/controller/DeptInfoUpdateController.java
View file @
9191b2e8
...
...
@@ -320,7 +320,10 @@ public class DeptInfoUpdateController {
bp
.
setEntName
(
rs
.
getString
(
9
));
}
if
(
StringUtils
.
hasText
(
rs
.
getString
(
10
)))
{
bp
.
setBusId
(
rs
.
getString
(
10
));
bp
.
setRn
(
rs
.
getString
(
10
));
}
if
(
StringUtils
.
hasText
(
rs
.
getString
(
11
)))
{
bp
.
setBusId
(
rs
.
getString
(
11
));
}
list
.
add
(
bp
);
}
...
...
src/main/java/net/cdkj/gjj/adapter/controller/DeptLogoutController.java
0 → 100644
View file @
9191b2e8
This diff is collapsed.
Click to expand it.
src/main/java/net/cdkj/gjj/adapter/controller/ProvidentFundServicesController.java
View file @
9191b2e8
...
...
@@ -195,21 +195,6 @@ public class ProvidentFundServicesController {
CallableStatement
pstm
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWKH.DWXX_IMP(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"
);
// 调完第一个存储过程DWXX_IMP之后再调DWKH_SAVE存储过程
CallableStatement
pstm2
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWKH.DWKH_SAVE()}"
);
// System.out.println(""+bills);
// 给参数赋值
// pstm.getString(1);
// 421102
// 421121
// 421122
// 421123
// 421124
// 421125
// 421126
// 421127
// 421181
// 421182
// 421101
if
(!
bills
.
isEmpty
())
{
for
(
UnitAccountOpeningInformation
uniInfom
:
bills
)
{
if
(!
""
.
equals
(
uniInfom
.
getOplocdistrict
())
&&
uniInfom
.
getOplocdistrict
()
!=
null
)
{
...
...
@@ -402,7 +387,6 @@ public class ProvidentFundServicesController {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// if(!list.isEmpty()){//查到数据才请求第三方接口推送
System
.
out
.
println
(
"调第二个接口了存储过程返回的list"
+
list
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"state"
,
"1"
);
...
...
src/main/java/net/cdkj/gjj/adapter/domain/BusinessProcessing.java
View file @
9191b2e8
...
...
@@ -30,6 +30,8 @@ public class BusinessProcessing {
private
String
busId
;
private
String
rn
;
public
String
getBusiLink
()
{
return
busiLink
;
}
...
...
@@ -110,19 +112,11 @@ public class BusinessProcessing {
this
.
busId
=
busId
;
}
@Override
public
String
toString
()
{
return
"BusinessProcessing{"
+
"busiLink='"
+
busiLink
+
'\''
+
", busiType='"
+
busiType
+
'\''
+
", opeartor='"
+
opeartor
+
'\''
+
", tel='"
+
tel
+
'\''
+
", opinion='"
+
opinion
+
'\''
+
", result='"
+
result
+
'\''
+
", time="
+
time
+
", uscc='"
+
uscc
+
'\''
+
", entName='"
+
entName
+
'\''
+
", busId='"
+
busId
+
'\''
+
'}'
;
public
String
getRn
()
{
return
rn
;
}
public
void
setRn
(
String
rn
)
{
this
.
rn
=
rn
;
}
}
src/main/java/net/cdkj/gjj/adapter/utils/HttpUtil.java
0 → 100644
View file @
9191b2e8
package
net.cdkj.gjj.adapter.utils
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.*
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
import
java.util.zip.GZIPInputStream
;
public
class
HttpUtil
{
/**
* 获取请求入参数据
*/
public
static
String
getReqData
(
HttpServletRequest
request
)
{
StringBuffer
json
=
new
StringBuffer
();
String
line
=
null
;
try
{
BufferedReader
reader
=
request
.
getReader
();
while
((
line
=
reader
.
readLine
())
!=
null
)
{
json
.
append
(
line
);
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
e
);
}
String
str
=
json
.
toString
();
System
.
out
.
println
(
"要发送给第三方的公积金系统服务报文:"
+
str
);
return
str
;
}
/**
* 发起 post 请求,并对出参进行解压缩
*/
public
static
String
sendPost
(
String
httpUrl
,
String
content
)
{
StringBuffer
sb
=
new
StringBuffer
();
HttpURLConnection
conn
=
null
;
OutputStream
out
=
null
;
try
{
// 创建url 资源
URL
url
=
new
URL
(
httpUrl
);
// 创建http 连接
conn
=
(
HttpURLConnection
)
url
.
openConnection
();
// 设置允许输出
conn
.
setDoOutput
(
true
);
// 设置允许输入
conn
.
setDoInput
(
true
);
// 设置不使用缓存
conn
.
setUseCaches
(
false
);
// 设置传递方式
conn
.
setRequestMethod
(
"POST"
);
// 设置维持长连接
conn
.
setRequestProperty
(
"Connection"
,
"Keep-Alive"
);
// 设置文件类型:
conn
.
setRequestProperty
(
"Content-Type"
,
"application/json"
);
conn
.
setRequestProperty
(
"accept"
,
"*/*"
);
conn
.
setRequestProperty
(
"Accept-Encoding"
,
"gzip, deflate, br"
);
// 设置文件字符集:
conn
.
setRequestProperty
(
"Charset"
,
"UTF-8"
);
// 转换为字节数组
byte
[]
data
=
content
.
getBytes
(
"UTF-8"
);
// 设置文件长度
conn
.
setRequestProperty
(
"Content-Length"
,
String
.
valueOf
(
data
.
length
));
// 开始连接请求
conn
.
connect
();
// 创建写入流,写入请求的字符串
out
=
new
DataOutputStream
(
conn
.
getOutputStream
());
out
.
write
(
data
);
// 请求返回的状态
if
(
HttpURLConnection
.
HTTP_OK
==
conn
.
getResponseCode
())
{
// 请求返回的数据,解压缩
InputStream
is
=
conn
.
getInputStream
();
GZIPInputStream
gzis
=
new
GZIPInputStream
(
is
);
InputStreamReader
reader
=
new
InputStreamReader
(
gzis
,
"UTF-8"
);
BufferedReader
br
=
new
BufferedReader
(
reader
);
String
temp
;
while
((
temp
=
br
.
readLine
())
!=
null
)
{
sb
.
append
(
temp
);
}
System
.
out
.
println
(
"第三方返回的zip解压缩之后的报文:"
+
sb
);
return
sb
.
toString
();
}
else
{
System
.
out
.
println
(
"请求失败!!!"
);
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
out
!=
null
)
{
try
{
out
.
flush
();
out
.
close
();
}
catch
(
IOException
e
)
{
}
}
if
(
conn
!=
null
)
{
conn
.
disconnect
();
}
}
return
null
;
}
}
src/main/resources/application.properties
View file @
9191b2e8
...
...
@@ -32,6 +32,8 @@ dwkhPullTaskDelay:60000
dwkhPushTaskDelay
:
60000
dwxxbgPushTaskDelay
:
60000
dwxxbgPullTaskDelay
:
60000
dwxhPushTaskDelay
:
60000
dwxhPullTaskDelay
:
60000
# 日志配置
logging.config
:
classpath:logback-spring.xml
...
...
src/main/webapp/WEB-INF/web.xml
0 → 100644
View file @
9191b2e8
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app
xmlns=
"http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version=
"3.1"
>
<welcome-file-list>
<welcome-file>
index.html
</welcome-file>
<welcome-file>
index.htm
</welcome-file>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
</web-app>
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