|
|
@ -29,7 +29,6 @@ import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
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.form.PsychologyAnswerFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.form.PsychologyUnansweredFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.result.*; |
|
|
@ -40,9 +39,9 @@ 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.entity.PsychologyAnswerEntity; |
|
|
|
import com.elink.esua.epdc.modules.psychology.redis.PsychologistRedis; |
|
|
|
import com.elink.esua.epdc.modules.psychology.service.PsychologistService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.checkerframework.checker.units.qual.A; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -64,16 +63,13 @@ import java.util.stream.Collectors; |
|
|
|
public class PsychologistServiceImpl extends BaseServiceImpl<PsychologistDao, PsychologistEntity> implements PsychologistService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private PsychologistRedis psychologistRedis; |
|
|
|
private PsychologistTitleRelationDao psychologistTitleRelationDao; |
|
|
|
|
|
|
|
@Resource |
|
|
|
PsychologistTitleRelationDao psychologistTitleRelationDao; |
|
|
|
|
|
|
|
@Resource |
|
|
|
PsychologyQuestionDao psychologyQuestionDao; |
|
|
|
@Autowired |
|
|
|
private PsychologyQuestionDao psychologyQuestionDao; |
|
|
|
|
|
|
|
@Resource |
|
|
|
PsychologyAnswerDao psychologyAnswerDao; |
|
|
|
@Autowired |
|
|
|
private PsychologyAnswerDao psychologyAnswerDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<PsychologistDTO> page(Map<String, Object> params) { |
|
|
@ -175,14 +171,8 @@ public class PsychologistServiceImpl extends BaseServiceImpl<PsychologistDao, Ps |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PsychologistInfoResultDTO psychologistInfo(PsychologistInfoFormDTO dto) { |
|
|
|
PsychologistEntity entity = baseDao.psychologistInfo(dto); |
|
|
|
PsychologistInfoResultDTO data = ConvertUtils.sourceToTarget(entity, PsychologistInfoResultDTO.class); |
|
|
|
if (data != null) { |
|
|
|
List<String> titles = psychologistTitleRelationDao.selectTitles(dto.getPsychologistId()); |
|
|
|
data.setTitle(titles.size() == 0 ? new ArrayList<>() : titles); |
|
|
|
} |
|
|
|
return data; |
|
|
|
public PsychologistInfoResultDTO psychologistInfo(String psychologistId) { |
|
|
|
return baseDao.psychologistInfo(psychologistId); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|