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
8ba7bb00
Commit
8ba7bb00
authored
Jan 08, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangfei' into 'dev'
Feat See merge request
!32
parents
7bf8a1ba
7fe0c2fd
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
122 additions
and
26 deletions
+122
-26
StrategyCarReviewTaskContext.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskContext.java
+4
-3
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+14
-2
StrategyReviewSceneChangeAdd.java
.../com/ruoyi/service/impl/StrategyReviewSceneChangeAdd.java
+13
-2
StrategyReviewSceneChangeContext.java
.../ruoyi/service/impl/StrategyReviewSceneChangeContext.java
+2
-3
StrategyReviewSceneChangeDelete.java
...m/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
+14
-2
StrategyReviewSceneChangeUpdate.java
...m/ruoyi/service/impl/StrategyReviewSceneChangeUpdate.java
+15
-2
StrategySystemReviewTaskClose.java
...com/ruoyi/service/impl/StrategySystemReviewTaskClose.java
+15
-2
StrategySystemReviewTaskContext.java
...m/ruoyi/service/impl/StrategySystemReviewTaskContext.java
+2
-3
StrategySystemReviewTaskFinish.java
...om/ruoyi/service/impl/StrategySystemReviewTaskFinish.java
+15
-2
StrategySystemReviewTaskNew.java
...a/com/ruoyi/service/impl/StrategySystemReviewTaskNew.java
+14
-2
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+14
-3
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskContext.java
View file @
8ba7bb00
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.service.StrategyCarReviewTask
;
import
com.ruoyi.service.StrategySystemReviewTask
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -15,11 +16,11 @@ public class StrategyCarReviewTaskContext {
@Autowired
private
final
Map
<
String
,
StrategyCarReviewTask
>
resourceMap
=
new
ConcurrentHashMap
<>();
public
StrategyCarReviewTaskContext
(
Map
<
String
,
StrategyCarReviewTask
>
strategyMap
)
{
this
.
resourceMap
.
clear
();
strategyMap
.
forEach
(
resourceMap:
:
put
);
public
void
putResource
(
String
key
,
StrategyCarReviewTask
strategyCarReviewTask
)
{
resourceMap
.
put
(
key
,
strategyCarReviewTask
);
}
public
StrategyCarReviewTask
getResource
(
String
operation
){
return
resourceMap
.
get
(
operation
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
8ba7bb00
...
...
@@ -8,7 +8,9 @@ import com.ruoyi.service.ReviewSceneChangeTaskService;
import
com.ruoyi.service.ReviewStandardService
;
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
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -18,8 +20,13 @@ import java.util.function.Function;
import
java.util.stream.Collectors
;
@Transactional
@Service
(
CarReviewTask
.
TASK_STATUS_PENDING
)
public
class
StrategyCarReviewTaskPending
implements
StrategyCarReviewTask
{
@Service
public
class
StrategyCarReviewTaskPending
implements
StrategyCarReviewTask
,
InitializingBean
{
@Autowired
private
StrategyCarReviewTaskContext
strategyCarReviewTaskContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
ReviewStandardService
reviewStandardService
;
...
...
@@ -82,4 +89,9 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask {
}
}
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyCarReviewTaskContext
.
putResource
(
CarReviewTask
.
TASK_STATUS_PENDING
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeAdd.java
View file @
8ba7bb00
...
...
@@ -5,13 +5,20 @@ import com.ruoyi.domain.ReviewSceneChangeTask;
import
com.ruoyi.mapper.ReviewSceneMapper
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Transactional
@Service
(
ReviewSceneChangeTask
.
OPERATION_ADD
)
public
class
StrategyReviewSceneChangeAdd
implements
StrategyReviewSceneChange
{
@Service
public
class
StrategyReviewSceneChangeAdd
implements
StrategyReviewSceneChange
,
InitializingBean
{
@Autowired
private
StrategyReviewSceneChangeContext
strategyReviewSceneChangeContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
ReviewSceneMapper
reviewSceneMapper
;
...
...
@@ -38,4 +45,8 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange {
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyReviewSceneChangeContext
.
putResource
(
ReviewSceneChangeTask
.
OPERATION_ADD
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeContext.java
View file @
8ba7bb00
...
...
@@ -15,9 +15,8 @@ public class StrategyReviewSceneChangeContext {
@Autowired
private
final
Map
<
String
,
StrategyReviewSceneChange
>
strategyMap
=
new
ConcurrentHashMap
<>();
public
StrategyReviewSceneChangeContext
(
Map
<
String
,
StrategyReviewSceneChange
>
strategyMap
)
{
this
.
strategyMap
.
clear
();
strategyMap
.
forEach
(
strategyMap:
:
put
);
public
void
putResource
(
String
key
,
StrategyReviewSceneChange
strategySystemReviewTask
)
{
strategyMap
.
put
(
key
,
strategySystemReviewTask
);
}
public
StrategyReviewSceneChange
getResource
(
String
operation
){
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
View file @
8ba7bb00
...
...
@@ -3,13 +3,20 @@ package com.ruoyi.service.impl;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneService
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Transactional
@Service
(
ReviewSceneChangeTask
.
OPERATION_DELETE
)
public
class
StrategyReviewSceneChangeDelete
implements
StrategyReviewSceneChange
{
@Service
public
class
StrategyReviewSceneChangeDelete
implements
StrategyReviewSceneChange
,
InitializingBean
{
@Autowired
private
StrategyReviewSceneChangeContext
strategyReviewSceneChangeContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
ReviewSceneService
reviewSceneService
;
...
...
@@ -18,4 +25,9 @@ public class StrategyReviewSceneChangeDelete implements StrategyReviewSceneChang
public
void
doChange
(
ReviewSceneChangeTask
reviewSceneChangeTask
)
{
reviewSceneService
.
removeById
(
reviewSceneChangeTask
.
getReviewSceneId
());
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyReviewSceneChangeContext
.
putResource
(
ReviewSceneChangeTask
.
OPERATION_DELETE
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeUpdate.java
View file @
8ba7bb00
...
...
@@ -4,13 +4,21 @@ import com.ruoyi.domain.ReviewScene;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneService
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Transactional
@Service
(
ReviewSceneChangeTask
.
OPERATION_UPDATE
)
public
class
StrategyReviewSceneChangeUpdate
implements
StrategyReviewSceneChange
{
@Service
public
class
StrategyReviewSceneChangeUpdate
implements
StrategyReviewSceneChange
,
InitializingBean
{
@Autowired
private
StrategyReviewSceneChangeContext
strategyReviewSceneChangeContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
ReviewSceneService
reviewSceneService
;
...
...
@@ -22,4 +30,9 @@ public class StrategyReviewSceneChangeUpdate implements StrategyReviewSceneChang
reviewSceneService
.
updateById
(
reviewScene
);
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyReviewSceneChangeContext
.
putResource
(
ReviewSceneChangeTask
.
OPERATION_UPDATE
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskClose.java
View file @
8ba7bb00
...
...
@@ -5,12 +5,20 @@ import com.ruoyi.common.exception.ServiceException;
import
com.ruoyi.domain.SystemReviewTask
;
import
com.ruoyi.service.StrategySystemReviewTask
;
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
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Transactional
@Service
(
SystemReviewTask
.
STATUS_CLOSE
)
public
class
StrategySystemReviewTaskClose
implements
StrategySystemReviewTask
{
@Service
public
class
StrategySystemReviewTaskClose
implements
StrategySystemReviewTask
,
InitializingBean
{
@Autowired
private
StrategySystemReviewTaskContext
strategySystemReviewTaskContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Override
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
...
...
@@ -39,4 +47,9 @@ public class StrategySystemReviewTaskClose implements StrategySystemReviewTask {
return
response
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategySystemReviewTaskContext
.
putResource
(
SystemReviewTask
.
STATUS_CLOSE
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskContext.java
View file @
8ba7bb00
...
...
@@ -15,9 +15,8 @@ public class StrategySystemReviewTaskContext {
@Autowired
private
final
Map
<
String
,
StrategySystemReviewTask
>
resourceMap
=
new
ConcurrentHashMap
<>();
public
StrategySystemReviewTaskContext
(
Map
<
String
,
StrategySystemReviewTask
>
strategyMap
)
{
this
.
resourceMap
.
clear
();
strategyMap
.
forEach
(
resourceMap:
:
put
);
public
void
putResource
(
String
key
,
StrategySystemReviewTask
strategySystemReviewTask
)
{
resourceMap
.
put
(
key
,
strategySystemReviewTask
);
}
public
StrategySystemReviewTask
getResource
(
String
operation
){
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskFinish.java
View file @
8ba7bb00
...
...
@@ -5,12 +5,20 @@ import com.ruoyi.common.exception.ServiceException;
import
com.ruoyi.domain.SystemReviewTask
;
import
com.ruoyi.service.StrategySystemReviewTask
;
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
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Transactional
@Service
(
SystemReviewTask
.
STATUS_FINISH
)
public
class
StrategySystemReviewTaskFinish
implements
StrategySystemReviewTask
{
@Service
public
class
StrategySystemReviewTaskFinish
implements
StrategySystemReviewTask
,
InitializingBean
{
@Autowired
private
StrategySystemReviewTaskContext
strategySystemReviewTaskContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Override
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
...
...
@@ -39,4 +47,9 @@ public class StrategySystemReviewTaskFinish implements StrategySystemReviewTask
return
response
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategySystemReviewTaskContext
.
putResource
(
SystemReviewTask
.
STATUS_FINISH
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskNew.java
View file @
8ba7bb00
...
...
@@ -8,7 +8,9 @@ import com.ruoyi.mapper.SystemReviewTaskMapper;
import
com.ruoyi.service.ReviewStandardService
;
import
com.ruoyi.service.StrategySystemReviewTask
;
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
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -16,8 +18,13 @@ import java.util.Date;
import
java.util.List
;
@Transactional
@Service
(
SystemReviewTask
.
STATUS_NEW
)
public
class
StrategySystemReviewTaskNew
implements
StrategySystemReviewTask
{
@Service
public
class
StrategySystemReviewTaskNew
implements
StrategySystemReviewTask
,
InitializingBean
{
@Autowired
private
StrategySystemReviewTaskContext
strategySystemReviewTaskContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
ReviewStandardService
reviewStandardService
;
...
...
@@ -63,4 +70,9 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask {
return
response
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategySystemReviewTaskContext
.
putResource
(
SystemReviewTask
.
STATUS_NEW
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
8ba7bb00
...
...
@@ -9,7 +9,9 @@ import com.ruoyi.mapper.ReviewDetailsResultMapper;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.service.*
;
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
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -20,8 +22,13 @@ import java.util.function.Function;
import
java.util.stream.Collectors
;
@Transactional
@Service
(
SystemReviewTask
.
STATUS_PENDING
+
"SystemReviewTask"
)
public
class
StrategySystemReviewTaskPending
implements
StrategySystemReviewTask
{
@Service
public
class
StrategySystemReviewTaskPending
implements
StrategySystemReviewTask
,
InitializingBean
{
@Autowired
private
StrategySystemReviewTaskContext
strategySystemReviewTaskContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
ReviewStandardService
reviewStandardService
;
...
...
@@ -38,7 +45,6 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Autowired
private
ReviewDetailsResultMapper
reviewDetailsResultMapper
;
@Override
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
throw
new
ServiceException
(
"不能开始一个已经开始的任务"
,
HttpStatus
.
ERROR
);
...
...
@@ -130,4 +136,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
}
}
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategySystemReviewTaskContext
.
putResource
(
SystemReviewTask
.
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