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
bcc1a652
Commit
bcc1a652
authored
Jan 05, 2024
by
W_Y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
填写检查问卷的保存更新
parent
3a0e7ec7
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
136 additions
and
1 deletion
+136
-1
ReviewDetailsResult.java
...w/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
+20
-1
ReviewDetailsResultMapper.java
...main/java/com/ruoyi/mapper/ReviewDetailsResultMapper.java
+2
-0
ReviewDetailsResultService.java
...in/java/com/ruoyi/service/ReviewDetailsResultService.java
+5
-0
ReviewDetailsResultServiceImpl.java
...om/ruoyi/service/impl/ReviewDetailsResultServiceImpl.java
+37
-0
ReviewDetailsResultController.java
...ain/java/com/ruoyi/web/ReviewDetailsResultController.java
+38
-0
ReviewDetailsResultSaveRequest.java
...com/ruoyi/web/request/ReviewDetailsResultSaveRequest.java
+28
-0
ReviewDetailsResultMapper.xml
...w/src/main/resources/mapper/ReviewDetailsResultMapper.xml
+6
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
View file @
bcc1a652
...
...
@@ -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
;
/**
* 审核人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 @
bcc1a652
...
...
@@ -17,6 +17,8 @@ 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
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/ReviewDetailsResultService.java
View file @
bcc1a652
...
...
@@ -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/impl/ReviewDetailsResultServiceImpl.java
View file @
bcc1a652
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/web/ReviewDetailsResultController.java
0 → 100644
View file @
bcc1a652
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 @
bcc1a652
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/resources/mapper/ReviewDetailsResultMapper.xml
View file @
bcc1a652
...
...
@@ -21,4 +21,10 @@
<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>
</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