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
a64b9224
Commit
a64b9224
authored
Mar 15, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车型问卷确认提交
parent
2099bf60
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
47 additions
and
10 deletions
+47
-10
TestScenarioMapper.java
...ew/src/main/java/com/ruoyi/mapper/TestScenarioMapper.java
+3
-0
StrategyCarReviewTask.java
...rc/main/java/com/ruoyi/service/StrategyCarReviewTask.java
+1
-1
CarReviewTaskServiceImpl.java
...java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
+1
-1
StrategyCarReviewTaskFinish.java
...a/com/ruoyi/service/impl/StrategyCarReviewTaskFinish.java
+1
-1
StrategyCarReviewTaskNew.java
...java/com/ruoyi/service/impl/StrategyCarReviewTaskNew.java
+1
-1
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+1
-1
StrategyCarReviewTaskSigned.java
...a/com/ruoyi/service/impl/StrategyCarReviewTaskSigned.java
+25
-1
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+3
-4
CarReviewTaskSubmitRequest.java
...ava/com/ruoyi/web/request/CarReviewTaskSubmitRequest.java
+3
-0
CarReviewTaskViewResponse.java
...ava/com/ruoyi/web/response/CarReviewTaskViewResponse.java
+5
-0
TestScenarioMapper.xml
...y-review/src/main/resources/mapper/TestScenarioMapper.xml
+3
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/TestScenarioMapper.java
View file @
a64b9224
...
...
@@ -18,4 +18,7 @@ public interface TestScenarioMapper extends BaseMapper<TestScenario> {
* @return 测试场景库集合
*/
public
List
<
TestScenario
>
selectTestScenarioList
(
TestScenarioRequest
testScenarioRequest
);
// 查询所有场景
List
<
TestScenario
>
selectAll
();
}
quality-review/src/main/java/com/ruoyi/service/StrategyCarReviewTask.java
View file @
a64b9224
...
...
@@ -13,5 +13,5 @@ public interface StrategyCarReviewTask {
void
doConfirmReview
(
CarReviewTask
carReviewTask
);
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
);
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
,
List
<
Long
>
testScenarioList
);
}
quality-review/src/main/java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
View file @
a64b9224
...
...
@@ -133,7 +133,7 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
public
void
submitReviewTask
(
CarReviewTaskSubmitRequest
request
)
{
CarReviewTask
carReviewTask
=
carReviewTaskService
.
getById
(
request
.
getTaskId
());
strategyCarReviewTaskContext
.
getResource
(
carReviewTask
.
getTaskStatus
()).
doSubmitReview
(
carReviewTask
,
request
.
getImagesUrl
());
strategyCarReviewTaskContext
.
getResource
(
carReviewTask
.
getTaskStatus
()).
doSubmitReview
(
carReviewTask
,
request
.
getImagesUrl
()
,
request
.
getTestScenarioList
()
);
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskFinish.java
View file @
a64b9224
...
...
@@ -81,7 +81,7 @@ public class StrategyCarReviewTaskFinish implements StrategyCarReviewTask, Initi
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
)
{
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
,
List
<
Long
>
testScenarioList
)
{
throw
new
ServiceException
(
"不能提交一个结束的任务"
,
HttpStatus
.
ERROR
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskNew.java
View file @
a64b9224
...
...
@@ -67,7 +67,7 @@ public class StrategyCarReviewTaskNew implements StrategyCarReviewTask, Initiali
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
)
{
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
,
List
<
Long
>
testScenarioList
)
{
throw
new
ServiceException
(
"不能提交一个未开始的任务"
,
HttpStatus
.
ERROR
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
a64b9224
...
...
@@ -155,7 +155,7 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
)
{
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
,
List
<
Long
>
testScenarioList
)
{
throw
new
ServiceException
(
"不能提交一个未确认的任务"
,
HttpStatus
.
ERROR
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskSigned.java
View file @
a64b9224
package
com
.
ruoyi
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
com.ruoyi.common.DataStatisticsUtils
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
...
...
@@ -58,6 +59,12 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
@Autowired
private
TaskUserRelationMapper
taskUserRelationMapper
;
@Autowired
private
TaskScenarioRelationMapper
taskScenarioRelationMapper
;
@Autowired
private
TestScenarioMapper
testScenarioMapper
;
// SIGNED状态下
// 1.standard字段使用task中归档的问卷
// 2.不查询场景变更任务
...
...
@@ -78,6 +85,12 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
response
.
setCarReviewTask
(
carReviewTask
);
Task
task
=
taskMapper
.
getBySubtaskId
(
carReviewTask
.
getId
());
if
(
task
.
getModelTestTaskId
()
!=
null
)
{
response
.
setTestScenarioList
(
testScenarioMapper
.
selectAll
());
}
return
response
;
}
...
...
@@ -92,7 +105,7 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
)
{
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
List
<
String
>
imagesUrl
,
List
<
Long
>
testScenarioList
)
{
// 1. 填充review_submit_time
carReviewTask
.
setTaskEndTime
(
new
Date
());
...
...
@@ -117,6 +130,17 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
carReviewTaskMapper
.
updateById
(
carReviewTask
);
taskMapper
.
updateById
(
task
);
// 总任务包含车型试验,添加任务-场景关联信息
if
(
CollUtil
.
isNotEmpty
(
testScenarioList
))
{
for
(
Long
sceneId
:
testScenarioList
)
{
TaskScenarioRelation
taskScenario
=
TaskScenarioRelation
.
builder
()
.
taskId
(
task
.
getId
())
.
testScenarioId
(
sceneId
)
.
build
();
taskScenarioRelationMapper
.
insert
(
taskScenario
);
}
}
}
private
void
setCarDataStatistics
(
List
<
ReviewStandard
>
standards
,
List
<
ReviewDetailsResult
>
results
,
CarReviewTask
carReviewTask
)
{
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
a64b9224
...
...
@@ -332,7 +332,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
Task
task
=
new
Task
();
task
.
setTaskInitiatorId
(
loginUser
.
getUserId
());
task
.
setTaskInitiator
(
initiator
.
getNickName
());
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
if
(
initiator
.
getDept
()
!=
null
)
{
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
}
task
.
setTaskStatus
(
Task
.
TASK_STATUS_TEMPORARILY
);
String
joinTaskList
=
StringUtils
.
join
(
request
.
getTaskList
(),
","
);
task
.
setTaskList
(
joinTaskList
);
...
...
@@ -383,9 +385,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 构建并保存任务信息
// 总任务
Task
task
=
new
Task
();
task
.
setTaskInitiatorId
(
loginUser
.
getUserId
());
task
.
setTaskInitiator
(
initiator
.
getNickName
());
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
String
joinTaskList
=
StringUtils
.
join
(
request
.
getTaskList
(),
","
);
task
.
setTaskList
(
joinTaskList
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
...
...
quality-review/src/main/java/com/ruoyi/web/request/CarReviewTaskSubmitRequest.java
View file @
a64b9224
...
...
@@ -16,4 +16,7 @@ public class CarReviewTaskSubmitRequest {
@ApiModelProperty
(
"图片地址"
)
private
List
<
String
>
imagesUrl
;
@ApiModelProperty
(
"选择的测试场景"
)
private
List
<
Long
>
testScenarioList
;
}
quality-review/src/main/java/com/ruoyi/web/response/CarReviewTaskViewResponse.java
View file @
a64b9224
...
...
@@ -43,4 +43,9 @@ public class CarReviewTaskViewResponse {
return
detailsList
;
}
@ApiModelProperty
(
"测试场景"
)
private
List
<
TestScenario
>
testScenarioList
;
}
quality-review/src/main/resources/mapper/TestScenarioMapper.xml
View file @
a64b9224
...
...
@@ -26,5 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"testScenario != null and testScenario != ''"
>
and test_scenario like concat('%', #{testScenario}, '%')
</if>
</where>
</select>
<select
id=
"selectAll"
resultType=
"com.ruoyi.domain.TestScenario"
>
select id, standard_classification, test_scenario, storage_time, create_by, create_time, update_by, update_time from t_test_scenario
</select>
</mapper>
\ No newline at end of file
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