---
# System prepended metadata

title: 課程統計

---

# 課程統計

## 查詢列表

```url=
POST /statistics/course/find
```
|  欄位 | 型態  | 必填   | 說明  | 
|---|---|---|---|---|
| organIds | number | true | 組織代號陣列 |
| startedAt | timestamp | true | 起始日期 |
| endedAt | timestamp | true | 結束日期|
| caseTypeIds | int array | false | 收案類別Id陣列|
| trainingTypes | int array | false | 訓練項目類別 (1: 復能/2: 快篩)|

Payload：
```json=
{
    "organIds":[5,6],
    "startedAt": 1596139200000,
    "endedAt": 1597647600000,
    "caseTypeIds": [],
    "trainingTypes": []
}
```

Response (成功):
```json=
{
  "success": true,
  "total": 6,
  "data": [
    {
      "id": 0,
      "organName": "高醫附屬醫材製造",
      "caseTypeName": "主題單元",
      "caseStatusName": "多媒體課程",
      "trainingItemTypeName": "復能",
      "trainingItemName": "1003生病",
      "2020/07": 0,
      "2020/08": 2,
      ......
    },
    ...
  ]
}
```

## 匯出
```url=
POST /statistics/course/export
```
|  欄位 | 型態  | 必填   | 說明  | 
|---|---|---|---|---|
| organIds | number | true | 組織代號陣列 |
| startedAt | timestamp | true | 起始日期 |
| endedAt | timestamp | true | 結束日期|
| caseTypeIds | int array | false | 收案類別Id陣列|
| trainingTypes | int array | false | 訓練項目類別 (1: 復能/2: 快篩)|

Response (成功):
=> 直接回傳檔案byte stream
