Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
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
王飞
vehicle-quality-review
Commits
87428e3d
Commit
87428e3d
authored
May 10, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
检验报告图片非空判断&标准库条件查询 See merge request
!320
parents
a770274c
625c2463
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
24 deletions
+50
-24
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+22
-20
StandardEditRequest.java
.../main/java/com/ruoyi/web/request/StandardEditRequest.java
+4
-0
StandardListRequest.java
.../main/java/com/ruoyi/web/request/StandardListRequest.java
+13
-2
StandardMapper.xml
quality-review/src/main/resources/mapper/StandardMapper.xml
+11
-2
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
87428e3d
...
...
@@ -359,28 +359,30 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
PdfPTable
pictureTable
=
new
PdfPTable
(
new
float
[]{
25
,
25
,
25
,
25
});
pictureTable
.
setWidthPercentage
(
90
);
pictureTable
.
setSpacingBefore
(
10
);
List
<
String
>
pictureList
=
Arrays
.
stream
(
samplePhoto
.
split
(
","
)).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
int
result
=
pictureList
.
size
();
while
(
result
%
4
!=
0
)
{
result
++;
}
for
(
int
i
=
0
;
i
<
result
;
i
++)
{
PdfPCell
cell
=
new
PdfPCell
();
cell
.
setBorder
(
Rectangle
.
NO_BORDER
);
Optional
<
String
>
optionalElement
=
i
<
pictureList
.
size
()
?
Optional
.
of
(
pictureList
.
get
(
i
))
:
Optional
.
empty
();
if
(
optionalElement
.
isPresent
()
&&
StrUtil
.
isNotEmpty
(
optionalElement
.
get
()))
{
Image
image
=
Image
.
getInstance
(
new
URL
((
minioEndpoint
+
optionalElement
.
get
()).
replace
(
" "
,
"%20"
)));
image
.
scaleAbsolute
(
100
,
100
);
cell
.
addElement
(
image
);
}
else
{
Paragraph
paragraph
=
new
Paragraph
();
cell
.
addElement
(
paragraph
);
if
(
samplePhoto
!=
null
)
{
List
<
String
>
pictureList
=
Arrays
.
stream
(
samplePhoto
.
split
(
","
)).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
int
result
=
pictureList
.
size
();
while
(
result
%
4
!=
0
)
{
result
++;
}
for
(
int
i
=
0
;
i
<
result
;
i
++)
{
PdfPCell
cell
=
new
PdfPCell
();
cell
.
setBorder
(
Rectangle
.
NO_BORDER
);
Optional
<
String
>
optionalElement
=
i
<
pictureList
.
size
()
?
Optional
.
of
(
pictureList
.
get
(
i
))
:
Optional
.
empty
();
if
(
optionalElement
.
isPresent
()
&&
StrUtil
.
isNotEmpty
(
optionalElement
.
get
()))
{
Image
image
=
Image
.
getInstance
(
new
URL
((
minioEndpoint
+
optionalElement
.
get
()).
replace
(
" "
,
"%20"
)));
image
.
scaleAbsolute
(
100
,
100
);
cell
.
addElement
(
image
);
}
else
{
Paragraph
paragraph
=
new
Paragraph
();
cell
.
addElement
(
paragraph
);
}
pictureTable
.
addCell
(
cell
);
}
pictureTable
.
addCell
(
cell
);
document
.
addContent
(
pictureTable
);
}
document
.
addContent
(
pictureTable
);
}
/**
...
...
quality-review/src/main/java/com/ruoyi/web/request/StandardEditRequest.java
View file @
87428e3d
...
...
@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
@ApiModel
(
value
=
"StandardEditRequest"
,
description
=
"编辑标准"
)
@Data
...
...
@@ -36,4 +37,7 @@ public class StandardEditRequest {
@ApiModelProperty
(
"实施日期"
)
private
Date
implementationDate
;
@ApiModelProperty
(
"实施日期"
)
List
<
Long
>
dictList
;
}
quality-review/src/main/java/com/ruoyi/web/request/StandardListRequest.java
View file @
87428e3d
...
...
@@ -9,6 +9,17 @@ import lombok.Data;
@Data
public
class
StandardListRequest
extends
PageDomain
{
@ApiModelProperty
(
"关键字"
)
private
String
keyWord
;
@ApiModelProperty
(
"标准号"
)
private
String
standardNo
;
@ApiModelProperty
(
"标准名称"
)
private
String
name
;
@ApiModelProperty
(
"标准分类"
)
private
String
standardType
;
@ApiModelProperty
(
"标准状态"
)
private
String
standardStatus
;
}
quality-review/src/main/resources/mapper/StandardMapper.xml
View file @
87428e3d
...
...
@@ -19,8 +19,17 @@
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date
FROM t_standard
<where>
<if
test=
"keyWord != null and keyWord != ''"
>
name like concat('%',#{keyWord},'%') OR standard_no like concat('%',#{keyWord},'%')
<if
test=
"standardType != null and standardType != ''"
>
standard_type = #{standardType}
</if>
<if
test=
"standardNo != null and standardNo != ''"
>
and standard_no like concat('%', #{standardNo}, '%')
</if>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"standardStatus != null and standardStatus != ''"
>
and standard_status = #{standardStatus}
</if>
</where>
</select>
...
...
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