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
c640a644
Commit
c640a644
authored
Oct 23, 2023
by
刘鑫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
ffacb08d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
25 deletions
+62
-25
QuestionnaireDao.java
src/main/java/com/tiptimes/dao/QuestionnaireDao.java
+6
-0
QuestionnaireServiceImpl.java
...a/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
+42
-25
Questionnaire.xml
src/main/resources/mapper/Questionnaire.xml
+14
-0
No files found.
src/main/java/com/tiptimes/dao/QuestionnaireDao.java
View file @
c640a644
...
@@ -3,6 +3,7 @@ package com.tiptimes.dao;
...
@@ -3,6 +3,7 @@ package com.tiptimes.dao;
import
com.tiptimes.ctrl.QuestionnaireVo
;
import
com.tiptimes.ctrl.QuestionnaireVo
;
import
com.tiptimes.model.*
;
import
com.tiptimes.model.*
;
import
com.tiptimes.model.QuestionnaireDTO.AnswerDTO
;
import
com.tiptimes.model.QuestionnaireDTO.AnswerDTO
;
import
com.tiptimes.model.QuestionnaireDTO.SaveQuestionByGroup
;
import
com.tiptimes.model.exportDTO.*
;
import
com.tiptimes.model.exportDTO.*
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -402,6 +403,11 @@ public interface QuestionnaireDao {
...
@@ -402,6 +403,11 @@ public interface QuestionnaireDao {
@Param
(
"questionnaireUuid"
)
Long
questionnaireUuid
@Param
(
"questionnaireUuid"
)
Long
questionnaireUuid
);
);
List
<
SaveQuestionByGroup
>
queryReviewList
(
@Param
(
"createId"
)
String
createId
,
@Param
(
"questionnaireUuid"
)
Long
questionnaireUuid
);
Integer
updateReportStatus
(
@Param
(
"aId"
)
Integer
aId
);
Integer
updateReportStatus
(
@Param
(
"aId"
)
Integer
aId
);
int
saveQuestionByGroup
(
@Param
(
"questionsId"
)
int
questionsId
,
int
saveQuestionByGroup
(
@Param
(
"questionsId"
)
int
questionsId
,
...
...
src/main/java/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
View file @
c640a644
...
@@ -2932,28 +2932,29 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -2932,28 +2932,29 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
@Override
@Override
public
List
<
SaveQuestionByGroup
>
queryReview
(
Long
uid
,
String
createId
,
int
year
)
{
public
List
<
SaveQuestionByGroup
>
queryReview
(
Long
uid
,
String
createId
,
int
year
)
{
// 查询上报记录id
// 查询上报记录id
try
{
// try {
Integer
aId
=
questionnaireDao
.
queryReport
(
createId
,
uid
);
// Integer aId = questionnaireDao.queryReport(createId, uid);
ArrayList
<
SaveQuestionByGroup
>
saveQuestionByGroups
=
new
ArrayList
<>();
// ArrayList<SaveQuestionByGroup> saveQuestionByGroups = new ArrayList<>();
for
(
FormGroup
formGroup
:
questionnaireDao
.
queryGroup
(
Integer
.
parseInt
(
uid
.
toString
())))
{
// for (FormGroup formGroup : questionnaireDao.queryGroup(Integer.parseInt(uid.toString()))) {
String
questionsId
=
formGroup
.
getQuestionId
();
// String questionsId = formGroup.getQuestionId();
int
questionId
=
Integer
.
parseInt
(
questionsId
.
split
(
","
)[
0
]);
// int questionId = Integer.parseInt(questionsId.split(",")[0]);
SaveQuestionByGroup
saveQuestionByGroup
=
new
SaveQuestionByGroup
();
// SaveQuestionByGroup saveQuestionByGroup = new SaveQuestionByGroup();
Review
review
=
questionnaireDao
.
selectReview
(
questionId
,
aId
,
formGroup
.
getGroupId
());
// Review review = questionnaireDao.selectReview(questionId, aId, formGroup.getGroupId());
if
(
review
==
null
)
{
// if (review == null) {
saveQuestionByGroups
.
add
(
null
);
// saveQuestionByGroups.add(null);
continue
;
// continue;
}
// }
saveQuestionByGroup
.
setGroupId
(
formGroup
.
getGroupId
());
// saveQuestionByGroup.setGroupId(formGroup.getGroupId());
saveQuestionByGroup
.
setStatus
(
review
.
getApprovalStatus
());
// saveQuestionByGroup.setStatus(review.getApprovalStatus());
saveQuestionByGroup
.
setScore
(
review
.
getScore
());
// saveQuestionByGroup.setScore(review.getScore());
saveQuestionByGroup
.
setRemark
(
review
.
getRemark
());
// saveQuestionByGroup.setRemark(review.getRemark());
saveQuestionByGroups
.
add
(
saveQuestionByGroup
);
// saveQuestionByGroups.add(saveQuestionByGroup);
}
// }
return
saveQuestionByGroups
;
// return saveQuestionByGroups;
}
catch
(
Exception
e
)
{
// } catch (Exception e) {
return
null
;
// return null;
}
// }
return
questionnaireDao
.
queryReviewList
(
createId
,
uid
);
}
}
@Override
@Override
...
@@ -3031,7 +3032,8 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -3031,7 +3032,8 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
// 按照,分割
// 按照,分割
for
(
String
str
:
list
)
{
for
(
String
str
:
list
)
{
if
(
str
==
null
)
{
if
(
str
==
null
||
str
.
trim
().
equals
(
","
))
{
rows
.
add
(
new
String
[
0
]);
continue
;
continue
;
}
}
rows
.
add
(
str
.
split
(
","
));
rows
.
add
(
str
.
split
(
","
));
...
@@ -3068,6 +3070,13 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -3068,6 +3070,13 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
if
(
resultArray
.
length
==
0
)
{
if
(
resultArray
.
length
==
0
)
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
for
(
String
[]
row
:
resultArray
)
{
for
(
int
j
=
0
;
j
<
row
.
length
;
j
++)
{
if
(
row
[
j
]
==
null
)
{
row
[
j
]
=
""
;
// 将null替换为""
}
}
}
for
(
int
i
=
0
;
i
<
resultArray
[
0
].
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
resultArray
[
0
].
length
;
i
++)
{
StringBuilder
s
=
new
StringBuilder
();
StringBuilder
s
=
new
StringBuilder
();
...
@@ -3088,7 +3097,8 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -3088,7 +3097,8 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
// 按照,分割
// 按照,分割
for
(
String
str
:
list
)
{
for
(
String
str
:
list
)
{
if
(
str
==
null
)
{
if
(
str
==
null
||
str
.
trim
().
equals
(
","
))
{
rows
.
add
(
new
String
[
0
]);
continue
;
continue
;
}
}
rows
.
add
(
str
.
split
(
","
));
rows
.
add
(
str
.
split
(
","
));
...
@@ -3111,6 +3121,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -3111,6 +3121,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
// 判断条件
// 判断条件
List
<
String
[]>
resultList
=
new
ArrayList
<>();
List
<
String
[]>
resultList
=
new
ArrayList
<>();
for
(
String
[]
row
:
result
)
{
for
(
String
[]
row
:
result
)
{
if
(
"是"
.
equals
(
row
[
15
])
||
"是"
.
equals
(
row
[
11
]))
{
if
(
"是"
.
equals
(
row
[
15
])
||
"是"
.
equals
(
row
[
11
]))
{
resultList
.
add
(
row
);
resultList
.
add
(
row
);
}
}
...
@@ -3123,7 +3134,13 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -3123,7 +3134,13 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
if
(
resultArray
.
length
==
0
)
{
if
(
resultArray
.
length
==
0
)
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
for
(
String
[]
row
:
resultArray
)
{
for
(
int
j
=
0
;
j
<
row
.
length
;
j
++)
{
if
(
row
[
j
]
==
null
)
{
row
[
j
]
=
""
;
// 将null替换为""
}
}
}
List
<
String
>
str
=
new
ArrayList
<>();
List
<
String
>
str
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
resultArray
[
0
].
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
resultArray
[
0
].
length
;
i
++)
{
...
...
src/main/resources/mapper/Questionnaire.xml
View file @
c640a644
...
@@ -2066,6 +2066,20 @@
...
@@ -2066,6 +2066,20 @@
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
<select
id=
"queryReviewList"
resultType=
"com.tiptimes.model.QuestionnaireDTO.SaveQuestionByGroup"
>
SELECT tre.approval_status as status,
tre.group_id as groupId,
tre.score as score,
tre.remark as remark
FROM t_record tr
LEFT JOIN t_review tre on tre.record_id = tr.id
WHERE tr.create_id = #{createId}
AND tr.questionnaire_uuid = #{questionnaireUuid}
ORDER BY tre.group_id
</select>
<!-- <select id="queryArray" resultType="java.lang.Integer">-->
<!-- <select id="queryArray" resultType="java.lang.Integer">-->
<!-- SELECT t_options.id FROM t_options-->
<!-- SELECT t_options.id FROM t_options-->
<!-- WHERE t_options.question_id IN-->
<!-- WHERE t_options.question_id IN-->
...
...
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