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
2f330bff
Commit
2f330bff
authored
Mar 05, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
开始任务,预览留档文件 See merge request
!122
parents
84e1cf7d
f6295953
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
23 deletions
+34
-23
Task.java
quality-review/src/main/java/com/ruoyi/domain/Task.java
+1
-3
ReviewEnterpriseArchiveServiceImpl.java
...uoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
+20
-2
TaskStateAdapter.java
...rc/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
+7
-4
TaskStateFinish.java
...src/main/java/com/ruoyi/service/impl/TaskStateFinish.java
+1
-1
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+0
-3
TaskGetInfoResponse.java
...main/java/com/ruoyi/web/response/TaskGetInfoResponse.java
+0
-3
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+5
-7
No files found.
quality-review/src/main/java/com/ruoyi/domain/Task.java
View file @
2f330bff
...
...
@@ -74,9 +74,6 @@ public class Task {
@ApiModelProperty
(
"任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]"
)
private
String
runStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
...
...
@@ -165,6 +162,7 @@ public class Task {
private
int
maxPointer
;
// 返回当前节点的下一个节点
public
String
getNextNode
()
{
String
[]
split
=
taskList
.
split
(
","
);
if
(
pointer
+
1
>
maxPointer
)
{
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
View file @
2f330bff
...
...
@@ -7,8 +7,10 @@ import com.ruoyi.common.core.domain.model.LoginUser;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.service.ReviewEnterpriseArchiveService
;
import
com.ruoyi.mapper.ReviewEnterpriseArchiveMapper
;
import
com.ruoyi.system.service.ISysUserService
;
...
...
@@ -41,14 +43,29 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
@Autowired
private
ReviewEnterpriseArchiveService
reviewEnterpriseArchiveService
;
@Autowired
private
TaskMapper
taskMapper
;
@Override
public
List
<
ReviewEnterpriseArchiveViewVO
>
view
(
Long
taskId
)
{
Task
task
=
taskMapper
.
selectById
(
taskId
);
List
<
ReviewEnterpriseArchive
>
archives
=
reviewEnterpriseArchiveMapper
.
findByTaskId
(
taskId
);
List
<
ReviewEnterpriseArchiveViewItemVO
>
viewItems
=
reviewEnterpriseArchiveMapper
.
findViewItemVOByTaskId
(
taskId
);
return
buildReviewEnterpriseArchiveViewVO
(
archives
,
viewItems
);
List
<
ReviewEnterpriseArchiveViewVO
>
resultList
=
new
ArrayList
<>();
resultList
.
addAll
(
buildReviewEnterpriseArchiveViewVO
(
archives
,
reviewEnterpriseArchiveMapper
.
findViewItemVOByTaskId
(
task
.
getSystemReviewTaskId
()))
);
resultList
.
addAll
(
buildReviewEnterpriseArchiveViewVO
(
archives
,
reviewEnterpriseArchiveMapper
.
findViewItemVOByTaskId
(
task
.
getCarReviewTaskId
()))
);
return
resultList
;
}
@Override
...
...
@@ -111,6 +128,7 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
}
private
void
setReviewEnterpriseArchiveViewItemVO
(
ReviewEnterpriseArchiveViewVO
view
,
List
<
ReviewEnterpriseArchiveViewItemVO
>
viewItems
)
{
if
(
viewItems
==
null
)
return
;
List
<
ReviewEnterpriseArchiveViewItemVO
>
subList
=
new
ArrayList
();
Long
archiveId
=
view
.
getId
();
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
View file @
2f330bff
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.service.SystemReviewTaskService
;
...
...
@@ -29,15 +31,16 @@ public abstract class TaskStateAdapter implements TaskState {
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_SRAIF
))
{
systemReviewTaskService
.
start
(
task
.
getSystemReviewTaskId
());
task
.
setNextNode
(
Task
.
SUB_TASK_GRFIS
);
taskService
.
updateById
(
task
);
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_GRFIS
))
{
carReviewTaskService
.
startReviewTask
(
task
.
getCarReviewTaskId
());
task
.
setNextNode
(
Task
.
SUB_TASK_TRFIS
);
taskService
.
updateById
(
task
);
}
else
{
throw
new
ServiceException
(
"已没有可执行的子任务节点"
,
HttpStatus
.
ERROR
);
}
task
.
setPointer
(
task
.
getPointer
()
+
1
);
taskService
.
updateById
(
task
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateFinish.java
View file @
2f330bff
...
...
@@ -14,7 +14,7 @@ import java.util.List;
@Transactional
@Service
public
class
TaskStateFinish
implements
TaskState
,
InitializingBean
{
public
class
TaskStateFinish
extends
TaskStateAdapter
implements
TaskState
,
InitializingBean
{
@Autowired
private
TaskStateContext
taskStateContext
;
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
2f330bff
...
...
@@ -42,9 +42,6 @@ public class TaskFindResponse {
@ApiModelProperty
(
"任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]"
)
private
String
runStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
@ApiModelProperty
(
"总任务开始时间"
)
private
Date
taskBeginTime
;
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskGetInfoResponse.java
View file @
2f330bff
...
...
@@ -35,9 +35,6 @@ public class TaskGetInfoResponse {
@ApiModelProperty
(
"任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]"
)
private
String
runStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
2f330bff
...
...
@@ -10,7 +10,6 @@
<result
property=
"carReviewTaskId"
column=
"car_review_task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"runStatus"
column=
"run_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"nextNode"
column=
"next_node"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskNo"
column=
"task_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskName"
column=
"task_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"confidentialityLevel"
column=
"confidentiality_level"
jdbcType=
"VARCHAR"
/>
...
...
@@ -35,6 +34,8 @@
<result
property=
"standardNo"
column=
"standard_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"file"
column=
"file"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskList"
column=
"task_list"
jdbcType=
"VARCHAR"
/>
<result
property=
"pointer"
column=
"pointer"
jdbcType=
"BIGINT"
/>
<result
property=
"maxPointer"
column=
"max_pointer"
jdbcType=
"BIGINT"
/>
</resultMap>
<resultMap
id=
"ResponseMap"
type=
"com.ruoyi.web.response.TaskFindResponse"
>
...
...
@@ -47,7 +48,6 @@
<result
property=
"productModel"
column=
"product_model"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"runStatus"
column=
"run_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"nextNode"
column=
"next_node"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskBeginTime"
column=
"task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"taskEndTime"
column=
"task_end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"systemTaskBeginTime"
column=
"system_task_begin_time"
jdbcType=
"TIMESTAMP"
/>
...
...
@@ -62,7 +62,7 @@
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.TaskListRequest"
resultMap=
"BaseResultMap"
>
SELECT id, system_review_task_id, car_review_task_id,
task_status,
next_node,
task_no,task_name,confidentiality_level,
task_status,task_no,task_name,confidentiality_level,
product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,vehicle_sample_information,part_sample_information,
...
...
@@ -87,7 +87,6 @@
t.leader_id,t.leader,
t.task_begin_time,
t.product_model,
t.next_node,
srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time,
srt.task_status review_status,
...
...
@@ -168,7 +167,6 @@
t.leader_id,t.leader,
t.task_begin_time,
t.task_end_time,
t.next_node,
srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time,
srt.task_status review_status,
...
...
@@ -241,7 +239,7 @@
</select>
<select
id=
"getByUserIdTemporary"
resultType=
"com.ruoyi.domain.Task"
>
SELECT id, system_review_task_id, car_review_task_id,
task_status,run_status,
next_node,
task_no,task_name,confidentiality_level,
task_status,run_status,task_no,task_name,confidentiality_level,
product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,vehicle_sample_information,part_sample_information,
...
...
@@ -254,7 +252,7 @@
</select>
<select
id=
"getBySubtaskId"
resultType=
"com.ruoyi.domain.Task"
>
SELECT id, system_review_task_id, car_review_task_id,
task_status,run_status,
next_node,
task_no,task_name,confidentiality_level,
task_status,run_status,task_no,task_name,confidentiality_level,
product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,vehicle_sample_information,part_sample_information,
...
...
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