# 方案管理 ## 方案管理列表 ```url= POST /chargePlan/list ``` Request | 欄位 | 型態 | 必填 | 預設 | 說明 | |---|---|---|---|---| | query | json | | | 篩選(planName, divisionId, tenantName, status) | | pagination | json | | | 分頁 | | - current | int | | 1 | 當前頁數 | | - pageSize | int | | -2 | 每頁結果數量,-1 為顯示所有| | sorter | json | | | 排序欄位, 預設是用更新時間降序排列 | | - field | string | | update_time(目前已 planName 為預設) | 排序欄位 | | - order | string | | desc | 生序或降序 ```javascript { "query": { "planName":"XXX" }, "pagination": { "current": 1, "pageSize": -1 }, "sorter": { "field": "planName", "order": "asc" } } ``` Response | 欄位 | 型態 | 說明 | | -----| -----|-------- | | planName | String | 收費方案名稱 | | chargePlanType | String |收費方案類別(A)加值方案/(G)一般方案| | periodTime | int | 方案期間 | | unit | int | 方案期間單位 | | unitMoney | String | 方案單價 | | description | string | 描述 | | status | boolean |是否啟用| ```json { "httpCode": 200, "result": { "data": [ { "id": "41c65fbf-2567-47bf-90c9-87a7ae0245c5", "planName": "孝親方案", "chargePlanType": "G", "periodTime": 5, "unit": 1, "unitMoney": 1500, "description": "123", "status": true, "updateTime": 1612497251709 } ], "pagination": { "current": 1, "pageSize": -1, "total": 3 }, "sorter": { "field": "planName", "order": "asc" }, "total": 3 } } ``` ## 新增方案管理 ```url= POST /chargePlanBase/add ``` Request | 欄位 | 型態 | 必填 | 預設 | 說明 | |---|---|---|---|---| | tenantId | string | 租戶Id | | divisionId | string | 科別Id | | chargePlanInfoBaseId | 方案參數Id | | unitMoney | int | 方案單價 | | sharingWmt | int | wmt分潤 | | sharingTenant | int | 租戶分潤 | ```json { "tenantId": "858b7fbb-3ba0-4d49-9882-c893a1ef07dc", "divisionId" : "2c18cc98-bd67-4d83-afdd-36bb5b370387", "chargePlanInfoBaseId":"41c65fbf-2567-47bf-90c9-87a7ae0245c5", "unitMoney": 2200, "sharingWmt": 500, "sharingTenant": 600 } ``` Response | 欄位 | 型態 | 說明 | | -----| -----|-------- | | planName | String | 收費方案名稱 | | chargePlanType | String |收費方案類別(A)加值方案/(G)一般方案| | periodTime | int | 方案期間 | | unit | int | 方案期間單位 | | unitMoney | String | 方案單價 | | description | string | 描述 | | status | boolean |是否啟用| ```json { "httpCode": 200, "result": { "data": { "id": "7bead270-6ff6-417d-9ef7-cd247d633e29", "chargePlanType": "A", "description": "方案描述", "periodTime": 1000, "planName": "方案123", "status": false, "unit": 1, "unitMoney": 12300, "updateTime": 1612752760214 } } } ``` ## 編輯方案管理 ```url= POST /chargePlanBase/update ``` Request | 欄位 | 型態 | 必填 | 預設 | 說明 | |---|---|---|---|---| | planName | String | 收費方案名稱 | | chargePlanType | String |收費方案類別(A)加值方案/(G)一般方案| | periodTime | int | 方案期間 | | unit | int | 方案期間單位 | | unitMoney | String | 方案單價 | | description | string | 描述 | | status | boolean |是否啟用| ```javascript { "id": "7bead270-6ff6-417d-9ef7-cd247d633e29", "chargePlanType": "A", "description": "方案描述", "periodTime": 1000, "planName": "方案123", "status": false, "unit": 1, "unitMoney": 12300, "updateTime": 1612752760214 } ``` Response | 欄位 | 型態 | 說明 | | -----| -----|-------- | | planName | String | 收費方案名稱 | | chargePlanType | String |收費方案類別(A)加值方案/(G)一般方案| | periodTime | int | 方案期間 | | unit | int | 方案期間單位 | | unitMoney | String | 方案單價 | | description | string | 描述 | | status | boolean |是否啟用| ```json { "httpCode": 200, "result": { "data": { "id": "7bead270-6ff6-417d-9ef7-cd247d633e29", "chargePlanType": "A", "description": "方案描述", "periodTime": 1000, "planName": "方案123", "status": false, "unit": 1, "unitMoney": 12300, "updateTime": 1612752760214 } } } ``` ## 啟用停用科別 ```url= POST /chargePlanBase/status ``` Request | 欄位 | 型態 | 必填 | 預設 | 說明 | |---|---|---|---|---| | status | bool | * | | 是否啟用 | ```javascript { "id": "d09b0153-f3c3-4420-b7f8-8b9ce22fc84d", "status": true } ``` Response | 欄位 | 型態 | 說明 | | -----| -----|-------- | | planName | String | 收費方案名稱 | | chargePlanType | String |收費方案類別(A)加值方案/(G)一般方案| | periodTime | int | 方案期間 | | unit | int | 方案期間單位 | | unitMoney | String | 方案單價 | | description | string | 描述 | | status | boolean |是否啟用| ```json { "httpCode": 200, "result": { "data": { "id": "7bead270-6ff6-417d-9ef7-cd247d633e29", "chargePlanType": "A", "description": "方案描述", "periodTime": 1000, "planName": "方案123", "status": false, "unit": 1, "unitMoney": 12300, "updateTime": 1612752760214 } } } ``` ```