From 2f57dcc8883b62a4e006c634dd945cb3c7ae63c9 Mon Sep 17 00:00:00 2001 From: Jack <jack.su@pollex.com.tw> Date: 星期二, 18 一月 2022 19:50:03 +0800 Subject: [PATCH] [ADD] 顧問主動發送填寫滿意度通知 --- pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentCustomerViewMapper.java | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentCustomerViewMapper.java b/pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentCustomerViewMapper.java index c56b19b..65dec36 100644 --- a/pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentCustomerViewMapper.java +++ b/pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentCustomerViewMapper.java @@ -5,17 +5,33 @@ import java.util.List; import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import com.pollex.pam.domain.AppointmentCustomerView; +import com.pollex.pam.domain.AppointmentNoticeLog; +import com.pollex.pam.service.AppointmentNoticeLogService; +import com.pollex.pam.service.AppointmentService; import com.pollex.pam.service.dto.AppointmentCustomerViewDTO; @Service public class AppointmentCustomerViewMapper { - + + @Autowired + AppointmentService appointmentService; + + @Autowired + AppointmentNoticeLogService appointmentNoticeLogService; + + @Transactional public AppointmentCustomerViewDTO toAppointmentCustomerViewDTO(AppointmentCustomerView source) { AppointmentCustomerViewDTO target = new AppointmentCustomerViewDTO(); BeanUtils.copyProperties(source, target); + target.setAppointmentMemoList(source.getAppointmentMemoList()); + appointmentService.setInterviewRecordDTO(target); + List<AppointmentNoticeLog> noticeLogs = appointmentNoticeLogService.findByAppointmentId(source.getId()); + target.setAppointmentNoticeLogs(noticeLogs); return target; } -- Gitblit v1.8.0