Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
a2269f48
Commit
a2269f48
authored
Mar 07, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
明细接口改造
parent
6fd44dcf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
72 deletions
+55
-72
EkpFundInfoServiceImpl.java
...loud/plus/v1/ekp/service/impl/EkpFundInfoServiceImpl.java
+8
-6
EkpSocialInfoServiceImpl.java
...ud/plus/v1/ekp/service/impl/EkpSocialInfoServiceImpl.java
+9
-7
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+38
-59
No files found.
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpFundInfoServiceImpl.java
View file @
a2269f48
...
...
@@ -179,12 +179,14 @@ public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFu
fundInfoList
.
add
(
fundInfo
);
paymentIds
.
add
(
fundParam
.
getFd_3b0afbaf10df2c
());
}
boolean
flag
=
this
.
saveBatch
(
fundInfoList
);
if
(
flag
)
{
//推送成功更新明细状态
EkpSocialPushInfoVo
pushInfoVo
=
new
EkpSocialPushInfoVo
();
pushInfoVo
.
setPaymentIds
(
paymentIds
);
return
pushInfoVo
;
if
(!
fundInfoList
.
isEmpty
())
{
boolean
flag
=
this
.
saveBatch
(
fundInfoList
);
if
(
flag
)
{
//推送成功更新明细状态
EkpSocialPushInfoVo
pushInfoVo
=
new
EkpSocialPushInfoVo
();
pushInfoVo
.
setPaymentIds
(
paymentIds
);
return
pushInfoVo
;
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"公积金明细推送失败"
);
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpSocialInfoServiceImpl.java
View file @
a2269f48
...
...
@@ -194,13 +194,15 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
paymentIds
.
add
(
socialParam
.
getFd_3b0afbe1f94a08
());
}
}
boolean
flag
=
this
.
saveBatch
(
socialInfoList
);
if
(
flag
)
{
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo
pushInfoVo
=
new
EkpSocialPushInfoVo
();
pushInfoVo
.
setUnPushInfo
(
socialPushList
);
pushInfoVo
.
setPaymentIds
(
paymentIds
);
return
pushInfoVo
;
if
(!
socialInfoList
.
isEmpty
())
{
boolean
flag
=
this
.
saveBatch
(
socialInfoList
);
if
(
flag
)
{
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo
pushInfoVo
=
new
EkpSocialPushInfoVo
();
pushInfoVo
.
setUnPushInfo
(
socialPushList
);
pushInfoVo
.
setPaymentIds
(
paymentIds
);
return
pushInfoVo
;
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"社保明细推送失败"
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
a2269f48
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.social.util;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
...
...
@@ -1120,6 +1121,13 @@ public class DoJointSocialTask {
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
//预估
socialParam
.
setYgFlag
(
CommonConstants
.
ONE_STRING
);
//缴纳地拼接
StringBuilder
adress
=
new
StringBuilder
();
adress
.
append
(
null
!=
library
.
getSocialProvince
()
?
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_LABEL
+
library
.
getSocialProvince
())
:
""
)
.
append
(
null
!=
library
.
getSocialCity
()
?
"_"
+
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_LABEL
+
library
.
getSocialCity
())
:
""
)
.
append
(
null
!=
library
.
getSocialTown
()
?
"_"
+
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_LABEL
+
library
.
getSocialTown
())
:
""
);
socialParam
.
setFd_3b5cc58d1a70fe
(
adress
.
toString
());
insertList
.
add
(
socialParam
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushSocialInfoToEkp
(
insertList
);
...
...
@@ -1170,9 +1178,9 @@ public class DoJointSocialTask {
log
.
info
(
"推送公积金预估费用到EKP-线程开始"
);
TSettleDomain
settleDomain
;
EkpPushFundParam
fundParam
;
List
<
EkpPushFundParam
>
param
List
=
new
ArrayList
<>();
for
(
TForecastLibrary
library
:
unPushInfo
)
{
try
{
List
<
EkpPushFundParam
>
insert
List
=
new
ArrayList
<>();
try
{
for
(
TForecastLibrary
library
:
unPushInfo
)
{
//获取项目信息
settleDomain
=
selectVoMap
.
get
(
library
.
getDeptNo
());
if
(
Common
.
isEmpty
(
settleDomain
))
{
...
...
@@ -1292,70 +1300,41 @@ public class DoJointSocialTask {
fundParam
.
setFd_3b0afbaf10df2c
(
library
.
getId
());
// 薪酬申请编号
fundParam
.
setFd_3b3cabde83d1d0
(
CommonConstants
.
EMPTY_STRING
);
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
paramList
.
add
(
fundParam
);
}
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
library
.
setDataPush
(
CommonConstants
.
ONE_INT
);
forecastLibraryMapper
.
updateById
(
library
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
//缴纳地拼接
StringBuilder
adress
=
new
StringBuilder
();
adress
.
append
(
null
!=
library
.
getFundProvince
()
?
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_LABEL
+
library
.
getFundProvince
())
:
""
)
.
append
(
null
!=
library
.
getFundCity
()
?
"_"
+
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_LABEL
+
library
.
getFundCity
())
:
""
)
.
append
(
null
!=
library
.
getFundTown
()
?
"_"
+
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_LABEL
+
library
.
getFundTown
())
:
""
);
fundParam
.
setFd_3b5cc487bb46fa
(
adress
.
toString
());
insertList
.
add
(
fundParam
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushFundInfoToEkp
(
insertList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
List
<
String
>
idList
=
vo
.
getPaymentIds
();
forecastLibraryMapper
.
updatePushStatus
(
idList
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
e
.
getMessage
()
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
)
.
getId
());
error
.
setTitle
(
"公积金预估明细批量保存失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送公积金预估费用到EKP错误"
,
e
);
}
}
//推送失败的数据重新推送
if
(!
paramList
.
isEmpty
())
{
for
(
EkpPushFundParam
s:
paramList
)
{
try
{
String
body
=
ekpFundUtil
.
sendToEKP
(
s
);
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
TForecastLibrary
library
=
forecastLibraryMapper
.
selectById
(
s
.
getFd_3b0afbaf10df2c
());
library
.
setDataPush
(
CommonConstants
.
ONE_INT
);
forecastLibraryMapper
.
updateById
(
library
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
s
.
getFd_3b0afbaf10df2c
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
s
.
getFd_3b0afbaf10df2c
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送公积金预估费用到EKP错误"
,
e
);
}
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送公积金预估费用到EKP错误"
,
e
);
}
log
.
info
(
"推送公积金预估费用到EKP结束"
);
}
...
...
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