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
f317893c
Commit
f317893c
authored
Jan 05, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
填写检查问卷的保存更新 See merge request
!25
parents
50ae4696
7e3437fc
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
178 additions
and
1 deletion
+178
-1
ReviewDetailsResult.java
...w/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
+20
-1
ReviewDetailsResultMapper.java
...main/java/com/ruoyi/mapper/ReviewDetailsResultMapper.java
+4
-0
ReviewDetailsResultService.java
...in/java/com/ruoyi/service/ReviewDetailsResultService.java
+5
-0
SystemReviewTaskService.java
.../main/java/com/ruoyi/service/SystemReviewTaskService.java
+7
-0
ReviewDetailsResultServiceImpl.java
...om/ruoyi/service/impl/ReviewDetailsResultServiceImpl.java
+37
-0
SystemReviewTaskServiceImpl.java
...a/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
+6
-0
ReviewDetailsResultController.java
...ain/java/com/ruoyi/web/ReviewDetailsResultController.java
+38
-0
ReviewDetailsResultSaveRequest.java
...com/ruoyi/web/request/ReviewDetailsResultSaveRequest.java
+28
-0
SystemReviewTaskSubmitRequest.java
.../com/ruoyi/web/request/SystemReviewTaskSubmitRequest.java
+17
-0
ReviewDetailsResultMapper.xml
...w/src/main/resources/mapper/ReviewDetailsResultMapper.xml
+16
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
View file @
f317893c
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -54,4 +55,22 @@ public class ReviewDetailsResult implements Serializable {
@ApiModelProperty
(
"关联的任务id"
)
private
Long
taskId
;
}
\ No newline at end of file
/**
* 审核人id
*/
@ApiModelProperty
(
"审核人id"
)
private
Long
userId
;
/**
* 审核人姓名
*/
@ApiModelProperty
(
"审核人姓名"
)
private
String
userName
;
/**
* 最后修改时间
*/
@ApiModelProperty
(
"最后修改时间"
)
private
Date
lastModifyTime
;
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewDetailsResultMapper.java
View file @
f317893c
...
...
@@ -17,6 +17,10 @@ import java.util.List;
public
interface
ReviewDetailsResultMapper
extends
BaseMapper
<
ReviewDetailsResult
>
{
List
<
ReviewDetailsResult
>
findByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
ReviewDetailsResult
findByTaskIdAndDetailsId
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"reviewDetailsId"
)
Long
reviewDetailsId
);
Long
findNotPass
(
@Param
(
"taskId"
)
Long
taskId
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/ReviewDetailsResultService.java
View file @
f317893c
...
...
@@ -2,6 +2,7 @@ package com.ruoyi.service;
import
com.ruoyi.domain.ReviewDetailsResult
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.web.request.ReviewDetailsResultSaveRequest
;
import
java.util.List
;
...
...
@@ -14,4 +15,8 @@ public interface ReviewDetailsResultService extends IService<ReviewDetailsResult
List
<
ReviewDetailsResult
>
findByTaskId
(
Long
taskId
);
ReviewDetailsResult
findByTaskIdAndDetailsId
(
Long
taskId
,
Long
reviewDetailsId
);
void
save
(
ReviewDetailsResultSaveRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/SystemReviewTaskService.java
View file @
f317893c
...
...
@@ -4,6 +4,7 @@ import com.ruoyi.domain.SystemReviewTask;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.web.request.SystemReviewTaskCreateRequest
;
import
com.ruoyi.web.request.SystemReviewTaskStartRequest
;
import
com.ruoyi.web.request.SystemReviewTaskSubmitRequest
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
java.util.List
;
...
...
@@ -46,4 +47,10 @@ public interface SystemReviewTaskService extends IService<SystemReviewTask> {
*/
List
<
SystemReviewTask
>
findListInProcess
();
/**
* 提交审查问卷
* @param request
*/
void
submit
(
SystemReviewTaskSubmitRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewDetailsResultServiceImpl.java
View file @
f317893c
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.ReviewDetailsResult
;
import
com.ruoyi.service.ReviewDetailsResultService
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.web.request.ReviewDetailsResultSaveRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -26,6 +30,39 @@ public class ReviewDetailsResultServiceImpl extends ServiceImpl<ReviewDetailsRes
public
List
<
ReviewDetailsResult
>
findByTaskId
(
Long
taskId
)
{
return
reviewDetailsResultMapper
.
findByTaskId
(
taskId
);
}
@Override
public
ReviewDetailsResult
findByTaskIdAndDetailsId
(
Long
taskId
,
Long
reviewDetailsId
)
{
return
reviewDetailsResultMapper
.
findByTaskIdAndDetailsId
(
taskId
,
reviewDetailsId
);
}
@Override
public
void
save
(
ReviewDetailsResultSaveRequest
request
)
{
ReviewDetailsResult
result
=
reviewDetailsResultMapper
.
findByTaskIdAndDetailsId
(
request
.
getTaskId
(),
request
.
getReviewDetailsId
());
// 获取当前登陆人
SysUser
loginUser
=
SecurityUtils
.
getLoginUser
().
getUser
();
if
(
result
!=
null
)
{
// 更新
result
.
setPassed
(
request
.
getPassed
());
result
.
setUserId
(
loginUser
.
getUserId
());
result
.
setUserName
(
loginUser
.
getNickName
());
result
.
setLastModifyTime
(
new
Date
());
this
.
baseMapper
.
updateById
(
result
);
}
else
{
// 新增
ReviewDetailsResult
reviewDetailsResult
=
new
ReviewDetailsResult
();
reviewDetailsResult
.
setTaskId
(
request
.
getTaskId
());
reviewDetailsResult
.
setReviewDetailsId
(
request
.
getReviewDetailsId
());
reviewDetailsResult
.
setPassed
(
request
.
getPassed
());
reviewDetailsResult
.
setUserId
(
loginUser
.
getUserId
());
reviewDetailsResult
.
setUserName
(
loginUser
.
getNickName
());
reviewDetailsResult
.
setLastModifyTime
(
new
Date
());
this
.
baseMapper
.
insert
(
reviewDetailsResult
);
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
View file @
f317893c
...
...
@@ -11,6 +11,7 @@ import com.ruoyi.service.*;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.web.request.SystemReviewTaskCreateRequest
;
import
com.ruoyi.web.request.SystemReviewTaskStartRequest
;
import
com.ruoyi.web.request.SystemReviewTaskSubmitRequest
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -111,6 +112,11 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
return
systemReviewTaskMapper
.
findListInProcess
();
}
@Override
public
void
submit
(
SystemReviewTaskSubmitRequest
request
)
{
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewDetailsResultController.java
0 → 100644
View file @
f317893c
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.ReviewDetailsResultService
;
import
com.ruoyi.web.request.ReviewDetailsResultSaveRequest
;
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
(
"审查细则的审查结果"
)
@RestController
@RequestMapping
(
"/review/details/result"
)
public
class
ReviewDetailsResultController
extends
BaseController
{
@Autowired
private
ReviewDetailsResultService
reviewDetailsResultService
;
@ApiOperation
(
"保存审查结果"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"保存审查结果"
,
businessType
=
BusinessType
.
INSERT
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/save"
)
public
R
<
String
>
save
(
@Validated
@RequestBody
ReviewDetailsResultSaveRequest
request
)
{
reviewDetailsResultService
.
save
(
request
);
return
R
.
ok
();
}
}
quality-review/src/main/java/com/ruoyi/web/request/ReviewDetailsResultSaveRequest.java
0 → 100644
View file @
f317893c
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"ReviewDetailsResultSaveRequest"
,
description
=
"保存审查细则的审查结果"
)
@Data
public
class
ReviewDetailsResultSaveRequest
{
/**
* 关联到的细则id
*/
@ApiModelProperty
(
"关联到的细则id"
)
private
Long
reviewDetailsId
;
/**
* 关联的任务id
*/
@ApiModelProperty
(
"关联的任务id"
)
private
Long
taskId
;
/**
* 审核是否通过(0未通过、1通过)
*/
@ApiModelProperty
(
"审核是否通过(0未通过、1通过)"
)
private
Integer
passed
;
}
quality-review/src/main/java/com/ruoyi/web/request/SystemReviewTaskSubmitRequest.java
0 → 100644
View file @
f317893c
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"SystemReviewTaskSubmitRequest"
,
description
=
"提交体系审查问卷"
)
@Data
public
class
SystemReviewTaskSubmitRequest
{
@ApiModelProperty
(
"任务id"
)
private
Long
taskId
;
@ApiModelProperty
(
"图片地址"
)
private
String
imagesUrl
;
}
quality-review/src/main/resources/mapper/ReviewDetailsResultMapper.xml
View file @
f317893c
...
...
@@ -21,4 +21,20 @@
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT id, passed, comment, images_url, review_details_id, task_id FROM t_review_details_result WHERE task_id = #{taskId}
</select>
<select
id=
"findByTaskIdAndDetailsId"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT id, passed, comment, images_url, review_details_id, task_id
FROM t_review_details_result
WHERE task_id = #{taskId} and review_details_id = #{reviewDetailsId}
</select>
<select
id=
"findNotPass"
resultType=
"long"
>
SELECT COUNT(*) sum FROM t_review_details_result
WHERE passed = 0 AND task_id = #{taskId}
</select>
<select
id=
"findNoResult"
resultType=
"long"
>
SELECT COUNT(*) sum FROM t_review_details_result
WHERE passed is null AND task_id = #{taskId}
</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