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
0cc9adcd
Commit
0cc9adcd
authored
Mar 06, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
明细接口改造
parent
1a174203
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
184 additions
and
193 deletions
+184
-193
EkpSocialInfo.java
...java/com/yifu/cloud/plus/v1/ekp/entity/EkpSocialInfo.java
+3
-3
EkpSocialInfoServiceImpl.java
...ud/plus/v1/ekp/service/impl/EkpSocialInfoServiceImpl.java
+154
-138
EkpSocialInfoMapper.xml
...ekp-biz/src/main/resources/mapper/EkpSocialInfoMapper.xml
+2
-1
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+25
-51
No files found.
yifu-ekp/yifu-ekp-api/src/main/java/com/yifu/cloud/plus/v1/ekp/entity/EkpSocialInfo.java
View file @
0cc9adcd
...
...
@@ -44,11 +44,11 @@ public class EkpSocialInfo {
private
String
fd_3adfe8c7e4cf7a
;
private
Date
fd_3adfe8cb96c41e
;
private
String
fd_3adfe8cb96c41e
;
private
Date
fd_3adfe8cf632700
;
private
String
fd_3adfe8cf632700
;
private
Date
fd_3adfe8cff746bc
;
private
String
fd_3adfe8cff746bc
;
private
Double
fd_3adfeb4e8064a8
;
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpSocialInfoServiceImpl.java
View file @
0cc9adcd
...
...
@@ -53,153 +53,158 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
map
=
deptInfoVoList
.
stream
().
collect
(
Collectors
.
toMap
(
EkpDeptInfoVo:
:
getDeptNo
,
k
->
k
));
}
EkpSocialInfo
socialCount
;
for
(
EkpPushSocialParam
socialParam
:
unPushList
)
{
//去重 防止重复推送
socialCount
=
baseMapper
.
selectOne
(
Wrappers
.<
EkpSocialInfo
>
query
().
lambda
()
.
eq
(
EkpSocialInfo:
:
getFd_3b0b716e771e06
,
socialParam
.
getFd_3b0afbe1f94a08
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
socialCount
).
isPresent
())
{
continue
;
}
EkpSocialInfo
socialInfo
=
new
EkpSocialInfo
();
//对象信息赋值
copySocialProperties
(
socialParam
,
socialInfo
);
//社保信息
deptInfo
=
map
.
get
(
socialInfo
.
getFd_3adfe8c70d3fd4
());
socialInfo
.
setFd_3b16e2f436ff98_text
(
deptInfo
.
getDeptName
());
socialInfo
.
setFd_3b16e2f436ff98
(
deptInfo
.
getFdId
());
//实际结算月份
if
(
"生成月本月数据"
.
equals
(
deptInfo
.
getSocialType
())){
socialInfo
.
setFd_3adfe8cff746bc
(
socialInfo
.
getFd_3adfe8cb96c41e
());
}
else
if
(
"生成月上月数据"
.
equals
(
deptInfo
.
getSocialType
())){
socialInfo
.
setFd_3adfe8cff746bc
(
DateUtil
.
stringToDate
(
DateUtil
.
dateToString
(
DateUtil
.
addMonthByDate
(
socialInfo
.
getFd_3adfe8cb96c41e
(),-
1
)),
"yyyy-MM"
));
}
else
if
(
"生成月次月数据"
.
equals
(
deptInfo
.
getSocialType
())){
socialInfo
.
setFd_3adfe8cff746bc
(
DateUtil
.
stringToDate
(
DateUtil
.
dateToString
(
DateUtil
.
addMonthByDate
(
socialInfo
.
getFd_3adfe8cb96c41e
(),
1
)),
"yyyy-MM"
));
}
//是否全部结算
if
(
"全量未结算数据"
.
equals
(
deptInfo
.
getSocialType
())){
socialInfo
.
setFd_3b1354c3add8c2
(
CommonConstants
.
IS_TRUE
);
}
else
{
socialInfo
.
setFd_3b1354c3add8c2
(
CommonConstants
.
IS_FALSE
);
}
//获取社保订单明细合计
socialSumInfo
=
baseMapper
.
getCostSumInfo
(
socialInfo
.
getFd_3adfe8c7e4cf7a
(),
DateUtil
.
dateToString
(
socialInfo
.
getFd_3adfe8cb96c41e
(),
"yyyy-MM"
));
//预估合计
Double
ygSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgSum
();
//预估个人合计
Double
ygPersonSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgPersonSum
();
//实缴合计
Double
sjSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjSum
();
//预估单位合计
Double
ygDwSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgDwSum
();
//实缴单位合计
Double
sjDwSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjDwSum
();
//实缴个人合计
Double
sjPersonSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjPersonSum
();
//应收
Double
ys
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYs
();
//个人应收
Double
personYs
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getPersonYs
();
//单位应收
Double
dwYs
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getDwYs
();
//单位差异
if
(
"是"
.
equals
(
socialInfo
.
getFd_3add9de0be85e4
())
&&
"实缴"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
//单位差异
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(预估单位合计)$)
socialInfo
.
setFd_3adfeb53c70f72
(
Double
.
sum
(
Double
.
sum
(
sjDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),-
ygDwSum
));
//个人差异
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(预估个人合计)$)
socialInfo
.
setFd_3adfeb5413fb44
(
Double
.
sum
(
Double
.
sum
(
sjPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),-
ygPersonSum
));
}
try
{
for
(
EkpPushSocialParam
socialParam
:
unPushList
)
{
//去重 防止重复推送
socialCount
=
baseMapper
.
selectOne
(
Wrappers
.<
EkpSocialInfo
>
query
().
lambda
()
.
eq
(
EkpSocialInfo:
:
getFd_3b0b716e771e06
,
socialParam
.
getFd_3b0afbe1f94a08
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
socialCount
).
isPresent
())
{
continue
;
}
EkpSocialInfo
socialInfo
=
new
EkpSocialInfo
();
//对象信息赋值
copySocialProperties
(
socialParam
,
socialInfo
);
//Fd_3adfeb7b624f06应收;Fd_3b35a57aee1428个人应收;fd_3b35a57b6e9d0a单位应收
if
(
"是"
.
equals
(
deptInfo
.
getIsBpo
())){
//社保信息
deptInfo
=
map
.
get
(
socialInfo
.
getFd_3adfe8c70d3fd4
());
socialInfo
.
setFd_3b16e2f436ff98_text
(
deptInfo
.
getDeptName
());
socialInfo
.
setFd_3b16e2f436ff98
(
deptInfo
.
getFdId
());
//实际结算月份
if
(
"生成月本月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
socialInfo
.
setFd_3adfe8cff746bc
(
dateStringInsert
(
socialInfo
.
getFd_3adfe8cb96c41e
()));
}
else
if
(
"生成月上月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
socialInfo
.
setFd_3adfe8cff746bc
(
DateUtil
.
dateToString
(
DateUtil
.
addMonthByDate
(
DateUtil
.
parseDate
(
socialInfo
.
getFd_3adfe8cb96c41e
(),
"yyyyMM"
),
-
1
),
"yyyy-MM"
));
}
else
if
(
"生成月次月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
socialInfo
.
setFd_3adfe8cff746bc
(
DateUtil
.
dateToString
(
DateUtil
.
addMonthByDate
(
DateUtil
.
parseDate
(
socialInfo
.
getFd_3adfe8cb96c41e
(),
"yyyyMM"
),
1
),
"yyyy-MM"
));
}
//是否全部结算
if
(
"全量未结算数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
socialInfo
.
setFd_3b1354c3add8c2
(
CommonConstants
.
IS_TRUE
);
}
else
{
socialInfo
.
setFd_3b1354c3add8c2
(
CommonConstants
.
IS_FALSE
);
}
//获取社保订单明细合计
socialSumInfo
=
baseMapper
.
getCostSumInfo
(
socialInfo
.
getFd_3adfe8c7e4cf7a
(),
socialInfo
.
getFd_3adfe8cb96c41e
());
//预估合计
Double
ygSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgSum
();
//预估个人合计
Double
ygPersonSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgPersonSum
();
//实缴合计
Double
sjSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjSum
();
//预估单位合计
Double
ygDwSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgDwSum
();
//实缴单位合计
Double
sjDwSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjDwSum
();
//实缴个人合计
Double
sjPersonSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjPersonSum
();
//应收
socialInfo
.
setFd_3adfeb7b624f06
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
()
);
Double
ys
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYs
(
);
//个人应收
socialInfo
.
setFd_3b35a57aee1428
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
()
);
Double
personYs
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getPersonYs
(
);
//单位应收
socialInfo
.
setFd_3b35a57b6e9d0a
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
}
else
{
if
(
"实缴"
.
equals
(
deptInfo
.
getSettleType
())){
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
ygSum
,
socialInfo
.
getFd_3af9f2883941b4
()),-
ys
));
//$列表.求总和$($社保订单明细*总数(预估个人合计)$) + $预估个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
ygPersonSum
,
socialInfo
.
getFd_3af9f285ee1e38
()),-
personYs
));
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
ygDwSum
,
socialInfo
.
getFd_3adfeb4e8064a8
()),-
dwYs
));
}
else
{
if
(
ygSum
>
0
){
//应收
socialInfo
.
setFd_3adfeb7b624f06
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//个人应收
socialInfo
.
setFd_3b35a57aee1428
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//单位应收
socialInfo
.
setFd_3b35a57b6e9d0a
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
}
else
{
Double
dwYs
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getDwYs
();
//单位差异
if
(
"是"
.
equals
(
socialInfo
.
getFd_3add9de0be85e4
())
&&
"实缴"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
()))
{
//单位差异
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(预估单位合计)$)
socialInfo
.
setFd_3adfeb53c70f72
(
Double
.
sum
(
Double
.
sum
(
sjDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),
-
ygDwSum
));
//个人差异
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(预估个人合计)$)
socialInfo
.
setFd_3adfeb5413fb44
(
Double
.
sum
(
Double
.
sum
(
sjPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),
-
ygPersonSum
));
}
//Fd_3adfeb7b624f06应收;Fd_3b35a57aee1428个人应收;fd_3b35a57b6e9d0a单位应收
if
(
"是"
.
equals
(
deptInfo
.
getIsBpo
()))
{
//应收
socialInfo
.
setFd_3adfeb7b624f06
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//个人应收
socialInfo
.
setFd_3b35a57aee1428
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//单位应收
socialInfo
.
setFd_3b35a57b6e9d0a
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
}
else
{
if
(
"实缴"
.
equals
(
deptInfo
.
getSettleType
()))
{
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
()))
{
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
ygSum
,
socialInfo
.
getFd_3af9f2883941b4
()),
-
ys
));
//$列表.求总和$($社保订单明细*总数(预估个人合计)$) + $预估个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
ygPersonSum
,
socialInfo
.
getFd_3af9f285ee1e38
()),
-
personYs
));
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
ygDwSum
,
socialInfo
.
getFd_3adfeb4e8064a8
()),
-
dwYs
));
}
else
{
if
(
ygSum
>
0
)
{
//应收
socialInfo
.
setFd_3adfeb7b624f06
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//个人应收
socialInfo
.
setFd_3b35a57aee1428
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//单位应收
socialInfo
.
setFd_3b35a57b6e9d0a
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
}
else
{
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
sjSum
,
socialInfo
.
getFd_3af9f3059e5b9c
()),
-
ys
));
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
sjPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),
-
personYs
));
//列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
sjDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),
-
dwYs
));
}
}
}
else
{
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
()))
{
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$-$列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
ygSum
,
socialInfo
.
getFd_3af9f2883941b4
()),
-
ys
));
//$列表.求总和$( $社保订单明细*总数(预估个人合计)$) + $预估个人合计$-$列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
ygPersonSum
,
socialInfo
.
getFd_3af9f285ee1e38
()),
-
personYs
));
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$-$列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
ygDwSum
,
socialInfo
.
getFd_3adfeb4e8064a8
()),
-
dwYs
));
}
else
{
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
sjSum
,
socialInfo
.
getFd_3af9f3059e5b9c
()),
-
ys
));
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
sjSum
,
socialInfo
.
getFd_3af9f3059e5b9c
()),
-
ys
));
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
sjPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),
-
personYs
));
//列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
sjDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),
-
dwYs
));
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
sjPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),
-
personYs
));
//
$
列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
sjDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),
-
dwYs
));
}
}
}
else
{
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$-$列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
ygSum
,
socialInfo
.
getFd_3af9f2883941b4
()),-
ys
));
//$列表.求总和$( $社保订单明细*总数(预估个人合计)$) + $预估个人合计$-$列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
ygPersonSum
,
socialInfo
.
getFd_3af9f285ee1e38
()),-
personYs
));
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$-$列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
ygDwSum
,
socialInfo
.
getFd_3adfeb4e8064a8
()),-
dwYs
));
}
else
{
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
sjSum
,
socialInfo
.
getFd_3af9f3059e5b9c
()),-
ys
));
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
sjPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),-
personYs
));
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
sjDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),-
dwYs
));
}
}
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
()))
{
//应支出
socialInfo
.
setFd_3adfeb7bd97464
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//个人应支
socialInfo
.
setFd_3b35a5b03100c4
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//单位应支
socialInfo
.
setFd_3b35a5b0b04d54
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
}
else
{
//应支出
socialInfo
.
setFd_3adfeb7bd97464
(
socialInfo
.
getFd_3af9f3059e5b9c
());
//个人应支
socialInfo
.
setFd_3b35a5b03100c4
(
socialInfo
.
getFd_3af9f303037214
());
//单位应支
socialInfo
.
setFd_3b35a5b0b04d54
(
socialInfo
.
getFd_3af9f2e9208e4e
());
}
//创建时间
socialInfo
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
socialInfoList
.
add
(
socialInfo
);
TPaymentSocialPush
a
=
new
TPaymentSocialPush
();
a
.
setPaymentIds
(
socialParam
.
getSocialIds
());
a
.
setId
(
socialParam
.
getFd_3b0afbe1f94a08
());
socialPushList
.
add
(
a
);
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialParam
.
getYgFlag
()))
{
paymentIds
.
add
(
socialParam
.
getSocialIds
());
}
else
{
paymentIds
.
add
(
socialParam
.
getFd_3b0afbe1f94a08
());
}
}
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
//应支出
socialInfo
.
setFd_3adfeb7bd97464
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//个人应支
socialInfo
.
setFd_3b35a5b03100c4
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//单位应支
socialInfo
.
setFd_3b35a5b0b04d54
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
}
else
{
//应支出
socialInfo
.
setFd_3adfeb7bd97464
(
socialInfo
.
getFd_3af9f3059e5b9c
());
//个人应支
socialInfo
.
setFd_3b35a5b03100c4
(
socialInfo
.
getFd_3af9f303037214
());
//单位应支
socialInfo
.
setFd_3b35a5b0b04d54
(
socialInfo
.
getFd_3af9f2e9208e4e
());
}
//创建时间
socialInfo
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
socialInfoList
.
add
(
socialInfo
);
TPaymentSocialPush
a
=
new
TPaymentSocialPush
();
a
.
setPaymentIds
(
socialParam
.
getSocialIds
());
a
.
setId
(
socialParam
.
getFd_3b0afbe1f94a08
());
socialPushList
.
add
(
a
);
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialParam
.
getYgFlag
()))
{
paymentIds
.
add
(
socialParam
.
getSocialIds
());
}
else
{
paymentIds
.
add
(
socialParam
.
getFd_3b0afbe1f94a08
());
boolean
flag
=
this
.
saveBatch
(
socialInfoList
);
if
(
flag
)
{
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo
pushInfoVo
=
new
EkpSocialPushInfoVo
();
pushInfoVo
.
setUnPushInfo
(
socialPushList
);
pushInfoVo
.
setPaymentIds
(
paymentIds
);
return
pushInfoVo
;
}
}
boolean
flag
=
this
.
saveBatch
(
socialInfoList
);
if
(
flag
)
{
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo
pushInfoVo
=
new
EkpSocialPushInfoVo
();
pushInfoVo
.
setUnPushInfo
(
socialPushList
);
pushInfoVo
.
setPaymentIds
(
paymentIds
);
return
pushInfoVo
;
}
catch
(
Exception
e
)
{
log
.
error
(
"社保明细推送失败"
);
return
null
;
}
return
null
;
}
...
...
@@ -234,9 +239,9 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
//我司到款单位
socialInfo
.
setFd_3b0194c7336de0
(
socialParam
.
getFd_3b01953871b8be
());
//生成月份
socialInfo
.
setFd_3adfe8cb96c41e
(
DateUtil
.
stringToDate
(
socialParam
.
getFd_3adfe8cb96c41e
(),
"yyyy-MM"
));
socialInfo
.
setFd_3adfe8cb96c41e
(
socialParam
.
getFd_3adfe8cb96c41e
(
));
//缴纳月份
socialInfo
.
setFd_3adfe8cf632700
(
DateUtil
.
stringToDate
(
socialParam
.
getFd_3adfe8cf632700
(),
"yyyy-MM"
));
socialInfo
.
setFd_3adfe8cf632700
(
socialParam
.
getFd_3adfe8cf632700
(
));
//社保ID
socialInfo
.
setFd_3b0b716e771e06
(
socialParam
.
getFd_3b0afbe1f94a08
());
//薪酬申请编号
...
...
@@ -313,4 +318,15 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
socialInfo
.
setFd_3add9eed23894a
(
"未付"
);
}
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public
String
dateStringInsert
(
String
month
)
{
StringBuilder
sb
=
new
StringBuilder
(
month
);
sb
.
insert
(
4
,
"-"
);
return
sb
.
toString
();
}
}
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpSocialInfoMapper.xml
View file @
0cc9adcd
...
...
@@ -112,6 +112,7 @@
round(sum(ifnull(fd_3b35a5b03100c4,0)),2) as personYzc,
round(sum(ifnull(fd_3b35a5b0b04d54,0)),2) as dwYzc
from ekp_social_info
where fd_3adfe8c7e4cf7a = #{card} and
DATE_FORMAT(fd_3adfe8cb96c41e,'%Y-%m')
= #{month}
where fd_3adfe8c7e4cf7a = #{card} and
fd_3adfe8cb96c41e
= #{month}
</select>
</mapper>
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
0cc9adcd
...
...
@@ -487,7 +487,7 @@ public class DoJointSocialTask {
}
//社保生成月份
if
(
Common
.
isNotNull
(
library
.
getSocialCreateMonth
()))
{
socialParam
.
setFd_3adfe8cb96c41e
(
dateStringInsert
(
library
.
getSocialCreateMonth
()
));
socialParam
.
setFd_3adfe8cb96c41e
(
library
.
getSocialCreateMonth
(
));
}
else
{
socialParam
.
setFd_3adfe8cb96c41e
(
CommonConstants
.
EMPTY_STRING
);
}
...
...
@@ -718,8 +718,8 @@ public class DoJointSocialTask {
TSettleDomain
settleDomain
;
EkpPushFundParam
fundParam
;
List
<
EkpPushFundParam
>
paramList
=
new
ArrayList
<>();
for
(
TPaymentInfo
library
:
unPushInfo
)
{
try
{
try
{
for
(
TPaymentInfo
library
:
unPushInfo
)
{
//获取项目信息
if
(
Common
.
isNotNull
(
mapSelectVo
))
{
settleDomain
=
mapSelectVo
.
get
(
library
.
getSettleDomainCode
());
...
...
@@ -837,67 +837,41 @@ public class DoJointSocialTask {
}
else
{
fundParam
.
setFd_3b5cc487bb46fa
(
CommonConstants
.
EMPTY_STRING
);
}
paramList
.
add
(
fundParam
);
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
paramList
.
add
(
fundParam
);
}
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
paymentInfoMapper
.
updateBySocialPayment
(
library
.
getId
());
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"公积金实缴费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushFundInfoToEkp
(
paramList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
List
<
String
>
idList
=
vo
.
getPaymentIds
();
for
(
String
id
:
idList
)
{
paymentInfoMapper
.
updateBySocialPayment
(
id
);
}
}
catch
(
Exception
e
)
{
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_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
)
{
paymentInfoMapper
.
updateBySocialPayment
(
s
.
getFd_3b0afbaf10df2c
());
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_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
.
THREE_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
.
THREE_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