413 lines
14 KiB
YAML
413 lines
14 KiB
YAML
openapi: 3.0.3
|
||
info:
|
||
title: 机构端-安评报告库 API
|
||
description: |
|
||
对齐原型页 `institution-report-library`(机构端「报告库」)的展示与功能。
|
||
|
||
## 原型能力对照
|
||
| 原型 | 接口 |
|
||
|------|------|
|
||
| 顶栏汇总(总数/近三年/已报送/待完善/抽查中) | `GET /summary` |
|
||
| 列表筛选(名称编号/年度/评价类型/行业/报送状态) | `GET /page` |
|
||
| 查看详情 | `GET /get` |
|
||
| 下载 | 详情 `fileUrl` 由前端下载(无单独下载流接口) |
|
||
| 上传历史报告 | `POST /add`(文件先走统一上传拿 URL) |
|
||
| 报送监管 | `POST /submit` |
|
||
| 抽查记录/整改 | `/eval-report-spotcheck/**` |
|
||
|
||
**Apifox 导入**:项目设置 → 导入数据 → OpenAPI → 选择本文件。
|
||
|
||
统一前缀:`/safetyEval/institution`
|
||
成功:`success=true` 且 `code="0"`
|
||
version: 1.1.0
|
||
contact:
|
||
name: safety-eval-service
|
||
|
||
servers:
|
||
- url: http://localhost:8095
|
||
description: 本地开发
|
||
- url: http://192.168.20.100:30140
|
||
description: 测试网关(100)
|
||
|
||
tags:
|
||
- name: 机构端-安评报告库
|
||
description: 报告库列表/详情/上传/报送/汇总
|
||
- name: 机构端-报告抽查整改
|
||
description: 抽查记录查询与整改反馈
|
||
|
||
paths:
|
||
/safetyEval/institution/eval-report/summary:
|
||
get:
|
||
tags: [机构端-安评报告库]
|
||
summary: 报告库页顶栏汇总
|
||
operationId: institutionEvalReportSummary
|
||
responses:
|
||
'200':
|
||
description: 成功
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SingleResponseInstitutionEvalReportSummaryCO'
|
||
example:
|
||
success: true
|
||
code: "0"
|
||
data:
|
||
totalCount: 126
|
||
recentThreeYearCount: 98
|
||
submittedCount: 86
|
||
incompleteCount: 5
|
||
spotcheckingCount: 3
|
||
|
||
/safetyEval/institution/eval-report/page:
|
||
get:
|
||
tags: [机构端-安评报告库]
|
||
summary: 分页查询本机构报告
|
||
operationId: institutionEvalReportPage
|
||
parameters:
|
||
- $ref: '#/components/parameters/current'
|
||
- $ref: '#/components/parameters/size'
|
||
- name: keyword
|
||
in: query
|
||
description: 报告名称 / 编号
|
||
schema: { type: string }
|
||
- name: reportYear
|
||
in: query
|
||
schema: { type: integer, example: 2026 }
|
||
- name: evalTypeCode
|
||
in: query
|
||
description: PRE / ACCEPT / STATUS
|
||
schema: { type: string, example: PRE }
|
||
- name: industryCode
|
||
in: query
|
||
description: 所属行业编码,如 HAZCHEM
|
||
schema: { type: string }
|
||
- name: reportStatusCode
|
||
in: query
|
||
description: 1已入库 2抽查中 3待整改 4已复核
|
||
schema: { type: integer }
|
||
- name: displayStatus
|
||
in: query
|
||
description: |
|
||
原型「报送状态」筛选:
|
||
`UN_SUBMITTED` 未报送 /
|
||
`SUBMITTED` 已报送 /
|
||
`SPOTCHECKING` 抽查中 /
|
||
`RECTIFYING` 整改中 /
|
||
`REVIEWED` 已复核
|
||
schema:
|
||
type: string
|
||
enum: [UN_SUBMITTED, SUBMITTED, SPOTCHECKING, RECTIFYING, REVIEWED]
|
||
responses:
|
||
'200':
|
||
description: 成功
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/PageResponseEvalReportLibraryCO'
|
||
|
||
/safetyEval/institution/eval-report/get:
|
||
get:
|
||
tags: [机构端-安评报告库]
|
||
summary: 报告详情
|
||
description: 含 `fileUrl`/`fileName`,前端下载直接使用文件地址。
|
||
operationId: institutionEvalReportGet
|
||
parameters:
|
||
- name: id
|
||
in: query
|
||
required: true
|
||
schema: { type: string }
|
||
responses:
|
||
'200':
|
||
description: 成功
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SingleResponseEvalReportLibraryCO'
|
||
|
||
/safetyEval/institution/eval-report/add:
|
||
post:
|
||
tags: [机构端-安评报告库]
|
||
summary: 上传历史报告
|
||
description: |
|
||
对齐原型弹窗「上传历史报告」。
|
||
文件请先调用统一文件上传接口拿到 `fileUrl` 再提交本接口。
|
||
`submitToRegulator=true` 时 `submitFlag=1`(已报送);否则 `submitFlag=2`(未报送)。
|
||
同机构下 `reportNo` 不可重复。
|
||
operationId: institutionEvalReportAdd
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/InstitutionEvalReportAddCmd'
|
||
example:
|
||
reportNo: CQAP-XZ-2026-001
|
||
reportName: 华安化工园区建设项目安全预评价报告
|
||
reportYear: 2026
|
||
evalTypeCode: PRE
|
||
evalTypeName: 安全预评价
|
||
industryCode: HAZCHEM
|
||
industryName: 危险化学品
|
||
evaluatedUnitName: 重庆华安化工有限公司
|
||
issueDate: '2026-07-16'
|
||
pageCount: 186
|
||
fileUrl: https://oss.example.com/reports/xxx.pdf
|
||
fileName: 华安化工预评价.pdf
|
||
secretLevelCode: NORMAL
|
||
secretLevelName: 普通
|
||
remarks: 正式签章版
|
||
submitToRegulator: false
|
||
responses:
|
||
'200':
|
||
description: 成功
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SingleResponseEvalReportLibraryCO'
|
||
|
||
/safetyEval/institution/eval-report/submit:
|
||
post:
|
||
tags: [机构端-安评报告库]
|
||
summary: 报送监管
|
||
description: 将 `submitFlag=2`(未报送)的报告改为已报送;已报送则报错 06-07-009。
|
||
operationId: institutionEvalReportSubmit
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/InstitutionEvalReportSubmitCmd'
|
||
example:
|
||
id: 10001
|
||
responses:
|
||
'200':
|
||
description: 成功
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SingleResponseEvalReportLibraryCO'
|
||
|
||
/safetyEval/institution/eval-report-spotcheck/list:
|
||
get:
|
||
tags: [机构端-报告抽查整改]
|
||
summary: 按报告查询抽查记录
|
||
operationId: institutionSpotcheckList
|
||
parameters:
|
||
- name: reportId
|
||
in: query
|
||
required: true
|
||
schema: { type: integer, format: int64 }
|
||
responses:
|
||
'200':
|
||
description: 成功
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SingleResponseEvalReportSpotcheckCOList'
|
||
|
||
/safetyEval/institution/eval-report-spotcheck/get:
|
||
get:
|
||
tags: [机构端-报告抽查整改]
|
||
summary: 抽查详情
|
||
operationId: institutionSpotcheckGet
|
||
parameters:
|
||
- name: id
|
||
in: query
|
||
required: true
|
||
schema: { type: string }
|
||
responses:
|
||
'200':
|
||
description: 成功
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SingleResponseEvalReportSpotcheckCO'
|
||
|
||
/safetyEval/institution/eval-report-spotcheck/rectify:
|
||
post:
|
||
tags: [机构端-报告抽查整改]
|
||
summary: 提交整改反馈
|
||
description: 报告须处于抽查中且抽查结果为不合格。
|
||
operationId: institutionSpotcheckRectify
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/InstitutionSpotcheckRectifyCmd'
|
||
example:
|
||
spotcheckId: 20001
|
||
rectifyFeedback: 已按抽查意见完成修订并重新盖章
|
||
responses:
|
||
'200':
|
||
description: 成功
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SingleResponseEvalReportSpotcheckCO'
|
||
|
||
components:
|
||
parameters:
|
||
current:
|
||
name: current
|
||
in: query
|
||
description: 页码(从 1 开始)
|
||
schema: { type: integer, default: 1 }
|
||
size:
|
||
name: size
|
||
in: query
|
||
description: 每页条数
|
||
schema: { type: integer, default: 10 }
|
||
|
||
schemas:
|
||
SingleResponseBase:
|
||
type: object
|
||
properties:
|
||
success: { type: boolean, example: true }
|
||
code: { type: string, example: "0" }
|
||
message: { type: string }
|
||
errCode: { type: string }
|
||
errMessage: { type: string }
|
||
|
||
EvalReportLibraryCO:
|
||
type: object
|
||
properties:
|
||
id: { type: string }
|
||
orgId: { type: string }
|
||
projectId: { type: string }
|
||
customerId: { type: string }
|
||
evaluatedUnitName: { type: string, description: 被评价单位 }
|
||
reportNo: { type: string }
|
||
reportName: { type: string }
|
||
reportYear: { type: integer }
|
||
evalTypeCode: { type: string, example: PRE }
|
||
evalTypeName: { type: string, example: 安全预评价 }
|
||
industryCode: { type: string, example: HAZCHEM }
|
||
industryName: { type: string, example: 危险化学品 }
|
||
businessScope: { type: string }
|
||
fileUrl: { type: string }
|
||
fileName: { type: string }
|
||
publicFlag: { type: integer, description: "1是2否" }
|
||
completeFlag: { type: integer, description: "1完整2待完善" }
|
||
submitFlag: { type: integer, description: "1已报送2未报送" }
|
||
reportStatusCode: { type: integer, description: "1已入库2抽查中3待整改4已复核" }
|
||
reportStatusName: { type: string }
|
||
displayStatusName:
|
||
type: string
|
||
description: 列表展示报送状态(未报送/已报送/抽查中/整改中/已复核)
|
||
example: 已报送
|
||
archiveTime: { type: string, format: date-time }
|
||
issueDate: { type: string, format: date, description: 签发日期 }
|
||
pageCount: { type: integer }
|
||
secretLevelCode: { type: string, example: NORMAL }
|
||
secretLevelName: { type: string, example: 普通 }
|
||
remarks: { type: string }
|
||
|
||
InstitutionEvalReportSummaryCO:
|
||
type: object
|
||
properties:
|
||
totalCount: { type: integer, format: int64 }
|
||
recentThreeYearCount: { type: integer, format: int64 }
|
||
submittedCount: { type: integer, format: int64 }
|
||
incompleteCount: { type: integer, format: int64 }
|
||
spotcheckingCount: { type: integer, format: int64 }
|
||
|
||
InstitutionEvalReportAddCmd:
|
||
type: object
|
||
required: [reportNo, reportName, evaluatedUnitName, issueDate, fileUrl]
|
||
properties:
|
||
reportNo: { type: string }
|
||
reportName: { type: string }
|
||
reportYear: { type: integer }
|
||
evalTypeCode: { type: string }
|
||
evalTypeName: { type: string }
|
||
industryCode: { type: string }
|
||
industryName: { type: string }
|
||
evaluatedUnitName: { type: string }
|
||
customerId: { type: integer, format: int64 }
|
||
issueDate: { type: string, format: date }
|
||
pageCount: { type: integer }
|
||
fileUrl: { type: string }
|
||
fileName: { type: string }
|
||
secretLevelCode: { type: string }
|
||
secretLevelName: { type: string }
|
||
remarks: { type: string }
|
||
submitToRegulator: { type: boolean, description: true=同步报送监管 }
|
||
|
||
InstitutionEvalReportSubmitCmd:
|
||
type: object
|
||
required: [id]
|
||
properties:
|
||
id: { type: integer, format: int64 }
|
||
|
||
EvalReportSpotcheckCO:
|
||
type: object
|
||
properties:
|
||
id: { type: string }
|
||
orgId: { type: string }
|
||
reportId: { type: string }
|
||
checkResultCode: { type: integer, description: "1合格2不合格" }
|
||
checkResultName: { type: string }
|
||
checkOpinion: { type: string }
|
||
rectifyRequire: { type: string }
|
||
rectifyFeedback: { type: string }
|
||
reviewResultCode: { type: integer, description: "1通过2不通过" }
|
||
reviewResultName: { type: string }
|
||
checkerId: { type: string }
|
||
checkerName: { type: string }
|
||
checkTime: { type: string, format: date-time }
|
||
|
||
InstitutionSpotcheckRectifyCmd:
|
||
type: object
|
||
required: [spotcheckId, rectifyFeedback]
|
||
properties:
|
||
spotcheckId: { type: integer, format: int64 }
|
||
rectifyFeedback: { type: string }
|
||
|
||
SingleResponseEvalReportLibraryCO:
|
||
allOf:
|
||
- $ref: '#/components/schemas/SingleResponseBase'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/EvalReportLibraryCO'
|
||
|
||
SingleResponseInstitutionEvalReportSummaryCO:
|
||
allOf:
|
||
- $ref: '#/components/schemas/SingleResponseBase'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/InstitutionEvalReportSummaryCO'
|
||
|
||
PageResponseEvalReportLibraryCO:
|
||
allOf:
|
||
- $ref: '#/components/schemas/SingleResponseBase'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/EvalReportLibraryCO'
|
||
total:
|
||
type: integer
|
||
format: int64
|
||
|
||
SingleResponseEvalReportSpotcheckCO:
|
||
allOf:
|
||
- $ref: '#/components/schemas/SingleResponseBase'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/EvalReportSpotcheckCO'
|
||
|
||
SingleResponseEvalReportSpotcheckCOList:
|
||
allOf:
|
||
- $ref: '#/components/schemas/SingleResponseBase'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/EvalReportSpotcheckCO'
|