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
1d1f0c83
Commit
1d1f0c83
authored
Oct 14, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送平台优化
parent
78347819
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
61 deletions
+65
-61
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+65
-61
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
1d1f0c83
...
...
@@ -526,71 +526,75 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
//报账表
List
<
EkpSalaryParamVo
>
ekpList
=
salaryAccountService
.
getEkpSalaryParamList
(
id
);
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
ekpList
!=
null
&&
!
ekpList
.
isEmpty
())
{
boolean
sendStatus
=
true
;
String
sendBack
;
List
<
TSalaryAccount
>
accountList
=
new
ArrayList
<>();
TSalaryAccount
account
;
Date
sendTime
=
new
Date
();
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
EkpSalaryParam
salaryParam
;
for
(
EkpSalaryParamVo
sendParam
:
ekpList
)
{
salaryParam
=
new
EkpSalaryParam
();
BeanUtils
.
copyProperties
(
sendParam
,
salaryParam
);
// 转化报账表的参数
account
=
new
TSalaryAccount
();
account
.
setId
(
sendParam
.
getFd_3b10af838eab5c
());
// 社保
if
(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce48a9735c
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce48a9735c
()))
{
doSendForecastSocialToEkp
(
sendParam
,
s
);
}
// 公积金
if
(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce4b7fc42a
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce4b7fc42a
()))
{
doSendForecastFundToEkp
(
sendParam
,
s
);
}
sendBack
=
ekpSalaryUtil
.
sendToEKP
(
salaryParam
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
if
(
user
!=
null
)
{
if
(
ekpList
!=
null
&&
!
ekpList
.
isEmpty
()){
boolean
sendStatus
=
true
;
String
sendBack
;
List
<
TSalaryAccount
>
accountList
=
new
ArrayList
<>();
TSalaryAccount
account
;
Date
sendTime
=
new
Date
();
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
EkpSalaryParam
salaryParam
;
for
(
EkpSalaryParamVo
sendParam
:
ekpList
)
{
salaryParam
=
new
EkpSalaryParam
();
BeanUtils
.
copyProperties
(
sendParam
,
salaryParam
);
// 转化报账表的参数
account
=
new
TSalaryAccount
();
account
.
setId
(
sendParam
.
getFd_3b10af838eab5c
());
// 社保
if
(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce48a9735c
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce48a9735c
()))
{
doSendForecastSocialToEkp
(
sendParam
,
s
);
}
// 公积金
if
(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce4b7fc42a
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce4b7fc42a
()))
{
doSendForecastFundToEkp
(
sendParam
,
s
);
}
sendBack
=
ekpSalaryUtil
.
sendToEKP
(
salaryParam
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpSalaryUtil
.
sendToEKP
(
salaryParam
);
}
account
.
setSendTime
(
sendTime
);
account
.
setSendUser
(
user
.
getId
());
account
.
setSendUserName
(
user
.
getNickname
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
account
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
account
.
setSendMonth
(
nowMonth
);
account
.
setEkpId
(
sendBack
);
}
else
{
sendStatus
=
false
;
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
ONE_STRING
);
error
.
setCreateUserName
(
s
.
getCreateName
());
error
.
setLinkId
(
account
.
getId
());
error
.
setTitle
(
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tsendekperror/inner/saveError"
,
error
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
accountList
.
add
(
account
);
}
account
.
setSendTime
(
sendTime
);
account
.
setSendUser
(
user
.
getId
());
account
.
setSendUserName
(
user
.
getNickname
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
account
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
account
.
setSendMonth
(
nowMonth
);
account
.
setEkpId
(
sendBack
);
salaryAccountService
.
updateBatchById
(
accountList
);
if
(
sendStatus
)
{
s
.
setSendTime
(
new
Date
());
s
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
s
.
setStatus
(
SalaryConstants
.
STATUS
[
3
]);
this
.
updateById
(
s
);
// 添加流程进展明细
this
.
saveRecordLog
(
s
,
user
,
CommonConstants
.
ZERO_STRING
,
"发送数字化平台-成功"
);
return
R
.
ok
(
"发送成功!"
);
}
else
{
sendStatus
=
false
;
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
ONE_STRING
);
error
.
setCreateUserName
(
s
.
getCreateName
());
error
.
setLinkId
(
account
.
getId
());
error
.
setTitle
(
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tsendekperror/inner/saveError"
,
error
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
s
.
setStatus
(
SalaryConstants
.
STATUS
[
10
]);
this
.
updateById
(
s
);
// 添加流程进展明细
this
.
saveRecordLog
(
s
,
user
,
CommonConstants
.
ONE_STRING
,
"发送数字化平台-失败"
);
return
R
.
ok
(
"发送失败!"
);
}
accountList
.
add
(
account
);
}
salaryAccountService
.
updateBatchById
(
accountList
);
if
(
sendStatus
)
{
s
.
setSendTime
(
new
Date
());
s
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
s
.
setStatus
(
SalaryConstants
.
STATUS
[
3
]);
this
.
updateById
(
s
);
// 添加流程进展明细
this
.
saveRecordLog
(
s
,
user
,
CommonConstants
.
ZERO_STRING
,
"发送数字化平台-成功"
);
return
R
.
ok
(
"发送成功!"
);
}
else
{
s
.
setStatus
(
SalaryConstants
.
STATUS
[
10
]);
this
.
updateById
(
s
);
// 添加流程进展明细
this
.
saveRecordLog
(
s
,
user
,
CommonConstants
.
ONE_STRING
,
"发送数字化平台-失败"
);
return
R
.
ok
(
"发送失败!"
);
}
else
{
R
.
ok
(
"无数据可发送!"
);
}
}
else
{
return
R
.
failed
(
"请登录!"
);
...
...
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