// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag package docs import ( "bytes" "encoding/json" "strings" "github.com/alecthomas/template" "github.com/swaggo/swag" ) var doc = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{.Description}}", "title": "{{.Title}}", "contact": { "name": "CP Support" }, "license": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/api/bidsection/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增标段", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "目录相关-管理员" ], "summary": "新增标段", "parameters": [ { "description": "目录ID", "name": "folderId", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "名称", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/contract": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除合同", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "删除合同", "parameters": [ { "type": "string", "description": "合同ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "项目节ID", "name": "treeId", "in": "path", "required": true }, { "type": "string", "description": "标段ID", "name": "bidsectionId", "in": "path", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.TreeSectionContract" } } } } }, "/api/contract/close": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "关闭合同", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "关闭合同", "parameters": [ { "type": "string", "description": "合同ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "项目节ID", "name": "treeId", "in": "path", "required": true }, { "type": "string", "description": "标段ID", "name": "bidsectionId", "in": "path", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.TreeSectionContract" } } } } }, "/api/contract/folder": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得合同目录和标段", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "获得合同目录和标段", "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.FolderContract" } } } } }, "/api/contract/income": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得合同详情和项目节详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "单个合同详情和项目节详情", "parameters": [ { "type": "string", "description": "项目节ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "标段ID", "name": "bidsectionId", "in": "path", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,isContract:是否有合同(包含孩子们),section:viewmodels.TreeSectionContract,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.TreeSectionContract" } } } } }, "/api/contract/income/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "编辑合同", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "编辑合同", "parameters": [ { "type": "string", "description": "项目节ID", "name": "treeId", "in": "path", "required": true }, { "type": "string", "description": "标段ID", "name": "bidsectionId", "in": "path", "required": true }, { "type": "string", "description": "合同内容", "name": "content", "in": "path", "required": true }, { "type": "string", "description": "合同名称", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "合同金额", "name": "price", "in": "path", "required": true }, { "type": "string", "description": "甲方", "name": "partyA", "in": "path", "required": true }, { "type": "string", "description": "甲方签约人", "name": "partyASigner", "in": "path", "required": true }, { "type": "string", "description": "已方", "name": "partyB", "in": "path", "required": true }, { "type": "string", "description": "已方签约人", "name": "partyBSigner", "in": "path", "required": true }, { "type": "string", "description": "签约时间", "name": "signerTime", "in": "path", "required": true }, { "type": "string", "description": "备注", "name": "remarks", "in": "path", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.TreeSectionContract" } } } } }, "/api/contract/income/section/all": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "未设置合同项目节 返回项目节模板信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "获得标段收入-项目节信息", "parameters": [ { "type": "string", "description": "标段ID", "name": "bidsectionId", "in": "path", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.TreeSectionContract,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.TreeSectionContract" } } } } }, "/api/contract/section": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除 合同项目节", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "删除 合同项目节", "parameters": [ { "description": "项目节ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/contract/section/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增 合同项目节", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "新增 合同项目节", "parameters": [ { "description": "项目节ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "项目节名称", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/contract/section/depth": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "operation{upDepth,downDepth}", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "升级降级合同项目节", "parameters": [ { "description": "项目节ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } }, { "default": "upDepth", "description": "操作名称", "name": "operation", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/contract/section/save": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "修改合同项目节 名称", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "修改合同项目节 名称", "parameters": [ { "description": "项目节ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "项目节名称", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/contract/section/serial": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "operation{upSerial,downSerial}", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "上移下移合同项目节", "parameters": [ { "description": "项目节ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } }, { "default": "upSerial", "description": "操作名称", "name": "operation", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/contract/section/serial/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "更新合同节序号", "parameters": [ { "description": "项目节ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "操作名称", "name": "serial", "in": "body", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/contract/section/template": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "设置合同项目节模板", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "合同管理" ], "summary": "设置合同项目节模板", "parameters": [ { "default": 1, "description": "模板号", "name": "templateNumber", "in": "body", "required": true, "schema": { "type": "integer" } }, { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/login": { "post": { "description": "登录接口", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "登录/登出" ], "summary": "登录", "parameters": [ { "default": "234", "description": "项目编号", "name": "code", "in": "body", "required": true, "schema": { "type": "string" } }, { "default": "caipin", "description": "项目账号", "name": "account", "in": "body", "required": true, "schema": { "type": "string" } }, { "default": "123456", "description": "密码", "name": "password", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,data:viewmodels.ProjectAccount,msg:}", "schema": { "$ref": "#/definitions/viewmodels.ProjectAccount" } }, "400": { "description": "{code:-1参数类错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/login/out": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "登录/登出" ], "summary": "登出", "responses": { "200": { "description": "{code:0,msg:string}", "schema": { "type": "string" } }, "400": { "description": "{code:-1,msg:string}", "schema": { "type": "string" } } } } }, "/api/login/project/name": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "登录/登出" ], "summary": "获得项目名称", "parameters": [ { "type": "string", "default": "{code:2}", "description": "项目编号", "name": "code", "in": "query", "required": true } ], "responses": { "200": { "description": "{code:0成功,data:viewmodels.Project,msg:}", "schema": { "$ref": "#/definitions/viewmodels.Project" } }, "400": { "description": "{code:-1,msg:string}", "schema": { "type": "string" } } } } }, "/api/project": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得登陆项目信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目相关" ], "summary": "获得登陆项目信息", "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.Project" } } } } }, "/api/projectAccount": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得登陆账号相关信息", "tags": [ "项目账号相关" ], "summary": "获得登陆账号信息相关", "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectAccount/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得项目账号列表", "tags": [ "项目账号相关" ], "summary": "获得项目账号列表", "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/account": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "id获得单条信息\u003cbr/\u003e", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "获得项目账号列表", "parameters": [ { "description": "账号ID", "name": "id", "in": "body", "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.ProjectAccount" } } } } }, "/api/projectSetting/account/change": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "设置账号密码", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "设置账号密码", "parameters": [ { "default": "PcqqGsn1O0jBSmLqkuOTwQ", "description": "账号ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "default": "textoopd", "description": "账号", "name": "account", "in": "body", "required": true, "schema": { "type": "string" } }, { "default": "ww123456", "description": "密码", "name": "password", "in": "body", "required": true, "schema": { "type": "string" } }, { "type": "string", "description": "csrf", "name": "X-CSRF-Token", "in": "header", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/account/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增账号", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "创建账号", "parameters": [ { "description": "账号", "name": "account", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "密码", "name": "password", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "姓名", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "公司", "name": "company", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "职位", "name": "position", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "手机", "name": "mobile", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "座机", "name": "telephone", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "账号组", "name": "accountGroup", "in": "body", "required": true, "schema": { "type": "integer" } }, { "type": "string", "description": "csrf", "name": "X-CSRF-Token", "in": "header", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/account/delete": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除账号", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "删除账号", "parameters": [ { "default": "PcqqGsn1O0jBSmLqkuOTwQ", "description": "账号ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "type": "string", "description": "csrf", "name": "X-CSRF-Token", "in": "header", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/account/enable": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "账号启用/禁用", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "账号启用/禁用", "parameters": [ { "default": "PcqqGsn1O0jBSmLqkuOTwQ", "description": "账号ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "启用/禁用", "name": "enable", "in": "body", "required": true, "schema": { "type": "integer" } }, { "type": "string", "description": "csrf", "name": "X-CSRF-Token", "in": "header", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/account/save": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "编辑账号", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "编辑账号", "parameters": [ { "default": "PcqqGsn1O0jBSmLqkuOTwQ", "description": "账号ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "姓名", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "公司", "name": "company", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "职位", "name": "position", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "座机", "name": "telephone", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "账号组", "name": "accountGroup", "in": "body", "required": true, "schema": { "type": "integer" } }, { "type": "string", "description": "csrf", "name": "X-CSRF-Token", "in": "header", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/account/search": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "检索字段:账号 姓名 单位 手机 前匹配", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "检索账号信息", "parameters": [ { "description": "检索内容", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.ProjectAccount" } } } } }, "/api/projectSetting/bid/account": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得标段账号", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-标段成员权限-管理员" ], "summary": "获得标段账号", "parameters": [ { "type": "string", "description": "标段ID", "name": "bidsectionId", "in": "path" } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "$ref": "#/definitions/viewmodels.ProjectAccount" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "移除标段成员-账号", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-标段成员权限-管理员" ], "summary": "移除标段成员-账号", "parameters": [ { "description": "标段ID", "name": "bidsectionId", "in": "body", "schema": { "type": "string" } }, { "description": "账号ID", "name": "accountId", "in": "body", "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/bid/account/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "标段中添加成员-账号", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-标段成员权限-管理员" ], "summary": "标段中添加成员-账号", "parameters": [ { "description": "标段ID", "name": "bidsectionId", "in": "body", "schema": { "type": "string" } }, { "description": "账号ID", "name": "accountId", "in": "body", "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/project": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取项目信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "获取项目信息", "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/projectSetting/project/save": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "保存项目信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "项目设置-管理员" ], "summary": "保存项目信息", "parameters": [ { "default": "红旗大桥", "description": "账号ID", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } }, { "type": "string", "description": "csrf", "name": "X-CSRF-Token", "in": "header", "required": true } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/rule": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得制定pid、bid的编号规则", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "编号规则" ], "summary": "获取编号规则", "parameters": [ { "type": "string", "description": "标段ID", "name": "bidsectionId", "in": "path", "required": true }, { "type": "string", "description": "项目ID", "name": "projectId", "in": "path", "required": true } ], "responses": { "200": { "description": "{code:0成功,data:viewmodels.Safe,msg:请求成功}", "schema": { "$ref": "#/definitions/viewmodels.ViewRule" } }, "400": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "提交规则", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "编号规则" ], "summary": "提交编号规则", "parameters": [ { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "规则类型", "name": "type", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "编号规则", "name": "value", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } }, "400": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/rule/auto": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "提交规则", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "编号规则" ], "summary": "生成编号", "parameters": [ { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "规则类型", "name": "type", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } }, "400": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/safe": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得列表数据", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "安全巡检" ], "summary": "安全巡检列表", "parameters": [ { "type": "string", "description": "标段ID", "name": "bidsectionId", "in": "path", "required": true } ], "responses": { "200": { "description": "{code:0成功,data:viewmodels.Safe,msg:}", "schema": { "$ref": "#/definitions/viewmodels.Safe" } }, "400": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建新的安全巡检记录", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "安全巡检" ], "summary": "创建新的安全巡检记录", "parameters": [ { "description": "标段ID", "name": "bidsectionId", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "编号", "name": "code", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "日期", "name": "createTime", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "检查部位", "name": "inspection", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "部位", "name": "position", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,msg:}", "schema": { "$ref": "#/definitions/viewmodels.Safe" } }, "400": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除安全巡检记录", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "安全巡检" ], "summary": "删除记录", "parameters": [ { "description": "安全巡检ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,msg:}", "schema": { "$ref": "#/definitions/viewmodels.Safe" } }, "400": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/safe/detail": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得安全巡检详情页面数据", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "安全巡检" ], "summary": "获取安全巡检详情", "parameters": [ { "type": "string", "description": "巡检ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "{code:0成功,data:viewmodels.Safe,msg:}", "schema": { "$ref": "#/definitions/viewmodels.Safe" } }, "400": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/tree": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获得目录和数据", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "目录相关-管理员" ], "summary": "获得目录和数据", "responses": { "200": { "description": "{code:0成功,data:viewmodels.Tree,msg:}", "schema": { "$ref": "#/definitions/viewmodels.Tree" } }, "400": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "删除目录下的目录以及其他内容", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "目录相关-管理员" ], "summary": "删除目录", "parameters": [ { "description": "目录ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/tree/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "新增目录", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "目录相关-管理员" ], "summary": "新增目录", "parameters": [ { "description": "目录ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "目录深度 顶级目录(-1)其他级目录(0)", "name": "depth", "in": "body", "required": true, "schema": { "type": "integer" } }, { "description": "目录名称", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/tree/move": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "移动文件夹", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "目录相关-管理员" ], "summary": "移动文件夹", "parameters": [ { "description": "目录ID", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "被放置的目录ID", "name": "moveId", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } }, "/api/tree/rename": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "重命名-文件夹或者标段", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "目录相关-管理员" ], "summary": "重命名", "parameters": [ { "description": "treeId", "name": "id", "in": "body", "required": true, "schema": { "type": "string" } }, { "description": "重命名的名称", "name": "name", "in": "body", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "{code:0成功,-1参数类错误,-2服务端内部错误,msg:错误信息}", "schema": { "type": "string" } } } } } }, "definitions": { "viewmodels.FolderContract": { "type": "object", "properties": { "bidsectionId": { "type": "string" }, "children": { "type": "array", "items": { "$ref": "#/definitions/viewmodels.FolderContract" } }, "childsTotal": { "type": "integer" }, "contracts": { "type": "integer" }, "contractsIncome": { "type": "string" }, "contractsIncomeProgress": { "type": "string" }, "contractsPaid": { "type": "string" }, "contractsPay": { "type": "string" }, "contractsPayProgress": { "type": "string" }, "contractsReturned": { "type": "string" }, "csrf": { "type": "string" }, "hasFolder": { "description": "Leaf bool ` + "`" + `json:\"leaf\" ` + "`" + `", "type": "boolean" }, "id": { "type": "string" }, "isBid": { "type": "boolean" }, "isEnd": { "type": "boolean" }, "isfolder": { "type": "integer" }, "name": { "type": "string" }, "parentId": { "type": "string" }, "projectId": { "type": "string" }, "safeRectification": { "type": "integer" }, "safeRectificationIn": { "type": "integer" }, "safeTotal": { "description": "安全巡检字段-后期做接口后移动-TODO", "type": "integer" } } }, "viewmodels.Project": { "type": "object", "properties": { "code": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" } } }, "viewmodels.ProjectAccount": { "type": "object", "properties": { "account": { "type": "string" }, "accountGroup": { "type": "integer" }, "company": { "type": "string" }, "csrf": { "type": "string" }, "enable": { "type": "integer" }, "id": { "type": "string" }, "isAdmin": { "type": "integer" }, "mobile": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "position": { "type": "string" }, "projectId": { "type": "string" }, "role": { "type": "string" }, "telephone": { "type": "string" } } }, "viewmodels.Safe": { "type": "object", "properties": { "bidsectionId": { "type": "string" }, "code": { "type": "string" }, "createTime": { "type": "string" }, "demand": { "type": "string" }, "endTime": { "type": "string" }, "id": { "type": "string" }, "inspection": { "type": "string" }, "inspectionDetail": { "type": "string" }, "position": { "type": "string" }, "status": { "type": "integer" }, "uid": { "type": "string" } } }, "viewmodels.Tree": { "type": "object", "properties": { "ancounts": { "type": "integer" }, "attribution": { "type": "string" }, "bidsectionId": { "type": "string" }, "children": { "type": "array", "items": { "$ref": "#/definitions/viewmodels.Tree" } }, "childsTotal": { "type": "integer" }, "createTime": { "type": "string" }, "csrf": { "type": "string" }, "depth": { "type": "integer" }, "hasFolder": { "description": "Leaf bool ` + "`" + `json:\"leaf\" ` + "`" + `", "type": "boolean" }, "id": { "type": "string" }, "isBid": { "type": "boolean" }, "isEnd": { "type": "boolean" }, "isfolder": { "type": "integer" }, "name": { "type": "string" }, "parentId": { "type": "string" }, "projectId": { "type": "string" }, "serial": { "type": "string" }, "targetFolderId": { "type": "string" }, "updateTime": { "type": "string" } } }, "viewmodels.TreeSectionContract": { "type": "object", "properties": { "attribution": { "type": "string" }, "bidsectionId": { "type": "string" }, "children": { "type": "array", "items": { "$ref": "#/definitions/viewmodels.TreeSectionContract" } }, "code": { "type": "string" }, "contractCode": { "type": "string" }, "contractId": { "type": "string" }, "contractName": { "type": "string" }, "contractPrice": { "type": "string" }, "contractReturned": { "type": "string" }, "contractStatus": { "type": "integer" }, "contractsPaid": { "type": "string" }, "createTime": { "type": "string" }, "depth": { "type": "integer" }, "elderBrother": { "type": "boolean" }, "id": { "type": "string" }, "isEnd": { "type": "boolean" }, "name": { "type": "string" }, "operation": { "type": "string" }, "parentId": { "type": "string" }, "projectId": { "type": "string" }, "serial": { "type": "integer" }, "templateNumber": { "type": "integer" } } }, "viewmodels.ViewRule": { "type": "object", "properties": { "contractRule": { "type": "string" }, "qualityRule": { "type": "string" }, "safeRule": { "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "X-CSRF-Token", "in": "header" } } }` type swaggerInfo struct { Version string Host string BasePath string Schemes []string Title string Description string } // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = swaggerInfo{ Version: "1.0", Host: "", BasePath: "", Schemes: []string{}, Title: "工程项目管理系统 API", Description: "工程项目管理系统-接口", } type s struct{} func (s *s) ReadDoc() string { sInfo := SwaggerInfo sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1) t, err := template.New("swagger_info").Funcs(template.FuncMap{ "marshal": func(v interface{}) string { a, _ := json.Marshal(v) return string(a) }, }).Parse(doc) if err != nil { return doc } var tpl bytes.Buffer if err := t.Execute(&tpl, sInfo); err != nil { return doc } return tpl.String() } func init() { swag.Register(swag.Name, &s{}) }