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
a77104c7
Commit
a77104c7
authored
Mar 25, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.7.21-优化临时文件
parent
9a0b6ff7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+11
-12
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
a77104c7
...
@@ -331,14 +331,14 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -331,14 +331,14 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
rosterAutoFlagYgs
=
Common
.
isEmpty
(
vo
.
getRosterAutoFlagYgs
())
||
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getRosterAutoFlagYgs
());
rosterAutoFlagYgs
=
Common
.
isEmpty
(
vo
.
getRosterAutoFlagYgs
())
||
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getRosterAutoFlagYgs
());
if
(
rosterAutoFlagYgs
&&
!
huaListVo
.
isEmpty
())
{
if
(
rosterAutoFlagYgs
&&
!
huaListVo
.
isEmpty
())
{
//
urlR = doExportRosterNew(vo, type, huaListVo, zhangMap, templateSrcMap);
urlR
=
doExportRosterNew
(
vo
,
type
,
huaListVo
,
zhangMap
,
templateSrcMap
);
// 新增:强制垃圾回收以清理 Spire.XLS 的临时字体文件
// 新增:强制垃圾回收以清理 Spire.XLS 的临时字体文件
//System.gc();
//System.gc();
// 房工接口,获取 企业职工基本医疗保险参保登记表 url
// 房工接口,获取 企业职工基本医疗保险参保登记表 url
//urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo)
//urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo)
/*
if (urlR != null && urlR.getCode() == 200 && Common.isNotNull(urlR.getData())) {
if
(
urlR
!=
null
&&
urlR
.
getCode
()
==
200
&&
Common
.
isNotNull
(
urlR
.
getData
()))
{
vo
.
setQyzgshbxzyhmc
(
urlR
.
getData
());
vo
.
setQyzgshbxzyhmc
(
urlR
.
getData
());
}
*/
}
}
}
if
(
isSingle
&&
Common
.
isNotNull
(
vo
.
getDispatchId
()))
{
if
(
isSingle
&&
Common
.
isNotNull
(
vo
.
getDispatchId
()))
{
...
@@ -651,13 +651,13 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -651,13 +651,13 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
rosterAutoFlagYsd
=
Common
.
isEmpty
(
vo
.
getRosterAutoFlagYsd
())
||
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getRosterAutoFlagYsd
());
rosterAutoFlagYsd
=
Common
.
isEmpty
(
vo
.
getRosterAutoFlagYsd
())
||
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getRosterAutoFlagYsd
());
if
(
rosterAutoFlagYsd
&&
!
huaListVo
.
isEmpty
())
{
if
(
rosterAutoFlagYsd
&&
!
huaListVo
.
isEmpty
())
{
//
urlR = doExportRosterNew(vo, type, huaListVo, zhangMap, templateSrcMap);
urlR
=
doExportRosterNew
(
vo
,
type
,
huaListVo
,
zhangMap
,
templateSrcMap
);
// 房工接口,获取 企业职工基本医疗保险参保登记表 url
// 房工接口,获取 企业职工基本医疗保险参保登记表 url
//urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo)
//urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo)
//
if (urlR != null && urlR.getCode() == 200 && Common.isNotNull(urlR.getData())) {
if
(
urlR
!=
null
&&
urlR
.
getCode
()
==
200
&&
Common
.
isNotNull
(
urlR
.
getData
()))
{
//
vo.setQyzgjbylbxcbdjb(urlR.getData());
vo
.
setQyzgjbylbxcbdjb
(
urlR
.
getData
());
//
}
}
}
}
// 派减且是要自动生成离职证明:
// 派减且是要自动生成离职证明:
if
(
isAutoLeaveDoc
)
{
if
(
isAutoLeaveDoc
)
{
...
@@ -1347,13 +1347,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -1347,13 +1347,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
throw
new
RuntimeException
(
"填充Excel模板失败"
,
e
);
throw
new
RuntimeException
(
"填充Excel模板失败"
,
e
);
}
}
File
inputFile
=
null
;
FileInputStream
inputStream
=
null
;
FileInputStream
inputStream
=
null
;
InputStream
inStream
=
null
;
InputStream
inStream
=
null
;
try
{
try
{
//读取文件 生成电子章
//读取文件 生成电子章
input
File
=
new
File
(
filePath
);
create
File
=
new
File
(
filePath
);
inputStream
=
new
FileInputStream
(
input
File
);
inputStream
=
new
FileInputStream
(
create
File
);
if
(
Common
.
isEmpty
(
url
))
{
if
(
Common
.
isEmpty
(
url
))
{
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":电子印章OSS获取URL异常"
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":电子印章OSS获取URL异常"
);
...
@@ -1377,7 +1376,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -1377,7 +1376,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
return
R
.
failed
(
"税友附件生成异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"税友附件生成异常:"
+
e
.
getMessage
());
}
finally
{
}
finally
{
// 清理文件
// 清理文件
finallyClose
(
inputFile
,
null
,
null
,
inputStream
,
null
,
inStream
,
null
);
finallyClose
(
null
,
null
,
null
,
inputStream
,
null
,
inStream
,
null
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
excelWriter
!=
null
)
{
if
(
excelWriter
!=
null
)
{
...
...
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