保誠-保戶業務員媒合平台
Jack
2022-01-19 bf5a163bd84dfabb4fab275f6cbd27e5b0747e74
[ADD] 取得預約單細節新增預約單結案資料欄位
修改3個檔案
111 ■■■■■ 已變更過的檔案
pamapi/src/doc/預約單/取得預約單細節API.txt 94 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentCustomerViewDTO.java 10 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentCustomerViewMapper.java 7 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/doc/¹w¬ù³æ/¨ú±o¹w¬ù³æ²Ó¸`API.txt
@@ -4,45 +4,61 @@
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
    }
}
pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentCustomerViewDTO.java
@@ -3,6 +3,7 @@
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;
@@ -33,6 +34,7 @@
    private List<AppointmentMemo> appointmentMemoList;
    private List<InterviewRecordDTO> interviewRecordDTOs;
    private List<AppointmentNoticeLog> appointmentNoticeLogs;
    private AppointmentClosedInfo appointmentClosedInfo;
    public Long getId() {
        return id;
@@ -172,6 +174,14 @@
    public void setAppointmentNoticeLogs(List<AppointmentNoticeLog> appointmentNoticeLogs) {
        this.appointmentNoticeLogs = appointmentNoticeLogs;
    }
    public AppointmentClosedInfo getAppointmentClosedInfo() {
        return appointmentClosedInfo;
    }
    public void setAppointmentClosedInfo(AppointmentClosedInfo appointmentClosedInfo) {
        this.appointmentClosedInfo = appointmentClosedInfo;
    }
    
    
}
pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentCustomerViewMapper.java
@@ -9,8 +9,10 @@
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;
@@ -24,6 +26,9 @@
    @Autowired
    AppointmentNoticeLogService appointmentNoticeLogService;
    
    @Autowired
    AppointmentClosedInfoService appointmentClosedInfoService;
    @Transactional
    public AppointmentCustomerViewDTO toAppointmentCustomerViewDTO(AppointmentCustomerView source) {
        AppointmentCustomerViewDTO target = new AppointmentCustomerViewDTO();
@@ -32,6 +37,8 @@
        appointmentService.setInterviewRecordDTO(target);
        List<AppointmentNoticeLog> noticeLogs = appointmentNoticeLogService.findByAppointmentId(source.getId());
        target.setAppointmentNoticeLogs(noticeLogs);
        AppointmentClosedInfo appointmentClosedInfo = appointmentClosedInfoService.findByAppointmentId(source.getId());
        target.setAppointmentClosedInfo(appointmentClosedInfo);
        return target;
    }