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
5c600d1f
Commit
5c600d1f
authored
Jan 17, 2024
by
W_Y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
确认场景变更信息&问卷确认接口修改
parent
df0c0495
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
103 additions
and
1 deletion
+103
-1
ReviewTaskInboxMapper.java
...src/main/java/com/ruoyi/mapper/ReviewTaskInboxMapper.java
+9
-0
ReviewTaskInboxService.java
...c/main/java/com/ruoyi/service/ReviewTaskInboxService.java
+3
-0
ReviewTaskInboxServiceImpl.java
...va/com/ruoyi/service/impl/ReviewTaskInboxServiceImpl.java
+15
-0
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+7
-0
ReviewTaskInboxController.java
...rc/main/java/com/ruoyi/web/ReviewTaskInboxController.java
+38
-0
ReviewTaskInboxConfirmRequest.java
.../com/ruoyi/web/request/ReviewTaskInboxConfirmRequest.java
+19
-0
ReviewTaskInboxMapper.xml
...eview/src/main/resources/mapper/ReviewTaskInboxMapper.xml
+12
-1
No files found.
quality-review/src/main/java/com/ruoyi/mapper/ReviewTaskInboxMapper.java
View file @
5c600d1f
...
@@ -2,6 +2,10 @@ package com.ruoyi.mapper;
...
@@ -2,6 +2,10 @@ package com.ruoyi.mapper;
import
com.ruoyi.domain.ReviewTaskInbox
;
import
com.ruoyi.domain.ReviewTaskInbox
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
/**
* @author wangfei
* @author wangfei
...
@@ -9,8 +13,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -9,8 +13,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @createDate 2023-12-26 09:55:39
* @createDate 2023-12-26 09:55:39
* @Entity com.ruoyi.domain.SystemReviewTaskInbox
* @Entity com.ruoyi.domain.SystemReviewTaskInbox
*/
*/
@Repository
public
interface
ReviewTaskInboxMapper
extends
BaseMapper
<
ReviewTaskInbox
>
{
public
interface
ReviewTaskInboxMapper
extends
BaseMapper
<
ReviewTaskInbox
>
{
List
<
ReviewTaskInbox
>
findConfirmListByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
List
<
ReviewTaskInbox
>
findConfirmList
(
@Param
(
"reviewTaskId"
)
Long
reviewTaskId
,
@Param
(
"detailsId"
)
Long
detailsId
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/ReviewTaskInboxService.java
View file @
5c600d1f
...
@@ -2,6 +2,7 @@ package com.ruoyi.service;
...
@@ -2,6 +2,7 @@ package com.ruoyi.service;
import
com.ruoyi.domain.ReviewTaskInbox
;
import
com.ruoyi.domain.ReviewTaskInbox
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.web.request.ReviewTaskInboxConfirmRequest
;
/**
/**
* @author wangfei
* @author wangfei
...
@@ -16,4 +17,6 @@ public interface ReviewTaskInboxService extends IService<ReviewTaskInbox> {
...
@@ -16,4 +17,6 @@ public interface ReviewTaskInboxService extends IService<ReviewTaskInbox> {
*/
*/
void
saveNotify
(
Long
reviewSceneChangeTaskId
,
String
type
);
void
saveNotify
(
Long
reviewSceneChangeTaskId
,
String
type
);
void
confirm
(
ReviewTaskInboxConfirmRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewTaskInboxServiceImpl.java
View file @
5c600d1f
...
@@ -11,6 +11,7 @@ import com.ruoyi.service.CarReviewTaskService;
...
@@ -11,6 +11,7 @@ import com.ruoyi.service.CarReviewTaskService;
import
com.ruoyi.service.ReviewTaskInboxService
;
import
com.ruoyi.service.ReviewTaskInboxService
;
import
com.ruoyi.mapper.ReviewTaskInboxMapper
;
import
com.ruoyi.mapper.ReviewTaskInboxMapper
;
import
com.ruoyi.service.SystemReviewTaskService
;
import
com.ruoyi.service.SystemReviewTaskService
;
import
com.ruoyi.web.request.ReviewTaskInboxConfirmRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -33,6 +34,9 @@ public class ReviewTaskInboxServiceImpl extends ServiceImpl<ReviewTaskInboxMappe
...
@@ -33,6 +34,9 @@ public class ReviewTaskInboxServiceImpl extends ServiceImpl<ReviewTaskInboxMappe
@Autowired
@Autowired
private
CarReviewTaskService
carReviewTaskService
;
private
CarReviewTaskService
carReviewTaskService
;
@Autowired
private
ReviewTaskInboxMapper
reviewTaskInboxMapper
;
/**
/**
* 保存场景变更对进行中的问卷产生的影响,用于提醒问卷使用者场景发生了变更。
* 保存场景变更对进行中的问卷产生的影响,用于提醒问卷使用者场景发生了变更。
* 体系审查任务、侧性审查任务分别查询不同的表
* 体系审查任务、侧性审查任务分别查询不同的表
...
@@ -54,6 +58,17 @@ public class ReviewTaskInboxServiceImpl extends ServiceImpl<ReviewTaskInboxMappe
...
@@ -54,6 +58,17 @@ public class ReviewTaskInboxServiceImpl extends ServiceImpl<ReviewTaskInboxMappe
}
}
@Override
public
void
confirm
(
ReviewTaskInboxConfirmRequest
request
)
{
List
<
ReviewTaskInbox
>
inboxList
=
reviewTaskInboxMapper
.
findConfirmList
(
request
.
getReviewTaskId
(),
request
.
getDetailsId
());
for
(
ReviewTaskInbox
inbox
:
inboxList
)
{
inbox
.
setIsConfirm
(
1
);
reviewTaskInboxMapper
.
updateById
(
inbox
);
}
}
public
void
doSaveNotifyByCarReview
(
Long
reviewSceneChangeTaskId
)
{
public
void
doSaveNotifyByCarReview
(
Long
reviewSceneChangeTaskId
)
{
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务)
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务)
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
5c600d1f
...
@@ -7,6 +7,7 @@ import com.ruoyi.common.utils.SecurityUtils;
...
@@ -7,6 +7,7 @@ import com.ruoyi.common.utils.SecurityUtils;
import
com.ruoyi.domain.*
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.ReviewTaskInboxMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.service.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
...
@@ -49,6 +50,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
...
@@ -49,6 +50,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Autowired
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
private
ReviewDetailsMapper
reviewDetailsMapper
;
@Autowired
private
ReviewTaskInboxMapper
reviewTaskInboxMapper
;
@Override
@Override
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
throw
new
ServiceException
(
"不能开始一个已经开始的任务"
,
HttpStatus
.
ERROR
);
throw
new
ServiceException
(
"不能开始一个已经开始的任务"
,
HttpStatus
.
ERROR
);
...
@@ -70,8 +74,11 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
...
@@ -70,8 +74,11 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
public
void
doConfirm
(
SystemReviewTask
systemReviewTask
)
{
public
void
doConfirm
(
SystemReviewTask
systemReviewTask
)
{
// TODO
// TODO
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
systemReviewTask
.
getId
());
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findNoResult
(
systemReviewTask
.
getId
());
List
<
ReviewTaskInbox
>
inboxList
=
reviewTaskInboxMapper
.
findConfirmListByTaskId
(
systemReviewTask
.
getId
());
if
(
detailsList
!=
null
)
{
if
(
detailsList
!=
null
)
{
throw
new
ServiceException
(
"存在未填写的问卷,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
throw
new
ServiceException
(
"存在未填写的问卷,请填写完整"
,
HttpStatus
.
ERROR
,
detailsList
);
}
else
if
(
inboxList
!=
null
){
throw
new
ServiceException
(
"存在未确认的场景变更信息,请确认"
,
HttpStatus
.
ERROR
);
}
else
{
}
else
{
// 1. 获取最新问卷
// 1. 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
systemReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_SYSTEM
);
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
systemReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_SYSTEM
);
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewTaskInboxController.java
0 → 100644
View file @
5c600d1f
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.enums.BusinessType
;
import
com.ruoyi.service.ReviewTaskInboxService
;
import
com.ruoyi.web.request.ReviewTaskInboxConfirmRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
(
tags
=
"审查问卷收件箱"
)
@RestController
@RequestMapping
(
"/review/task/inbox"
)
public
class
ReviewTaskInboxController
extends
BaseController
{
@Autowired
private
ReviewTaskInboxService
reviewTaskInboxService
;
@ApiOperation
(
"确认信息"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"确认多条信息"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/confirm"
)
public
R
<
String
>
confirm
(
@Validated
@RequestBody
ReviewTaskInboxConfirmRequest
request
)
{
reviewTaskInboxService
.
confirm
(
request
);
return
R
.
ok
();
}
}
quality-review/src/main/java/com/ruoyi/web/request/ReviewTaskInboxConfirmRequest.java
0 → 100644
View file @
5c600d1f
package
com
.
ruoyi
.
web
.
request
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"ReviewTaskInboxConfirmRequest"
,
description
=
"确认信息"
)
@Data
public
class
ReviewTaskInboxConfirmRequest
{
@ApiModelProperty
(
value
=
"审查任务id"
)
private
Long
reviewTaskId
;
@ApiModelProperty
(
"细则Id"
)
private
Long
detailsId
;
}
quality-review/src/main/resources/mapper/ReviewTaskInboxMapper.xml
View file @
5c600d1f
...
@@ -12,6 +12,17 @@
...
@@ -12,6 +12,17 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,review_task_id,review_scene_change_task_id,is_confirm
select id,review_task_id,review_scene_change_task_id,is_confirm from t_review_task_inbox
</sql>
</sql>
<select
id=
"findConfirmListByTaskId"
resultType=
"com.ruoyi.domain.ReviewTaskInbox"
>
select id,review_task_id,review_scene_change_task_id,is_confirm from t_review_task_inbox
where review_task_id = #{taskId} and is_confirm = 0
</select>
<select
id=
"findConfirmList"
resultType=
"com.ruoyi.domain.ReviewTaskInbox"
>
SELECT inbox.id, inbox.review_task_id, inbox.is_confirm, inbox.review_scene_change_task_id, task.details_id FROM t_review_task_inbox inbox
LEFT JOIN t_review_scene_change_task task ON inbox.review_scene_change_task_id = task.id
WHERE review_task_id = #{reviewTaskId} AND task.details_id = #{detailsId} and inbox.is_confirm = 0
</select>
</mapper>
</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