# 企客年度健檢
---
API
* [新增健檢Excel解析](#新增健檢Excel解析)
* [新增健檢](#新增健檢)
* [編輯詳情](#編輯詳情)
* [更新健檢Excel解析](#更新健檢Excel解析)
* [更新健檢](#更新健檢)
* [匯入每日到檢名單Excel解析](#匯入每日到檢名單Excel解析)
* [匯入每日到檢名單](#匯入每日到檢名單)
* [匯出健檢執行狀態](#匯出健檢執行狀態)
* [健檢名稱關鍵字搜尋](#健檢名稱關鍵字搜尋)
* [健檢名稱下拉選單](#健檢名稱下拉選單)
* [健檢執行分析](#健檢執行分析)
* [上傳錯誤Excel下載](#上傳錯誤Excel下載)
---
## 新增健檢Excel解析
````url
POST healthExamination/add/parse
````
### Request
form-data
| Key | Value | ContentType |
|------|-------------|---------------------|
| file | import.xlsx | multipart/form-data |
### Response
| 欄位 | 型態 | 說明 |
|-----------------|---------|----------------------|
| totalCount | Integer | 非空去表頭行計數 |
| successCount | Integer | 成功計數 |
| failCount | Integer | 失敗計數 |
| failuresId | String | 上傳錯誤Excel failuresId |
| participantList | Array | 參與人List |
participant
| 欄位 | 型態 | 說明 |
|-------------------|--------|------|
| householdMemberId | String | 個案id |
| appointmentTime | Date | 健檢時間 |
````json
{
"httpCode": 200,
"result": {
"data": {
"totalCount": 8,
"successCount": 3,
"failCount": 5,
"failuresId": "5c8877d7-7397-4a13-9101-a2fe9ff5d82c",
"participantList": [
{
"householdMemberId": "c0fbb6d5-53c4-4962-bc17-1591e4903b2f",
"appointmentTime": 1689382800000
},
{
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"appointmentTime": 1689382800000
},
{
"householdMemberId": "8a9e980a-c612-4f87-af07-a97a5f0fbed5",
"appointmentTime": 1689382800000
}
]
}
}
}
````
## 新增健檢
````url
POST healthExamination/add
````
### Request
requestVO
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|-------------------------|--------|----|------|-------------|
| infoMessage | String | Y | 200 | subCategory |
| defaultNotificationTask | Object | N | | 健檢通知 |
| preNotificationTask | Object | N | | 健檢前提醒 |
| noShowNotificationTask | Object | N | | 未到檢通知 |
| participantList | Array | Y | | 參加者List |
NotificationTask
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|--------------------|---------|----|-------|-------------------------|
| notificationPeriod | Integer | Y | 0~365 | 前幾日發出通知(noShow可不填,預設為0) |
| time | String | Y | 5 | HH:mm (24小時制) |
| title | String | Y | 200 | 通知標題 |
| description | String | Y | 2000 | 通知內文 |
| status | Boolean | Y | | 是否啟用 |
participant
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|-------------------|--------|----|-------|------|
| householdMemberId | String | Y | 36-36 | 個案id |
| appointmentTime | Date | Y | | 健檢時間 |
````josn
{
"infoMessage": "安5安yaya",
"defaultNotificationTask": {
"notificationPeriod": 7,
"time": "23:55",
"title": "低否標題",
"description": "低否內文",
"status": true
},
"preNotificationTask": {
"notificationPeriod": 7,
"time": "12:55",
"title": "匹標題",
"description": "匹內文",
"status": false
},
"noShowNotificationTask": {
"notificationPeriod": 7,
"time": "12:55",
"title": "沒秀標題",
"description": "沒秀內文",
"status": true
},
"participantList": [
{
"householdMemberId": "c0fbb6d5-53c4-4962-bc17-1591e4903b2f",
"appointmentTime": 1689382800000
},
{
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"appointmentTime": 1689382800000
}
]
}
````
### Response
| 欄位 | 型態 | 說明 |
|---------------------------|---------|-------------|
| id | String | 健檢infoId |
| totalCount | Integer | 匯入個案計數 |
| successCount | Integer | 匯入成功個案計數 |
| failCount | Integer | 匯入失敗個案計數 |
| defaultNotificationTaskId | String | 健檢通知taskId |
| preNotificationTaskId | String | 健檢前提醒taskId |
| noShowNotificationTaskId | String | 未到檢通知taskId |
````json
{
"httpCode": 200,
"result": {
"data": {
"id": "8fa2f84c-f871-49de-893b-9519701437ea",
"totalCount": 2,
"successCount": 2,
"failCount": 0,
"defaultNotificationTaskId": "5a4ea8bd-5a5f-4646-81cb-8c49813f6d18",
"preNotificationTaskId": "5acf40cf-6973-4151-b5e4-9745059d879b",
"noShowNotificationTaskId": "6e9e4b96-a5dd-4375-8400-ba0224608ed7"
}
}
}
````
## 編輯詳情
````url
POST healthExamination/info
````
### Request
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|----|--------|----|------|----------|
| id | String | Y | 36 | 健檢infoId |
```json
{
"id": "57d808ff-dc92-4ac1-98ae-ea46c36275b6"
}
```
### Response
| 欄位 | 型態 | 說明 |
|-------------------------|--------|-----------|
| id | String | 健檢infoId |
| infoMessage | String | 健檢名稱 |
| defaultNotificationTask | Object | 健檢通知task |
| preNotificationTask | Object | 健檢前提醒task |
| noShowNotificationTask | Object | 未到檢通知task |
NotificationTask
| 欄位 | 型態 | 說明 |
|--------------------|---------|-------------------------------|
| id | String | taskId |
| notificationPeriod | Integer | 前幾日發出通知(noShow不可編輯為null,預設為0) |
| time | String | HH:mm (24小時制) |
| title | String | 通知標題 |
| description | String | 通知內文 |
| status | Boolean | 是否啟用 |
```json
{
"httpCode": 200,
"result": {
"data": {
"id": "57d808ff-dc92-4ac1-98ae-ea46c36275b6",
"infoMessage": "2023健康檢查",
"defaultNotificationTask": {
"id": "2e14d252-6db6-49ca-892c-61158aa9aa17",
"notificationPeriod": 7,
"time": "23:55",
"title": "低否標題",
"description": "低否內文",
"status": true
},
"preNotificationTask": {
"id": "83bc5a46-e956-45db-b8e9-38781db24ffe",
"notificationPeriod": 7,
"time": "12:55",
"title": "匹標題",
"description": "匹內文",
"status": true
},
"noShowNotificationTask": {
"id": "437a0b3e-98d6-43bf-85d2-af6e2af76806",
"time": "12:55",
"title": "沒秀標題",
"description": "沒秀內文",
"status": true
}
}
}
}
```
## 更新健檢Excel解析
````url
POST healthExamination/update/parse
````
### Request
form-data
| Key | Value | ContentType |
|------|-------------|---------------------|
| file | import.xlsx | multipart/form-data |
### Response
| 欄位 | 型態 | 說明 |
|-----------------|---------|------------|
| totalCount | Integer | 非空去表頭行計數 |
| successCount | Integer | 成功計數 |
| failCount | Integer | 失敗計數 |
| failuresId | String | 上傳錯誤Excel failuresId |
| participantList | Array | 參與人List |
participant
| 欄位 | 型態 | 說明 |
|-------------------|--------|------|
| householdMemberId | String | 個案id |
| appointmentTime | Date | 健檢時間 |
| examinationStage | String | 狀態 |
````json
{
"httpCode": 200,
"result": {
"data": {
"totalCount": 4,
"successCount": 3,
"failCount": 1,
"failuresId": "fc4253a6-7c8f-442f-b6ee-617961c733a9",
"participantList": [
{
"householdMemberId": "c0fbb6d5-53c4-4962-bc17-1591e4903b2f",
"appointmentTime": 1689382800000
},
{
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"appointmentTime": 1689382800000,
"examinationStage": "DELETE"
},
{
"householdMemberId": "8a9e980a-c612-4f87-af07-a97a5f0fbed5",
"appointmentTime": 1689382800000
}
]
}
}
}
````
## 更新健檢
````url
POST healthExamination/update
````
### Request
form-data
| Key | Value | ContentType |
|-----------|-------------|---------------------|
| file | update.xlsx | multipart/form-data |
| requestVO | Object | application/json |
requestVO
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
| ----------------------- |:------ | ---- | -------- | ----------- |
| infoMessage | String | Y | 200 | subCategory |
| defaultNotificationTask | Object | N | | 健檢通知 |
| preNotificationTask | Object | N | | 健檢前提醒 |
| noShowNotificationTask | Object | N | | 未到檢通知 |
| participantList | Array | Y | | 參加者List(無需更新請塞空字串[])|
NotificationTask
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|--------------------|---------|----|-------|-------------------------------|
| notificationPeriod | Integer | Y | 0~365 | 前幾日發出通知(noShow不可編輯為null,預設為0) |
| time | String | Y | 5 | HH:mm (24小時制) |
| title | String | Y | 200 | 通知標題 |
| description | String | Y | 2000 | 通知內文 |
| status | Boolean | Y | | 是否啟用 |
participant
| 欄位 | 型態 | 說明 |
|-------------------|--------|------|
| householdMemberId | String | 個案id |
| appointmentTime | Date | 健檢時間 |
| examinationStage | String | 狀態 |
````json
{
"id": "e23cd7f3-b34c-4abb-b3f7-dab1a192a1d1",
"infoMessage": "2023健康檢查更新名稱",
"defaultNotificationTask": {
"notificationPeriod": 7,
"time": "23:45",
"title": "低否標題",
"description": "低否內文",
"status": false
},
"preNotificationTask": {
"notificationPeriod": 7,
"time": "12:55",
"title": "匹標題",
"description": "匹內文",
"status": true
},
"noShowNotificationTask": {
"time": "15:55",
"title": "沒秀標題",
"description": "沒秀內文",
"status": true
},
"participantList": [
{
"householdMemberId": "c0fbb6d5-53c4-4962-bc17-1591e4903b2f",
"appointmentTime": 1689382800000
},
{
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"appointmentTime": 1689382800000,
"examinationStage": "DELETE"
},
{
"householdMemberId": "8a9e980a-c612-4f87-af07-a97a5f0fbed5",
"appointmentTime": 1689382800000
}
]
}
````
### Response
| 欄位 | 型態 | 說明 |
|:------------------------- | ------- |:-------------------- |
| id | String | 更新健檢infoId |
| totalCount | Integer | 總數 |
| successCount | Integer | 成功計數 |
| failCount | Integer | 失敗計數 |
| failEmployNoList | Array | 失敗員工編號 |
| defaultNotificationTaskId | String | 更新健檢通知taskId |
| preNotificationTaskId | String | 更新健檢前提醒taskId |
| noShowNotificationTaskId | String | 更新未到檢通知taskId |
```json
{
"httpCode": 200,
"result": {
"data": {
"totalCount": 3,
"successCount": 2,
"failCount": 1,
"id": "f9be35ba-8883-431e-a6e2-0dd67839e010",
"defaultNotificationTaskId": "38107cf8-78a2-48bc-99ef-b925bb953365",
"preNotificationTaskId": "e95fea95-81da-4db1-9dc1-5ce022c7ad9e",
"noShowNotificationTaskId": "912318ff-7c8e-4b83-8d12-e3ae595d4325"
}
}
}
```
## 匯入每日到檢名單Excel解析
````url
POST healthExamination/stage/import/parse
````
### Request
form-data
| Key | Value | ContentType |
|-----------|-------------|---------------------|
| file | import.xlsx | multipart/form-data |
| requestVO | Object | application/json |
requestVO
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|----|--------|----|------|----------|
| id | String | Y | 36 | 健檢infoId |
```json
{
"id": "e23cd7f3-b34c-4abb-b3f7-dab1a192a1d1"
}
```
### Response
| 欄位 | 型態 | 說明 |
|-----------------|---------|------------|
| totalCount | Integer | 非空去表頭行計數 |
| successCount | Integer | 成功計數 |
| failCount | Integer | 失敗計數 |
| failuresId | String | 上傳錯誤Excel failuresId |
| participantList | Array | 參與人List |
participant
| 欄位 | 型態 | 說明 |
|-------------------|--------|------|
| householdMemberId | String | 個案id |
| examinationTime | Date | 報到時間 |
````json
{
"httpCode": 200,
"result": {
"data": {
"totalCount": 4,
"successCount": 2,
"failCount": 2,
"failuresId": "19eb2547-4324-4a66-8ddf-eda5aa1b7356",
"participantList": [
{
"householdMemberId": "c0fbb6d5-53c4-4962-bc17-1591e4903b2f",
"examinationTime": 1690678800000
},
{
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"examinationTime": 1690678800000
}
]
}
}
}
````
## 匯入每日到檢名單
````url
POST healthExamination/stage/import
````
### Request
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|-----------------|--------|----|------|----------|
| id | String | Y | 36 | 健檢infoId |
| participantList | Array | Y | | 參與人List |
participant
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|-------------------|--------|----|------|------|
| householdMemberId | String | Y | 36 | 個案id |
| examinationTime | Date | Y | | 報到時間 |
```json
{
"id": "99b463d8-0ae7-4fc7-b33a-cef8905c6295",
"participantList": [
{
"householdMemberId": "c0fbb6d5-53c4-4962-bc17-1591e4903b2f",
"examinationTime": 1690678800000
},
{
"householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
"examinationTime": 1690678800000
}
]
}
```
### Response
| 欄位 | 型態 | 說明 |
|------------------|---------|--------|
| successCount | Integer | 成功計數 |
| failCount | Integer | 失敗計數 |
| failCount | Integer | 失敗計數 |
| failEmployNoList | Array | 失敗員工編號 |
````json
{
"httpCode": 200,
"result": {
"data": {
"successCount": 2,
"failCount": 2
}
}
}
````
## 匯出健檢執行狀態
````url
POST healthExamination/stage/export
````
### Request
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|----|--------|----|------|----------|
| id | String | Y | 36 | 健檢infoId |
```json
{
"id": "e23cd7f3-b34c-4abb-b3f7-dab1a192a1d1"
}
```
### Response
HealthExaminationStage_yyyyMMdd.xlsx
## 健檢名稱關鍵字搜尋
````url
POST healthExamination/query
````
### Request
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|---------|--------|----|------|------------------------------------------------------------------------------------------------------------------|
| keyword | 關鍵字 | N | 200 | 搜尋關鍵字、空字串 or null 為搜尋全部 |
| field | String | N | | infoMessage、participantCount、defaultNotificationStatus、preNotificationStatus、noShowNotificationStatus、updateTime |
| order | String | N | 10 | asc、desc |
```json
{
"keyword": "關鍵字",
"field": "infoMessage",
"order": "desc"
}
```
### Response
| 欄位 | 型態 | 說明 |
|---------------------------|---------|----------|
| id | String | 健檢infoId |
| infoMessage | String | 健檢名稱 |
| participantCount | Integer | 健檢名單人數 |
| defaultNotificationStatus | Boolean | 健檢通知 |
| preNotificationStatus | Boolean | 健檢前提醒 |
| noShowNotificationStatus | Boolean | 未到檢提醒 |
| updateTime | Date | 最近一次更新時間 |
```json
{
"httpCode": 200,
"result": {
"data": [
{
"id": "378b6982-cee8-436b-95a9-895b2370749b",
"infoMessage": "2023健康檢查",
"participantCount": 2,
"defaultNotificationStatus": false,
"preNotificationStatus": true,
"noShowNotificationStatus": true,
"updateTime": 1690768260122
}
]
}
}
```
## 健檢名稱下拉選單
````url
GET healthExamination/dropdown
````
### Request
--
### Response
| 欄位 | 型態 | 說明 |
|-------------|--------|----------|
| id | String | 健檢infoId |
| infoMessage | String | 健檢名稱 |
```json
{
"httpCode": 200,
"result": {
"data": [
{
"id": "bd546ba3-993a-4565-b01f-3cf570a0a94e",
"infoMessage": "2023健康檢查"
},
{
"id": "e23cd7f3-b34c-4abb-b3f7-dab1a192a1d1",
"infoMessage": "2024健康檢查"
},
{
"id": "378b6982-cee8-436b-95a9-895b2370749b",
"infoMessage": "2025健康檢查"
},
{
"id": "ff96e595-05bf-4db6-a729-048daf223bff",
"infoMessage": "2026健康檢查"
}
]
}
}
```
## 上傳錯誤Excel下載
````url
POST healthExamination/failures/export
````
### Request
| 欄位 | 型態 | 必填 | 長度限制 | 說明 |
|----|--------|----|------|------------|
| id | String | Y | 36 | failuresId |
```json
{
"id": "e23cd7f3-b34c-4abb-b3f7-dab1a192a1d1"
}
```
### Response
HealthExaminationFailures_yyyyMMdd.xlsx