From b3572f326520545ba2d1a4a69b29520a055cb649 Mon Sep 17 00:00:00 2001
From: jack <jack.su@pollex.com.tw>
Date: 星期四, 27 七月 2023 16:26:05 +0800
Subject: [PATCH] [ADD] 預約單相關API新增欄位諮詢方式(consultationMethod), todo: 169489

---
 pamapi/src/doc/預約單/取得客戶所有預約單資料group by consultant.txt                 |  348 +++++++++----------------------------------
 pamapi/src/doc/預約單/顧問取得所有自己的預約單API.txt                                |    3 
 pamapi/src/doc/sql/20230727_j.sql                                     |   26 +++
 pamapi/src/doc/預約單/預約前詢問.txt                                          |    7 
 pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java |   22 --
 pamapi/src/doc/預約單/標記為已聯絡API.txt                                      |    3 
 pamapi/src/doc/sql/executed/20230710_j.sql                            |    0 
 pamapi/src/doc/預約單/更新預約單明細API.txt                                     |    7 
 pamapi/src/doc/預約單/取得預約單細節API.txt                                     |    2 
 pamapi/src/doc/sql/executed/20230718_j.sql                            |    0 
 pamapi/src/doc/預約單/客戶取得最新預約的未處理預約單.txt                                |    3 
 11 files changed, 122 insertions(+), 299 deletions(-)

diff --git a/pamapi/src/doc/sql/20230727_j.sql b/pamapi/src/doc/sql/20230727_j.sql
new file mode 100644
index 0000000..1f842ad
--- /dev/null
+++ b/pamapi/src/doc/sql/20230727_j.sql
@@ -0,0 +1,26 @@
+-- �憓onsultation_method甈��
+
+CREATE OR REPLACE VIEW omo.appointment_customer_view
+AS SELECT a.id AS appointment_id,
+    a.phone,
+    a.email,
+    a.contact_type,
+    a.gender,
+    a.age,
+    a.job,
+    a.requirement,
+    a.communicate_status,
+    a.hope_contact_time,
+    a.other_requirement,
+    a.agent_no,
+    a.appointment_date,
+    a.customer_id,
+    a.consultant_view_time,
+    a.consultant_read_time,
+    a.contact_time,
+    a.status,
+    a.last_modified_date,
+    c.name,
+    a.consultation_method
+   FROM appointment a
+     LEFT JOIN customer c ON a.customer_id = c.id;
\ No newline at end of file
diff --git a/pamapi/src/doc/sql/20230710_j.sql b/pamapi/src/doc/sql/executed/20230710_j.sql
similarity index 100%
rename from pamapi/src/doc/sql/20230710_j.sql
rename to pamapi/src/doc/sql/executed/20230710_j.sql
diff --git a/pamapi/src/doc/sql/20230718_j.sql b/pamapi/src/doc/sql/executed/20230718_j.sql
similarity index 100%
rename from pamapi/src/doc/sql/20230718_j.sql
rename to pamapi/src/doc/sql/executed/20230718_j.sql
diff --git "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\217\226\345\276\227\345\256\242\346\210\266\346\211\200\346\234\211\351\240\220\347\264\204\345\226\256\350\263\207\346\226\231group by consultant.txt" "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\217\226\345\276\227\345\256\242\346\210\266\346\211\200\346\234\211\351\240\220\347\264\204\345\226\256\350\263\207\346\226\231group by consultant.txt"
index 03968c5..8fb9ce8 100644
--- "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\217\226\345\276\227\345\256\242\346\210\266\346\211\200\346\234\211\351\240\220\347\264\204\345\226\256\350\263\207\346\226\231group by consultant.txt"
+++ "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\217\226\345\276\227\345\256\242\346\210\266\346\211\200\346\234\211\351\240\220\347\264\204\345\226\256\350\263\207\346\226\231group by consultant.txt"
@@ -4,277 +4,79 @@
 
 
 response body :
