zhangqian
2023-12-18 ed3d45b189f102249eabd0cb5a0299bc66b0dea6
Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS
1个文件已添加
31个文件已修改
1721 ■■■■ 已修改文件
conf/config.yaml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
constvar/const.go 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/code.go 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/location_product_amount.go 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/operation.go 185 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/product_controller.go 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/reorder_rule_controller.go 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/report_forms_controller.go 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.go 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/file_template_attachment.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/operation.go 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/client/client.go 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/init_client/init_client.go 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/inventory_order.proto 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/inventory_order/inventory_order.pb.go 510 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/inventory_order/inventory_order_grpc.pb.go 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/inventory_order/server.go 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/product_inventory.proto 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/product_inventory/product_inventory.pb.go 159 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/product_inventory/server.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/purchase_wms.proto 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/purchase_wms/purchase_wms.pb.go 213 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/purchase_wms/server.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/supplier/client.go 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
request/operation.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
request/product_request.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
response/report_forms_response.go 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
router/router.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/upload/seaweed.go 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
conf/config.yaml
@@ -25,5 +25,5 @@
  storePath: uploads/file
grpcServer:
  apsAddr: 192.168.20.119:9091
  crmAddr: :9092
  srmAddr: 192.168.20.118:9093
  crmAddr: 192.168.20.119:9092
  srmAddr: 192.168.20.119:9093
