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
db292062
Commit
db292062
authored
Apr 22, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.9-税友图片大小
parent
47e08556
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
ExcelToImage.java
...com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
+3
-1
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+6
-0
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
View file @
db292062
...
@@ -33,6 +33,8 @@ public class ExcelToImage {
...
@@ -33,6 +33,8 @@ public class ExcelToImage {
private
final
static
String
toImag
=
"\\ToImg.png"
;
private
final
static
String
toImag
=
"\\ToImg.png"
;
private
static
final
String
TO_IMAGE_TEMP
=
"\\ToImgTemp.png"
;
private
final
static
String
toImagParamError
=
":带印章excel生成图片传参异常"
;
private
final
static
String
toImagParamError
=
":带印章excel生成图片传参异常"
;
private
final
static
String
toImagConvertError
=
":ExcelToImage转换异常-"
;
private
final
static
String
toImagConvertError
=
":ExcelToImage转换异常-"
;
...
@@ -90,7 +92,7 @@ public class ExcelToImage {
...
@@ -90,7 +92,7 @@ public class ExcelToImage {
File
originalFile
=
Paths
.
get
(
projectRoot
,
toImag
).
toFile
();
File
originalFile
=
Paths
.
get
(
projectRoot
,
toImag
).
toFile
();
BufferedImage
image
=
ImageIO
.
read
(
originalFile
);
BufferedImage
image
=
ImageIO
.
read
(
originalFile
);
int
quality
=
100
;
// 从100%开始
int
quality
=
100
;
// 从100%开始
File
compressedFile
=
new
File
(
projectRoot
,
"compressed_"
+
toImag
);
File
compressedFile
=
new
File
(
projectRoot
,
TO_IMAGE_TEMP
);
while
(
originalFile
.
length
()
>
maxSize
&&
quality
>
10
)
{
while
(
originalFile
.
length
()
>
maxSize
&&
quality
>
10
)
{
quality
-=
5
;
quality
-=
5
;
ImageIO
.
write
(
image
,
"png"
,
compressedFile
);
ImageIO
.
write
(
image
,
"png"
,
compressedFile
);
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
db292062
...
@@ -2271,6 +2271,12 @@
...
@@ -2271,6 +2271,12 @@
<if
test=
"tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() != ''"
>
<if
test=
"tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() != ''"
>
AND a.SOCIAL_ID = #{tDispatchInfo.socialId}
AND a.SOCIAL_ID = #{tDispatchInfo.socialId}
</if>
</if>
<if
test=
"tDispatchInfo.socialIdList != null and tDispatchInfo.socialIdList.size > 0 "
>
AND a.SOCIAL_ID in
<foreach
item=
"items"
index=
"index"
collection=
"tDispatchInfo.socialIdList"
open=
"("
separator=
","
close=
")"
>
#{items}
</foreach>
</if>
<if
test=
"tDispatchInfo.syFlag != null and tDispatchInfo.syFlag.trim() == '1'"
>
<if
test=
"tDispatchInfo.syFlag != null and tDispatchInfo.syFlag.trim() == '1'"
>
AND a.STATUS = '2'
AND a.STATUS = '2'
</if>
</if>
...
...
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