-
-[
-    {
-        "agentNo": "A568420",
-        "name": "雓�◢",
-        "img": "C://pam_file/consultant_A568420.jpg",
-        "expertise": [
-            "�摨瑁����",
-            "摮戊��"
-        ],
-        "avgScore": 1.0,
-        "contactStatus": "closed",
-        "createTime": "2021-12-29T09:33:16.526Z",
-        "updateTime": "2022-03-22T03:49:05.602Z",
-        "customerViewTime": "2021-12-29T09:33:18.727Z",
-        "role": "66666",
-        "seniority": "40 撟� 10 ���",
-        "appointments": [
-            {
-                "id": 435,
-                "phone": "0973057067",
-                "email": "",
-                "contactType": "phone",
-                "gender": "male",
-                "age": "under_20",
-                "job": "憭",
-                "requirement": "�摨瑁����",
-                "communicateStatus": "closed",
-                "hopeContactTime": "'����,�����,�����,�����,�����,���,�����9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
-                "otherRequirement": null,
-                "appointmentDate": "2021-12-29T09:33:16.643Z",
-                "lastModifiedDate": "2022-03-22T03:49:05.602Z",
-                "agentNo": "A568420",
-                "customerId": 90,
-                "name": "Jack",
-                "consultantViewTime": "2021-12-29T09:33:49.547Z",
-                "consultantReadTime": "2021-12-29T09:37:21.710Z",
-                "contactTime": "2022-01-04T03:34:09.399Z",
-                "satisfactionScore": null,
-                "appointmentMemoList": [],
-                "interviewRecordDTOs": [],
-                "appointmentNoticeLogs": [],
-                "appointmentClosedInfo": {
-                    "id": 70,
-                    "policyholderIdentityId": null,
-                    "planCode": null,
-                    "policyEntryDate": null,
-                    "remark": "ddddde",
-                    "closedReason": "economy",
-                    "closedOtherReason": null,
-                    "appointmentId": 435
-                }
-            }
-        ]
+[ {
+  "agentNo" : "A568420",
+  "name" : "雓�◢",
+  "img" : "C://pam_file/consultant_A568420.jpg",
+  "expertise" : [ "�摨瑁����", "摮戊��" ],
+  "avgScore" : 1.0,
+  "contactStatus" : "reserved",
+  "createTime" : "2021-12-29T09:33:16.526Z",
+  "updateTime" : "2023-07-27T07:50:58.167Z",
+  "customerViewTime" : "2021-12-29T09:33:18.727Z",
+  "role" : "66666",
+  "seniority" : "39 撟� 4 ���",
+  "entryDate" : "1984-03-29T00:00:00.000+00:00",
+  "appointments" : [ {
+    "id" : 435,
+    "phone" : "0973057067",
+    "email" : "",
+    "contactType" : "phone",
+    "gender" : "male",
+    "age" : "under_20",
+    "job" : "憭",
+    "requirement" : "�摨瑁����",
+    "communicateStatus" : "closed",
+    "hopeContactTime" : "'����,�����,�����,�����,�����,���,�����9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
+    "otherRequirement" : null,
+    "appointmentDate" : "2021-12-29T09:33:16.643Z",
+    "lastModifiedDate" : "2022-03-22T03:49:05.602Z",
+    "agentNo" : "A568420",
+    "customerId" : 90,
+    "name" : "Jack",
+    "consultantViewTime" : "2021-12-29T09:33:49.547Z",
+    "consultantReadTime" : "2021-12-29T09:37:21.710Z",
+    "contactTime" : "2022-01-04T03:34:09.399Z",
+    "satisfactionScore" : null,
+    "appointmentMemoList" : [ ],
+    "interviewRecordDTOs" : [ ],
+    "appointmentNoticeLogs" : [ ],
+    "appointmentClosedInfo" : {
+      "id" : 70,
+      "policyholderIdentityId" : null,
+      "planCode" : null,
+      "policyEntryDate" : null,
+      "remark" : "ddddde",
+      "closedReason" : "economy",
+      "closedOtherReason" : null,
+      "appointmentId" : 435
     },
-    {
-        "agentNo": "B282677963",
-        "name": "�憒�",
-        "img": "C://pam_file/consultant_B282677963.jpg",
-        "expertise": [
-            "�摨瑁����",
-            "鞈閬��",
-            "璅暑��隡�",
-            "靽�瑼�/閬��"
-        ],
-        "avgScore": 3.5,
-        "contactStatus": "reserved",
-        "createTime": "2021-11-30T12:31:57.310Z",
-        "updateTime": "2021-12-06T05:36:58.867Z",
-        "customerViewTime": "2021-12-14T07:09:13.150Z",
-        "role": "",
-        "seniority": "30 撟� 8 ���",
-        "appointments": [
-            {
-                "id": 136,
-                "phone": "0973057067",
-                "email": "",
-                "contactType": "phone",
-                "gender": "",
-                "age": "31-40",
-                "job": "",
-                "requirement": "摮戊��",
-                "communicateStatus": "reserved",
-                "hopeContactTime": "'蝳格��,蝳格���,蝳格���,蝳格���,蝳格���,蝳格�,蝳格���9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
-                "otherRequirement": null,
-                "appointmentDate": "2021-11-30T12:39:38.702Z",
-                "lastModifiedDate": "2021-12-06T05:36:58.867Z",
-                "agentNo": "B282677963",
-                "customerId": 90,
-                "name": "Jack",
-                "consultantViewTime": "2021-12-06T05:36:33.180Z",
-                "consultantReadTime": "2021-12-06T05:36:58.866Z",
-                "contactTime": null,
-                "satisfactionScore": 2.0,
-                "appointmentMemoList": [],
-                "interviewRecordDTOs": [],
-                "appointmentNoticeLogs": [],
-                "appointmentClosedInfo": null
-            },
-            {
-                "id": 134,
-                "phone": "0973057067",
-                "email": "",
-                "contactType": "phone",
-                "gender": "",
-                "age": "",
-                "job": "",
-                "requirement": "摮戊��",
-                "communicateStatus": "reserved",
-                "hopeContactTime": "'蝳格��,蝳格���,蝳格���,蝳格���,蝳格���,蝳格�,蝳格���9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
-                "otherRequirement": null,
-                "appointmentDate": "2021-11-30T12:33:48.006Z",
-                "lastModifiedDate": "2021-12-06T05:37:00.385Z",
-                "agentNo": "B282677963",
-                "customerId": 90,
-                "name": "Jack",
-                "consultantViewTime": "2021-12-06T05:36:33.180Z",
-                "consultantReadTime": "2021-12-06T05:37:00.384Z",
-                "contactTime": null,
-                "satisfactionScore": 4.0,
-                "appointmentMemoList": [],
-                "interviewRecordDTOs": [],
-                "appointmentNoticeLogs": [],
-                "appointmentClosedInfo": null
-            },
-            {
-                "id": 135,
-                "phone": "0973057067",
-                "email": "",
-                "contactType": "phone",
-                "gender": "",
-                "age": "31-40",
-                "job": "",
-                "requirement": "摮戊��",
-                "communicateStatus": "reserved",
-                "hopeContactTime": "'蝳格��,蝳格���,蝳格���,蝳格���,蝳格���,蝳格�,蝳格���9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
-                "otherRequirement": null,
-                "appointmentDate": "2021-11-30T12:38:28.930Z",
-                "lastModifiedDate": "2021-12-06T05:37:02.646Z",
-                "agentNo": "B282677963",
-                "customerId": 90,
-                "name": "Jack",
-                "consultantViewTime": "2021-12-06T05:36:33.180Z",
-                "consultantReadTime": "2021-12-06T05:37:02.645Z",
-                "contactTime": null,
-                "satisfactionScore": 4.0,
-                "appointmentMemoList": [],
-                "interviewRecordDTOs": [],
-                "appointmentNoticeLogs": [],
-                "appointmentClosedInfo": null
-            },
-            {
-                "id": 133,
-                "phone": "0973057067",
-                "email": "",
-                "contactType": "phone",
-                "gender": "",
-                "age": "",
-                "job": "",
-                "requirement": "摮戊��",
-                "communicateStatus": "reserved",
-                "hopeContactTime": "'蝳格��,蝳格���,蝳格���,蝳格���,蝳格���,蝳格�,蝳格���9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
-                "otherRequirement": null,
-                "appointmentDate": "2021-11-30T12:31:57.419Z",
-                "lastModifiedDate": "2021-12-06T05:37:05.639Z",
-                "agentNo": "B282677963",
-                "customerId": 90,
-                "name": "Jack",
-                "consultantViewTime": "2021-12-06T05:36:33.180Z",
-                "consultantReadTime": "2021-12-06T05:37:05.639Z",
-                "contactTime": null,
-                "satisfactionScore": null,
-                "appointmentMemoList": [],
-                "interviewRecordDTOs": [],
-                "appointmentNoticeLogs": [],
-                "appointmentClosedInfo": null
-            }
-        ]
-    },
-    {
-        "agentNo": "AGAM11249699",
-        "name": "����",
-        "img": "C://pam_file/consultant_AGAM11249699.jpg",
-        "expertise": [
-            "�摨瑁����",
-            "鞈閬��",
-            "摮戊��",
-            "靽�瑼�/閬��"
-        ],
-        "avgScore": 4.4,
-        "contactStatus": "contacted",
-        "createTime": "2021-11-29T04:02:01.176Z",
-        "updateTime": "2021-12-02T09:51:22.571Z",
-        "customerViewTime": "2021-12-14T07:09:13.150Z",
-        "role": "��陸靽蝬�鈭�",
-        "seniority": "10 撟� 6 ���",
-        "appointments": [
-            {
-                "id": 123,
-                "phone": "0973057067",
-                "email": "",
-                "contactType": "phone",
-                "gender": "",
-                "age": "",
-                "job": "",
-                "requirement": "",
-                "communicateStatus": "contacted",
-                "hopeContactTime": "'蝳格����9:00~12:00'",
-                "otherRequirement": null,
-                "appointmentDate": "2021-12-03T03:25:17.075Z",
-                "lastModifiedDate": "2021-12-02T09:51:22.571Z",
-                "agentNo": "AGAM11249699",
-                "customerId": 90,
-                "name": "Jack",
-                "consultantViewTime": "2021-12-03T03:25:16.996Z",
-                "consultantReadTime": "2021-12-02T09:51:22.571Z",
-                "contactTime": "2021-12-03T03:25:17.075Z",
-                "satisfactionScore": 4.0,
-                "appointmentMemoList": [],
-                "interviewRecordDTOs": [],
-                "appointmentNoticeLogs": [],
-                "appointmentClosedInfo": null
-            }
-        ]
-    },
-    {
-        "agentNo": "R221444250",
-        "name": "撏祠",
-        "img": "C://pam_file/consultant_R221444250.jpg",
-        "expertise": [
-            "�摨瑁����",
-            "摮戊��",
-            "鞈閬��",
-            "璅暑��隡�",
-            "靽�瑼�/閬��",
-            "����"
-        ],
-        "avgScore": 3.1,
-        "contactStatus": "reserved",
-        "createTime": "2021-12-14T07:10:02.068Z",
-        "updateTime": "2021-12-14T07:10:02.144Z",
-        "customerViewTime": "2021-12-14T07:10:03.859Z",
-        "role": "",
-        "seniority": "38 撟� ",
-        "appointments": [
-            {
-                "id": 354,
-                "phone": "0973057067",
-                "email": "",
-                "contactType": "phone",
-                "gender": "male",
-                "age": "21-30",
-                "job": "��",
-                "requirement": "靽�瑼�/閬��",
-                "communicateStatus": "reserved",
-                "hopeContactTime": "'蝳格��,蝳格���,蝳格���,蝳格���,蝳格���,蝳格�,蝳格���18:00~21:00'",
-                "otherRequirement": null,
-                "appointmentDate": "2021-12-14T07:10:02.149Z",
-                "lastModifiedDate": "2021-12-14T07:10:02.144Z",
-                "agentNo": "R221444250",
-                "customerId": 90,
-                "name": "Jack",
-                "consultantViewTime": "2021-12-24T08:48:22.013Z",
-                "consultantReadTime": "2021-12-15T04:58:28.736Z",
-                "contactTime": null,
-                "satisfactionScore": null,
-                "appointmentMemoList": [],
-                "interviewRecordDTOs": [],
-                "appointmentNoticeLogs": [],
-                "appointmentClosedInfo": null
-            }
-        ]
-    }
-]
\ No newline at end of file
+    "consultationMethod" : null
+  }, {
+    "id" : 618,
+    "phone" : "0973057067",
+    "email" : "jack568420@gmail.com",
+    "contactType" : "phone",
+    "gender" : "male",
+    "age" : "21-30",
+    "job" : "��",
+    "requirement" : "����",
+    "communicateStatus" : "reserved",
+    "hopeContactTime" : "'����,�����,�����,�����,�����,���,�����9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
+    "otherRequirement" : null,
+    "appointmentDate" : "2023-07-20T07:49:03.361Z",
+    "lastModifiedDate" : "2023-07-27T07:50:58.167Z",
+    "agentNo" : "A568420",
+    "customerId" : 90,
+    "name" : "Jack",
+    "consultantViewTime" : null,
+    "consultantReadTime" : null,
+    "contactTime" : null,
+    "satisfactionScore" : null,
+    "appointmentMemoList" : [ ],
+    "interviewRecordDTOs" : [ ],
+    "appointmentNoticeLogs" : [ ],
+    "appointmentClosedInfo" : null,
+    "consultationMethod" : "offline"
+  } ]
+} ]
\ No newline at end of file
diff --git "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\217\226\345\276\227\351\240\220\347\264\204\345\226\256\347\264\260\347\257\200API.txt" "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\217\226\345\276\227\351\240\220\347\264\204\345\226\256\347\264\260\347\257\200API.txt"
index b453c56..a073f90 100644
--- "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\217\226\345\276\227\351\240\220\347\264\204\345\226\256\347\264\260\347\257\200API.txt"
+++ "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\217\226\345\276\227\351\240\220\347\264\204\345\226\256\347\264\260\347\257\200API.txt"
@@ -5,12 +5,14 @@
 
 appointmentNoticeLogs: ��������風蝔�
 appointmentClosedInfo: ���蝯����
+consultationMethod: 隢株岷�撘�
 
 
 response body:
 {
     "id": 385,
     "phone": "0911223344",
+    "consultationMethod" : "offline",
     "email": "SDD",
     "contactType": "phone",
     "gender": "female",
diff --git "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\256\242\346\210\266\345\217\226\345\276\227\346\234\200\346\226\260\351\240\220\347\264\204\347\232\204\346\234\252\350\231\225\347\220\206\351\240\220\347\264\204\345\226\256.txt" "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\256\242\346\210\266\345\217\226\345\276\227\346\234\200\346\226\260\351\240\220\347\264\204\347\232\204\346\234\252\350\231\225\347\220\206\351\240\220\347\264\204\345\226\256.txt"
index f4e02f9..aa706d8 100644
--- "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\256\242\346\210\266\345\217\226\345\276\227\346\234\200\346\226\260\351\240\220\347\264\204\347\232\204\346\234\252\350\231\225\347\220\206\351\240\220\347\264\204\345\226\256.txt"
+++ "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\345\256\242\346\210\266\345\217\226\345\276\227\346\234\200\346\226\260\351\240\220\347\264\204\347\232\204\346\234\252\350\231\225\347\220\206\351\240\220\347\264\204\345\226\256.txt"
@@ -57,5 +57,6 @@
         "closedReason": "other2",
         "closedOtherReason": "敹��末銝鞎�2",
         "appointmentId": 385
-    }
+    },
+    "consultationMethod" : "offline"
 }
