liujiandao
2024-03-12 94d30c9562b42d7cd38cbf3469400b752f219939
字段统一
5个文件已修改
229 ■■■■ 已修改文件
api/v1/purchase/purchase.go 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/purchase/response/purchase.go 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/purchase/purchase.go
@@ -357,7 +357,7 @@
// @Security  ApiKeyAuth
// @accept    application/json
// @Produce   application/json
// @Success   200   {object}  response.Response{data=[]purchase_wms.SrmGetWarehouseInfoResponse}  "获取采购类型列表"
// @Success   200   {object}  response.Response{data=[]purchaseRes.OperationInfo}  "获取操作信息"
// @Router    /purchase/getOperationInfo/{id} [get]
func (e *PurchaseApi) GetOperationInfo(c *gin.Context) {
    id, _ := strconv.Atoi(c.Param("id"))
@@ -388,9 +388,9 @@
    operationInfos := make([]purchaseRes.OperationInfo, 0)
    for _, operation := range info.Operations {
        var oi purchaseRes.OperationInfo
        oi.ProductId = operation.ProductId
        oi.ProductName = operation.ProductName
        oi.Number = operation.Number
        oi.Number = operation.ProductId
        oi.Name = operation.ProductName
        oi.OperationNumber = operation.Number
        oi.Status = operation.Status
        oi.Principal = data.Principal
        oi.WarehouseName = data.Warehouse
@@ -403,7 +403,7 @@
        for _, products := range productList {
            if products.Product.Number == operation.ProductId {
                oi.Amount = products.Amount
                oi.Price = products.Price
                oi.PurchasePrice = products.Price
                oi.Total = products.Total
                oi.Unit = products.Product.Unit
                oi.Specifications = products.Product.Specifications
docs/docs.go
@@ -1625,7 +1625,7 @@
                "summary": "获取操作信息",
                "responses": {
                    "200": {
                        "description": "获取采购类型列表",
                        "description": "获取操作信息",
                        "schema": {
                            "allOf": [
                                {
@@ -1637,7 +1637,7 @@
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/purchase_wms.SrmGetWarehouseInfoResponse"
                                                "$ref": "#/definitions/response.OperationInfo"
                                            }
                                        }
                                    }
@@ -4232,6 +4232,70 @@
                }
            }
        },
        "response.OperationInfo": {
            "type": "object",
            "properties": {
                "amount": {
                    "description": "采购数",
                    "type": "number"
                },
                "modelNumber": {
                    "description": "型号",
                    "type": "string"
                },
                "name": {
                    "description": "产品名称",
                    "type": "string"
                },
                "number": {
                    "description": "产品编码",
                    "type": "string"
                },
                "operationNumber": {
                    "description": "入库单号",
                    "type": "string"
                },
                "overAmount": {
                    "description": "入库数",
                    "type": "integer"
                },
                "overTime": {
                    "description": "入库时间",
                    "type": "string"
                },
                "principal": {
                    "description": "负责人",
                    "type": "string"
                },
                "purchasePrice": {
                    "description": "单价",
                    "type": "number"
                },
                "sendAmount": {
                    "description": "发货数",
                    "type": "integer"
                },
                "specifications": {
                    "description": "规格",
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "total": {
                    "description": "总价",
                    "type": "number"
                },
                "unit": {
                    "description": "单位",
                    "type": "string"
                },
                "warehouseName": {
                    "description": "仓库名",
                    "type": "string"
                }
            }
        },
        "response.PageResult": {
            "type": "object",
            "properties": {
docs/swagger.json
@@ -1616,7 +1616,7 @@
                "summary": "获取操作信息",
                "responses": {
                    "200": {
                        "description": "获取采购类型列表",
                        "description": "获取操作信息",
                        "schema": {
                            "allOf": [
                                {
@@ -1628,7 +1628,7 @@
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/purchase_wms.SrmGetWarehouseInfoResponse"
                                                "$ref": "#/definitions/response.OperationInfo"
                                            }
                                        }
                                    }
@@ -4223,6 +4223,70 @@
                }
            }
        },
        "response.OperationInfo": {
            "type": "object",
            "properties": {
                "amount": {
                    "description": "采购数",
                    "type": "number"
                },
                "modelNumber": {
                    "description": "型号",
                    "type": "string"
                },
                "name": {
                    "description": "产品名称",
                    "type": "string"
                },
                "number": {
                    "description": "产品编码",
                    "type": "string"
                },
                "operationNumber": {
                    "description": "入库单号",
                    "type": "string"
                },
                "overAmount": {
                    "description": "入库数",
                    "type": "integer"
                },
                "overTime": {
                    "description": "入库时间",
                    "type": "string"
                },
                "principal": {
                    "description": "负责人",
                    "type": "string"
                },
                "purchasePrice": {
                    "description": "单价",
                    "type": "number"
                },
                "sendAmount": {
                    "description": "发货数",
                    "type": "integer"
                },
                "specifications": {
                    "description": "规格",
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "total": {
                    "description": "总价",
                    "type": "number"
                },
                "unit": {
                    "description": "单位",
                    "type": "string"
                },
                "warehouseName": {
                    "description": "仓库名",
                    "type": "string"
                }
            }
        },
        "response.PageResult": {
            "type": "object",
            "properties": {
docs/swagger.yaml
@@ -785,6 +785,53 @@
          $ref: '#/definitions/test.SupplierType'
        type: array
    type: object
  response.OperationInfo:
    properties:
      amount:
        description: 采购数
        type: number
      modelNumber:
        description: 型号
        type: string
      name:
        description: 产品名称
        type: string
      number:
        description: 产品编码
        type: string
      operationNumber:
        description: 入库单号
        type: string
      overAmount:
        description: 入库数
        type: integer
      overTime:
        description: 入库时间
        type: string
      principal:
        description: 负责人
        type: string
      purchasePrice:
        description: 单价
        type: number
      sendAmount:
        description: 发货数
        type: integer
      specifications:
        description: 规格
        type: string
      status:
        type: integer
      total:
        description: 总价
        type: number
      unit:
        description: 单位
        type: string
      warehouseName:
        description: 仓库名
        type: string
    type: object
  response.PageResult:
    properties:
      list: {}
@@ -1975,14 +2022,14 @@
      - application/json
      responses:
        "200":
          description: 获取采购类型列表
          description: 获取操作信息
          schema:
            allOf:
            - $ref: '#/definitions/response.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/purchase_wms.SrmGetWarehouseInfoResponse'
                    $ref: '#/definitions/response.OperationInfo'
                  type: array
              type: object
      security:
model/purchase/response/purchase.go
@@ -13,7 +13,7 @@
type PurchaseProducts struct {
    PurchaseId       int             `json:"purchaseId" form:"purchaseType" gorm:"type:int(11);not null;default 0;comment:采购类型id"` // 采购id
    ProductId        int             `json:"productId" form:"supplierId" gorm:"type:int(11);not null;default 0;comment:供应商id"`     // 产品id
    ProductId        int             `json:"productId" form:"supplierId" gorm:"type:int(11);not null;default 0;comment:产品id"`      // 产品id
    Amount           decimal.Decimal `json:"amount" form:"amount" gorm:"type:decimal(12,2);not null;default 0;comment:采购数量"`       // 采购数量
    Price            decimal.Decimal `json:"price" form:"price" gorm:"type:decimal(12,2);not null;default 0.00;comment:采购单价"`      // 采购单价
    Total            decimal.Decimal `json:"total" form:"total" gorm:"type:decimal(12,2);not null;default 0.00;comment:采购总价"`      // 采购总价
@@ -51,19 +51,19 @@
}
type OperationInfo struct {
    ProductId      string          `json:"productId"`
    ProductName    string          `json:"productName"`
    Specifications string          `json:"specifications"` //规格
    ModelNumber    string          `json:"modelNumber"`    //型号
    Amount         decimal.Decimal `json:"amount"`         //采购数
    SendAmount     int64           `json:"sendAmount"`     //发货数
    OverAmount     int64           `json:"overAmount"`     //入库数
    Unit           string          `json:"unit"`           //单位
    Price          decimal.Decimal `json:"price"`          //单价
    Total          decimal.Decimal `json:"total"`          //总价
    Number         string          `json:"number"`         //入库单号
    WarehouseName  string          `json:"warehouseName"`  //仓库名
    OverTime       string          `json:"overTime"`       //入库时间
    Status         int64           `json:"status"`
    Principal      string          `json:"principal"` //负责人
    Number          string          `json:"number"`          //产品编码
    Name            string          `json:"name"`            //产品名称
    Specifications  string          `json:"specifications"`  //规格
    ModelNumber     string          `json:"modelNumber"`     //型号
    Amount          decimal.Decimal `json:"amount"`          //采购数
    SendAmount      int64           `json:"sendAmount"`      //发货数
    OverAmount      int64           `json:"overAmount"`      //入库数
    Unit            string          `json:"unit"`            //单位
    PurchasePrice   decimal.Decimal `json:"purchasePrice"`   //单价
    Total           decimal.Decimal `json:"total"`           //总价
    OperationNumber string          `json:"operationNumber"` //入库单号
    WarehouseName   string          `json:"warehouseName"`   //仓库名
    OverTime        string          `json:"overTime"`        //入库时间
    Status          int64           `json:"status"`
    Principal       string          `json:"principal"` //负责人
}