Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
9d7162d3
You need to sign in or sign up before continuing.
Commit
9d7162d3
authored
Nov 19, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.17-法大大优化
parent
98abdd78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
+37
-3
FascServiceImpl.java
...d/plus/v1/yifu/archives/service/impl/FascServiceImpl.java
+37
-3
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FascServiceImpl.java
View file @
9d7162d3
...
...
@@ -35,6 +35,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
...
...
@@ -67,6 +69,8 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
private
static
final
String
FASC_NO_EMP_CONTRACT
=
"未找到自动生成的员工合同"
;
private
static
final
String
FASC_NO_TEMPLATE
=
"未找到新法大大模板"
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FascService
.
class
);
@Override
public
R
<
String
>
getTemplate
(
String
templateName
)
throws
ApiException
{
...
...
@@ -82,14 +86,43 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
// templateName 签署任务模板名称
List
<
TFascTemplate
>
tList
=
new
ArrayList
<>();
List
<
SignTemplateListInfo
>
listSubList
;
List
<
TFascTemplate
>
tempList
=
new
ArrayList
<>()
;
List
<
TFascTemplate
>
tempList
;
List
<
TFascTemplateDetail
>
detailList
=
new
ArrayList
<>();
List
<
TFascTemplateDetail
>
detailSubList
;
// 重试次数
int
maxRetries
=
3
;
boolean
success
;
Exception
lastException
;
// 20秒后重试、40秒后重试、60秒后重试
long
millis
=
20000
;
for
(
TFascCompany
company
:
companyList
)
{
listSubList
=
fascUtil
.
getTemplateList
(
templateName
,
tFascPushLogService
,
company
);
if
(
listSubList
!=
null
&&
!
listSubList
.
isEmpty
())
{
detailSubList
=
new
ArrayList
<>();
fascUtil
.
getTemplateDetailList
(
listSubList
,
tempList
,
detailSubList
,
tFascPushLogService
,
company
);
tempList
=
new
ArrayList
<>();
success
=
false
;
lastException
=
null
;
for
(
int
attempt
=
0
;
attempt
<
maxRetries
&&
!
success
;
attempt
++)
{
try
{
fascUtil
.
getTemplateDetailList
(
listSubList
,
tempList
,
detailSubList
,
tFascPushLogService
,
company
);
success
=
true
;
}
catch
(
Exception
e
)
{
lastException
=
e
;
if
(
attempt
<
maxRetries
-
1
)
{
// Don't wait after the last attempt
try
{
Thread
.
sleep
(
millis
*
(
attempt
+
1
));
// Wait 10 seconds
}
catch
(
InterruptedException
ie
)
{
Thread
.
currentThread
().
interrupt
();
}
}
}
}
if
(!
success
)
{
logger
.
error
(
"法大大获取模板详情,重试 "
+
maxRetries
+
" 次依然失败"
,
lastException
);
continue
;
}
if
(!
tempList
.
isEmpty
()
&&
!
detailSubList
.
isEmpty
())
{
tList
.
addAll
(
tempList
);
detailList
.
addAll
(
detailSubList
);
...
...
@@ -305,7 +338,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
}
private
TFascCompany
getTFascCompany
(
TEmployeeContractPre
contract
)
{
TFascCompany
company
=
null
;
TFascCompany
company
=
null
;
if
(
Common
.
isNotNull
(
contract
.
getFadadaTemplateId
()))
{
TFascTemplate
tFascTemplate
=
tFascTemplateService
.
getOne
(
Wrappers
.<
TFascTemplate
>
query
()
.
lambda
().
eq
(
TFascTemplate:
:
getSignTemplateId
,
contract
.
getFadadaTemplateId
())
...
...
@@ -342,6 +375,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
return
fascUtil
.
urgeTask
(
contract
,
tFascPushLogService
,
tEmployeeContractPreMapper
,
company
);
}
/**
* @param id TEmployeeContractPre主键
* @Description: 获取附件
...
...
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