知识库
[TOC]
# [知识库接口]
> 状态说明
status: created(创建) processing(处理中)confirming(待确认),completed(完成)
## 1. /report/file
### 1.1. 接口功能
> 上传图片
### 1.2. 请求方式
> POST
### 1.3. 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|file|false|File|文件|
### 1.4. 结果
```
{
"status": 200,
"message": "",
"error": "",
"error_description": "",
"timestamp": 1564382493643,
"data": {
"path": "http://127.0.0.1:8980/file/20190729/79b1b85c-2c57-423f-ab68-0435baab2e2b.png"
}
}
```
## 2. /report/list
#### 接口功能
> 专题汇报列表
#### 请求方式
> GET
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|startDate|false|string|开始时间[yyyy-MM-dd (HH:mm:ss)]|
|endDate|false|String|结束时间[yyyy-MM-dd (HH:mm:ss)]|
|searchKey|false|String|关键字查询|
|page|false|Int|分页(0 开始)|
|size|false|Int|页数|
|sort|false|string|排序(sort=xx,desc&sort=xx,asc)|
###### 结果
```json
{
"content": [
{
"id": "1155692988694863873",
"title": "污水指标异常纪录22",
"treeSort": 1,
"status": "created",
"createDate": "2019-07-29 12:14:14",
"createBy": "aa",
"updateDate": "2019-07-29 17:45:16",
"updateBy": "xukk",
"extList": [
{
"id": "1155778000018595841",
"questionPhotos": null,
"questionDesc": "342242",
"happenedTimePhotos": "4444",
"happenedTime": "4444",
"scenePhotos": null,
"standardVariationTrend": "444",
"standardVariationTrendPhotos": "444",
"parameterVariationTrend": null,
"parameterVariationTrendPhotos": null,
"dataAnalysisPhotos": "444",
"processAdjustmentSolution": null,
"processAdjustmentSolutionPhotos": null,
"additiveSolution": "4444",
"additiveSolutionPhotos": "444",
"technicalSolution": "4444",
"technicalSolutionPhotos": "222",
"replyId": null,
"replyContent": null,
"replyDate": null,
"replyName": null,
"feedbackId": null,
"feedbackName": null,
"feedbackContent": null,
"feedbackDate": null,
"feedbackPhotos": null,
"status": null,
"noneffectiveContent": null,
"createDate": "2019-07-29 17:52:02",
"updateDate": "2019-07-29 17:52:02"
}
]
}
],
"pageable": {
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"offset": 0,
"pageNumber": 0,
"pageSize": 10,
"paged": true,
"unpaged": false
},
"last": true,
"totalPages": 1,
"totalElements": 1,
"number": 0,
"size": 10,
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"numberOfElements": 1,
"first": true,
"empty": false
}
```
----------
## 3. /report
#### 接口功能
> 专题汇报添加
#### 请求方式
> POST
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|title|ture|string|标题|
|status|true|String|状态|
|type|true|integer|类型 0 默认 1 预警|
|attachId|true|integer|预警ID|
|extList|false|Array(Object)|用户昵称|
|---questionDesc|false|String|问题(现象)描述|
|---questionPhotos|false|String|问题(现象)照片|
|---happenedTimePhotos|false|String|发生的时间及持续时间照片|
|---happenedTime|false|String|发生的时间及持续时间|
|---scenePhotos|false|String|现场照片|
|---standardVariationTrend|false|String|进出水水质等指标变化趋势|
|---standardVariationTrendPhotos|false|String|进出水水质等指标变化趋势照片|
|---parameterVariationTrend|false|String|主要工艺运行参数变化趋势|
|---parameterVariationTrendPhotos|false|String|主要工艺运行参数变化趋势照片|
|---dataAnalysisPhotos|false|String|数据分析图|
|---processAdjustmentSolution|false|String|工艺调整解决|
|---processAdjustmentSolutionPhotos|false|String|工艺调整解决照片|
|---additiveSolution|false|String|投加药剂解决|
|---additiveSolutionPhotos|false|String|投加药剂解决照片|
|---technicalSolution|false|String|需要技术部解决的问题|
|---technicalSolutionPhotos|false|String|需要技术部解决的问题照片|
###### 请求例子
```
curl -X POST http://127.0.0.1:8096/report
-d '{
"title":"污水指标异常纪录33",
"extList":[
{
"status":"created",
"additiveSolution": "4444",
"additiveSolutionPhotos": "444",
"createDate": "2019-07-29 17:22:00",
"dataAnalysisPhotos": "444",
"happenedTime": "4444",
"happenedTimePhotos": "4444",
"standardVariationTrend": "444",
"standardVariationTrendPhotos": "444",
"technicalSolution": "4444",
"technicalSolutionPhotos": "222",
"questionDesc":"342242",
"updateDate": "2019-07-29 17:22:00"
}],
"status":"created"
}'
```
----------
## 4. /report/ext
#### 接口功能
> 专题汇报子项 修改 比如添加回复 回复人
#### 请求方式
> PATCH
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|id|true|string|extId|
|status|true|String|子项当前状态|
|replyId|false|string|回复人ID|
|replyContent|false|String|回复人内容|
|replyDate|false|String|回复人时间|
|replyName|false|String|回复人名称|
|feedbackId|false|String|反馈人ID|
|feedbackName|false|String|反馈人名称|
|feedbackContent|false|String|反馈人内容|
|feedbackDate|false|String|反馈日期|
|feedbackPhotos|false|String|反馈照片|
|noneffectiveContent|false|String|无效原因|
##### 请求例子
```
curl -X PATCH http://127.0.0.1:8096/report/ext
-d '{
"id":"1155692988829081602",
"questionDesc":"444"
}'
```
## 5. /report/{id}/ext
#### 接口功能
> 专题汇报子项 添加
#### 请求方式
> POST
{id} 对应与专题汇报report ID
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|questionDesc|false|String|问题(现象)描述|
|questionPhotos|false|String|问题(现象)照片|
|happenedTimePhotos|false|String|发生的时间及持续时间照片|
|happenedTime|false|String|发生的时间及持续时间|
|scenePhotos|false|String|现场照片|
|standardVariationTrend|false|String|进出水水质等指标变化趋势|
|standardVariationTrendPhotos|false|String|进出水水质等指标变化趋势照片|
|parameterVariationTrend|false|String|主要工艺运行参数变化趋势|
|parameterVariationTrendPhotos|false|String|主要工艺运行参数变化趋势照片|
|dataAnalysisPhotos|false|String|数据分析图|
|processAdjustmentSolution|false|String|工艺调整解决|
|processAdjustmentSolutionPhotos|false|String|工艺调整解决照片|
|additiveSolution|false|String|投加药剂解决|
|additiveSolutionPhotos|false|String|投加药剂解决照片|
|technicalSolution|false|String|需要技术部解决的问题|
|technicalSolutionPhotos|false|String|需要技术部解决的问题照片|
###### 请求例子
```
curl -X POST http://xxxx:8096/report/1155692988694863873/ext
-d '{
"additiveSolution": "4444",
"additiveSolutionPhotos": "444",
"createDate": "2019-07-29 17:22:00",
"dataAnalysisPhotos": "444",
"happenedTime": "4444",
"happenedTimePhotos": "4444",
"standardVariationTrend": "444",
"standardVariationTrendPhotos": "444",
"technicalSolution": "4444",
"technicalSolutionPhotos": "222",
"questionDesc":"342242",
"updateDate": "2019-07-29 17:22:00"
}'
```
## 6. /report/{id}
#### 接口功能
> 专题汇报 删除
{id} 专题汇报ID 只有归档后的才能删除
#### 请求方式
> DELETE
###### 请求例子
```
curl -X DELETE http://127.0.0.1:8096/report/115569298869486387
```
## 7. /report/view/{id}
#### 接口功能
> 专题汇报 游览
{id} 专题汇报ID
#### 请求方式
> GET
###### 请求例子
```
curl -X GET http://127.0.0.1:8096/report/view/115569298869486387
```