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
b4c28267
Commit
b4c28267
authored
Aug 03, 2023
by
wangzb
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.6' into MVP1.5.6
parents
780fa0c6
8051e2bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
144 deletions
+137
-144
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+23
-100
DoJointSalaryAsyncTask.java
...loud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
+113
-43
logback-spring.xml
...ary/yifu-salary-biz/src/main/resources/logback-spring.xml
+1
-1
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
b4c28267
...
...
@@ -43,7 +43,10 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.*
;
...
...
@@ -52,7 +55,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.AccountByEkpDiffVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -392,7 +394,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
List
<
EkpSalaryParamVo
>
ekpList
=
salaryAccountService
.
getEkpSalaryParamList
(
id
);
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
)
{
if
(
ekpList
!=
null
&&
!
ekpList
.
isEmpty
()){
if
(
ekpList
!=
null
&&
!
ekpList
.
isEmpty
())
{
boolean
sendStatus
=
true
;
String
sendBack
;
List
<
TSalaryAccount
>
accountList
=
new
ArrayList
<>();
...
...
@@ -412,7 +414,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 社保
if
((
Common
.
isNotNull
(
sendParam
.
getFd_3bcd41d857b764
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3bcd41d857b764
()))
||
(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce48a9735c
())
||
(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce48a9735c
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce48a9735c
())))
{
doSendForecastSocialToEkp
(
sendParam
,
s
);
}
...
...
@@ -460,8 +462,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
EmpStatusVo
empStatusVo
=
new
EmpStatusVo
();
empStatusVo
.
setEmpInfo
(
voList
);
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/temployeeproject/inner/updateEmployeeSalaryStatus"
,
JSON
.
toJSONString
(
empStatusVo
)
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/temployeeproject/inner/updateEmployeeSalaryStatus"
,
JSON
.
toJSONString
(
empStatusVo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(
sendStatus
)
{
...
...
@@ -500,7 +502,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
this
.
saveRecordLog
(
s
,
user
,
CommonConstants
.
ONE_STRING
,
"发送数字化平台-失败"
);
return
R
.
ok
(
"发送失败!"
);
}
}
else
{
}
else
{
return
R
.
ok
(
"无数据可发送!"
);
}
}
else
{
...
...
@@ -536,8 +538,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
sendMap
.
put
(
"fd_3b3bf2c58d2b46"
,
s
.
getId
());
sendMap
.
put
(
"fd_3b3cbe1d05f0d6"
,
""
);
sendMap
.
put
(
"fd_3b3d3ec95b68fc"
,
String
.
valueOf
(
s
.
getSettlementAmount
()));
sendMap
.
put
(
"fd_3b3d3ec85bfeb0"
,
s
.
getSalaryMonth
().
substring
(
0
,
4
)
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
s
.
getSalaryMonth
().
substring
(
4
,
6
));
sendMap
.
put
(
"fd_3b3d3ec85bfeb0"
,
s
.
getSalaryMonth
().
substring
(
0
,
4
)
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
s
.
getSalaryMonth
().
substring
(
4
,
6
));
sendMap
.
put
(
"fd_3b73e18ad34090"
,
"否"
);
if
(
Common
.
isNotNull
(
s
.
getIssueStatus
())
&&
s
.
getIssueStatus
()
==
1
)
{
...
...
@@ -721,7 +723,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 是否为BPO业务
socialParam
.
setFd_3b178dfcf9e3e6
(
s
.
getBpoFlag
());
// 薪酬申请编号
socialParam
.
setFd_3b3cab77923f44
(
s
.
getApplyNo
()
==
null
?
""
:
s
.
getApplyNo
());
socialParam
.
setFd_3b3cab77923f44
(
s
.
getApplyNo
()
==
null
?
""
:
s
.
getApplyNo
());
String
sendBack
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
...
...
@@ -737,7 +739,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
error
.
setNums
(
CommonConstants
.
ONE_INT
);
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tsendekperror/inner/saveError"
,
error
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
error
(
"薪资预估推送:"
+
JSON
.
toJSON
(
socialParam
));
log
.
error
(
"薪资预估推送:"
+
JSON
.
toJSON
(
socialParam
));
}
}
...
...
@@ -810,7 +812,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 是否为BPO业务
socialParam
.
setFd_3b178ea361cabe
(
s
.
getBpoFlag
());
// 薪酬申请编号
socialParam
.
setFd_3b3cabde83d1d0
(
s
.
getApplyNo
()
==
null
?
""
:
s
.
getApplyNo
());
socialParam
.
setFd_3b3cabde83d1d0
(
s
.
getApplyNo
()
==
null
?
""
:
s
.
getApplyNo
());
String
sendBack
=
ekpFundUtil
.
sendToEKP
(
socialParam
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpFundUtil
.
sendToEKP
(
socialParam
);
...
...
@@ -837,93 +839,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public
R
<
String
>
backSalaryByApplyNo
(
String
applyNo
)
{
if
(
Common
.
isNotNull
(
applyNo
)){
Date
start
=
new
Date
();
String
pat
=
"yyyy-MM-dd HH:mm:ss"
;
String
startStr
=
DateUtil
.
formatDatePatten
(
start
,
pat
);
log
.
error
(
"开始退表,时间:"
+
startStr
+
";毫秒数:"
+
start
.
getTime
());
List
<
TSalaryStandard
>
salaryList
=
this
.
list
(
Wrappers
.<
TSalaryStandard
>
query
().
lambda
().
eq
(
TSalaryStandard:
:
getApplyNo
,
applyNo
));
if
(
Common
.
isNotNull
(
applyNo
))
{
List
<
TSalaryStandard
>
salaryList
=
this
.
list
(
Wrappers
.<
TSalaryStandard
>
query
().
lambda
().
eq
(
TSalaryStandard:
:
getApplyNo
,
applyNo
));
if
(
salaryList
!=
null
&&
!
salaryList
.
isEmpty
())
{
TSalaryStandard
ss
=
salaryList
.
get
(
0
);
if
(
ss
.
getStatus
()
!=
SalaryConstants
.
STATUS
[
6
])
{
Date
start2
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start2
,
pat
);
log
.
error
(
"2,时间:"
+
startStr
+
";毫秒数:"
+
start2
.
getTime
()+
";时间差:"
+(
start2
.
getTime
()-
start
.
getTime
()));
// 通知EKP
EkpSalaryBackParam
param
=
new
EkpSalaryBackParam
();
param
.
setFd_3b3c293745e7b4
(
ss
.
getDeptName
());
param
.
setFd_3b3c2935c13056
(
ss
.
getDeptNo
());
param
.
setFd_3b3c293811c0ee
(
ss
.
getApplyNo
());
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
)
{
param
.
setFd_3b422d73d73e02
(
user
.
getUsername
());
}
else
{
param
.
setFd_3b422d73d73e02
(
""
);
}
String
sendBack
=
ekpSalaryUtil
.
backStandardToEKP
(
param
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpSalaryUtil
.
backStandardToEKP
(
param
);
}
Date
start3
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start3
,
pat
);
log
.
error
(
"3,发送EKP返回了,时间:"
+
startStr
+
";毫秒数:"
+
start3
.
getTime
()+
";时间差:"
+(
start3
.
getTime
()-
start2
.
getTime
()));
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
// 更新薪资为确认不通过
ss
.
setStatus
(
SalaryConstants
.
STATUS
[
6
]);
ss
.
setSendMonth
(
null
);
ss
.
setSendTime
(
null
);
ss
.
setBackTime
(
new
Date
());
ss
.
setBackEkpId
(
sendBack
);
this
.
updateById
(
ss
);
Date
start4
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start4
,
pat
);
log
.
error
(
"4,更新主表,时间:"
+
startStr
+
";毫秒数:"
+
start4
.
getTime
()+
";时间差:"
+(
start4
.
getTime
()-
start3
.
getTime
()));
// 更新报账表
salaryAccountService
.
backSalaryBySalaryId
(
ss
.
getId
());
Date
start5
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start5
,
pat
);
log
.
error
(
"5,更新报账表,时间:"
+
startStr
+
";毫秒数:"
+
start5
.
getTime
()+
";时间差:"
+(
start5
.
getTime
()-
start4
.
getTime
()));
TIncome
income
=
new
TIncome
();
income
.
setApplyNo
(
applyNo
);
// 删除收入对应编号的明细
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincome/inner/deleteIncomeAndDetailByApplyNo"
,
income
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
Date
start6
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start6
,
pat
);
log
.
error
(
"6,更新社保服务的收入表,时间:"
+
startStr
+
";毫秒数:"
+
start6
.
getTime
()+
";时间差:"
+(
start6
.
getTime
()-
start5
.
getTime
()));
// 添加流程进展明细
if
(
user
!=
null
)
{
ss
.
setRemark
(
" "
);
this
.
saveRecordLog
(
ss
,
user
,
CommonConstants
.
ZERO_STRING
,
"从EKP退表"
);
Date
start7
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start7
,
pat
);
log
.
error
(
"7,添加流程进展明细,时间:"
+
startStr
+
";毫秒数:"
+
start7
.
getTime
()+
";时间差:"
+(
start7
.
getTime
()-
start6
.
getTime
()));
}
Date
start8
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start8
,
pat
);
log
.
error
(
"8,终点站,时间:"
+
startStr
+
";毫秒数:"
+
start8
.
getTime
()+
";时间差8-6:"
+(
start8
.
getTime
()-
start6
.
getTime
()));
return
R
.
ok
();
}
else
{
Date
start9
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start9
,
pat
);
log
.
error
(
"9,异常了,时间:"
+
startStr
+
";毫秒数:"
+
start9
.
getTime
()+
";时间差9-3:"
+(
start9
.
getTime
()-
start3
.
getTime
()));
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
SEVEN_STRING
);
error
.
setCreateUserName
(
ss
.
getCreateName
());
error
.
setLinkId
(
ss
.
getId
());
error
.
setTitle
(
sendBack
==
null
?
SalaryConstants
.
EKP_NO_RETURN
:
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tsendekperror/inner/saveError"
,
error
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
Date
start10
=
new
Date
();
startStr
=
DateUtil
.
formatDatePatten
(
start10
,
pat
);
log
.
error
(
"10,异常了,时间:"
+
startStr
+
";毫秒数:"
+
start10
.
getTime
()+
";时间差10-9:"
+(
start10
.
getTime
()-
start9
.
getTime
()));
return
R
.
failed
(
"连续两次请求EKP,均未接收到EKP删除成功的返回信息,不予退回"
);
}
// 异步-收入相关
doSalaryAsync
.
doBackSalary
(
applyNo
,
ss
);
return
R
.
ok
();
}
else
{
return
R
.
failed
(
"工资表已退回,请不要重复操作"
);
}
...
...
@@ -944,7 +867,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TSalaryStandard
tSalaryStandard
=
this
.
getById
(
id
);
if
(
tSalaryStandard
!=
null
&&
(
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
||
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
])
||
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
])
&&
tSalaryStandard
.
getIncomeStartTime
()
!=
null
)
{
if
(
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
])
{
long
start
=
tSalaryStandard
.
getIncomeStartTime
().
getTime
()
+
1800000
;
...
...
@@ -1102,10 +1025,10 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
/**
* @param deptId 项目id
* @param deptId
项目id
* @param settleMonth 结算月
* @param nowYear 当前结算年
* @Description:
获取薪资条数
* @param nowYear
当前结算年
* @Description: 获取薪资条数
* @Author: hgw
* @Date: 2023/6/25 18:04
* @return: int
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
View file @
b4c28267
...
...
@@ -3,17 +3,22 @@ package com.yifu.cloud.plus.v1.yifu.salary.util;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryBackParam
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -37,16 +42,20 @@ public class DoJointSalaryAsyncTask {
private
final
DaprSocialProperties
socialProperties
;
private
final
TSalaryStandardMapper
salaryStandardMapper
;
private
final
TSalaryAccountService
tSalaryAccountService
;
private
final
RedisUtil
redisUtil
;
/**
* @Description: 收入
* @Author: hgw
* @Date: 2022-11-29 17:28:494
**/
@Async
public
void
doIncomeDetail
(
TSettleDomainSelectVo
dept
,
List
<
TSalaryAccount
>
salaryAccountList
,
String
id
,
TSalaryStandard
tSalaryStandard
)
{
log
.
info
(
"推送收入到EKP-线程开始"
);
private
final
TApprovalRecordService
auditLogService
;
private
final
EkpSalaryUtil
ekpSalaryUtil
;
/**
* @Description: 收入
* @Author: hgw
* @Date: 2022-11-29 17:28:494
**/
@Async
public
void
doIncomeDetail
(
TSettleDomainSelectVo
dept
,
List
<
TSalaryAccount
>
salaryAccountList
,
String
id
,
TSalaryStandard
tSalaryStandard
)
{
log
.
info
(
"推送收入到EKP-线程开始"
);
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
List
<
String
>
idCardList
=
new
ArrayList
<>();
...
...
@@ -55,7 +64,7 @@ public class DoJointSalaryAsyncTask {
}
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
boolean
isTrue
=
true
;
TSalaryStandard
s
=
salaryStandardMapper
.
selectById
(
id
);
TSalaryStandard
s
=
salaryStandardMapper
.
selectById
(
id
);
try
{
// 收入相关
R
<
String
>
failed1
=
getIncomeDetailMap
(
tSalaryStandard
,
dept
,
idCardList
,
detailMap
);
...
...
@@ -64,8 +73,7 @@ public class DoJointSalaryAsyncTask {
}
else
{
// 含有薪资,则计算收入
// 管理费
if
(
Common
.
isNotNull
(
dept
.
getManageServerItem
())
&&
dept
.
getManageServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
if
(
Common
.
isNotNull
(
dept
.
getManageServerItem
())
&&
dept
.
getManageServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getManagementType
()))
{
// 保存明细
...
...
@@ -76,8 +84,7 @@ public class DoJointSalaryAsyncTask {
}
}
// 风险金
if
(
isTrue
&&
Common
.
isNotNull
(
dept
.
getRiskServerItem
())
&&
dept
.
getRiskServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
if
(
isTrue
&&
Common
.
isNotNull
(
dept
.
getRiskServerItem
())
&&
dept
.
getRiskServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getRiskFundType
()))
{
// 保存明细
...
...
@@ -92,9 +99,7 @@ public class DoJointSalaryAsyncTask {
isTrue
=
false
;
log
.
error
(
e
.
getMessage
());
}
if
(
s
!=
null
&&
(
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
||
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
]))
{
if
(
s
!=
null
&&
(
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
||
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
]))
{
s
.
setIncomeEndTime
(
new
Date
());
if
(
isTrue
)
{
s
.
setStatus
(
CommonConstants
.
TWO_INT
);
...
...
@@ -106,8 +111,8 @@ public class DoJointSalaryAsyncTask {
}
}
log
.
info
(
"推送收入到EKP结束"
);
}
log
.
info
(
"推送收入到EKP结束"
);
}
/**
* @Description: 获取收入信息
...
...
@@ -121,18 +126,14 @@ public class DoJointSalaryAsyncTask {
detail
.
setPayMonth
(
tSalaryStandard
.
getIncomeMonth
());
detail
.
setIdCardList
(
idCardList
);
detail
.
setDeptId
(
dept
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincomedetail/inner/getTIncomeDetailList"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
(),
"/tincomedetail/inner/getTIncomeDetailList"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
Integer
value
;
if
(
detailR
!=
null
)
{
if
(
detailR
.
getData
()
!=
null
&&
detailR
.
getData
().
getDetailList
()
!=
null
&&
!
detailR
.
getData
().
getDetailList
().
isEmpty
())
{
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
());
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
());
if
(
Common
.
isEmpty
(
value
))
{
value
=
CommonConstants
.
ZERO_INT
;
}
...
...
@@ -141,10 +142,7 @@ public class DoJointSalaryAsyncTask {
}
else
{
value
--;
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
(),
value
);
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
(),
value
);
}
}
}
else
{
...
...
@@ -161,17 +159,13 @@ public class DoJointSalaryAsyncTask {
* @Date: 2022/9/2 17:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
boolean
saveIncomeDetail
(
List
<
TSalaryAccount
>
salaryAccountList
,
TSalaryStandard
tSalaryStandard
,
TSettleDomainSelectVo
dept
,
Map
<
String
,
Integer
>
detailMap
,
String
feeType
,
String
isManage
)
{
private
boolean
saveIncomeDetail
(
List
<
TSalaryAccount
>
salaryAccountList
,
TSalaryStandard
tSalaryStandard
,
TSettleDomainSelectVo
dept
,
Map
<
String
,
Integer
>
detailMap
,
String
feeType
,
String
isManage
)
{
TIncomeDetail
detail
;
Integer
value
;
BigDecimal
money
;
String
redisKey
=
String
.
valueOf
(
UUID
.
randomUUID
()).
replaceAll
(
"-"
,
""
)
+
"_incomePush"
;
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
value
=
detailMap
.
get
(
account
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
account
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
isManage
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
);
value
=
detailMap
.
get
(
account
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
account
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
isManage
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
);
if
(
Common
.
isEmpty
(
value
)
||
value
==
0
)
{
detail
=
new
TIncomeDetail
();
detail
.
setRedisKey
(
redisKey
);
...
...
@@ -203,8 +197,7 @@ public class DoJointSalaryAsyncTask {
detail
.
setSourceId
(
account
.
getId
());
detail
.
setSourceType
(
CommonConstants
.
FOUR_STRING
);
detail
.
setApplyNo
(
tSalaryStandard
.
getApplyNo
());
R
<
Boolean
>
saveR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincome/inner/saveSalaryDetail"
,
detail
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
Boolean
>
saveR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
(),
"/tincome/inner/saveSalaryDetail"
,
detail
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
saveR
==
null
||
saveR
.
getCode
()
==
CommonConstants
.
ONE_INT
||
Boolean
.
FALSE
.
equals
(
saveR
.
getData
()))
{
return
false
;
}
...
...
@@ -213,9 +206,8 @@ public class DoJointSalaryAsyncTask {
//推送失败的数据重新推送
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
redisKey
)))
{
List
<
TIncome
>
list
=
(
List
<
TIncome
>)
redisUtil
.
get
(
redisKey
);
for
(
TIncome
income:
list
)
{
R
<
Boolean
>
saveR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincome/inner/saveSalaryPushIncome"
,
income
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
for
(
TIncome
income
:
list
)
{
R
<
Boolean
>
saveR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
(),
"/tincome/inner/saveSalaryPushIncome"
,
income
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
saveR
==
null
||
saveR
.
getCode
()
==
CommonConstants
.
ONE_INT
||
Boolean
.
FALSE
.
equals
(
saveR
.
getData
()))
{
return
false
;
}
...
...
@@ -225,4 +217,82 @@ public class DoJointSalaryAsyncTask {
return
true
;
}
/**
* @param applyNo
* @param ss
* @Description: 异步-薪资退表
* @Author: hgw
* @Date: 2023/8/2 16:56
* @return: void
**/
@Async
public
void
doBackSalary
(
String
applyNo
,
TSalaryStandard
ss
)
{
EkpSalaryBackParam
param
=
new
EkpSalaryBackParam
();
param
.
setFd_3b3c293745e7b4
(
ss
.
getDeptName
());
param
.
setFd_3b3c2935c13056
(
ss
.
getDeptNo
());
param
.
setFd_3b3c293811c0ee
(
ss
.
getApplyNo
());
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
)
{
param
.
setFd_3b422d73d73e02
(
user
.
getUsername
());
}
else
{
param
.
setFd_3b422d73d73e02
(
""
);
}
String
sendBack
=
ekpSalaryUtil
.
backStandardToEKP
(
param
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpSalaryUtil
.
backStandardToEKP
(
param
);
}
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
// 更新薪资为确认不通过
ss
.
setStatus
(
SalaryConstants
.
STATUS
[
6
]);
ss
.
setSendMonth
(
null
);
ss
.
setSendTime
(
null
);
ss
.
setBackTime
(
new
Date
());
ss
.
setBackEkpId
(
sendBack
);
salaryStandardMapper
.
updateById
(
ss
);
// 更新报账表
tSalaryAccountService
.
backSalaryBySalaryId
(
ss
.
getId
());
TIncome
income
=
new
TIncome
();
income
.
setApplyNo
(
applyNo
);
// 删除收入对应编号的明细
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
(),
"/tincome/inner/deleteIncomeAndDetailByApplyNo"
,
income
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
// 添加流程进展明细
if
(
user
!=
null
)
{
ss
.
setRemark
(
" "
);
this
.
saveRecordLog
(
ss
,
user
,
CommonConstants
.
ZERO_STRING
,
"从EKP退表"
);
}
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
SEVEN_STRING
);
error
.
setCreateUserName
(
ss
.
getCreateName
());
error
.
setLinkId
(
ss
.
getId
());
error
.
setTitle
(
sendBack
==
null
?
ss
.
getId
()
+
":"
+
SalaryConstants
.
EKP_NO_RETURN
:
ss
.
getId
()
+
":"
+
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
(),
"/tsendekperror/inner/saveError"
,
error
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
/**
* @param tSalaryStandard
* @param user
* @param status
* @param nodeId
* @Description: 流程进展明细
* @Author: hgw
* @Date: 2023/8/2 16:48
* @return: void
**/
public
void
saveRecordLog
(
TSalaryStandard
tSalaryStandard
,
YifuUser
user
,
String
status
,
String
nodeId
)
{
TApprovalRecord
tApprovalRecord
=
new
TApprovalRecord
();
tApprovalRecord
.
setApprovalResult
(
status
);
tApprovalRecord
.
setApprovalOpinion
(
tSalaryStandard
.
getRemark
());
tApprovalRecord
.
setSalaryId
(
tSalaryStandard
.
getId
());
tApprovalRecord
.
setNodeId
(
nodeId
);
tApprovalRecord
.
setApprovalMan
(
user
.
getId
());
tApprovalRecord
.
setApprovalManName
(
user
.
getNickname
());
tApprovalRecord
.
setApprovalTime
(
DateUtil
.
getCurrentDateTime
());
auditLogService
.
save
(
tApprovalRecord
);
}
}
yifu-salary/yifu-salary-biz/src/main/resources/logback-spring.xml
View file @
b4c28267
...
...
@@ -54,7 +54,7 @@
</logger>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"
debug
"
>
<root
level=
"
error
"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
...
...
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