年中年末报告
[TOC]
# [年中年末报告接口]
## 1. /checkScores
#### 接口功能
> 获取模板列表
获取状态正常的数据
#### 请求方式
> GET
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|status|true|integer|状态 (0 正常 1 删除)|
|page|false|integer|页数|
|size|false|integer|每页条数|
###### 请求内容:
```
curl -X GET 'http://localhost:8080/checkScores?status=0'
```
###### 返回结果:
字段 参考createTemplate 接口
```
{
"exception": "",
"path": "/checkScores",
"data": {
"content": [
{
"id": 16,
"parentId": 15,
"fromTime": "2020-08-10 12:12:00",
"toTime": "2020-08-16 12:12:00",
"totalAmount": 100,
"createBy": null,
"createTime": "2020-08-11 02:47:10",
"updateBy": null,
"updateTime": "2020-08-11 02:47:10",
"status": 0,
"version": 3,
"checkScorePjList": [
{
"id": 18,
"pjName": "安全管理11",
"pjScore": 10,
"checkScoreDetailList": [
{
"id": 26,
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null
}
]
},
{
"id": 19,
"pjName": "工艺管理11",
"pjScore": 10,
"checkScoreDetailList": [
{
"id": 27,
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null
},
{
"id": 28,
"name": "出水达标情况",
"scoreDetail": "依据:出水在线监测数据及第三方检测取样结果",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null
}
]
}
],
"checkScoreOfficeList": [
{
"id": 11,
"officeCode": "EP04",
"officeName": "运营管理部"
},
{
"id": 12,
"officeCode": "XG",
"officeName": "孝感中设水务有限公司"
}
]
}
],
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"offset": 0,
"pageNumber": 0,
"pageSize": 20,
"paged": true,
"unpaged": false
},
"last": true,
"totalPages": 1,
"totalElements": 1,
"number": 0,
"size": 20,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"numberOfElements": 1,
"first": true,
"empty": false
},
"error": "",
"message": "ok",
"operator": "xukk",
"status": 200,
"timestamp": "2020-08-11 03:05:34"
}
```
----------
## 2. /checkScores/one/{id}
#### 接口功能
> 获取模板详情
#### 请求方式
> GET
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|id|true|integer|模板ID|
###### 请求内容:
```
curl -X GET 'http://localhost:8080/checkScores/one/16'
```
###### 返回结果:
```
{
"exception": "",
"path": "/checkScores/one/16",
"data": {
"id": 16,
"parentId": 15,
"fromTime": "2020-08-10 12:12:00",
"toTime": "2020-08-16 12:12:00",
"totalAmount": 100,
"createBy": null,
"createTime": "2020-08-11 02:47:10",
"updateBy": null,
"updateTime": "2020-08-11 02:47:10",
"status": 0,
"version": 3,
"checkScorePjList": [
{
"id": 18,
"pjName": "安全管理11",
"pjScore": 10,
"checkScoreDetailList": [
{
"id": 26,
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null,
"officeCheckDetailId": null
}
]
},
{
"id": 19,
"pjName": "工艺管理11",
"pjScore": 10,
"checkScoreDetailList": [
{
"id": 27,
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null,
"officeCheckDetailId": null
},
{
"id": 28,
"name": "出水达标情况",
"scoreDetail": "依据:出水在线监测数据及第三方检测取样结果",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null,
"officeCheckDetailId": null
}
]
}
],
"checkScoreOfficeList": [
{
"id": 11,
"officeCode": "EP04",
"officeName": "运营管理部"
},
{
"id": 12,
"officeCode": "XG",
"officeName": "孝感中设水务有限公司"
}
]
},
"error": "",
"message": "ok",
"operator": "xukk",
"status": 200,
"timestamp": "2020-08-12 03:40:29"
}
```
----------
## 3. /checkScores/creatTemplate
#### 接口功能
> 创建模板 / JSON
#### 请求方式
> POST
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|fromTime|true|String|开始时间[yyyy-MM-dd (HH:mm:ss)]|
|toTime|true|String|结束时间[yyyy-MM-dd (HH:mm:ss)]|
|totalAmount|true|String|总分|
|checkScoreOfficeList|true|Arr|公司列表|
|-- officeCode|true|string|公司编码|
|-- officeName|true|string|公司名称|
|checkScorePjList|true|Arr|项目列表|
|-- pjName|true|string|项目名称|
|-- pjScore|true|double|项目比重|
|-- checkScoreDetailList|true|Arr|项目细则列表|
|---- name|true|string|内容名称|
|---- scoreDetail|true|string|内容详情|
|---- deductionStandard|true|string|扣分标准|
###### 请求内容:
```json
{
"checkScoreOfficeList": [
{
"officeCode": "EP04",
"officeName": "运营管理部"
},
{
"officeCode": "XG",
"officeName": "孝感中设水务有限公司"
}
],
"checkScorePjList": [
{
"checkScoreDetailList": [
{
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。"
}
],
"pjName": "安全管理11",
"pjScore": 10.0
},
{
"checkScoreDetailList": [
{
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。"
},
{
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"name": "出水达标情况",
"scoreDetail": "依据:出水在线监测数据及第三方检测取样结果"
}
],
"pjName": "工艺管理11",
"pjScore": 10.0
}
],
"fromTime": "2020-08-10 12:12:00",
"toTime": "2020-08-16 12:12:00",
"totalAmount": 100.00
}
```
###### 返回结果:
```
{
"exception": "",
"path": "/checkScores/createTemplate",
"data": true,
"error": "",
"message": "ok",
"operator": "xukk",
"status": 200,
"timestamp": "2020-08-11 02:16:37"
}
```
----------
## 4. /checkScores/updateTemplate
#### 接口功能
> 修改模板
传过来完整的当前模板的json数据(包含修改内容)
#### 请求方式
> POST / JSON
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|id|true|integer|模板ID|
|fromTime|false|String|开始时间[yyyy-MM-dd (HH:mm:ss)]|
|toTime|false|String|结束时间[yyyy-MM-dd (HH:mm:ss)]|
|totalAmount|false|String|总分|
|checkScoreOfficeList|false|Arr|公司列表|
|-- officeCode|false|string|公司编码|
|-- officeName|false|string|公司名称|
|checkScorePjList|false|Arr|项目列表|
|-- pjName|false|string|项目名称|
|-- pjScore|false|double|项目比重|
|-- checkScoreDetailList|false|Arr|项目细则列表|
|---- name|false|string|内容名称|
|---- scoreDetail|false|string|内容详情|
|---- deductionStandard|false|string|扣分标准|
###### 请求内容:
```
{
"id": 15,
"fromTime": "2020-08-10 12:12:00",
"toTime": "2020-08-16 12:12:00",
"totalAmount": 100,
"checkScorePjList": [
{
"id": 16,
"pjName": "安全管理11",
"pjScore": 10,
"checkScoreDetailList": [
{
"id": 23,
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null
}
]
},
{
"id": 17,
"pjName": "工艺管理11",
"pjScore": 10,
"checkScoreDetailList": [
{
"id": 24,
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null
},
{
"id": 25,
"name": "出水达标情况",
"scoreDetail": "依据:出水在线监测数据及第三方检测取样结果",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": null
}
]
}
],
"checkScoreOfficeList": [
{
"id": 9,
"officeCode": "EP04",
"officeName": "运营管理部"
},
{
"id": 10,
"officeCode": "XG",
"officeName": "孝感中设水务有限公司"
}
]
}
```
###### 返回结果:
```
{
"exception": "",
"path": "/checkScores/updateTemplate",
"data": true,
"error": "",
"message": "ok",
"operator": "xukk",
"status": 200,
"timestamp": "2020-08-11 02:47:10"
}
```
----------
## 5. /checkScores/buildTabulation
#### 接口功能
> 根据模板生成所包含公司的报告列表
#### 请求方式
> POST / JSON
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|id|true|integer|模板ID|
###### 请求内容:
```
{
"id":16
}
```
###### 返回结果:
```
{
"exception": "",
"path": "/checkScores/buildTabulation",
"data": true,
"error": "",
"message": "ok",
"operator": "xukk",
"status": 200,
"timestamp": "2020-08-11 02:47:49"
}
```
----------
## 6. /checkScores/getTabulation
#### 接口功能
> 获取公司列表报告
#### 请求方式
> GET
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|officeCode|false|string|公司编号|
|year|false|integer|年份|
|templateId|false|integer|模板ID|
|status|false|integer|状态 0 正常 1 已评分 2 已添加报告 3 完结|
###### 请求内容:
```
curl -X GET 'http://localhost:8080/checkScores/getTabulation?officeCode=xx&year=2020'
```
###### 返回结果:
```
{
"exception": "",
"path": "/checkScores/getTabulation",
"data": [
{
"id": 8,
"officeCode": "XG",
"officeName": "孝感中设水务有限公司",
"fromTime": "2020-08-10 12:12:00",
"toTime": "2020-08-16 12:12:00",
"totalAmount": 0,
"createBy": null,
"createTime": "2020-08-11 02:47:49",
"updateBy": null,
"updateTime": "2020-08-11 02:47:49",
"templateParentScoreId": 15,
"templateScoreId": 16,
"templateVersion": 3,
"status": 0,
"officeCheckDetailList": null
}
],
"error": "",
"message": "ok",
"operator": "xukk",
"status": 200,
"timestamp": "2020-08-11 08:44:00"
}
```
----------
## 7. /checkScores/getTabulationDetail
#### 接口功能
> 获取公司列表报告详情
#### 请求方式
> GET
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|officeCheckId|true|integer|列表的ID|
###### 请求内容:
```
curl -X GET 'http://localhost:8080/checkScores/getTabulationDetail?officeCheckId=8'
```
###### 返回结果:
```
deductionScore: 分数
{
"exception": "",
"path": "/checkScores/getTabulationDetail",
"data": {
"id": 16,
"parentId": 15,
"fromTime": "2020-08-10 12:12:00",
"toTime": "2020-08-16 12:12:00",
"totalAmount": 100,
"createBy": null,
"createTime": "2020-08-11 02:47:10",
"updateBy": null,
"updateTime": "2020-08-11 02:47:10",
"status": 0,
"version": 3,
"checkScorePjList": [
{
"id": 18,
"pjName": "安全管理11",
"pjScore": 10,
"checkScoreDetailList": [
{
"id": 26,
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": 0,
"officeCheckDetailId": 22
}
]
},
{
"id": 19,
"pjName": "工艺管理11",
"pjScore": 10,
"checkScoreDetailList": [
{
"id": 27,
"name": "检查整改情况",
"scoreDetail": "安全质量部及运营部检查整改情况。",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": 0,
"officeCheckDetailId": 23
},
{
"id": 28,
"name": "出水达标情况",
"scoreDetail": "依据:出水在线监测数据及第三方检测取样结果",
"deductionStandard": "发现一处未整改,扣十分,扣完为止。",
"deductionScore": 0,
"officeCheckDetailId": 24
}
]
}
],
"checkScoreOfficeList": null
},
"error": "",
"message": "ok",
"operator": "xukk",
"status": 200,
"timestamp": "2020-08-11 08:57:15"
}
```
----------
## 8. /checkScores/markScore
#### 接口功能
> 评分
#### 请求方式
> POST / JSON
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|arr|true|Object|修改的数组|
|-- id|true|Integer|对应 officeCheckDetailId |
|-- deductionScore|true|double|分数|
###### 请求内容:
```
{
"arr":[
{
"id":22,
"deductionScore":2
},
{
"id":23,
"deductionScore":3
}
]
}
```
----------
## 9. /checkScores/addReport
#### 接口功能
> 添加报告
#### 请求方式
> POST / JSON
###### 请求参数
|参数|必选|类型|说明|
|:----- |:-------|:-----|:-----|
|params|true|object|对象 |
|-- officeCheckId|true|integer|对应getTabulation接口里的id字段|
|-- content|true|string|报告内容 自定义 |
###### 请求内容:
```
{
"params":{
"content":"xxx",
"officeCheckId":8
}
}
```