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
7e631b2b
Commit
7e631b2b
authored
Dec 11, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
excel to image -fxj
parent
e459a804
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
417 additions
and
5 deletions
+417
-5
SocialHandleSearchVo.java
...fu/cloud/plus/v1/yifu/social/vo/SocialHandleSearchVo.java
+8
-0
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+18
-0
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+2
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+376
-0
ExcelMergeImage.java
.../yifu/cloud/plus/v1/yifu/social/util/ExcelMergeImage.java
+3
-1
ExcelToImage.java
...com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
+1
-4
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+9
-0
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialHandleSearchVo.java
View file @
7e631b2b
...
...
@@ -145,4 +145,12 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@ExcelProperty
(
"医生大反馈"
)
@ExcelIgnore
private
String
ysdRemark
;
/**
* 社保ID
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"社保ID"
)
@ExcelIgnore
private
String
socialId
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
7e631b2b
...
...
@@ -50,6 +50,7 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -886,4 +887,21 @@ public class TDispatchInfoController {
searchVo
.
setCreateBy
(
user
.
getId
());
tDispatchInfoService
.
doexportFundInfoOne
(
response
,
searchVo
);
}
/**
* @Author fxj
* @Description 导出花名册
* @Date 14:02 2024/12/10
* @Param
* @return
**/
@PostMapping
(
"/doExportRoster"
)
@Operation
(
description
=
"导出花名册"
)
@SysLog
(
"导出花名册"
)
public
R
<
URL
>
doExportRoster
(
@RequestParam
(
"socialId"
)
String
socialId
,
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"unitCreditCode"
)
String
unitCreditCode
)
{
return
tDispatchInfoService
.
doExportRoster
(
socialId
,
type
,
unitCreditCode
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
7e631b2b
...
...
@@ -32,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -161,4 +162,5 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
**/
List
<
SocialHandleExportVo
>
getRecordRosterList
(
SocialHandleSearchVo
searchVo
,
String
idStr
);
R
<
URL
>
doExportRoster
(
String
socialId
,
String
type
,
String
unitCreditCode
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
7e631b2b
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelMergeImage.java
View file @
7e631b2b
...
...
@@ -4,6 +4,7 @@ import org.apache.commons.compress.utils.IOUtils;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.stereotype.Component
;
import
javax.imageio.ImageIO
;
import
java.awt.Color
;
...
...
@@ -17,6 +18,7 @@ import java.io.*;
* @Description
* @Version 1.0
*/
@Component
public
class
ExcelMergeImage
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
excelFilePath
=
"E:\\test\\11\\1.xls"
;
...
...
@@ -91,7 +93,7 @@ public class ExcelMergeImage {
* @Param
* @return
**/
public
static
FileOutputStream
addPictureToExcel
(
FileInputStream
fis
,
public
FileOutputStream
addPictureToExcel
(
FileInputStream
fis
,
InputStream
imageIs
,
FileOutputStream
fileOut
,
int
SheetNum
){
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
View file @
7e631b2b
...
...
@@ -20,13 +20,10 @@ import java.net.URL;
* @Description excel 转换为 图片 并上传阿里云 (上传后自动删除生成的图片文件)
* @Version 1.0
*/
@RequiredArgsConstructor
@Component
public
class
ExcelToImage
{
@Autowired
private
static
OSSUtil
ossUtil
;
public
R
<
URL
>
excelToImg
(
InputStream
inputStream
){
public
R
<
URL
>
excelToImg
(
InputStream
inputStream
,
OSSUtil
ossUtil
){
String
projectRoot
=
System
.
getProperty
(
"user.dir"
);
//加载Excel工作表
Workbook
wb
=
new
Workbook
();
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
7e631b2b
...
...
@@ -1577,6 +1577,7 @@
SELECT count(1) from (
SELECT 1
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
<where>
<include
refid=
"where_getSocialDisRecord"
/>
</where>
...
...
@@ -2258,6 +2259,11 @@
<sql
id=
"where_getSocialDisRecord"
>
a.DELETE_FLAG = 0
AND a.social_id is not null
<if
test=
'tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() == "0" '
>
AND a.social_id = #{tDispatchInfo.socialId}
</if>
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<if
test=
'tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0" '
>
AND a.STATUS in ('2','4')
...
...
@@ -2354,6 +2360,9 @@
<sql
id=
"where_getSocialPersionDisRecord"
>
a.DELETE_FLAG = 0
AND a.social_id is not null
<if
test=
'tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() == "0" '
>
AND a.social_id = #{tDispatchInfo.socialId}
</if>
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<if
test=
'tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0"'
>
AND a.STATUS in ('2','4')
...
...
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