Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
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
中汽研标准应用数据库
car-database-api
Commits
8e8669af
Commit
8e8669af
authored
Sep 13, 2024
by
yuanshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.获取评审人员意见时 返回时间格式有所调整
parent
7dc7da66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
ReviewSceneChangeTaskServiceImpl.java
.../ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
+7
-0
ReviewOpinionResponse.java
...in/java/com/ruoyi/web/response/ReviewOpinionResponse.java
+14
-0
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
View file @
8e8669af
...
...
@@ -603,6 +603,13 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
Long
userId
=
loginUser
.
getUserId
();
List
<
ReviewOpinionResponse
>
list
=
reviewSceneChangeTaskMapper
.
getReviewerOpinion
(
id
,
userId
);
// 遍历列表,设置格式化后的时间
for
(
ReviewOpinionResponse
reviewOpinion
:
list
)
{
// 自动通过 getFormattedDecisionTime() 获取格式化时间
reviewOpinion
.
setFormattedDecisionTime
(
reviewOpinion
.
getFormattedDecisionTime
());
}
return
list
;
}
...
...
quality-review/src/main/java/com/ruoyi/web/response/ReviewOpinionResponse.java
View file @
8e8669af
...
...
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
@ApiModel
(
value
=
"ReviewOpinionResponse"
,
description
=
"评审动态"
)
...
...
@@ -22,4 +23,17 @@ public class ReviewOpinionResponse {
@ApiModelProperty
(
"评审意见"
)
private
String
comment
;
// 用于返回格式化后的日期字符串
@ApiModelProperty
(
"格式化后的评审时间"
)
private
String
formattedDecisionTime
;
// 设置格式化后的时间
public
String
getFormattedDecisionTime
()
{
if
(
this
.
decisionTime
!=
null
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
return
sdf
.
format
(
this
.
decisionTime
);
}
return
null
;
}
}
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