From 861a89be3807fb8b9b1e8863adc165cc78bb7700 Mon Sep 17 00:00:00 2001
From: wanjianli <1061428287@qq.com>
Date: 星期一, 18 九月 2023 19:55:55 +0800
Subject: [PATCH] 出入库一部分代码

---
 docs/docs.go |  283 +++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 238 insertions(+), 45 deletions(-)

diff --git a/docs/docs.go b/docs/docs.go
index 5efc844..0f27c63 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -294,7 +294,37 @@
                 }
             }
         },
-        "/api-wms/v1/warehouse/jobType": {
+        "/api-wms/v1/operation/operation": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鍏ュ簱/鍑哄簱"
+                ],
+                "summary": "娣诲姞鍏ュ簱/鍑哄簱",
+                "parameters": [
+                    {
+                        "description": "鍏ュ簱/鍑哄簱淇℃伅",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.AddOperation"
+                        }
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/util.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/api-wms/v1/warehouse/operationType": {
             "get": {
                 "produces": [
                     "application/json"
@@ -336,7 +366,7 @@
                                         "data": {
                                             "type": "array",
                                             "items": {
-                                                "$ref": "#/definitions/models.JobType"
+                                                "$ref": "#/definitions/models.OperationType"
                                             }
                                         }
                                     }
@@ -361,7 +391,7 @@
                         "in": "body",
                         "required": true,
                         "schema": {
-                            "$ref": "#/definitions/request.AddJobType"
+                            "$ref": "#/definitions/request.AddOperationType"
                         }
                     }
                 ],
@@ -375,7 +405,7 @@
                 }
             }
         },
