|
@@ -288,7 +288,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public R showQuestionnaire(String id) {
|
|
|
+ public R showQuestionnaire(String id, boolean showAnswer) {
|
|
|
if (StringUtils.isBlank(id)) {
|
|
|
log.debug("参数异常");
|
|
|
return R.ok();
|
|
@@ -305,7 +305,8 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
|
|
|
return R.error("问卷调查已结束");
|
|
|
}
|
|
|
SysUserVo currentUser = TrainingUtils.getCurrentUser();
|
|
|
- List<TrainingDemandVo> surveyContent = demandSurveyContentDao.getSurveyContent(id, currentUser == null ? "" : currentUser.getId());
|
|
|
+ List<TrainingDemandVo> surveyContent = demandSurveyContentDao.getSurveyContent(id,
|
|
|
+ showAnswer ? currentUser == null ? "" : currentUser.getId() : "");
|
|
|
|
|
|
LinkedHashMap<String, List<TrainingDemandVo>> collect = surveyContent.stream()
|
|
|
.collect(Collectors.groupingBy(TrainingDemandVo::getModelName, LinkedHashMap::new, Collectors.toList()));
|