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
9f6ba851
Commit
9f6ba851
authored
Apr 18, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
dev - master 6.0 See merge request
!300
parents
2a8263fa
2e3b739d
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
426 additions
and
145 deletions
+426
-145
ModelTestTask.java
...-review/src/main/java/com/ruoyi/domain/ModelTestTask.java
+8
-0
TestRecords.java
...ty-review/src/main/java/com/ruoyi/domain/TestRecords.java
+4
-1
CaseResultVO.java
...eview/src/main/java/com/ruoyi/domain/vo/CaseResultVO.java
+6
-0
InspectionItemVO.java
...w/src/main/java/com/ruoyi/domain/vo/InspectionItemVO.java
+27
-0
InspectionPersonnelVO.java
.../main/java/com/ruoyi/domain/vo/InspectionPersonnelVO.java
+30
-0
TestConclusionVO.java
...w/src/main/java/com/ruoyi/domain/vo/TestConclusionVO.java
+39
-0
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+15
-0
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+92
-49
StrategyModelTestTaskPending.java
.../com/ruoyi/service/impl/StrategyModelTestTaskPending.java
+6
-2
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+139
-85
TestRecordsServiceImpl.java
...n/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
+22
-5
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+33
-0
TestRecordsMapper.xml
...ty-review/src/main/resources/mapper/TestRecordsMapper.xml
+5
-3
receipt_template_04_02.pdf
...ew/src/main/resources/template/receipt_template_04_02.pdf
+0
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ModelTestTask.java
View file @
9f6ba851
...
@@ -46,6 +46,14 @@ public class ModelTestTask {
...
@@ -46,6 +46,14 @@ public class ModelTestTask {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_FINISH
=
"FINISH"
;
public
static
final
String
TASK_STATUS_FINISH
=
"FINISH"
;
/**
* 任务结果
*/
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_PASS
=
"PASS"
;
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_REJECT
=
"REJECT"
;
@ApiModelProperty
(
"主键"
)
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
...
...
quality-review/src/main/java/com/ruoyi/domain/TestRecords.java
View file @
9f6ba851
...
@@ -30,11 +30,14 @@ public class TestRecords {
...
@@ -30,11 +30,14 @@ public class TestRecords {
@ApiModelProperty
(
"用例名称"
)
@ApiModelProperty
(
"用例名称"
)
private
String
usecase
;
private
String
usecase
;
@ApiModelProperty
(
"用例编号"
)
private
String
usecaseNo
;
@ApiModelProperty
(
"用例id"
)
@ApiModelProperty
(
"用例id"
)
private
String
usecaseId
;
private
String
usecaseId
;
@ApiModelProperty
(
"测试时间"
)
@ApiModelProperty
(
"测试时间"
)
private
Date
testTime
;
private
String
testTime
;
@ApiModelProperty
(
"用例简述"
)
@ApiModelProperty
(
"用例简述"
)
private
String
description
;
private
String
description
;
...
...
quality-review/src/main/java/com/ruoyi/domain/vo/CaseResultVO.java
View file @
9f6ba851
...
@@ -28,6 +28,12 @@ public class CaseResultVO {
...
@@ -28,6 +28,12 @@ public class CaseResultVO {
@ApiModelProperty
(
"用例检测状态枚举 UNPROCESSED: 未处理 PASSED: 通过 FAILED: 失败 PROCESSING: 处理中 IGNORED: 已忽略"
)
@ApiModelProperty
(
"用例检测状态枚举 UNPROCESSED: 未处理 PASSED: 通过 FAILED: 失败 PROCESSING: 处理中 IGNORED: 已忽略"
)
private
String
status
;
private
String
status
;
@ApiModelProperty
(
"用例编号"
)
private
String
serial_number
;
@ApiModelProperty
(
"用例开始时间"
)
private
Integer
start_time
;
@ApiModelProperty
(
"用例步骤结果列表"
)
@ApiModelProperty
(
"用例步骤结果列表"
)
List
<
StepResultVO
>
step_result_list
;
List
<
StepResultVO
>
step_result_list
;
}
}
quality-review/src/main/java/com/ruoyi/domain/vo/InspectionItemVO.java
0 → 100644
View file @
9f6ba851
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 检验项目VO
* @author gxk
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"检验项目VO"
)
public
class
InspectionItemVO
{
@ApiModelProperty
(
"检验项目名"
)
private
String
inspectionItemName
;
@ApiModelProperty
(
"检验项目结果"
)
private
String
taskResult
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/InspectionPersonnelVO.java
0 → 100644
View file @
9f6ba851
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 总任务 - 检验人员VO
* @author gxk
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"检验人员VO"
)
public
class
InspectionPersonnelVO
{
@ApiModelProperty
(
"负责人"
)
private
String
principal
;
@ApiModelProperty
(
"检验人员"
)
private
String
inspectionPersonnel
;
@ApiModelProperty
(
"检验日期"
)
private
String
inspectionDate
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/TestConclusionVO.java
0 → 100644
View file @
9f6ba851
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 用于检验报告PDF 的 检验结论
* @author gxk
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"检验结论VO"
)
public
class
TestConclusionVO
{
@ApiModelProperty
(
"体系审查任务结论"
)
private
String
systemReviewTaskResult
;
@ApiModelProperty
(
"车辆检验任务结论"
)
private
String
carReviewTaskResult
;
@ApiModelProperty
(
"车型试验任务结论"
)
private
String
modelTestTaskResult
;
@ApiModelProperty
(
"系统审查任务完成日期"
)
private
String
systemReviewTaskDate
;
@ApiModelProperty
(
"车辆检验任务完成日期"
)
private
String
carReviewTaskDate
;
@ApiModelProperty
(
"车型试验任务完成日期"
)
private
String
modelTestTaskDate
;
}
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
9f6ba851
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.domain.vo.EnterpriseFilePdfVO
;
import
com.ruoyi.domain.vo.EnterpriseFilePdfVO
;
import
com.ruoyi.domain.vo.InspectionPersonnelVO
;
import
com.ruoyi.domain.vo.InspectionReportPdfVO
;
import
com.ruoyi.domain.vo.InspectionReportPdfVO
;
import
com.ruoyi.domain.vo.TestConclusionVO
;
import
com.ruoyi.web.request.TaskFindFinishRequest
;
import
com.ruoyi.web.request.TaskFindFinishRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskFindRequest
;
import
com.ruoyi.web.request.TaskFindRequest
;
...
@@ -67,4 +69,17 @@ public interface TaskMapper extends BaseMapper<Task> {
...
@@ -67,4 +69,17 @@ public interface TaskMapper extends BaseMapper<Task> {
List
<
UserNameResponse
>
findByFinishTaskList
(
@Param
(
"taskList"
)
List
<
Task
>
taskList
);
List
<
UserNameResponse
>
findByFinishTaskList
(
@Param
(
"taskList"
)
List
<
Task
>
taskList
);
/**
* 通过总任务ID查询当前任务的每个子任务的结果
* @param taskId
* @return
*/
TestConclusionVO
selectTestConclusion
(
Long
taskId
);
/**
* 通过总任务ID查询当前任务的小组成员
* @param taskId
* @return
*/
InspectionPersonnelVO
selectInspectionPersonnelById
(
Long
taskId
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
9f6ba851
...
@@ -27,11 +27,10 @@ import com.ruoyi.common.core.domain.entity.SysDictData;
...
@@ -27,11 +27,10 @@ import com.ruoyi.common.core.domain.entity.SysDictData;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.PdfBaseWriter
;
import
com.ruoyi.common.utils.PdfBaseWriter
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.domain.ModelTestTask
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.domain.TestRecords
;
import
com.ruoyi.domain.TestRecords
;
import
com.ruoyi.domain.vo.EnterpriseFilePdfVO
;
import
com.ruoyi.domain.vo.*
;
import
com.ruoyi.domain.vo.InspectionReportPdfVO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.mapper.SampleManagementMapper
;
import
com.ruoyi.mapper.SampleManagementMapper
;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.mapper.TestRecordsMapper
;
import
com.ruoyi.mapper.TestRecordsMapper
;
...
@@ -42,11 +41,6 @@ import io.minio.MinioClient;
...
@@ -42,11 +41,6 @@ import io.minio.MinioClient;
import
io.minio.ObjectWriteArgs
;
import
io.minio.ObjectWriteArgs
;
import
io.minio.PutObjectArgs
;
import
io.minio.PutObjectArgs
;
import
lombok.SneakyThrows
;
import
lombok.SneakyThrows
;
import
org.commonmark.node.Node
;
import
org.commonmark.parser.Parser
;
import
org.commonmark.renderer.html.HtmlRenderer
;
import
org.jsoup.Jsoup
;
import
org.jsoup.nodes.Entities
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -283,13 +277,15 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -283,13 +277,15 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
List
<
TestRecords
>
recordsList
=
testRecordsMapper
.
selectListByGeneralTaskId
(
taskId
);
List
<
TestRecords
>
recordsList
=
testRecordsMapper
.
selectListByGeneralTaskId
(
taskId
);
// 查询本任务对应的所有样品编号、样品照片
// 查询本任务对应的所有样品编号、样品照片
InspectionReportPdfVO
reportData
=
taskMapper
.
selectInspectionReportData
(
taskId
);
InspectionReportPdfVO
reportData
=
taskMapper
.
selectInspectionReportData
(
taskId
);
// 查询检验负责人
InspectionPersonnelVO
inspectionPersonnel
=
taskMapper
.
selectInspectionPersonnelById
(
taskId
);
// 创建临时文档
// 创建临时文档
String
templateName
=
temporaryDocument
(
sample
,
recordsList
,
reportData
);
String
templateName
=
temporaryDocument
(
sample
,
recordsList
,
reportData
,
inspectionPersonnel
);
PdfReader
pdfReader
=
new
PdfReader
(
minioUrl
()
+
templateName
);
PdfReader
pdfReader
=
new
PdfReader
(
minioUrl
()
+
templateName
);
totalNum
=
pdfReader
.
getNumberOfPages
()
-
1
;
totalNum
=
pdfReader
.
getNumberOfPages
()
-
1
;
// 真正文档
// 真正文档
String
currentName
=
temporaryDocument
(
sample
,
recordsList
,
reportData
);
String
currentName
=
temporaryDocument
(
sample
,
recordsList
,
reportData
,
inspectionPersonnel
);
// copy - 分割
// copy - 分割
Document
currentDoc
=
new
Document
();
Document
currentDoc
=
new
Document
();
ByteArrayOutputStream
arrayOutputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
arrayOutputStream
=
new
ByteArrayOutputStream
();
...
@@ -304,7 +300,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -304,7 +300,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
currentDoc
.
close
();
currentDoc
.
close
();
templateReader
.
close
();
templateReader
.
close
();
copy
.
close
();
copy
.
close
();
return
uploadMinio
(
arrayOutputStream
,
"
原始记录"
);
return
uploadMinio
(
arrayOutputStream
,
"
车型审查原始记录-"
+
getReportName
()
);
}
}
/**
/**
...
@@ -312,11 +308,12 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -312,11 +308,12 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
* @param sample 样品信息
* @param sample 样品信息
* @param recordsList 定时任务接收数据List
* @param recordsList 定时任务接收数据List
* @param reportData
* @param reportData
* @param inspectionPersonnel 检验人员信息
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
@SneakyThrows
@SneakyThrows
private
String
temporaryDocument
(
Sample
sample
,
List
<
TestRecords
>
recordsList
,
InspectionReportPdfVO
reportData
)
throws
Exception
{
private
String
temporaryDocument
(
Sample
sample
,
List
<
TestRecords
>
recordsList
,
InspectionReportPdfVO
reportData
,
InspectionPersonnelVO
inspectionPersonnel
)
throws
Exception
{
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
...
@@ -337,9 +334,9 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -337,9 +334,9 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
// 3.仪器设备信息
// 3.仪器设备信息
instrumentInformationSection
(
document
);
instrumentInformationSection
(
document
);
// 第一页下方信息
// 第一页下方信息
bottomOfTheFirstPage
(
document
,
writer
);
bottomOfTheFirstPage
(
document
,
writer
,
reportData
,
inspectionPersonnel
);
// 4.检验结果(循环遍历用例)
// 4.检验结果(循环遍历用例)
testResultSection
(
document
,
recordsList
,
reportData
);
testResultSection
(
document
,
recordsList
,
reportData
,
inspectionPersonnel
);
// 5.附录
// 5.附录
document
.
setParagraph
(
"5.附录"
,
10
f
,
Element
.
ALIGN_LEFT
,
0
,
2
f
,
0
f
);
document
.
setParagraph
(
"5.附录"
,
10
f
,
Element
.
ALIGN_LEFT
,
0
,
2
f
,
0
f
);
// 样品照片
// 样品照片
...
@@ -451,20 +448,22 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -451,20 +448,22 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
* 车型试验原始记录 - 第一页下方固定内容
* 车型试验原始记录 - 第一页下方固定内容
* @param document
* @param document
* @param writer
* @param writer
* @param reportData
* @param inspectionPersonnel
*/
*/
private
void
bottomOfTheFirstPage
(
PdfBaseWriter
document
,
PdfWriter
writer
)
{
private
void
bottomOfTheFirstPage
(
PdfBaseWriter
document
,
PdfWriter
writer
,
InspectionReportPdfVO
reportData
,
InspectionPersonnelVO
inspectionPersonnel
)
{
PdfPTable
inspectorTable
=
new
PdfPTable
(
new
float
[]{
20
,
20
,
10
,
40
});
PdfPTable
inspectorTable
=
new
PdfPTable
(
new
float
[]{
12
,
28
,
10
,
40
});
inspectorTable
.
setWidthPercentage
(
100
);
inspectorTable
.
setWidthPercentage
(
100
);
inspectorTable
.
setTotalWidth
(
PageSize
.
A4
.
getWidth
()
-
80
);
inspectorTable
.
setTotalWidth
(
PageSize
.
A4
.
getWidth
()
-
80
);
document
.
writeNoBorderCell
(
"检验人员:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeNoBorderCell
(
"检验人员:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeNoBorderCell
(
""
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeNoBorderCell
(
inspectionPersonnel
.
getInspectionPersonnel
()
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeNoBorderCell
(
"检验日期:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeNoBorderCell
(
"检验日期:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeNoBorderCell
(
""
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeNoBorderCell
(
inspectionPersonnel
.
getInspectionDate
()
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeBottomCell
(
"检验负责人:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeBottomCell
(
"检验负责人:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeBottomCell
(
""
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeBottomCell
(
inspectionPersonnel
.
getPrincipal
()
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeBottomCell
(
"检验地点:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeBottomCell
(
"检验地点:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeBottomCell
(
"口
中汽研软件测评有限公司
口其他:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
document
.
writeBottomCell
(
"口
"
+
reportData
.
getInspectionCenterAddress
()
+
"
口其他:"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
inspectorTable
);
inspectorTable
.
writeSelectedRows
(
0
,
-
1
,
document
.
left
(),
document
.
bottom
()
+
6
0
,
writer
.
getDirectContent
());
inspectorTable
.
writeSelectedRows
(
0
,
-
1
,
document
.
left
(),
document
.
bottom
()
+
8
0
,
writer
.
getDirectContent
());
// 开启下一页
// 开启下一页
document
.
newPage
();
document
.
newPage
();
}
}
...
@@ -474,8 +473,9 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -474,8 +473,9 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
* @param document
* @param document
* @param recordsList
* @param recordsList
* @param reportData
* @param reportData
* @param inspectionPersonnel
*/
*/
private
void
testResultSection
(
PdfBaseWriter
document
,
List
<
TestRecords
>
recordsList
,
InspectionReportPdfVO
reportData
)
{
private
void
testResultSection
(
PdfBaseWriter
document
,
List
<
TestRecords
>
recordsList
,
InspectionReportPdfVO
reportData
,
InspectionPersonnelVO
inspectionPersonnel
)
{
document
.
setParagraph
(
"4.检验结果"
,
10
f
,
Element
.
ALIGN_LEFT
,
0
,
10
f
,
0
f
);
document
.
setParagraph
(
"4.检验结果"
,
10
f
,
Element
.
ALIGN_LEFT
,
0
,
10
f
,
0
f
);
// 获取数据 - 渲染
// 获取数据 - 渲染
if
(
CollUtil
.
isNotEmpty
(
recordsList
))
{
if
(
CollUtil
.
isNotEmpty
(
recordsList
))
{
...
@@ -486,13 +486,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -486,13 +486,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
PdfPTable
useCaseTable
=
new
PdfPTable
(
new
float
[]{
15
,
35
,
15
,
35
});
PdfPTable
useCaseTable
=
new
PdfPTable
(
new
float
[]{
15
,
35
,
15
,
35
});
useCaseTable
.
setWidthPercentage
(
100
);
useCaseTable
.
setWidthPercentage
(
100
);
document
.
writeCell
(
"测试编号"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"测试编号"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"xxxxxxx"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
record
.
getUsecaseNo
()
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"测试时间"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"测试时间"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
String
.
valueOf
(
record
.
getTestTime
()),
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
String
.
valueOf
(
record
.
getTestTime
()),
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"样品编号"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"样品编号"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
reportData
.
getSampleNumberSummary
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
reportData
.
getSampleNumberSummary
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"测试人员"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"测试人员"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
""
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
inspectionPersonnel
.
getInspectionPersonnel
()
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"简述"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"简述"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
record
.
getDescription
(),
Element
.
ALIGN_LEFT
,
3
,
1
,
useCaseTable
);
document
.
writeCell
(
record
.
getDescription
(),
Element
.
ALIGN_LEFT
,
3
,
1
,
useCaseTable
);
document
.
writeCell
(
"风险等级"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
document
.
writeCell
(
"风险等级"
,
Element
.
ALIGN_LEFT
,
1
,
1
,
useCaseTable
);
...
@@ -670,30 +670,6 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -670,30 +670,6 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
}
}
/**
*
* @param markdownContent
* @return
*/
public
static
String
convertMarkdownToHtml
(
String
markdownContent
)
{
// 创建 Markdown 解析器
Parser
parser
=
Parser
.
builder
().
build
();
// 解析 Markdown
Node
document
=
parser
.
parse
(
markdownContent
);
// 创建 HTML 渲染器
HtmlRenderer
renderer
=
HtmlRenderer
.
builder
().
build
();
// 渲染 HTML
org
.
jsoup
.
nodes
.
Document
doc
=
Jsoup
.
parse
(
renderer
.
render
(
document
).
replaceAll
(
"\\\\n"
,
"<br>"
));
// jsoup标准化标签,生成闭合标签
doc
.
outputSettings
().
syntax
(
org
.
jsoup
.
nodes
.
Document
.
OutputSettings
.
Syntax
.
xml
);
doc
.
outputSettings
().
escapeMode
(
Entities
.
EscapeMode
.
xhtml
);
return
doc
.
html
();
}
private
static
String
headerText
;
private
static
String
headerText
;
public
static
class
MyHeaderFooter
extends
PdfPageEventHelper
{
public
static
class
MyHeaderFooter
extends
PdfPageEventHelper
{
...
@@ -792,10 +768,77 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -792,10 +768,77 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
+
inspectionReport
.
getTaskBeginTime
()
+
"至"
+
inspectionReport
.
getTaskBeginTime
()
+
"至"
+
inspectionReport
.
getTaskEndTime
()
+
"在"
+
inspectionReport
.
getTaskEndTime
()
+
"在"
+
inspectionReport
.
getInspectionCenterName
()
+
"进行"
);
+
inspectionReport
.
getInspectionCenterName
()
+
"进行"
);
inspectionReport
.
setInspectionItem
(
getInspectionItemByTaskItem
(
inspectionReport
.
getInspectionItem
()));
String
taskItem
=
getInspectionItemByTaskItem
(
inspectionReport
.
getInspectionItem
());
inspectionReport
.
setInspectionItem
(
taskItem
);
// 检验结论
inspectionReport
.
setTestConclusion
(
getTestConclusion
(
taskItem
,
taskId
,
inspectionReport
));
return
inspectionReport
;
return
inspectionReport
;
}
}
/**
* 获取检验结论
* @return
*/
private
String
getTestConclusion
(
String
taskItem
,
Long
taskId
,
InspectionReportPdfVO
inspectionReport
)
{
int
num
=
0
;
String
result
=
""
;
String
issueDate
=
""
;
String
passItemName
=
""
;
String
failItemName
=
""
;
List
<
String
>
taskItemList
=
Arrays
.
asList
(
taskItem
.
split
(
","
));
List
<
InspectionItemVO
>
list
=
new
ArrayList
<>();
TestConclusionVO
testConclusionVO
=
taskMapper
.
selectTestConclusion
(
taskId
);
if
(
ObjectUtil
.
isNotEmpty
(
testConclusionVO
.
getSystemReviewTaskResult
()))
{
list
.
add
(
InspectionItemVO
.
builder
()
.
inspectionItemName
(
taskItemList
.
get
(
num
))
.
taskResult
(
testConclusionVO
.
getSystemReviewTaskResult
()).
build
());
issueDate
=
testConclusionVO
.
getSystemReviewTaskDate
();
num
++;
}
if
(
ObjectUtil
.
isNotEmpty
(
testConclusionVO
.
getCarReviewTaskResult
()))
{
list
.
add
(
InspectionItemVO
.
builder
()
.
inspectionItemName
(
taskItemList
.
get
(
num
))
.
taskResult
(
testConclusionVO
.
getCarReviewTaskResult
()).
build
());
issueDate
=
testConclusionVO
.
getCarReviewTaskDate
();
num
++;
}
if
(
ObjectUtil
.
isNotEmpty
(
testConclusionVO
.
getModelTestTaskResult
()))
{
list
.
add
(
InspectionItemVO
.
builder
()
.
inspectionItemName
(
taskItemList
.
get
(
num
))
.
taskResult
(
testConclusionVO
.
getModelTestTaskResult
()).
build
());
issueDate
=
testConclusionVO
.
getModelTestTaskDate
();
}
inspectionReport
.
setIssueDate
(
issueDate
);
for
(
InspectionItemVO
item
:
list
)
{
if
(
item
.
getTaskResult
().
equals
(
ModelTestTask
.
TASK_STATUS_PASS
))
{
passItemName
+=
item
.
getInspectionItemName
()
+
"、"
;
}
if
(
item
.
getTaskResult
().
equals
(
ModelTestTask
.
TASK_STATUS_REJECT
))
{
failItemName
+=
item
.
getInspectionItemName
()
+
"、"
;
}
}
if
(
StrUtil
.
isNotEmpty
(
passItemName
))
{
passItemName
=
passItemName
.
substring
(
0
,
passItemName
.
length
()
-
1
);
result
=
"经检验,该样品的"
+
passItemName
+
"检验项目的检验结果符合"
+
inspectionReport
.
getInspectionBasis
()
+
"的要求,"
;
}
if
(
StrUtil
.
isNotEmpty
(
failItemName
))
{
failItemName
=
failItemName
.
substring
(
0
,
failItemName
.
length
()
-
1
);
result
+=
"该样品的"
+
failItemName
+
"检验项目的检验结果不符合"
+
inspectionReport
.
getInspectionBasis
()
+
"的要求。"
;
}
if
(
result
.
endsWith
(
","
))
{
result
=
result
.
substring
(
0
,
result
.
length
()
-
1
)
+
"。"
;
}
return
" "
+
result
;
}
/**
/**
* 渲染数据
* 渲染数据
* @param fields
* @param fields
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyModelTestTaskPending.java
View file @
9f6ba851
...
@@ -63,22 +63,26 @@ public class StrategyModelTestTaskPending implements StrategyModelTestTask, Init
...
@@ -63,22 +63,26 @@ public class StrategyModelTestTaskPending implements StrategyModelTestTask, Init
JSONObject
jsonObject
=
testUseCaseService
.
callThirdPartyInterface
(
url
,
map
);
JSONObject
jsonObject
=
testUseCaseService
.
callThirdPartyInterface
(
url
,
map
);
Integer
sumCount
=
(
Integer
)
jsonObject
.
get
(
"case_count"
);
Integer
sumCount
=
(
Integer
)
jsonObject
.
get
(
"case_count"
);
AtomicReference
<
Integer
>
currentCount
=
new
AtomicReference
<>(
0
);
AtomicReference
<
Integer
>
currentCount
=
new
AtomicReference
<>(
0
);
AtomicReference
<
Integer
>
failedCount
=
new
AtomicReference
<>(
0
);
List
<
CaseStatistics
>
caseStatisticsList
=
jsonObject
.
getList
(
"case_statistics"
,
CaseStatistics
.
class
);
List
<
CaseStatistics
>
caseStatisticsList
=
jsonObject
.
getList
(
"case_statistics"
,
CaseStatistics
.
class
);
if
(
CollUtil
.
isNotEmpty
(
caseStatisticsList
))
{
if
(
CollUtil
.
isNotEmpty
(
caseStatisticsList
))
{
caseStatisticsList
.
forEach
(
obj
->
{
caseStatisticsList
.
forEach
(
obj
->
{
if
(
CaseStatistics
.
CASE_STATUS_FAILED
.
equals
(
obj
.
status
)
||
CaseStatistics
.
CASE_STATUS_PASSED
.
equals
(
obj
.
status
))
{
if
(
CaseStatistics
.
CASE_STATUS_FAILED
.
equals
(
obj
.
status
)
||
CaseStatistics
.
CASE_STATUS_PASSED
.
equals
(
obj
.
status
))
{
currentCount
.
updateAndGet
(
v
->
v
+
obj
.
getCount
());
currentCount
.
updateAndGet
(
v
->
v
+
obj
.
getCount
());
}
}
if
(
CaseStatistics
.
CASE_STATUS_FAILED
.
equals
(
obj
.
status
))
{
failedCount
.
updateAndGet
(
v
->
v
+
obj
.
getCount
());
}
});
});
}
}
Integer
integer
=
currentCount
.
get
();
System
.
out
.
println
(
integer
);
// 进行中的任务, 点击返回后, 判断当前用例完成程度, 用例都完成后状态改为待签字
// 进行中的任务, 点击返回后, 判断当前用例完成程度, 用例都完成后状态改为待签字
if
(
sumCount
.
equals
(
currentCount
.
get
()))
{
if
(
sumCount
.
equals
(
currentCount
.
get
()))
{
modelTestTaskMapper
.
update
(
new
ModelTestTask
(),
modelTestTaskMapper
.
update
(
new
ModelTestTask
(),
new
LambdaUpdateWrapper
<
ModelTestTask
>()
new
LambdaUpdateWrapper
<
ModelTestTask
>()
.
set
(
ModelTestTask:
:
getTaskEndTime
,
new
Date
())
.
set
(
ModelTestTask:
:
getTaskEndTime
,
new
Date
())
.
set
(
ModelTestTask:
:
getTaskStatus
,
ModelTestTask
.
TASK_STATUS_SIGNED
)
.
set
(
ModelTestTask:
:
getTaskStatus
,
ModelTestTask
.
TASK_STATUS_SIGNED
)
.
set
(
failedCount
.
get
()
>
0
,
ModelTestTask:
:
getTaskResult
,
ModelTestTask
.
TASK_STATUS_REJECT
)
.
set
(
failedCount
.
get
().
equals
(
0
),
ModelTestTask:
:
getTaskResult
,
ModelTestTask
.
TASK_STATUS_PASS
)
.
eq
(
ModelTestTask:
:
getId
,
modelTestTask
.
getId
()));
.
eq
(
ModelTestTask:
:
getId
,
modelTestTask
.
getId
()));
}
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
9f6ba851
...
@@ -2,6 +2,7 @@ package com.ruoyi.service.impl;
...
@@ -2,6 +2,7 @@ package com.ruoyi.service.impl;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -112,6 +113,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -112,6 +113,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
return
taskMapper
.
findList
(
request
);
return
taskMapper
.
findList
(
request
);
}
}
/**
* 创建任务
* @param request
*/
@Override
@Override
public
void
createTask
(
TaskCreateRequest
request
)
{
public
void
createTask
(
TaskCreateRequest
request
)
{
...
@@ -147,9 +152,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -147,9 +152,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
}
}
Long
sum
=
taskMapper
.
findTaskName
(
request
.
getTaskName
());
// TODO 任务名称验重
// TODO 任务名称验重
// Long sum = taskMapper.findTaskName(request.getTaskName());
// if (sum > 0) {
// if (sum > 0) {
// throw new ServiceException("任务名称重复,请检查", HttpStatus.ERROR);
// throw new ServiceException("任务名称重复,请检查", HttpStatus.ERROR);
// } else {
// } else {
...
@@ -200,9 +204,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -200,9 +204,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
taskService
.
save
(
task
);
taskService
.
save
(
task
);
// 总任务包含车型试验,添加任务-场景关联信息
saveTaskScenario
(
task
.
getId
(),
request
.
getTestScenarioList
());
// 构建并保存该任务所关联的审核组信息
// 构建并保存该任务所关联的审核组信息
saveUserRelation
(
auditors
,
task
);
saveUserRelation
(
auditors
,
task
);
...
@@ -219,6 +220,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -219,6 +220,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// }
// }
}
}
/**
* 查询用户待办任务
* @param request
* @param userId
* @return
*/
@Override
@Override
public
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
,
Long
userId
)
{
public
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
,
Long
userId
)
{
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findPending
(
request
,
userId
);
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findPending
(
request
,
userId
);
...
@@ -236,17 +243,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -236,17 +243,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List
<
CarReviewTask
>
carReviewTaskList
=
carReviewTaskMapper
.
findByTaskList
(
responses
);
List
<
CarReviewTask
>
carReviewTaskList
=
carReviewTaskMapper
.
findByTaskList
(
responses
);
setCarProgress
(
carReviewTaskList
,
responses
);
setCarProgress
(
carReviewTaskList
,
responses
);
// 车型试验子任务列表
// List<ModelTestTask> modelTestTaskList = modelTestTaskMapper.findByTaskList(responses);
// setModelProgress(modelTestTaskList,responses);
// 设置车型试验进度
// 设置车型试验进度
setModelSchedule
(
responses
);
setModelSchedule
(
responses
);
// 任务是否有选择场景
// 显示下一任务节点
// List<TaskScenarioResponse> scenarioResponseList = taskMapper.findByTaskList(responses);
// setTaskScenario(scenarioResponseList,responses);
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
if
(
response
.
getPointer
()
<
taskList
.
length
)
{
if
(
response
.
getPointer
()
<
taskList
.
length
)
{
...
@@ -261,6 +261,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -261,6 +261,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
return
responses
;
return
responses
;
}
}
/**
* 已归档任务
* @param request
* @return
*/
@Override
@Override
public
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
)
{
public
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
)
{
...
@@ -276,12 +281,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -276,12 +281,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
return
taskList
;
return
taskList
;
}
}
/**
* 编辑任务
* @param request
*/
@Override
@Override
public
void
editTask
(
TaskEditRequest
request
)
{
public
void
editTask
(
TaskEditRequest
request
)
{
Task
oldTask
=
taskMapper
.
findByName
(
request
.
getTaskName
());
// TODO 任务名称验重
// TODO 任务名称验重
// Task oldTask = taskMapper.findByName(request.getTaskName());
// if (oldTask == null || Objects.equals(oldTask.getId(), request.getId())) {
// if (oldTask == null || Objects.equals(oldTask.getId(), request.getId())) {
// 构建任务创建者
// 构建任务创建者
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
...
@@ -306,7 +314,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -306,7 +314,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
setTaskList
(
request
.
getTaskList
(),
task
);
setTaskList
(
request
.
getTaskList
(),
task
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
// 子任务发
送
变化
// 子任务发
生
变化
changeSubTask
(
request
,
task
,
initiator
,
standard
,
leader
);
changeSubTask
(
request
,
task
,
initiator
,
standard
,
leader
);
task
.
setMaxPointer
(
request
.
getTaskList
().
size
());
task
.
setMaxPointer
(
request
.
getTaskList
().
size
());
...
@@ -333,6 +341,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -333,6 +341,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
/**
* 删除任务
* @param request
*/
@Override
@Override
public
void
deleteTask
(
TaskDeleteRequest
request
)
{
public
void
deleteTask
(
TaskDeleteRequest
request
)
{
Task
task
=
taskMapper
.
selectById
(
request
.
getId
());
Task
task
=
taskMapper
.
selectById
(
request
.
getId
());
...
@@ -366,12 +378,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -366,12 +378,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
taskMapper
.
deleteById
(
request
.
getId
());
taskMapper
.
deleteById
(
request
.
getId
());
}
}
/**
* 开始任务
* @param request
*/
@Override
@Override
public
void
startTask
(
TaskStartRequest
request
)
{
public
void
startTask
(
TaskStartRequest
request
)
{
Task
task
=
taskMapper
.
selectById
(
request
.
getId
());
Task
task
=
taskMapper
.
selectById
(
request
.
getId
());
taskStateFacade
.
doStart
(
task
,
request
);
taskStateFacade
.
doStart
(
task
,
request
);
}
}
/**
* 用户创建的任务
* @param request
* @param userId
* @return
*/
@Override
@Override
public
List
<
TaskFindResponse
>
findCreate
(
TaskFindRequest
request
,
Long
userId
)
{
public
List
<
TaskFindResponse
>
findCreate
(
TaskFindRequest
request
,
Long
userId
)
{
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findByUserId
(
request
,
userId
);
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findByUserId
(
request
,
userId
);
...
@@ -389,12 +411,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -389,12 +411,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List
<
CarReviewTask
>
carReviewTaskList
=
carReviewTaskMapper
.
findByTaskList
(
responses
);
List
<
CarReviewTask
>
carReviewTaskList
=
carReviewTaskMapper
.
findByTaskList
(
responses
);
setCarProgress
(
carReviewTaskList
,
responses
);
setCarProgress
(
carReviewTaskList
,
responses
);
// 车型试验子任务列表
// List<ModelTestTask> modelTestTaskList = modelTestTaskMapper.findByTaskList(responses);
// setModelProgress(modelTestTaskList,responses);
// 设置车型试验进度
// 设置车型试验进度
setModelSchedule
(
responses
);
setModelSchedule
(
responses
);
// 显示下一任务节点
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
if
(
response
.
getPointer
()
<
taskList
.
length
)
{
if
(
response
.
getPointer
()
<
taskList
.
length
)
{
...
@@ -408,6 +428,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -408,6 +428,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
return
responses
;
return
responses
;
}
}
/**
* 获取任务详情
* @param request
* @return
*/
@Override
@Override
public
TaskGetInfoResponse
getInfo
(
TaskGetInfoRequest
request
)
{
public
TaskGetInfoResponse
getInfo
(
TaskGetInfoRequest
request
)
{
...
@@ -422,9 +447,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -422,9 +447,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
response
.
setTaskList
(
taskList
);
response
.
setTaskList
(
taskList
);
}
}
// 测试场景
response
.
setTestScenarioList
(
selectTestScenarioList
(
task
));
// 小组成员
// 小组成员
response
.
setAuditors
(
setAuditors
(
request
.
getId
()));
response
.
setAuditors
(
setAuditors
(
request
.
getId
()));
...
@@ -463,6 +485,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -463,6 +485,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
return
list
;
return
list
;
}
}
/**
* 已办任务
* @param request
* @param userId
* @return
*/
@Override
@Override
public
List
<
Task
>
findUserFinish
(
TaskFindFinishRequest
request
,
Long
userId
)
{
public
List
<
Task
>
findUserFinish
(
TaskFindFinishRequest
request
,
Long
userId
)
{
...
@@ -478,16 +506,27 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -478,16 +506,27 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
return
taskList
;
return
taskList
;
}
}
/**
* 新增暂存任务
* @param request
*/
@Override
@Override
public
void
temporaryStorageTask
(
TaskCreateRequest
request
)
{
public
void
temporaryStorageTask
(
TaskCreateRequest
request
)
{
Long
sum
=
taskMapper
.
findTaskName
(
request
.
getTaskName
());
// TODO 任务名称验重
// TODO 任务名称验重
// Long sum = taskMapper.findTaskName(request.getTaskName());
// if (sum > 0) {
// if (sum > 0) {
// throw new ServiceException("任务名称重复,请检查", HttpStatus.ERROR);
// throw new ServiceException("任务名称重复,请检查", HttpStatus.ERROR);
// } else {
// } else {
// 构建任务创建者
// 构建任务创建者
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
TaskGetInfoResponse
temporaryStorageTask
=
taskService
.
getByUserId
(
loginUser
.
getUserId
());
if
(
temporaryStorageTask
!=
null
)
{
TaskEditRequest
editRequest
=
new
TaskEditRequest
();
BeanUtils
.
copyBeanProp
(
editRequest
,
request
);
editRequest
.
setId
(
temporaryStorageTask
.
getId
());
taskService
.
editTemporaryStorageTask
(
editRequest
);
}
else
{
SysUser
initiator
=
sysUserService
.
selectUserById
(
loginUser
.
getUserId
());
SysUser
initiator
=
sysUserService
.
selectUserById
(
loginUser
.
getUserId
());
Standard
standard
=
standardService
.
findListById
(
request
.
getStandardId
());
Standard
standard
=
standardService
.
findListById
(
request
.
getStandardId
());
...
@@ -501,7 +540,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -501,7 +540,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
task
.
setTaskStatus
(
Task
.
TASK_STATUS_TEMPORARILY
);
task
.
setTaskStatus
(
Task
.
TASK_STATUS_TEMPORARILY
);
String
joinTaskList
=
StringUtils
.
join
(
request
.
getTaskList
(),
","
);
String
joinTaskList
=
StringUtils
.
join
(
request
.
getTaskList
(),
","
);
if
(
StrUtil
.
isNotEmpty
(
joinTaskList
))
{
task
.
setTaskList
(
joinTaskList
);
task
.
setTaskList
(
joinTaskList
);
}
BeanUtils
.
copyBeanProp
(
task
,
request
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
if
(
standard
!=
null
)
{
if
(
standard
!=
null
)
{
...
@@ -529,9 +570,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -529,9 +570,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 暂存
// 暂存
taskService
.
save
(
task
);
taskService
.
save
(
task
);
// 测试场景
saveTaskScenario
(
task
.
getId
(),
request
.
getTestScenarioList
());
// 保存任务与小组信息
// 保存任务与小组信息
saveUserRelation
(
auditors
,
task
);
saveUserRelation
(
auditors
,
task
);
...
@@ -542,16 +580,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -542,16 +580,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 保存任务关联的文件信息
// 保存任务关联的文件信息
saveFileList
(
request
.
getFileList
(),
task
);
saveFileList
(
request
.
getFileList
(),
task
);
}
// }
// }
}
}
/**
* 编辑暂存
* @param request
*/
@Override
@Override
public
void
editTemporaryStorageTask
(
TaskEditRequest
request
)
{
public
void
editTemporaryStorageTask
(
TaskEditRequest
request
)
{
Task
oldTask
=
taskMapper
.
findByName
(
request
.
getTaskName
());
// TODO 任务名称验重
// TODO 任务名称验重
// Task oldTask = taskMapper.findByName(request.getTaskName());
// if (oldTask == null || Objects.equals(oldTask.getId(), request.getId())) {
// if (oldTask == null || Objects.equals(oldTask.getId(), request.getId())) {
// 构建任务创建者
// 构建任务创建者
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
...
@@ -562,7 +605,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -562,7 +605,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 总任务
// 总任务
Task
task
=
new
Task
();
Task
task
=
new
Task
();
String
joinTaskList
=
StringUtils
.
join
(
request
.
getTaskList
(),
","
);
String
joinTaskList
=
StringUtils
.
join
(
request
.
getTaskList
(),
","
);
if
(
StrUtil
.
isNotEmpty
(
joinTaskList
))
{
task
.
setTaskList
(
joinTaskList
);
task
.
setTaskList
(
joinTaskList
);
}
BeanUtils
.
copyBeanProp
(
task
,
request
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
if
(
standard
!=
null
)
{
if
(
standard
!=
null
)
{
...
@@ -571,9 +616,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -571,9 +616,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
task
.
setFile
(
standard
.
getFile
());
task
.
setFile
(
standard
.
getFile
());
}
}
taskScenarioRelationMapper
.
delete
(
new
QueryWrapper
<
TaskScenarioRelation
>().
lambda
().
eq
(
TaskScenarioRelation:
:
getTaskId
,
task
.
getId
()));
saveTaskScenario
(
task
.
getId
(),
request
.
getTestScenarioList
());
// 找到审查组长
// 找到审查组长
TaskUserRelation
leader
=
null
;
TaskUserRelation
leader
=
null
;
List
<
TaskUserRelation
>
auditors
=
request
.
getAuditors
();
List
<
TaskUserRelation
>
auditors
=
request
.
getAuditors
();
...
@@ -609,6 +651,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -609,6 +651,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
/**
* 获取用户暂存任务
* @param userId
* @return
*/
@Override
@Override
public
TaskGetInfoResponse
getByUserId
(
Long
userId
)
{
public
TaskGetInfoResponse
getByUserId
(
Long
userId
)
{
...
@@ -619,13 +666,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -619,13 +666,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
BeanUtils
.
copyBeanProp
(
response
,
task
);
BeanUtils
.
copyBeanProp
(
response
,
task
);
if
(
response
.
getTaskList
().
startsWith
(
","
))
{
// if (response.getTaskList().startsWith(",")) {
String
taskList
=
response
.
getTaskList
().
substring
(
1
);
// String taskList = response.getTaskList().substring(1);
response
.
setTaskList
(
taskList
);
// response.setTaskList(taskList);
}
// }
// 测试场景
response
.
setTestScenarioList
(
selectTestScenarioList
(
task
));
// 小组成员
// 小组成员
response
.
setAuditors
(
setAuditors
(
task
.
getId
()));
response
.
setAuditors
(
setAuditors
(
task
.
getId
()));
...
@@ -647,6 +691,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -647,6 +691,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
/**
* 根据子任务获取总任务详情
* @param request
* @return
*/
@Override
@Override
public
TaskGetInfoResponse
getBySubtaskId
(
TaskSubGetInfoRequest
request
)
{
public
TaskGetInfoResponse
getBySubtaskId
(
TaskSubGetInfoRequest
request
)
{
TaskGetInfoResponse
response
=
new
TaskGetInfoResponse
();
TaskGetInfoResponse
response
=
new
TaskGetInfoResponse
();
...
@@ -670,6 +719,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -670,6 +719,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
/**
* 数据统计
* @param request
* @return
*/
@Override
@Override
public
DataStatisticsResponse
dataStatistics
(
TaskGetInfoRequest
request
)
{
public
DataStatisticsResponse
dataStatistics
(
TaskGetInfoRequest
request
)
{
...
@@ -1055,14 +1109,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -1055,14 +1109,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
task
.
setModelTestTaskId
(
saveModelTest
(
createRequest
,
initiator
,
standard
,
leader
));
task
.
setModelTestTaskId
(
saveModelTest
(
createRequest
,
initiator
,
standard
,
leader
));
// 任务-场景
// 任务-场景
saveTaskScenario
(
task
.
getId
(),
createRequest
.
getTestScenarioList
());
//
saveTaskScenario(task.getId(), createRequest.getTestScenarioList());
}
}
if
(!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_TRFIS
)
&&
ObjectUtil
.
isNotNull
(
task
.
getModelTestTaskId
()))
{
if
(!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_TRFIS
)
&&
ObjectUtil
.
isNotNull
(
task
.
getModelTestTaskId
()))
{
// 删除
// 删除
modelTestTaskService
.
removeById
(
task
.
getModelTestTaskId
());
modelTestTaskService
.
removeById
(
task
.
getModelTestTaskId
());
task
.
setModelTestTaskIdNull
();
task
.
setModelTestTaskIdNull
();
// 删除 任务-场景
// 删除 任务-场景
taskScenarioRelationMapper
.
delete
(
new
QueryWrapper
<
TaskScenarioRelation
>().
lambda
().
eq
(
TaskScenarioRelation:
:
getTaskId
,
task
.
getId
()));
//
taskScenarioRelationMapper.delete(new QueryWrapper<TaskScenarioRelation>().lambda().eq(TaskScenarioRelation::getTaskId, task.getId()));
}
}
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_TRFIS
)
&&
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_TRFIS
)
&&
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
...
@@ -1075,8 +1129,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -1075,8 +1129,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
)
{
)
{
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
taskScenarioRelationMapper
.
delete
(
new
QueryWrapper
<
TaskScenarioRelation
>().
lambda
().
eq
(
TaskScenarioRelation:
:
getTaskId
,
task
.
getId
()));
//
taskScenarioRelationMapper.delete(new QueryWrapper<TaskScenarioRelation>().lambda().eq(TaskScenarioRelation::getTaskId, task.getId()));
saveTaskScenario
(
task
.
getId
(),
createRequest
.
getTestScenarioList
());
//
saveTaskScenario(task.getId(), createRequest.getTestScenarioList());
}
}
}
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
View file @
9f6ba851
...
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -85,6 +86,14 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -85,6 +86,14 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
());
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
());
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setUsecaseNo
(
caseResultVO
.
getSerial_number
());
//测试开始时间
if
(
caseResultVO
.
getStart_time
()
!=
null
)
{
Date
date
=
new
Date
(
caseResultVO
.
getStart_time
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
String
testTime
=
sdf
.
format
(
date
);
testRecords
.
setTestTime
(
testTime
);
}
// 用例步骤
// 用例步骤
List
<
StepResultVO
>
stepResultVOS
=
caseResultVO
.
getStep_result_list
();
List
<
StepResultVO
>
stepResultVOS
=
caseResultVO
.
getStep_result_list
();
...
@@ -107,12 +116,12 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -107,12 +116,12 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
// 测试详情
// 测试详情
String
testDetails
=
stepResultVO
.
getDescription
();
String
testDetails
=
stepResultVO
.
getDescription
();
if
(
testDetails
!=
null
)
{
if
(
testDetails
!=
null
)
{
convertMarkdownToHtml
(
testDetails
);
testDetails
=
convertMarkdownToHtml
(
testDetails
);
}
}
testDetailsVO
+=
testDetails
+
"
`
"
;
testDetailsVO
+=
testDetails
+
"
<br>
"
;
}
}
testDetailsVO
=
testDetailsVO
.
substring
(
0
,
testDetailsVO
.
length
()
-
1
);
testDetailsVO
=
testDetailsVO
.
substring
(
0
,
testDetailsVO
.
length
()
-
1
);
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
"
`
"
));
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
"
\n
"
));
testRecords
.
setTestDetails
(
testDetailsVO
);
testRecords
.
setTestDetails
(
testDetailsVO
);
}
}
...
@@ -163,6 +172,14 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -163,6 +172,14 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
());
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
());
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setUsecaseNo
(
caseResultVO
.
getSerial_number
());
//测试开始时间
if
(
caseResultVO
.
getStart_time
()
!=
null
)
{
Date
date
=
new
Date
(
caseResultVO
.
getStart_time
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
String
testTime
=
sdf
.
format
(
date
);
testRecords
.
setTestTime
(
testTime
);
}
// 用例步骤
// 用例步骤
List
<
StepResultVO
>
stepResultVOS
=
caseResultVO
.
getStep_result_list
();
List
<
StepResultVO
>
stepResultVOS
=
caseResultVO
.
getStep_result_list
();
...
@@ -185,7 +202,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -185,7 +202,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
// 测试详情
// 测试详情
String
testDetails
=
stepResultVO
.
getDescription
();
String
testDetails
=
stepResultVO
.
getDescription
();
if
(
testDetails
!=
null
)
{
if
(
testDetails
!=
null
)
{
convertMarkdownToHtml
(
testDetails
);
testDetails
=
convertMarkdownToHtml
(
testDetails
);
}
}
testDetailsVO
+=
testDetails
+
"`"
;
testDetailsVO
+=
testDetails
+
"`"
;
}
}
...
@@ -220,7 +237,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -220,7 +237,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
// jsoup标准化标签,生成闭合标签
// jsoup标准化标签,生成闭合标签
doc
.
outputSettings
().
syntax
(
org
.
jsoup
.
nodes
.
Document
.
OutputSettings
.
Syntax
.
xml
);
doc
.
outputSettings
().
syntax
(
org
.
jsoup
.
nodes
.
Document
.
OutputSettings
.
Syntax
.
xml
);
doc
.
outputSettings
().
escapeMode
(
Entities
.
EscapeMode
.
xhtml
);
doc
.
outputSettings
().
escapeMode
(
Entities
.
EscapeMode
.
xhtml
);
return
doc
.
html
();
return
doc
.
body
().
html
();
}
}
@Override
@Override
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
9f6ba851
...
@@ -390,5 +390,38 @@
...
@@ -390,5 +390,38 @@
</foreach>
</foreach>
</select>
</select>
<select
id=
"selectTestConclusion"
parameterType=
"java.lang.Long"
resultType=
"com.ruoyi.domain.vo.TestConclusionVO"
>
select
srt.task_result AS systemReviewTaskResult,
DATE_FORMAT(srt.task_end_time, '%Y-%m-%d') AS systemReviewTaskDate,
crt.task_result AS carReviewTaskResult,
DATE_FORMAT(crt.task_end_time, '%Y-%m-%d') AS carReviewTaskDate,
mtt.task_result AS modelTestTaskResult,
DATE_FORMAT(mtt.task_end_time, '%Y-%m-%d') AS modelTestTaskDate
from
t_task t
left join t_system_review_task srt on t.system_review_task_id = srt.id
left join t_car_review_task crt on t.car_review_task_id = crt.id
left join t_model_test_task mtt on t.model_test_task_id = mtt.id
where
t.id = #{taskId}
</select>
<select
id=
"selectInspectionPersonnelById"
parameterType=
"java.lang.Long"
resultType=
"com.ruoyi.domain.vo.InspectionPersonnelVO"
>
select
su.nick_name AS principal,
GROUP_CONCAT(distinct u.nick_name) AS inspectionPersonnel,
DATE_FORMAT(mtt.task_begin_time, '%Y-%m-%d') AS inspectionDate
from
t_task t
left join t_task_user_relation tur on t.id = tur.task_id
left join sys_user u on tur.user_id = u.user_id
left join sys_user su on t.leader_id = su.user_id
left join t_model_test_task mtt on t.model_test_task_id = mtt.id
where
t.id = #{taskId}
group by t.id
</select>
</mapper>
</mapper>
quality-review/src/main/resources/mapper/TestRecordsMapper.xml
View file @
9f6ba851
...
@@ -9,8 +9,9 @@
...
@@ -9,8 +9,9 @@
<result
property=
"projectId"
column=
"project_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"projectId"
column=
"project_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"usecase"
column=
"usecase"
jdbcType=
"VARCHAR"
/>
<result
property=
"usecase"
column=
"usecase"
jdbcType=
"VARCHAR"
/>
<result
property=
"usecaseNo"
column=
"usecase_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"usecaseId"
column=
"usecase_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"usecaseId"
column=
"usecase_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"testTime"
column=
"test_time"
jdbcType=
"
TIMESTAMP
"
/>
<result
property=
"testTime"
column=
"test_time"
jdbcType=
"
VARCHAR
"
/>
<result
property=
"description"
column=
"description"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"description"
column=
"description"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"riskLevel"
column=
"risk_level"
jdbcType=
"VARCHAR"
/>
<result
property=
"riskLevel"
column=
"risk_level"
jdbcType=
"VARCHAR"
/>
<result
property=
"testMethod"
column=
"test_method"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"testMethod"
column=
"test_method"
jdbcType=
"LONGNVARCHAR"
/>
...
@@ -19,7 +20,7 @@
...
@@ -19,7 +20,7 @@
<result
property=
"testDetails"
column=
"test_details"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"testDetails"
column=
"test_details"
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_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
FROM t_test_records
FROM t_test_records
WHERE project_id = #{id}
WHERE project_id = #{id}
</select>
</select>
...
@@ -39,7 +40,8 @@
...
@@ -39,7 +40,8 @@
tr.test_method,
tr.test_method,
tr.test_result,
tr.test_result,
tr.remediation,
tr.remediation,
tr.test_details
tr.test_details,
tr.usecase_no
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
...
...
quality-review/src/main/resources/template/receipt_template_04_02.pdf
View file @
9f6ba851
No preview for this file type
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