diff --git "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\346\233\264\346\226\260\351\240\220\347\264\204\345\226\256\346\230\216\347\264\260API.txt" "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\346\233\264\346\226\260\351\240\220\347\264\204\345\226\256\346\230\216\347\264\260API.txt"
index b9031dc..03782c6 100644
--- "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\346\233\264\346\226\260\351\240\220\347\264\204\345\226\256\346\230\216\347\264\260API.txt"
+++ "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\346\233\264\346\226\260\351\240\220\347\264\204\345\226\256\346\230\216\347\264\260API.txt"
@@ -1,6 +1,10 @@
 http put:
 http://localhost:8080/api/appointment
 
+consultationMethod: 隢株岷�撘�(online,offline)
+
+
+
 http request body:
 {
     "id": 170,
@@ -12,7 +16,8 @@
     "job": "��",
     "requirement": "�摨瑁����,摮戊��,鞈閬��",
     "hopeContactTime": "'蝳格��,蝳格���,蝳格���,蝳格���,蝳格���,蝳格�,蝳格���9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
-    "otherRequirement": null
+    "otherRequirement": null,
+    "consultationMethod": "offline"
 }
 
 http response status: 204
diff --git "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\346\250\231\350\250\230\347\202\272\345\267\262\350\201\257\347\265\241API.txt" "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\346\250\231\350\250\230\347\202\272\345\267\262\350\201\257\347\265\241API.txt"
index ad86aac..ff8d1e4 100644
--- "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\346\250\231\350\250\230\347\202\272\345\267\262\350\201\257\347\265\241API.txt"
+++ "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\346\250\231\350\250\230\347\202\272\345\267\262\350\201\257\347\265\241API.txt"
@@ -54,5 +54,6 @@
         "closedReason": "other2",
         "closedOtherReason": "敹��末銝鞎�2",
         "appointmentId": 385
