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
46e23921
Commit
46e23921
authored
Jul 02, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
dev - master 33 See merge request
!389
parents
45cb346e
83370fcb
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
93 additions
and
17 deletions
+93
-17
TestRecords.java
...ty-review/src/main/java/com/ruoyi/domain/TestRecords.java
+6
-0
AttachmentVO.java
...eview/src/main/java/com/ruoyi/domain/vo/AttachmentVO.java
+19
-0
StepResultVO.java
...eview/src/main/java/com/ruoyi/domain/vo/StepResultVO.java
+5
-0
UserPhotoStorageService.java
.../main/java/com/ruoyi/service/UserPhotoStorageService.java
+1
-1
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+1
-1
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+1
-1
TestRecordsServiceImpl.java
...n/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
+47
-8
UserPhotoStorageServiceImpl.java
...a/com/ruoyi/service/impl/UserPhotoStorageServiceImpl.java
+5
-2
UserPhotoStorageController.java
...c/main/java/com/ruoyi/web/UserPhotoStorageController.java
+1
-1
TestRecordsMapper.xml
...ty-review/src/main/resources/mapper/TestRecordsMapper.xml
+6
-2
TestPdfBox.java
ruoyi-admin/src/test/java/com/ruoyi/TestPdfBox.java
+1
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/TestRecords.java
View file @
46e23921
...
@@ -56,4 +56,10 @@ public class TestRecords {
...
@@ -56,4 +56,10 @@ public class TestRecords {
@ApiModelProperty
(
"测试详情"
)
@ApiModelProperty
(
"测试详情"
)
private
String
testDetails
;
private
String
testDetails
;
@ApiModelProperty
(
"附件id"
)
private
String
attachmentId
;
@ApiModelProperty
(
"附件名称"
)
private
String
attachmentName
;
}
}
quality-review/src/main/java/com/ruoyi/domain/vo/AttachmentVO.java
0 → 100644
View file @
46e23921
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"AttachmentVO"
,
description
=
"步骤附件列表VO"
)
@Data
public
class
AttachmentVO
{
@ApiModelProperty
(
"附件id"
)
private
String
id
;
@ApiModelProperty
(
"附件名称"
)
private
String
name
;
@ApiModelProperty
(
"附件url"
)
private
String
url
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/StepResultVO.java
View file @
46e23921
...
@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
...
@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
(
value
=
"StepResultVO"
,
description
=
"用例步骤结果VO"
)
@ApiModel
(
value
=
"StepResultVO"
,
description
=
"用例步骤结果VO"
)
@Data
@Data
public
class
StepResultVO
{
public
class
StepResultVO
{
...
@@ -16,4 +18,7 @@ public class StepResultVO {
...
@@ -16,4 +18,7 @@ public class StepResultVO {
@ApiModelProperty
(
"步骤名称"
)
@ApiModelProperty
(
"步骤名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"步骤附件列表"
)
List
<
AttachmentVO
>
attachment_list
;
}
}
quality-review/src/main/java/com/ruoyi/service/UserPhotoStorageService.java
View file @
46e23921
...
@@ -22,7 +22,7 @@ public interface UserPhotoStorageService extends IService<UserPhotoStorage>
...
@@ -22,7 +22,7 @@ public interface UserPhotoStorageService extends IService<UserPhotoStorage>
* @param request 用户照片存储
* @param request 用户照片存储
* @return 用户照片存储集合
* @return 用户照片存储集合
*/
*/
public
List
<
PhotoStorageVO
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
);
public
List
<
PhotoStorageVO
>
selectUserPhotoStorageList
();
/**
/**
* 新增用户照片存储
* 新增用户照片存储
...
...
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
46e23921
...
@@ -307,7 +307,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -307,7 +307,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
currentDoc
.
close
();
currentDoc
.
close
();
templateReader
.
close
();
templateReader
.
close
();
copy
.
close
();
copy
.
close
();
return
uploadMinio
(
arrayOutputStream
,
"车
型审查
原始记录-"
+
getReportName
());
return
uploadMinio
(
arrayOutputStream
,
"车
辆试验
原始记录-"
+
getReportName
());
}
}
/**
/**
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
46e23921
...
@@ -894,7 +894,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -894,7 +894,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 将 BufferedImage 转换为 ByteArrayOutputStream
// 将 BufferedImage 转换为 ByteArrayOutputStream
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ImageIO
.
write
(
image
,
"jpg"
,
outputStream
);
ImageIO
.
write
(
image
,
"jpg"
,
outputStream
);
pictureUrl
+=
uploadMinio
(
outputStream
,
"车
型审查
原始记录_"
+
i
+
getReportName
()
+
".jpg"
)
+
","
;
pictureUrl
+=
uploadMinio
(
outputStream
,
"车
辆试验
原始记录_"
+
i
+
getReportName
()
+
".jpg"
)
+
","
;
}
}
// 关闭文档
// 关闭文档
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
View file @
46e23921
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONObject;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONObject;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.domain.TestRecords
;
import
com.ruoyi.domain.TestRecords
;
import
com.ruoyi.domain.vo.AttachmentVO
;
import
com.ruoyi.domain.vo.CaseResultVO
;
import
com.ruoyi.domain.vo.CaseResultVO
;
import
com.ruoyi.domain.vo.StepResultVO
;
import
com.ruoyi.domain.vo.StepResultVO
;
import
com.ruoyi.mapper.TestRecordsMapper
;
import
com.ruoyi.mapper.TestRecordsMapper
;
...
@@ -102,7 +103,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -102,7 +103,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
testDetailsList
=
new
ArrayList
<>();
List
<
String
>
testDetailsList
=
new
ArrayList
<>();
int
index
=
1
;
// 序号从1开始
int
index
=
1
;
// 序号从1开始
String
testDetailsVO
=
""
;
String
Builder
testDetailsVO
=
new
StringBuilder
()
;
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
// 测试方法
// 测试方法
String
stepName
=
stepResultVO
.
getName
();
String
stepName
=
stepResultVO
.
getName
();
...
@@ -118,11 +119,30 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -118,11 +119,30 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
if
(
testDetails
!=
null
)
{
if
(
testDetails
!=
null
)
{
testDetails
=
convertMarkdownToHtml
(
testDetails
);
testDetails
=
convertMarkdownToHtml
(
testDetails
);
}
}
testDetailsVO
+=
testDetails
+
"<br> "
;
testDetailsVO
.
append
(
testDetails
).
append
(
"<br> "
);
// 步骤附件列表
List
<
AttachmentVO
>
attachmentVOS
=
stepResultVO
.
getAttachment_list
();
if
(
attachmentVOS
!=
null
&&
attachmentVOS
.
size
()
!=
0
)
{
// 附件id
StringBuilder
attachmentId
=
new
StringBuilder
();
// 附件名称
StringBuilder
attachmentName
=
new
StringBuilder
();
for
(
AttachmentVO
vo
:
attachmentVOS
)
{
attachmentId
.
append
(
vo
.
getId
()).
append
(
"、"
);
attachmentName
.
append
(
vo
.
getName
()).
append
(
"、"
);
}
}
testDetailsVO
=
testDetailsVO
.
substring
(
0
,
testDetailsVO
.
length
()
-
1
);
attachmentId
=
new
StringBuilder
(
attachmentId
.
substring
(
0
,
attachmentId
.
length
()
-
1
));
attachmentName
=
new
StringBuilder
(
attachmentName
.
substring
(
0
,
attachmentName
.
length
()
-
1
));
testRecords
.
setAttachmentId
(
attachmentId
.
toString
());
testRecords
.
setAttachmentName
(
attachmentName
.
toString
());
}
}
testDetailsVO
=
new
StringBuilder
(
testDetailsVO
.
substring
(
0
,
testDetailsVO
.
length
()
-
1
));
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
"\n"
));
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
"\n"
));
testRecords
.
setTestDetails
(
testDetailsVO
);
testRecords
.
setTestDetails
(
testDetailsVO
.
toString
()
);
}
}
list
.
add
(
testRecords
);
list
.
add
(
testRecords
);
...
@@ -188,7 +208,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -188,7 +208,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
testDetailsList
=
new
ArrayList
<>();
List
<
String
>
testDetailsList
=
new
ArrayList
<>();
int
index
=
1
;
// 序号从1开始
int
index
=
1
;
// 序号从1开始
String
testDetailsVO
=
""
;
String
Builder
testDetailsVO
=
new
StringBuilder
()
;
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
// 测试方法
// 测试方法
String
stepName
=
stepResultVO
.
getName
();
String
stepName
=
stepResultVO
.
getName
();
...
@@ -204,11 +224,30 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -204,11 +224,30 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
if
(
testDetails
!=
null
)
{
if
(
testDetails
!=
null
)
{
testDetails
=
convertMarkdownToHtml
(
testDetails
);
testDetails
=
convertMarkdownToHtml
(
testDetails
);
}
}
testDetailsVO
+=
testDetails
+
"<br> "
;
testDetailsVO
.
append
(
testDetails
).
append
(
"<br> "
);
// 步骤附件列表
List
<
AttachmentVO
>
attachmentVOS
=
stepResultVO
.
getAttachment_list
();
if
(
attachmentVOS
!=
null
&&
attachmentVOS
.
size
()
!=
0
)
{
// 附件id
StringBuilder
attachmentId
=
new
StringBuilder
();
// 附件名称
StringBuilder
attachmentName
=
new
StringBuilder
();
for
(
AttachmentVO
vo
:
attachmentVOS
)
{
attachmentId
.
append
(
vo
.
getId
()).
append
(
"、"
);
attachmentName
.
append
(
vo
.
getName
()).
append
(
"、"
);
}
attachmentId
=
new
StringBuilder
(
attachmentId
.
substring
(
0
,
attachmentId
.
length
()
-
1
));
attachmentName
=
new
StringBuilder
(
attachmentName
.
substring
(
0
,
attachmentName
.
length
()
-
1
));
testRecords
.
setAttachmentId
(
attachmentId
.
toString
());
testRecords
.
setAttachmentName
(
attachmentName
.
toString
());
}
}
}
testDetailsVO
=
testDetailsVO
.
substring
(
0
,
testDetailsVO
.
length
()
-
1
);
testDetailsVO
=
new
StringBuilder
(
testDetailsVO
.
substring
(
0
,
testDetailsVO
.
length
()
-
1
)
);
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
"\n"
));
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
"\n"
));
testRecords
.
setTestDetails
(
testDetailsVO
);
testRecords
.
setTestDetails
(
testDetailsVO
.
toString
()
);
}
}
list
.
add
(
testRecords
);
list
.
add
(
testRecords
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/UserPhotoStorageServiceImpl.java
View file @
46e23921
...
@@ -34,12 +34,15 @@ public class UserPhotoStorageServiceImpl extends ServiceImpl<UserPhotoStorageMap
...
@@ -34,12 +34,15 @@ public class UserPhotoStorageServiceImpl extends ServiceImpl<UserPhotoStorageMap
/**
/**
* 查询用户照片存储列表
* 查询用户照片存储列表
*
*
* @param request 用户照片存储
* @return 用户照片存储
* @return 用户照片存储
*/
*/
@Override
@Override
public
List
<
PhotoStorageVO
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
)
public
List
<
PhotoStorageVO
>
selectUserPhotoStorageList
()
{
{
// 构建登录用户
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
UserPhotoStorageListRequest
request
=
new
UserPhotoStorageListRequest
();
request
.
setUserId
(
loginUser
.
getUserId
());
List
<
UserPhotoStorage
>
userPhotoStorages
=
userPhotoStorageMapper
.
selectUserPhotoStorageList
(
request
);
List
<
UserPhotoStorage
>
userPhotoStorages
=
userPhotoStorageMapper
.
selectUserPhotoStorageList
(
request
);
// 创建一个VOList,用于返回数据
// 创建一个VOList,用于返回数据
List
<
PhotoStorageVO
>
photoStorageVOList
=
new
ArrayList
<>();
List
<
PhotoStorageVO
>
photoStorageVOList
=
new
ArrayList
<>();
...
...
quality-review/src/main/java/com/ruoyi/web/UserPhotoStorageController.java
View file @
46e23921
...
@@ -48,7 +48,7 @@ public class UserPhotoStorageController extends BaseController
...
@@ -48,7 +48,7 @@ public class UserPhotoStorageController extends BaseController
public
TableDataInfo
<
PhotoStorageVO
>
list
(
@Validated
@RequestBody
UserPhotoStorageListRequest
request
)
public
TableDataInfo
<
PhotoStorageVO
>
list
(
@Validated
@RequestBody
UserPhotoStorageListRequest
request
)
{
{
// startPage();
// startPage();
List
<
PhotoStorageVO
>
list
=
userPhotoStorageService
.
selectUserPhotoStorageList
(
request
);
List
<
PhotoStorageVO
>
list
=
userPhotoStorageService
.
selectUserPhotoStorageList
();
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
...
quality-review/src/main/resources/mapper/TestRecordsMapper.xml
View file @
46e23921
...
@@ -18,9 +18,11 @@
...
@@ -18,9 +18,11 @@
<result
property=
"testResult"
column=
"test_result"
jdbcType=
"VARCHAR"
/>
<result
property=
"testResult"
column=
"test_result"
jdbcType=
"VARCHAR"
/>
<result
property=
"remediation"
column=
"remediation"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"remediation"
column=
"remediation"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"testDetails"
column=
"test_details"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"testDetails"
column=
"test_details"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"attachmentId"
column=
"attachment_id"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"attachmentName"
column=
"attachment_name"
jdbcType=
"LONGNVARCHAR"
/>
</resultMap>
</resultMap>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.TestRecords"
>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.TestRecords"
>
SELECT id, project_id, task_id, usecase, usecase_no, usecase_id, test_time, description, risk_level, test_method, test_result, remediation, test_details
SELECT id, project_id, task_id, usecase, usecase_no, usecase_id, test_time, description, risk_level, test_method, test_result, remediation, test_details
, attachment_id, attachment_name
FROM t_test_records
FROM t_test_records
WHERE project_id = #{id}
WHERE project_id = #{id}
</select>
</select>
...
@@ -41,7 +43,9 @@
...
@@ -41,7 +43,9 @@
tr.test_result,
tr.test_result,
tr.remediation,
tr.remediation,
tr.test_details,
tr.test_details,
tr.usecase_no
tr.usecase_no,
tr.attachment_name,
tr.attachment_id
from
from
t_test_records tr
t_test_records tr
left join t_task t on tr.task_id = t.model_test_task_id
left join t_task t on tr.task_id = t.model_test_task_id
...
...
ruoyi-admin/src/test/java/com/ruoyi/TestPdfBox.java
View file @
46e23921
...
@@ -64,7 +64,7 @@ public class TestPdfBox {
...
@@ -64,7 +64,7 @@ public class TestPdfBox {
// 将 BufferedImage 转换为 ByteArrayOutputStream
// 将 BufferedImage 转换为 ByteArrayOutputStream
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ImageIO
.
write
(
image
,
"jpg"
,
outputStream
);
ImageIO
.
write
(
image
,
"jpg"
,
outputStream
);
pictureUrl
+=
uploadMinio
(
outputStream
,
"车
型审查
原始记录_"
+
i
+
getReportName
()
+
".jpg"
)
+
","
;
pictureUrl
+=
uploadMinio
(
outputStream
,
"车
辆试验
原始记录_"
+
i
+
getReportName
()
+
".jpg"
)
+
","
;
}
}
// 关闭文档
// 关闭文档
...
...
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