liujiandao
2023-11-27 4885cc79aae34a011602807a41051e36e4b54e4f
grpc创建采购单修改
4个文件已修改
15 ■■■■ 已修改文件
docs/docs.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/purchase_wms/server.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go
@@ -3713,6 +3713,10 @@
                    "description": "采购编号",
                    "type": "string"
                },
                "orderSource": {
                    "description": "单据来源",
                    "type": "string"
                },
                "phone": {
                    "description": "联系人电话",
                    "type": "string"
docs/swagger.json
@@ -3704,6 +3704,10 @@
                    "description": "采购编号",
                    "type": "string"
                },
                "orderSource": {
                    "description": "单据来源",
                    "type": "string"
                },
                "phone": {
                    "description": "联系人电话",
                    "type": "string"
docs/swagger.yaml
@@ -565,6 +565,9 @@
      number:
        description: 采购编号
        type: string
      orderSource:
        description: 单据来源
        type: string
      phone:
        description: 联系人电话
        type: string
proto/purchase_wms/server.go
@@ -51,8 +51,8 @@
}
func (s *Server) CreatePurchaseByWms(ctx context.Context, req *CreatePurchaseByWmsRequest) (*CreatePurchaseByWmsResponse, error) {
    if req.SupplierId == 0 || req.ProductId == "" {
        return nil, errors.New("供应商id或产品id为空")
    if req.ProductId == "" {
        return nil, errors.New("产品id为空")
    }
    var pt purchase.PurchaseType
    err := global.GVA_DB.Model(&purchase.PurchaseType{}).First(&pt).Error