|
|
@ -26,10 +26,12 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.dto.psychology.PsychologistDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.form.PsychologistFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.form.PsychologistInfoFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.result.PsychologistInfoResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.result.PsychologistResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.form.PsychologyAnswerFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.result.*; |
|
|
|
import com.elink.esua.epdc.modules.psychology.dao.PsychologistDao; |
|
|
|
import com.elink.esua.epdc.modules.psychology.dao.PsychologistTitleRelationDao; |
|
|
|
import com.elink.esua.epdc.modules.psychology.dao.PsychologyAnswerDao; |
|
|
|
import com.elink.esua.epdc.modules.psychology.dao.PsychologyQuestionDao; |
|
|
|
import com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity; |
|
|
|
import com.elink.esua.epdc.modules.psychology.entity.PsychologistTitleRelationEntity; |
|
|
|
import com.elink.esua.epdc.modules.psychology.redis.PsychologistRedis; |
|
|
@ -60,6 +62,12 @@ public class PsychologistServiceImpl extends BaseServiceImpl<PsychologistDao, Ps |
|
|
|
@Resource |
|
|
|
PsychologistTitleRelationDao psychologistTitleRelationDao; |
|
|
|
|
|
|
|
@Resource |
|
|
|
PsychologyQuestionDao psychologyQuestionDao; |
|
|
|
|
|
|
|
@Resource |
|
|
|
PsychologyAnswerDao psychologyAnswerDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<PsychologistDTO> page(Map<String, Object> params) { |
|
|
|
IPage<PsychologistEntity> page = getPage(params); |
|
|
@ -148,4 +156,25 @@ public class PsychologistServiceImpl extends BaseServiceImpl<PsychologistDao, Ps |
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PsychologyAnswerListUserResultDTO> listUserQuestion(PsychologyAnswerFormDTO dto) { |
|
|
|
List<PsychologyAnswerListUserResultDTO> data = psychologyQuestionDao.listUserQuestion(dto); |
|
|
|
data.forEach(item -> { |
|
|
|
List<PsychologyAnswerUserInfoResultDTO> list = psychologyAnswerDao.listUserQuestion(item.getId()); |
|
|
|
item.setAnswerList(list == null ? new ArrayList<>() : ConvertUtils.sourceToTarget(list, PsychologyAnswerUserInfoResultDTO.class)); |
|
|
|
}); |
|
|
|
|
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PsychologyAnswerListResultDTO> listQuestion(PsychologyAnswerFormDTO dto) { |
|
|
|
List<PsychologyAnswerListResultDTO> data = psychologyQuestionDao.listQuestion(dto); |
|
|
|
data.forEach(item -> { |
|
|
|
List<PsychologyAnswerInfoResultDTO> list = psychologyAnswerDao.listQuestion(item.getId()); |
|
|
|
item.setAnswerList(list == null ? new ArrayList<>() : ConvertUtils.sourceToTarget(list, PsychologyAnswerInfoResultDTO.class)); |
|
|
|
}); |
|
|
|
|
|
|
|
return data; |
|
|
|
} |
|
|
|
} |