|
|
|
@ -25,6 +25,8 @@ 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.result.PsychologistInfoResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.psychology.result.PsychologistResultDTO; |
|
|
|
import com.elink.esua.epdc.modules.psychology.dao.PsychologistDao; |
|
|
|
import com.elink.esua.epdc.modules.psychology.dao.PsychologistTitleRelationDao; |
|
|
|
@ -86,7 +88,7 @@ public class PsychologistServiceImpl extends BaseServiceImpl<PsychologistDao, Ps |
|
|
|
public PsychologistDTO get(String id) { |
|
|
|
PsychologistEntity entity = baseDao.selectById(id); |
|
|
|
PsychologistDTO dto = ConvertUtils.sourceToTarget(entity, PsychologistDTO.class); |
|
|
|
List<String> titles = psychologistTitleRelationDao.selectTitles(id); |
|
|
|
List<String> titles = psychologistTitleRelationDao.selectTitleIds(id); |
|
|
|
dto.setTitles(titles == null ? new ArrayList<>() : titles); |
|
|
|
return dto; |
|
|
|
} |
|
|
|
@ -136,4 +138,14 @@ public class PsychologistServiceImpl extends BaseServiceImpl<PsychologistDao, Ps |
|
|
|
List<PsychologistEntity> entity = baseDao.listPsychiatrist(dto); |
|
|
|
return ConvertUtils.sourceToTarget(entity, PsychologistResultDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PsychologistInfoResultDTO psychologistInfo(PsychologistInfoFormDTO dto) { |
|
|
|
PsychologistEntity entity = baseDao.psychologistInfo(dto); |
|
|
|
PsychologistInfoResultDTO data = ConvertUtils.sourceToTarget(entity, PsychologistInfoResultDTO.class); |
|
|
|
List<String> titles = psychologistTitleRelationDao.selectTitles(dto.getPsychologistId()); |
|
|
|
data.setTitle(titles == null ? new ArrayList<>() : titles); |
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|
} |