-        "/api-wms/v1/warehouse/jobType/{id}": {
+        "/api-wms/v1/warehouse/operationType/{id}": {
             "put": {
                 "produces": [
                     "application/json"
@@ -391,7 +421,7 @@
                         "in": "body",
                         "required": true,
                         "schema": {
-                            "$ref": "#/definitions/request.UpdateJobType"
+                            "$ref": "#/definitions/request.UpdateOperationType"
                         }
                     },
                     {
@@ -584,7 +614,7 @@
         }
     },
     "definitions": {
-        "constvar.BaseJobType": {
+        "constvar.BaseOperationType": {
             "type": "integer",
             "enum": [
                 1,
@@ -592,14 +622,65 @@
                 3
             ],
             "x-enum-comments": {
-                "BaseJobTypeIncoming": "鏀惰揣",
-                "BaseJobTypeInternal": "鍐呴儴璋冩嫧",
-                "BaseJobTypeOutgoing": "浜よ揣"
+                "BaseOperationTypeIncoming": "鏀惰揣",
+                "BaseOperationTypeInternal": "鍐呴儴璋冩嫧",
+                "BaseOperationTypeOutgoing": "浜よ揣"
             },
             "x-enum-varnames": [
-                "BaseJobTypeIncoming",
-                "BaseJobTypeOutgoing",
-                "BaseJobTypeInternal"
+                "BaseOperationTypeIncoming",
+                "BaseOperationTypeOutgoing",
+                "BaseOperationTypeInternal"
+            ]
+        },
+        "constvar.LocationType": {
+            "type": "integer",
+            "enum": [
+                1,
+                2,
+                3,
+                4,
+                5,
+                6,
+                7
+            ],
+            "x-enum-comments": {
+                "LocationTypeCustomer": "瀹㈡埛浣嶇疆",
+                "LocationTypeInternal": "鍐呴儴浣嶇疆",
+                "LocationTypeInventoryLoss": "搴撳瓨鎹熷け",
+                "LocationTypeProduction": "鐢熶骇",
+                "LocationTypeTransit": "涓浆浣嶇疆",
+                "LocationTypeVendor": "渚涘簲鍟嗕綅缃�",
+                "LocationTypeView": "瑙嗗浘"
+            },
+            "x-enum-varnames": [
+                "LocationTypeVendor",
+                "LocationTypeView",
+                "LocationTypeInternal",
+                "LocationTypeCustomer",
+                "LocationTypeInventoryLoss",
+                "LocationTypeProduction",
+                "LocationTypeTransit"
+            ]
+        },
+        "constvar.OperationStatus": {
+            "type": "integer",
+            "enum": [
+                1,
+                2,
+                3,
+                4
+            ],
+            "x-enum-comments": {
+                "OperationStatus_Draft": "鑽夌",
+                "OperationStatus_Finish": "瀹屾垚",
+                "OperationStatus_Ready": "灏辩华",
+                "OperationStatus_Waiting": "姝e湪绛夊緟"
+            },
+            "x-enum-varnames": [
+                "OperationStatus_Draft",
+                "OperationStatus_Waiting",
+                "OperationStatus_Ready",
+                "OperationStatus_Finish"
             ]
         },
         "constvar.ReservationMethod": {
@@ -694,18 +775,76 @@
                 }
             }
         },
-        "models.JobType": {
+        "models.Location": {
+            "type": "object",
+            "properties": {
+                "company": {
+                    "description": "鍏徃",
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/models.Company"
+                        }
+                    ]
+                },
+                "companyId": {
+                    "description": "鍏徃id",
+                    "type": "integer"
+                },
+                "countFrequency": {
+                    "description": "鐩樼偣棰戠巼锛堝ぉ锛�",
+                    "type": "integer"
+                },
+                "createTime": {
+                    "type": "string"
+                },
+                "id": {
+                    "type": "integer"
+                },
+                "isReturnLocation": {
+                    "description": "鏄惁閫�璐т綅缃�",
+                    "type": "boolean"
+                },
+                "isScrapLocation": {
+                    "description": "鏄惁鎶ュ簾浣嶇疆",
+                    "type": "boolean"
+                },
+                "name": {
+                    "description": "浣嶇疆鍚嶇О",
+                    "type": "string"
+                },
+                "parentId": {
+                    "description": "涓婄骇id",
+                    "type": "integer"
+                },
+                "replenishLocation": {
+                    "description": "鏄惁琛ュ厖浣嶇疆",
+                    "type": "boolean"
+                },
+                "type": {
+                    "description": "浣嶇疆绫诲瀷",
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/constvar.LocationType"
+                        }
+                    ]
+                },
+                "updateTime": {
+                    "type": "string"
+                }
+            }
+        },
+        "models.OperationType": {
             "type": "object",
             "properties": {
                 "ReservationDaysBeforePriority": {
                     "description": "鍦ㄤ紭鍏堢骇鐨勫墠鍑犲ぉ",
                     "type": "integer"
                 },
-                "baseJobType": {
+                "baseOperationType": {
                     "description": "鍩虹浣滀笟绫诲瀷",
                     "allOf": [
                         {
-                            "$ref": "#/definitions/constvar.BaseJobType"
+                            "$ref": "#/definitions/constvar.BaseOperationType"
                         }
                     ]
                 },
@@ -779,11 +918,11 @@
                         }
                     ]
                 },
-                "returnJobType": {
+                "returnOperationType": {
                     "description": "閫�璐х被鍨嬪悕绉�",
                     "type": "string"
                 },
-                "returnJobTypeID": {
+                "returnOperationTypeID": {
                     "description": "閫�璐х被鍨婭D",
                     "type": "integer"
                 },
@@ -805,24 +944,6 @@
                 "warehouseId": {
                     "description": "浠撳簱id",
                     "type": "integer"
-                }
-            }
-        },
-        "models.Location": {
-            "type": "object",
-            "properties": {
-                "createTime": {
-                    "type": "string"
-                },
-                "id": {
-                    "type": "integer"
-                },
-                "name": {
-                    "description": "浣嶇疆鍚嶇О",
-                    "type": "string"
-                },
-                "updateTime": {
-                    "type": "string"
                 }
             }
         },
@@ -915,18 +1036,63 @@
                 }
             }
         },
