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
96f1f75e
Commit
96f1f75e
authored
Mar 19, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into wangdingyi
parents
d89c4856
7d791f85
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
45 additions
and
15 deletions
+45
-15
ModelTestTask.java
...-review/src/main/java/com/ruoyi/domain/ModelTestTask.java
+3
-0
TestUsecaseVO.java
...view/src/main/java/com/ruoyi/domain/vo/TestUsecaseVO.java
+3
-0
TaskState.java
...ity-review/src/main/java/com/ruoyi/service/TaskState.java
+2
-1
TestUseCaseService.java
...w/src/main/java/com/ruoyi/service/TestUseCaseService.java
+1
-1
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+1
-1
TaskStateAdapter.java
...rc/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
+17
-5
TaskStateFacade.java
...src/main/java/com/ruoyi/service/impl/TaskStateFacade.java
+3
-2
TaskStateFinish.java
...src/main/java/com/ruoyi/service/impl/TaskStateFinish.java
+2
-1
TestUseCaseServiceImpl.java
...n/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
+2
-2
TestUserCaseController.java
...w/src/main/java/com/ruoyi/web/TestUserCaseController.java
+1
-1
TaskStartRequest.java
...src/main/java/com/ruoyi/web/request/TaskStartRequest.java
+4
-0
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+3
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+2
-1
TestUseCaseMapper.xml
...ty-review/src/main/resources/mapper/TestUseCaseMapper.xml
+1
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ModelTestTask.java
View file @
96f1f75e
...
...
@@ -115,4 +115,7 @@ public class ModelTestTask {
@ApiModelProperty
(
"车型试验标准条款数"
)
private
Integer
standards
;
@ApiModelProperty
(
"试验方案ID"
)
private
String
testSchemeId
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/TestUsecaseVO.java
View file @
96f1f75e
...
...
@@ -21,6 +21,9 @@ public class TestUsecaseVO {
@ApiModelProperty
(
"测试用例ID"
)
private
Long
id
;
@ApiModelProperty
(
"用例ID"
)
private
String
caseId
;
@ApiModelProperty
(
"测试场景"
)
private
String
testScenario
;
...
...
quality-review/src/main/java/com/ruoyi/service/TaskState.java
View file @
96f1f75e
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.web.request.TaskStartRequest
;
import
java.util.List
;
public
interface
TaskState
{
void
doCreate
(
Task
task
,
List
<
String
>
taskList
);
void
doStart
(
Task
task
);
void
doStart
(
Task
task
,
TaskStartRequest
request
);
void
doSubmit
(
Task
task
);
...
...
quality-review/src/main/java/com/ruoyi/service/TestUseCaseService.java
View file @
96f1f75e
...
...
@@ -26,5 +26,5 @@ public interface TestUseCaseService extends IService<TestUseCase> {
* @param request
* @return
*/
List
<
Lo
ng
>
selectCaseIdList
(
TestUseCaseIdListRequest
request
);
List
<
Stri
ng
>
selectCaseIdList
(
TestUseCaseIdListRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
96f1f75e
...
...
@@ -276,7 +276,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
@Override
public
void
startTask
(
TaskStartRequest
request
)
{
Task
task
=
taskMapper
.
selectById
(
request
.
getId
());
taskStateFacade
.
doStart
(
task
);
taskStateFacade
.
doStart
(
task
,
request
);
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
View file @
96f1f75e
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.ModelTestTask
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.service.SystemReviewTaskService
;
import
com.ruoyi.service.TaskService
;
import
com.ruoyi.service.TaskState
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.request.TaskStartRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -24,8 +24,12 @@ public abstract class TaskStateAdapter implements TaskState {
@Autowired
private
TaskService
taskService
;
@Autowired
private
ModelTestTaskService
modelTestTaskService
;
@Override
public
void
doStart
(
Task
task
)
{
public
void
doStart
(
Task
task
,
TaskStartRequest
request
)
{
task
.
setTaskStatus
(
Task
.
TASK_STATUS_PENDING
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_STATUS_RUNNING
);
...
...
@@ -36,6 +40,14 @@ public abstract class TaskStateAdapter implements TaskState {
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_GRFIS
))
{
carReviewTaskService
.
startReviewTask
(
task
.
getCarReviewTaskId
());
taskService
.
updateById
(
task
);
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_TRFIS
))
{
modelTestTaskService
.
startModelTestTask
(
task
.
getModelTestTaskId
());
// 更新车型试验的试验方案ID
modelTestTaskService
.
update
(
new
ModelTestTask
(),
new
LambdaUpdateWrapper
<
ModelTestTask
>()
.
set
(
ModelTestTask:
:
getTestSchemeId
,
request
.
getTestSchemeId
())
.
eq
(
ModelTestTask:
:
getId
,
task
.
getModelTestTaskId
()));
taskService
.
updateById
(
task
);
}
else
{
throw
new
ServiceException
(
"已没有可执行的子任务节点"
,
HttpStatus
.
ERROR
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateFacade.java
View file @
96f1f75e
...
...
@@ -2,6 +2,7 @@ package com.ruoyi.service.impl;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.service.TaskState
;
import
com.ruoyi.web.request.TaskStartRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -21,8 +22,8 @@ public class TaskStateFacade implements TaskState {
}
@Override
public
void
doStart
(
Task
task
)
{
taskStateContext
.
getResource
(
task
.
getTaskStatus
()).
doStart
(
task
);
public
void
doStart
(
Task
task
,
TaskStartRequest
request
)
{
taskStateContext
.
getResource
(
task
.
getTaskStatus
()).
doStart
(
task
,
request
);
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateFinish.java
View file @
96f1f75e
...
...
@@ -4,6 +4,7 @@ import com.ruoyi.common.constant.HttpStatus;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.service.TaskState
;
import
com.ruoyi.web.request.TaskStartRequest
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
...
...
@@ -28,7 +29,7 @@ public class TaskStateFinish extends TaskStateAdapter implements TaskState, Init
}
@Override
public
void
doStart
(
Task
task
)
{
public
void
doStart
(
Task
task
,
TaskStartRequest
request
)
{
throw
new
ServiceException
(
"不能开始一个已经结束的任务"
,
HttpStatus
.
ERROR
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
View file @
96f1f75e
...
...
@@ -41,9 +41,9 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
}
@Override
public
List
<
Lo
ng
>
selectCaseIdList
(
TestUseCaseIdListRequest
request
)
{
public
List
<
Stri
ng
>
selectCaseIdList
(
TestUseCaseIdListRequest
request
)
{
List
<
TestUsecaseVO
>
list
=
testUseCaseMapper
.
selectListByTaskId
(
request
.
getModelTestId
());
return
list
.
stream
().
map
(
TestUsecaseVO:
:
getId
).
collect
(
Collectors
.
toList
());
return
list
.
stream
().
map
(
TestUsecaseVO:
:
get
Case
Id
).
collect
(
Collectors
.
toList
());
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/TestUserCaseController.java
View file @
96f1f75e
...
...
@@ -44,7 +44,7 @@ public class TestUserCaseController extends BaseController{
@Anonymous
@ApiOperation
(
"根据场景查询用例ID集合"
)
@PostMapping
(
"/getCaseIdList"
)
public
R
<
List
<
Lo
ng
>>
getCaseIdList
(
@Validated
@RequestBody
TestUseCaseIdListRequest
request
)
{
public
R
<
List
<
Stri
ng
>>
getCaseIdList
(
@Validated
@RequestBody
TestUseCaseIdListRequest
request
)
{
return
R
.
ok
(
testUseCaseService
.
selectCaseIdList
(
request
));
}
}
quality-review/src/main/java/com/ruoyi/web/request/TaskStartRequest.java
View file @
96f1f75e
...
...
@@ -10,4 +10,8 @@ public class TaskStartRequest {
@ApiModelProperty
(
"ID"
)
private
Long
id
;
@ApiModelProperty
(
"试验方案ID"
)
private
String
testSchemeId
;
}
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
96f1f75e
...
...
@@ -118,4 +118,7 @@ public class TaskFindResponse {
@ApiModelProperty
(
"指向待执行节点的指针[0、1、2]"
)
private
int
pointer
;
@ApiModelProperty
(
"试验方案ID"
)
private
String
testSchemeId
;
}
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
96f1f75e
...
...
@@ -106,7 +106,8 @@
crt.task_status car_review_status,
mtt.task_begin_time test_begin_time,
mtt.task_end_time test_end_time,
mtt.task_status test_status
mtt.task_status test_status,
mtt.test_scheme_id testSchemeId
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
...
...
quality-review/src/main/resources/mapper/TestUseCaseMapper.xml
View file @
96f1f75e
...
...
@@ -51,6 +51,7 @@
<select
id=
"selectListByTaskId"
resultType=
"com.ruoyi.domain.vo.TestUsecaseVO"
>
select
tu.id,
tu.case_id caseId,
ts.test_scenario testScenario,
tt.test_type testType,
tu.usecase_no usecaseNo,
...
...
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