Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
platform
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
王琮
platform
Commits
0bab90c7
Commit
0bab90c7
authored
Nov 08, 2022
by
王国存
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'test'
审批-通过/驳回优化,更新列表状态 See merge request
!18
parents
d59a525e
cdd06247
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
QuestionnaireDao.java
src/main/java/com/tiptimes/dao/QuestionnaireDao.java
+2
-0
QuestionnaireServiceImpl.java
...a/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
+8
-1
Questionnaire.xml
src/main/resources/mapper/Questionnaire.xml
+11
-0
No files found.
src/main/java/com/tiptimes/dao/QuestionnaireDao.java
View file @
0bab90c7
...
...
@@ -83,4 +83,6 @@ public interface QuestionnaireDao {
Integer
updateAnswerScore
(
Answer
answer
);
List
<
Review
>
selectAnswerByStatus
(
@Param
(
"recordId"
)
Long
recordId
);
List
<
Review
>
selectAnswerByQuestion
(
@Param
(
"recordId"
)
Long
recordId
);
}
src/main/java/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
View file @
0bab90c7
...
...
@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
...
...
@@ -91,9 +92,15 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
//先去查询 t_review 表里的审批状态是否全部为通过,都是通过的状态,更新列表的审批状态为已审批=3
List
<
Review
>
reviewList
=
questionnaireDao
.
selectAnswerByStatus
(
record
.
getReviews
().
get
(
0
).
getRecordId
());
reviewList
.
removeAll
(
Collections
.
singleton
(
null
));
//查询审批页面问题通过的个数
List
<
Review
>
reviews
=
questionnaireDao
.
selectAnswerByQuestion
(
record
.
getReviews
().
get
(
0
).
getRecordId
());
//问题个数
List
<
Integer
>
list
=
Arrays
.
asList
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
);
if
(
reviewList
!=
null
){
//查询结果为一条数据,并且状态都是通过,更新列表状态为3
if
(
reviewList
.
size
()
==
1
&&
reviewList
.
get
(
0
).
getApprovalStatus
()
==
1
){
if
(
reviewList
.
size
()
==
1
&&
reviewList
.
get
(
0
).
getApprovalStatus
()
==
1
&&
reviews
.
containsAll
(
list
)
){
record
.
setProcessStatus
(
3
);
}
else
if
(
reviewList
.
size
()
==
1
&&
reviewList
.
get
(
0
).
getApprovalStatus
()
==
0
){
//查询结果为一条数据,并且状态都是驳回,更新列表状态为2
...
...
src/main/resources/mapper/Questionnaire.xml
View file @
0bab90c7
...
...
@@ -592,4 +592,15 @@
WHERE
<if
test=
"recordId != null and recordId != ''"
>
record_id = #{recordId}
</if>
</select>
<!--查询审批页面问题通过状态-->
<select
id=
"selectAnswerByQuestion"
resultType=
"com.tiptimes.model.Review"
>
SELECT
questions_id
FROM
t_review
WHERE
<if
test=
"recordId != null and recordId != ''"
>
record_id = #{recordId}
</if>
and questions_id BETWEEN 1 AND 27
</select>
</mapper>
\ No newline at end of file
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