-    }
+    },
+    "consultationMethod": "offline"
 }
diff --git "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\351\240\220\347\264\204\345\211\215\350\251\242\345\225\217.txt" "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\351\240\220\347\264\204\345\211\215\350\251\242\345\225\217.txt"
index ef19a01..c94f905 100644
--- "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\351\240\220\347\264\204\345\211\215\350\251\242\345\225\217.txt"
+++ "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\351\240\220\347\264\204\345\211\215\350\251\242\345\225\217.txt"
@@ -5,6 +5,7 @@
 
 contactType: email,phone
 gender: male, female
+consultationMethod: 隢株岷�撘�(online,offline)
 
 request body:
 
@@ -18,7 +19,8 @@
     "requirement":"鞎∪����,鞈蝘餉��",
     "hopeContactTime":"'����~�����, 12:00~14:00, 18:00~21:00'",
     "otherRequirement":"憭馳����",
-    "agentNo":"admin"
+    "agentNo":"admin",
+    "consultationMethod": "offline"
 }
 
 �����鞈��
@@ -41,5 +43,6 @@
   "customerId" : 167,
   "consultantViewTime" : null,
   "consultantReadTime" : null,
-  "contactTime" : null
+  "contactTime" : null,
+  "consultationMethod": "offline"
 }
