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
d4347e51
Commit
d4347e51
authored
Jan 26, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
车辆问卷状态修改 See merge request
!60
parents
53225c24
3ffee819
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
60 deletions
+22
-60
CarReviewTask.java
...-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
+1
-3
Task.java
quality-review/src/main/java/com/ruoyi/domain/Task.java
+6
-1
CarReviewTaskServiceImpl.java
...java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
+0
-2
StrategyCarReviewTaskNone.java
...ava/com/ruoyi/service/impl/StrategyCarReviewTaskNone.java
+0
-50
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+8
-3
TaskFindPendingResponse.java
.../java/com/ruoyi/web/response/TaskFindPendingResponse.java
+3
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+4
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
View file @
d4347e51
...
...
@@ -27,8 +27,6 @@ public class CarReviewTask implements Serializable {
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_NONE
=
"NONE"
;
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_NEW
=
"NEW"
;
@TableField
(
exist
=
false
)
...
...
@@ -55,7 +53,7 @@ public class CarReviewTask implements Serializable {
/**
* 任务状态(PENDING、FINISH)
*/
@ApiModelProperty
(
"任务状态[N
ONE、N
EW、PENDING、FINISH]"
)
@ApiModelProperty
(
"任务状态[NEW、PENDING、FINISH]"
)
private
String
taskStatus
;
/**
...
...
quality-review/src/main/java/com/ruoyi/domain/Task.java
View file @
d4347e51
...
...
@@ -24,7 +24,9 @@ import java.util.List;
public
class
Task
{
@TableField
(
exist
=
false
)
public
static
final
String
STATUS_NEW
=
"NEW"
;
public
static
final
String
STATUS_RUNNABLE
=
"RUNNABLE"
;
@TableField
(
exist
=
false
)
public
static
final
String
STATUS_RUNNING
=
"RUNNING"
;
@TableField
(
exist
=
false
)
public
static
final
String
STATUS_FINISH
=
"FINISH"
;
...
...
@@ -59,6 +61,9 @@ public class Task {
@ApiModelProperty
(
"任务状态(NEW、FINISH)"
)
private
String
taskStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
...
...
quality-review/src/main/java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
View file @
d4347e51
...
...
@@ -93,8 +93,6 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
.
setFile
(
standard
.
getFile
());
if
(
request
.
getReview
())
{
task
.
setTaskStatus
(
CarReviewTask
.
TASK_STATUS_NEW
);
}
else
{
task
.
setTaskStatus
(
CarReviewTask
.
TASK_STATUS_NONE
);
}
carReviewTaskService
.
save
(
task
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskNone.java
deleted
100644 → 0
View file @
53225c24
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
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Transactional
@Service
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
)
{
throw
new
ServiceException
(
"不能开始一个不存在的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
doConfirmReview
(
CarReviewTask
carReviewTask
)
{
throw
new
ServiceException
(
"不能确认一个不存在的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
,
String
imagesUrl
)
{
throw
new
ServiceException
(
"不能提交一个不存在的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyCarReviewTaskContext
.
putResource
(
CarReviewTask
.
TASK_STATUS_NONE
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
d4347e51
...
...
@@ -86,7 +86,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
Task
task
=
new
Task
();
task
.
setTaskInitiator
(
initiator
.
getNickName
());
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
task
.
setTaskStatus
(
Task
.
STATUS_
NEW
);
task
.
setTaskStatus
(
Task
.
STATUS_
RUNNABLE
);
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeader
(
leader
.
getName
());
task
.
setCreateTime
(
new
Date
());
...
...
@@ -101,9 +101,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
Long
carReviewTaskId
=
null
;
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
))
{
task
.
setNextNode
(
Task
.
SUB_TASK_SRAIF
);
// 保存体系审查任务
systemReviewTaskId
=
saveSystemReview
(
request
,
initiator
,
standard
,
leader
);
}
else
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
))
{
task
.
setNextNode
(
Task
.
SUB_TASK_GRFIS
);
}
else
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_TRFIS
))
{
task
.
setNextNode
(
Task
.
SUB_TASK_TRFIS
);
}
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
))
{
// 保存车型审查问卷任务
carReviewTaskId
=
saveCarReview
(
request
,
initiator
,
standard
,
leader
);
...
...
@@ -207,11 +213,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
.
setTaskNo
(
request
.
getTaskNo
())
.
setTaskInitiator
(
initiator
.
getNickName
())
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
())
.
setTaskStatus
(
taskList
.
contains
(
Task
.
SUB_TASK_GRFIS
)
?
CarReviewTask
.
TASK_STATUS_NEW
:
CarReviewTask
.
TASK_STATUS_NONE
)
.
setTaskStatus
(
CarReviewTask
.
TASK_STATUS_NEW
)
.
setLeaderId
(
leader
.
getUserId
())
.
setLeader
(
leader
.
getName
())
.
setCreateTime
(
new
Date
())
.
setTaskBeginTime
(
new
Date
())
.
setStandardId
(
standard
.
getId
())
.
setName
(
standard
.
getName
())
.
setStandardNo
(
standard
.
getStandardNo
())
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskFindPendingResponse.java
View file @
d4347e51
...
...
@@ -32,6 +32,9 @@ public class TaskFindPendingResponse {
@ApiModelProperty
(
"任务状态(NEW、PENDING、FINISH)"
)
private
String
taskStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
@ApiModelProperty
(
"总任务开始时间"
)
private
Date
taskBeginTime
;
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
d4347e51
...
...
@@ -11,6 +11,7 @@
<result
property=
"taskNo"
column=
"task_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskName"
column=
"task_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"nextNode"
column=
"next_node"
jdbcType=
"VARCHAR"
/>
<result
property=
"productName"
column=
"product_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"productModel"
column=
"product_model"
jdbcType=
"VARCHAR"
/>
<result
property=
"entrustedUnit"
column=
"entrusted_unit"
jdbcType=
"VARCHAR"
/>
...
...
@@ -49,6 +50,7 @@
<result
property=
"taskNo"
column=
"task_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskName"
column=
"task_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"nextNode"
column=
"next_node"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskBeginTime"
column=
"task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"systemTaskBeginTime"
column=
"system_task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"systemTaskEndTime"
column=
"system_task_end_time"
jdbcType=
"TIMESTAMP"
/>
...
...
@@ -62,7 +64,7 @@
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.TaskListRequest"
resultMap=
"BaseResultMap"
>
SELECT id, system_review_task_id, car_review_task_id,
task_no,task_name,task_status,product_name,product_model,
task_no,task_name,task_status,
next_node,
product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,car_type,car_identification_code,
confidentiality_level,sample_name,production_id,production_enterprise,
...
...
@@ -87,6 +89,7 @@
t.task_no,t.task_name,t.task_status,
t.leader_id,t.leader,
t.task_begin_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,
...
...
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