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
d6db3561
Commit
d6db3561
authored
Jan 31, 2024
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单位开户、单位变更、单位销户协议修改
parent
7a2a3da1
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
818 additions
and
217 deletions
+818
-217
src/main/java/net/cdkj/gjj/adapter/controller/AlarmTask.java
src/main/java/net/cdkj/gjj/adapter/controller/AlarmTask.java
+11
-22
src/main/java/net/cdkj/gjj/adapter/controller/TestController.java
.../java/net/cdkj/gjj/adapter/controller/TestController.java
+0
-15
src/main/java/net/cdkj/gjj/adapter/domain/Json.java
src/main/java/net/cdkj/gjj/adapter/domain/Json.java
+0
-10
src/main/java/net/cdkj/gjj/adapter/domain/PropertyqUtil.java
src/main/java/net/cdkj/gjj/adapter/domain/PropertyqUtil.java
+1
-2
src/main/java/net/cdkj/gjj/adapter/domain/UnitAccountOpeningInformation.java
...dkj/gjj/adapter/domain/UnitAccountOpeningInformation.java
+10
-30
src/main/java/net/cdkj/gjj/adapter/service/DeptInfoUpdateService.java
...a/net/cdkj/gjj/adapter/service/DeptInfoUpdateService.java
+281
-0
src/main/java/net/cdkj/gjj/adapter/service/DeptLogoutService.java
.../java/net/cdkj/gjj/adapter/service/DeptLogoutService.java
+47
-123
src/main/java/net/cdkj/gjj/adapter/service/OpenAccountService.java
...java/net/cdkj/gjj/adapter/service/OpenAccountService.java
+464
-0
src/main/resources/application.properties
src/main/resources/application.properties
+4
-15
No files found.
src/main/java/net/cdkj/gjj/adapter/controller/AlarmTask.java
View file @
d6db3561
package
net.cdkj.gjj.adapter.controller
;
import
net.cdkj.gjj.adapter.service.DeptInfoUpdateService
;
import
net.cdkj.gjj.adapter.service.DeptLogoutService
;
import
net.cdkj.gjj.adapter.service.OpenAccountService
;
import
net.cdkj.gjj.adapter.utils.InternalUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -21,14 +24,14 @@ import javax.annotation.Resource;
//@Async
public
class
AlarmTask
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DeptInfoUpdateController
.
class
);
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AlarmTask
.
class
);
@Resource
private
DeptInfoUpdateController
deptInfoUpdateController
;
private
OpenAccountService
openAccountService
;
@Resource
private
Dept
LogoutController
deptLogoutController
;
private
Dept
InfoUpdateService
deptInfoUpdateService
;
@Resource
private
ProvidentFundServicesController
providentFundServicesController
;
private
DeptLogoutService
deptLogoutService
;
/**
* 第一次延迟(initialDelay)?秒后执行,之后按fixedDelay的规则每?秒执行一次
...
...
@@ -37,7 +40,7 @@ public class AlarmTask {
public
void
dwkhPullTask
()
{
log
.
debug
(
"第一个接口开始时间:{}"
,
InternalUtils
.
getCurrentTime
());
try
{
providentFundServicesController
.
gjjxtfwjk
();
openAccountService
.
syncDeptInfo
();
}
catch
(
Exception
e
)
{
log
.
error
(
"{}"
,
e
);
}
...
...
@@ -51,34 +54,20 @@ public class AlarmTask {
@Scheduled
(
initialDelay
=
20
*
1000
,
fixedDelayString
=
"${dwkhPushTaskDelay}"
)
public
void
dwkhPushTask
()
{
log
.
debug
(
"第二个接口开始时间:{}"
,
InternalUtils
.
getCurrentTime
());
providentFundServicesController
.
BusinessProcessing
();
openAccountService
.
dwkhPush
();
}
@Scheduled
(
initialDelay
=
40
*
1000
,
fixedDelayString
=
"${dwxxbgPushTaskDelay}"
)
public
void
dwxxbgPushTask
()
{
log
.
debug
(
"dwxxbgPushTask 开始时间:{}"
,
InternalUtils
.
getCurrentTime
());
deptInfoUpdateController
.
dwxxbgPush
();
}
@Scheduled
(
initialDelay
=
60
*
1000
,
fixedDelayString
=
"${dwxxbgPullTaskDelay}"
)
public
void
dwxxbgPullTask
()
{
log
.
debug
(
"dwxxbgPullTask 开始时间:{}"
,
InternalUtils
.
getCurrentTime
());
deptInfoUpdateController
.
dwxxbgPull
();
deptInfoUpdateService
.
deptInfoUpdatePush
();
}
@Scheduled
(
initialDelay
=
80
*
1000
,
fixedDelayString
=
"${dwxhPushTaskDelay}"
)
public
void
dwxhPushTask
()
{
log
.
debug
(
"dwxhPushTask 开始时间:{}"
,
InternalUtils
.
getCurrentTime
());
deptLogout
Controller
.
dwxhPush
();
deptLogout
Service
.
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/TestController.java
deleted
100644 → 0
View file @
7a2a3da1
package
net.cdkj.gjj.adapter.controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
value
=
"demo"
)
public
class
TestController
{
@RequestMapping
(
"test"
)
public
String
test
(
String
name
)
{
System
.
out
.
println
(
"内部业务机"
);
return
"hello,hello"
+
name
;
}
}
src/main/java/net/cdkj/gjj/adapter/domain/Json.java
View file @
d6db3561
...
...
@@ -47,15 +47,5 @@ public class Json {
this
.
data
=
data
;
}
@Override
public
String
toString
()
{
return
"Json{"
+
"code="
+
code
+
", message='"
+
message
+
'\''
+
", fields='"
+
fields
+
'\''
+
", data="
+
data
+
'}'
;
}
}
src/main/java/net/cdkj/gjj/adapter/domain/PropertyqUtil.java
View file @
d6db3561
package
net.cdkj.gjj.adapter.domain
;
import
net.cdkj.gjj.adapter.controller.DeptInfoUpdateController
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -14,7 +13,7 @@ import java.util.Properties;
*/
public
class
PropertyqUtil
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DeptInfoUpdateController
.
class
);
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
PropertyqUtil
.
class
);
/**
* 读取 classpath 下 指定的properties配置文件,加载到Properties并返回Properties
...
...
src/main/java/net/cdkj/gjj/adapter/domain/UnitAccountOpeningInformation.java
View file @
d6db3561
...
...
@@ -58,6 +58,16 @@ public class UnitAccountOpeningInformation {
private
String
errmsg
;
private
String
dataStatus
;
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
String
getBusId
()
{
return
busId
;
...
...
@@ -250,34 +260,4 @@ public class UnitAccountOpeningInformation {
public
void
setErrmsg
(
String
errmsg
)
{
this
.
errmsg
=
errmsg
;
}
@Override
public
String
toString
()
{
return
"UnitAccountOpeningInformation{"
+
"ywbh='"
+
ywbh
+
'\''
+
", busId='"
+
busId
+
'\''
+
", uscc='"
+
uscc
+
'\''
+
", entName='"
+
entName
+
'\''
+
", dom='"
+
dom
+
'\''
+
", estDate="
+
estDate
+
", lerep='"
+
lerep
+
'\''
+
", cerType='"
+
cerType
+
'\''
+
", cerNo='"
+
cerNo
+
'\''
+
", operatorName='"
+
operatorName
+
'\''
+
", operatorCerNo='"
+
operatorCerNo
+
'\''
+
", operatorPhone='"
+
operatorPhone
+
'\''
+
", oplocdistrict='"
+
oplocdistrict
+
'\''
+
", unitNature='"
+
unitNature
+
'\''
+
", economicType='"
+
economicType
+
'\''
+
", industryphy='"
+
industryphy
+
'\''
+
", unitPayDay='"
+
unitPayDay
+
'\''
+
", unitDepPro='"
+
unitDepPro
+
'\''
+
", personalDepPro='"
+
personalDepPro
+
'\''
+
", zxdqbm='"
+
zxdqbm
+
'\''
+
", lcls='"
+
lcls
+
'\''
+
", dwzh='"
+
dwzh
+
'\''
+
", errcode='"
+
errcode
+
'\''
+
", errmsg='"
+
errmsg
+
'\''
+
'}'
;
}
}
src/main/java/net/cdkj/gjj/adapter/
controller/DeptInfoUpdateController
.java
→
src/main/java/net/cdkj/gjj/adapter/
service/DeptInfoUpdateService
.java
View file @
d6db3561
package
net.cdkj.gjj.adapter.
controller
;
package
net.cdkj.gjj.adapter.
service
;
import
com.alibaba.druid.pool.DruidDataSource
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
net.cdkj.gjj.adapter.domain.AjaxResult
;
import
net.cdkj.gjj.adapter.domain.BusinessProcessing
;
import
net.cdkj.gjj.adapter.domain.Json
;
import
net.cdkj.gjj.adapter.domain.UnitAccountOpeningInformation
;
import
net.cdkj.gjj.adapter.utils.InternalUtils
;
import
oracle.jdbc.OracleTypes
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
...
...
@@ -34,80 +28,18 @@ import java.util.List;
/**
* 公积金系统服务类
*/
@RestController
@RequestMapping
(
value
=
"/InternalLogic"
)
public
class
DeptInfoUpdateController
{
@Service
public
class
DeptInfoUpdateService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DeptInfoUpdateService
.
class
);
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DeptInfoUpdateController
.
class
);
@Resource
private
RestTemplate
restTemplate
;
@Resource
private
DruidDataSource
druidDataSource
;
@Value
(
"${dwxxbgPullUrl}"
)
private
String
dwxxbgPullUrl
;
@Value
(
"${dwxxbgPushUrl}"
)
private
String
dwxxbgPushUrl
;
@Value
(
"${timetype}"
)
private
String
timetype
;
@Value
(
"${startTime}"
)
private
String
startTime
;
@Value
(
"${endTime}"
)
private
String
endTime
;
/**
* 模拟数据
*
* @return
*/
private
static
String
mockDwxxbgHttp
()
{
List
<
UnitAccountOpeningInformation
>
informationList
=
new
ArrayList
<>();
UnitAccountOpeningInformation
information
=
new
UnitAccountOpeningInformation
();
information
.
setBusId
(
"2"
);
information
.
setUscc
(
"91421122MAC7ANQB8C"
);
information
.
setEntName
(
"红安县永利土石方工程有限公司"
);
information
.
setDom
(
"湖北省黄冈市红安县高桥镇长扬路东端北侧119号"
);
information
.
setLerep
(
"吴永利"
);
information
.
setCerType
(
"10"
);
information
.
setCerNo
(
"422123197810295851"
);
information
.
setOperatorName
(
"吴永利"
);
information
.
setOperatorCerNo
(
"422123197810295851"
);
information
.
setOperatorPhone
(
"13872001037"
);
information
.
setOplocdistrict
(
"421122"
);
information
.
setUnitNature
(
"A313"
);
information
.
setEconomicType
(
"1"
);
information
.
setIndustryphy
(
"E"
);
information
.
setUnitPayDay
(
"1"
);
informationList
.
add
(
information
);
Json
json
=
new
Json
();
json
.
setData
(
informationList
);
String
dwxxbgHttp
=
JSONObject
.
toJSONString
(
json
);
return
dwxxbgHttp
;
}
@Value
(
"${businessProcessing}"
)
private
String
businessProcessing
;
/**
* 公积金系统服务接口内置机调前置机中间接口
*
* @param
* @param
*/
@ResponseBody
@PostMapping
(
"/getDwxxbgHttp"
)
public
String
getDwxxbgHttp
()
{
JSONObject
jsonObject
=
new
JSONObject
();
if
(
"1"
.
equals
(
timetype
))
{
// 表示正式环境
jsonObject
.
put
(
"startTime"
,
InternalUtils
.
currentTime
(
0
));
// 正式环境
jsonObject
.
put
(
"endTime"
,
InternalUtils
.
currentTime
(
24
));
// 正式环境
}
else
if
(
"2"
.
equals
(
timetype
))
{
// 表示测试环境或本地环境
jsonObject
.
put
(
"startTime"
,
startTime
);
// 测试环境或本地环境
jsonObject
.
put
(
"endTime"
,
endTime
);
// 测试环境或本地环境
}
jsonObject
.
put
(
"app_id"
,
"eb453ca78b354f2c9163a703530f5186"
);
jsonObject
.
put
(
"app_secret"
,
"9a31b84878654a72a999e38ef55aa186"
);
String
str
=
jsonObject
.
toString
();
//(测试环境地址)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
String
forObject
=
restTemplate
.
postForObject
(
dwxxbgPullUrl
,
str
,
String
.
class
);
return
forObject
;
}
/**
* (第一个定时的)
...
...
@@ -116,23 +48,10 @@ public class DeptInfoUpdateController {
*
* @return
*/
@ResponseBody
@PostMapping
(
"/dwxxbgPull"
)
public
AjaxResult
dwxxbgPull
()
{
// 1.调用公积金系统服务接口方法,请求前置机,让前置机请求市监接口,拿到市监返回的开户信息json数据,经过前置机zip解压返回给本内置机处理
String
dwxxbgHttp
=
getDwxxbgHttp
();
// String dwxxbgHttp = mockDwxxbgHttp();
log
.
info
(
"拿到第一个接口返回的第三方数据:{}"
,
dwxxbgHttp
);
Json
jsonentity
=
JSONObject
.
parseObject
(
dwxxbgHttp
,
Json
.
class
);
List
<
UnitAccountOpeningInformation
>
bills
=
null
;
if
(!
InternalUtils
.
isNullOrEmpty
(
jsonentity
))
{
bills
=
jsonentity
.
getData
();
}
public
void
deptInfoUpdatePull
(
List
<
UnitAccountOpeningInformation
>
bills
)
{
if
(
CollectionUtils
.
isEmpty
(
bills
))
{
log
.
info
(
"第三方返回的报文中data数据为空!"
);
return
AjaxResult
.
success
(
"第三方返回的报文中data数据为空"
,
null
);
return
;
}
// 2.内置机处理返回的业务数据,调用oracle存储过程
Connection
connection
=
null
;
CallableStatement
dwxxbgImp
=
null
;
...
...
@@ -143,7 +62,9 @@ public class DeptInfoUpdateController {
dwxxbgImp
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWXXBG.DWXXBG_IMP(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}"
);
// 循环插入
for
(
UnitAccountOpeningInformation
uniInfom
:
bills
)
{
if
(!
StringUtils
.
isEmpty
(
uniInfom
.
getOplocdistrict
()))
{
if
(
StringUtils
.
isEmpty
(
uniInfom
.
getOplocdistrict
()))
{
continue
;
}
// 业务标识
String
busId
=
StringUtils
.
hasText
(
uniInfom
.
getBusId
())
?
uniInfom
.
getBusId
()
:
""
;
dwxxbgImp
.
setString
(
1
,
busId
);
...
...
@@ -206,7 +127,6 @@ public class DeptInfoUpdateController {
Thread
.
currentThread
().
sleep
(
2000
);
}
}
}
// 调完第一个存储过程DWXX_IMP之后再调DWKH_SAVE存储过程
dwxxbgSave
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWXXBG.DWXXBG_SAVE()}"
);
dwxxbgSave
.
execute
();
...
...
@@ -223,21 +143,15 @@ public class DeptInfoUpdateController {
throw
new
RuntimeException
(
e
);
}
}
return
AjaxResult
.
success
(
"请求成功"
,
null
);
}
/**
* 住建部门返回公积金办理进度数据接口方法
* (第二个定时)
*
* @param
* @param
*/
@ResponseBody
@PostMapping
(
"/dwxxbgPush"
)
public
String
dwxxbgPush
()
{
public
String
deptInfoUpdatePush
()
{
// 调oracle存储过程拿到进度推进的数据集合
List
<
BusinessProcessing
>
collDwxxbgList
=
collD
wxxbg
();
List
<
BusinessProcessing
>
collDwxxbgList
=
collD
eptInfoUpdate
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"state"
,
"1"
);
if
(!
CollectionUtils
.
isEmpty
(
collDwxxbgList
))
{
...
...
@@ -252,25 +166,22 @@ public class DeptInfoUpdateController {
String
str
=
jsonObject
.
toString
();
//(测试环境)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
String
forObject
=
restTemplate
.
postForObject
(
dwxxbgPushUrl
,
str
,
String
.
class
);
String
forObject
=
restTemplate
.
postForObject
(
businessProcessing
,
str
,
String
.
class
);
log
.
info
(
"前置机返回第三方解压之后的进度推送结果:{}"
,
forObject
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
forObject
);
Integer
value
=
"true"
.
equals
(
jsonObj
.
getString
(
"success"
))
?
1
:
0
;
String
uscc
=
!
CollectionUtils
.
isEmpty
(
collDwxxbgList
)
?
collDwxxbgList
.
get
(
0
).
getUscc
()
:
""
;
log
.
info
(
"入参 uscc:{} value:{}"
,
uscc
,
value
);
collDwxxbgHx
(
uscc
,
value
);
// 回写
collDeptInfoUpdateRewrite
(
uscc
,
value
);
return
forObject
;
}
/**
* 住建部门返回公积金办理进度数据接口方法
* 调用oracle存储过程拿到进度数据,然后请求前置机,让前置机请求市监接口,将办理的进度数据推送给市监
*
* @return
*/
@ResponseBody
@PostMapping
(
"/collDwxxbg"
)
public
List
<
BusinessProcessing
>
collDwxxbg
()
{
public
List
<
BusinessProcessing
>
collDeptInfoUpdate
()
{
List
<
BusinessProcessing
>
list
=
new
ArrayList
<>();
Connection
connection
=
null
;
CallableStatement
dwxxbgCx
=
null
;
...
...
@@ -338,7 +249,10 @@ public class DeptInfoUpdateController {
}
public
void
collDwxxbgHx
(
String
uscc
,
Integer
value
)
{
/**
* 单位变更回写
*/
public
void
collDeptInfoUpdateRewrite
(
String
uscc
,
Integer
value
)
{
Connection
connection
=
null
;
CallableStatement
pstm
=
null
;
// 1.调用oracle存储过程,拿到业务办理进度数据
...
...
@@ -363,4 +277,5 @@ public class DeptInfoUpdateController {
}
}
}
src/main/java/net/cdkj/gjj/adapter/
controller/DeptLogoutController
.java
→
src/main/java/net/cdkj/gjj/adapter/
service/DeptLogoutService
.java
View file @
d6db3561
package
net.cdkj.gjj.adapter.
controller
;
package
net.cdkj.gjj.adapter.
service
;
import
com.alibaba.druid.pool.DruidDataSource
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
net.cdkj.gjj.adapter.domain.AjaxResult
;
import
net.cdkj.gjj.adapter.domain.BusinessProcessing
;
import
net.cdkj.gjj.adapter.domain.Json
;
import
net.cdkj.gjj.adapter.domain.UnitAccountOpeningInformation
;
import
net.cdkj.gjj.adapter.utils.InternalUtils
;
import
oracle.jdbc.OracleTypes
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
...
...
@@ -34,70 +28,17 @@ import java.util.List;
/**
* 公积金系统服务类
*/
@RestController
@RequestMapping
(
value
=
"/InternalLogic"
)
public
class
DeptLogoutController
{
@Service
public
class
DeptLogoutService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DeptLogout
Controller
.
class
);
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DeptLogout
Service
.
class
);
@Resource
private
RestTemplate
restTemplate
;
@Resource
private
DruidDataSource
druidDataSource
;
@Value
(
"${dwxhPullUrl}"
)
private
String
dwxhPullUrl
;
@Value
(
"${dwxhPushUrl}"
)
private
String
dwxhPushUrl
;
@Value
(
"${timetype}"
)
private
String
timetype
;
@Value
(
"${startTime}"
)
private
String
startTime
;
@Value
(
"${endTime}"
)
private
String
endTime
;
@Value
(
"${businessProcessing}"
)
private
String
businessProcessing
;
/**
* 模拟数据
*
* @return
*/
private
static
String
mockDwxhHttp
()
{
List
<
UnitAccountOpeningInformation
>
informationList
=
new
ArrayList
<>();
UnitAccountOpeningInformation
information
=
new
UnitAccountOpeningInformation
();
information
.
setBusId
(
"2"
);
information
.
setUscc
(
"91421122MAC7ANQB8C"
);
information
.
setEntName
(
"红安县永利土石方工程有限公司"
);
information
.
setDom
(
"湖北省黄冈市红安县高桥镇长扬路东端北侧119号"
);
information
.
setOplocdistrict
(
"421122"
);
informationList
.
add
(
information
);
Json
json
=
new
Json
();
json
.
setData
(
informationList
);
String
dwxhHttp
=
JSONObject
.
toJSONString
(
json
);
return
dwxhHttp
;
}
/**
* 公积金系统服务接口内置机调前置机中间接口
*
* @param
* @param
*/
@ResponseBody
@PostMapping
(
"/getDwxhHttp"
)
public
String
getDwxhHttp
()
{
JSONObject
jsonObject
=
new
JSONObject
();
if
(
"1"
.
equals
(
timetype
))
{
// 表示正式环境
jsonObject
.
put
(
"startTime"
,
InternalUtils
.
currentTime
(
0
));
// 正式环境
jsonObject
.
put
(
"endTime"
,
InternalUtils
.
currentTime
(
24
));
// 正式环境
}
else
if
(
"2"
.
equals
(
timetype
))
{
// 表示测试环境或本地环境
jsonObject
.
put
(
"startTime"
,
startTime
);
// 测试环境或本地环境
jsonObject
.
put
(
"endTime"
,
endTime
);
// 测试环境或本地环境
}
jsonObject
.
put
(
"app_id"
,
"eb453ca78b354f2c9163a703530f5186"
);
jsonObject
.
put
(
"app_secret"
,
"9a31b84878654a72a999e38ef55aa186"
);
String
str
=
jsonObject
.
toString
();
//(测试环境地址)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
String
forObject
=
restTemplate
.
postForObject
(
dwxhPullUrl
,
str
,
String
.
class
);
return
forObject
;
}
/**
* (第一个定时的)
...
...
@@ -106,22 +47,10 @@ public class DeptLogoutController {
*
* @return
*/
@ResponseBody
@PostMapping
(
"/dwxhPull"
)
public
AjaxResult
dwxhPull
()
{
// 1.调用公积金系统服务接口方法,请求前置机,让前置机请求市监接口,拿到市监返回的开户信息json数据,经过前置机zip解压返回给本内置机处理
String
dwxhHttp
=
getDwxhHttp
();
log
.
info
(
"拿到第一个接口返回的第三方数据:{}"
,
dwxhHttp
);
Json
jsonentity
=
JSONObject
.
parseObject
(
dwxhHttp
,
Json
.
class
);
List
<
UnitAccountOpeningInformation
>
bills
=
null
;
if
(!
InternalUtils
.
isNullOrEmpty
(
jsonentity
))
{
bills
=
jsonentity
.
getData
();
}
public
void
deptLogoutPull
(
List
<
UnitAccountOpeningInformation
>
bills
)
{
if
(
CollectionUtils
.
isEmpty
(
bills
))
{
log
.
info
(
"第三方返回的报文中data数据为空!"
);
return
AjaxResult
.
success
(
"第三方返回的报文中data数据为空"
,
null
);
return
;
}
// 2.内置机处理返回的业务数据,调用oracle存储过程
Connection
connection
=
null
;
CallableStatement
dwxhImp
=
null
;
...
...
@@ -132,7 +61,9 @@ public class DeptLogoutController {
dwxhImp
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWXH.DWXH_IMP(?, ?, ?, ?, ?, ?, ?)}"
);
// 循环插入
for
(
UnitAccountOpeningInformation
uniInfom
:
bills
)
{
if
(!
StringUtils
.
isEmpty
(
uniInfom
.
getOplocdistrict
()))
{
if
(
StringUtils
.
isEmpty
(
uniInfom
.
getOplocdistrict
()))
{
continue
;
}
// 业务标识
String
busId
=
StringUtils
.
hasText
(
uniInfom
.
getBusId
())
?
uniInfom
.
getBusId
()
:
""
;
dwxhImp
.
setString
(
1
,
busId
);
...
...
@@ -165,7 +96,6 @@ public class DeptLogoutController {
Thread
.
currentThread
().
sleep
(
2000
);
}
}
}
// 调完第一个存储过程DWXX_IMP之后再调DWKH_SAVE存储过程
dwxhSave
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWXH.DWXH_SAVE()}"
);
dwxhSave
.
execute
();
...
...
@@ -182,18 +112,12 @@ public class DeptLogoutController {
throw
new
RuntimeException
(
e
);
}
}
return
AjaxResult
.
success
(
"请求成功"
,
null
);
}
/**
* 住建部门返回公积金办理进度数据接口方法
* (第二个定时)
*
* @param
* @param
*/
@ResponseBody
@PostMapping
(
"/dwxhPush"
)
public
String
dwxhPush
()
{
// 调oracle存储过程拿到进度推进的数据集合
List
<
BusinessProcessing
>
collDwxhList
=
collDwxh
();
...
...
@@ -211,12 +135,13 @@ public class DeptLogoutController {
String
str
=
jsonObject
.
toString
();
//(测试环境)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
String
forObject
=
restTemplate
.
postForObject
(
dwxhPushUrl
,
str
,
String
.
class
);
String
forObject
=
restTemplate
.
postForObject
(
businessProcessing
,
str
,
String
.
class
);
log
.
info
(
"前置机返回第三方解压之后的进度推送结果:{}"
,
forObject
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
forObject
);
Integer
value
=
"true"
.
equals
(
jsonObj
.
getString
(
"success"
))
?
1
:
0
;
String
uscc
=
!
CollectionUtils
.
isEmpty
(
collDwxhList
)
?
collDwxhList
.
get
(
0
).
getUscc
()
:
""
;
log
.
info
(
"入参 uscc:{} value:{}"
,
uscc
,
value
);
// 回写
collDwxhHx
(
uscc
,
value
);
return
forObject
;
}
...
...
@@ -224,11 +149,7 @@ public class DeptLogoutController {
/**
* 住建部门返回公积金办理进度数据接口方法
* 调用oracle存储过程拿到进度数据,然后请求前置机,让前置机请求市监接口,将办理的进度数据推送给市监
*
* @return
*/
@ResponseBody
@PostMapping
(
"/collDwxh"
)
public
List
<
BusinessProcessing
>
collDwxh
()
{
List
<
BusinessProcessing
>
list
=
new
ArrayList
<>();
Connection
connection
=
null
;
...
...
@@ -297,6 +218,9 @@ public class DeptLogoutController {
}
/**
* 回写
*/
public
void
collDwxhHx
(
String
uscc
,
Integer
value
)
{
Connection
connection
=
null
;
CallableStatement
pstm
=
null
;
...
...
src/main/java/net/cdkj/gjj/adapter/
controller/ProvidentFundServicesController
.java
→
src/main/java/net/cdkj/gjj/adapter/
service/OpenAccountService
.java
View file @
d6db3561
This diff is collapsed.
Click to expand it.
src/main/resources/application.properties
View file @
d6db3561
...
...
@@ -24,20 +24,11 @@ password:ENC(PI2/xdOsEObL0YZlfGfQnyiJeYUw/90FePU+sO4EDjU=)
# 前置服务URL
#单位
开户
拉取url
dwkhPullUrl
:
http://127.0.0.1:8081/FrontEndProcessor/ProvidentFundServices
#
单位开户
推送url
dwkhPushUrl
:
http://127.0.0.1:8081/FrontEndProcessor/BusinessProcessing
#单位
信息
拉取url
providentFundServices
:
http://127.0.0.1:8081/FrontEndProcessor/ProvidentFundServices
#
办理进度
推送url
businessProcessing
:
http://127.0.0.1:8081/FrontEndProcessor/BusinessProcessing
#单位信息变跟拉取url
dwxxbgPullUrl
:
http://127.0.0.1:8081/FrontEndProcessor/dwxxbgPull
#单位信息变跟推送url
dwxxbgPushUrl
:
http://127.0.0.1:8081/FrontEndProcessor/dwxxbgPush
#单位销户拉取url
dwxhPullUrl
:
http://127.0.0.1:8081/FrontEndProcessor/dwxhPull
#单位销户推送url
dwxhPushUrl
:
http://127.0.0.1:8081/FrontEndProcessor/dwxhPush
...
...
@@ -45,9 +36,7 @@ dwxhPushUrl:http://127.0.0.1:8081/FrontEndProcessor/dwxhPush
dwkhPullTaskDelay
:
60000
dwkhPushTaskDelay
:
60000
dwxxbgPushTaskDelay
:
60000
dwxxbgPullTaskDelay
:
60000
dwxhPushTaskDelay
:
60000
dwxhPullTaskDelay
:
60000
# 日志配置
logging.config
:
classpath:logback.xml
...
...
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