diff --git "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\351\241\247\345\225\217\345\217\226\345\276\227\346\211\200\346\234\211\350\207\252\345\267\261\347\232\204\351\240\220\347\264\204\345\226\256API.txt" "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\351\241\247\345\225\217\345\217\226\345\276\227\346\211\200\346\234\211\350\207\252\345\267\261\347\232\204\351\240\220\347\264\204\345\226\256API.txt"
index 9072a0f..6cf4e5e 100644
--- "a/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\351\241\247\345\225\217\345\217\226\345\276\227\346\211\200\346\234\211\350\207\252\345\267\261\347\232\204\351\240\220\347\264\204\345\226\256API.txt"
+++ "b/pamapi/src/doc/\351\240\220\347\264\204\345\226\256/\351\241\247\345\225\217\345\217\226\345\276\227\346\211\200\346\234\211\350\207\252\345\267\261\347\232\204\351\240\220\347\264\204\345\226\256API.txt"
@@ -58,6 +58,7 @@
             "closedReason": "other2",
             "closedOtherReason": "敹��末銝鞎�2",
             "appointmentId": 385
-        }
+        },
+        "consultationMethod" : "offline",
     }
 ]
diff --git a/pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java b/pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java
index f07fba8..e646ebc 100644
--- a/pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java
+++ b/pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java
@@ -68,14 +68,13 @@
 	public AppointmentDTO clientCreateAppointment(@RequestBody AppointmentCreateDTO appointmentCreateDTO) {
         List<Appointment> processing = appointmentService.findProcessingAppointmentByCustomer(SecurityUtils.getCustomerDBId());
         List<Appointment> cancelAppointmentment = appointmentService.findCustomer3DayCancelAppointment();
-        if(processing.size()>0) {
+        if(!processing.isEmpty()) {
         	throw new CreateFailHaveProcessingAppointmentException();
-    	}else if(cancelAppointmentment.size()>0) {
+    	}else if(!cancelAppointmentment.isEmpty()) {
     		throw new CreateFailBecauseOfCancelAppointmentRecentException();
     	}
         
         Appointment appointment = appointmentService.customerCreateAppointment(appointmentCreateDTO);
-//        appointmentService.sendAppointmentNotify(appointment);
         satisfactionService.createUnfilledSystemSatisfaction(appointment);
 
         return appointmentMapper.toAppointmentDTO(appointment);
@@ -126,21 +125,4 @@
         return appointmentService.getCustomerAllAppointmentGroupByConsultant();
     }
 
-//	@PostMapping("/close/info/edit")
-//    public ResponseEntity<Void> editAppointmentClosedInfo(@RequestBody AppointmentCloseDTO closeDTO) {
-//
-//		if(closeDTO.getContactStatus() == ContactStatusEnum.DONE) {
-//			DoneProcessDTO dto = new DoneProcessDTO();
-//			BeanUtils.copyProperties(closeDTO, dto);
-//			abstractAppointmentProcess.editClosedInfo(dto);
-//		}else if(closeDTO.getContactStatus() == ContactStatusEnum.CLOSED){
-//			ClosedProcessDTO dto = new ClosedProcessDTO();
-//			BeanUtils.copyProperties(closeDTO, dto);
-//			abstractAppointmentProcess.editClosedInfo(dto);
-//		}else {
-//			return ResponseEntity.notFound().build();
-//		}
-//
-//        return ResponseEntity.noContent().build();
-//    }
 }

--
Gitblit v1.8.0