jiangshuai
2023-10-23 0551df1d2a65876b2427df112e37625f128b67e4
1.库存盘点列表增加基础作业类型
6个文件已修改
111 ■■■■■ 已修改文件
controllers/location_product_amount.go 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/operation_type.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/location_product_amount.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/location_product_amount.go
@@ -71,6 +71,7 @@
        if res := models.NewOperationSearch().Orm.Preload("Details", "product_id=?", v.ProductId).Where("wms_operation.base_operation_type=? and wms_operation.status=? and wms_operation.to_location_id=?", constvar.BaseOperationTypeAdjust, constvar.OperationStatus_Ready, v.LocationId).First(&operation); res.Error != nil {
            if errors.Is(res.Error, gorm.ErrRecordNotFound) {
                records[k].Status = constvar.OperationStatus_Finish
                records[k].BaseOperationType = constvar.BaseOperationTypeAdjust
                continue
            } else {
                util.ResponseFormat(c, code.RequestError, fmt.Errorf("find operation err: %v", res.Error.Error()))
@@ -84,6 +85,7 @@
            records[k].OperationId = operation.Id
            records[k].Status = operation.Status
        }
        records[k].BaseOperationType = constvar.BaseOperationTypeAdjust
    }
    util.ResponseFormatListWithPage(c, code.Success, records, int(total), params.Page, params.PageSize)
}
controllers/operation_type.go
@@ -173,7 +173,7 @@
// @Produce   application/json
// @Param     object  query    request.ListTransfer true  "查询参数"
// @Success   200   {object}  util.ResponseList  "成功"
// @Router    /api-wms/v1/operationType/operationType [get]
// @Router    /api-wms/v1/operationType/listTransfer [get]
func (slf OperationTypeController) ListTransfer(c *gin.Context) {
    var params request.GetOperationTypeList
    if err := c.ShouldBindQuery(&params); err != nil {
docs/docs.go
@@ -1061,7 +1061,7 @@
                }
            }
        },
        "/api-wms/v1/operationType/operationType": {
        "/api-wms/v1/operationType/listTransfer": {
            "get": {
                "produces": [
                    "application/json"
@@ -1085,6 +1085,44 @@
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operationType/operationType": {
            "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": {
                            "$ref": "#/definitions/util.ResponseList"
                        }
                    }
                }
            },
            "post": {
                "produces": [
docs/swagger.json
@@ -1049,7 +1049,7 @@
                }
            }
        },
        "/api-wms/v1/operationType/operationType": {
        "/api-wms/v1/operationType/listTransfer": {
            "get": {
                "produces": [
                    "application/json"
@@ -1073,6 +1073,44 @@
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operationType/operationType": {
            "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": {
                            "$ref": "#/definitions/util.ResponseList"
                        }
                    }
                }
            },
            "post": {
                "produces": [
docs/swagger.yaml
@@ -1921,7 +1921,7 @@
      summary: 修改入库/出库信息
      tags:
      - 入库/出库
  /api-wms/v1/operationType/operationType:
  /api-wms/v1/operationType/listTransfer:
    get:
      parameters:
      - in: query
@@ -1937,6 +1937,30 @@
      summary: 调拨类型列表
      tags:
      - 业务类型
  /api-wms/v1/operationType/operationType:
    get:
      parameters:
      - in: query
        name: keyword
        type: string
      - description: 页码
        in: query
        name: page
        type: integer
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.ResponseList'
      summary: 查询作业类型列表
      tags:
      - 业务类型
    post:
      parameters:
      - description: 作业类型信息
models/location_product_amount.go
@@ -43,6 +43,7 @@
        DifferenceAmount        decimal.Decimal          `json:"differenceAmount" gorm:"-"`
        OperationId             int                      `json:"operationId" gorm:"column:operation_id"`
        Status                  constvar.OperationStatus `json:"status" gorm:"status"`
        BaseOperationType       constvar.BaseOperationType `json:"baseOperationType" gorm:"base_operation_type"`
    }
)