constvar/const.go
@@ -176,7 +176,7 @@
    OperationStatus_Waiting                            //正在等待
    OperationStatus_Ready                              //就绪
    OperationStatus_Finish                             //完成
    OperationStatus_Cancel                             //完成
    OperationStatus_Cancel                             //取消
)
type PostType int
@@ -230,3 +230,13 @@
    FileTemplateCategory_Selfmade FileTemplateCategory = iota + 1 //入库-自制
    FileTemplateCategory_Output                                   //出库
)
type CodeStandardType string
const (
    CodeStandardType_Material CodeStandardType = "物料编码"
    CodeStandardType_Incoming CodeStandardType = "入库编码"
    CodeStandardType_Outgoing CodeStandardType = "出库编码"
    CodeStandardType_Internal CodeStandardType = "调拨编码"
    CodeStandardType_Disuse   CodeStandardType = "仓库报废编码"
)
controllers/code.go
@@ -3,38 +3,37 @@
import (
    "github.com/gin-gonic/gin"
    "github.com/spf13/cast"
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
    "wms/conf"
    "wms/constvar"
    cd "wms/extend/code"
    "wms/extend/util"
    "wms/models"
    "wms/pkg/contextx"
    "wms/pkg/logx"
    "wms/proto/code"
    "wms/proto/init_client"
    "wms/request"
)
type CodeApi struct{}
var (
    codeServiceConn *grpc.ClientConn
)
func InitCodeServiceConn() {
    var err error
    codeServiceConn, err = grpc.Dial(conf.GrpcServerConf.ApsAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
}
func CloseCodeServiceConn() {
    if codeServiceConn != nil {
        codeServiceConn.Close()
    }
}
//var (
//    codeServiceConn *grpc.ClientConn
//)
//
//func InitCodeServiceConn() {
//    var err error
//    codeServiceConn, err = grpc.Dial(conf.GrpcServerConf.ApsAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
//    if err != nil {
//        logx.Errorf("grpc dial product service error: %v", err.Error())
//        return
//    }
//}
//
//func CloseCodeServiceConn() {
//    if codeServiceConn != nil {
//        codeServiceConn.Close()
//    }
//}
// GetCodeList
//
@@ -54,7 +53,7 @@
    params.CodeStandID = c.Query("codeStandID")
    params.Name = c.Query("name")
    params.Type = c.Query("type")
    client := code.NewCodeServiceClient(codeServiceConn)
    client := code.NewCodeServiceClient(init_client.ApsConn)
    list, err := client.GetCodeList(ctx.GetCtx(), &code.GetCodeListRequest{
        Page:        cast.ToInt32(params.Page),
        PageSize:    cast.ToInt32(params.PageSize),
@@ -89,9 +88,17 @@
        id  = 0
        err error
    )
    switch params.Type {
    case "物料编码":
    switch constvar.CodeStandardType(params.Type) {
    case constvar.CodeStandardType_Material:
        id, err = models.NewMaterialSearch().MaxAutoIncr()
    case constvar.CodeStandardType_Incoming:
        id, err = models.NewOperationSearch().SetBaseOperationType(constvar.BaseOperationTypeIncoming).MaxAutoIncr()
    case constvar.CodeStandardType_Outgoing:
        id, err = models.NewOperationSearch().SetBaseOperationType(constvar.BaseOperationTypeOutgoing).MaxAutoIncr()
    case constvar.CodeStandardType_Internal:
        id, err = models.NewOperationSearch().SetBaseOperationType(constvar.BaseOperationTypeInternal).MaxAutoIncr()
    case constvar.CodeStandardType_Disuse:
        id, err = models.NewOperationSearch().SetBaseOperationType(constvar.BaseOperationTypeDisuse).MaxAutoIncr()
    default:
        util.ResponseFormat(c, cd.RequestError, "编码规则不存在")
        return
controllers/location_product_amount.go
@@ -12,6 +12,7 @@
    "wms/extend/code"
    "wms/extend/util"
    "wms/models"
    "wms/pkg/mysqlx"
    "wms/request"
    "wms/response"
    "wms/service"
@@ -67,7 +68,7 @@
    }
    var operation models.Operation
    for k, v := range records {
        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 res := mysqlx.GetDB().Table("wms_operation").InnerJoins("inner join wms_operation_details on wms_operation_details.operation_id=wms_operation.id").Where("wms_operation.base_operation_type=? and wms_operation.status=? and wms_operation.to_location_id=? and wms_operation_details.product_id=?", constvar.BaseOperationTypeAdjust, constvar.OperationStatus_Ready, v.LocationId, v.ProductId).First(&operation); res.Error != nil {
            if errors.Is(res.Error, gorm.ErrRecordNotFound) {
                records[k].Status = constvar.OperationStatus_Finish
                records[k].BaseOperationType = constvar.BaseOperationTypeAdjust
controllers/operation.go
@@ -8,27 +8,28 @@
    "github.com/gin-gonic/gin"
    "github.com/shopspring/decimal"
    "github.com/xuri/excelize/v2"
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
    "gorm.io/gorm"
    "os"
    "sort"
    "strconv"
    "strings"
    "time"
    "wms/conf"
    "wms/constvar"
    "wms/extend/code"
    "wms/extend/util"
    "wms/models"
    "wms/opa"
    "wms/pkg/logx"
    "wms/pkg/mysqlx"
    "wms/pkg/structx"
    "wms/proto/client"
    "wms/proto/init_client"
    "wms/proto/inventory_order"
    "wms/proto/product_inventory"
    "wms/proto/purchase_wms"
    "wms/proto/supplier"
    "wms/request"
    "wms/response"
    "wms/service"
    "wms/utils/http"
    "wms/utils/upload"
@@ -76,8 +77,19 @@
    }
    params.Status = constvar.OperationStatus_Ready
    params.Number = strconv.FormatInt(time.Now().Unix(), 10)
    //params.Number = strconv.FormatInt(time.Now().Unix(), 10)
    params.BaseOperationType = operationType.BaseOperationType
    var numberNum int64
    if err := mysqlx.GetDB().Model(&models.Operation{}).Where("number=?", params.Number).Count(&numberNum).Error; err != nil {
        util.ResponseFormat(c, code.RequestParamError, err.Error())
        return
    }
    if numberNum > 0 {
        util.ResponseFormat(c, code.RequestParamError, "单号已存在")
        return
    }
    if err := models.NewOperationSearch().Create(&params); err != nil {
        logx.Errorf("Operation create err: %v", err)
        util.ResponseFormat(c, code.SaveFail, "添加失败:"+err.Error())
@@ -142,6 +154,10 @@
func (slf OperationController) CheckParams(params models.Operation) error {
    if params.SourceNumber == "" {
        return errors.New("请填入源单号")
    }
    if params.Number == "" {
        return errors.New("请填入单号")
    }
    if params.OperationTypeId == 0 && int(params.BaseOperationType) == 0 {
@@ -363,7 +379,7 @@
        util.ResponseFormat(c, code.RequestError, "该出入库信息无法完成")
        return
    }
    if err := models.WithTransaction(func(tx *gorm.DB) error {
    err = models.WithTransaction(func(tx *gorm.DB) error {
        if err := models.NewOperationSearch().SetOrm(tx).SetID(id).Update(&models.Operation{Status: constvar.OperationStatus_Finish, AuditDate: time.Now().Format("2006-01-02 15:04:05")}); err != nil {
            return err
@@ -523,8 +539,8 @@
                    return err
                }
            }
            if operation.SourceNumber != "" {
                go UpdatePurchaseStatus(operation.SourceNumber)
            if operation.Source != "" {
                go UpdatePurchaseStatus(operation.Source, operation.SourceNumber)
            }
        }
@@ -556,10 +572,13 @@
                }
                locAmount, res := models.NewLocationProductAmountSearch().
                    SetProductId(v.ID).
                    SetLocationId(operation.ToLocationID).
                    SetLocationId(operation.FromLocationID).
                    FirstRes()
                if res.Error != nil {
                    return err
                    if res.Error == gorm.ErrRecordNotFound {
                        return errors.New("当前仓库没有该产品,请先入库")
                    }
                    return res.Error
                }
                if locAmount.Amount.LessThan(value) {
                    return errors.New(fmt.Sprintf("产品:%v,库存:%v,出库:%v,数量不够,无法完成出库操作", v.Name, v.Amount.String(), value.String()))
@@ -569,8 +588,8 @@
                    return err
                }
            }
            if operation.SourceNumber != "" {
                go UpdateSalesDetailStatus(operation.SourceNumber)
            if operation.Source != "" {
                go UpdateOutStatus(operation.Source, operation.Number, 4)
            }
        }
@@ -723,7 +742,8 @@
            }
        }
        return nil
    }); err != nil {
    })
    if err != nil {
        util.ResponseFormat(c, code.RequestError, err.Error())
        return
    }
@@ -765,50 +785,64 @@
    return nil
}
var (
    ProductInventoryServiceConn *grpc.ClientConn
    PurchaseServiceConn         *grpc.ClientConn
)
//var (
//    ProductInventoryServiceConn *grpc.ClientConn
//    PurchaseServiceConn         *grpc.ClientConn
//)
//
//func InitProductInventoryServiceConn() {
//    var err error
//    ProductInventoryServiceConn, err = grpc.Dial(conf.GrpcServerConf.CrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
//    if err != nil {
//        logx.Errorf("grpc dial product service error: %v", err.Error())
//        return
//    }
//    PurchaseServiceConn, err = grpc.Dial(conf.GrpcServerConf.SrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
//    if err != nil {
//        logx.Errorf("grpc dial product service error: %v", err.Error())
//        return
//    }
//}
//
//func CloseProductInventoryServiceConn() {
//    if ProductInventoryServiceConn != nil {
//        ProductInventoryServiceConn.Close()
//    }
//    if PurchaseServiceConn != nil {
//        PurchaseServiceConn.Close()
//    }
//}
func InitProductInventoryServiceConn() {
    var err error
    ProductInventoryServiceConn, err = grpc.Dial(conf.GrpcServerConf.CrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
func UpdateOutStatus(source, number string, status int64) {
    if source == "CRM" {
        cl := product_inventory.NewProductInventoryServiceClient(init_client.CrmConn)
        _, err := cl.UpdateSalesDetailStatus(context.Background(), &product_inventory.UpdateSalesDetailStatusRequest{
            Number:            number,
            SalesDetailStatus: "已出库",
        })
        if err != nil {
            logx.Errorf("grpc dial UpdateSalesDetailStatus service error: %v", err)
        }
    }
    PurchaseServiceConn, err = grpc.Dial(conf.GrpcServerConf.SrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    if source == "APS_APPLY_MATERIAL" {
        cl := inventory_order.NewInventoryOrderServiceClient(init_client.ApsConn)
        _, err := cl.UpdateMaterialApplyStatus(context.Background(), &inventory_order.UpdateMaterialApplyStatusRequest{
            Number: number,
            Status: status,
        })
        if err != nil {
            logx.Errorf("grpc dial UpdateSalesDetailStatus service error: %v", err)
        }
    }
}
func CloseProductInventoryServiceConn() {
    if ProductInventoryServiceConn != nil {
        ProductInventoryServiceConn.Close()
    }
    if PurchaseServiceConn != nil {
        PurchaseServiceConn.Close()
    }
}
func UpdateSalesDetailStatus(number string) {
    client := product_inventory.NewProductInventoryServiceClient(ProductInventoryServiceConn)
    _, err := client.UpdateSalesDetailStatus(context.Background(), &product_inventory.UpdateSalesDetailStatusRequest{
        Number:            number,
        SalesDetailStatus: "已出库",
    })
    if err != nil {
        logx.Errorf("grpc dial UpdateSalesDetailStatus service error: %v", err)
    }
}
func UpdatePurchaseStatus(number string) {
    client := purchase_wms.NewPurchaseServiceClient(PurchaseServiceConn)
    _, err := client.UpdatePurchaseStatus(context.Background(), &purchase_wms.UpdatePurchaseStatusRequest{Number: number})
    if err != nil {
        logx.Errorf("grpc dial UpdatePurchaseStatus service error: %v", err)
func UpdatePurchaseStatus(source, number string) {
    if source == "SRM_PURCHASE" {
        cl := purchase_wms.NewPurchaseServiceClient(init_client.SrmConn)
        _, err := cl.UpdatePurchaseStatus(context.Background(), &purchase_wms.UpdatePurchaseStatusRequest{Number: number})
        if err != nil {
            logx.Errorf("grpc dial UpdatePurchaseStatus service error: %v", err)
        }
    }
}
@@ -891,6 +925,10 @@
        util.ResponseFormat(c, code.SaveFail, err.Error())
        return
    }
    //更新aps物料申请状态
    if operation.Source == "APS_APPLY_MATERIAL" {
        go UpdateOutStatus(operation.Source, operation.Number, 3)
    }
    util.ResponseFormat(c, code.Success, "操作成功")
}
@@ -958,6 +996,7 @@
        return "", errors.New("读取excel模版失败:" + err.Error())
    }
    readerCloser.Close()
    defer f.Close()
    style, _ := f.NewStyle(&excelize.Style{
        Border: []excelize.Border{
@@ -1038,6 +1077,7 @@
        return "", errors.New("读取excel模版失败:" + err.Error())
    }
    readerCloser.Close()
    defer f.Close()
    style, _ := f.NewStyle(&excelize.Style{
        Border: []excelize.Border{
@@ -1108,7 +1148,7 @@
//
// @Router    /api-wms/v1/operation/getSupplierList [get]
func (slf OperationController) GetSupplierList(c *gin.Context) {
    cli := supplier.NewSupplierServiceClient(supplier.SupplierConn)
    cli := supplier.NewSupplierServiceClient(init_client.SrmConn)
    resp, err := cli.GetSupplierList(c, &supplier.SupplierListRequest{Status: 1})
    if err != nil {
        util.ResponseFormat(c, code.RequestParamError, "grpc调用失败:"+err.Error())
@@ -1126,7 +1166,7 @@
//
// @Router    /api-wms/v1/operation/getClientList [get]
func (slf OperationController) GetClientList(c *gin.Context) {
    cli := client.NewClientServiceClient(client.ClientConn)
    cli := client.NewClientServiceClient(init_client.CrmConn)
    resp, err := cli.GetClientList(c, &client.ClientListRequest{})
    if err != nil {
        util.ResponseFormat(c, code.RequestParamError, "grpc调用失败:"+err.Error())
@@ -1134,3 +1174,42 @@
    }
    util.ResponseFormat(c, code.Success, resp.List)
}
// ListByCondition
// @Tags      入库/出库
// @Summary   出入库明细
// @Produce   application/json
// @Param     object  body  request.OperationCondition true  "参数"
// @Success   200 {object} util.Response "成功"
// @Router    /api-wms/v1/operation/listByCondition [post]
func (slf OperationController) ListByCondition(c *gin.Context) {
    var params request.OperationCondition
    if err := c.BindJSON(&params); err != nil {
        util.ResponseFormat(c, code.RequestParamError, "参数解析失败,数据类型错误:"+err.Error())
        return
    }
    if !params.PageInfo.Check() {
        util.ResponseFormat(c, code.RequestParamError, "数据分页信息错误")
        return
    }
    db := mysqlx.GetDB().Table("wms_operation").Select("wms_operation.id as operation_id,wms_operation.number,wms_operation.base_operation_type,material.id AS product_id,material.`name` AS product_name,wms_operation_details.amount,material.unit,wms_operation.from_location_id,from_location.`name` AS from_location,wms_operation.to_location_id,to_location.`name` AS to_location,wms_operation.operation_date as date,wms_operation.`status`").InnerJoins("inner join wms_operation_details ON wms_operation_details.operation_id = wms_operation.id").InnerJoins("INNER JOIN material ON material.id = wms_operation_details.product_id").InnerJoins("INNER JOIN wms_location AS from_location ON from_location.id = wms_operation.from_location_id").InnerJoins("INNER JOIN wms_location AS to_location ON to_location.id = wms_operation.to_location_id")
    if params.Condition != "" {
        db = db.Where("wms_operation.number like ? or wms_operation.source_number like ? or from_location.`name` like ? or to_location.`name` like ?", "%"+params.Condition+"%", "%"+params.Condition+"%", "%"+params.Condition+"%", "%"+params.Condition+"%")
    }
    var (
        records = make([]*response.InventoryHistory, 0)
        total   int64
    )
    if err := db.Count(&total).Error; err != nil {
        util.ResponseFormat(c, code.RequestError, "查找失败:"+err.Error())
        return
    }
    if err := db.Offset((params.Page - 1) * params.PageSize).Limit(params.PageSize).Find(&records).Error; err != nil {
        util.ResponseFormat(c, code.RequestError, "查找失败:"+err.Error())
        return
    }
    util.ResponseFormatListWithPage(c, code.Success, records, int(total), params.Page, params.PageSize)
}
controllers/product_controller.go
@@ -14,6 +14,7 @@
    "wms/extend/util"
    "wms/models"
    "wms/pkg/logx"
    "wms/pkg/mysqlx"
    "wms/request"
)
@@ -447,12 +448,28 @@
        util.ResponseFormat(c, code.RequestParamError, "请输入源单据")
        return
    }
    if params.Number == "" {
        util.ResponseFormat(c, code.RequestParamError, "请输入单号")
        return
    }
    var numberNum int64
    if err := mysqlx.GetDB().Model(&models.Operation{}).Where("number=?", params.Number).Count(&numberNum).Error; err != nil {
        util.ResponseFormat(c, code.RequestParamError, err.Error())
        return
    }
    if numberNum > 0 {
        util.ResponseFormat(c, code.RequestParamError, "单号已存在")
        return
    }
    detail := &models.OperationDetails{
        ProductId: params.ProductId,
        Amount:    params.Amount,
    }
    operation := models.Operation{
        Number:            strconv.FormatInt(time.Now().Unix(), 10),
        //Number:            strconv.FormatInt(time.Now().Unix(), 10),
        Number:            params.Number,
        SourceNumber:      params.SourceNumber,
        OperationTypeId:   0,
        Status:            constvar.OperationStatus_Ready,
@@ -488,7 +505,7 @@
        return
    }
    db := models.NewOperationSearch().Orm.Table("wms_operation").Select("wms_operation.id,wms_operation.number,wms_operation.source_number,wms_operation.status,wms_operation.from_location_id,wms_operation.to_location_id,wms_operation.operation_date,wms_operation.contacter_id,wms_operation.contacter_name,wms_operation.company_id,wms_operation.company_name,wms_operation.comment,wms_operation_details.product_id,material.name as product_name,material.unit,wms_operation_details.amount").InnerJoins("inner join wms_operation_details on wms_operation_details.operation_id=wms_operation.id").InnerJoins("inner join material on material.id=wms_operation_details.product_id").Where("wms_operation.base_operation_type=?", constvar.BaseOperationTypeDisuse)
    db := models.NewOperationSearch().Orm.Table("wms_operation").Select("wms_operation.id,wms_operation.number,wms_operation.source_number,wms_operation.status,wms_operation.from_location_id,wms_operation.to_location_id,wms_operation.operation_date,wms_operation.contacter_id,wms_operation.contacter_name,wms_operation.company_id,wms_operation.company_name,wms_operation.comment,wms_operation_details.product_id,material.name as product_name,material.unit,wms_operation_details.amount,wms_operation.base_operation_type").InnerJoins("inner join wms_operation_details on wms_operation_details.operation_id=wms_operation.id").InnerJoins("inner join material on material.id=wms_operation_details.product_id").Where("wms_operation.base_operation_type=?", constvar.BaseOperationTypeDisuse)
    if params.Number != "" {
        db = db.Where("wms_operation.number like ? or wms_operation.source_number like ? or material.name like ?", fmt.Sprintf("%%%v%%", params.Number), fmt.Sprintf("%%%v%%", params.Number), fmt.Sprintf("%%%v%%", params.Number))
controllers/reorder_rule_controller.go
@@ -3,19 +3,16 @@
import (
    "github.com/gin-gonic/gin"
    "github.com/shopspring/decimal"
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
    "gorm.io/gorm"
    "strconv"
    "strings"
    "time"
    "wms/conf"
    "wms/constvar"
    "wms/extend/code"
    "wms/extend/util"
    "wms/models"
    "wms/pkg/logx"
    "wms/pkg/timex"
    "wms/proto/init_client"
    "wms/proto/inventory_order"
    "wms/proto/purchase_wms"
    "wms/request"
@@ -260,22 +257,22 @@
    util.ResponseFormat(c, code.Success, "更新成功")
}
var InventoryOrderServiceConn *grpc.ClientConn
func InitInventoryOrderServiceConn() {
    var err error
    InventoryOrderServiceConn, err = grpc.Dial(conf.GrpcServerConf.ApsAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
}
func CloseInventoryOrderServiceConn() {
    if InventoryOrderServiceConn != nil {
        InventoryOrderServiceConn.Close()
    }
}
//var InventoryOrderServiceConn *grpc.ClientConn
//
//func InitInventoryOrderServiceConn() {
//    var err error
//    InventoryOrderServiceConn, err = grpc.Dial(conf.GrpcServerConf.ApsAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
//    if err != nil {
//        logx.Errorf("grpc dial product service error: %v", err.Error())
//        return
//    }
//}
//
//func CloseInventoryOrderServiceConn() {
//    if InventoryOrderServiceConn != nil {
//        InventoryOrderServiceConn.Close()
//    }
//}
// OrderAgain
// @Tags      重订货规则
@@ -291,7 +288,7 @@
        return
    }
    if params.Route == "采购" {
        client := purchase_wms.NewPurchaseServiceClient(PurchaseServiceConn)
        client := purchase_wms.NewPurchaseServiceClient(init_client.SrmConn)
        resp, err := client.GetSupplierListByProductId(c, &purchase_wms.GetSupplierListByProductIdRequest{ProductId: params.ProductId})
        if err != nil {
            util.ResponseFormat(c, code.RequestParamError, "grpc调用失败")
@@ -300,7 +297,7 @@
        util.ResponseFormat(c, code.Success, resp.List)
        return
    }
    client := inventory_order.NewInventoryOrderServiceClient(InventoryOrderServiceConn)
    client := inventory_order.NewInventoryOrderServiceClient(init_client.ApsConn)
    order, err := client.CreateNewOrder(c, &inventory_order.CreateNewOrderRequest{
        OrderNumber: params.OrderNumber.IntPart(),
        Unit:        params.Unit,
@@ -368,7 +365,7 @@
// @Router    /api-wms/v1/reorderRule/submitOrder [post]
func (slf ReorderRuleController) SubmitOrder(c *gin.Context) {
    var params models.ReorderRule
    client := purchase_wms.NewPurchaseServiceClient(PurchaseServiceConn)
    client := purchase_wms.NewPurchaseServiceClient(init_client.SrmConn)
    resp, err := client.CreatePurchaseByWms(c, &purchase_wms.CreatePurchaseByWmsRequest{
        SupplierId: params.SupplierId,
        ProductId:  params.ProductId,
controllers/report_forms_controller.go
@@ -265,13 +265,23 @@
    }
    detailsSearch.Orm = detailsSearch.Orm.Model(&models.MoveHistory{}).
        Select("number, updated_at as date, product_name as product_name, from_location_id, operation_id," +
            "to_location_id, amount, unit, operator as contacted_name, base_operation_type, weight, product_id, from_location, to_location").Order("id desc")
        Select("number, updated_at as date, product_name as product_name, from_location_id, operation_id,to_location_id, amount, " +
            "unit, operator as contacted_name, base_operation_type, weight, product_id, from_location, to_location, operation_type_name").Order("id desc")
    if len(ids) > 0 {
        detailsSearch.Orm = detailsSearch.Orm.Where("id in ?", ids)
    }
    if params.BaseOperationType != 0 {
        detailsSearch.Orm = detailsSearch.Orm.Where("base_operation_type = ?", params.BaseOperationType)
    }
    var t int64
    err = detailsSearch.Orm.Count(&t).Error
    if err != nil {
        util.ResponseFormat(c, code.RequestParamError, fmt.Errorf("查询总条数失败: %v", err))
        return
    }
    total = uint64(t)
    if params.Page*params.PageSize > 0 {
        detailsSearch.Orm = detailsSearch.Orm.Offset((params.Page - 1) * params.PageSize).Limit(params.PageSize)
    }
    err = detailsSearch.Orm.Find(&result).Error
    if err != nil {
@@ -329,6 +339,7 @@
    for _, amount := range amounts {
        var resp response.LocationForms
        resp.Amount = amount.Amount
        resp.LocationId = amount.LocationId
        resp.LocationName = amount.Location.Name
        resp.ProduceId = amount.Product.ID
        resp.ProductName = amount.Product.Name
docs/docs.go
@@ -1227,6 +1227,36 @@
                }
            }
        },
        "/api-wms/v1/operation/listByCondition": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "出入库明细",
                "parameters": [
                    {
                        "description": "参数",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.OperationCondition"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/listTransfer": {
            "post": {
                "produces": [
@@ -2736,7 +2766,7 @@
                5
            ],
            "x-enum-comments": {
                "OperationStatus_Cancel": "完成",
                "OperationStatus_Cancel": "取消",
                "OperationStatus_Draft": "草稿",
                "OperationStatus_Finish": "完成",
                "OperationStatus_Ready": "就绪",
@@ -3371,6 +3401,9 @@
                "receiverPhone": {
                    "type": "string"
                },
                "source": {
                    "type": "string"
                },
                "sourceNumber": {
                    "description": "源单号",
                    "type": "string"
@@ -3674,6 +3707,10 @@
                },
                "fromLocationId": {
                    "type": "integer"
                },
                "number": {
                    "description": "Unit           string          ` + "`" + `json:\"unit\"` + "`" + `",
                    "type": "string"
                },
                "productId": {
                    "type": "string"
@@ -4157,6 +4194,22 @@
                },
                "sourceNumber": {
                    "type": "string"
                }
            }
        },
        "request.OperationCondition": {
            "type": "object",
            "properties": {
                "condition": {
                    "type": "string"
                },
                "page": {
                    "description": "页码",
                    "type": "integer"
                },
                "pageSize": {
                    "description": "每页大小",
                    "type": "integer"
                }
            }
        },
@@ -4659,6 +4712,10 @@
                "operationId": {
                    "type": "integer"
                },
                "operationTypeName": {
                    "description": "作业类型名称",
                    "type": "string"
                },
                "productId": {
                    "type": "string"
                },
@@ -4694,6 +4751,10 @@
                    "description": "数量",
                    "type": "number"
                },
                "locationId": {
                    "description": "位置id",
                    "type": "integer"
                },
                "locationName": {
                    "description": "位置名称",
                    "type": "string"
docs/swagger.json
@@ -1215,6 +1215,36 @@
                }
            }
        },
        "/api-wms/v1/operation/listByCondition": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "出入库明细",
                "parameters": [
                    {
                        "description": "参数",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.OperationCondition"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/listTransfer": {
            "post": {
                "produces": [
@@ -2724,7 +2754,7 @@
                5
            ],
            "x-enum-comments": {
                "OperationStatus_Cancel": "完成",
                "OperationStatus_Cancel": "取消",
                "OperationStatus_Draft": "草稿",
                "OperationStatus_Finish": "完成",
                "OperationStatus_Ready": "就绪",
@@ -3359,6 +3389,9 @@
                "receiverPhone": {
                    "type": "string"
                },
                "source": {
                    "type": "string"
                },
                "sourceNumber": {
                    "description": "源单号",
                    "type": "string"
@@ -3662,6 +3695,10 @@
                },
                "fromLocationId": {
                    "type": "integer"
                },
                "number": {
                    "description": "Unit           string          `json:\"unit\"`",
                    "type": "string"
                },
                "productId": {
                    "type": "string"
@@ -4145,6 +4182,22 @@
                },
                "sourceNumber": {
                    "type": "string"
                }
            }
        },
        "request.OperationCondition": {
            "type": "object",
            "properties": {
                "condition": {
                    "type": "string"
                },
                "page": {
                    "description": "页码",
                    "type": "integer"
                },
                "pageSize": {
                    "description": "每页大小",
                    "type": "integer"
                }
            }
        },
@@ -4647,6 +4700,10 @@
                "operationId": {
                    "type": "integer"
                },
                "operationTypeName": {
                    "description": "作业类型名称",
                    "type": "string"
                },
                "productId": {
                    "type": "string"
                },
@@ -4682,6 +4739,10 @@
                    "description": "数量",
                    "type": "number"
                },
                "locationId": {
                    "description": "位置id",
                    "type": "integer"
                },
                "locationName": {
                    "description": "位置名称",
                    "type": "string"
docs/swagger.yaml
@@ -180,7 +180,7 @@
    - 5
    type: integer
    x-enum-comments:
      OperationStatus_Cancel: 完成
      OperationStatus_Cancel: 取消
      OperationStatus_Draft: 草稿
      OperationStatus_Finish: 完成
      OperationStatus_Ready: 就绪
@@ -636,6 +636,8 @@
        type: string
      receiverPhone:
        type: string
      source:
        type: string
      sourceNumber:
        description: 源单号
        type: string
@@ -843,6 +845,9 @@
        type: number
      fromLocationId:
        type: integer
      number:
        description: Unit           string          `json:"unit"`
        type: string
      productId:
        type: string
      sourceNumber:
@@ -1176,6 +1181,17 @@
        type: integer
      sourceNumber:
        type: string
    type: object
  request.OperationCondition:
    properties:
      condition:
        type: string
      page:
        description: 页码
        type: integer
      pageSize:
        description: 每页大小
        type: integer
    type: object
  request.OperationDetails:
    properties:
@@ -1521,6 +1537,9 @@
        type: string
      operationId:
        type: integer
      operationTypeName:
        description: 作业类型名称
        type: string
      productId:
        type: string
      productName:
@@ -1546,6 +1565,9 @@
      amount:
        description: 数量
        type: number
      locationId:
        description: 位置id
        type: integer
      locationName:
        description: 位置名称
        type: string
@@ -2343,6 +2365,25 @@
      summary: 入库/出库列表
      tags:
      - 入库/出库
  /api-wms/v1/operation/listByCondition:
    post:
      parameters:
      - description: 参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.OperationCondition'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 出入库明细
      tags:
      - 入库/出库
  /api-wms/v1/operation/listTransfer:
    post:
      parameters:
main.go
@@ -11,14 +11,12 @@
    "syscall"
    "time"
    "wms/conf"
    "wms/controllers"
    "wms/models"
    "wms/pkg/logx"
    "wms/proto/client"
    "wms/proto/init_client"
    "wms/proto/inventory_order"
    "wms/proto/product_inventory"
    "wms/proto/purchase_wms"
    "wms/proto/supplier"
    "wms/router"
    "wms/service"
)
@@ -49,11 +47,12 @@
    }
    go shutdown(server)
    //启动grpc客户端
    go controllers.InitInventoryOrderServiceConn()
    go controllers.InitProductInventoryServiceConn()
    go controllers.InitCodeServiceConn()
    go supplier.InitConn()
    go client.InitConn()
    //go controllers.InitInventoryOrderServiceConn()
    //go controllers.InitProductInventoryServiceConn()
    //go controllers.InitCodeServiceConn()
    //go supplier.InitConn()
    //go client.InitConn()
    go init_client.InitClient()
    //启动grpc服务
    go func() {
        ln, err := net.Listen("tcp", ":"+conf.WebConf.GrpcPort)
@@ -90,11 +89,12 @@
    ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
    defer cancel()
    controllers.CloseInventoryOrderServiceConn()
    controllers.CloseProductInventoryServiceConn()
    controllers.CloseCodeServiceConn()
    supplier.CloseConn()
    client.CloseConn()
    //controllers.CloseInventoryOrderServiceConn()
    //controllers.CloseProductInventoryServiceConn()
    //controllers.CloseCodeServiceConn()
    //supplier.CloseConn()
    //client.CloseConn()
    init_client.CloseClient()
    // 关闭HTTP服务器
    if err := server.Shutdown(ctx); err != nil {
        logx.Infof("服务优雅退出失败: %v", err)
models/file_template_attachment.go
@@ -15,6 +15,7 @@
        Name         string                        `json:"name" gorm:"type:varchar(63);comment:模版名称"`
        AttachmentId uint                          `json:"attachmentId" gorm:"comment:附件表外键"`
        Attachment   Attachment                    `json:"attachment" gorm:"foreignKey:AttachmentId;references:Id"`
        TableInfo    string                        `json:"tableInfo" gorm:"type:varchar(31);comment:表名"`
    }
    FileTemplateAttachmentSearch struct {
        FileTemplateAttachment
models/operation.go
@@ -33,6 +33,7 @@
        WaybillNumber     string                   `json:"waybillNumber" gorm:"type:varchar(255);comment:运单号"`    //运单号
        Weight            decimal.Decimal          `gorm:"type:decimal(20,2);comment:重量" json:"weight"`           //重量
        LogisticWeight    decimal.Decimal          `gorm:"type:decimal(20,2);comment:物流重量" json:"logisticWeight"` //物流重量
        Source            string                   `json:"source" gorm:"type:varchar(255);comment:来源系统,用于返回修改状态"`
        Details           []*OperationDetails        `json:"details" gorm:"foreignKey:OperationID;references:Id"`
        BaseOperationType constvar.BaseOperationType `json:"baseOperationType" gorm:"type:tinyint;not null;comment:基础作业类型"` //基础作业类型
@@ -157,8 +158,7 @@
    }
    if slf.Preload {
        db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("FromLocation").
            Preload("ToLocation").Preload("LogisticCompany")
        db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("LogisticCompany").Preload("FromLocation").Preload("ToLocation")
    }
    if slf.Disuse {
@@ -337,3 +337,15 @@
    return records, nil
}
func (slf *OperationSearch) MaxAutoIncr() (int, error) {
    var (
        db    = slf.build()
        total int64
    )
    if err := db.Count(&total).Error; err != nil {
        return int(total), fmt.Errorf("max err: %v", err)
    }
    return int(total), nil
}
proto/client/client.go
@@ -1,27 +1,20 @@
package client
import (
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
    "wms/conf"
    "wms/pkg/logx"
)
var (
    ClientConn *grpc.ClientConn
)
func InitConn() {
    var err error
    ClientConn, err = grpc.Dial(conf.GrpcServerConf.CrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
}
func CloseConn() {
    if ClientConn != nil {
        ClientConn.Close()
    }
}
//var (
//    ClientConn *grpc.ClientConn
//)
//
//func InitConn() {
//    var err error
//    ClientConn, err = grpc.Dial(conf.GrpcServerConf.CrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
//    if err != nil {
//        logx.Errorf("grpc dial product service error: %v", err.Error())
//        return
//    }
//}
//
//func CloseConn() {
//    if ClientConn != nil {
//        ClientConn.Close()
//    }
//}
proto/init_client/init_client.go
New file
@@ -0,0 +1,45 @@
package init_client
import (
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
    "wms/conf"
    "wms/pkg/logx"
)
var (
    ApsConn *grpc.ClientConn
    CrmConn *grpc.ClientConn
    SrmConn *grpc.ClientConn
)
func InitClient() {
    var err error
    ApsConn, err = grpc.Dial(conf.GrpcServerConf.ApsAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
    CrmConn, err = grpc.Dial(conf.GrpcServerConf.CrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
    SrmConn, err = grpc.Dial(conf.GrpcServerConf.SrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
}
func CloseClient() {
    if ApsConn != nil {
        ApsConn.Close()
    }
    if CrmConn != nil {
        CrmConn.Close()
    }
    if SrmConn != nil {
        SrmConn.Close()
    }
}
proto/inventory_order.proto
@@ -5,6 +5,8 @@
service inventoryOrderService {
  rpc CreateNewOrder(CreateNewOrderRequest) returns(CreateNewOrderResponse) {}
  rpc CreateOperationList(CreateOperationListRequest) returns(CreateOperationListResponse) {}
  rpc UpdateMaterialApplyStatus(UpdateMaterialApplyStatusRequest) returns(UpdateMaterialApplyStatusResponse) {}
  rpc GetWarehouseInfo(GetWarehouseInfoRequest) returns(GetWarehouseInfoResponse) {}
}
message CreateNewOrderRequest{
@@ -34,9 +36,39 @@
message CreateOperationListRequest{
  int64 OperationType = 1;
  repeated OperationList List = 2;
  string Source = 2;
  repeated OperationList List = 3;
}
message OperationResponse{
  string WorkOrderId = 1;
  string Number = 2;
}
message CreateOperationListResponse{
  repeated OperationResponse List = 1;
}
//--------------------------------------------------UpdateMaterialApplyStatus-----------------------------------
message UpdateMaterialApplyStatusRequest{
  string Number = 1;
  int64 Status = 2;
}
message UpdateMaterialApplyStatusResponse{
}
//-------------------------------------------------GetWarehouseInfo-----------------------------------------
message GetWarehouseInfoRequest{
}
message WarehouseInfo{
  string Id = 1;//仓库id
  string Name = 2;//仓库名称
}
message GetWarehouseInfoResponse{
  repeated WarehouseInfo List = 1;
}
proto/inventory_order/inventory_order.pb.go
@@ -270,7 +270,8 @@
    unknownFields protoimpl.UnknownFields
    OperationType int64            `protobuf:"varint,1,opt,name=OperationType,proto3" json:"OperationType,omitempty"`
    List          []*OperationList `protobuf:"bytes,2,rep,name=List,proto3" json:"List,omitempty"`
    Source        string           `protobuf:"bytes,2,opt,name=Source,proto3" json:"Source,omitempty"`
    List          []*OperationList `protobuf:"bytes,3,rep,name=List,proto3" json:"List,omitempty"`
}
func (x *CreateOperationListRequest) Reset() {
@@ -312,6 +313,13 @@
    return 0
}
func (x *CreateOperationListRequest) GetSource() string {
    if x != nil {
        return x.Source
    }
    return ""
}
func (x *CreateOperationListRequest) GetList() []*OperationList {
    if x != nil {
        return x.List
@@ -319,16 +327,73 @@
    return nil
}
type OperationResponse struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    WorkOrderId string `protobuf:"bytes,1,opt,name=WorkOrderId,proto3" json:"WorkOrderId,omitempty"`
    Number      string `protobuf:"bytes,2,opt,name=Number,proto3" json:"Number,omitempty"`
}
func (x *OperationResponse) Reset() {
    *x = OperationResponse{}
    if protoimpl.UnsafeEnabled {
        mi := &file_inventory_order_proto_msgTypes[5]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *OperationResponse) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*OperationResponse) ProtoMessage() {}
func (x *OperationResponse) ProtoReflect() protoreflect.Message {
    mi := &file_inventory_order_proto_msgTypes[5]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use OperationResponse.ProtoReflect.Descriptor instead.
func (*OperationResponse) Descriptor() ([]byte, []int) {
    return file_inventory_order_proto_rawDescGZIP(), []int{5}
}
func (x *OperationResponse) GetWorkOrderId() string {
    if x != nil {
        return x.WorkOrderId
    }
    return ""
}
func (x *OperationResponse) GetNumber() string {
    if x != nil {
        return x.Number
    }
    return ""
}
type CreateOperationListResponse struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    List []*OperationResponse `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"`
}
func (x *CreateOperationListResponse) Reset() {
    *x = CreateOperationListResponse{}
    if protoimpl.UnsafeEnabled {
        mi := &file_inventory_order_proto_msgTypes[5]
        mi := &file_inventory_order_proto_msgTypes[6]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
@@ -341,7 +406,7 @@
func (*CreateOperationListResponse) ProtoMessage() {}
func (x *CreateOperationListResponse) ProtoReflect() protoreflect.Message {
    mi := &file_inventory_order_proto_msgTypes[5]
    mi := &file_inventory_order_proto_msgTypes[6]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
@@ -354,7 +419,247 @@
// Deprecated: Use CreateOperationListResponse.ProtoReflect.Descriptor instead.
func (*CreateOperationListResponse) Descriptor() ([]byte, []int) {
    return file_inventory_order_proto_rawDescGZIP(), []int{5}
    return file_inventory_order_proto_rawDescGZIP(), []int{6}
}
func (x *CreateOperationListResponse) GetList() []*OperationResponse {
    if x != nil {
        return x.List
    }
    return nil
}
type UpdateMaterialApplyStatusRequest struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    Number string `protobuf:"bytes,1,opt,name=Number,proto3" json:"Number,omitempty"`
    Status int64  `protobuf:"varint,2,opt,name=Status,proto3" json:"Status,omitempty"`
}
func (x *UpdateMaterialApplyStatusRequest) Reset() {
    *x = UpdateMaterialApplyStatusRequest{}
    if protoimpl.UnsafeEnabled {
        mi := &file_inventory_order_proto_msgTypes[7]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *UpdateMaterialApplyStatusRequest) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*UpdateMaterialApplyStatusRequest) ProtoMessage() {}
func (x *UpdateMaterialApplyStatusRequest) ProtoReflect() protoreflect.Message {
    mi := &file_inventory_order_proto_msgTypes[7]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use UpdateMaterialApplyStatusRequest.ProtoReflect.Descriptor instead.
func (*UpdateMaterialApplyStatusRequest) Descriptor() ([]byte, []int) {
    return file_inventory_order_proto_rawDescGZIP(), []int{7}
}
func (x *UpdateMaterialApplyStatusRequest) GetNumber() string {
    if x != nil {
        return x.Number
    }
    return ""
}
func (x *UpdateMaterialApplyStatusRequest) GetStatus() int64 {
    if x != nil {
        return x.Status
    }
    return 0
}
type UpdateMaterialApplyStatusResponse struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
}
func (x *UpdateMaterialApplyStatusResponse) Reset() {
    *x = UpdateMaterialApplyStatusResponse{}
    if protoimpl.UnsafeEnabled {
        mi := &file_inventory_order_proto_msgTypes[8]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *UpdateMaterialApplyStatusResponse) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*UpdateMaterialApplyStatusResponse) ProtoMessage() {}
func (x *UpdateMaterialApplyStatusResponse) ProtoReflect() protoreflect.Message {
    mi := &file_inventory_order_proto_msgTypes[8]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use UpdateMaterialApplyStatusResponse.ProtoReflect.Descriptor instead.
func (*UpdateMaterialApplyStatusResponse) Descriptor() ([]byte, []int) {
    return file_inventory_order_proto_rawDescGZIP(), []int{8}
}
type GetWarehouseInfoRequest struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
}
func (x *GetWarehouseInfoRequest) Reset() {
    *x = GetWarehouseInfoRequest{}
    if protoimpl.UnsafeEnabled {
        mi := &file_inventory_order_proto_msgTypes[9]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *GetWarehouseInfoRequest) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*GetWarehouseInfoRequest) ProtoMessage() {}
func (x *GetWarehouseInfoRequest) ProtoReflect() protoreflect.Message {
    mi := &file_inventory_order_proto_msgTypes[9]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use GetWarehouseInfoRequest.ProtoReflect.Descriptor instead.
func (*GetWarehouseInfoRequest) Descriptor() ([]byte, []int) {
    return file_inventory_order_proto_rawDescGZIP(), []int{9}
}
type WarehouseInfo struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    Id   string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`     //仓库id
    Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` //仓库名称
}
func (x *WarehouseInfo) Reset() {
    *x = WarehouseInfo{}
    if protoimpl.UnsafeEnabled {
        mi := &file_inventory_order_proto_msgTypes[10]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *WarehouseInfo) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*WarehouseInfo) ProtoMessage() {}
func (x *WarehouseInfo) ProtoReflect() protoreflect.Message {
    mi := &file_inventory_order_proto_msgTypes[10]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use WarehouseInfo.ProtoReflect.Descriptor instead.
func (*WarehouseInfo) Descriptor() ([]byte, []int) {
    return file_inventory_order_proto_rawDescGZIP(), []int{10}
}
func (x *WarehouseInfo) GetId() string {
    if x != nil {
        return x.Id
    }
    return ""
}
func (x *WarehouseInfo) GetName() string {
    if x != nil {
        return x.Name
    }
    return ""
}
type GetWarehouseInfoResponse struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    List []*WarehouseInfo `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"`
}
func (x *GetWarehouseInfoResponse) Reset() {
    *x = GetWarehouseInfoResponse{}
    if protoimpl.UnsafeEnabled {
        mi := &file_inventory_order_proto_msgTypes[11]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *GetWarehouseInfoResponse) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*GetWarehouseInfoResponse) ProtoMessage() {}
func (x *GetWarehouseInfoResponse) ProtoReflect() protoreflect.Message {
    mi := &file_inventory_order_proto_msgTypes[11]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use GetWarehouseInfoResponse.ProtoReflect.Descriptor instead.
func (*GetWarehouseInfoResponse) Descriptor() ([]byte, []int) {
    return file_inventory_order_proto_rawDescGZIP(), []int{11}
}
func (x *GetWarehouseInfoResponse) GetList() []*WarehouseInfo {
    if x != nil {
        return x.List
    }
    return nil
}
var File_inventory_order_proto protoreflect.FileDescriptor
@@ -387,28 +692,65 @@
    0x65, 0x72, 0x12, 0x2d, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x18, 0x02,
    0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
    0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
    0x73, 0x22, 0x66, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61,
    0x73, 0x22, 0x7e, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61,
    0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
    0x24, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
    0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
    0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20,
    0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c,
    0x69, 0x73, 0x74, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x72, 0x65,
    0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74,
    0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb0, 0x01, 0x0a, 0x15, 0x69, 0x6e, 0x76,
    0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
    0x63, 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f,
    0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77,
    0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x43,
    0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73,
    0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74,
    0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b,
    0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
    0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72,
    0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
    0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x13, 0x5a, 0x11, 0x2e,
    0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72,
    0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
    0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
    0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a,
    0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x4f, 0x70,
    0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x4c, 0x69, 0x73,
    0x74, 0x22, 0x4d, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
    0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x6b, 0x4f, 0x72,
    0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x57, 0x6f, 0x72,
    0x6b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62,
    0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
    0x22, 0x45, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
    0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
    0x26, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
    0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
    0x65, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74,
    0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74,
    0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e,
    0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d,
    0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20,
    0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x55,
    0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70,
    0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
    0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65,
    0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x0d, 0x57,
    0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02,
    0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
    0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65,
    0x22, 0x3e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65,
    0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04,
    0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x57, 0x61, 0x72,
    0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74,
    0x32, 0xe1, 0x02, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x72,
    0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x43, 0x72,
    0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43,
    0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,
    0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77,
    0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
    0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
    0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
    0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
    0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72,
    0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
    0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74,
    0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
    0x12, 0x21, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61,
    0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75,
    0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65,
    0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
    0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74,
    0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e,
    0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f,
    0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72,
    0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
    0x73, 0x65, 0x22, 0x00, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74,
    0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
    0x33,
}
var (
@@ -423,27 +765,39 @@
    return file_inventory_order_proto_rawDescData
}
var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_inventory_order_proto_goTypes = []interface{}{
    (*CreateNewOrderRequest)(nil),       // 0: CreateNewOrderRequest
    (*CreateNewOrderResponse)(nil),      // 1: CreateNewOrderResponse
    (*OperationProduct)(nil),            // 2: OperationProduct
    (*OperationList)(nil),               // 3: OperationList
    (*CreateOperationListRequest)(nil),  // 4: CreateOperationListRequest
    (*CreateOperationListResponse)(nil), // 5: CreateOperationListResponse
    (*CreateNewOrderRequest)(nil),             // 0: CreateNewOrderRequest
    (*CreateNewOrderResponse)(nil),            // 1: CreateNewOrderResponse
    (*OperationProduct)(nil),                  // 2: OperationProduct
    (*OperationList)(nil),                     // 3: OperationList
    (*CreateOperationListRequest)(nil),        // 4: CreateOperationListRequest
    (*OperationResponse)(nil),                 // 5: OperationResponse
    (*CreateOperationListResponse)(nil),       // 6: CreateOperationListResponse
    (*UpdateMaterialApplyStatusRequest)(nil),  // 7: UpdateMaterialApplyStatusRequest
    (*UpdateMaterialApplyStatusResponse)(nil), // 8: UpdateMaterialApplyStatusResponse
    (*GetWarehouseInfoRequest)(nil),           // 9: GetWarehouseInfoRequest
    (*WarehouseInfo)(nil),                     // 10: WarehouseInfo
    (*GetWarehouseInfoResponse)(nil),          // 11: GetWarehouseInfoResponse
}
var file_inventory_order_proto_depIdxs = []int32{
    2, // 0: OperationList.Products:type_name -> OperationProduct
    3, // 1: CreateOperationListRequest.List:type_name -> OperationList
    0, // 2: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest
    4, // 3: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest
    1, // 4: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse
    5, // 5: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse
    4, // [4:6] is the sub-list for method output_type
    2, // [2:4] is the sub-list for method input_type
    2, // [2:2] is the sub-list for extension type_name
    2, // [2:2] is the sub-list for extension extendee
    0, // [0:2] is the sub-list for field type_name
    2,  // 0: OperationList.Products:type_name -> OperationProduct
    3,  // 1: CreateOperationListRequest.List:type_name -> OperationList
    5,  // 2: CreateOperationListResponse.List:type_name -> OperationResponse
    10, // 3: GetWarehouseInfoResponse.List:type_name -> WarehouseInfo
    0,  // 4: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest
    4,  // 5: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest
    7,  // 6: inventoryOrderService.UpdateMaterialApplyStatus:input_type -> UpdateMaterialApplyStatusRequest
    9,  // 7: inventoryOrderService.GetWarehouseInfo:input_type -> GetWarehouseInfoRequest
    1,  // 8: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse
    6,  // 9: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse
    8,  // 10: inventoryOrderService.UpdateMaterialApplyStatus:output_type -> UpdateMaterialApplyStatusResponse
    11, // 11: inventoryOrderService.GetWarehouseInfo:output_type -> GetWarehouseInfoResponse
    8,  // [8:12] is the sub-list for method output_type
    4,  // [4:8] is the sub-list for method input_type
    4,  // [4:4] is the sub-list for extension type_name
    4,  // [4:4] is the sub-list for extension extendee
    0,  // [0:4] is the sub-list for field type_name
}
func init() { file_inventory_order_proto_init() }
@@ -513,7 +867,79 @@
            }
        }
        file_inventory_order_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*OperationResponse); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_inventory_order_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*CreateOperationListResponse); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_inventory_order_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*UpdateMaterialApplyStatusRequest); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_inventory_order_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*UpdateMaterialApplyStatusResponse); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_inventory_order_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*GetWarehouseInfoRequest); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_inventory_order_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*WarehouseInfo); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_inventory_order_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*GetWarehouseInfoResponse); i {
            case 0:
                return &v.state
            case 1:
@@ -531,7 +957,7 @@
            GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
            RawDescriptor: file_inventory_order_proto_rawDesc,
            NumEnums:      0,
            NumMessages:   6,
            NumMessages:   12,
            NumExtensions: 0,
            NumServices:   1,
        },
proto/inventory_order/inventory_order_grpc.pb.go
@@ -20,6 +20,8 @@
type InventoryOrderServiceClient interface {
    CreateNewOrder(ctx context.Context, in *CreateNewOrderRequest, opts ...grpc.CallOption) (*CreateNewOrderResponse, error)
    CreateOperationList(ctx context.Context, in *CreateOperationListRequest, opts ...grpc.CallOption) (*CreateOperationListResponse, error)
    UpdateMaterialApplyStatus(ctx context.Context, in *UpdateMaterialApplyStatusRequest, opts ...grpc.CallOption) (*UpdateMaterialApplyStatusResponse, error)
    GetWarehouseInfo(ctx context.Context, in *GetWarehouseInfoRequest, opts ...grpc.CallOption) (*GetWarehouseInfoResponse, error)
}
type inventoryOrderServiceClient struct {
@@ -48,12 +50,32 @@
    return out, nil
}
func (c *inventoryOrderServiceClient) UpdateMaterialApplyStatus(ctx context.Context, in *UpdateMaterialApplyStatusRequest, opts ...grpc.CallOption) (*UpdateMaterialApplyStatusResponse, error) {
    out := new(UpdateMaterialApplyStatusResponse)
    err := c.cc.Invoke(ctx, "/inventoryOrderService/UpdateMaterialApplyStatus", in, out, opts...)
    if err != nil {
        return nil, err
    }
    return out, nil
}
func (c *inventoryOrderServiceClient) GetWarehouseInfo(ctx context.Context, in *GetWarehouseInfoRequest, opts ...grpc.CallOption) (*GetWarehouseInfoResponse, error) {
    out := new(GetWarehouseInfoResponse)
    err := c.cc.Invoke(ctx, "/inventoryOrderService/GetWarehouseInfo", in, out, opts...)
    if err != nil {
        return nil, err
    }
    return out, nil
}
// InventoryOrderServiceServer is the server API for InventoryOrderService service.
// All implementations must embed UnimplementedInventoryOrderServiceServer
// for forward compatibility
type InventoryOrderServiceServer interface {
    CreateNewOrder(context.Context, *CreateNewOrderRequest) (*CreateNewOrderResponse, error)
    CreateOperationList(context.Context, *CreateOperationListRequest) (*CreateOperationListResponse, error)
    UpdateMaterialApplyStatus(context.Context, *UpdateMaterialApplyStatusRequest) (*UpdateMaterialApplyStatusResponse, error)
    GetWarehouseInfo(context.Context, *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error)
    mustEmbedUnimplementedInventoryOrderServiceServer()
}
@@ -66,6 +88,12 @@
}
func (UnimplementedInventoryOrderServiceServer) CreateOperationList(context.Context, *CreateOperationListRequest) (*CreateOperationListResponse, error) {
    return nil, status.Errorf(codes.Unimplemented, "method CreateOperationList not implemented")
}
func (UnimplementedInventoryOrderServiceServer) UpdateMaterialApplyStatus(context.Context, *UpdateMaterialApplyStatusRequest) (*UpdateMaterialApplyStatusResponse, error) {
    return nil, status.Errorf(codes.Unimplemented, "method UpdateMaterialApplyStatus not implemented")
}
func (UnimplementedInventoryOrderServiceServer) GetWarehouseInfo(context.Context, *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error) {
    return nil, status.Errorf(codes.Unimplemented, "method GetWarehouseInfo not implemented")
}
func (UnimplementedInventoryOrderServiceServer) mustEmbedUnimplementedInventoryOrderServiceServer() {}
@@ -116,6 +144,42 @@
    return interceptor(ctx, in, info, handler)
}
func _InventoryOrderService_UpdateMaterialApplyStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(UpdateMaterialApplyStatusRequest)
    if err := dec(in); err != nil {
        return nil, err
    }
    if interceptor == nil {
        return srv.(InventoryOrderServiceServer).UpdateMaterialApplyStatus(ctx, in)
    }
    info := &grpc.UnaryServerInfo{
        Server:     srv,
        FullMethod: "/inventoryOrderService/UpdateMaterialApplyStatus",
    }
    handler := func(ctx context.Context, req interface{}) (interface{}, error) {
        return srv.(InventoryOrderServiceServer).UpdateMaterialApplyStatus(ctx, req.(*UpdateMaterialApplyStatusRequest))
    }
    return interceptor(ctx, in, info, handler)
}
func _InventoryOrderService_GetWarehouseInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(GetWarehouseInfoRequest)
    if err := dec(in); err != nil {
        return nil, err
    }
    if interceptor == nil {
        return srv.(InventoryOrderServiceServer).GetWarehouseInfo(ctx, in)
    }
    info := &grpc.UnaryServerInfo{
        Server:     srv,
        FullMethod: "/inventoryOrderService/GetWarehouseInfo",
    }
    handler := func(ctx context.Context, req interface{}) (interface{}, error) {
        return srv.(InventoryOrderServiceServer).GetWarehouseInfo(ctx, req.(*GetWarehouseInfoRequest))
    }
    return interceptor(ctx, in, info, handler)
}
// InventoryOrderService_ServiceDesc is the grpc.ServiceDesc for InventoryOrderService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -131,6 +195,14 @@
            MethodName: "CreateOperationList",
            Handler:    _InventoryOrderService_CreateOperationList_Handler,
        },
        {
            MethodName: "UpdateMaterialApplyStatus",
            Handler:    _InventoryOrderService_UpdateMaterialApplyStatus_Handler,
        },
        {
            MethodName: "GetWarehouseInfo",
            Handler:    _InventoryOrderService_GetWarehouseInfo_Handler,
        },
    },
    Streams:  []grpc.StreamDesc{},
    Metadata: "inventory_order.proto",
proto/inventory_order/server.go
@@ -44,9 +44,11 @@
    if err != nil {
        return nil, err
    }
    operationResp := make([]*OperationResponse, 0)
    for _, list := range req.List {
        var operation models.Operation
        var details []*models.OperationDetails
        var or OperationResponse
        operation.SourceNumber = list.SourceNumber
        operation.OperationDate = timex.TimeToString2(time.Now())
        operation.Number = strconv.FormatInt(time.Now().Unix(), 10)
@@ -56,6 +58,10 @@
        operation.FromLocationID = fromLocation.Id
        operation.ToLocationID = toLocation.Id
        operation.BaseOperationType = constvar.BaseOperationTypeOutgoing
        operation.Source = req.Source
        or.WorkOrderId = operation.SourceNumber
        or.Number = operation.Number
        operationResp = append(operationResp, &or)
        if req.OperationType == 1 {
            operation.BaseOperationType = constvar.BaseOperationTypeIncoming
        }
@@ -70,5 +76,23 @@
    }
    err = models.NewOperationSearch().CreateBatch(operations)
    resp := new(CreateOperationListResponse)
    resp.List = operationResp
    return resp, err
}
func (s *Server) GetWarehouseInfo(ctx context.Context, req *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error) {
    warehouses, err := models.NewWarehouseSearch().FindNotTotal()
    if err != nil {
        return nil, err
    }
    list := make([]*WarehouseInfo, 0)
    for _, warehouse := range warehouses {
        var wi WarehouseInfo
        wi.Id = strconv.Itoa(warehouse.Id)
        wi.Name = warehouse.Name
        list = append(list, &wi)
    }
    resp := new(GetWarehouseInfoResponse)
    resp.List = list
    return resp, nil
}
proto/product_inventory.proto
@@ -14,7 +14,8 @@
  string Address = 3;//收货地址
  string Phone = 4;
  int32 DeliverType = 5;//交付类型
  repeated InventoryProduct ProductList = 6;
  string Source = 6;
  repeated InventoryProduct ProductList = 7;
}
message InventoryProduct{
proto/product_inventory/product_inventory.pb.go
@@ -30,7 +30,8 @@
    Address     string              `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"`     //收货地址
    Phone       string              `protobuf:"bytes,4,opt,name=Phone,proto3" json:"Phone,omitempty"`
    DeliverType int32               `protobuf:"varint,5,opt,name=DeliverType,proto3" json:"DeliverType,omitempty"` //交付类型
    ProductList []*InventoryProduct `protobuf:"bytes,6,rep,name=ProductList,proto3" json:"ProductList,omitempty"`
    Source      string              `protobuf:"bytes,6,opt,name=Source,proto3" json:"Source,omitempty"`
    ProductList []*InventoryProduct `protobuf:"bytes,7,rep,name=ProductList,proto3" json:"ProductList,omitempty"`
}
func (x *CreateOperationRequest) Reset() {
@@ -98,6 +99,13 @@
        return x.DeliverType
    }
    return 0
}
func (x *CreateOperationRequest) GetSource() string {
    if x != nil {
        return x.Source
    }
    return ""
}
func (x *CreateOperationRequest) GetProductList() []*InventoryProduct {
@@ -576,7 +584,7 @@
var file_product_inventory_proto_rawDesc = []byte{
    0x0a, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74,
    0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x16, 0x43, 0x72,
    0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x16, 0x43, 0x72,
    0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
    0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01,
    0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09,
@@ -586,82 +594,83 @@
    0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65,
    0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
    0x0b, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x0b,
    0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28,
    0x0b, 0x32, 0x11, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f,
    0x64, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73,
    0x74, 0x22, 0x3a, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72,
    0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
    0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
    0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3f, 0x0a,
    0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
    0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65,
    0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03,
    0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x38,
    0x0a, 0x1e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72,
    0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
    0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
    0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xcd, 0x02, 0x0a, 0x0b, 0x50, 0x72, 0x6f,
    0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01,
    0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65,
    0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b,
    0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
    0x09, 0x52, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12,
    0x0a, 0x04, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x6e,
    0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x07, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07,
    0x43, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43,
    0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x57, 0x61, 0x79, 0x62, 0x69, 0x6c,
    0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x57, 0x61, 0x79, 0x62, 0x69, 0x6c, 0x6c,
    0x12, 0x1c, 0x0a, 0x09, 0x53, 0x61, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x61, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18,
    0x0a, 0x07, 0x56, 0x61, 0x6c, 0x6f, 0x72, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,
    0x07, 0x56, 0x61, 0x6c, 0x6f, 0x72, 0x65, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x61, 0x72, 0x65,
    0x68, 0x6f, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x57, 0x61, 0x72,
    0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
    0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28,
    0x0a, 0x0f, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65,
    0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
    0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x77, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x49,
    0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49,
    0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43,
    0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12,
    0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73,
    0x67, 0x12, 0x2e, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74,
    0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
    0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73,
    0x74, 0x22, 0x66, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73,
    0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75,
    0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x53,
    0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
    0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74,
    0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x47, 0x0a, 0x1f, 0x55, 0x70, 0x64,
    0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74,
    0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04,
    0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65,
    0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d,
    0x73, 0x67, 0x32, 0xa1, 0x02, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e,
    0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46,
    0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
    0x6e, 0x12, 0x17, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
    0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x43, 0x72, 0x65,
    0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
    0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76,
    0x0b, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06,
    0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x6f,
    0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c,
    0x69, 0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x49, 0x6e, 0x76, 0x65,
    0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x50, 0x72,
    0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x10, 0x49, 0x6e, 0x76,
    0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a,
    0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a,
    0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41,
    0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3f, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
    0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
    0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
    0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
    0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x38, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76,
    0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66,
    0x6f, 0x12, 0x1f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
    0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
    0x73, 0x74, 0x1a, 0x20, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72,
    0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
    0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
    0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62,
    0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
    0x22, 0xcd, 0x02, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f,
    0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64,
    0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
    0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x6f,
    0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72,
    0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x04,
    0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x6e,
    0x76, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x49, 0x6e, 0x76,
    0x6f, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x18,
    0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x12, 0x18,
    0x0a, 0x07, 0x57, 0x61, 0x79, 0x62, 0x69, 0x6c, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
    0x07, 0x57, 0x61, 0x79, 0x62, 0x69, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x61, 0x6c, 0x65,
    0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x61, 0x6c,
    0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x61, 0x6c, 0x6f, 0x72, 0x65,
    0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x56, 0x61, 0x6c, 0x6f, 0x72, 0x65, 0x6d,
    0x12, 0x1c, 0x0a, 0x09, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x09, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x12, 0x16,
    0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
    0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61,
    0x62, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52,
    0x0f, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
    0x22, 0x77, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
    0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
    0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
    0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02,
    0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x2e, 0x0a, 0x0b, 0x50, 0x72, 0x6f,
    0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c,
    0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x50, 0x72,
    0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x1e, 0x55, 0x70, 0x64,
    0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74,
    0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e,
    0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d,
    0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61,
    0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11,
    0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75,
    0x73, 0x12, 0x1f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44,
    0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
    0x73, 0x74, 0x1a, 0x20, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73,
    0x73, 0x22, 0x47, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73,
    0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
    0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x15, 0x5a, 0x13, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x64,
    0x75, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70,
    0x72, 0x6f, 0x74, 0x6f, 0x33,
    0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
    0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18,
    0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x32, 0xa1, 0x02, 0x0a, 0x17, 0x70,
    0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x53,
    0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
    0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x43, 0x72, 0x65, 0x61,
    0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
    0x73, 0x74, 0x1a, 0x18, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61,
    0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e,
    0x0a, 0x17, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72,
    0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x47, 0x65, 0x74, 0x49,
    0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49,
    0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x47, 0x65, 0x74,
    0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
    0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e,
    0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74,
    0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x55, 0x70, 0x64, 0x61,
    0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61,
    0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x55, 0x70, 0x64,
    0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x74,
    0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x15,
    0x5a, 0x13, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x76, 0x65,
    0x6e, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
proto/product_inventory/server.go
@@ -170,6 +170,7 @@
    operation.ReceiverName = req.Addressee
    operation.ReceiverPhone = req.Phone
    operation.ReceiverAddr = req.Address
    operation.Source = req.Source
    if req.DeliverType == 1 {
        for _, product := range req.ProductList {
            var detail models.OperationDetails
@@ -187,7 +188,6 @@
            detail.ProductId = product.Id
            amount, _ := decimal.NewFromString(product.Amount)
            detail.Amount = amount
            details = append(details, &detail)
            newOperation.Details = append(newOperation.Details, &detail)
            operations = append(operations, &newOperation)
        }
proto/purchase_wms.proto
@@ -20,7 +20,8 @@
message PurchaseToWmsRequest {
  string Number = 1; //采购编号
  string SupplierName = 2; //供应商
  repeated PurchaseProduct Product = 3;
  string Source = 3;//来源
  repeated PurchaseProduct Product = 4;
}
message PurchaseToWmsResponse {
proto/purchase_wms/purchase_wms.pb.go
@@ -82,7 +82,8 @@
    Number       string             `protobuf:"bytes,1,opt,name=Number,proto3" json:"Number,omitempty"`             //采购编号
    SupplierName string             `protobuf:"bytes,2,opt,name=SupplierName,proto3" json:"SupplierName,omitempty"` //供应商
    Product      []*PurchaseProduct `protobuf:"bytes,3,rep,name=Product,proto3" json:"Product,omitempty"`
    Source       string             `protobuf:"bytes,3,opt,name=Source,proto3" json:"Source,omitempty"`             //来源
    Product      []*PurchaseProduct `protobuf:"bytes,4,rep,name=Product,proto3" json:"Product,omitempty"`
}
func (x *PurchaseToWmsRequest) Reset() {
@@ -127,6 +128,13 @@
func (x *PurchaseToWmsRequest) GetSupplierName() string {
    if x != nil {
        return x.SupplierName
    }
    return ""
}
func (x *PurchaseToWmsRequest) GetSource() string {
    if x != nil {
        return x.Source
    }
    return ""
}
@@ -791,111 +799,112 @@
    0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e,
    0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22,
    0x7e, 0x0a, 0x14, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73,
    0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65,
    0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12,
    0x22, 0x0a, 0x0c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18,
    0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4e,
    0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x03,
    0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x50,
    0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22,
    0x63, 0x0a, 0x15, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73,
    0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
    0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07,
    0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
    0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f,
    0x75, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x57, 0x61, 0x72, 0x65, 0x68,
    0x6f, 0x75, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75,
    0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75,
    0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x44, 0x0a, 0x1c, 0x55,
    0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61,
    0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43,
    0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12,
    0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73,
    0x67, 0x22, 0x41, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72,
    0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x52,
    0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
    0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75,
    0x63, 0x74, 0x49, 0x64, 0x22, 0x78, 0x0a, 0x0c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72,
    0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72,
    0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69,
    0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72,
    0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70,
    0x6c, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x75, 0x72, 0x63,
    0x68, 0x61, 0x73, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52,
    0x0d, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x6d,
    0x0a, 0x22, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73,
    0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70,
    0x96, 0x01, 0x0a, 0x14, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d,
    0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62,
    0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
    0x12, 0x22, 0x0a, 0x0c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
    0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72,
    0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03,
    0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07,
    0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
    0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52,
    0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0x63, 0x0a, 0x15, 0x50, 0x75, 0x72, 0x63,
    0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
    0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
    0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
    0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
    0x1c, 0x0a, 0x09, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01,
    0x28, 0x09, 0x52, 0x09, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x22, 0x35, 0x0a,
    0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53,
    0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
    0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75,
    0x6d, 0x62, 0x65, 0x72, 0x22, 0x44, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75,
    0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
    0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
    0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18,
    0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x04, 0x4c, 0x69,
    0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6c,
    0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x8a, 0x01,
    0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65,
    0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a,
    0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
    0x52, 0x0a, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
    0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
    0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d,
    0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75,
    0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01,
    0x28, 0x09, 0x52, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x1b, 0x43, 0x72,
    0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d,
    0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64,
    0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a,
    0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12,
    0x26, 0x0a, 0x0e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65,
    0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73,
    0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x42, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x75,
    0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
    0x74, 0x12, 0x28, 0x0a, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d,
    0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x50, 0x75, 0x72, 0x63,
    0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x0c,
    0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x0e,
    0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01,
    0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x75,
    0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65,
    0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x72, 0x63,
    0x68, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x70, 0x70,
    0x6c, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
    0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06,
    0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d,
    0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05,
    0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3e, 0x0a, 0x17,
    0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
    0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73,
    0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73,
    0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x32, 0xad, 0x03, 0x0a,
    0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
    0x12, 0x3e, 0x0a, 0x0d, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d,
    0x73, 0x12, 0x15, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d,
    0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68,
    0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
    0x12, 0x55, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61,
    0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
    0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
    0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50,
    0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
    0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x75,
    0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x41, 0x0a, 0x21, 0x47, 0x65,
    0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50,
    0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
    0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
    0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x78, 0x0a,
    0x0c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a,
    0x0a, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
    0x03, 0x52, 0x0a, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a,
    0x0c, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d,
    0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x50, 0x72, 0x69,
    0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61,
    0x73, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x6d, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x53, 0x75,
    0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64,
    0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c,
    0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
    0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x47, 0x65, 0x74, 0x53,
    0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f,
    0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
    0x12, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61,
    0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
    0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71,
    0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72,
    0x75, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
    0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64,
    0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
    0x4d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28,
    0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74,
    0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x8a, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74,
    0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65,
    0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65,
    0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x53, 0x75, 0x70, 0x70, 0x6c,
    0x69, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
    0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
    0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20,
    0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x53,
    0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x6f, 0x75,
    0x72, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72,
    0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
    0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68,
    0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72,
    0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
    0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e,
    0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e,
    0x2e, 0x2f, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x5f, 0x77, 0x6d, 0x73, 0x62, 0x06,
    0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
    0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
    0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x50, 0x75, 0x72, 0x63,
    0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
    0x52, 0x0e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
    0x22, 0x42, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49,
    0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x50, 0x75,
    0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
    0x03, 0x28, 0x09, 0x52, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d,
    0x62, 0x65, 0x72, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x0c, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73,
    0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73,
    0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70,
    0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a,
    0x0c, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d,
    0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d,
    0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65,
    0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
    0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a,
    0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73,
    0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63,
    0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
    0x12, 0x23, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
    0x0d, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05,
    0x49, 0x6e, 0x66, 0x6f, 0x73, 0x32, 0xad, 0x03, 0x0a, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61,
    0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x50, 0x75, 0x72,
    0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x50, 0x75, 0x72,
    0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
    0x74, 0x1a, 0x16, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d,
    0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x14, 0x55, 0x70, 0x64,
    0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
    0x73, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61,
    0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
    0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65,
    0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
    0x12, 0x67, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c,
    0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22,
    0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74,
    0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
    0x73, 0x74, 0x1a, 0x23, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72,
    0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x52,
    0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65,
    0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73,
    0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73,
    0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
    0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79,
    0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a,
    0x0f, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f,
    0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e,
    0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x50,
    0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
    0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x70, 0x75, 0x72, 0x63, 0x68,
    0x61, 0x73, 0x65, 0x5f, 0x77, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
proto/purchase_wms/server.go
@@ -23,6 +23,7 @@
    operation.Number = strconv.FormatInt(time.Now().Unix(), 10)
    operation.Status = constvar.OperationStatus_Ready
    operation.CompanyName = req.SupplierName
    operation.Source = req.Source
    warehouse, err := models.NewWarehouseSearch().First()
    if err != nil {
        return nil, err
proto/supplier/client.go
@@ -1,27 +1,27 @@
package supplier
import (
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
    "wms/conf"
    "wms/pkg/logx"
)
var (
    SupplierConn *grpc.ClientConn
)
func InitConn() {
    var err error
    SupplierConn, err = grpc.Dial(conf.GrpcServerConf.SrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
}
func CloseConn() {
    if SupplierConn != nil {
        SupplierConn.Close()
    }
}
//import (
//    "google.golang.org/grpc"
//    "google.golang.org/grpc/credentials/insecure"
//    "wms/conf"
//    "wms/pkg/logx"
//)
//
//var (
//    SupplierConn *grpc.ClientConn
//)
//
//func InitConn() {
//    var err error
//    SupplierConn, err = grpc.Dial(conf.GrpcServerConf.SrmAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
//    if err != nil {
//        logx.Errorf("grpc dial product service error: %v", err.Error())
//        return
//    }
//}
//
//func CloseConn() {
//    if SupplierConn != nil {
//        SupplierConn.Close()
//    }
//}
request/operation.go
@@ -77,3 +77,8 @@
    Number       string `json:"number"`
    SourceNumber string `json:"sourceNumber"`
}
type OperationCondition struct {
    PageInfo
    Condition string `json:"condition"`
}
request/product_request.go
@@ -24,6 +24,7 @@
    ToLocationId   int             `json:"toLocationId"`
    SourceNumber   string          `json:"sourceNumber"`
    //Unit           string          `json:"unit"`
    Number string `json:"number"`
}
type QueryDisuseList struct {
response/report_forms_response.go
@@ -34,10 +34,12 @@
    FromLocationId    int                        `json:"fromLocationId"`
    ToLocationId      int                        `json:"toLocationId"`
    OperationId       int                        `json:"operationId"`
    OperationTypeName string                     `json:"operationTypeName"` //作业类型名称
}
type LocationForms struct {
    ProduceId       string          `json:"produceId"`       //产品id
    LocationId      int             `json:"locationId"`      //位置id
    LocationName    string          `json:"locationName"`    //位置名称
    ProductName     string          `json:"productName"`     //产品名称
    ProductTypeName string          `json:"productTypeName"` //产品类别
router/router.go
@@ -92,6 +92,7 @@
        operationAPI.PUT("outputOperation/:id", operationController.OutputOperation)
        operationAPI.GET("getSupplierList", operationController.GetSupplierList)
        operationAPI.GET("getClientList", operationController.GetClientList)
        operationAPI.POST("listByCondition", operationController.ListByCondition)
    }
utils/upload/seaweed.go
@@ -3,7 +3,6 @@
import (
    "basic.com/fileserver/WeedFSClient.git"
    uuid "github.com/satori/go.uuid"
    "strconv"
    "time"
    "wms/conf"
    "wms/pkg/logx"
@@ -11,7 +10,7 @@
func UploadFileToSeaWeed(fileType, ext string, fileBytes []byte) (string, error) {
    //assignUrl := conf.WebConf.FileServer + "/dir/assign?collection=" + time.Now().Format("2006-01-02 15:04:05")[:10] + "-" + conf.WebConf.ServerId + "-" + fileType
    assignUrl := conf.WebConf.FileServer + "/dir/assign?collection=" + strconv.FormatInt(time.Now().Unix(), 10) + "-" + conf.WebConf.ServerId + "-" + fileType
    assignUrl := conf.WebConf.FileServer + "/dir/assign?collection=12345-" + conf.WebConf.ServerId + "-" + fileType
    picUrl, err := WeedFSClient.GetFid(assignUrl)
    if err != nil {