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
d0da3162
Commit
d0da3162
authored
May 16, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.4-优化社保士兵-多sheet
parent
d320889d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
11 deletions
+50
-11
SocialSoldierSetVo.java
...yifu/cloud/plus/v1/yifu/social/vo/SocialSoldierSetVo.java
+24
-0
TSocialSoldierPushServiceImpl.java
...fu/social/service/impl/TSocialSoldierPushServiceImpl.java
+26
-11
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialSoldierSetVo.java
0 → 100644
View file @
d0da3162
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author hgw
* @Description 社保士兵功能设置
* @Date 2024-5-15 18:15:50
**/
@Data
public
class
SocialSoldierSetVo
implements
Serializable
{
@ExcelProperty
(
"是否自动提交"
)
private
String
isAutoSubmit
;
@ExcelProperty
(
"是否自动补充信息"
)
private
String
isAutoInsert
;
@ExcelProperty
(
"是否上传附件材料"
)
private
String
isAutoUpload
;
@ExcelProperty
(
"提示已缴费是否继续申报"
)
private
String
isDoShenBao
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialSoldierPushServiceImpl.java
View file @
d0da3162
...
...
@@ -17,6 +17,8 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
...
...
@@ -27,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierPushService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSetVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -97,14 +100,26 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return
R
.
ok
(
"推送成功!"
);
}
public
MultipartFile
getFile
(
List
<
SocialSoldierYgsAddVo
>
list
)
{
File
file
=
null
;
public
MultipartFile
getFile
(
List
<
SocialSoldierYgsAddVo
>
list
,
int
type
)
{
if
(
list
!=
null
)
{
String
filePath
=
"socialFile"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
EasyExcelFactory
.
write
(
filePath
,
SocialSoldierYgsAddVo
.
class
).
sheet
(
"社保明细"
).
doWrite
(
list
);
file
=
new
File
(
filePath
);
}
if
(
file
!=
null
)
{
String
fileName
=
"socialSoldierFile"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
fileName
).
build
();
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"社保明细"
).
head
(
SocialSoldierYgsAddVo
.
class
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
if
(
type
==
2
)
{
List
<
SocialSoldierSetVo
>
setList
=
new
ArrayList
<>();
SocialSoldierSetVo
vo
=
new
SocialSoldierSetVo
();
vo
.
setIsAutoSubmit
(
"否"
);
vo
.
setIsAutoInsert
(
"否"
);
vo
.
setIsAutoUpload
(
"否"
);
vo
.
setIsDoShenBao
(
"否"
);
setList
.
add
(
vo
);
WriteSheet
writeSheet2
=
EasyExcelFactory
.
writerSheet
(
"功能设置"
).
head
(
SocialSoldierSetVo
.
class
).
build
();
excelWriter
.
write
(
setList
,
writeSheet2
);
}
File
file
=
new
File
(
fileName
);
excelWriter
.
finish
();
return
getMultipartFile
(
file
);
}
return
null
;
...
...
@@ -149,7 +164,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
socialInfo
.
setId
(
vo
.
getSocialId
());
socialIdList
.
add
(
socialInfo
);
}
MultipartFile
file
=
this
.
getFile
(
ygsAddlist
);
MultipartFile
file
=
this
.
getFile
(
ygsAddlist
,
1
);
if
(
Common
.
isNotNull
(
file
))
{
log
.
error
(
"社保增员"
);
this
.
getOneAppGetModuleDetail
(
socialIdList
,
file
,
"社保增员"
);
...
...
@@ -165,7 +180,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
socialInfo
.
setId
(
vo
.
getSocialId
());
socialIdList
.
add
(
socialInfo
);
}
MultipartFile
file
=
this
.
getFile
(
ygsReducelist
);
MultipartFile
file
=
this
.
getFile
(
ygsReducelist
,
2
);
if
(
Common
.
isNotNull
(
file
))
{
log
.
error
(
"社保减员"
);
this
.
getOneAppGetModuleDetail
(
socialIdList
,
file
,
"社保减员"
);
...
...
@@ -181,7 +196,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
socialInfo
.
setId
(
vo
.
getSocialId
());
socialIdList
.
add
(
socialInfo
);
}
MultipartFile
file
=
this
.
getFile
(
ysdAddlist
);
MultipartFile
file
=
this
.
getFile
(
ysdAddlist
,
3
);
if
(
Common
.
isNotNull
(
file
))
{
log
.
error
(
"医保增员"
);
this
.
getOneAppGetModuleDetail
(
socialIdList
,
file
,
"医保增员"
);
...
...
@@ -197,7 +212,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
socialInfo
.
setId
(
vo
.
getSocialId
());
socialIdList
.
add
(
socialInfo
);
}
MultipartFile
file
=
this
.
getFile
(
ysdReducelist
);
MultipartFile
file
=
this
.
getFile
(
ysdReducelist
,
4
);
if
(
Common
.
isNotNull
(
file
))
{
log
.
error
(
"医保减员"
);
this
.
getOneAppGetModuleDetail
(
socialIdList
,
file
,
"医保减员"
);
...
...
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