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
4b3c5ee5
Commit
4b3c5ee5
authored
Jan 08, 2024
by
W_Y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开始一个车辆审查任务中的问卷任务
parent
7dad8312
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
160 additions
and
1 deletion
+160
-1
StrategyCarReviewTask.java
...rc/main/java/com/ruoyi/service/StrategyCarReviewTask.java
+4
-0
StrategyCarReviewTaskFinish.java
...a/com/ruoyi/service/impl/StrategyCarReviewTaskFinish.java
+44
-0
StrategyCarReviewTaskNew.java
...java/com/ruoyi/service/impl/StrategyCarReviewTaskNew.java
+60
-0
StrategyCarReviewTaskNone.java
...ava/com/ruoyi/service/impl/StrategyCarReviewTaskNone.java
+41
-0
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+11
-1
No files found.
quality-review/src/main/java/com/ruoyi/service/StrategyCarReviewTask.java
View file @
4b3c5ee5
...
...
@@ -6,4 +6,8 @@ import com.ruoyi.web.response.CarReviewTaskViewResponse;
public
interface
StrategyCarReviewTask
{
CarReviewTaskViewResponse
doView
(
CarReviewTask
carReviewTask
);
void
doStartReview
(
CarReviewTask
carReviewTask
);
void
doSubmitReview
(
CarReviewTask
carReviewTask
);
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskFinish.java
0 → 100644
View file @
4b3c5ee5
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.service.StrategyCarReviewTask
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
public
class
StrategyCarReviewTaskFinish
implements
StrategyCarReviewTask
,
InitializingBean
{
@Autowired
private
StrategyCarReviewTaskContext
strategyCarReviewTaskContext
;
@Autowired
private
ApplicationContext
applicationContext
;
// FINISH状态下
// 1.standard字段使用task中归档的问卷
// 2.不查询场景变更任务
// 3.无需联查问卷答案
@Override
public
CarReviewTaskViewResponse
doView
(
CarReviewTask
carReviewTask
)
{
CarReviewTaskViewResponse
response
=
new
CarReviewTaskViewResponse
();
response
.
setCarReviewTask
(
carReviewTask
);
return
response
;
}
@Override
public
void
doStartReview
(
CarReviewTask
carReviewTask
)
{
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
)
{
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyCarReviewTaskContext
.
putResource
(
CarReviewTask
.
REVIEW_STATUS_FINISH
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskNew.java
0 → 100644
View file @
4b3c5ee5
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.service.ReviewStandardService
;
import
com.ruoyi.service.StrategyCarReviewTask
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
java.util.List
;
public
class
StrategyCarReviewTaskNew
implements
StrategyCarReviewTask
,
InitializingBean
{
@Autowired
private
StrategyCarReviewTaskContext
strategyCarReviewTaskContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
ReviewStandardService
reviewStandardService
;
// NEW状态下
// 1.standard字段查询当前最新问卷
// 2.不查询场景变更任务
// 3.无需联查问卷答案
@Override
public
CarReviewTaskViewResponse
doView
(
CarReviewTask
carReviewTask
)
{
// 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
carReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_CAR
);
// 将问卷赋值到任务
carReviewTask
.
setStandard
(
standardTree
);
// 生成返回结果
CarReviewTaskViewResponse
response
=
new
CarReviewTaskViewResponse
();
response
.
setCarReviewTask
(
carReviewTask
);
return
response
;
}
@Override
public
void
doStartReview
(
CarReviewTask
carReviewTask
)
{
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
)
{
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyCarReviewTaskContext
.
putResource
(
CarReviewTask
.
REVIEW_STATUS_NEW
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskNone.java
0 → 100644
View file @
4b3c5ee5
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.service.StrategyCarReviewTask
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
public
class
StrategyCarReviewTaskNone
implements
StrategyCarReviewTask
,
InitializingBean
{
@Autowired
private
StrategyCarReviewTaskContext
strategyCarReviewTaskContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Override
public
CarReviewTaskViewResponse
doView
(
CarReviewTask
carReviewTask
)
{
throw
new
ServiceException
(
"不能查看一个不存在的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
doStartReview
(
CarReviewTask
carReviewTask
)
{
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
)
{
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyCarReviewTaskContext
.
putResource
(
CarReviewTask
.
REVIEW_STATUS_NONE
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
4b3c5ee5
...
...
@@ -73,6 +73,16 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
return
response
;
}
@Override
public
void
doStartReview
(
CarReviewTask
carReviewTask
)
{
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
)
{
}
private
void
setDetailsResult
(
List
<
ReviewStandard
>
standards
,
List
<
ReviewDetailsResult
>
results
)
{
Map
<
Long
,
ReviewDetailsResult
>
resultMap
=
results
.
stream
().
collect
(
Collectors
.
toMap
(
ReviewDetailsResult:
:
getReviewDetailsId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
...
...
@@ -92,6 +102,6 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyCarReviewTaskContext
.
putResource
(
CarReviewTask
.
TASK
_STATUS_PENDING
,
applicationContext
.
getBean
(
this
.
getClass
()));
strategyCarReviewTaskContext
.
putResource
(
CarReviewTask
.
REVIEW
_STATUS_PENDING
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
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