| | |
| | | |
| | | |
| | | appointmentNoticeLogs: é ç´å®ç¼ééç¥çæ·ç¨ |
| | | appointmentClosedInfo: é ç´å®çµæ¡è³æ |
| | | |
| | | |
| | | response body: |
| | | [ { |
| | | "id" : 385, |
| | | "phone" : "0911223344", |
| | | "email" : "SDD", |
| | | "contactType" : "phone", |
| | | "gender" : "female", |
| | | "age" : "21-30", |
| | | "job" : "å
§å¤", |
| | | "requirement" : "å¥åº·èä¿é", |
| | | "communicateStatus" : "contacted", |
| | | "hopeContactTime" : "'ææä¸,ææäº,ææä¸,ææå,ææäº,ææå
,æææ¥ã9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'", |
| | | "otherRequirement" : null, |
| | | "appointmentDate" : "2021-12-16T07:11:05.400Z", |
| | | "lastModifiedDate" : "2021-12-28T07:16:37.004Z", |
| | | "agentNo" : "A568420", |
| | | "customerId" : 139, |
| | | "name" : "Angula-test", |
| | | "consultantViewTime" : "2021-12-27T02:02:18.711Z", |
| | | "consultantReadTime" : "2021-12-28T07:16:01.295Z", |
| | | "contactTime" : "2021-12-28T07:16:37.004Z", |
| | | "satisfactionScore" : null, |
| | | "appointmentMemoList" : [ ], |
| | | "interviewRecordDTOs" : [ ], |
| | | "appointmentNoticeLogs" : [ { |
| | | "id" : 1, |
| | | "phone" : "0912345678", |
| | | "email" : "pollex@gmail.com", |
| | | "appointmentId" : 385, |
| | | "content" : "notice customer invterview time", |
| | | "createdDate" : "2022-01-11T08:54:35.651Z" |
| | | }, { |
| | | "id" : 2, |
| | | "phone" : "0912345678", |
| | | "email" : "pollex@gmail.com", |
| | | "appointmentId" : 385, |
| | | "content" : "notice customer invterview time", |
| | | "createdDate" : "2022-01-11T08:57:23.133Z" |
| | | } ] |
| | | } ] |
| | | { |
| | | "id": 385, |
| | | "phone": "0911223344", |
| | | "email": "SDD", |
| | | "contactType": "phone", |
| | | "gender": "female", |
| | | "age": "21-30", |
| | | "job": "å
§å¤", |
| | | "requirement": "å¥åº·èä¿é", |
| | | "communicateStatus": "done", |
| | | "hopeContactTime": "'ææä¸,ææäº,ææä¸,ææå,ææäº,ææå
,æææ¥ã9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'", |
| | | "otherRequirement": null, |
| | | "appointmentDate": "2021-12-16T07:11:05.400Z", |
| | | "lastModifiedDate": "2022-01-19T10:57:51.380Z", |
| | | "agentNo": "A568420", |
| | | "customerId": 139, |
| | | "name": "Angula-test", |
| | | "consultantViewTime": "2021-12-27T02:02:18.711Z", |
| | | "consultantReadTime": "2021-12-28T07:16:01.295Z", |
| | | "contactTime": "2021-12-28T07:16:37.004Z", |
| | | "satisfactionScore": null, |
| | | "appointmentMemoList": [], |
| | | "interviewRecordDTOs": [], |
| | | "appointmentNoticeLogs": [ |
| | | { |
| | | "id": 4, |
| | | "phone": "0912345678", |
| | | "email": "pollex@gmail.com", |
| | | "appointmentId": 385, |
| | | "content": "notice customer invterview time", |
| | | "createdDate": "2022-01-11T09:33:57.754Z", |
| | | "interviewDate": null |
| | | }, |
| | | { |
| | | "id": 6, |
| | | "phone": "0912345678", |
| | | "email": "pollex@gmail.com", |
| | | "appointmentId": 385, |
| | | "content": "notice customer invterview time", |
| | | "createdDate": "2022-01-19T10:38:42.187Z", |
| | | "interviewDate": "2022-11-01T08:00:00.000+00:00" |
| | | } |
| | | ], |
| | | "appointmentClosedInfo": { |
| | | "id": 9, |
| | | "policyholderIdentityId": "A123456789", |
| | | "planCode": "ATMdd", |
| | | "policyEntryDate": "2022-01-12T00:00:00.000+00:00", |
| | | "remark": "test remark", |
| | | "closedReason": "other2", |
| | | "closedOtherReason": "å¿æ
ä¸å¥½ä¸æ³è²·2", |
| | | "appointmentId": 385 |
| | | } |
| | | } |
| | |
| | | import java.time.Instant; |
| | | import java.util.List; |
| | | |
| | | import com.pollex.pam.domain.AppointmentClosedInfo; |
| | | import com.pollex.pam.domain.AppointmentMemo; |
| | | import com.pollex.pam.domain.AppointmentNoticeLog; |
| | | import com.pollex.pam.domain.InterviewRecord; |
| | |
| | | private List<AppointmentMemo> appointmentMemoList; |
| | | private List<InterviewRecordDTO> interviewRecordDTOs; |
| | | private List<AppointmentNoticeLog> appointmentNoticeLogs; |
| | | private AppointmentClosedInfo appointmentClosedInfo; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | public void setAppointmentNoticeLogs(List<AppointmentNoticeLog> appointmentNoticeLogs) { |
| | | this.appointmentNoticeLogs = appointmentNoticeLogs; |
| | | } |
| | | public AppointmentClosedInfo getAppointmentClosedInfo() { |
| | | return appointmentClosedInfo; |
| | | } |
| | | public void setAppointmentClosedInfo(AppointmentClosedInfo appointmentClosedInfo) { |
| | | this.appointmentClosedInfo = appointmentClosedInfo; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.pollex.pam.domain.AppointmentClosedInfo; |
| | | import com.pollex.pam.domain.AppointmentCustomerView; |
| | | import com.pollex.pam.domain.AppointmentNoticeLog; |
| | | import com.pollex.pam.service.AppointmentClosedInfoService; |
| | | import com.pollex.pam.service.AppointmentNoticeLogService; |
| | | import com.pollex.pam.service.AppointmentService; |
| | | import com.pollex.pam.service.dto.AppointmentCustomerViewDTO; |
| | |
| | | @Autowired |
| | | AppointmentNoticeLogService appointmentNoticeLogService; |
| | | |
| | | @Autowired |
| | | AppointmentClosedInfoService appointmentClosedInfoService; |
| | | |
| | | @Transactional |
| | | public AppointmentCustomerViewDTO toAppointmentCustomerViewDTO(AppointmentCustomerView source) { |
| | | AppointmentCustomerViewDTO target = new AppointmentCustomerViewDTO(); |
| | |
| | | appointmentService.setInterviewRecordDTO(target); |
| | | List<AppointmentNoticeLog> noticeLogs = appointmentNoticeLogService.findByAppointmentId(source.getId()); |
| | | target.setAppointmentNoticeLogs(noticeLogs); |
| | | AppointmentClosedInfo appointmentClosedInfo = appointmentClosedInfoService.findByAppointmentId(source.getId()); |
| | | target.setAppointmentClosedInfo(appointmentClosedInfo); |
| | | return target; |
| | | } |
| | | |