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
81165eef
Commit
81165eef
authored
Aug 02, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.5.6-salaryBack-EKP退表,异步、记录异常
parent
ec862349
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
140 additions
and
113 deletions
+140
-113
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+26
-69
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 @
81165eef
...
@@ -43,7 +43,10 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
...
@@ -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.EkpFundUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil
;
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.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.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.*
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.*
;
...
@@ -52,7 +55,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
...
@@ -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.AccountByEkpDiffVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo
;
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.salary.vo.TSalaryStandardSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
...
@@ -392,7 +394,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -392,7 +394,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
List
<
EkpSalaryParamVo
>
ekpList
=
salaryAccountService
.
getEkpSalaryParamList
(
id
);
List
<
EkpSalaryParamVo
>
ekpList
=
salaryAccountService
.
getEkpSalaryParamList
(
id
);
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
)
{
if
(
user
!=
null
)
{
if
(
ekpList
!=
null
&&
!
ekpList
.
isEmpty
()){
if
(
ekpList
!=
null
&&
!
ekpList
.
isEmpty
())
{
boolean
sendStatus
=
true
;
boolean
sendStatus
=
true
;
String
sendBack
;
String
sendBack
;
List
<
TSalaryAccount
>
accountList
=
new
ArrayList
<>();
List
<
TSalaryAccount
>
accountList
=
new
ArrayList
<>();
...
@@ -412,7 +414,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -412,7 +414,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 社保
// 社保
if
((
Common
.
isNotNull
(
sendParam
.
getFd_3bcd41d857b764
())
if
((
Common
.
isNotNull
(
sendParam
.
getFd_3bcd41d857b764
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
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
())))
{
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce48a9735c
())))
{
doSendForecastSocialToEkp
(
sendParam
,
s
);
doSendForecastSocialToEkp
(
sendParam
,
s
);
}
}
...
@@ -460,8 +462,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -460,8 +462,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
EmpStatusVo
empStatusVo
=
new
EmpStatusVo
();
EmpStatusVo
empStatusVo
=
new
EmpStatusVo
();
empStatusVo
.
setEmpInfo
(
voList
);
empStatusVo
.
setEmpInfo
(
voList
);
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/temployeeproject/inner/updateEmployeeSalaryStatus"
,
"/temployeeproject/inner/updateEmployeeSalaryStatus"
,
JSON
.
toJSONString
(
empStatusVo
)
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
,
JSON
.
toJSONString
(
empStatusVo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
if
(
sendStatus
)
{
if
(
sendStatus
)
{
...
@@ -500,7 +502,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -500,7 +502,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
this
.
saveRecordLog
(
s
,
user
,
CommonConstants
.
ONE_STRING
,
"发送数字化平台-失败"
);
this
.
saveRecordLog
(
s
,
user
,
CommonConstants
.
ONE_STRING
,
"发送数字化平台-失败"
);
return
R
.
ok
(
"发送失败!"
);
return
R
.
ok
(
"发送失败!"
);
}
}
}
else
{
}
else
{
return
R
.
ok
(
"无数据可发送!"
);
return
R
.
ok
(
"无数据可发送!"
);
}
}
}
else
{
}
else
{
...
@@ -536,8 +538,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -536,8 +538,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
sendMap
.
put
(
"fd_3b3bf2c58d2b46"
,
s
.
getId
());
sendMap
.
put
(
"fd_3b3bf2c58d2b46"
,
s
.
getId
());
sendMap
.
put
(
"fd_3b3cbe1d05f0d6"
,
""
);
sendMap
.
put
(
"fd_3b3cbe1d05f0d6"
,
""
);
sendMap
.
put
(
"fd_3b3d3ec95b68fc"
,
String
.
valueOf
(
s
.
getSettlementAmount
()));
sendMap
.
put
(
"fd_3b3d3ec95b68fc"
,
String
.
valueOf
(
s
.
getSettlementAmount
()));
sendMap
.
put
(
"fd_3b3d3ec85bfeb0"
,
s
.
getSalaryMonth
().
substring
(
0
,
4
)
sendMap
.
put
(
"fd_3b3d3ec85bfeb0"
,
s
.
getSalaryMonth
().
substring
(
0
,
4
)
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
s
.
getSalaryMonth
().
substring
(
4
,
6
));
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
s
.
getSalaryMonth
().
substring
(
4
,
6
));
sendMap
.
put
(
"fd_3b73e18ad34090"
,
"否"
);
sendMap
.
put
(
"fd_3b73e18ad34090"
,
"否"
);
if
(
Common
.
isNotNull
(
s
.
getIssueStatus
())
&&
s
.
getIssueStatus
()
==
1
)
{
if
(
Common
.
isNotNull
(
s
.
getIssueStatus
())
&&
s
.
getIssueStatus
()
==
1
)
{
...
@@ -721,7 +723,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -721,7 +723,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 是否为BPO业务
// 是否为BPO业务
socialParam
.
setFd_3b178dfcf9e3e6
(
s
.
getBpoFlag
());
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
);
String
sendBack
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
sendBack
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
...
@@ -737,7 +739,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -737,7 +739,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
error
.
setNums
(
CommonConstants
.
ONE_INT
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tsendekperror/inner/saveError"
,
error
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/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
...
@@ -810,7 +812,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 是否为BPO业务
// 是否为BPO业务
socialParam
.
setFd_3b178ea361cabe
(
s
.
getBpoFlag
());
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
);
String
sendBack
=
ekpFundUtil
.
sendToEKP
(
socialParam
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpFundUtil
.
sendToEKP
(
socialParam
);
sendBack
=
ekpFundUtil
.
sendToEKP
(
socialParam
);
...
@@ -837,64 +839,19 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -837,64 +839,19 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
**/
public
R
<
String
>
backSalaryByApplyNo
(
String
applyNo
)
{
public
R
<
String
>
backSalaryByApplyNo
(
String
applyNo
)
{
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
())
{
if
(
salaryList
!=
null
&&
!
salaryList
.
isEmpty
())
{
TSalaryStandard
ss
=
salaryList
.
get
(
0
);
TSalaryStandard
ss
=
salaryList
.
get
(
0
);
if
(
ss
.
getStatus
()
!=
SalaryConstants
.
STATUS
[
6
])
{
if
(
ss
.
getStatus
()
!=
SalaryConstants
.
STATUS
[
6
])
{
// 通知EKP
// 异步-收入相关
EkpSalaryBackParam
param
=
new
EkpSalaryBackParam
();
doSalaryAsync
.
doBackSalary
(
applyNo
,
ss
);
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
);
this
.
updateById
(
ss
);
// 更新报账表
salaryAccountService
.
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退表"
);
}
return
R
.
ok
();
return
R
.
ok
();
}
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
?
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
);
return
R
.
failed
(
"连续两次请求EKP,均未接收到EKP删除成功的返回信息,不予退回"
);
}
}
else
{
}
else
{
return
R
.
failed
(
"工资表已退回,请不要重复操作"
);
return
R
.
failed
(
"工资表已退回,请不要重复操作"
);
}
}
}
}
}
return
R
.
failed
(
"未找到工资表"
);
return
R
.
failed
(
"未找到工资表"
);
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
View file @
81165eef
This diff is collapsed.
Click to expand it.
yifu-salary/yifu-salary-biz/src/main/resources/logback-spring.xml
View file @
81165eef
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</logger>
</logger>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"
INFO
"
>
<root
level=
"
error
"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<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