-        "request.AddJobType": {
+        "request.AddOperation": {
+            "type": "object",
+            "properties": {
+                "details": {
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/request.OperationDetails"
+                    }
+                },
+                "fromLocationId": {
+                    "description": "婧愪綅缃甶d",
+                    "type": "integer"
+                },
+                "id": {
+                    "type": "integer"
+                },
+                "number": {
+                    "description": "鍗曞彿",
+                    "type": "string"
+                },
+                "operationDate": {
+                    "$ref": "#/definitions/util.JSONTime"
+                },
+                "operationTypeId": {
+                    "description": "浣滀笟绫诲瀷id",
+                    "type": "integer"
+                },
+                "sourceNumber": {
+                    "description": "婧愬崟鍙�",
+                    "type": "string"
+                },
+                "status": {
+                    "description": "鐘舵��",
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/constvar.OperationStatus"
+                        }
+                    ]
+                },
+                "toLocationId": {
+                    "description": "鐩爣浣嶇疆id",
+                    "type": "integer"
+                }
+            }
+        },
+        "request.AddOperationType": {
             "type": "object",
             "properties": {
                 "ReservationDaysBeforePriority": {
                     "description": "鍦ㄤ紭鍏堢骇鐨勫墠鍑犲ぉ",
                     "type": "integer"
                 },
-                "baseJobType": {
+                "baseOperationType": {
                     "description": "鍩虹浣滀笟绫诲瀷",
                     "allOf": [
                         {
-                            "$ref": "#/definitions/constvar.BaseJobType"
+                            "$ref": "#/definitions/constvar.BaseOperationType"
                         }
                     ]
                 },
@@ -973,7 +1139,7 @@
                         }
                     ]
                 },
-                "returnJobTypeID": {
+                "returnOperationTypeID": {
                     "description": "閫�璐х被鍨婭D",
                     "type": "integer"
                 },
@@ -1024,6 +1190,27 @@
                 }
             }
         },
+        "request.OperationDetails": {
+            "type": "object",
+            "properties": {
+                "finishQuantity": {
+                    "description": "瀹屾垚鏁伴噺",
+                    "type": "number"
+                },
+                "productId": {
+                    "description": "浜у搧id",
+                    "type": "integer"
+                },
+                "productName": {
+                    "description": "浜у搧鍚嶇О",
+                    "type": "string"
+                },
+                "quantity": {
+                    "description": "鏁伴噺",
+                    "type": "number"
+                }
+            }
+        },
         "request.UpdateCompany": {
             "type": "object",
             "properties": {
@@ -1060,18 +1247,18 @@
                 }
             }
         },
-        "request.UpdateJobType": {
+        "request.UpdateOperationType": {
             "type": "object",
             "properties": {
                 "ReservationDaysBeforePriority": {
                     "description": "鍦ㄤ紭鍏堢骇鐨勫墠鍑犲ぉ",
                     "type": "integer"
                 },
-                "baseJobType": {
+                "baseOperationType": {
                     "description": "鍩虹浣滀笟绫诲瀷",
                     "allOf": [
                         {
-                            "$ref": "#/definitions/constvar.BaseJobType"
+                            "$ref": "#/definitions/constvar.BaseOperationType"
                         }
                     ]
                 },
@@ -1118,7 +1305,7 @@
                         }
                     ]
                 },
-                "returnJobTypeID": {
+                "returnOperationTypeID": {
                     "description": "閫�璐х被鍨婭D",
                     "type": "integer"
                 },
@@ -1172,6 +1359,14 @@
                 }
             }
         },
+        "util.JSONTime": {
+            "type": "object",
+            "properties": {
+                "time.Time": {
+                    "type": "string"
+                }
+            }
+        },
         "util.Response": {
             "type": "object",
             "properties": {
@@ -1218,8 +1413,6 @@
 	Description:      "",
 	InfoInstanceName: "swagger",
 	SwaggerTemplate:  docTemplate,
-	LeftDelim:        "{{",
-	RightDelim:       "}}",
 }
 
 func init() {

--
Gitblit v1.8.0