检查报告

[TOC] # [检查报告接口] ## 0. /checkScores #### 接口功能 > 删除 #### 请求方式 > DELETE ###### 请求内容: ``` curl -X GET 'http://localhost:8096/checkScores/19' ``` ## 1. /checkScores #### 接口功能 > 获取模板列表 获取状态正常的数据 #### 请求方式 > GET ###### 请求参数 |参数|必选|类型|说明| |:----- |:-------|:-----|:-----| |status|true|integer|状态 (0 正常 1 已build)| |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/createTemplate #### 接口功能 > 创建模板 / 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 开始流程 4 走完流程 5 进入高层查询| |flowStatus|false|string|当status 处于3 状态时 有流程状态 created 创建 czauditing 厂长审核 yyauditing 运营审核 czrejected 厂长拒绝 yyrejected 运营拒绝 | ###### 请求内容: ``` curl -X GET 'http://localhost:8080/checkScores/getTabulation?officeCode=xx&year=2020' ``` ###### 返回结果: ``` status: 普通状态 flowStatus: 审核流程状态 { "exception": "", "path": "/checkScores/getTabulation", "data": [ { "id": 7, "officeCode": "EP04", "officeName": "运营管理部", "fromTime": "2020-08-10 20:12:00", "toTime": "2020-08-16 20:12:00", "totalAmount": 0, "createBy": null, "createTime": "2020-08-11 10:47:49", "updateBy": null, "updateTime": "2020-08-11 10:47:49", "templateParentScoreId": 15, "templateScoreId": 16, "templateVersion": 3, "status": 0, "flowStatus": null, "officeCheckDetailList": null }, { "id": 8, "officeCode": "XG", "officeName": "孝感中设水务有限公司", "fromTime": "2020-08-10 20:12:00", "toTime": "2020-08-16 20:12:00", "totalAmount": 0, "createBy": null, "createTime": "2020-08-11 10:47:49", "updateBy": null, "updateTime": "2020-08-11 10:47:49", "templateParentScoreId": 15, "templateScoreId": 16, "templateVersion": 3, "status": 0, "flowStatus": null, "officeCheckDetailList": null }, { "id": 13, "officeCode": "BZ", "officeName": "北京恩菲环保股份有限公司郑州分公司", "fromTime": "2020-08-11 02:47:10", "toTime": "2020-08-14 16:09:53", "totalAmount": 89, "createBy": "eeee_qoqo", "createTime": "2020-08-18 09:37:46", "updateBy": "zhangwen_ekee", "updateTime": "2020-08-19 12:04:42", "templateParentScoreId": 0, "templateScoreId": 24, "templateVersion": 1, "status": 3, "flowStatus": "czauditing", "officeCheckDetailList": null }, { "id": 14, "officeCode": "CN", "officeName": "浙江春南污水处理有限公司", "fromTime": "2020-08-11 02:47:10", "toTime": "2020-08-14 16:09:53", "totalAmount": 94, "createBy": "eeee_qoqo", "createTime": "2020-08-18 09:37:47", "updateBy": "eeee_qoqo", "updateTime": "2020-08-19 09:40:53", "templateParentScoreId": 0, "templateScoreId": 24, "templateVersion": 1, "status": 2, "flowStatus": null, "officeCheckDetailList": null } ], "error": "", "message": "ok", "operator": "张文", "status": 200, "timestamp": "2020-08-19 12:04:57" } ``` ---------- ## 7. /checkScores/getTabulationDetail #### 接口功能 > 获取公司列表报告详情 #### 请求方式 > GET ###### 请求参数 |参数|必选|类型|说明| |:----- |:-------|:-----|:-----| |officeCheckId|true|integer|列表的ID| ###### 请求内容: ``` curl -X GET 'http://localhost:8080/checkScores/getTabulationDetail?officeCheckId=8' ``` ###### 返回结果: ``` deductionScore: 分数 realTotalAmount: 实际得分 { "exception": "", "path": "/checkScores/getTabulationDetail", "data": { "id": 24, "parentId": 0, "fromTime": "2020-08-11 02:47:10", "toTime": "2020-08-14 16:09:53", "totalAmount": 100, "createBy": "eeee_qoqo", "createTime": "2020-08-18 09:26:33", "updateBy": "eeee_qoqo", "updateTime": "2020-08-18 09:26:33", "status": 0, "version": 1, "officeDto": { "officeCode": "BZ", "officeName": "北京恩菲环保股份有限公司郑州分公司" }, "realTotalAmount": 94, "checkScorePjList": [ { "id": 33, "pjName": "钱钱钱问问", "pjScore": 4, "checkScoreDetailList": [ { "id": 44, "name": "请问", "scoreDetail": "而我却", "deductionStandard": "啊实打", "deductionScore": 2, "officeCheckDetailId": 29, "description": "xx" }, { "id": 45, "name": "大撒大撒", "scoreDetail": "中心城中心", "deductionStandard": "请问请问", "deductionScore": 4, "officeCheckDetailId": 30, "description": "x" } ] }, { "id": 34, "pjName": "世世代代", "pjScore": 6, "checkScoreDetailList": [ { "id": 46, "name": "请按照", "scoreDetail": "水务", "deductionStandard": "现场v", "deductionScore": 0, "officeCheckDetailId": 31, "description": "xx" } ] } ], "checkScoreOfficeList": null }, "error": "", "message": "ok", "operator": "张文", "status": 200, "timestamp": "2020-08-18 10:30:22" } ``` ---------- ## 8. /checkScores/markScore #### 接口功能 > 评分 #### 请求方式 > POST / JSON ###### 请求参数 |参数|必选|类型|说明| |:----- |:-------|:-----|:-----| |arr|true|Object|修改的数组| |-- id|true|Integer|对应 officeCheckDetailId | |-- deductionScore|true|double|分数| |-- description|false|string|备注| ###### 请求内容: ``` { "arr":[ { "id":22, "deductionScore":2, "description":"xxx", }, { "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 } } ``` ---------- ## 10. /checkScores/getReport #### 接口功能 > 获取报告 #### 请求方式 > GET ###### 请求参数 |参数|必选|类型|说明| |:----- |:-------|:-----|:-----| |officeCheckId|true|intenger|对应getTabulation接口里的id字段| ###### 请求内容: ``` curl -X GET 'http://localhost:8080/checkScores/getReport?officeCheckId=13' ``` ###### 返回结果: ``` { "exception": "", "path": "/checkScores/getReport", "data": { "id": 4, "officeCheckId": 13, "content": "xxx" }, "error": "", "message": "ok", "operator": "张文", "status": 200, "timestamp": "2020-08-18 14:12:49" } ``` ---------- ## 11. /checkScores/integrations #### 接口功能 > 检查整改反馈列表 #### 请求方式 > GET ###### 请求参数 |参数|必选|类型|说明| |:----- |:-------|:-----|:-----| |year|false|integer|年份| |status|false|integer|状态 0 未打包 1 已打包| ###### 请求内容: ``` curl -X GET 'http://localhost:8080/checkScores/integrations?year=2020' ``` ###### 返回结果: ``` { "exception": "", "path": "/checkScores/integrations", "data": { "content": [ { "id": 9, "createBy": "zhangwen_ekee", "createTime": "2020-08-14 10:27:23", "fromTime": "2020-08-10 20:12:00", "toTime": "2020-08-16 20:12:00", "updateBy": "zhangwen_ekee", "updateTime": "2020-08-14 10:27:23", "templateScoreId": 16, "templateVersion": 3, "templateParentScoreId": 15, "status": 0 }, { "id": 10, "createBy": "zhangwen_ekee", "createTime": "2020-08-19 17:08:45", "fromTime": "2020-08-11 02:47:10", "toTime": "2020-08-14 16:09:53", "updateBy": "zhangwen_ekee", "updateTime": "2020-08-19 17:08:45", "templateScoreId": 24, "templateVersion": 1, "templateParentScoreId": 0, "status": 0 } ], "pageable": { "sort": { "sorted": false, "unsorted": true, "empty": true }, "offset": "0", "pageSize": 10, "pageNumber": 0, "paged": true, "unpaged": false }, "last": true, "totalElements": "2", "totalPages": 1, "number": 0, "size": 10, "sort": { "sorted": false, "unsorted": true, "empty": true }, "numberOfElements": 2, "first": true, "empty": false }, "error": "", "message": "ok", "operator": "张文", "status": 200, "timestamp": "2020-08-19 17:11:33" } ``` ---------- ## 12. /checkScores/addPk #### 接口功能 > 运营部打包 #### 请求方式 > POST / JSON ###### 请求参数 |参数|必选|类型|说明| |:----- |:-------|:-----|:-----| |id|true|intenger|integrations id| ###### 请求内容: ``` { "params":{ "id":9 } } ``` ---------- ## 13. /checkScores/getRectifyReport #### 接口功能 > 获取整改报告 #### 请求方式 > GET ###### 请求参数 |参数|必选|类型|说明| |:----- |:-------|:-----|:-----| |businessKey|false|intenger|businessKey| |officeCheckId|false|intenger|officeCheckId| ###### 请求内容: ``` curl -X GET \ 'http://localhost:8096/checkScores/getRectifyReport?businessKey=OC202008191657458384178' ``` ##### 返回结果: ``` flowStatus:流程状态 { "exception": "", "path": "/checkScores/getRectifyReport", "data": { "id": 9, "content": "{\"content\":{\"ztsm\":{\"parent\":\"67576yutg312啊实打\"},\"item\":[{\"id\":33,\"pjName\":\"钱钱钱问问\",\"pjScore\":4,\"checkScoreDetailList\":[{\"id\":44,\"name\":\"请问\",\"scoreDetail\":\"而我却\",\"deductionStandard\":\"啊实打\",\"deductionScore\":1,\"officeCheckDetailId\":32,\"description\":\"123\",\"arrChild\":[],\"imgPath\":[\"http://localhost:8096/file/20200819/2b96bf3b-bc97-4d69-acd5-55ec3cd76acb.png\",\"http://localhost:8096/file/20200819/f542f7e0-4109-4168-8ce6-d7ad0fac3877.png\"]},{\"id\":45,\"name\":\"大撒大撒\",\"scoreDetail\":\"中心城中心\",\"deductionStandard\":\"请问请问\",\"deductionScore\":2,\"officeCheckDetailId\":33,\"description\":\"345\",\"arrChild\":[],\"imgPath\":[]}]},{\"id\":34,\"pjName\":\"世世代代\",\"pjScore\":6,\"checkScoreDetailList\":[{\"id\":46,\"name\":\"请按照\",\"scoreDetail\":\"水务\",\"deductionStandard\":\"现场v\",\"deductionScore\":3,\"officeCheckDetailId\":34,\"description\":\"678\",\"arrChild\":[],\"imgPath\":[\"http://localhost:8096/file/20200819/81910f1a-13cc-4a22-8350-82b09eee0b0e.png\"]}]}]}}", "officeCheckFlowId": 6, "status": 0, "flowStatus": "yyauditing", "createTime": "2020-08-19 16:57:49", "reason": null, "reasonTime": null, "reasonUserCode": null, "reasonUserName": null, "pid": 0 }, "error": "", "message": "ok", "operator": "张文", "status": 200, "timestamp": "2020-08-20 09:37:15" } ```