liujiandao
2023-09-20 28240d14942e63d05c06531f04f7f7b5530f04c3
产品与产品类型注释添加
1个文件已删除
5个文件已修改
499 ■■■■■ 已修改文件
docs/docs.go 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/material.go 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/product.go 294 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/product_category.go 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go
@@ -1389,9 +1389,11 @@
            "type": "object",
            "properties": {
                "HSCode": {
                    "description": "HS编码",
                    "type": "string"
                },
                "amount": {
                    "description": "数量",
                    "type": "number"
                },
                "barcode": {
@@ -1399,6 +1401,7 @@
                    "type": "string"
                },
                "buyExplain": {
                    "description": "采购说明",
                    "type": "string"
                },
                "canBePurchased": {
@@ -1410,19 +1413,27 @@
                    "type": "integer"
                },
                "companyId": {
                    "description": "公司id",
                    "type": "integer"
                },
                "companyName": {
                    "description": "公司名称",
                    "type": "string"
                },
                "controlStrategy": {
                    "$ref": "#/definitions/constvar.InvoicingStrategy"
                    "description": "控制策略",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.InvoicingStrategy"
                        }
                    ]
                },
                "cost": {
                    "description": "成本",
                    "type": "number"
                },
                "currencyName": {
                    "description": "币种名称",
                    "type": "string"
                },
                "customerTaxes": {
@@ -1430,12 +1441,14 @@
                    "type": "number"
                },
                "deliveryAdvanceTime": {
                    "description": "交货提前时间(天)",
                    "type": "integer"
                },
                "id": {
                    "type": "string"
                },
                "inStorageExplain": {
                    "description": "入库说明",
                    "type": "string"
                },
                "internalNotes": {
@@ -1447,6 +1460,7 @@
                    "type": "string"
                },
                "internalTransferExplain": {
                    "description": "内部调拨说明",
                    "type": "string"
                },
                "invoicingStrategy": {
@@ -1462,6 +1476,7 @@
                    "type": "boolean"
                },
                "maxInventory": {
                    "description": "最大库存",
                    "type": "number"
                },
                "minInventory": {
@@ -1481,18 +1496,27 @@
                    ]
                },
                "name": {
                    "description": "物料名称",
                    "type": "string"
                },
                "orderCreation": {
                    "$ref": "#/definitions/constvar.OrderCreation"
                    "description": "订单创建",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.OrderCreation"
                        }
                    ]
                },
                "originCountryId": {
                    "description": "原产地id",
                    "type": "integer"
                },
                "originCountryName": {
                    "description": "原产地名称",
                    "type": "string"
                },
                "outStorageExplain": {
                    "description": "出库说明",
                    "type": "string"
                },
                "principal": {
@@ -1500,26 +1524,35 @@
                    "type": "string"
                },
                "productTagId": {
                    "description": "产品标签",
                    "description": "产品标签id",
                    "type": "integer"
                },
                "productTagName": {
                    "description": "产品标签名称",
                    "type": "string"
                },
                "purchasePrice": {
                    "description": "采购价格",
                    "type": "number"
                },
                "salePrice": {
                    "description": "销售单价",
                    "type": "number"
                },
                "selectProduct": {
                    "description": "可选产品id",
                    "type": "integer"
                },
                "sellExplain": {
                    "description": "销售说明",
                    "type": "string"
                },
                "supplier": {
                    "description": "FSource           string                  ` + "`" + `gorm:\"type:varchar(191);comment:生产车间\" json:\"-\"` + "`" + `\nStatus            constvar.MaterialStatus ` + "`" + `gorm:\"type:int(11);comment:状态\" json:\"status\"` + "`" + `",
                    "type": "string"
                },
                "templateID": {
                    "description": "Note              string                  ` + "`" + `gorm:\"type:varchar(1024);comment:备注\" json:\"note\"` + "`" + `",
                    "type": "string"
                },
                "unit": {
@@ -1689,6 +1722,7 @@
                    "type": "integer"
                },
                "routeId": {
                    "description": "路线id",
                    "type": "integer"
                },
                "routeName": {
docs/swagger.json
@@ -1377,9 +1377,11 @@
            "type": "object",
            "properties": {
                "HSCode": {
                    "description": "HS编码",
                    "type": "string"
                },
                "amount": {
                    "description": "数量",
                    "type": "number"
                },
                "barcode": {
@@ -1387,6 +1389,7 @@
                    "type": "string"
                },
                "buyExplain": {
                    "description": "采购说明",
                    "type": "string"
                },
                "canBePurchased": {
@@ -1398,19 +1401,27 @@
                    "type": "integer"
                },
                "companyId": {
                    "description": "公司id",
                    "type": "integer"
                },
                "companyName": {
                    "description": "公司名称",
                    "type": "string"
                },
                "controlStrategy": {
                    "$ref": "#/definitions/constvar.InvoicingStrategy"
                    "description": "控制策略",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.InvoicingStrategy"
                        }
                    ]
                },
                "cost": {
                    "description": "成本",
                    "type": "number"
                },
                "currencyName": {
                    "description": "币种名称",
                    "type": "string"
                },
                "customerTaxes": {
@@ -1418,12 +1429,14 @@
                    "type": "number"
                },
                "deliveryAdvanceTime": {
                    "description": "交货提前时间(天)",
                    "type": "integer"
                },
                "id": {
                    "type": "string"
                },
                "inStorageExplain": {
                    "description": "入库说明",
                    "type": "string"
                },
                "internalNotes": {
@@ -1435,6 +1448,7 @@
                    "type": "string"
                },
                "internalTransferExplain": {
                    "description": "内部调拨说明",
                    "type": "string"
                },
                "invoicingStrategy": {
@@ -1450,6 +1464,7 @@
                    "type": "boolean"
                },
                "maxInventory": {
                    "description": "最大库存",
                    "type": "number"
                },
                "minInventory": {
@@ -1469,18 +1484,27 @@
                    ]
                },
                "name": {
                    "description": "物料名称",
                    "type": "string"
                },
                "orderCreation": {
                    "$ref": "#/definitions/constvar.OrderCreation"
                    "description": "订单创建",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.OrderCreation"
                        }
                    ]
                },
                "originCountryId": {
                    "description": "原产地id",
                    "type": "integer"
                },
                "originCountryName": {
                    "description": "原产地名称",
                    "type": "string"
                },
                "outStorageExplain": {
                    "description": "出库说明",
                    "type": "string"
                },
                "principal": {
@@ -1488,26 +1512,35 @@
                    "type": "string"
                },
                "productTagId": {
                    "description": "产品标签",
                    "description": "产品标签id",
                    "type": "integer"
                },
                "productTagName": {
                    "description": "产品标签名称",
                    "type": "string"
                },
                "purchasePrice": {
                    "description": "采购价格",
                    "type": "number"
                },
                "salePrice": {
                    "description": "销售单价",
                    "type": "number"
                },
                "selectProduct": {
                    "description": "可选产品id",
                    "type": "integer"
                },
                "sellExplain": {
                    "description": "销售说明",
                    "type": "string"
                },
                "supplier": {
                    "description": "FSource           string                  `gorm:\"type:varchar(191);comment:生产车间\" json:\"-\"`\nStatus            constvar.MaterialStatus `gorm:\"type:int(11);comment:状态\" json:\"status\"`",
                    "type": "string"
                },
                "templateID": {
                    "description": "Note              string                  `gorm:\"type:varchar(1024);comment:备注\" json:\"note\"`",
                    "type": "string"
                },
                "unit": {
@@ -1677,6 +1710,7 @@
                    "type": "integer"
                },
                "routeId": {
                    "description": "路线id",
                    "type": "integer"
                },
                "routeName": {
docs/swagger.yaml
@@ -246,13 +246,16 @@
  models.Material:
    properties:
      HSCode:
        description: HS编码
        type: string
      amount:
        description: 数量
        type: number
      barcode:
        description: 条码
        type: string
      buyExplain:
        description: 采购说明
        type: string
      canBePurchased:
        description: 是否可采购
@@ -261,24 +264,31 @@
        description: 产品类别id
        type: integer
      companyId:
        description: 公司id
        type: integer
      companyName:
        description: 公司名称
        type: string
      controlStrategy:
        $ref: '#/definitions/constvar.InvoicingStrategy'
        allOf:
        - $ref: '#/definitions/constvar.InvoicingStrategy'
        description: 控制策略
      cost:
        description: 成本
        type: number
      currencyName:
        description: 币种名称
        type: string
      customerTaxes:
        description: 客户税百分比
        type: number
      deliveryAdvanceTime:
        description: 交货提前时间(天)
        type: integer
      id:
        type: string
      inStorageExplain:
        description: 入库说明
        type: string
      internalNotes:
        description: 内部说明
@@ -287,6 +297,7 @@
        description: 内部参考
        type: string
      internalTransferExplain:
        description: 内部调拨说明
        type: string
      invoicingStrategy:
        allOf:
@@ -297,6 +308,7 @@
          json:"purchaseType"`
        type: boolean
      maxInventory:
        description: 最大库存
        type: number
      minInventory:
        description: |-
@@ -316,35 +328,50 @@
        description: MaterialType constvar.ProductType  `gorm:"index;type:int(11);comment:物料类型(数字)"
          json:"materialType"`
      name:
        description: 物料名称
        type: string
      orderCreation:
        $ref: '#/definitions/constvar.OrderCreation'
        allOf:
        - $ref: '#/definitions/constvar.OrderCreation'
        description: 订单创建
      originCountryId:
        description: 原产地id
        type: integer
      originCountryName:
        description: 原产地名称
        type: string
      outStorageExplain:
        description: 出库说明
        type: string
      principal:
        description: 负责人
        type: string
      productTagId:
        description: 产品标签
        description: 产品标签id
        type: integer
      productTagName:
        description: 产品标签名称
        type: string
      purchasePrice:
        description: 采购价格
        type: number
      salePrice:
        description: 销售单价
        type: number
      selectProduct:
        description: 可选产品id
        type: integer
      sellExplain:
        description: 销售说明
        type: string
      supplier:
        description: |-
          FSource           string                  `gorm:"type:varchar(191);comment:生产车间" json:"-"`
          Status            constvar.MaterialStatus `gorm:"type:int(11);comment:状态" json:"status"`
        type: string
      templateID:
        description: Note              string                  `gorm:"type:varchar(1024);comment:备注"
          json:"note"`
        type: string
      unit:
        description: LockAmount        decimal.Decimal         `gorm:"type:decimal(35,18);default:0;comment:锁定数量"
@@ -450,6 +477,7 @@
        description: 上级id
        type: integer
      routeId:
        description: 路线id
        type: integer
      routeName:
        description: 公司
models/material.go
@@ -12,61 +12,60 @@
    // Material 物料
    Material struct {
        BaseModelString
        Name string `gorm:"unique;type:varchar(191);not null;comment:物料名称" json:"name"`
        Name string `gorm:"unique;type:varchar(191);not null;comment:物料名称" json:"name"` //物料名称
        //MaterialType constvar.ProductType  `gorm:"index;type:int(11);comment:物料类型(数字)" json:"materialType"`
        Model constvar.MaterialMode `gorm:"type:varchar(191);not null;comment:物料类型(字符串)" json:"model"`
        Model constvar.MaterialMode `gorm:"type:varchar(191);not null;comment:物料类型(字符串)" json:"model"` //物料类型(字符串)
        //Explain           string                  `gorm:"type:varchar(512);comment:编号说明" json:"explain"`
        //CodeStandardID    string                  `gorm:"type:varchar(191);comment:编码规范ID" json:"codeStandardID"`
        //Specs             string                  `gorm:"type:varchar(191);comment:物料规格" json:"specs"`
        //Type              string                  `gorm:"type:varchar(191);comment:物料型号" json:"type"`
        MinInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:最小库存" json:"minInventory"`
        MaxInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:最大库存" json:"maxInventory"`
        Amount       decimal.Decimal `gorm:"type:decimal(35,18);comment:数量" json:"amount"`
        MinInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:最小库存" json:"minInventory"` //最小库存
        MaxInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:最大库存" json:"maxInventory"` //最大库存
        Amount       decimal.Decimal `gorm:"type:decimal(35,18);comment:数量" json:"amount"`         //数量
        //LockAmount        decimal.Decimal         `gorm:"type:decimal(35,18);default:0;comment:锁定数量" json:"lockAmount"`
        Unit string `gorm:"type:varchar(100);comment:单位" json:"unit"`
        Unit string `gorm:"type:varchar(100);comment:单位" json:"unit"` //单位
        //Note              string                  `gorm:"type:varchar(1024);comment:备注" json:"note"`
        TemplateID string `gorm:"type:varchar(191);comment:模板ID" json:"-"`
        TemplateID string `gorm:"type:varchar(191);comment:模板ID" json:"templateID"` //模板ID
        //FSource           string                  `gorm:"type:varchar(191);comment:生产车间" json:"-"`
        //Status            constvar.MaterialStatus `gorm:"type:int(11);comment:状态" json:"status"`
        Supplier      string          `gorm:"type:varchar(191);comment:供应商" json:"supplier"`
        PurchasePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:采购价格" json:"purchasePrice"`
        Supplier      string          `gorm:"type:varchar(191);comment:供应商" json:"supplier"`         //供应商
        PurchasePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:采购价格" json:"purchasePrice"` //采购价格
        //PurchaseAheadDay  int                     `gorm:"type:int(11);comment:采购提前期(天)" json:"purchaseAheadDay"`
        //ProduceAheadDay   int                     `gorm:"type:int(11);comment:制造提前期(天)" json:"produceAheadDay"`
        MinPurchaseAmount decimal.Decimal `gorm:"type:decimal(35,18);comment:最小采购量" json:"minPurchaseAmount"`
        MinPurchaseAmount decimal.Decimal `gorm:"type:decimal(35,18);comment:最小采购量" json:"minPurchaseAmount"` //最小采购量
        //PurchaseType      constvar.PurchaseType `gorm:"type:int(11);comment:采购类型" json:"purchaseType"`
        IsSale    bool            `gorm:"type:tinyint(1);comment:是否销售" json:"isSale"`
        SalePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:销售单价" json:"salePrice"`
        IsSale    bool            `gorm:"type:tinyint(1);comment:是否销售" json:"isSale"`        //是否销售
        SalePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:销售单价" json:"salePrice"` //销售单价
        AutoIncr  uint            `gorm:"type:int(11);comment:自增ID;default:0;" json:"-"`
        //wms添加字段
        InvoicingStrategy       constvar.InvoicingStrategy `gorm:"type:int(11);comment:开票策略" json:"invoicingStrategy"`
        OrderCreation           constvar.OrderCreation     `gorm:"type:int(11);comment:订单创建" json:"orderCreation"`
        CustomerTaxes           decimal.Decimal            `gorm:"type:decimal(20,2);comment:客户税" json:"customerTaxes"`     //客户税百分比
        Cost                    decimal.Decimal            `gorm:"type:decimal(20,2);comment:成本" json:"cost"`               //成本
        CategoryId              int                        `gorm:"type:int(11);comment:产品类别id" json:"categoryId"`           //产品类别id
        InternalReference       string                     `gorm:"type:varchar(255);comment:内部参考" json:"internalReference"` //内部参考
        Barcode                 string                     `gorm:"type:varchar(255);comment:条码" json:"barcode"`             //条码
        ProductTagId            int                        `gorm:"type:int(11);comment:产品标签id" json:"productTagId"`         //产品标签
        ProductTagName          string                     `gorm:"type:varchar(255);comment:产品标签名称" json:"productTagName"`
        CompanyId               int                        `gorm:"type:int(11);comment:公司id" json:"companyId"`
        CompanyName             string                     `gorm:"type:varchar(255);comment:公司名称" json:"companyName"`
        InternalNotes           string                     `gorm:"type:varchar(512);comment:内部说明" json:"internalNotes"` //内部说明
        SelectProduct           int                        `gorm:"type:int(11);comment:可选产品id" json:"selectProduct"`
        SellExplain             string                     `gorm:"type:varchar(512);comment:销售说明" json:"sellExplain"`
        CanBePurchased          bool                       `gorm:"type:int(11);comment:是否可采购" json:"canBePurchased"` //是否可采购
        CurrencyName            string                     `gorm:"type:varchar(255);comment:币种名称" json:"currencyName"`
        DeliveryAdvanceTime     int                        `gorm:"type:int(11);comment:交货提前时间(天)" json:"deliveryAdvanceTime"`
        ControlStrategy         constvar.InvoicingStrategy `gorm:"type:int(11);comment:控制策略" json:"controlStrategy"`
        BuyExplain              string                     `gorm:"type:varchar(512);comment:采购说明" json:"buyExplain"`
        Principal               string                     `gorm:"type:varchar(255);comment:负责人" json:"principal"` //负责人
        Weight                  decimal.Decimal            `gorm:"type:decimal(20,2);comment:重量" json:"weight"`    //重量
        Volume                  decimal.Decimal            `gorm:"type:decimal(20,2);comment:体积" json:"volume"`    //体积
        HSCode                  string                     `gorm:"type:varchar(255);comment:HS编码" json:"HSCode"`
        OriginCountryId         int                        `gorm:"type:int(11);comment:原产地id" json:"originCountryId"`
        OriginCountryName       string                     `gorm:"type:varchar(255);comment:原产地名称" json:"originCountryName"`
        InStorageExplain        string                     `gorm:"type:varchar(512);comment:入库说明" json:"inStorageExplain"`
        OutStorageExplain       string                     `gorm:"type:varchar(512);comment:出库说明" json:"outStorageExplain"`
        InternalTransferExplain string                     `gorm:"type:varchar(512);comment:内部调拨说明" json:"internalTransferExplain"`
        //CompanyArr              []IdAndName                `gorm:"-" json:"companyArr"`
        InvoicingStrategy       constvar.InvoicingStrategy `gorm:"type:int(11);comment:开票策略" json:"invoicingStrategy"`              //开票策略
        OrderCreation           constvar.OrderCreation     `gorm:"type:int(11);comment:订单创建" json:"orderCreation"`                  //订单创建
        CustomerTaxes           decimal.Decimal            `gorm:"type:decimal(20,2);comment:客户税" json:"customerTaxes"`             //客户税百分比
        Cost                    decimal.Decimal            `gorm:"type:decimal(20,2);comment:成本" json:"cost"`                       //成本
        CategoryId              int                        `gorm:"type:int(11);comment:产品类别id" json:"categoryId"`                   //产品类别id
        InternalReference       string                     `gorm:"type:varchar(255);comment:内部参考" json:"internalReference"`         //内部参考
        Barcode                 string                     `gorm:"type:varchar(255);comment:条码" json:"barcode"`                     //条码
        ProductTagId            int                        `gorm:"type:int(11);comment:产品标签id" json:"productTagId"`                 //产品标签id
        ProductTagName          string                     `gorm:"type:varchar(255);comment:产品标签名称" json:"productTagName"`          //产品标签名称
        CompanyId               int                        `gorm:"type:int(11);comment:公司id" json:"companyId"`                      //公司id
        CompanyName             string                     `gorm:"type:varchar(255);comment:公司名称" json:"companyName"`               //公司名称
        InternalNotes           string                     `gorm:"type:varchar(512);comment:内部说明" json:"internalNotes"`             //内部说明
        SelectProduct           int                        `gorm:"type:int(11);comment:可选产品id" json:"selectProduct"`                //可选产品id
        SellExplain             string                     `gorm:"type:varchar(512);comment:销售说明" json:"sellExplain"`               //销售说明
        CanBePurchased          bool                       `gorm:"type:int(11);comment:是否可采购" json:"canBePurchased"`                //是否可采购
        CurrencyName            string                     `gorm:"type:varchar(255);comment:币种名称" json:"currencyName"`              //币种名称
        DeliveryAdvanceTime     int                        `gorm:"type:int(11);comment:交货提前时间(天)" json:"deliveryAdvanceTime"`       //交货提前时间(天)
        ControlStrategy         constvar.InvoicingStrategy `gorm:"type:int(11);comment:控制策略" json:"controlStrategy"`                //控制策略
        BuyExplain              string                     `gorm:"type:varchar(512);comment:采购说明" json:"buyExplain"`                //采购说明
        Principal               string                     `gorm:"type:varchar(255);comment:负责人" json:"principal"`                  //负责人
        Weight                  decimal.Decimal            `gorm:"type:decimal(20,2);comment:重量" json:"weight"`                     //重量
        Volume                  decimal.Decimal            `gorm:"type:decimal(20,2);comment:体积" json:"volume"`                     //体积
        HSCode                  string                     `gorm:"type:varchar(255);comment:HS编码" json:"HSCode"`                    //HS编码
        OriginCountryId         int                        `gorm:"type:int(11);comment:原产地id" json:"originCountryId"`               //原产地id
        OriginCountryName       string                     `gorm:"type:varchar(255);comment:原产地名称" json:"originCountryName"`        //原产地名称
        InStorageExplain        string                     `gorm:"type:varchar(512);comment:入库说明" json:"inStorageExplain"`          //入库说明
        OutStorageExplain       string                     `gorm:"type:varchar(512);comment:出库说明" json:"outStorageExplain"`         //出库说明
        InternalTransferExplain string                     `gorm:"type:varchar(512);comment:内部调拨说明" json:"internalTransferExplain"` //内部调拨说明
    }
    MaterialSearch struct {
models/product.go
File was deleted
models/product_category.go
@@ -13,11 +13,11 @@
        BaseModelInt
        Name                 string                        `json:"name" gorm:"index;type:varchar(255);not null;comment:分类名称"` //位置名称
        ParentId             int                           `json:"parentId" gorm:"type:int;comment:上级分类id"`                   //上级id
        RouteId              int                           `json:"routeId" gorm:"type:int;comment:路线id"`
        RouteName            string                        `json:"routeName" gorm:"type:varchar(512);comment:路线名称"`         //公司
        ForceRemovalStrategy constvar.ForceRemovalStrategy `json:"forceRemovalStrategy" gorm:"type:tinyint;comment:强制下架策略"` //强制下架策略
        CostingMethod        constvar.CostingMethod        `json:"costingMethod" gorm:"type:tinyint;comment:成本方法"`          //成本方法
        InventoryValuation   constvar.InventoryValuation   `json:"inventoryValuation" gorm:"type:tinyint;comment:库存计价"`     //库存计价
        RouteId              int                           `json:"routeId" gorm:"type:int;comment:路线id"`                      //路线id
        RouteName            string                        `json:"routeName" gorm:"type:varchar(512);comment:路线名称"`           //公司
        ForceRemovalStrategy constvar.ForceRemovalStrategy `json:"forceRemovalStrategy" gorm:"type:tinyint;comment:强制下架策略"`   //强制下架策略
        CostingMethod        constvar.CostingMethod        `json:"costingMethod" gorm:"type:tinyint;comment:成本方法"`            //成本方法
        InventoryValuation   constvar.InventoryValuation   `json:"inventoryValuation" gorm:"type:tinyint;comment:库存计价"`       //库存计价
    }
    ProductCategorySearch struct {