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
d50b63b3
Commit
d50b63b3
authored
Apr 16, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaixiankang' into 'dev'
原始记录PDF完成 See merge request
!291
parents
3f19553f
e7443402
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
242 additions
and
86 deletions
+242
-86
SampleManagementMapper.java
...rc/main/java/com/ruoyi/mapper/SampleManagementMapper.java
+6
-0
TestRecordsMapper.java
...iew/src/main/java/com/ruoyi/mapper/TestRecordsMapper.java
+7
-0
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+188
-85
SampleManagementMapper.xml
...view/src/main/resources/mapper/SampleManagementMapper.xml
+20
-0
TestRecordsMapper.xml
...ty-review/src/main/resources/mapper/TestRecordsMapper.xml
+18
-0
PdfBaseWriter.java
...n/src/main/java/com/ruoyi/common/utils/PdfBaseWriter.java
+3
-1
No files found.
quality-review/src/main/java/com/ruoyi/mapper/SampleManagementMapper.java
View file @
d50b63b3
...
@@ -61,4 +61,10 @@ public interface SampleManagementMapper extends BaseMapper<Sample> {
...
@@ -61,4 +61,10 @@ public interface SampleManagementMapper extends BaseMapper<Sample> {
List
<
Sample
>
findByIdList
(
@Param
(
"relationList"
)
List
<
TaskSampleRelation
>
relationList
,
@Param
(
"id"
)
Long
id
);
List
<
Sample
>
findByIdList
(
@Param
(
"relationList"
)
List
<
TaskSampleRelation
>
relationList
,
@Param
(
"id"
)
Long
id
);
/**
* 通过总任务ID获取与之有关的样品的车型第一个
* @param id
* @return
*/
Sample
selectSampleByTaskId
(
@Param
(
"id"
)
Long
id
);
}
}
quality-review/src/main/java/com/ruoyi/mapper/TestRecordsMapper.java
View file @
d50b63b3
...
@@ -13,4 +13,11 @@ public interface TestRecordsMapper extends BaseMapper<TestRecords> {
...
@@ -13,4 +13,11 @@ public interface TestRecordsMapper extends BaseMapper<TestRecords> {
List
<
TestRecords
>
findByTaskId
(
@Param
(
"id"
)
String
id
);
List
<
TestRecords
>
findByTaskId
(
@Param
(
"id"
)
String
id
);
Long
countResult
(
@Param
(
"projectId"
)
String
projectId
);
Long
countResult
(
@Param
(
"projectId"
)
String
projectId
);
/**
* 通过总任务ID查询List
* @param id
* @return
*/
List
<
TestRecords
>
selectListByGeneralTaskId
(
@Param
(
"id"
)
Long
id
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
d50b63b3
This diff is collapsed.
Click to expand it.
quality-review/src/main/resources/mapper/SampleManagementMapper.xml
View file @
d50b63b3
...
@@ -184,4 +184,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -184,4 +184,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</foreach>
ORDER BY ts.id
ORDER BY ts.id
</select>
</select>
<select
id=
"selectSampleByTaskId"
parameterType=
"java.lang.Long"
resultType=
"com.ruoyi.domain.Sample"
>
select
s.sample_name,
s.manufacturing_enterprise,
s.sample_number,
s.number_of_samples,
s.trademark,
s.remark
from
t_sample s
left join t_task_sample_relation ts on s.id = ts.sample_id
left join t_task t on ts.task_id = t.id
where
t.id = #{id}
and s.deleted = 0
and ts.flag = '0'
order by s.id
limit 1;
</select>
</mapper>
</mapper>
quality-review/src/main/resources/mapper/TestRecordsMapper.xml
View file @
d50b63b3
...
@@ -29,5 +29,23 @@
...
@@ -29,5 +29,23 @@
GROUP BY project_id
GROUP BY project_id
</select>
</select>
<select
id=
"selectListByGeneralTaskId"
parameterType=
"java.lang.Long"
resultType=
"com.ruoyi.domain.TestRecords"
>
select
tr.usecase,
tr.usecase_id,
tr.test_time,
tr.description,
tr.risk_level,
tr.test_method,
tr.test_result,
tr.remediation,
tr.test_details
from
t_test_records tr
left join t_task t on tr.task_id = t.model_test_task_id
where
t.id = #{id}
</select>
</mapper>
</mapper>
ruoyi-common/src/main/java/com/ruoyi/common/utils/PdfBaseWriter.java
View file @
d50b63b3
...
@@ -320,7 +320,7 @@ public class PdfBaseWriter extends Document{
...
@@ -320,7 +320,7 @@ public class PdfBaseWriter extends Document{
* @param fitHeight 高度自适应
* @param fitHeight 高度自适应
* @return 单元格 {@link PdfPCell}
* @return 单元格 {@link PdfPCell}
*/
*/
public
PdfPCell
newPdfPCellOfImage
(
int
colspan
,
int
rowspan
,
Image
image
,
float
fitWidth
,
float
fitHeight
)
{
public
PdfPCell
newPdfPCellOfImage
(
int
colspan
,
int
rowspan
,
Image
image
,
float
fitWidth
,
float
fitHeight
,
PdfPTable
table
)
{
PdfPCell
cell
=
new
PdfPCell
();
PdfPCell
cell
=
new
PdfPCell
();
cell
.
setUseAscender
(
Boolean
.
TRUE
);
cell
.
setUseAscender
(
Boolean
.
TRUE
);
cell
.
setVerticalAlignment
(
PdfPCell
.
ALIGN_MIDDLE
);
cell
.
setVerticalAlignment
(
PdfPCell
.
ALIGN_MIDDLE
);
...
@@ -330,7 +330,9 @@ public class PdfBaseWriter extends Document{
...
@@ -330,7 +330,9 @@ public class PdfBaseWriter extends Document{
cell
.
setColspan
(
colspan
);
cell
.
setColspan
(
colspan
);
cell
.
setRowspan
(
rowspan
);
cell
.
setRowspan
(
rowspan
);
image
.
scaleToFit
(
fitWidth
,
fitHeight
);
image
.
scaleToFit
(
fitWidth
,
fitHeight
);
image
.
setAlignment
(
Image
.
ALIGN_CENTER
);
cell
.
addElement
(
image
);
cell
.
addElement
(
image
);
table
.
addCell
(
cell
);
return
cell
;
return
cell
;
}
}
...
...
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