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
c61358c5
Commit
c61358c5
authored
Mar 05, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开始任务,预览留档文件
parent
84e1cf7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
7 deletions
+30
-7
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
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+2
-0
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
View file @
c61358c5
...
@@ -7,8 +7,10 @@ import com.ruoyi.common.core.domain.model.LoginUser;
...
@@ -7,8 +7,10 @@ import com.ruoyi.common.core.domain.model.LoginUser;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.ReviewEnterpriseArchive
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.service.ReviewEnterpriseArchiveService
;
import
com.ruoyi.service.ReviewEnterpriseArchiveService
;
import
com.ruoyi.mapper.ReviewEnterpriseArchiveMapper
;
import
com.ruoyi.mapper.ReviewEnterpriseArchiveMapper
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.system.service.ISysUserService
;
...
@@ -41,14 +43,29 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
...
@@ -41,14 +43,29 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
@Autowired
@Autowired
private
ReviewEnterpriseArchiveService
reviewEnterpriseArchiveService
;
private
ReviewEnterpriseArchiveService
reviewEnterpriseArchiveService
;
@Autowired
private
TaskMapper
taskMapper
;
@Override
@Override
public
List
<
ReviewEnterpriseArchiveViewVO
>
view
(
Long
taskId
)
{
public
List
<
ReviewEnterpriseArchiveViewVO
>
view
(
Long
taskId
)
{
Task
task
=
taskMapper
.
selectById
(
taskId
);
List
<
ReviewEnterpriseArchive
>
archives
=
reviewEnterpriseArchiveMapper
.
findByTaskId
(
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
@Override
...
@@ -111,6 +128,7 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
...
@@ -111,6 +128,7 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
}
}
private
void
setReviewEnterpriseArchiveViewItemVO
(
ReviewEnterpriseArchiveViewVO
view
,
List
<
ReviewEnterpriseArchiveViewItemVO
>
viewItems
)
{
private
void
setReviewEnterpriseArchiveViewItemVO
(
ReviewEnterpriseArchiveViewVO
view
,
List
<
ReviewEnterpriseArchiveViewItemVO
>
viewItems
)
{
if
(
viewItems
==
null
)
return
;
List
<
ReviewEnterpriseArchiveViewItemVO
>
subList
=
new
ArrayList
();
List
<
ReviewEnterpriseArchiveViewItemVO
>
subList
=
new
ArrayList
();
Long
archiveId
=
view
.
getId
();
Long
archiveId
=
view
.
getId
();
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
View file @
c61358c5
package
com
.
ruoyi
.
service
.
impl
;
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.domain.Task
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.service.SystemReviewTaskService
;
import
com.ruoyi.service.SystemReviewTaskService
;
...
@@ -29,15 +31,16 @@ public abstract class TaskStateAdapter implements TaskState {
...
@@ -29,15 +31,16 @@ public abstract class TaskStateAdapter implements TaskState {
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_SRAIF
))
{
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_SRAIF
))
{
systemReviewTaskService
.
start
(
task
.
getSystemReviewTaskId
());
systemReviewTaskService
.
start
(
task
.
getSystemReviewTaskId
());
task
.
setNextNode
(
Task
.
SUB_TASK_GRFIS
);
taskService
.
updateById
(
task
);
taskService
.
updateById
(
task
);
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_GRFIS
))
{
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_GRFIS
))
{
carReviewTaskService
.
startReviewTask
(
task
.
getCarReviewTaskId
());
carReviewTaskService
.
startReviewTask
(
task
.
getCarReviewTaskId
());
task
.
setNextNode
(
Task
.
SUB_TASK_TRFIS
);
taskService
.
updateById
(
task
);
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 @
c61358c5
...
@@ -14,7 +14,7 @@ import java.util.List;
...
@@ -14,7 +14,7 @@ import java.util.List;
@Transactional
@Transactional
@Service
@Service
public
class
TaskStateFinish
implements
TaskState
,
InitializingBean
{
public
class
TaskStateFinish
extends
TaskStateAdapter
implements
TaskState
,
InitializingBean
{
@Autowired
@Autowired
private
TaskStateContext
taskStateContext
;
private
TaskStateContext
taskStateContext
;
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
c61358c5
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
<result
property=
"standardNo"
column=
"standard_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardNo"
column=
"standard_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"file"
column=
"file"
jdbcType=
"VARCHAR"
/>
<result
property=
"file"
column=
"file"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskList"
column=
"task_list"
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>
<resultMap
id=
"ResponseMap"
type=
"com.ruoyi.web.response.TaskFindResponse"
>
<resultMap
id=
"ResponseMap"
type=
"com.ruoyi.web.response.TaskFindResponse"
>
...
...
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