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
bd8e432b
Commit
bd8e432b
authored
Jan 09, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
Id添加注解 See merge request
!35
parents
48b172b3
f5aa997c
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
179 additions
and
74 deletions
+179
-74
CarReviewTask.java
...-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
+3
-0
ReviewDetails.java
...-review/src/main/java/com/ruoyi/domain/ReviewDetails.java
+1
-0
ReviewDetailsResult.java
...w/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
+3
-0
ReviewKeyPoint.java
...review/src/main/java/com/ruoyi/domain/ReviewKeyPoint.java
+1
-0
ReviewScene.java
...ty-review/src/main/java/com/ruoyi/domain/ReviewScene.java
+1
-0
ReviewSceneChangeTask.java
...src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
+5
-0
ReviewSceneChangeTaskUserRelation.java
...a/com/ruoyi/domain/ReviewSceneChangeTaskUserRelation.java
+3
-1
ReviewStandard.java
...review/src/main/java/com/ruoyi/domain/ReviewStandard.java
+1
-0
ReviewTaskInbox.java
...eview/src/main/java/com/ruoyi/domain/ReviewTaskInbox.java
+2
-0
ReviewTaskUserRelation.java
...rc/main/java/com/ruoyi/domain/ReviewTaskUserRelation.java
+1
-0
SystemReviewTask.java
...view/src/main/java/com/ruoyi/domain/SystemReviewTask.java
+3
-0
CarReviewTaskMapper.java
...w/src/main/java/com/ruoyi/mapper/CarReviewTaskMapper.java
+2
-0
CarReviewTaskService.java
...src/main/java/com/ruoyi/service/CarReviewTaskService.java
+0
-6
CarReviewTaskServiceImpl.java
...java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
+6
-6
StrategyCarReviewTaskFinish.java
...a/com/ruoyi/service/impl/StrategyCarReviewTaskFinish.java
+4
-0
StrategyCarReviewTaskNew.java
...java/com/ruoyi/service/impl/StrategyCarReviewTaskNew.java
+4
-0
StrategyCarReviewTaskNone.java
...ava/com/ruoyi/service/impl/StrategyCarReviewTaskNone.java
+4
-0
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+35
-24
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+34
-25
SystemReviewTaskServiceImpl.java
...a/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
+2
-7
CarReviewTaskController.java
.../src/main/java/com/ruoyi/web/CarReviewTaskController.java
+39
-4
CarReviewTaskFindFinishRequest.java
...com/ruoyi/web/request/CarReviewTaskFindFinishRequest.java
+8
-0
CarReviewTaskFindPendingRequest.java
...om/ruoyi/web/request/CarReviewTaskFindPendingRequest.java
+8
-0
CarReviewTaskStartRequest.java
...java/com/ruoyi/web/request/CarReviewTaskStartRequest.java
+4
-0
CarReviewTaskMapper.xml
...-review/src/main/resources/mapper/CarReviewTaskMapper.xml
+5
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
View file @
bd8e432b
...
...
@@ -118,6 +118,7 @@ public class CarReviewTask implements Serializable {
/**
* 审查组长id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审查组长id"
)
private
Long
leaderId
;
...
...
@@ -130,6 +131,7 @@ public class CarReviewTask implements Serializable {
/**
* 关联标准表id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联标准表id"
)
private
Long
standardId
;
...
...
@@ -178,6 +180,7 @@ public class CarReviewTask implements Serializable {
/**
* 车型问卷提交人id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"车型问卷提交人id"
)
private
Long
reviewSubmitId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewDetails.java
View file @
bd8e432b
...
...
@@ -36,6 +36,7 @@ public class ReviewDetails {
/**
* 审查要点id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审查要点id"
)
private
Long
reviewKeypointId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
View file @
bd8e432b
...
...
@@ -48,18 +48,21 @@ public class ReviewDetailsResult implements Serializable {
/**
* 关联到的细则id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联到的细则id"
)
private
Long
reviewDetailsId
;
/**
* 关联的任务id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联的任务id"
)
private
Long
taskId
;
/**
* 审核人id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审核人id"
)
private
Long
userId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewKeyPoint.java
View file @
bd8e432b
...
...
@@ -36,6 +36,7 @@ public class ReviewKeyPoint {
/**
* 审查标准id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审查标准id"
)
private
Long
reviewStandardId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewScene.java
View file @
bd8e432b
...
...
@@ -35,6 +35,7 @@ public class ReviewScene {
/**
* 审查细则id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审查细则id"
)
private
Long
reviewDetailsId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
View file @
bd8e432b
...
...
@@ -70,6 +70,7 @@ public class ReviewSceneChangeTask {
/**
* 审查标准id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审查标准id"
)
private
Long
standardId
;
...
...
@@ -88,6 +89,7 @@ public class ReviewSceneChangeTask {
/**
* 审查要点id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审查要点id"
)
private
Long
keypointId
;
...
...
@@ -100,6 +102,7 @@ public class ReviewSceneChangeTask {
/**
* 审查细则id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审查细则id"
)
private
Long
detailsId
;
...
...
@@ -142,6 +145,7 @@ public class ReviewSceneChangeTask {
/**
* 任务发起人Id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"任务发起人Id"
)
private
Long
taskInitiatorId
;
...
...
@@ -180,6 +184,7 @@ public class ReviewSceneChangeTask {
* 若为修改、删除任务时,此id在创建任务时赋值
* 若为新增任务时,此id在审批通过并保存新场景后赋值
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
value
=
"审查场景id"
,
notes
=
"1.若为修改、删除任务时,此id在创建任务时赋值; 2.若为新增任务时,此id在审批通过并保存新场景后赋值 "
)
private
Long
reviewSceneId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTaskUserRelation.java
View file @
bd8e432b
...
...
@@ -38,12 +38,14 @@ public class ReviewSceneChangeTaskUserRelation {
/**
* 任务id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"任务id"
)
private
Long
taskId
;
/**
* 用户id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"用户id"
)
private
Long
userId
;
...
...
@@ -77,4 +79,4 @@ public class ReviewSceneChangeTaskUserRelation {
@ApiModelProperty
(
"部门名称"
)
private
String
dept
;
}
\ No newline at end of file
}
quality-review/src/main/java/com/ruoyi/domain/ReviewStandard.java
View file @
bd8e432b
...
...
@@ -60,6 +60,7 @@ public class ReviewStandard {
/**
* 关联标准表id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联标准表id"
)
private
Long
standardId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewTaskInbox.java
View file @
bd8e432b
...
...
@@ -29,12 +29,14 @@ public class ReviewTaskInbox {
/**
* 体系审查任务id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"体系审查任务id"
)
private
Long
reviewTaskId
;
/**
* 场景变更任务id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"场景变更任务id"
)
private
Long
reviewSceneChangeTaskId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewTaskUserRelation.java
View file @
bd8e432b
...
...
@@ -30,6 +30,7 @@ public class ReviewTaskUserRelation {
/**
* 用户id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"用户id"
)
private
Long
userId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/SystemReviewTask.java
View file @
bd8e432b
...
...
@@ -100,6 +100,7 @@ public class SystemReviewTask {
/**
* 审核组长id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审核组长id"
)
private
Long
leaderId
;
...
...
@@ -118,6 +119,7 @@ public class SystemReviewTask {
/**
* 关联标准表id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
standardId
;
/**
...
...
@@ -138,6 +140,7 @@ public class SystemReviewTask {
/**
* 提交人id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
submitById
;
/**
...
...
quality-review/src/main/java/com/ruoyi/mapper/CarReviewTaskMapper.java
View file @
bd8e432b
...
...
@@ -17,6 +17,8 @@ import java.util.List;
public
interface
CarReviewTaskMapper
extends
BaseMapper
<
CarReviewTask
>
{
List
<
CarReviewTask
>
findListByReviewStatus
(
@Param
(
"reviewStatus"
)
String
reviewStatus
);
List
<
CarReviewTask
>
findListByTaskStatus
(
@Param
(
"taskStatus"
)
String
taskStatus
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/CarReviewTaskService.java
View file @
bd8e432b
...
...
@@ -53,12 +53,6 @@ public interface CarReviewTaskService extends IService<CarReviewTask> {
*/
List
<
CarReviewTask
>
findListByStatus
(
String
status
);
/**
* 查询处理中的任务
* @return
*/
List
<
CarReviewTask
>
findListInProcess
();
}
quality-review/src/main/java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
View file @
bd8e432b
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SnowflakeUtil
;
import
com.ruoyi.domain.*
;
...
...
@@ -129,18 +131,16 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
@Override
public
void
submitReviewTask
(
CarReviewTaskSubmitRequest
request
)
{
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
request
.
getTaskId
());
CarReviewTask
carReviewTask
=
carReviewTaskService
.
getById
(
request
.
getTaskId
());
strategyCarReviewTaskContext
.
getResource
(
carReviewTask
.
getReviewStatus
()).
doSubmitReview
(
carReviewTask
);
}
@Override
public
List
<
CarReviewTask
>
findListByStatus
(
String
status
)
{
return
null
;
return
carReviewTaskMapper
.
findListByTaskStatus
(
status
)
;
}
@Override
public
List
<
CarReviewTask
>
findListInProcess
()
{
return
null
;
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskFinish.java
View file @
bd8e432b
...
...
@@ -8,7 +8,11 @@ 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
StrategyCarReviewTaskFinish
implements
StrategyCarReviewTask
,
InitializingBean
{
@Autowired
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskNew.java
View file @
bd8e432b
...
...
@@ -12,10 +12,14 @@ 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
;
import
java.util.Date
;
import
java.util.List
;
@Transactional
@Service
public
class
StrategyCarReviewTaskNew
implements
StrategyCarReviewTask
,
InitializingBean
{
@Autowired
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskNone.java
View file @
bd8e432b
...
...
@@ -8,7 +8,11 @@ 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
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
bd8e432b
...
...
@@ -6,6 +6,7 @@ import com.ruoyi.common.exception.ServiceException;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.CarReviewTaskMapper
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.service.ReviewDetailsResultService
;
...
...
@@ -49,6 +50,9 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Autowired
private
ReviewDetailsResultMapper
reviewDetailsResultMapper
;
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
// PENDING状态下
// 1.standard字段查询当前最新问卷
// 2.查询场景变更任务
...
...
@@ -87,33 +91,40 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Override
public
void
doSubmitReview
(
CarReviewTask
carReviewTask
)
{
// 1. 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
carReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_CAR
);
// 2. 所有细则必须有对应答案
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
carReviewTask
.
getId
());
// 3. 将最终问卷归档到 standard 字段
setDetailsResult
(
standardTree
,
results
);
carReviewTask
.
setStandard
(
standardTree
);
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
carReviewTask
.
getId
());
// 4. 填充review_submit_time
carReviewTask
.
setReviewSubmitTime
(
new
Date
());
// 5. 修改任务状态为 FINISH
carReviewTask
.
setReviewStatus
(
CarReviewTask
.
REVIEW_STATUS_FINISH
);
// 6. 填写当前用户id
// 获取当前登陆人
SysUser
loginUser
=
SecurityUtils
.
getLoginUser
().
getUser
();
carReviewTask
.
setReviewSubmitId
(
loginUser
.
getUserId
());
carReviewTask
.
setReviewSubmitName
(
loginUser
.
getNickName
());
// 7. 设置问卷结果
if
(
reviewDetailsResultMapper
.
findNotPass
(
carReviewTask
.
getId
())
>
0
)
{
carReviewTask
.
setReviewResult
(
"REJECT"
);
if
(
detailsList
!=
null
)
{
throw
new
ServiceException
(
"存在未填写的问卷,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
}
else
{
carReviewTask
.
setReviewResult
(
"PASS"
);
// 1. 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
carReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_CAR
);
// 2. 所有细则必须有对应答案
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
carReviewTask
.
getId
());
// 3. 将最终问卷归档到 standard 字段
setDetailsResult
(
standardTree
,
results
);
carReviewTask
.
setStandard
(
standardTree
);
// 4. 填充review_submit_time
carReviewTask
.
setReviewSubmitTime
(
new
Date
());
// 5. 修改任务状态为 FINISH
carReviewTask
.
setReviewStatus
(
CarReviewTask
.
REVIEW_STATUS_FINISH
);
// 6. 填写当前用户id
// 获取当前登陆人
SysUser
loginUser
=
SecurityUtils
.
getLoginUser
().
getUser
();
carReviewTask
.
setReviewSubmitId
(
loginUser
.
getUserId
());
carReviewTask
.
setReviewSubmitName
(
loginUser
.
getNickName
());
// 7. 设置问卷结果
if
(
reviewDetailsResultMapper
.
findNotPass
(
carReviewTask
.
getId
())
>
0
)
{
carReviewTask
.
setReviewResult
(
"REJECT"
);
}
else
{
carReviewTask
.
setReviewResult
(
"PASS"
);
}
carReviewTaskMapper
.
updateById
(
carReviewTask
);
}
carReviewTaskMapper
.
updateById
(
carReviewTask
);
}
private
void
setDetailsResult
(
List
<
ReviewStandard
>
standards
,
List
<
ReviewDetailsResult
>
results
)
{
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
bd8e432b
...
...
@@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.service.*
;
...
...
@@ -45,6 +46,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Autowired
private
ReviewDetailsResultMapper
reviewDetailsResultMapper
;
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
@Override
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
throw
new
ServiceException
(
"不能开始一个已经开始的任务"
,
HttpStatus
.
ERROR
);
...
...
@@ -53,33 +57,38 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Override
public
void
doSubmit
(
SystemReviewTask
systemReviewTask
)
{
// TODO
// 1. 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
systemReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_SYSTEM
);
// 2. 所有细则必须有对应答案
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
systemReviewTask
.
getId
());
// 3. 将最终问卷归档到 standard 字段
setDetailsResult
(
standardTree
,
results
);
systemReviewTask
.
setStandard
(
standardTree
);
// 4. 填充task_end_time
systemReviewTask
.
setTaskEndTime
(
new
Date
());
// 5. 修改任务状态为 FINISH
systemReviewTask
.
setTaskStatus
(
SystemReviewTask
.
STATUS_FINISH
);
// 6. 填写当前用户id
// 获取当前登陆人
SysUser
loginUser
=
SecurityUtils
.
getLoginUser
().
getUser
();
systemReviewTask
.
setSubmitById
(
loginUser
.
getUserId
());
systemReviewTask
.
setSubmitByName
(
loginUser
.
getNickName
());
// 7. 设置问卷结果
if
(
reviewDetailsResultMapper
.
findNotPass
(
systemReviewTask
.
getId
())
>
0
)
{
systemReviewTask
.
setTaskResult
(
"REJECT"
);
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
systemReviewTask
.
getId
());
if
(
detailsList
!=
null
)
{
throw
new
ServiceException
(
"存在未填写的问卷,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
}
else
{
systemReviewTask
.
setTaskResult
(
"PASS"
);
// 1. 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
systemReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_SYSTEM
);
// 2. 所有细则必须有对应答案
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
systemReviewTask
.
getId
());
// 3. 将最终问卷归档到 standard 字段
setDetailsResult
(
standardTree
,
results
);
systemReviewTask
.
setStandard
(
standardTree
);
// 4. 填充task_end_time
systemReviewTask
.
setTaskEndTime
(
new
Date
());
// 5. 修改任务状态为 FINISH
systemReviewTask
.
setTaskStatus
(
SystemReviewTask
.
STATUS_FINISH
);
// 6. 填写当前用户id
// 获取当前登陆人
SysUser
loginUser
=
SecurityUtils
.
getLoginUser
().
getUser
();
systemReviewTask
.
setSubmitById
(
loginUser
.
getUserId
());
systemReviewTask
.
setSubmitByName
(
loginUser
.
getNickName
());
// 7. 设置问卷结果
if
(
reviewDetailsResultMapper
.
findNotPass
(
systemReviewTask
.
getId
())
>
0
)
{
systemReviewTask
.
setTaskResult
(
"REJECT"
);
}
else
{
systemReviewTask
.
setTaskResult
(
"PASS"
);
}
systemReviewTaskMapper
.
updateById
(
systemReviewTask
);
}
systemReviewTaskMapper
.
updateById
(
systemReviewTask
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
View file @
bd8e432b
...
...
@@ -120,13 +120,8 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
@Override
public
void
submit
(
SystemReviewTaskSubmitRequest
request
)
{
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
request
.
getTaskId
());
if
(
detailsList
!=
null
)
{
throw
new
ServiceException
(
"存在未填写的问卷,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
}
else
{
SystemReviewTask
systemReviewTask
=
systemReviewTaskService
.
getById
(
request
.
getTaskId
());
strategySystemReviewTaskContext
.
getResource
(
systemReviewTask
.
getTaskStatus
()).
doSubmit
(
systemReviewTask
);
}
SystemReviewTask
systemReviewTask
=
systemReviewTaskService
.
getById
(
request
.
getTaskId
());
strategySystemReviewTaskContext
.
getResource
(
systemReviewTask
.
getTaskStatus
()).
doSubmit
(
systemReviewTask
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/CarReviewTaskController.java
View file @
bd8e432b
...
...
@@ -3,11 +3,11 @@ package com.ruoyi.web;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.web.request.CarReviewTaskCreateRequest
;
import
com.ruoyi.web.request.CarReviewTaskViewRequest
;
import
com.ruoyi.web.request.SystemReviewTaskViewRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
io.swagger.annotations.Api
;
...
...
@@ -40,7 +40,7 @@ public class CarReviewTaskController extends BaseController {
return
R
.
ok
();
}
@ApiOperation
(
"查看车辆审查任务详情"
)
@ApiOperation
(
"查看车辆
问卷
审查任务详情"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/view"
)
...
...
@@ -49,5 +49,40 @@ public class CarReviewTaskController extends BaseController {
return
R
.
ok
(
carReviewTaskViewResponse
);
}
@ApiOperation
(
"启动车辆问卷审查任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/startReview"
)
public
R
<
String
>
startReview
(
@Validated
@RequestBody
CarReviewTaskStartRequest
request
)
{
carReviewTaskService
.
startReviewTask
(
request
);
return
R
.
ok
();
}
@ApiOperation
(
"提交车辆问卷审查任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/submitReview"
)
public
R
<
String
>
submitReview
(
@Validated
@RequestBody
CarReviewTaskSubmitRequest
request
)
{
carReviewTaskService
.
submitReviewTask
(
request
);
return
R
.
ok
();
}
@ApiOperation
(
"查询处理中的任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findPending"
)
public
TableDataInfo
<
CarReviewTask
>
findPending
(
@Validated
@RequestBody
CarReviewTaskFindPendingRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
carReviewTaskService
.
findListByStatus
(
CarReviewTask
.
TASK_STATUS_PENDING
));
}
@ApiOperation
(
"查询处理完成的任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findFinish"
)
public
TableDataInfo
<
CarReviewTask
>
findFinish
(
@Validated
@RequestBody
CarReviewTaskFindFinishRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
carReviewTaskService
.
findListByStatus
(
CarReviewTask
.
TASK_STATUS_FINISH
));
}
}
quality-review/src/main/java/com/ruoyi/web/request/CarReviewTaskFindFinishRequest.java
0 → 100644
View file @
bd8e432b
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
@ApiModel
public
class
CarReviewTaskFindFinishRequest
extends
PageDomain
{
}
quality-review/src/main/java/com/ruoyi/web/request/CarReviewTaskFindPendingRequest.java
0 → 100644
View file @
bd8e432b
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
@ApiModel
public
class
CarReviewTaskFindPendingRequest
extends
PageDomain
{
}
quality-review/src/main/java/com/ruoyi/web/request/CarReviewTaskStartRequest.java
View file @
bd8e432b
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"CarReviewTaskStartRequest"
,
description
=
"启动车辆问卷审查任务"
)
@Data
public
class
CarReviewTaskStartRequest
{
@ApiModelProperty
(
"任务id"
)
private
Long
taskId
;
}
quality-review/src/main/resources/mapper/CarReviewTaskMapper.xml
View file @
bd8e432b
...
...
@@ -46,6 +46,10 @@
</sql>
<select
id=
"findListByReviewStatus"
resultType=
"com.ruoyi.domain.CarReviewTask"
>
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,biz_info,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result
FROM t_system_review_task WHERE review_status = #{reviewStatus} AND task_status = 'PENDING'
FROM t_car_review_task WHERE review_status = #{reviewStatus} AND task_status = 'PENDING'
</select>
<select
id=
"findListByTaskStatus"
resultType=
"com.ruoyi.domain.CarReviewTask"
>
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,biz_info,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result
FROM t_car_review_task WHERE task_status = #{taskStatus}
</select>
</mapper>
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