From 4f9f21d3c72d724f3cf41939e4d48a46de0848d8 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 09 四月 2024 15:09:08 +0800 Subject: [PATCH] 纤度登记表增加登记表id,修改登记时先删除检验记录再生成新的检验记录 --- docs/docs.go | 1068 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 1,060 insertions(+), 8 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index c309a2a..303074d 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -16,6 +16,153 @@ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/api-jl/v1/fineness/check": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "绾ゅ害妫�楠�" + ], + "summary": "绾ゅ害妫�楠屽垪琛�", + "parameters": [ + { + "type": "string", + "name": "keyword", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/models.FinenessCheck" + } + } + } + } + ] + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "绾ゅ害妫�楠�" + ], + "summary": "绾ゅ害妫�楠屼慨鏀�", + "parameters": [ + { + "description": "瀛楀吀淇℃伅", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.FinenessCheck" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, + "/api-jl/v1/fineness/check/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "绾ゅ害妫�楠�" + ], + "summary": "绾ゅ害妫�楠岃鎯�", + "parameters": [ + { + "type": "string", + "description": "瀛楀吀淇℃伅", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/response.FinenessCheckInfo" + } + } + } + ] + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "绾ゅ害妫�楠�" + ], + "summary": "绾ゅ害妫�楠屽垹闄�", + "parameters": [ + { + "type": "string", + "description": "瀛楀吀淇℃伅", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, "/api-jl/v1/fineness/register": { "get": { "produces": [ @@ -26,6 +173,11 @@ ], "summary": "绾ゅ害鐧昏鍒楄〃", "parameters": [ + { + "type": "string", + "name": "keyword", + "in": "query" + }, { "type": "integer", "description": "椤电爜", @@ -62,9 +214,82 @@ } } } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "绾ゅ害鐧昏" + ], + "summary": "绾ゅ害鐧昏娣诲姞", + "parameters": [ + { + "description": "瀛楀吀淇℃伅", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AddFinenessRegister" + } + }, + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } } }, "/api-jl/v1/fineness/register/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "绾ゅ害鐧昏" + ], + "summary": "绾ゅ害鐧昏璇︽儏", + "parameters": [ + { + "type": "string", + "description": "瀛楀吀淇℃伅", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/models.FinenessRegister" + } + } + } + ] + } + } + } + }, "delete": { "produces": [ "application/json" @@ -77,6 +302,62 @@ { "type": "string", "description": "瀛楀吀淇℃伅", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, + "/api-jl/v1/system/deletePriceStandard/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/鐢熶笣瀹氫环鏍囧噯" + ], + "summary": "鍒犻櫎鐢熶笣瀹氫环鏍囧噯", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, + "/api-jl/v1/system/deleteWorkshopManage/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/杞﹂棿绠$悊" + ], + "summary": "鍒犻櫎杞﹂棿绠$悊", + "parameters": [ + { + "type": "string", + "description": "id", "name": "id", "in": "path", "required": true @@ -247,9 +528,295 @@ } } } + }, + "/api-jl/v1/system/getPriceStandardList": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/鐢熶笣瀹氫环鏍囧噯" + ], + "summary": "鑾峰彇鐢熶笣瀹氫环鏍囧噯", + "parameters": [ + { + "type": "string", + "name": "keyWord", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/models.RawSilkPriceStandard" + } + } + } + } + ] + } + } + } + } + }, + "/api-jl/v1/system/getRankStandard": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/鐢熶笣瀹氱骇鏍囧噯" + ], + "summary": "鑾峰彇鐢熶笣瀹氱骇鏍囧噯", + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/response.RankStandard" + } + } + } + } + ] + } + } + } + } + }, + "/api-jl/v1/system/getWorkshopManageList": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/杞﹂棿绠$悊" + ], + "summary": "鑾峰彇杞﹂棿绠$悊鍒楄〃", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "string", + "name": "keyWord", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/models.WorkshopManage" + } + } + } + } + ] + } + } + } + } + }, + "/api-jl/v1/system/savePriceStandard": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/鐢熶笣瀹氫环鏍囧噯" + ], + "summary": "淇濆瓨鐢熶笣瀹氫环鏍囧噯", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.RawSilkPriceStandard" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, + "/api-jl/v1/system/saveRankStandard": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/鐢熶笣瀹氱骇鏍囧噯" + ], + "summary": "淇濆瓨鐢熶笣瀹氱骇鏍囧噯", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SaveRankStandard" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, + "/api-jl/v1/system/saveWorkshopManage": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/杞﹂棿绠$悊" + ], + "summary": "淇濆瓨杞﹂棿绠$悊", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.WorkshopManage" + } + }, + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } } }, "definitions": { + "constvar.CarFlag": { + "type": "integer", + "enum": [ + 1, + 2, + 3 + ], + "x-enum-comments": { + "AllCar": "鍏ㄨ溅缁撴潫", + "LeftHalfCar": "宸﹀崐杞�", + "RightHalfCar": "鍙冲崐杞�" + }, + "x-enum-varnames": [ + "LeftHalfCar", + "RightHalfCar", + "AllCar" + ] + }, + "constvar.CheckItem": { + "type": "integer", + "enum": [ + 1, + 2, + 3, + 4, + 5 + ], + "x-enum-comments": { + "CheckItemCleanliness": "娓呮磥鍒�", + "CheckItemDeviation": "绾ゅ害鍋忓樊", + "CheckItemMaxDeviation": "鏈�澶у亸宸�", + "CheckItemPurity": "娲佸噣鍒�", + "CheckItemTwiceChange": "浜屾鍙樺寲" + }, + "x-enum-varnames": [ + "CheckItemDeviation", + "CheckItemTwiceChange", + "CheckItemCleanliness", + "CheckItemPurity", + "CheckItemMaxDeviation" + ] + }, "constvar.DictType": { "type": "integer", "enum": [ @@ -320,7 +887,136 @@ } } }, - "models.FinenessRegister": { + "models.FinenessCheck": { + "type": "object", + "properties": { + "averageFineness": { + "description": "骞冲潎绾ゅ害", + "type": "number" + }, + "cleanliness": { + "description": "娓呮磥搴�", + "type": "number" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "deviation": { + "description": "鍋忓樊", + "type": "number" + }, + "finenessGrade": { + "description": "绾ゅ害绛夌骇", + "type": "string" + }, + "finenessRegister": { + "description": "绾ゅ害鐧昏", + "allOf": [ + { + "$ref": "#/definitions/models.FinenessRegister" + } + ] + }, + "finenessRegisterID": { + "description": "绾ゅ害鐧昏琛↖D", + "type": "integer" + }, + "id": { + "type": "integer" + }, + "inspector": { + "description": "妫�楠屽憳", + "type": "string" + }, + "marketProcessOrderNumber": { + "description": "搴勫彛宸ヨ壓鍗曠紪鍙�", + "type": "string" + }, + "measureFineness": { + "description": "鍏噺绾ゅ害", + "type": "number" + }, + "purity": { + "description": "娲佸噣搴�", + "type": "number" + }, + "totalDeviation": { + "description": "鎬诲樊", + "type": "number" + }, + "twiceChange": { + "description": "浜屽害鍙樺寲", + "type": "number" + }, + "updatedAt": { + "type": "string" + } + } + }, + "models.FinenessCheckItem": { + "type": "object", + "properties": { + "cleanliness": { + "description": "娓呮磥搴�", + "type": "number" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "deviation": { + "description": "鍋忓樊", + "type": "number" + }, + "finenessGrade": { + "description": "绾ゅ害绛夌骇", + "type": "string" + }, + "finenessRegisterID": { + "description": "绾ゅ害鐧昏琛↖D", + "type": "integer" + }, + "finenessRoundingItems": { + "description": "绾ゅ害鍒楄〃", + "type": "array", + "items": { + "$ref": "#/definitions/models.FinenessRoundingItem" + } + }, + "id": { + "type": "integer" + }, + "position": { + "description": "FinenessCheckID uint ` + "`" + `gorm:\"not null;comment:绾ゅ害妫�楠岃〃ID\" json:\"finenessCheckID\"` + "`" + ` //绾ゅ害妫�楠岃〃ID", + "type": "integer" + }, + "purity": { + "description": "娲佸噣搴�", + "type": "number" + }, + "remark": { + "description": "澶囨敞", + "type": "string" + }, + "totalDeviation": { + "description": "鎬诲樊", + "type": "number" + }, + "twiceChange": { + "description": "浜屽害鍙樺寲", + "type": "number" + }, + "updatedAt": { + "type": "string" + } + } + }, + "models.FinenessItem": { "type": "object", "properties": { "createdAt": { @@ -329,9 +1025,51 @@ "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, - "endCircle": { - "description": "缁撴潫鍥炴暟", + "fineness": { + "description": "绾ゅ害", + "type": "number" + }, + "finenessRegisterID": { "type": "integer" + }, + "id": { + "type": "integer" + }, + "position": { + "description": "杞﹀彿", + "type": "integer" + }, + "quantity": { + "description": "鏁伴噺", + "type": "number" + }, + "sum": { + "description": "绾ゅ害鍚堣", + "type": "number" + }, + "updatedAt": { + "type": "string" + } + } + }, + "models.FinenessRegister": { + "type": "object", + "properties": { + "circle": { + "description": "鍥炴暟", + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "finenessList": { + "type": "array", + "items": { + "$ref": "#/definitions/models.FinenessItem" + } }, "finishDate": { "description": "钀戒笣鏃堕棿", @@ -352,12 +1090,22 @@ "description": "缂栧彿", "type": "string" }, + "position": { + "description": "鏈�鍚庝竴涓溅鍙�", + "type": "integer" + }, "spec": { "description": "瑙勬牸", "type": "string" }, - "startCircle": { - "description": "寮�濮嬪洖鏁�", + "sumFineness": { + "type": "number" + }, + "sumQuantity": { + "type": "number" + }, + "totalCircle": { + "description": "鎬诲洖鏁�", "type": "integer" }, "updatedAt": { @@ -365,6 +1113,86 @@ }, "workshopGroup": { "description": "杞︾粍", + "type": "integer" + } + } + }, + "models.FinenessRoundingItem": { + "type": "object", + "properties": { + "fineness": { + "description": "绾ゅ害", + "type": "number" + }, + "quantity": { + "description": "鏁伴噺", + "type": "integer" + } + } + }, + "models.RawSilkPriceStandard": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "id": { + "type": "integer" + }, + "marketNumber": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "payStandard": { + "type": "number" + }, + "rawSilkGradeNumber": { + "type": "string" + }, + "unit": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "models.WorkshopManage": { + "type": "object", + "properties": { + "carFlag": { + "$ref": "#/definitions/constvar.CarFlag" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "endCarNumber": { + "type": "integer" + }, + "groupNumber": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "startCarNumber": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "workshopNumber": { "type": "string" } } @@ -391,6 +1219,158 @@ "remark": { "description": "澶囨敞", "type": "string" + } + } + }, + "request.AddFinenessRegister": { + "type": "object", + "properties": { + "circle": { + "description": "鍥炴暟", + "type": "integer" + }, + "finenessList": { + "description": "绾ゅ害鏁扮粍", + "type": "array", + "items": { + "$ref": "#/definitions/request.FinenessItem" + } + }, + "finishDate": { + "description": "钀戒笣鏃堕棿", + "type": "string" + }, + "id": { + "description": "id 娣诲姞鏃朵紶0", + "type": "integer" + }, + "market": { + "description": "搴勫彛", + "type": "string" + }, + "name": { + "description": "杞﹂棿", + "type": "string" + }, + "number": { + "description": "缂栧彿", + "type": "string" + }, + "position": { + "description": "鏈�鍚庝竴涓溅鍙�", + "type": "integer" + }, + "spec": { + "description": "瑙勬牸", + "type": "string" + }, + "sumFineness": { + "description": "鍚堣绾ゅ害", + "type": "number" + }, + "sumQuantity": { + "description": "鍚堣鏁伴噺", + "type": "number" + }, + "totalCircle": { + "description": "鎬诲洖鏁�", + "type": "integer" + }, + "workshopGroup": { + "description": "杞︾粍", + "type": "integer" + } + } + }, + "request.DynamicsRank": { + "type": "object", + "properties": { + "rankName": { + "description": "绛夌骇鍚嶇О", + "type": "string" + }, + "rankProp": { + "description": "鍓嶇紑key", + "type": "string" + }, + "rankValue": { + "description": "绛夌骇鍊�", + "type": "number" + } + } + }, + "request.FinenessItem": { + "type": "object", + "properties": { + "fineness": { + "description": "绾ゅ害", + "type": "number" + }, + "position": { + "description": "杞﹀彿", + "type": "integer" + }, + "quantity": { + "description": "鏁伴噺", + "type": "number" + }, + "sum": { + "description": "鍚堣", + "type": "number" + } + } + }, + "request.RankStandard": { + "type": "object", + "properties": { + "checkItem": { + "description": "妫�鏌ラ」鐩悕绉�", + "allOf": [ + { + "$ref": "#/definitions/constvar.CheckItem" + } + ] + }, + "dynamicsRanks": { + "type": "array", + "items": { + "$ref": "#/definitions/request.DynamicsRank" + } + }, + "endFineness": { + "description": "缁撴潫绾ゅ害", + "type": "number" + }, + "lineId": { + "description": "琛宨d", + "type": "string" + }, + "rankA": { + "description": "閲庣氦", + "type": "number" + }, + "rankB": { + "description": "澶ч噹", + "type": "number" + }, + "rankC": { + "description": "鐗归噹", + "type": "number" + }, + "startFineness": { + "description": "寮�濮嬬氦搴�", + "type": "number" + } + } + }, + "request.SaveRankStandard": { + "type": "object", + "properties": { + "rankStandard": { + "type": "array", + "items": { + "$ref": "#/definitions/request.RankStandard" + } } } }, @@ -422,6 +1402,80 @@ } } }, + "response.DynamicsRank": { + "type": "object", + "properties": { + "rankName": { + "description": "绛夌骇鍚嶇О", + "type": "string" + }, + "rankProp": { + "description": "鍓嶇紑key", + "type": "string" + }, + "rankValue": { + "description": "绛夌骇鍊�", + "type": "number" + } + } + }, + "response.FinenessCheckInfo": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/models.FinenessCheck" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/models.FinenessCheckItem" + } + } + } + }, + "response.RankStandard": { + "type": "object", + "properties": { + "checkItem": { + "description": "妫�鏌ラ」鐩悕绉�", + "allOf": [ + { + "$ref": "#/definitions/constvar.CheckItem" + } + ] + }, + "dynamicsRanks": { + "type": "array", + "items": { + "$ref": "#/definitions/response.DynamicsRank" + } + }, + "endFineness": { + "description": "缁撴潫绾ゅ害", + "type": "number" + }, + "lineId": { + "description": "琛宨d", + "type": "string" + }, + "rankA": { + "description": "閲庣氦", + "type": "number" + }, + "rankB": { + "description": "澶ч噹", + "type": "number" + }, + "rankC": { + "description": "鐗归噹", + "type": "number" + }, + "startFineness": { + "description": "寮�濮嬬氦搴�", + "type": "number" + } + } + }, "util.Response": { "type": "object", "properties": { @@ -450,9 +1504,7 @@ "pageSize": { "type": "integer" }, - "total": { - "type": "integer" - } + "total": {} } } } -- Gitblit v1.8.0