| | |
| | | http://localhost:8080/api/appointment/getDetail/{appointmentId} |
| | | |
| | | |
| | | appointmentNoticeLogs: é ç´å®ç¼ééç¥çæ·ç¨ |
| | | |
| | | |
| | | response body: |
| | | { |
| | | "id": 110, |
| | | "phone": "09123456789", |
| | | "email": "", |
| | | "contactType": "mobile", |
| | | "gender": "male", |
| | | "age": "30", |
| | | [ { |
| | | "id" : 385, |
| | | "phone" : "0911223344", |
| | | "email" : "SDD", |
| | | "contactType" : "phone", |
| | | "gender" : "female", |
| | | "age" : "21-30", |
| | | "job": "å
§å¤", |
| | | "requirement": "å女æè²,è³ç¢è¦å,é²ç«ä¿å®ç¸é", |
| | | "requirement" : "å¥åº·èä¿é", |
| | | "communicateStatus": "contacted", |
| | | "hopeContactTime": "'禮æä¸,禮æäºã12:00~14:00,14:00~18:00'", |
| | | "hopeContactTime" : "'ææä¸,ææäº,ææä¸,ææå,ææäº,ææå
,æææ¥ã9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'", |
| | | "otherRequirement": null, |
| | | "appointmentDate": "2021-12-02T09:58:58.932Z", |
| | | "lastModifiedDate": "2021-12-02T09:58:58.932Z", |
| | | "agentNo": "AG0109051204", |
| | | "customerId": 70, |
| | | "name": null, |
| | | "consultantViewTime": "2021-12-02T09:58:12.066Z", |
| | | "consultantReadTime": "2021-12-02T09:58:58.930Z", |
| | | "contactTime": "2021-12-02T09:58:58.930Z", |
| | | "satisfactionScore":3 // 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" |
| | | } ] |
| | | } ] |
| | |
| | | |
| | | @CreatedDate |
| | | @Column(name = "created_date", updatable = false) |
| | | @JsonIgnore |
| | | // @JsonIgnore |
| | | private Instant createdDate = Instant.now(); |
| | | |
| | | public Long getId() { |
| | |
| | | package com.pollex.pam.repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | @Repository |
| | | public interface AppointmentNoticeLogRepository extends JpaRepository<AppointmentNoticeLog, Long>{ |
| | | |
| | | List<AppointmentNoticeLog> findByAppointmentId(Long appointmentId); |
| | | |
| | | } |
| | |
| | | package com.pollex.pam.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | appointmentNoticeSendMapper.toAppointmentNoticeLog(noticeSendDTO); |
| | | return appointmentNoticeLogRepository.save(appointmentNoticeLog); |
| | | } |
| | | |
| | | public List<AppointmentNoticeLog> findByAppointmentId(Long appointmentId){ |
| | | return appointmentNoticeLogRepository.findByAppointmentId(appointmentId); |
| | | } |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import com.pollex.pam.domain.AppointmentMemo; |
| | | import com.pollex.pam.domain.AppointmentNoticeLog; |
| | | import com.pollex.pam.domain.InterviewRecord; |
| | | import com.pollex.pam.enums.ContactStatusEnum; |
| | | |
| | |
| | | private Float satisfactionScore; |
| | | private List<AppointmentMemo> appointmentMemoList; |
| | | private List<InterviewRecordDTO> interviewRecordDTOs; |
| | | private List<AppointmentNoticeLog> appointmentNoticeLogs; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | public void setInterviewRecordDTOs(List<InterviewRecordDTO> interviewRecordDTOs) { |
| | | this.interviewRecordDTOs = interviewRecordDTOs; |
| | | } |
| | | public List<AppointmentNoticeLog> getAppointmentNoticeLogs() { |
| | | return appointmentNoticeLogs; |
| | | } |
| | | public void setAppointmentNoticeLogs(List<AppointmentNoticeLog> appointmentNoticeLogs) { |
| | | this.appointmentNoticeLogs = appointmentNoticeLogs; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | @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; |
| | | } |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.pollex.pam.domain.Appointment; |
| | | import com.pollex.pam.domain.AppointmentNoticeLog; |
| | | import com.pollex.pam.security.SecurityUtils; |
| | | import com.pollex.pam.service.AppointmentService; |
| | | import com.pollex.pam.service.NoticeService; |