From d0175e436b5987511dfedb713abd19cba6093fab Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 26 四月 2024 17:27:40 +0800
Subject: [PATCH] Merge branch 'feat-outsourcing'
---
model/common/response/common.go | 13
proto/inventory_order.proto | 123 +
model/outsourcing/outsourcing_material_apply.go | 104
config.yaml | 2
docs/swagger.yaml | 396 +++
api/v1/purchase/purchase.go | 7
model/outsourcing/outsourcing_order.go | 294 ++
proto/inventory_order/inventory_order.pb.go | 1590 +++++++++++++
router/outsourcing/outsourcing.go | 28
model/outsourcing/outsourcing_order_delivery.go | 100
api/v1/outsourcing/outsourcing.go | 575 ++++
model/outsourcing/outsourcing_order_delivery_details.go | 165 +
model/outsourcing/outsourcing_order_product.go | 248 ++
proto/purchase_wms/purchase_wms.pb.go | 616 ++--
initialize/gorm.go | 7
model/dict.go | 272 ++
proto/common.proto | 13
api/v1/dict.go | 111
utils/structx/structx.go | 16
model/common.go | 30
proto/inventory_order/inventory_order_grpc.pb.go | 331 ++
proto/purchase_wms.proto | 12
docs/docs.go | 594 +++++
docs/swagger.json | 594 +++++
proto/common/common.pb.go | 154 +
model/outsourcing/outsourcing_enterprise.go | 280 ++
router/router.go | 15
constvar/const.go | 52
model/outsourcing/request/outsourcing.go | 111
utils/response.go | 82
utils/code/code.go | 38
initialize/router.go | 3
32 files changed, 6,616 insertions(+), 360 deletions(-)
diff --git a/api/v1/dict.go b/api/v1/dict.go
new file mode 100644
index 0000000..f967d2d
--- /dev/null
+++ b/api/v1/dict.go
@@ -0,0 +1,111 @@
+package v1
+
+import (
+ "github.com/gin-gonic/gin"
+ "gorm.io/gorm"
+ "srm/constvar"
+ "srm/model"
+ "srm/utils"
+ "srm/utils/code"
+)
+
+type DictController struct{}
+
+type MiniDict struct {
+ Name string `gorm:"type:varchar(191);not null;comment:鍚嶇О" json:"name"`
+ IsDefault bool `gorm:"type:tinyint(1);comment:鏄惁榛樿" json:"isDefault"`
+ Value string `gorm:"type:varchar(191);;comment:鍊�" json:"value"`
+}
+
+type SaveMiniDict struct {
+ Type constvar.MiniDictType `gorm:"type:int(11);comment:瀛楀吀绫诲瀷" json:"type"`
+ List []*MiniDict `json:"list"`
+}
+
+type GetMiniDictList struct {
+ Type constvar.MiniDictType `gorm:"type:int(11);comment:瀛楀吀绫诲瀷" json:"type"`
+}
+
+// SaveMiniDict
+// @Tags 鏁版嵁瀛楀吀
+// @Summary 鏇存柊杩蜂綘瀛楀吀
+// @Produce application/json
+// @Param object body SaveMiniDict true "鍙傛暟"
+// @Param Authorization header string true "token"
+// @Success 200 {object} utils.Response "鎴愬姛"
+// @Router /dict/saveMiniDict [post]
+func (slf DictController) SaveMiniDict(c *gin.Context) {
+ var params SaveMiniDict
+ if err := c.BindJSON(¶ms); err != nil {
+ utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+ return
+ }
+
+ if !params.Type.Valid() {
+ utils.ResponseFormat(c, code.RequestParamError, "瀛楀吀绫诲瀷閿欒")
+ return
+ }
+
+ var records []*model.MiniDict
+ for _, v := range params.List {
+ if len(v.Name) == 0 {
+ utils.ResponseFormat(c, code.RequestParamError, "鍚嶇О涓虹┖")
+ return
+ }
+
+ records = append(records, &model.MiniDict{
+ Type: params.Type,
+ Name: v.Name,
+ IsDefault: v.IsDefault,
+ Value: v.Value,
+ })
+ }
+
+ err := model.WithTransaction(func(tx *gorm.DB) error {
+ err := model.NewMiniDictSearch().SetOrm(tx).SetType(params.Type).Delete()
+ if err != nil {
+ return err
+ }
+
+ err = model.NewMiniDictSearch().SetOrm(tx).CreateBatch(records)
+ if err != nil {
+ return err
+ }
+ return nil
+ })
+ if err != nil {
+ utils.ResponseFormat(c, code.RequestParamError, "淇濆瓨澶辫触")
+ return
+ }
+
+ utils.ResponseFormat(c, code.Success, "娣诲姞鎴愬姛")
+}
+
+// GetMiniDictList
+// @Tags 鏁版嵁瀛楀吀
+// @Summary 鑾峰彇杩蜂綘瀛楀吀鍒楄〃
+// @Produce application/json
+// @Param object body GetMiniDictList true "鍙傛暟"
+// @Param Authorization header string true "token"
+// @Success 200 {object} utils.ResponseList{data=[]model.MiniDict} "鎴愬姛"
+// @Router /dict/getMiniDictList [post]
+func (slf DictController) GetMiniDictList(c *gin.Context) {
+ var params GetMiniDictList
+ if err := c.BindJSON(¶ms); err != nil {
+ utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+ return
+ }
+
+ if !params.Type.Valid() {
+ utils.ResponseFormat(c, code.RequestParamError, "瀛楀吀绫诲瀷閿欒")
+ return
+ }
+
+ list, total, err := model.NewMiniDictSearch().SetType(params.Type).Find()
+ if err != nil {
+ utils.ResponseFormat(c, code.RequestParamError, "鏌ユ壘澶辫触")
+ return
+ }
+
+ utils.ResponseFormatList(c, code.Success, list, int(total))
+}
diff --git a/api/v1/outsourcing/outsourcing.go b/api/v1/outsourcing/outsourcing.go
new file mode 100644
index 0000000..6d55dd8
--- /dev/null
+++ b/api/v1/outsourcing/outsourcing.go
@@ -0,0 +1,575 @@
+package outsourcing
+
+import (
+ "github.com/gin-gonic/gin"
+ "gorm.io/gorm"
+ "srm/constvar"
+ "srm/model/common/response"
+ models "srm/model/outsourcing"
+ outsourcingrequest "srm/model/outsourcing/request"
+ "srm/pkg/logx"
+ "srm/utils"
+ "srm/utils/code"
+ "srm/utils/structx"
+)
+
+type OutsourcingController struct{}
+
+// AddOutsourcingEnterprise
+// @Tags 濮斿浼佷笟绠$悊
+// @Summary 浼佷笟鏂板
+// @Produce application/json
+// @Param Authorization header string true "token"
+// @Param object body outsourcingrequest.OutsourcingEnterprise true "鏌ヨ鍙傛暟"
+// @Success 200 {object} contextx.Response{} "鎴愬姛"
+// @Router /outsourcing/enterprise/add [post]
+func (slf *OutsourcingController) AddOutsourcingEnterprise(c *gin.Context) {
+ var params outsourcingrequest.OutsourcingEnterprise
+ var record models.OutsourcingEnterprise
+ if err := c.BindJSON(¶ms); err != nil {
+ logx.Errorf("AddDevice err:%+v", err)
+ response.FailWithMessage(err.Error(), c)
+ return
+ }
+ if err := structx.AssignTo(params, &record); err != nil {
+ response.FailWithMessage(err.Error(), c)
+ return
+ }
+
+ _, err := models.NewOutsourcingEnterpriseSearch().SetNumber(params.Number).First()
+ if err != gorm.ErrRecordNotFound {
+ response.FailWithMessage("浼佷笟缂栫爜宸插瓨鍦�", c)
+ return
+ }
+ err = models.NewOutsourcingEnterpriseSearch().Create(&record)
+ if err != nil {
+ logx.Errorf("OutsourcingEnterprise err:%v", err)
+ response.FailWithMessage(err.Error(), c)
+ return
+ }
+ utils.ResponseFormat(c, code.Success, record)
+}
+
+// UpdateOutsourcingEnterprise
+// @Tags 濮斿浼佷笟绠$悊
+// @Summary 浼佷笟淇敼
+// @Produce application/json
+// @Param Authorization header string true "token"
+// @Param object body outsourcingrequest.OutsourcingEnterprise true "鏌ヨ鍙傛暟"
+// @Success 200 {object} contextx.Response{} "鎴愬姛"
+// @Router /outsourcing/enterprise/update [post]
+func (slf *OutsourcingController) UpdateOutsourcingEnterprise(c *gin.Context) {
+ var params outsourcingrequest.OutsourcingEnterprise
+ var record models.OutsourcingEnterprise
+ if err := c.BindJSON(¶ms); err != nil {
+ logx.Errorf("AddDevice err:%+v", err)
+ utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+ return
+ }
+ if err := structx.AssignTo(params, &record); err != nil {
+ utils.ResponseFormat(c, code.RequestParamError, "鏁版嵁杞崲閿欒")
+ return
+ }
+ if params.ID == 0 {
+ utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟缂哄け")
+ return
+ }
+ _, err := models.NewOutsourcingEnterpriseSearch().SetID(params.ID).First()
+ if err == gorm.ErrRecordNotFound {
+ utils.ResponseFormat(c, code.RequestParamError, "璁板綍涓嶅瓨鍦�")
+ return
+ }
+
+ err = models.NewOutsourcingEnterpriseSearch().Save(&record)
+ if err != nil {
+ logx.Errorf("OutsourcingEnterprise err:%v", err)
+ utils.ResponseFormat(c, code.InternalError, err.Error())
+ return
+ }
+ utils.ResponseFormat(c, code.Success, "")
+}
+
+// OutsourcingEnterpriseList
+// @Tags 濮斿浼佷笟绠$悊
+// @Summary 浼佷笟鍒楄〃
+// @Produce application/json
+// @Param Authorization header string true "token"
+// @Param object query outsourcingrequest.OutsourcingEnterpriseList true "鏌ヨ鍙傛暟"
+// @Success 200 {object} utils.ResponseList{data=[]models.OutsourcingEnterprise} "鎴愬姛"
+// @Router /outsourcing/enterprise/list [get]
+func (slf *OutsourcingController) OutsourcingEnterpriseList(c *gin.Context) {
+ var params outsourcingrequest.OutsourcingEnterpriseList
+ if err := c.BindQuery(¶ms); err != nil {
+ utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+ return
+ }
+ list, total, err := models.NewOutsourcingEnterpriseSearch().SetStatus(params.Status).SetPage(params.Page, params.PageSize).SetKeyword(params.Keyword).SetOrder("id desc").Find()
+ if err != nil {
+ utils.ResponseFormat(c, code.InternalError, "鏌ヨ閿欒")
+ return
+ }
+ utils.ResponseFormatList(c, code.Success, list, int(total))
+}
+
+// EnterpriseOverview
+// @Tags 濮斿浼佷笟绠$悊
+// @Summary 浼佷笟缁熻
+// @Produce application/json
+// @Param Authorization header string true "token"
+// @Success 200 {object} utils.ResponseList{data=outsourcingrequest.OutsourcingEnterpriseOverview} "鎴愬姛"
+// @Router /outsourcing/enterprise/overview [get]
+func (slf *OutsourcingController) EnterpriseOverview(c *gin.Context) {
+ result, err := models.NewOutsourcingEnterpriseSearch().CountGroupByStatus()
+ if err != nil {
+ utils.ResponseFormat(c, code.InternalError, "鏌ヨ閿欒")
+ return
+ }
+ resp := &outsourcingrequest.OutsourcingEnterpriseOverview{}
+ for _, v := range result {
+ resp.Total += v.Total
+ status := constvar.RecordStatus(v.Status)
+ if status == constvar.RecordStatusActive {
+ resp.Open += v.Total
+ } else if status == constvar.RecordStatusInactive {
+ resp.Close += v.Total
+ }
+ }
+ utils.ResponseFormat(c, code.Success, resp)
+}
+
+//
+//// OutsourcingOrderList
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 濮斿璁㈠崟鍒楄〃
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object query outsourcingrequest.OutsourcingOrderList true "鏌ヨ鍙傛暟"
+//// @Success 200 {object} utils.ResponseList{data=[]models.OutsourcingOrder} "鎴愬姛"
+//// @Router /outsourcing/order/list [get]
+//func (slf *OutsourcingController) OutsourcingOrderList(c *gin.Context) {
+// var params outsourcingrequest.OutsourcingOrderList
+// if err := c.BindQuery(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+// list, total, err := models.NewOutsourcingOrderSearch().SetPage(params.Page, params.PageSize).SetKeyword(params.Keyword).SetOrder("id desc").Find()
+// if err != nil {
+// utils.ResponseFormat(c, code.InternalError, "鏌ヨ閿欒")
+// return
+// }
+// utils.ResponseFormatList(c, code.Success, list, int(total))
+//}
+//
+//// OrderOverview
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 璁㈠崟缁熻
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Success 200 {object} utils.ResponseList{data=outsourcingrequest.OutsourcingOrderOverview} "鎴愬姛"
+//// @Router /outsourcing/order/overview [get]
+//func (slf *OutsourcingController) OrderOverview(c *gin.Context) {
+// result, err := models.NewOutsourcingOrderSearch().CountGroupByStatus()
+// if err != nil {
+// utils.ResponseFormat(c, code.InternalError, "鏌ヨ閿欒")
+// return
+// }
+// resp := &outsourcingrequest.OutsourcingOrderOverview{}
+// for _, v := range result {
+// resp.Total += v.Total
+// status := constvar.OutsourcingOrderStatus(v.Status)
+// if status == constvar.OutsourcingOrderStatusCreate {
+// resp.WaitAssigned += v.Total
+// } else {
+// resp.HasAssigned += v.Total
+// }
+// }
+// utils.ResponseFormat(c, code.Success, resp)
+//}
+//
+//// OutsourcingOrderProductList
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 濮斿璁㈠崟浜у搧鍒楄〃
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object query outsourcingrequest.OutsourcingOrderProductList true "鏌ヨ鍙傛暟"
+//// @Success 200 {object} utils.ResponseList{data=[]models.OutsourcingOrderProduct} "鎴愬姛"
+//// @Router /outsourcing/order/productList [get]
+//func (slf *OutsourcingController) OutsourcingOrderProductList(c *gin.Context) {
+// var params outsourcingrequest.OutsourcingOrderProductList
+// if err := c.BindQuery(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+// if params.OutsourcingOrderId == 0 {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟缂哄け")
+// return
+// }
+// list, total, err := models.NewOutsourcingOrderProductSearch().SetPage(params.Page, params.PageSize).SetOutsourcingOrderID(params.OutsourcingOrderId).SetOrder("id desc").Find()
+// if err != nil {
+// utils.ResponseFormat(c, code.InternalError, "鏌ヨ閿欒")
+// return
+// }
+// utils.ResponseFormatList(c, code.Success, list, int(total))
+//}
+//
+//// OutsourcingEnterpriseProductList
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 濮斿浼佷笟渚涜揣鍘嗗彶
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object query outsourcingrequest.OutsourcingEnterpriseProductList true "鏌ヨ鍙傛暟"
+//// @Success 200 {object} utils.ResponseList{data=[]models.OutsourcingOrderProduct} "鎴愬姛"
+//// @Router /outsourcing/enterprise/productList [get]
+//func (slf *OutsourcingController) OutsourcingEnterpriseProductList(c *gin.Context) {
+// var params outsourcingrequest.OutsourcingEnterpriseProductList
+// if err := c.BindQuery(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+// if params.EnterpriseID == 0 {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟缂哄け")
+// return
+// }
+// list, total, err := models.NewOutsourcingOrderProductSearch().SetPage(params.Page, params.PageSize).SetEnterpriseID(params.EnterpriseID).SetOrder("id desc").Find()
+// if err != nil {
+// utils.ResponseFormat(c, code.InternalError, "鏌ヨ閿欒")
+// return
+// }
+// utils.ResponseFormatList(c, code.Success, list, int(total))
+//}
+//
+//// OutsourcingOrderAssign
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 濮斿璁㈠崟鍒嗛厤浼佷笟
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object body outsourcingrequest.OutsourcingOrderAssign true "鏌ヨ鍙傛暟"
+//// @Success 200 {object} contextx.Response{} "鎴愬姛"
+//// @Router /outsourcing/order/assign [post]
+//func (slf *OutsourcingController) OutsourcingOrderAssign(c *gin.Context) {
+// var params outsourcingrequest.OutsourcingOrderAssign
+// if err := c.BindJSON(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+// if params.EnterpriseID == 0 || params.OrderID == 0 && len(params.OrderIDs) == 0 {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟缂哄け")
+// return
+// }
+// if params.OrderID != 0 && len(params.OrderIDs) != 0 {
+// utils.ResponseFormat(c, code.RequestParamError, "涓嶈兘鍚屾椂浼爋rderID鍜宱rderIDs")
+// return
+// }
+// enterprise, err := models.NewOutsourcingEnterpriseSearch().SetID(params.EnterpriseID).First()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鏌ユ壘浼佷笟澶辫触")
+// return
+// }
+// if params.OrderID != 0 {
+// order, err := models.NewOutsourcingOrderSearch().SetID(params.OrderID).First()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鏌ユ壘璁㈠崟澶辫触")
+// return
+// }
+// if order.Status != constvar.OutsourcingOrderStatusCreate || order.EnterpriseID != 0 {
+// utils.ResponseFormat(c, code.RequestParamError, "璇ヨ鍗曞凡鍒嗛厤浼佷笟锛岃妫�鏌�")
+// return
+// }
+// } else {
+// for _, orderID := range params.OrderIDs {
+// order, err := models.NewOutsourcingOrderSearch().SetID(orderID).First()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鏌ユ壘璁㈠崟澶辫触")
+// return
+// }
+// if order.Status != constvar.OutsourcingOrderStatusCreate || order.EnterpriseID != 0 {
+// utils.ResponseFormat(c, code.RequestParamError, "瀛樺湪宸插垎閰嶄紒涓氱殑璁㈠崟锛岃妫�鏌�")
+// return
+// }
+// }
+// }
+//
+// err = model.WithTransaction(func(db *gorm.DB) error {
+// err = models.NewOutsourcingOrderSearch().SetID(params.OrderID).SetIDs(params.OrderIDs).UpdateByMap(map[string]interface{}{
+// "enterprise_id": enterprise.ID,
+// "enterprise_name": enterprise.Name,
+// "enterprise_type": enterprise.EnterpriseType,
+// "status": constvar.OutsourcingOrderStatusAssigned,
+// })
+// if err != nil {
+// return err
+// }
+// err = models.NewOutsourcingOrderProductSearch().SetOutsourcingOrderID(params.OrderID).SetOutsourcingOrderIDs(params.OrderIDs).UpdateByMap(map[string]interface{}{
+// "enterprise_id": enterprise.ID,
+// })
+// return err
+// })
+// if err != nil {
+// utils.ResponseFormat(c, code.InternalError, "鍒嗛厤澶辫触")
+// return
+// }
+// utils.ResponseFormat(c, code.Success, nil)
+//}
+//
+//// SaveMaterialApply
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 淇濆瓨鐗╂枡鐢宠鍗�
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object body outsourcingrequest.SaveMaterialApply true "鍙傛暟"
+//// @Success 200 {object} utils.Response{} "鎴愬姛"
+//// @Router /outsourcing/order/saveMaterialApply [post]
+//func (slf *OutsourcingController) SaveMaterialApply(c *gin.Context) {
+// var params outsourcingrequest.SaveMaterialApply
+// if err := c.BindJSON(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+// if len(params.ApplyList) == 0 {
+// utils.ResponseFormat(c, code.RequestParamError, "鐗╂枡鐢宠涓嶈兘涓虹┖")
+// return
+// }
+// var apply []*models.OutsourcingMaterialApply
+// err := structx.AssignTo(params.ApplyList, &apply)
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鏁版嵁杞崲澶辫触")
+// return
+// }
+// err = model.WithTransaction(func(db *gorm.DB) error {
+// err = models.NewOutsourcingMaterialApplySearch().SetOrm(db).CreateBatch(apply)
+// if err != nil {
+// return err
+// }
+// err = models.NewOutsourcingOrderSearch().SetOrm(db).SetNumber(params.ApplyList[0].OutsourcingOrderNumber).
+// UpdateByMap(map[string]interface{}{"status": constvar.OutsourcingOrderStatusMaterialApplying})
+// return err
+// })
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "淇濆瓨澶辫触")
+// return
+// }
+//
+// utils.ResponseFormat(c, code.Success, "淇濆瓨鎴愬姛")
+//}
+//
+//// GetMaterialApplyList
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 鑾峰彇鐗╂枡鐢宠鍗�
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object body outsourcingrequest.GetMaterialApplyList true "鍙傛暟"
+//// @Success 200 {object} utils.ResponseList{[]models.OutsourcingMaterialApply} "鎴愬姛"
+//// @Router /outsourcing/order/getMaterialApplyList [post]
+//func (slf *OutsourcingController) GetMaterialApplyList(c *gin.Context) {
+// var params outsourcingrequest.GetMaterialApplyList
+// if err := c.BindJSON(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+// find, err := models.NewOutsourcingMaterialApplySearch().SetOutsourcingOrderNumber(params.Number).FindNotTotal()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鏌ヨ澶辫触")
+// return
+// }
+// utils.ResponseFormat(c, code.Success, find)
+//}
+//
+//// ChangeStatus
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 淇敼鐘舵��
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object body outsourcingrequest.ChangeStatus true "鍙傛暟"
+//// @Success 200 {object} utils.Response "鎴愬姛"
+//// @Router /outsourcing/order/changeStatus [post]
+//func (slf *OutsourcingController) ChangeStatus(c *gin.Context) {
+// var params outsourcingrequest.ChangeStatus
+// if err := c.BindJSON(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+// //闄愬畾鐘舵�佸弬鏁�
+// if params.Status == constvar.OutsourcingOrderStatusMaterialExamineRefused ||
+// params.Status == constvar.OutsourcingOrderStatusProducing ||
+// params.Status == constvar.OutsourcingOrderStatusFinish ||
+// params.Status == constvar.OutsourcingOrderStatusReceiveFinish {
+// m := make(map[string]interface{})
+// m["status"] = params.Status
+// m["reason"] = params.Reason
+// err := models.NewOutsourcingOrderSearch().SetNumber(params.OutsourcingOrderNumber).UpdateByMap(m)
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鐘舵�佹洿鏂板け璐�")
+// return
+// }
+// utils.ResponseFormat(c, code.Success, "鐘舵�佹洿鏂版垚鍔�")
+// return
+// }
+// utils.ResponseFormat(c, code.RequestParamError, "鐘舵�佸弬鏁颁笉姝g‘")
+//}
+//
+//// GetDeliveryList
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 鑾峰彇鍙戣揣鍒楄〃
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object body outsourcingrequest.GetDeliveryList true "鍙傛暟"
+//// @Success 200 {object} utils.ResponseList{[]models.OutsourcingOrderDeliveryDetails} "鎴愬姛"
+//// @Router /outsourcing/order/deliveryList [post]
+//func (slf *OutsourcingController) GetDeliveryList(c *gin.Context) {
+// var params outsourcingrequest.GetDeliveryList
+// if err := c.BindJSON(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+//
+// _, err := models.NewOutsourcingOrderSearch().SetID(params.OutsourcingOrderID).First()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "璁㈠崟涓嶅瓨鍦�")
+// return
+// }
+//
+// list, err := models.NewOutsourcingOrderDeliveryDetailsSearch().
+// SetOutsourcingOrderID(params.OutsourcingOrderID).
+// SetIsReceived(params.IsReceived).
+// SetPreload(true).
+// SetOrder("id desc").
+// FindNotTotal()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鏌ヨ澶辫触")
+// return
+// }
+// utils.ResponseFormat(c, code.Success, list)
+//}
+//
+//// ConfirmReceipt
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 濮斿鍏ュ簱 纭鍏ュ簱
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object body outsourcingrequest.ConfirmDeliveryList true "鍙傛暟"
+//// @Success 200 {object} utils.ResponseList{[]models.OutsourcingOrderDeliveryDetails} "鎴愬姛"
+//// @Router /outsourcing/order/confirmReceipt [post]
+//func (slf *OutsourcingController) ConfirmReceipt(c *gin.Context) {
+// var params outsourcingrequest.ConfirmDeliveryList
+// if err := c.BindJSON(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+//
+// outsourcingOrder, err := models.NewOutsourcingOrderSearch().SetID(params.OutsourcingOrderID).First()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "璁㈠崟涓嶅瓨鍦�")
+// return
+// }
+//
+// list, err := models.NewOutsourcingOrderDeliveryDetailsSearch().
+// SetOutsourcingOrderID(params.OutsourcingOrderID).
+// SetIds(params.OutsourcingOrderDeliveryDetailsIds).
+// SetPreload(true).
+// SetOrder("id desc").
+// FindNotTotal()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鏌ヨ澶辫触")
+// return
+// }
+//
+// operationList := make([]*inventory_order.OperationList, 0)
+// products := make([]*inventory_order.OperationProduct, 0, len(list))
+// ids := make([]uint, 0, len(list))
+// for _, item := range list {
+// products = append(products, &inventory_order.OperationProduct{
+// ProductNumber: item.OutsourcingOrderProduct.ProductId,
+// Amount: item.SendAmount.IntPart(),
+// })
+// ids = append(ids, item.ID)
+// }
+// var ol inventory_order.OperationList
+// ol.SourceNumber = outsourcingOrder.Number
+// ol.Products = products
+// ol.SalesDetailsNumber = outsourcingOrder.SalesDetailsNumber
+// operationList = append(operationList, &ol)
+// client := inventory_order.NewInventoryOrderServiceClient(purchase_wms.PurchaseConn)
+// _, err = client.CreateOperationList(c, &inventory_order.CreateOperationListRequest{
+// OperationType: 1,
+// Source: "APS_OUTSOURCING_RECEIVE",
+// List: operationList,
+// OperationSource: common.OperationSource_OperationSourceOutsourcing,
+// WarehouseId: params.WarehouseId,
+// })
+// if err != nil {
+// logx.Errorf("outsourcing confirmReceipt CreateOperationList failed: %v", err)
+// utils.ResponseFormat(c, code.InternalError, "GRPC璋冪敤閿欒")
+// return
+// }
+//
+// err = models.NewOutsourcingOrderDeliveryDetailsSearch().
+// SetOutsourcingOrderID(params.OutsourcingOrderID).
+// SetIds(params.OutsourcingOrderDeliveryDetailsIds).UpdateByMap(map[string]interface{}{"is_received": constvar.BoolTypeTrue})
+// if err != nil {
+// logx.Errorf("outsourcing confirmReceipt CreateOperationList success but update receive status failed: %v, params:%+v", err, params)
+// utils.ResponseFormat(c, code.SaveFail, "鏇存敼鐘舵�佸け璐�")
+// return
+// }
+// utils.ResponseFormat(c, code.Success, nil)
+//}
+//
+//// GetInventoryInputDetails
+//// @Tags 濮斿浼佷笟绠$悊
+//// @Summary 鑾峰彇濮斿鍏ュ簱鏄庣粏
+//// @Produce application/json
+//// @Param Authorization header string true "token"
+//// @Param object body outsourcingrequest.GetInventoryInputDetails true "鍙傛暟"
+//// @Success 200 {object} utils.ResponseList{[]response.OutsourcingInputItem} "鎴愬姛"
+//// @Router /outsourcing/order/getInventoryInputDetails [post]
+//func (slf *OutsourcingController) GetInventoryInputDetails(c *gin.Context) {
+// var params outsourcingrequest.GetInventoryInputDetails
+// if err := c.BindJSON(¶ms); err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�")
+// return
+// }
+//
+// outsourcingOrder, err := models.NewOutsourcingOrderSearch().SetID(params.OutsourcingOrderID).First()
+// if err != nil {
+// utils.ResponseFormat(c, code.RequestParamError, "璁㈠崟涓嶅瓨鍦�")
+// return
+// }
+//
+// client := purchase_wms.NewPurchaseServiceClient(purchase_wms.PurchaseConn)
+// resp, err := client.SrmGetOperationInfo(c, &purchase_wms.SrmGetOperationInfoRequest{
+// Number: outsourcingOrder.Number,
+// OperationSource: common.OperationSource_OperationSourceOutsourcing,
+// SalesDetailsNumber: outsourcingOrder.SalesDetailsNumber,
+// })
+// if err != nil {
+// logx.Errorf("SrmGetOperationInfo err:%v", err)
+// utils.ResponseFormat(c, code.Success, nil)
+// return
+// }
+//
+// orderProducts, err := models.NewOutsourcingOrderProductSearch().SetOutsourcingOrderID(params.OutsourcingOrderID).FindNotTotal()
+// if err != nil {
+// utils.ResponseFormat(c, code.InternalError, "鏌ヨ璁㈠崟浜у搧澶辫触")
+// return
+// }
+// productMap := models.OutsourcingOrderProductMap(orderProducts)
+// list := make([]*response.OutsourcingInputItem, 0, len(resp.Operations))
+// for _, v := range resp.Operations {
+// if productMap[v.ProductId] == nil {
+// continue
+// }
+// list = append(list, &response.OutsourcingInputItem{
+// Number: v.Number,
+// ProductId: v.ProductId,
+// ProductName: v.ProductName,
+// OrderAmount: productMap[v.ProductId].Amount,
+// InputAmount: v.Amount,
+// Specs: productMap[v.ProductId].Specs,
+// Type: productMap[v.ProductId].Type,
+// Unit: productMap[v.ProductId].Unit,
+// Status: v.Status,
+// CreateTime: v.OverTime,
+// })
+// }
+// utils.ResponseFormat(c, code.Success, list)
+//
+//}
diff --git a/api/v1/purchase/purchase.go b/api/v1/purchase/purchase.go
index 1066c6c..8d07ab6 100644
--- a/api/v1/purchase/purchase.go
+++ b/api/v1/purchase/purchase.go
@@ -10,6 +10,7 @@
"srm/model/common/response"
"srm/model/purchase"
purchaserequest "srm/model/purchase/request"
+ "srm/proto/common"
"srm/proto/purchase_wms"
"strconv"
"strings"
@@ -264,7 +265,7 @@
SupplierName: data.Supplier.Name,
Product: product,
Source: "SRM_PURCHASE",
- OperationSource: purchase_wms.OperationSource_OperationSourcePurchase,
+ OperationSource: common.OperationSource_OperationSourcePurchase,
SalesDetailsNumber: data.SourceOrder,
})
if err != nil {
@@ -688,7 +689,7 @@
Product: product,
Source: "SRM_PURCHASE",
WarehouseName: purchaseData.Warehouse,
- OperationSource: purchase_wms.OperationSource_OperationSourcePurchase,
+ OperationSource: common.OperationSource_OperationSourcePurchase,
SalesDetailsNumber: purchaseData.SourceOrder,
})
if err != nil {
@@ -776,7 +777,7 @@
Product: product,
Source: "SRM_PURCHASE",
WarehouseName: purchaseData.Warehouse,
- OperationSource: purchase_wms.OperationSource_OperationSourcePurchase,
+ OperationSource: common.OperationSource_OperationSourcePurchase,
SalesDetailsNumber: purchaseData.SourceOrder,
})
if err != nil {
diff --git a/config.yaml b/config.yaml
index 1476dbe..b758253 100644
--- a/config.yaml
+++ b/config.yaml
@@ -45,7 +45,7 @@
system:
env: public
db-type: mysql
- router-prefix: "/api"
+ router-prefix: "/api-srm"
addr: 8004
grpc-port: "9093"
grpc-url: 192.168.20.119:9091
diff --git a/constvar/const.go b/constvar/const.go
index 6bd9591..b838b7f 100644
--- a/constvar/const.go
+++ b/constvar/const.go
@@ -16,3 +16,55 @@
CodeStandardType_PurchaseOrder CodeStandardType = "閲囪喘鍗曠紪鐮�"
CodeStandardType_Supplier CodeStandardType = "渚涘簲鍟嗙紪鐮�"
)
+
+type RecordStatus int //鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤
+
+const (
+ RecordStatusCreate RecordStatus = iota // 鏂板缓
+ RecordStatusActive // 鍚敤
+ RecordStatusInactive // 鍋滅敤
+)
+
+type OutsourcingOrderStatus int
+
+// 绠$悊绔� 寰呯敓浜� 棰嗘枡瀹℃牳鎷掔粷閮芥樉绀哄凡鍒嗛厤濮斿鍟�
+const (
+ OutsourcingOrderStatusCreate OutsourcingOrderStatus = iota // 鏂板缓寰呭垎閰嶅澶栧晢
+ OutsourcingOrderStatusAssigned // 宸插垎閰嶅澶栧晢
+ OutsourcingOrderStatusWaitProduce // 寰呯敓浜�
+ OutsourcingOrderStatusMaterialApplying // 鐗╂枡鐢宠涓�/寰呴鏂欏鏍�
+ OutsourcingOrderStatusMaterialExamineRefused // 棰嗘枡瀹℃牳鎷掔粷
+ OutsourcingOrderStatusProducing // 鐢熶骇涓�
+ OutsourcingOrderStatusFinish // 鐢熶骇瀹屾垚
+ OutsourcingOrderStatusDeliveryFinish // 鍙戣揣瀹屾垚
+ OutsourcingOrderStatusReceiveFinish // 鏀惰揣瀹屾垚
+ OutsourcingOrderStatusClose //鍏抽棴
+)
+
+// BoolType 甯冨皵绫诲瀷
+type BoolType int
+
+const (
+ BoolTypeTrue BoolType = 1 // true
+ BoolTypeFalse BoolType = 2 // false
+)
+
+// MiniDictType 杩蜂綘瀛楀吀绫诲瀷
+type MiniDictType int
+
+const (
+ MiniDictTypePlcBrand MiniDictType = iota + 1 // PLC鍝佺墝
+ MiniDictTypeBomVersionType // Bom鐗堟湰绫诲瀷
+ EarlyWarningDay //棰勮澶╂暟
+ InspectionWayType //璐ㄦ鏂瑰紡绫诲瀷
+ OutsourcingSupplierType //濮斿渚涘簲鍟嗙被鍨�
+ OutsourcingSupplierCreditGrade //淇$敤绛夌骇
+ OutsourcingSupplierRange //渚涜揣鑼冨洿
+)
+
+func (t MiniDictType) Valid() bool {
+ if t <= 0 {
+ return false
+ }
+ return true
+}
diff --git a/docs/docs.go b/docs/docs.go
index 9ebef61..5137dbb 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -417,6 +417,95 @@
}
}
},
+ "/dict/getMiniDictList": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "鏁版嵁瀛楀吀"
+ ],
+ "summary": "鑾峰彇杩蜂綘瀛楀吀鍒楄〃",
+ "parameters": [
+ {
+ "description": "鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/v1.GetMiniDictList"
+ }
+ },
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/utils.ResponseList"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/model.MiniDict"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/dict/saveMiniDict": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "鏁版嵁瀛楀吀"
+ ],
+ "summary": "鏇存柊杩蜂綘瀛楀吀",
+ "parameters": [
+ {
+ "description": "鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/v1.SaveMiniDict"
+ }
+ },
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/utils.Response"
+ }
+ }
+ }
+ }
+ },
"/downloadContract": {
"get": {
"security": [
@@ -1135,6 +1224,201 @@
"description": "{\"success\":true,\"data\":{},\"msg\":\"鏇存柊鎴愬姛\"}",
"schema": {
"type": "string"
+ }
+ }
+ }
+ }
+ },
+ "/outsourcing/enterprise/add": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "濮斿浼佷笟绠$悊"
+ ],
+ "summary": "浼佷笟鏂板",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "鏌ヨ鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterprise"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/contextx.Response"
+ }
+ }
+ }
+ }
+ },
+ "/outsourcing/enterprise/list": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "濮斿浼佷笟绠$悊"
+ ],
+ "summary": "浼佷笟鍒楄〃",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "name": "keyword",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "椤电爜",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "姣忛〉澶у皬",
+ "name": "pageSize",
+ "in": "query"
+ },
+ {
+ "enum": [
+ 0,
+ 1,
+ 2
+ ],
+ "type": "integer",
+ "x-enum-comments": {
+ "RecordStatusActive": "鍚敤",
+ "RecordStatusCreate": "鏂板缓",
+ "RecordStatusInactive": "鍋滅敤"
+ },
+ "x-enum-varnames": [
+ "RecordStatusCreate",
+ "RecordStatusActive",
+ "RecordStatusInactive"
+ ],
+ "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤",
+ "name": "status",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/utils.ResponseList"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/models.OutsourcingEnterprise"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/outsourcing/enterprise/overview": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "濮斿浼佷笟绠$悊"
+ ],
+ "summary": "浼佷笟缁熻",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/utils.ResponseList"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterpriseOverview"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/outsourcing/enterprise/update": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "濮斿浼佷笟绠$悊"
+ ],
+ "summary": "浼佷笟淇敼",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "鏌ヨ鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterprise"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/contextx.Response"
}
}
}
@@ -3977,6 +4261,247 @@
}
}
},
+ "constvar.MiniDictType": {
+ "type": "integer",
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7
+ ],
+ "x-enum-comments": {
+ "EarlyWarningDay": "棰勮澶╂暟",
+ "InspectionWayType": "璐ㄦ鏂瑰紡绫诲瀷",
+ "MiniDictTypeBomVersionType": "Bom鐗堟湰绫诲瀷",
+ "MiniDictTypePlcBrand": "PLC鍝佺墝",
+ "OutsourcingSupplierCreditGrade": "淇$敤绛夌骇",
+ "OutsourcingSupplierRange": "渚涜揣鑼冨洿",
+ "OutsourcingSupplierType": "濮斿渚涘簲鍟嗙被鍨�"
+ },
+ "x-enum-varnames": [
+ "MiniDictTypePlcBrand",
+ "MiniDictTypeBomVersionType",
+ "EarlyWarningDay",
+ "InspectionWayType",
+ "OutsourcingSupplierType",
+ "OutsourcingSupplierCreditGrade",
+ "OutsourcingSupplierRange"
+ ]
+ },
+ "constvar.RecordStatus": {
+ "type": "integer",
+ "enum": [
+ 0,
+ 1,
+ 2
+ ],
+ "x-enum-comments": {
+ "RecordStatusActive": "鍚敤",
+ "RecordStatusCreate": "鏂板缓",
+ "RecordStatusInactive": "鍋滅敤"
+ },
+ "x-enum-varnames": [
+ "RecordStatusCreate",
+ "RecordStatusActive",
+ "RecordStatusInactive"
+ ]
+ },
+ "contextx.Response": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer"
+ },
+ "data": {},
+ "msg": {
+ "type": "string"
+ }
+ }
+ },
+ "gorm.DeletedAt": {
+ "type": "object",
+ "properties": {
+ "time": {
+ "type": "string"
+ },
+ "valid": {
+ "description": "Valid is true if Time is not NULL",
+ "type": "boolean"
+ }
+ }
+ },
+ "model.MiniDict": {
+ "type": "object",
+ "properties": {
+ "createdAt": {
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "isDefault": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/constvar.MiniDictType"
+ },
+ "updatedAt": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
+ "models.OutsourcingEnterprise": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "鍦板潃",
+ "type": "string"
+ },
+ "contact": {
+ "description": "鑱旂郴浜�",
+ "type": "string"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "creditGrade": {
+ "description": "淇$敤绛夌骇",
+ "type": "string"
+ },
+ "deletedAt": {
+ "$ref": "#/definitions/gorm.DeletedAt"
+ },
+ "enterpriseType": {
+ "description": "浼佷笟绫诲瀷",
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "description": "濮斿浼佷笟缂栧彿鍚嶇О",
+ "type": "string"
+ },
+ "number": {
+ "description": "濮斿浼佷笟缂栧彿",
+ "type": "string"
+ },
+ "organizationCode": {
+ "description": "缁勭粐鏈烘瀯浠g爜",
+ "type": "string"
+ },
+ "status": {
+ "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.RecordStatus"
+ }
+ ]
+ },
+ "supplyCapacity": {
+ "description": "渚涜揣鑳藉姏",
+ "type": "string"
+ },
+ "supplyRange": {
+ "description": "渚涜揣鑼冨洿",
+ "type": "string"
+ },
+ "tel": {
+ "description": "鑱旂郴鏂瑰紡",
+ "type": "string"
+ },
+ "updatedAt": {
+ "type": "string"
+ }
+ }
+ },
+ "outsourcingrequest.OutsourcingEnterprise": {
+ "type": "object",
+ "required": [
+ "enterpriseType",
+ "name",
+ "number"
+ ],
+ "properties": {
+ "address": {
+ "description": "鍦板潃",
+ "type": "string"
+ },
+ "contact": {
+ "description": "鑱旂郴浜�",
+ "type": "string"
+ },
+ "creditGrade": {
+ "description": "淇$敤绛夌骇",
+ "type": "string"
+ },
+ "enterpriseType": {
+ "description": "浼佷笟绫诲瀷",
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "description": "濮斿渚涘簲鍟嗙紪鍙峰悕绉�",
+ "type": "string"
+ },
+ "number": {
+ "description": "濮斿渚涘簲鍟嗙紪鍙�",
+ "type": "string"
+ },
+ "organizationCode": {
+ "description": "缁勭粐鏈烘瀯浠g爜",
+ "type": "string"
+ },
+ "status": {
+ "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.RecordStatus"
+ }
+ ]
+ },
+ "supplyCapacity": {
+ "description": "渚涜揣鑳藉姏",
+ "type": "string"
+ },
+ "supplyRange": {
+ "description": "渚涜揣鑼冨洿",
+ "type": "string"
+ },
+ "tel": {
+ "description": "鑱旂郴鏂瑰紡",
+ "type": "string"
+ }
+ }
+ },
+ "outsourcingrequest.OutsourcingEnterpriseOverview": {
+ "type": "object",
+ "properties": {
+ "close": {
+ "description": "鍋滅敤鏁伴噺",
+ "type": "integer"
+ },
+ "open": {
+ "description": "鍚敤鏁伴噺",
+ "type": "integer"
+ },
+ "total": {
+ "description": "鎬婚噺",
+ "type": "integer"
+ }
+ }
+ },
"purchase.OrderStatus": {
"type": "integer",
"enum": [
@@ -5103,6 +5628,75 @@
"type": "string"
}
}
+ },
+ "utils.Response": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer"
+ },
+ "data": {},
+ "msg": {
+ "type": "string"
+ }
+ }
+ },
+ "utils.ResponseList": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer"
+ },
+ "data": {},
+ "msg": {
+ "type": "string"
+ },
+ "page": {
+ "type": "integer"
+ },
+ "pageSize": {
+ "type": "integer"
+ },
+ "total": {
+ "type": "integer"
+ }
+ }
+ },
+ "v1.GetMiniDictList": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/constvar.MiniDictType"
+ }
+ }
+ },
+ "v1.MiniDict": {
+ "type": "object",
+ "properties": {
+ "isDefault": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
+ "v1.SaveMiniDict": {
+ "type": "object",
+ "properties": {
+ "list": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/v1.MiniDict"
+ }
+ },
+ "type": {
+ "$ref": "#/definitions/constvar.MiniDictType"
+ }
+ }
}
},
"securityDefinitions": {
diff --git a/docs/swagger.json b/docs/swagger.json
index aa52a00..e07a177 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -408,6 +408,95 @@
}
}
},
+ "/dict/getMiniDictList": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "鏁版嵁瀛楀吀"
+ ],
+ "summary": "鑾峰彇杩蜂綘瀛楀吀鍒楄〃",
+ "parameters": [
+ {
+ "description": "鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/v1.GetMiniDictList"
+ }
+ },
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/utils.ResponseList"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/model.MiniDict"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/dict/saveMiniDict": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "鏁版嵁瀛楀吀"
+ ],
+ "summary": "鏇存柊杩蜂綘瀛楀吀",
+ "parameters": [
+ {
+ "description": "鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/v1.SaveMiniDict"
+ }
+ },
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/utils.Response"
+ }
+ }
+ }
+ }
+ },
"/downloadContract": {
"get": {
"security": [
@@ -1126,6 +1215,201 @@
"description": "{\"success\":true,\"data\":{},\"msg\":\"鏇存柊鎴愬姛\"}",
"schema": {
"type": "string"
+ }
+ }
+ }
+ }
+ },
+ "/outsourcing/enterprise/add": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "濮斿浼佷笟绠$悊"
+ ],
+ "summary": "浼佷笟鏂板",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "鏌ヨ鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterprise"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/contextx.Response"
+ }
+ }
+ }
+ }
+ },
+ "/outsourcing/enterprise/list": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "濮斿浼佷笟绠$悊"
+ ],
+ "summary": "浼佷笟鍒楄〃",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "name": "keyword",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "椤电爜",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "姣忛〉澶у皬",
+ "name": "pageSize",
+ "in": "query"
+ },
+ {
+ "enum": [
+ 0,
+ 1,
+ 2
+ ],
+ "type": "integer",
+ "x-enum-comments": {
+ "RecordStatusActive": "鍚敤",
+ "RecordStatusCreate": "鏂板缓",
+ "RecordStatusInactive": "鍋滅敤"
+ },
+ "x-enum-varnames": [
+ "RecordStatusCreate",
+ "RecordStatusActive",
+ "RecordStatusInactive"
+ ],
+ "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤",
+ "name": "status",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/utils.ResponseList"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/models.OutsourcingEnterprise"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/outsourcing/enterprise/overview": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "濮斿浼佷笟绠$悊"
+ ],
+ "summary": "浼佷笟缁熻",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/utils.ResponseList"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterpriseOverview"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/outsourcing/enterprise/update": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "濮斿浼佷笟绠$悊"
+ ],
+ "summary": "浼佷笟淇敼",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "鏌ヨ鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterprise"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/contextx.Response"
}
}
}
@@ -3968,6 +4252,247 @@
}
}
},
+ "constvar.MiniDictType": {
+ "type": "integer",
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7
+ ],
+ "x-enum-comments": {
+ "EarlyWarningDay": "棰勮澶╂暟",
+ "InspectionWayType": "璐ㄦ鏂瑰紡绫诲瀷",
+ "MiniDictTypeBomVersionType": "Bom鐗堟湰绫诲瀷",
+ "MiniDictTypePlcBrand": "PLC鍝佺墝",
+ "OutsourcingSupplierCreditGrade": "淇$敤绛夌骇",
+ "OutsourcingSupplierRange": "渚涜揣鑼冨洿",
+ "OutsourcingSupplierType": "濮斿渚涘簲鍟嗙被鍨�"
+ },
+ "x-enum-varnames": [
+ "MiniDictTypePlcBrand",
+ "MiniDictTypeBomVersionType",
+ "EarlyWarningDay",
+ "InspectionWayType",
+ "OutsourcingSupplierType",
+ "OutsourcingSupplierCreditGrade",
+ "OutsourcingSupplierRange"
+ ]
+ },
+ "constvar.RecordStatus": {
+ "type": "integer",
+ "enum": [
+ 0,
+ 1,
+ 2
+ ],
+ "x-enum-comments": {
+ "RecordStatusActive": "鍚敤",
+ "RecordStatusCreate": "鏂板缓",
+ "RecordStatusInactive": "鍋滅敤"
+ },
+ "x-enum-varnames": [
+ "RecordStatusCreate",
+ "RecordStatusActive",
+ "RecordStatusInactive"
+ ]
+ },
+ "contextx.Response": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer"
+ },
+ "data": {},
+ "msg": {
+ "type": "string"
+ }
+ }
+ },
+ "gorm.DeletedAt": {
+ "type": "object",
+ "properties": {
+ "time": {
+ "type": "string"
+ },
+ "valid": {
+ "description": "Valid is true if Time is not NULL",
+ "type": "boolean"
+ }
+ }
+ },
+ "model.MiniDict": {
+ "type": "object",
+ "properties": {
+ "createdAt": {
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "isDefault": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/constvar.MiniDictType"
+ },
+ "updatedAt": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
+ "models.OutsourcingEnterprise": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "鍦板潃",
+ "type": "string"
+ },
+ "contact": {
+ "description": "鑱旂郴浜�",
+ "type": "string"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "creditGrade": {
+ "description": "淇$敤绛夌骇",
+ "type": "string"
+ },
+ "deletedAt": {
+ "$ref": "#/definitions/gorm.DeletedAt"
+ },
+ "enterpriseType": {
+ "description": "浼佷笟绫诲瀷",
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "description": "濮斿浼佷笟缂栧彿鍚嶇О",
+ "type": "string"
+ },
+ "number": {
+ "description": "濮斿浼佷笟缂栧彿",
+ "type": "string"
+ },
+ "organizationCode": {
+ "description": "缁勭粐鏈烘瀯浠g爜",
+ "type": "string"
+ },
+ "status": {
+ "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.RecordStatus"
+ }
+ ]
+ },
+ "supplyCapacity": {
+ "description": "渚涜揣鑳藉姏",
+ "type": "string"
+ },
+ "supplyRange": {
+ "description": "渚涜揣鑼冨洿",
+ "type": "string"
+ },
+ "tel": {
+ "description": "鑱旂郴鏂瑰紡",
+ "type": "string"
+ },
+ "updatedAt": {
+ "type": "string"
+ }
+ }
+ },
+ "outsourcingrequest.OutsourcingEnterprise": {
+ "type": "object",
+ "required": [
+ "enterpriseType",
+ "name",
+ "number"
+ ],
+ "properties": {
+ "address": {
+ "description": "鍦板潃",
+ "type": "string"
+ },
+ "contact": {
+ "description": "鑱旂郴浜�",
+ "type": "string"
+ },
+ "creditGrade": {
+ "description": "淇$敤绛夌骇",
+ "type": "string"
+ },
+ "enterpriseType": {
+ "description": "浼佷笟绫诲瀷",
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "description": "濮斿渚涘簲鍟嗙紪鍙峰悕绉�",
+ "type": "string"
+ },
+ "number": {
+ "description": "濮斿渚涘簲鍟嗙紪鍙�",
+ "type": "string"
+ },
+ "organizationCode": {
+ "description": "缁勭粐鏈烘瀯浠g爜",
+ "type": "string"
+ },
+ "status": {
+ "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.RecordStatus"
+ }
+ ]
+ },
+ "supplyCapacity": {
+ "description": "渚涜揣鑳藉姏",
+ "type": "string"
+ },
+ "supplyRange": {
+ "description": "渚涜揣鑼冨洿",
+ "type": "string"
+ },
+ "tel": {
+ "description": "鑱旂郴鏂瑰紡",
+ "type": "string"
+ }
+ }
+ },
+ "outsourcingrequest.OutsourcingEnterpriseOverview": {
+ "type": "object",
+ "properties": {
+ "close": {
+ "description": "鍋滅敤鏁伴噺",
+ "type": "integer"
+ },
+ "open": {
+ "description": "鍚敤鏁伴噺",
+ "type": "integer"
+ },
+ "total": {
+ "description": "鎬婚噺",
+ "type": "integer"
+ }
+ }
+ },
"purchase.OrderStatus": {
"type": "integer",
"enum": [
@@ -5094,6 +5619,75 @@
"type": "string"
}
}
+ },
+ "utils.Response": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer"
+ },
+ "data": {},
+ "msg": {
+ "type": "string"
+ }
+ }
+ },
+ "utils.ResponseList": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer"
+ },
+ "data": {},
+ "msg": {
+ "type": "string"
+ },
+ "page": {
+ "type": "integer"
+ },
+ "pageSize": {
+ "type": "integer"
+ },
+ "total": {
+ "type": "integer"
+ }
+ }
+ },
+ "v1.GetMiniDictList": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/constvar.MiniDictType"
+ }
+ }
+ },
+ "v1.MiniDict": {
+ "type": "object",
+ "properties": {
+ "isDefault": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
+ "v1.SaveMiniDict": {
+ "type": "object",
+ "properties": {
+ "list": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/v1.MiniDict"
+ }
+ },
+ "type": {
+ "$ref": "#/definitions/constvar.MiniDictType"
+ }
+ }
}
},
"securityDefinitions": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 37c765c..5a769cb 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -393,6 +393,179 @@
description: 鏍堝悕
type: string
type: object
+ constvar.MiniDictType:
+ enum:
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+ - 6
+ - 7
+ type: integer
+ x-enum-comments:
+ EarlyWarningDay: 棰勮澶╂暟
+ InspectionWayType: 璐ㄦ鏂瑰紡绫诲瀷
+ MiniDictTypeBomVersionType: Bom鐗堟湰绫诲瀷
+ MiniDictTypePlcBrand: PLC鍝佺墝
+ OutsourcingSupplierCreditGrade: 淇$敤绛夌骇
+ OutsourcingSupplierRange: 渚涜揣鑼冨洿
+ OutsourcingSupplierType: 濮斿渚涘簲鍟嗙被鍨�
+ x-enum-varnames:
+ - MiniDictTypePlcBrand
+ - MiniDictTypeBomVersionType
+ - EarlyWarningDay
+ - InspectionWayType
+ - OutsourcingSupplierType
+ - OutsourcingSupplierCreditGrade
+ - OutsourcingSupplierRange
+ constvar.RecordStatus:
+ enum:
+ - 0
+ - 1
+ - 2
+ type: integer
+ x-enum-comments:
+ RecordStatusActive: 鍚敤
+ RecordStatusCreate: 鏂板缓
+ RecordStatusInactive: 鍋滅敤
+ x-enum-varnames:
+ - RecordStatusCreate
+ - RecordStatusActive
+ - RecordStatusInactive
+ contextx.Response:
+ properties:
+ code:
+ type: integer
+ data: {}
+ msg:
+ type: string
+ type: object
+ gorm.DeletedAt:
+ properties:
+ time:
+ type: string
+ valid:
+ description: Valid is true if Time is not NULL
+ type: boolean
+ type: object
+ model.MiniDict:
+ properties:
+ createdAt:
+ type: string
+ id:
+ type: integer
+ isDefault:
+ type: boolean
+ name:
+ type: string
+ type:
+ $ref: '#/definitions/constvar.MiniDictType'
+ updatedAt:
+ type: string
+ value:
+ type: string
+ type: object
+ models.OutsourcingEnterprise:
+ properties:
+ address:
+ description: 鍦板潃
+ type: string
+ contact:
+ description: 鑱旂郴浜�
+ type: string
+ createdAt:
+ type: string
+ creditGrade:
+ description: 淇$敤绛夌骇
+ type: string
+ deletedAt:
+ $ref: '#/definitions/gorm.DeletedAt'
+ enterpriseType:
+ description: 浼佷笟绫诲瀷
+ type: string
+ id:
+ type: integer
+ name:
+ description: 濮斿浼佷笟缂栧彿鍚嶇О
+ type: string
+ number:
+ description: 濮斿浼佷笟缂栧彿
+ type: string
+ organizationCode:
+ description: 缁勭粐鏈烘瀯浠g爜
+ type: string
+ status:
+ allOf:
+ - $ref: '#/definitions/constvar.RecordStatus'
+ description: 鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤
+ supplyCapacity:
+ description: 渚涜揣鑳藉姏
+ type: string
+ supplyRange:
+ description: 渚涜揣鑼冨洿
+ type: string
+ tel:
+ description: 鑱旂郴鏂瑰紡
+ type: string
+ updatedAt:
+ type: string
+ type: object
+ outsourcingrequest.OutsourcingEnterprise:
+ properties:
+ address:
+ description: 鍦板潃
+ type: string
+ contact:
+ description: 鑱旂郴浜�
+ type: string
+ creditGrade:
+ description: 淇$敤绛夌骇
+ type: string
+ enterpriseType:
+ description: 浼佷笟绫诲瀷
+ type: string
+ id:
+ type: integer
+ name:
+ description: 濮斿渚涘簲鍟嗙紪鍙峰悕绉�
+ type: string
+ number:
+ description: 濮斿渚涘簲鍟嗙紪鍙�
+ type: string
+ organizationCode:
+ description: 缁勭粐鏈烘瀯浠g爜
+ type: string
+ status:
+ allOf:
+ - $ref: '#/definitions/constvar.RecordStatus'
+ description: 鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤
+ supplyCapacity:
+ description: 渚涜揣鑳藉姏
+ type: string
+ supplyRange:
+ description: 渚涜揣鑼冨洿
+ type: string
+ tel:
+ description: 鑱旂郴鏂瑰紡
+ type: string
+ required:
+ - enterpriseType
+ - name
+ - number
+ type: object
+ outsourcingrequest.OutsourcingEnterpriseOverview:
+ properties:
+ close:
+ description: 鍋滅敤鏁伴噺
+ type: integer
+ open:
+ description: 鍚敤鏁伴噺
+ type: integer
+ total:
+ description: 鎬婚噺
+ type: integer
+ type: object
purchase.OrderStatus:
enum:
- 1
@@ -1171,6 +1344,51 @@
updated_at:
type: string
type: object
+ utils.Response:
+ properties:
+ code:
+ type: integer
+ data: {}
+ msg:
+ type: string
+ type: object
+ utils.ResponseList:
+ properties:
+ code:
+ type: integer
+ data: {}
+ msg:
+ type: string
+ page:
+ type: integer
+ pageSize:
+ type: integer
+ total:
+ type: integer
+ type: object
+ v1.GetMiniDictList:
+ properties:
+ type:
+ $ref: '#/definitions/constvar.MiniDictType'
+ type: object
+ v1.MiniDict:
+ properties:
+ isDefault:
+ type: boolean
+ name:
+ type: string
+ value:
+ type: string
+ type: object
+ v1.SaveMiniDict:
+ properties:
+ list:
+ items:
+ $ref: '#/definitions/v1.MiniDict'
+ type: array
+ type:
+ $ref: '#/definitions/constvar.MiniDictType'
+ type: object
info:
contact: {}
description: This is a sample Server pets
@@ -1419,6 +1637,61 @@
summary: 鏇存柊Contract
tags:
- Contract
+ /dict/getMiniDictList:
+ post:
+ parameters:
+ - description: 鍙傛暟
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/v1.GetMiniDictList'
+ - description: token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ allOf:
+ - $ref: '#/definitions/utils.ResponseList'
+ - properties:
+ data:
+ items:
+ $ref: '#/definitions/model.MiniDict'
+ type: array
+ type: object
+ summary: 鑾峰彇杩蜂綘瀛楀吀鍒楄〃
+ tags:
+ - 鏁版嵁瀛楀吀
+ /dict/saveMiniDict:
+ post:
+ parameters:
+ - description: 鍙傛暟
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/v1.SaveMiniDict'
+ - description: token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/utils.Response'
+ summary: 鏇存柊杩蜂綘瀛楀吀
+ tags:
+ - 鏁版嵁瀛楀吀
/downloadContract:
get:
consumes:
@@ -1858,6 +2131,129 @@
summary: 鏇存柊Member
tags:
- Member
+ /outsourcing/enterprise/add:
+ post:
+ parameters:
+ - description: token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ - description: 鏌ヨ鍙傛暟
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/outsourcingrequest.OutsourcingEnterprise'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/contextx.Response'
+ summary: 浼佷笟鏂板
+ tags:
+ - 濮斿浼佷笟绠$悊
+ /outsourcing/enterprise/list:
+ get:
+ parameters:
+ - description: token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ - in: query
+ name: keyword
+ type: string
+ - description: 椤电爜
+ in: query
+ name: page
+ type: integer
+ - description: 姣忛〉澶у皬
+ in: query
+ name: pageSize
+ type: integer
+ - description: 鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤
+ enum:
+ - 0
+ - 1
+ - 2
+ in: query
+ name: status
+ type: integer
+ x-enum-comments:
+ RecordStatusActive: 鍚敤
+ RecordStatusCreate: 鏂板缓
+ RecordStatusInactive: 鍋滅敤
+ x-enum-varnames:
+ - RecordStatusCreate
+ - RecordStatusActive
+ - RecordStatusInactive
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ allOf:
+ - $ref: '#/definitions/utils.ResponseList'
+ - properties:
+ data:
+ items:
+ $ref: '#/definitions/models.OutsourcingEnterprise'
+ type: array
+ type: object
+ summary: 浼佷笟鍒楄〃
+ tags:
+ - 濮斿浼佷笟绠$悊
+ /outsourcing/enterprise/overview:
+ get:
+ parameters:
+ - description: token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ allOf:
+ - $ref: '#/definitions/utils.ResponseList'
+ - properties:
+ data:
+ $ref: '#/definitions/outsourcingrequest.OutsourcingEnterpriseOverview'
+ type: object
+ summary: 浼佷笟缁熻
+ tags:
+ - 濮斿浼佷笟绠$悊
+ /outsourcing/enterprise/update:
+ post:
+ parameters:
+ - description: token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ - description: 鏌ヨ鍙傛暟
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/outsourcingrequest.OutsourcingEnterprise'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/contextx.Response'
+ summary: 浼佷笟淇敼
+ tags:
+ - 濮斿浼佷笟绠$悊
/p/createProduct:
post:
consumes:
diff --git a/initialize/gorm.go b/initialize/gorm.go
index d0ef90c..2d7d7a0 100644
--- a/initialize/gorm.go
+++ b/initialize/gorm.go
@@ -2,6 +2,7 @@
import (
"os"
+ models "srm/model/outsourcing"
"srm/model/purchase"
"go.uber.org/zap"
@@ -39,6 +40,12 @@
purchase.PurchaseProducts{},
purchase.PurchaseProductConfirm{},
purchase.PurchaseQualityInspection{},
+ models.OutsourcingEnterprise{},
+ models.OutsourcingMaterialApply{},
+ models.OutsourcingOrder{},
+ models.OutsourcingOrderDelivery{},
+ models.OutsourcingOrderDeliveryDetails{},
+ models.OutsourcingOrderProduct{},
)
if err != nil {
global.GVA_LOG.Error("register table failed", zap.Error(err))
diff --git a/initialize/router.go b/initialize/router.go
index d7c2901..ecd7431 100644
--- a/initialize/router.go
+++ b/initialize/router.go
@@ -4,6 +4,7 @@
"net/http"
v1 "srm/api/v1"
"srm/middleware"
+ "srm/router/outsourcing"
"srm/router/purchase"
"github.com/gin-gonic/gin"
@@ -55,6 +56,8 @@
testRouter.InitProductRouter(PrivateGroup)
testRouter.InitMemberRouter(PrivateGroup)
testRouter.InitCodeRouter(PrivateGroup)
+ outsourcing.InitRouter(PrivateGroup)
+ router.InitRouter(PrivateGroup)
}
global.GVA_LOG.Info("router register success")
diff --git a/model/common.go b/model/common.go
new file mode 100644
index 0000000..a35d2c6
--- /dev/null
+++ b/model/common.go
@@ -0,0 +1,30 @@
+package model
+
+import (
+ "gorm.io/gorm"
+ "srm/global"
+)
+
+func WithTransaction(fns ...func(*gorm.DB) error) error {
+ var err error
+ tx := global.GVA_DB.Begin()
+ defer func() {
+ if r := recover(); r != nil {
+ tx.Rollback()
+ return
+ } else if err == nil {
+ tx.Commit()
+ return
+ }
+ }()
+
+ for _, fn := range fns {
+ err = fn(tx)
+ if err != nil {
+ tx.Rollback()
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/model/common/response/common.go b/model/common/response/common.go
index 7461096..336fdcf 100644
--- a/model/common/response/common.go
+++ b/model/common/response/common.go
@@ -6,3 +6,16 @@
Page int `json:"page"`
PageSize int `json:"pageSize"`
}
+
+type OutsourcingInputItem struct {
+ Number string `json:"number,omitempty"` //鍏ュ簱鍗曞彿
+ ProductId string `json:"productId,omitempty"` //浜у搧缂栧彿
+ ProductName string `json:"productName,omitempty"` //浜у搧鍚嶇О
+ OrderAmount int64 `json:"orderAmount"` //璁㈠崟鏁伴噺
+ InputAmount int64 `json:"inputAmount"` // 鍏ュ簱鏁伴噺
+ Specs string `json:"specs,omitempty"` //浜у搧瑙勬牸
+ Type string `json:"type,omitempty"` //浜у搧鍨嬪彿
+ Unit string `json:"unit,omitempty"` // 浜у搧鍗曚綅
+ Status int64 `json:"status"` //3灏辩华 4 瀹屾垚 5 鍙栨秷
+ CreateTime string `json:"createTime"` //鍒涘缓鏃堕棿
+}
diff --git a/model/dict.go b/model/dict.go
new file mode 100644
index 0000000..c2f336d
--- /dev/null
+++ b/model/dict.go
@@ -0,0 +1,272 @@
+package model
+
+import (
+ "fmt"
+ "gorm.io/gorm"
+ "srm/constvar"
+ "srm/global"
+ "time"
+)
+
+type (
+ // MiniDict 杩蜂綘瀛楀吀
+ MiniDict struct {
+ ID uint `gorm:"primarykey"`
+ CreatedAt time.Time
+ UpdatedAt time.Time
+ Type constvar.MiniDictType `gorm:"uniqueIndex:idx_type_name;type:int(11);not null;comment:瀛楀吀绫诲瀷" json:"type"`
+ Name string `gorm:"uniqueIndex:idx_type_name;;type:varchar(191);not null;comment:鍚嶇О" json:"name"`
+ Value string `gorm:"type:varchar(191);;comment:鍊�" json:"value"`
+ IsDefault bool `gorm:"type:tinyint(1);comment:鏄惁榛樿" json:"isDefault"`
+ }
+
+ MiniDictSearch struct {
+ MiniDict
+ Order string
+ PageNum int
+ PageSize int
+ Orm *gorm.DB
+ }
+)
+
+func (slf MiniDict) TableName() string {
+ return "mini_dict"
+}
+
+func NewMiniDictSearch() *MiniDictSearch {
+ return &MiniDictSearch{Orm: global.GVA_DB}
+}
+
+func (slf *MiniDictSearch) SetOrm(tx *gorm.DB) *MiniDictSearch {
+ slf.Orm = tx
+ return slf
+}
+
+func (slf *MiniDictSearch) SetPage(page, size int) *MiniDictSearch {
+ slf.PageNum, slf.PageSize = page, size
+ return slf
+}
+
+func (slf *MiniDictSearch) SetOrder(order string) *MiniDictSearch {
+ slf.Order = order
+ return slf
+}
+
+func (slf *MiniDictSearch) SetID(id uint) *MiniDictSearch {
+ slf.ID = id
+ return slf
+}
+
+func (slf *MiniDictSearch) SetType(tp constvar.MiniDictType) *MiniDictSearch {
+ slf.Type = tp
+ return slf
+}
+
+func (slf *MiniDictSearch) SetName(name string) *MiniDictSearch {
+ slf.Name = name
+ return slf
+}
+
+func (slf *MiniDictSearch) SetValue(value string) *MiniDictSearch {
+ slf.Value = value
+ return slf
+}
+
+func (slf *MiniDictSearch) build() *gorm.DB {
+ var db = slf.Orm.Table(slf.TableName())
+
+ if slf.ID > 0 {
+ db = db.Where("id = ?", slf.ID)
+ }
+
+ if slf.Type > 0 {
+ db = db.Where("type = ?", slf.Type)
+ }
+
+ if slf.Name != "" {
+ db = db.Where("name = ?", slf.Name)
+ }
+
+ if slf.Value != "" {
+ db = db.Where("value = ?", slf.Value)
+ }
+
+ db.Where("1 = 1")
+ if slf.Order != "" {
+ db = db.Order(slf.Order)
+ }
+
+ return db
+}
+
+// Create 鍗曟潯鎻掑叆
+func (slf *MiniDictSearch) Create(record *MiniDict) error {
+ var db = slf.build()
+
+ if err := db.Create(record).Error; err != nil {
+ return fmt.Errorf("create err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+// CreateBatch 鎵归噺鎻掑叆
+func (slf *MiniDictSearch) CreateBatch(records []*MiniDict) error {
+ var db = slf.build()
+
+ if err := db.Create(&records).Error; err != nil {
+ return fmt.Errorf("create batch err: %v, records: %+v", err, records)
+ }
+
+ return nil
+}
+
+func (slf *MiniDictSearch) Save(record *MiniDict) error {
+ var db = slf.build()
+
+ if err := db.Omit("CreatedAt").Save(record).Error; err != nil {
+ return fmt.Errorf("save err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+func (slf *MiniDictSearch) UpdateByMap(upMap map[string]interface{}) error {
+ var (
+ db = slf.build()
+ )
+
+ if err := db.Updates(upMap).Error; err != nil {
+ return fmt.Errorf("update by map err: %v, upMap: %+v", err, upMap)
+ }
+
+ return nil
+}
+
+func (slf *MiniDictSearch) UpdateByQuery(query string, args []interface{}, upMap map[string]interface{}) error {
+ var (
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if err := db.Updates(upMap).Error; err != nil {
+ return fmt.Errorf("update by query err: %v, query: %s, args: %+v, upMap: %+v", err, query, args, upMap)
+ }
+
+ return nil
+}
+
+func (slf *MiniDictSearch) Delete() error {
+ var db = slf.build()
+
+ if err := db.Unscoped().Delete(&MiniDict{}).Error; err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (slf *MiniDictSearch) First() (*MiniDict, error) {
+ var (
+ record = new(MiniDict)
+ db = slf.build()
+ )
+
+ if err := db.First(record).Error; err != nil {
+ return record, err
+ }
+
+ return record, nil
+}
+
+func (slf *MiniDictSearch) Find() ([]*MiniDict, int64, error) {
+ var (
+ records = make([]*MiniDict, 0)
+ total int64
+ db = slf.build()
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, total, nil
+}
+
+func (slf *MiniDictSearch) FindNotTotal() ([]*MiniDict, error) {
+ var (
+ records = make([]*MiniDict, 0)
+ db = slf.build()
+ )
+
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, nil
+}
+
+// FindByQuery 鎸囧畾鏉′欢鏌ヨ.
+func (slf *MiniDictSearch) FindByQuery(query string, args []interface{}) ([]*MiniDict, int64, error) {
+ var (
+ records = make([]*MiniDict, 0)
+ total int64
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find by query count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find by query records err: %v, query: %s, args: %+v", err, query, args)
+ }
+
+ return records, total, nil
+}
+
+// FindByQueryNotTotal 鎸囧畾鏉′欢鏌ヨ&涓嶆煡璇㈡�绘潯鏁�.
+func (slf *MiniDictSearch) FindByQueryNotTotal(query string, args []interface{}) ([]*MiniDict, error) {
+ var (
+ records = make([]*MiniDict, 0)
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find by query records err: %v, query: %s, args: %+v", err, query, args)
+ }
+
+ return records, nil
+}
+
+// InitDefaultData 鍒濆鍖栨暟鎹�
+func (slf *MiniDictSearch) InitDefaultData() error {
+ var (
+ db = slf.Orm.Table(slf.TableName())
+ total int64 = 0
+ )
+ if err := db.Where("type = ?", constvar.EarlyWarningDay).Count(&total).Error; err != nil {
+ return err
+ }
+ if total != 0 {
+ return nil
+ }
+ dict := make([]*MiniDict, 0)
+ dict = append(dict, &MiniDict{Type: constvar.EarlyWarningDay, Name: "3", Value: "棰勮澶╂暟"})
+ dict = append(dict, &MiniDict{Type: constvar.EarlyWarningDay, Name: "1", Value: "鐗╂枡鍖归厤鏉′欢"})
+ err := slf.CreateBatch(dict)
+ return err
+}
diff --git a/model/outsourcing/outsourcing_enterprise.go b/model/outsourcing/outsourcing_enterprise.go
new file mode 100644
index 0000000..4adef45
--- /dev/null
+++ b/model/outsourcing/outsourcing_enterprise.go
@@ -0,0 +1,280 @@
+package models
+
+import (
+ "fmt"
+ "gorm.io/gorm"
+ "srm/constvar"
+ "srm/global"
+)
+
+type (
+ // OutsourcingEnterprise 濮斿浼佷笟
+ OutsourcingEnterprise struct {
+ gorm.Model
+ Number string `json:"number" gorm:"unique;type:varchar(255);not null;comment:濮斿浼佷笟缂栧彿"` //濮斿浼佷笟缂栧彿
+ Name string `json:"name" gorm:"type:varchar(255);not null;comment:濮斿浼佷笟鍚嶇О"` //濮斿浼佷笟缂栧彿鍚嶇О
+ EnterpriseType string `json:"enterpriseType" gorm:"type:varchar(255);not null;comment:浼佷笟绫诲瀷"` //浼佷笟绫诲瀷
+ Contact string `json:"contact" gorm:"type:varchar(255);not null;comment:鑱旂郴浜�"` //鑱旂郴浜�
+ Tel string `json:"tel" gorm:"type:varchar(255);not null;comment:鑱旂郴鏂瑰紡"` //鑱旂郴鏂瑰紡
+ Address string `json:"address" gorm:"type:varchar(255);not null;comment:鍦板潃"` //鍦板潃
+ CreditGrade string `json:"creditGrade" gorm:"type:varchar(255);not null;comment:淇$敤绛夌骇"` //淇$敤绛夌骇
+ SupplyCapacity string `json:"supplyCapacity" gorm:"type:varchar(255);not null;comment:渚涜揣鑳藉姏"` //渚涜揣鑳藉姏
+ OrganizationCode string `json:"organizationCode" gorm:"type:varchar(255);not null;comment:缁勭粐鏈烘瀯浠g爜"` //缁勭粐鏈烘瀯浠g爜
+ SupplyRange string `json:"supplyRange" gorm:"type:varchar(255);not null;comment:渚涜揣鑼冨洿"` //渚涜揣鑼冨洿
+ Status constvar.RecordStatus `json:"status" gorm:"type:tinyint(1);not null;default:0;comment:鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤"` //鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤
+ }
+
+ OutsourcingEnterpriseSearch struct {
+ OutsourcingEnterprise
+ Preload bool
+ Order string
+ PageNum int
+ PageSize int
+ Orm *gorm.DB
+ Keyword string
+ }
+)
+
+func (slf OutsourcingEnterprise) TableName() string {
+ return "outsourcing_enterprise"
+}
+
+func NewOutsourcingEnterpriseSearch() *OutsourcingEnterpriseSearch {
+ return &OutsourcingEnterpriseSearch{Orm: global.GVA_DB}
+}
+
+func (slf *OutsourcingEnterpriseSearch) SetOrm(tx *gorm.DB) *OutsourcingEnterpriseSearch {
+ slf.Orm = tx
+ return slf
+}
+
+func (slf *OutsourcingEnterpriseSearch) SetPage(page, size int) *OutsourcingEnterpriseSearch {
+ slf.PageNum, slf.PageSize = page, size
+ return slf
+}
+
+func (slf *OutsourcingEnterpriseSearch) SetOrder(order string) *OutsourcingEnterpriseSearch {
+ slf.Order = order
+ return slf
+}
+
+func (slf *OutsourcingEnterpriseSearch) SetID(id uint) *OutsourcingEnterpriseSearch {
+ slf.ID = id
+ return slf
+}
+
+func (slf *OutsourcingEnterpriseSearch) SetStatus(status constvar.RecordStatus) *OutsourcingEnterpriseSearch {
+ slf.Status = status
+ return slf
+}
+
+func (slf *OutsourcingEnterpriseSearch) SetNumber(number string) *OutsourcingEnterpriseSearch {
+ slf.Number = number
+ return slf
+}
+
+func (slf *OutsourcingEnterpriseSearch) SetKeyword(keyword string) *OutsourcingEnterpriseSearch {
+ slf.Keyword = keyword
+ return slf
+}
+
+func (slf *OutsourcingEnterpriseSearch) SetPreload(preload bool) *OutsourcingEnterpriseSearch {
+ slf.Preload = preload
+ return slf
+}
+
+func (slf *OutsourcingEnterpriseSearch) build() *gorm.DB {
+ var db = slf.Orm.Table(slf.TableName())
+
+ if slf.ID != 0 {
+ db = db.Where("id = ?", slf.ID)
+ }
+
+ if slf.Number != "" {
+ db = db.Where("number = ?", slf.Number)
+ }
+
+ if slf.Order != "" {
+ db = db.Order(slf.Order)
+ }
+
+ if slf.Keyword != "" {
+ keywordFmt := fmt.Sprintf("%%%s%%", slf.Keyword)
+ db = db.Where("name like ? or number like ? or enterprise_type like ?", keywordFmt, keywordFmt, keywordFmt)
+ }
+
+ if slf.Status != 0 {
+ db = db.Where("status = ?", slf.Status)
+ }
+
+ return db
+}
+
+// Create 鍗曟潯鎻掑叆
+func (slf *OutsourcingEnterpriseSearch) Create(record *OutsourcingEnterprise) error {
+ var db = slf.build()
+
+ if err := db.Create(record).Error; err != nil {
+ return fmt.Errorf("create err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+// CreateBatch 鎵归噺鎻掑叆
+func (slf *OutsourcingEnterpriseSearch) CreateBatch(records []*OutsourcingEnterprise) error {
+ var db = slf.build()
+
+ if err := db.Create(&records).Error; err != nil {
+ return fmt.Errorf("create batch err: %v, records: %+v", err, records)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingEnterpriseSearch) Save(record *OutsourcingEnterprise) error {
+ var db = slf.build()
+
+ if err := db.Omit("CreatedAt").Save(record).Error; err != nil {
+ return fmt.Errorf("save err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingEnterpriseSearch) UpdateByMap(upMap map[string]interface{}) error {
+ var (
+ db = slf.build()
+ )
+
+ if err := db.Updates(upMap).Error; err != nil {
+ return fmt.Errorf("update by map err: %v, upMap: %+v", err, upMap)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingEnterpriseSearch) UpdateByQuery(query string, args []interface{}, upMap map[string]interface{}) error {
+ var (
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if err := db.Updates(upMap).Error; err != nil {
+ return fmt.Errorf("update by query err: %v, query: %s, args: %+v, upMap: %+v", err, query, args, upMap)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingEnterpriseSearch) Delete() error {
+ var db = slf.build()
+
+ if err := db.Unscoped().Delete(&OutsourcingEnterprise{}).Error; err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingEnterpriseSearch) First() (*OutsourcingEnterprise, error) {
+ var (
+ record = new(OutsourcingEnterprise)
+ db = slf.build()
+ )
+
+ if err := db.First(record).Error; err != nil {
+ return record, err
+ }
+
+ return record, nil
+}
+
+func (slf *OutsourcingEnterpriseSearch) Find() ([]*OutsourcingEnterprise, int64, error) {
+ var (
+ records = make([]*OutsourcingEnterprise, 0)
+ total int64
+ db = slf.build()
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, total, nil
+}
+
+func (slf *OutsourcingEnterpriseSearch) FindNotTotal() ([]*OutsourcingEnterprise, error) {
+ var (
+ records = make([]*OutsourcingEnterprise, 0)
+ db = slf.build()
+ )
+
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, nil
+}
+
+// FindByQuery 鎸囧畾鏉′欢鏌ヨ.
+func (slf *OutsourcingEnterpriseSearch) FindByQuery(query string, args []interface{}) ([]*OutsourcingEnterprise, int64, error) {
+ var (
+ records = make([]*OutsourcingEnterprise, 0)
+ total int64
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find by query count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find by query records err: %v, query: %s, args: %+v", err, query, args)
+ }
+
+ return records, total, nil
+}
+
+// FindByQueryNotTotal 鎸囧畾鏉′欢鏌ヨ&涓嶆煡璇㈡�绘潯鏁�.
+func (slf *OutsourcingEnterpriseSearch) FindByQueryNotTotal(query string, args []interface{}) ([]*OutsourcingEnterprise, error) {
+ var (
+ records = make([]*OutsourcingEnterprise, 0)
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find by query records err: %v, query: %s, args: %+v", err, query, args)
+ }
+
+ return records, nil
+}
+
+type CountGroupByStatus struct {
+ Status int
+ Total int64
+}
+
+func (slf *OutsourcingEnterpriseSearch) CountGroupByStatus() ([]CountGroupByStatus, error) {
+ var (
+ records = make([]CountGroupByStatus, 0)
+ db = slf.build()
+ )
+ if err := db.Select("count(status) as total, status").Group("status").Find(&records).Error; err != nil {
+ return nil, fmt.Errorf("CountGroupByStatus err: %v", err)
+ }
+ return records, nil
+}
diff --git a/model/outsourcing/outsourcing_material_apply.go b/model/outsourcing/outsourcing_material_apply.go
new file mode 100644
index 0000000..0073987
--- /dev/null
+++ b/model/outsourcing/outsourcing_material_apply.go
@@ -0,0 +1,104 @@
+package models
+
+import (
+ "fmt"
+ "github.com/shopspring/decimal"
+ "gorm.io/gorm"
+ "srm/global"
+)
+
+type (
+ OutsourcingMaterialApply struct {
+ gorm.Model
+ OutsourcingOrderNumber string `json:"outsourcingOrderNumber" gorm:"type:varchar(255);comment:濮斿璁㈠崟缂栫爜"`
+ MaterialNumber string `json:"materialNumber" gorm:"type:varchar(191);comment:鐗╂枡缂栫爜"`
+ MaterialName string `json:"materialName" gorm:"type:varchar(191);comment:鐗╂枡鍚嶇О"`
+ Unit string `json:"unit" gorm:"type:varchar(100);comment:鍗曚綅"`
+ Specs string `gorm:"type:varchar(191);comment:鐗╂枡瑙勬牸" json:"specs"`
+ Type string `gorm:"type:varchar(191);comment:鐗╂枡鍨嬪彿" json:"type"`
+ Amount decimal.Decimal `gorm:"type:decimal(35,18);comment:鏁伴噺" json:"amount"`
+ }
+ OutsourcingMaterialApplySearch struct {
+ OutsourcingMaterialApply
+ PageNum int
+ PageSize int
+ Orm *gorm.DB
+ }
+)
+
+func (slf OutsourcingMaterialApply) TableName() string {
+ return "outsourcing_material_apply"
+}
+
+func NewOutsourcingMaterialApplySearch() *OutsourcingMaterialApplySearch {
+ return &OutsourcingMaterialApplySearch{Orm: global.GVA_DB}
+}
+
+func (slf *OutsourcingMaterialApplySearch) SetOrm(tx *gorm.DB) *OutsourcingMaterialApplySearch {
+ slf.Orm = tx
+ return slf
+}
+
+func (slf *OutsourcingMaterialApplySearch) SetPage(page, size int) *OutsourcingMaterialApplySearch {
+ slf.PageNum, slf.PageSize = page, size
+ return slf
+}
+
+func (slf *OutsourcingMaterialApplySearch) SetOutsourcingOrderNumber(number string) *OutsourcingMaterialApplySearch {
+ slf.OutsourcingOrderNumber = number
+ return slf
+}
+
+func (slf *OutsourcingMaterialApplySearch) build() *gorm.DB {
+ var db = slf.Orm.Table(slf.TableName())
+
+ if slf.OutsourcingOrderNumber != "" {
+ db = db.Where("outsourcing_order_number = ?", slf.OutsourcingOrderNumber)
+ }
+
+ return db
+}
+
+// CreateBatch 鎵归噺鎻掑叆
+func (slf *OutsourcingMaterialApplySearch) CreateBatch(records []*OutsourcingMaterialApply) error {
+ var db = slf.build()
+
+ if err := db.Create(&records).Error; err != nil {
+ return fmt.Errorf("create batch err: %v, records: %+v", err, records)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingMaterialApplySearch) Find() ([]*OutsourcingMaterialApply, int64, error) {
+ var (
+ records = make([]*OutsourcingMaterialApply, 0)
+ total int64
+ db = slf.build()
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, total, nil
+}
+
+func (slf *OutsourcingMaterialApplySearch) FindNotTotal() ([]*OutsourcingMaterialApply, error) {
+ var (
+ records = make([]*OutsourcingMaterialApply, 0)
+ db = slf.build()
+ )
+
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, nil
+}
diff --git a/model/outsourcing/outsourcing_order.go b/model/outsourcing/outsourcing_order.go
new file mode 100644
index 0000000..81e2679
--- /dev/null
+++ b/model/outsourcing/outsourcing_order.go
@@ -0,0 +1,294 @@
+package models
+
+import (
+ "fmt"
+ "gorm.io/gorm"
+ "srm/constvar"
+ "srm/global"
+)
+
+type (
+ // OutsourcingOrder 濮斿璁㈠崟
+ OutsourcingOrder struct {
+ gorm.Model
+ ProjectId string `gorm:"type:varchar(191);not null;comment:椤圭洰ID" json:"projectId"`
+ ProjectOrderID string `gorm:"type:varchar(191);not null;comment:椤圭洰璁㈠崟ID" json:"projectOrderID"`
+ Number string `json:"number" gorm:"unique;type:varchar(255);not null;comment:璁㈠崟缂栧彿"` //璁㈠崟缂栧彿
+ SalesDetailsNumber string `gorm:"index;type:varchar(191);not null;comment:閿�鍞槑缁嗙紪鐮�" json:"salesDetailsNumber"`
+ ProductQuantity int64 `json:"productQuantity" gorm:"not null;default:0;comment:浜у搧鏁伴噺"` //浜у搧鏁伴噺
+ SignTime string `gorm:"type:varchar(191);comment:绛惧崟鏃堕棿" json:"signTime"`
+ DeliveryDate string `gorm:"type:varchar(191);comment:浜よ揣鏃ユ湡" json:"deliveryDate"`
+ EnterpriseID uint `gorm:"type:int;not null;default:0;comment:渚涘簲鍟咺D" json:"enterpriseID"` //渚涘簲鍟咺D
+ EnterpriseName string `json:"enterpriseName" gorm:"type:varchar(255);not null;default:'';comment:渚涘簲鍟嗗悕绉�"` //渚涘簲鍟嗗悕绉�
+ EnterpriseType string `json:"enterpriseType" gorm:"type:varchar(255);not null;default:'';comment:渚涘簲鍟嗙被鍨�"` //渚涘簲鍟嗙被鍨�
+ Status constvar.OutsourcingOrderStatus `json:"status" gorm:"type:tinyint(1);not null;default:0;comment:鐘舵��"` //鐘舵��
+ Reason string `json:"reason" gorm:"type:varchar(255);comment:涓嶉�氳繃鐞嗙敱"`
+ }
+
+ OutsourcingOrderSearch struct {
+ OutsourcingOrder
+ Preload bool
+ Order string
+ PageNum int
+ PageSize int
+ Numbers []string
+ Orm *gorm.DB
+ Keyword string
+ IDs []uint
+ }
+)
+
+func (slf OutsourcingOrder) TableName() string {
+ return "outsourcing_order"
+}
+
+func NewOutsourcingOrderSearch() *OutsourcingOrderSearch {
+ return &OutsourcingOrderSearch{Orm: global.GVA_DB}
+}
+
+func (slf *OutsourcingOrderSearch) SetOrm(tx *gorm.DB) *OutsourcingOrderSearch {
+ slf.Orm = tx
+ return slf
+}
+
+func (slf *OutsourcingOrderSearch) SetPage(page, size int) *OutsourcingOrderSearch {
+ slf.PageNum, slf.PageSize = page, size
+ return slf
+}
+
+func (slf *OutsourcingOrderSearch) SetOrder(order string) *OutsourcingOrderSearch {
+ slf.Order = order
+ return slf
+}
+
+func (slf *OutsourcingOrderSearch) SetID(id uint) *OutsourcingOrderSearch {
+ slf.ID = id
+ return slf
+}
+
+func (slf *OutsourcingOrderSearch) SetIDs(ids []uint) *OutsourcingOrderSearch {
+ slf.IDs = ids
+ return slf
+}
+
+func (slf *OutsourcingOrderSearch) SetNumber(number string) *OutsourcingOrderSearch {
+ slf.Number = number
+ return slf
+}
+func (slf *OutsourcingOrderSearch) SetNumbers(numbers []string) *OutsourcingOrderSearch {
+ slf.Numbers = numbers
+ return slf
+}
+
+func (slf *OutsourcingOrderSearch) SetKeyword(keyword string) *OutsourcingOrderSearch {
+ slf.Keyword = keyword
+ return slf
+}
+
+func (slf *OutsourcingOrderSearch) SetPreload(preload bool) *OutsourcingOrderSearch {
+ slf.Preload = preload
+ return slf
+}
+
+func (slf *OutsourcingOrderSearch) build() *gorm.DB {
+ var db = slf.Orm.Table(slf.TableName())
+
+ if slf.ID != 0 {
+ db = db.Where("id = ?", slf.ID)
+ }
+
+ if len(slf.IDs) != 0 {
+ db = db.Where("id in ?", slf.IDs)
+ }
+
+ if slf.Number != "" {
+ db = db.Where("number = ?", slf.Number)
+ }
+
+ if slf.SalesDetailsNumber != "" {
+ db = db.Where("sales_details_number = ?", slf.SalesDetailsNumber)
+ }
+
+ if len(slf.Numbers) > 0 {
+ db = db.Where("number in (?)", slf.Numbers)
+ }
+
+ if slf.Order != "" {
+ db = db.Order(slf.Order)
+ }
+
+ if slf.Keyword != "" {
+ keywordFmt := fmt.Sprintf("%%%s%%", slf.Keyword)
+ db = db.Where("number like ? or sales_details_number like ? or enterprise_name like ? or enterprise_type like ?", keywordFmt, keywordFmt, keywordFmt, keywordFmt)
+ }
+ return db
+}
+
+// Create 鍗曟潯鎻掑叆
+func (slf *OutsourcingOrderSearch) Create(record *OutsourcingOrder) error {
+ var db = slf.build()
+
+ if err := db.Create(record).Error; err != nil {
+ return fmt.Errorf("create err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+// CreateBatch 鎵归噺鎻掑叆
+func (slf *OutsourcingOrderSearch) CreateBatch(records []*OutsourcingOrder) error {
+ var db = slf.build()
+
+ if err := db.Create(&records).Error; err != nil {
+ return fmt.Errorf("create batch err: %v, records: %+v", err, records)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderSearch) Save(record *OutsourcingOrder) error {
+ var db = slf.build()
+
+ if err := db.Omit("CreatedAt").Save(record).Error; err != nil {
+ return fmt.Errorf("save err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderSearch) UpdateByMap(upMap map[string]interface{}) error {
+ var (
+ db = slf.build()
+ )
+
+ if err := db.Updates(upMap).Error; err != nil {
+ return fmt.Errorf("update by map err: %v, upMap: %+v", err, upMap)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderSearch) UpdateByQuery(query string, args []interface{}, upMap map[string]interface{}) error {
+ var (
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if err := db.Updates(upMap).Error; err != nil {
+ return fmt.Errorf("update by query err: %v, query: %s, args: %+v, upMap: %+v", err, query, args, upMap)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderSearch) Delete() error {
+ var db = slf.build()
+
+ if err := db.Unscoped().Delete(&OutsourcingOrder{}).Error; err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderSearch) First() (*OutsourcingOrder, error) {
+ var (
+ record = new(OutsourcingOrder)
+ db = slf.build()
+ )
+
+ if err := db.First(record).Error; err != nil {
+ return record, err
+ }
+
+ return record, nil
+}
+
+func (slf *OutsourcingOrderSearch) Find() ([]*OutsourcingOrder, int64, error) {
+ var (
+ records = make([]*OutsourcingOrder, 0)
+ total int64
+ db = slf.build()
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, total, nil
+}
+
+func (slf *OutsourcingOrderSearch) FindNotTotal() ([]*OutsourcingOrder, error) {
+ var (
+ records = make([]*OutsourcingOrder, 0)
+ db = slf.build()
+ )
+
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, nil
+}
+
+// FindByQuery 鎸囧畾鏉′欢鏌ヨ.
+func (slf *OutsourcingOrderSearch) FindByQuery(query string, args []interface{}) ([]*OutsourcingOrder, int64, error) {
+ var (
+ records = make([]*OutsourcingOrder, 0)
+ total int64
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find by query count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find by query records err: %v, query: %s, args: %+v", err, query, args)
+ }
+
+ return records, total, nil
+}
+
+// FindByQueryNotTotal 鎸囧畾鏉′欢鏌ヨ&涓嶆煡璇㈡�绘潯鏁�.
+func (slf *OutsourcingOrderSearch) FindByQueryNotTotal(query string, args []interface{}) ([]*OutsourcingOrder, error) {
+ var (
+ records = make([]*OutsourcingOrder, 0)
+ db = slf.Orm.Table(slf.TableName()).Where(query, args...)
+ )
+
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find by query records err: %v, query: %s, args: %+v", err, query, args)
+ }
+
+ return records, nil
+}
+
+type CountOutSourcingOrderGroupByStatus struct {
+ Status int
+ Total int64
+}
+
+func (slf *OutsourcingOrderSearch) CountGroupByStatus() ([]CountOutSourcingOrderGroupByStatus, error) {
+ var (
+ records = make([]CountOutSourcingOrderGroupByStatus, 0)
+ db = slf.build()
+ )
+ if err := db.Select("count(status) as total, status").Group("status").Find(&records).Error; err != nil {
+ return nil, fmt.Errorf("CountGroupByStatus err: %v", err)
+ }
+ return records, nil
+}
diff --git a/model/outsourcing/outsourcing_order_delivery.go b/model/outsourcing/outsourcing_order_delivery.go
new file mode 100644
index 0000000..d5b43d1
--- /dev/null
+++ b/model/outsourcing/outsourcing_order_delivery.go
@@ -0,0 +1,100 @@
+package models
+
+import (
+ "fmt"
+ "gorm.io/gorm"
+ "srm/global"
+)
+
+type (
+ OutsourcingOrderDelivery struct {
+ gorm.Model
+ OutsourcingOrderID uint `json:"outsourcingOrderID" gorm:"comment:濮斿璁㈠崟ID"`
+ Number string `json:"number" gorm:"type:varchar(255);comment:鍙戣揣鍗曞彿"` //鍙戣揣鍗曞彿
+ Carrier string `json:"carrier" gorm:"type:varchar(255);comment:鎵胯繍鍟�"` //鎵胯繍鍟�
+ WaybillNumber string `json:"waybillNumber" gorm:"type:varchar(255);comment:杩愬崟鍙�"` //杩愬崟鍙�
+ }
+ OutsourcingOrderDeliverySearch struct {
+ OutsourcingOrderDelivery
+ PageNum int
+ PageSize int
+ Orm *gorm.DB
+ }
+)
+
+func (slf OutsourcingOrderDelivery) TableName() string {
+ return "outsourcing_order_delivery"
+}
+
+func NewOutsourcingOrderDeliverySearch() *OutsourcingOrderDeliverySearch {
+ return &OutsourcingOrderDeliverySearch{Orm: global.GVA_DB}
+}
+
+func (slf *OutsourcingOrderDeliverySearch) SetOrm(tx *gorm.DB) *OutsourcingOrderDeliverySearch {
+ slf.Orm = tx
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliverySearch) SetPage(page, size int) *OutsourcingOrderDeliverySearch {
+ slf.PageNum, slf.PageSize = page, size
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliverySearch) SetOutsourcingOrderID(id uint) *OutsourcingOrderDeliverySearch {
+ slf.OutsourcingOrderID = id
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliverySearch) build() *gorm.DB {
+ var db = slf.Orm.Table(slf.TableName())
+
+ if slf.OutsourcingOrderID != 0 {
+ db = db.Where("outsourcing_order_id = ?", slf.OutsourcingOrderID)
+ }
+
+ return db
+}
+
+// Create 鍗曟潯鎻掑叆
+func (slf *OutsourcingOrderDeliverySearch) Create(record *OutsourcingOrderDelivery) error {
+ var db = slf.build()
+
+ if err := db.Create(record).Error; err != nil {
+ return fmt.Errorf("create err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderDeliverySearch) Find() ([]*OutsourcingOrderDelivery, int64, error) {
+ var (
+ records = make([]*OutsourcingOrderDelivery, 0)
+ total int64
+ db = slf.build()
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, total, nil
+}
+
+func (slf *OutsourcingOrderDeliverySearch) FindNotTotal() ([]*OutsourcingOrderDelivery, error) {
+ var (
+ records = make([]*OutsourcingOrderDelivery, 0)
+ db = slf.build()
+ )
+
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, nil
+}
diff --git a/model/outsourcing/outsourcing_order_delivery_details.go b/model/outsourcing/outsourcing_order_delivery_details.go
new file mode 100644
index 0000000..f282bfc
--- /dev/null
+++ b/model/outsourcing/outsourcing_order_delivery_details.go
@@ -0,0 +1,165 @@
+package models
+
+import (
+ "fmt"
+ "github.com/shopspring/decimal"
+ "gorm.io/gorm"
+ "srm/constvar"
+ "srm/global"
+)
+
+type (
+ OutsourcingOrderDeliveryDetails struct {
+ gorm.Model
+ OutsourcingOrderID uint `json:"outsourcingOrderID" gorm:"comment:濮斿璁㈠崟ID"` //濮斿璁㈠崟ID
+ OutsourcingOrderDeliveryID uint `json:"outsourcingOrderDeliveryID" gorm:"comment:鍙戣揣ID"` //濮斿璁㈠崟鍙戣揣琛↖D
+ OutsourcingOrderDelivery OutsourcingOrderDelivery `json:"outsourcingOrderDelivery" gorm:"foreignkey:OutsourcingOrderDeliveryID"`
+ OutsourcingOrderProductID uint `json:"outsourcingOrderProductID" gorm:"comment:濮斿璁㈠崟浜у搧琛↖D"` //濮斿璁㈠崟浜у搧琛↖D
+ OutsourcingOrderProduct OutsourcingOrderProduct `json:"outsourcingOrderProduct" gorm:"foreignkey:OutsourcingOrderProductID"`
+ SendAmount decimal.Decimal `gorm:"type:decimal(18,2);comment:鏁伴噺" json:"sendAmount"` //鍙戣揣鏁伴噺
+ IsReceived constvar.BoolType `gorm:"type:int(11);default:2;comment:鏄惁鏀惰揣" json:"isReceived"` //鏄惁纭鏀惰揣 1 纭 2鏈‘璁�
+ }
+ OutsourcingOrderDeliveryDetailsSearch struct {
+ OutsourcingOrderDeliveryDetails
+ PageNum int
+ PageSize int
+ Orm *gorm.DB
+ Order string
+ Preload bool
+ IDs []uint
+ }
+)
+
+func (slf OutsourcingOrderDeliveryDetails) TableName() string {
+ return "outsourcing_order_delivery_details"
+}
+
+func NewOutsourcingOrderDeliveryDetailsSearch() *OutsourcingOrderDeliveryDetailsSearch {
+ return &OutsourcingOrderDeliveryDetailsSearch{Orm: global.GVA_DB}
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) SetOrm(tx *gorm.DB) *OutsourcingOrderDeliveryDetailsSearch {
+ slf.Orm = tx
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) SetOrder(order string) *OutsourcingOrderDeliveryDetailsSearch {
+ slf.Order = order
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) SetPage(page, size int) *OutsourcingOrderDeliveryDetailsSearch {
+ slf.PageNum, slf.PageSize = page, size
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) SetOutsourcingOrderDeliveryID(id uint) *OutsourcingOrderDeliveryDetailsSearch {
+ slf.OutsourcingOrderDeliveryID = id
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) SetOutsourcingOrderID(id uint) *OutsourcingOrderDeliveryDetailsSearch {
+ slf.OutsourcingOrderID = id
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) SetPreload(preload bool) *OutsourcingOrderDeliveryDetailsSearch {
+ slf.Preload = preload
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) SetIds(ids []uint) *OutsourcingOrderDeliveryDetailsSearch {
+ slf.IDs = ids
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) SetIsReceived(isReceived constvar.BoolType) *OutsourcingOrderDeliveryDetailsSearch {
+ slf.IsReceived = isReceived
+ return slf
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) build() *gorm.DB {
+ var db = slf.Orm.Table(slf.TableName())
+
+ if slf.OutsourcingOrderDeliveryID != 0 {
+ db = db.Where("outsourcing_order_delivery_id = ?", slf.OutsourcingOrderDeliveryID)
+ }
+
+ if slf.OutsourcingOrderID != 0 {
+ db = db.Where("outsourcing_order_id = ?", slf.OutsourcingOrderID)
+ }
+
+ if slf.Order != "" {
+ db = db.Order(slf.Order)
+ }
+
+ if len(slf.IDs) != 0 {
+ db = db.Where("id in ?", slf.IDs)
+ }
+
+ if slf.IsReceived != 0 {
+ db = db.Where("is_received = ?", slf.IsReceived)
+ }
+
+ if slf.Preload {
+ db = db.Preload("OutsourcingOrderDelivery").Preload("OutsourcingOrderProduct")
+ }
+
+ return db
+}
+
+// CreateBatch 鎵归噺鎻掑叆
+func (slf *OutsourcingOrderDeliveryDetailsSearch) CreateBatch(records []*OutsourcingOrderDeliveryDetails) error {
+ var db = slf.build()
+
+ if err := db.Create(&records).Error; err != nil {
+ return fmt.Errorf("create batch err: %v, records: %+v", err, records)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) Find() ([]*OutsourcingOrderDeliveryDetails, int64, error) {
+ var (
+ records = make([]*OutsourcingOrderDeliveryDetails, 0)
+ total int64
+ db = slf.build()
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, total, nil
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) FindNotTotal() ([]*OutsourcingOrderDeliveryDetails, error) {
+ var (
+ records = make([]*OutsourcingOrderDeliveryDetails, 0)
+ db = slf.build()
+ )
+
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, nil
+}
+
+func (slf *OutsourcingOrderDeliveryDetailsSearch) UpdateByMap(upMap map[string]interface{}) error {
+ var (
+ db = slf.build()
+ )
+
+ if err := db.Updates(upMap).Error; err != nil {
+ return fmt.Errorf("update by map err: %v, upMap: %+v", err, upMap)
+ }
+
+ return nil
+}
diff --git a/model/outsourcing/outsourcing_order_product.go b/model/outsourcing/outsourcing_order_product.go
new file mode 100644
index 0000000..dd2f3aa
--- /dev/null
+++ b/model/outsourcing/outsourcing_order_product.go
@@ -0,0 +1,248 @@
+package models
+
+import (
+ "fmt"
+ "gorm.io/gorm"
+ "srm/global"
+)
+
+type (
+ // OutsourcingOrderProduct 濮斿璁㈠崟浜у搧琛�
+ OutsourcingOrderProduct struct {
+ gorm.Model
+ OutsourcingOrderID uint `gorm:"index;not null;comment:濮斿璁㈠崟ID" json:"outsourcingOrderID"`
+ EnterpriseID uint `gorm:"type:int;not null;default:0;comment:渚涘簲鍟咺D" json:"enterpriseID" ` //渚涘簲鍟咺D
+ ProductId string `gorm:"type:varchar(191);comment:浜у搧id" json:"productId"`
+ ProductName string `gorm:"type:varchar(191);comment:浜у搧鍚嶇О" json:"productName"`
+ Specs string `gorm:"type:varchar(191);comment:鐗╂枡瑙勬牸" json:"specs"`
+ Type string `gorm:"type:varchar(191);comment:鐗╂枡鍨嬪彿" json:"type"`
+ Amount int64 `gorm:"type:int(11);comment:璁㈠崟鏁伴噺" json:"amount"`
+ Unit string `gorm:"type:varchar(100);comment:鍗曚綅" json:"unit"`
+ BomID string `gorm:"type:varchar(255);default '';comment:bomID" json:"bomID"`
+ FinishAmount int64 `gorm:"type:int(11);comment:瀹屾垚鏁伴噺" json:"finishAmount"`
+ }
+
+ OutsourcingOrderProductSearch struct {
+ OutsourcingOrderProduct
+ Order string
+ PageNum int
+ PageSize int
+ Orm *gorm.DB
+ IDs []uint
+ OutsourcingOrderIDs []uint
+ }
+)
+
+func (slf OutsourcingOrderProduct) TableName() string {
+ return "outsourcing_order_product"
+}
+
+func NewOutsourcingOrderProductSearch() *OutsourcingOrderProductSearch {
+ return &OutsourcingOrderProductSearch{Orm: global.GVA_DB}
+}
+
+func (slf *OutsourcingOrderProductSearch) SetOrm(tx *gorm.DB) *OutsourcingOrderProductSearch {
+ slf.Orm = tx
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) SetPage(page, size int) *OutsourcingOrderProductSearch {
+ slf.PageNum, slf.PageSize = page, size
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) SetOrder(order string) *OutsourcingOrderProductSearch {
+ slf.Order = order
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) SetId(id uint) *OutsourcingOrderProductSearch {
+ slf.ID = id
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) SetOutsourcingOrderID(id uint) *OutsourcingOrderProductSearch {
+ slf.OutsourcingOrderID = id
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) SetOutsourcingOrderIDs(ids []uint) *OutsourcingOrderProductSearch {
+ slf.OutsourcingOrderIDs = ids
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) SetEnterpriseID(id uint) *OutsourcingOrderProductSearch {
+ slf.EnterpriseID = id
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) SetIds(ids []uint) *OutsourcingOrderProductSearch {
+ slf.IDs = ids
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) SetProductId(productId string) *OutsourcingOrderProductSearch {
+ slf.ProductId = productId
+ return slf
+}
+
+func (slf *OutsourcingOrderProductSearch) build() *gorm.DB {
+ var db = slf.Orm.Table(slf.TableName())
+ if slf.ID != 0 {
+ db = db.Where("id = ?", slf.ID)
+ }
+ if slf.Order != "" {
+ db = db.Order(slf.Order)
+ }
+ if len(slf.IDs) > 0 {
+ db = db.Where("id in ?", slf.IDs)
+ }
+
+ if slf.OutsourcingOrderID != 0 {
+ db = db.Where("outsourcing_order_id = ?", slf.OutsourcingOrderID)
+ }
+
+ if len(slf.OutsourcingOrderIDs) > 0 {
+ db = db.Where("outsourcing_order_id in (?)", slf.OutsourcingOrderIDs)
+ }
+
+ if slf.EnterpriseID != 0 {
+ db = db.Where("enterprise_id = ?", slf.EnterpriseID)
+ }
+
+ if slf.ProductId != "" {
+ db = db.Where("product_id = ?", slf.ProductId)
+ }
+
+ return db
+}
+
+// Create 鍗曟潯鎻掑叆
+func (slf *OutsourcingOrderProductSearch) Create(record *OutsourcingOrderProduct) error {
+ var db = slf.build()
+
+ if err := db.Create(record).Error; err != nil {
+ return fmt.Errorf("create err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+// CreateBatch 鎵归噺鎻掑叆
+func (slf *OutsourcingOrderProductSearch) CreateBatch(records []*OutsourcingOrderProduct) error {
+ var db = slf.build()
+
+ if err := db.Create(&records).Error; err != nil {
+ return fmt.Errorf("create batch err: %v, records: %+v", err, records)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderProductSearch) Save(record *OutsourcingOrderProduct) error {
+ var db = slf.build()
+
+ if err := db.Omit("CreatedAt").Save(record).Error; err != nil {
+ return fmt.Errorf("save err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+func (slf *OutsourcingOrderProductSearch) SaveBatch(record []*OutsourcingOrderProduct) error {
+ var db = slf.build()
+
+ if err := db.Omit("CreatedAt").Save(record).Error; err != nil {
+ return fmt.Errorf("SaveBatch err: %v, record: %+v", err, record)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderProductSearch) UpdateByMap(upMap map[string]interface{}) error {
+ var (
+ db = slf.build()
+ )
+
+ if err := db.Updates(upMap).Error; err != nil {
+ return fmt.Errorf("update by map err: %v, upMap: %+v", err, upMap)
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderProductSearch) Delete() error {
+ var db = slf.build()
+
+ if err := db.Unscoped().Delete(&OutsourcingOrderProduct{}).Error; err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (slf *OutsourcingOrderProductSearch) First() (*OutsourcingOrderProduct, error) {
+ var (
+ record = new(OutsourcingOrderProduct)
+ db = slf.build()
+ )
+
+ if err := db.First(record).Error; err != nil {
+ return record, err
+ }
+
+ return record, nil
+}
+
+func (slf *OutsourcingOrderProductSearch) Find() ([]*OutsourcingOrderProduct, int64, error) {
+ var (
+ records = make([]*OutsourcingOrderProduct, 0)
+ total int64
+ db = slf.build()
+ )
+
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, fmt.Errorf("find count err: %v", err)
+ }
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, total, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, total, nil
+}
+
+func (slf *OutsourcingOrderProductSearch) FindNotTotal() ([]*OutsourcingOrderProduct, error) {
+ var (
+ records = make([]*OutsourcingOrderProduct, 0)
+ db = slf.build()
+ )
+
+ if slf.PageNum*slf.PageSize > 0 {
+ db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+ }
+ if err := db.Find(&records).Error; err != nil {
+ return records, fmt.Errorf("find records err: %v", err)
+ }
+
+ return records, nil
+}
+
+func (slf *OutsourcingOrderProductSearch) Count() (int64, error) {
+ var (
+ total int64
+ db = slf.build()
+ )
+
+ err := db.Count(&total).Error
+ return total, err
+}
+
+func OutsourcingOrderProductMap(records []*OutsourcingOrderProduct) (m map[string]*OutsourcingOrderProduct) {
+ m = make(map[string]*OutsourcingOrderProduct, len(records))
+ for _, record := range records {
+ m[record.ProductId] = record
+ }
+ return m
+}
diff --git a/model/outsourcing/request/outsourcing.go b/model/outsourcing/request/outsourcing.go
new file mode 100644
index 0000000..7833c82
--- /dev/null
+++ b/model/outsourcing/request/outsourcing.go
@@ -0,0 +1,111 @@
+package outsourcingrequest
+
+import (
+ "github.com/shopspring/decimal"
+ "srm/constvar"
+ "srm/model/common/request"
+)
+
+type OutsourcingEnterprise struct {
+ ID uint
+ Number string `json:"number" binding:"required" gorm:"unique;type:varchar(255);not null;comment:濮斿渚涘簲鍟嗙紪鍙�"` //濮斿渚涘簲鍟嗙紪鍙�
+ Name string `json:"name" binding:"required" gorm:"type:varchar(255);not null;comment:濮斿渚涘簲鍟嗙紪鍙峰悕绉�"` //濮斿渚涘簲鍟嗙紪鍙峰悕绉�
+ EnterpriseType string `json:"enterpriseType" binding:"required" gorm:"type:varchar(255);not null;comment:浼佷笟绫诲瀷"` //浼佷笟绫诲瀷
+ Contact string `json:"contact" gorm:"type:varchar(255);not null;comment:鑱旂郴浜�"` //鑱旂郴浜�
+ Tel string `json:"tel" gorm:"type:varchar(255);not null;comment:鑱旂郴鏂瑰紡"` //鑱旂郴鏂瑰紡
+ Address string `json:"address" gorm:"type:varchar(255);not null;comment:鍦板潃"` //鍦板潃
+ CreditGrade string `json:"creditGrade" gorm:"type:varchar(255);not null;comment:淇$敤绛夌骇"` //淇$敤绛夌骇
+ SupplyCapacity string `json:"supplyCapacity" gorm:"type:varchar(255);not null;comment:渚涜揣鑳藉姏"` //渚涜揣鑳藉姏
+ OrganizationCode string `json:"organizationCode" gorm:"type:varchar(255);not null;comment:缁勭粐鏈烘瀯浠g爜"` //缁勭粐鏈烘瀯浠g爜
+ SupplyRange string `json:"supplyRange" gorm:"type:varchar(255);not null;comment:渚涜揣鑼冨洿"` //渚涜揣鑼冨洿
+ Status constvar.RecordStatus `json:"status" gorm:"type:tinyint(1);not null;default:0;comment:鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤"` //鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤
+}
+
+type OutsourcingEnterpriseList struct {
+ request.PageInfo
+ Keyword string `form:"keyword,omitempty"`
+ Status constvar.RecordStatus `form:"status,omitempty"` //鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤
+}
+
+type OutsourcingEnterpriseOverview struct {
+ Total int64 `json:"total"` //鎬婚噺
+ Open int64 `json:"open"` //鍚敤鏁伴噺
+ Close int64 `json:"close"` //鍋滅敤鏁伴噺
+}
+
+type OutsourcingOrderList struct {
+ request.PageInfo
+ Keyword string `form:"keyword,omitempty"`
+}
+
+type OutsourcingOrderOverview struct {
+ Total int64 `json:"total"` //鎬婚噺
+ WaitAssigned int64 `json:"waitAssigned"` //寰呭垎閰嶆暟閲�
+ HasAssigned int64 `json:"hasAssigned"` //宸插垎閰嶆暟閲�
+}
+
+type OutsourcingOrderProductList struct {
+ request.PageInfo
+ OutsourcingOrderId uint `form:"outsourcingOrderId" binding:"required"`
+ Keyword string `form:"keyword,omitempty"`
+}
+
+type OutsourcingEnterpriseProductList struct {
+ request.PageInfo
+ EnterpriseID uint `form:"enterpriseID" binding:"required"`
+ Keyword string `form:"keyword,omitempty"`
+}
+
+type OutsourcingOrderAssign struct {
+ OrderID uint `json:"orderID"`
+ OrderIDs []uint `json:"orderIDs"`
+ EnterpriseID uint `json:"enterpriseID" binding:"required"`
+}
+
+type SaveMaterialApply struct {
+ ApplyList []MaterialApply `json:"applyList"`
+}
+
+type MaterialApply struct {
+ OutsourcingOrderNumber string `json:"outsourcingOrderNumber" gorm:"type:varchar(255);comment:濮斿璁㈠崟缂栫爜"`
+ MaterialNumber string `json:"materialNumber" gorm:"type:varchar(191);comment:鐗╂枡缂栫爜"`
+ MaterialName string `json:"materialName" gorm:"type:varchar(191);comment:鐗╂枡鍚嶇О"`
+ Unit string `json:"unit" gorm:"type:varchar(100);comment:鍗曚綅"`
+ Specs string `gorm:"type:varchar(191);comment:鐗╂枡瑙勬牸" json:"specs"`
+ Type string `gorm:"type:varchar(191);comment:鐗╂枡鍨嬪彿" json:"type"`
+ Amount decimal.Decimal `gorm:"type:decimal(35,18);comment:鏁伴噺" json:"amount"`
+}
+
+type GetMaterialApplyList struct {
+ request.PageInfo
+ Number string `json:"number"` //濮斿璁㈠崟缂栫爜
+}
+
+type ChangeStatus struct {
+ OutsourcingOrderNumber string `json:"outsourcingOrderNumber"` //濮斿璁㈠崟缂栫爜
+ Status constvar.OutsourcingOrderStatus `json:"status"`
+ Reason string `json:"reason"`
+}
+
+type GetDeliveryList struct {
+ OutsourcingOrderID uint `json:"outsourcingOrderID"` //濮斿璁㈠崟ID
+ IsReceived constvar.BoolType `gorm:"type:int(11);default:2;comment:鏄惁鏀惰揣" json:"isReceived"` //鏄惁纭鏀惰揣 1 宸茬‘璁� 2鏈‘璁� 浼�0鎴栦笉浼犺幏鍙栧叏閮�
+}
+
+type ConfirmDeliveryList struct {
+ OutsourcingOrderID uint `json:"outsourcingOrderID"` //濮斿璁㈠崟ID
+ OutsourcingOrderDeliveryDetailsIds []uint `json:"outsourcingOrderDeliveryDetailsIds"` //鍙戣揣璁板綍id
+ WarehouseId string `json:"warehouseId"` //浠撳簱id
+}
+
+type GetInventoryInputDetails struct {
+ OutsourcingOrderID uint `json:"outsourcingOrderID"` //濮斿璁㈠崟ID
+}
+
+// BoolType 甯冨皵绫诲瀷
+type BoolType int
+
+const (
+ BoolTypeTrue BoolType = 1 // true
+ BoolTypeFalse BoolType = 2 // false
+)
diff --git a/proto/common.proto b/proto/common.proto
new file mode 100644
index 0000000..8ac57e1
--- /dev/null
+++ b/proto/common.proto
@@ -0,0 +1,13 @@
+syntax = "proto3";
+option go_package = "srm/proto/common";
+
+enum OperationSource {
+ OperationSourceEmpty = 0; //绌�
+ OperationSourcePurchase = 1; //閲囪喘鍏ュ簱
+ OperationSourceProduction = 2; //鐢熶骇鍏ュ簱
+ OperationSourceOutsourcing = 3; //濮斿鍏ュ簱
+ OperationSourceProductionApply = 4; //鐢熶骇棰嗘枡
+ OperationSourceOutsourcingApply = 5; //濮斿棰嗘枡
+ OperationSourceSaleDelivery = 6; //閿�鍞彂璐�
+}
+
diff --git a/proto/common/common.pb.go b/proto/common/common.pb.go
new file mode 100644
index 0000000..a3cb4c4
--- /dev/null
+++ b/proto/common/common.pb.go
@@ -0,0 +1,154 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.31.0
+// protoc v3.19.0
+// source: common.proto
+
+package common
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type OperationSource int32
+
+const (
+ OperationSource_OperationSourceEmpty OperationSource = 0 //绌�
+ OperationSource_OperationSourcePurchase OperationSource = 1 //閲囪喘鍏ュ簱
+ OperationSource_OperationSourceProduction OperationSource = 2 //鐢熶骇鍏ュ簱
+ OperationSource_OperationSourceOutsourcing OperationSource = 3 //濮斿鍏ュ簱
+ OperationSource_OperationSourceProductionApply OperationSource = 4 //鐢熶骇棰嗘枡
+ OperationSource_OperationSourceOutsourcingApply OperationSource = 5 //濮斿棰嗘枡
+ OperationSource_OperationSourceSaleDelivery OperationSource = 6 //閿�鍞彂璐�
+)
+
+// Enum value maps for OperationSource.
+var (
+ OperationSource_name = map[int32]string{
+ 0: "OperationSourceEmpty",
+ 1: "OperationSourcePurchase",
+ 2: "OperationSourceProduction",
+ 3: "OperationSourceOutsourcing",
+ 4: "OperationSourceProductionApply",
+ 5: "OperationSourceOutsourcingApply",
+ 6: "OperationSourceSaleDelivery",
+ }
+ OperationSource_value = map[string]int32{
+ "OperationSourceEmpty": 0,
+ "OperationSourcePurchase": 1,
+ "OperationSourceProduction": 2,
+ "OperationSourceOutsourcing": 3,
+ "OperationSourceProductionApply": 4,
+ "OperationSourceOutsourcingApply": 5,
+ "OperationSourceSaleDelivery": 6,
+ }
+)
+
+func (x OperationSource) Enum() *OperationSource {
+ p := new(OperationSource)
+ *p = x
+ return p
+}
+
+func (x OperationSource) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (OperationSource) Descriptor() protoreflect.EnumDescriptor {
+ return file_common_proto_enumTypes[0].Descriptor()
+}
+
+func (OperationSource) Type() protoreflect.EnumType {
+ return &file_common_proto_enumTypes[0]
+}
+
+func (x OperationSource) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use OperationSource.Descriptor instead.
+func (OperationSource) EnumDescriptor() ([]byte, []int) {
+ return file_common_proto_rawDescGZIP(), []int{0}
+}
+
+var File_common_proto protoreflect.FileDescriptor
+
+var file_common_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0xf1,
+ 0x01, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17,
+ 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50,
+ 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x70, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x64,
+ 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x70, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x70, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x10, 0x04, 0x12, 0x23, 0x0a, 0x1f,
+ 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f,
+ 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x10,
+ 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79,
+ 0x10, 0x06, 0x42, 0x12, 0x5a, 0x10, 0x73, 0x72, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_common_proto_rawDescOnce sync.Once
+ file_common_proto_rawDescData = file_common_proto_rawDesc
+)
+
+func file_common_proto_rawDescGZIP() []byte {
+ file_common_proto_rawDescOnce.Do(func() {
+ file_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_proto_rawDescData)
+ })
+ return file_common_proto_rawDescData
+}
+
+var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_common_proto_goTypes = []interface{}{
+ (OperationSource)(0), // 0: OperationSource
+}
+var file_common_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_common_proto_init() }
+func file_common_proto_init() {
+ if File_common_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_common_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_common_proto_goTypes,
+ DependencyIndexes: file_common_proto_depIdxs,
+ EnumInfos: file_common_proto_enumTypes,
+ }.Build()
+ File_common_proto = out.File
+ file_common_proto_rawDesc = nil
+ file_common_proto_goTypes = nil
+ file_common_proto_depIdxs = nil
+}
diff --git a/proto/inventory_order.proto b/proto/inventory_order.proto
new file mode 100644
index 0000000..85691cb
--- /dev/null
+++ b/proto/inventory_order.proto
@@ -0,0 +1,123 @@
+syntax = "proto3";
+
+option go_package = "./inventory_order";
+
+import "common.proto";
+
+service inventoryOrderService {
+ rpc CreateNewOrder(CreateNewOrderRequest) returns(CreateNewOrderResponse) {}
+ rpc CreateOperationList(CreateOperationListRequest) returns(CreateOperationListResponse) {}
+ rpc UpdateMaterialApplyStatus(UpdateMaterialApplyStatusRequest) returns(UpdateMaterialApplyStatusResponse) {}
+ rpc GetWarehouseInfo(GetWarehouseInfoRequest) returns(GetWarehouseInfoResponse) {}
+ rpc UpdateOutsourceOrder(UpdateOutsourceOrderRequest) returns(UpdateOutsourceOrderResponse) {}
+ rpc GetOperationInfo(GetOperationInfoRequest) returns(GetOperationInfoResponse) {}
+ rpc GetWorkerList(GetWorkerListRequest) returns(GetWorkerListResponse) {}
+}
+
+message CreateNewOrderRequest{
+ int64 OrderNumber = 1;//璁㈣喘鏁伴噺
+ string Unit = 2;//鍗曚綅
+ string ProductId = 3;
+ string Customer = 4;//瀹㈡埛缂栫爜
+}
+
+message CreateNewOrderResponse{
+ int32 Code = 1;
+ string Msg = 2;
+ string OrderId = 3;
+}
+
+//-------------------------------------------------------CreateOperationList------------------------------------
+
+message OperationProduct {
+ string ProductNumber = 1;
+ int64 Amount = 2;
+}
+
+message OperationList {
+ string SourceNumber = 1;
+ repeated OperationProduct Products = 2;
+ string SalesDetailsNumber = 3;
+}
+
+message CreateOperationListRequest{
+ int64 OperationType = 1;//1鍏ュ簱,2鍑哄簱
+ string Source = 2;
+ repeated OperationList List = 3;
+ string WarehouseId = 4;
+ OperationSource OperationSource = 5;
+}
+
+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;
+}
+
+//-------------------------------------------------UpdateOutsourceOrder-----------------------------------------
+
+message UpdateOutsourceOrderRequest{
+ string OutsourceNumber = 1;
+ repeated OperationProduct Products = 2;
+}
+
+message UpdateOutsourceOrderResponse{}
+
+//-------------------------------------------------GetOperationInfo-----------------------------------------
+
+message GetOperationInfoRequest{
+ repeated string SourceNumber = 1;//鏉ユ簮缂栫爜
+ repeated string SalesDetailsNumber = 2;//閿�鍞槑缁嗙紪鐮�
+ int64 Status = 3;//鐘舵��,3灏辩华,4瀹屾垚
+}
+
+message GetOperationInfoResponse{
+ repeated OperationInfo list = 1;
+}
+
+message OperationInfo {
+ string SourceNumber = 1;//鏉ユ簮缂栫爜
+ string SalesDetailsNumber = 2;//閿�鍞槑缁嗙紪鐮�
+ string ProductId = 3;
+ int64 Amount = 4;
+}
+
+//-------------------------------------------------GetWorkerList-----------------------------------------
+
+message GetWorkerListRequest{
+}
+
+message WorkerInfo{
+ string id = 1;
+ string name = 2;
+}
+message GetWorkerListResponse{
+ repeated WorkerInfo List = 1;
+}
\ No newline at end of file
diff --git a/proto/inventory_order/inventory_order.pb.go b/proto/inventory_order/inventory_order.pb.go
new file mode 100644
index 0000000..3ab5dba
--- /dev/null
+++ b/proto/inventory_order/inventory_order.pb.go
@@ -0,0 +1,1590 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.31.0
+// protoc v3.19.0
+// source: inventory_order.proto
+
+package inventory_order
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ common "srm/proto/common"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CreateNewOrderRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OrderNumber int64 `protobuf:"varint,1,opt,name=OrderNumber,proto3" json:"OrderNumber,omitempty"` //璁㈣喘鏁伴噺
+ Unit string `protobuf:"bytes,2,opt,name=Unit,proto3" json:"Unit,omitempty"` //鍗曚綅
+ ProductId string `protobuf:"bytes,3,opt,name=ProductId,proto3" json:"ProductId,omitempty"`
+ Customer string `protobuf:"bytes,4,opt,name=Customer,proto3" json:"Customer,omitempty"` //瀹㈡埛缂栫爜
+}
+
+func (x *CreateNewOrderRequest) Reset() {
+ *x = CreateNewOrderRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateNewOrderRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateNewOrderRequest) ProtoMessage() {}
+
+func (x *CreateNewOrderRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[0]
+ 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 CreateNewOrderRequest.ProtoReflect.Descriptor instead.
+func (*CreateNewOrderRequest) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CreateNewOrderRequest) GetOrderNumber() int64 {
+ if x != nil {
+ return x.OrderNumber
+ }
+ return 0
+}
+
+func (x *CreateNewOrderRequest) GetUnit() string {
+ if x != nil {
+ return x.Unit
+ }
+ return ""
+}
+
+func (x *CreateNewOrderRequest) GetProductId() string {
+ if x != nil {
+ return x.ProductId
+ }
+ return ""
+}
+
+func (x *CreateNewOrderRequest) GetCustomer() string {
+ if x != nil {
+ return x.Customer
+ }
+ return ""
+}
+
+type CreateNewOrderResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
+ Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"`
+ OrderId string `protobuf:"bytes,3,opt,name=OrderId,proto3" json:"OrderId,omitempty"`
+}
+
+func (x *CreateNewOrderResponse) Reset() {
+ *x = CreateNewOrderResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateNewOrderResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateNewOrderResponse) ProtoMessage() {}
+
+func (x *CreateNewOrderResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[1]
+ 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 CreateNewOrderResponse.ProtoReflect.Descriptor instead.
+func (*CreateNewOrderResponse) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CreateNewOrderResponse) GetCode() int32 {
+ if x != nil {
+ return x.Code
+ }
+ return 0
+}
+
+func (x *CreateNewOrderResponse) GetMsg() string {
+ if x != nil {
+ return x.Msg
+ }
+ return ""
+}
+
+func (x *CreateNewOrderResponse) GetOrderId() string {
+ if x != nil {
+ return x.OrderId
+ }
+ return ""
+}
+
+type OperationProduct struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ProductNumber string `protobuf:"bytes,1,opt,name=ProductNumber,proto3" json:"ProductNumber,omitempty"`
+ Amount int64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"`
+}
+
+func (x *OperationProduct) Reset() {
+ *x = OperationProduct{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OperationProduct) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OperationProduct) ProtoMessage() {}
+
+func (x *OperationProduct) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[2]
+ 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 OperationProduct.ProtoReflect.Descriptor instead.
+func (*OperationProduct) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *OperationProduct) GetProductNumber() string {
+ if x != nil {
+ return x.ProductNumber
+ }
+ return ""
+}
+
+func (x *OperationProduct) GetAmount() int64 {
+ if x != nil {
+ return x.Amount
+ }
+ return 0
+}
+
+type OperationList struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SourceNumber string `protobuf:"bytes,1,opt,name=SourceNumber,proto3" json:"SourceNumber,omitempty"`
+ Products []*OperationProduct `protobuf:"bytes,2,rep,name=Products,proto3" json:"Products,omitempty"`
+ SalesDetailsNumber string `protobuf:"bytes,3,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"`
+}
+
+func (x *OperationList) Reset() {
+ *x = OperationList{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OperationList) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OperationList) ProtoMessage() {}
+
+func (x *OperationList) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[3]
+ 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 OperationList.ProtoReflect.Descriptor instead.
+func (*OperationList) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *OperationList) GetSourceNumber() string {
+ if x != nil {
+ return x.SourceNumber
+ }
+ return ""
+}
+
+func (x *OperationList) GetProducts() []*OperationProduct {
+ if x != nil {
+ return x.Products
+ }
+ return nil
+}
+
+func (x *OperationList) GetSalesDetailsNumber() string {
+ if x != nil {
+ return x.SalesDetailsNumber
+ }
+ return ""
+}
+
+type CreateOperationListRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OperationType int64 `protobuf:"varint,1,opt,name=OperationType,proto3" json:"OperationType,omitempty"` //1鍏ュ簱,2鍑哄簱
+ Source string `protobuf:"bytes,2,opt,name=Source,proto3" json:"Source,omitempty"`
+ List []*OperationList `protobuf:"bytes,3,rep,name=List,proto3" json:"List,omitempty"`
+ WarehouseId string `protobuf:"bytes,4,opt,name=WarehouseId,proto3" json:"WarehouseId,omitempty"`
+ OperationSource common.OperationSource `protobuf:"varint,5,opt,name=OperationSource,proto3,enum=OperationSource" json:"OperationSource,omitempty"`
+}
+
+func (x *CreateOperationListRequest) Reset() {
+ *x = CreateOperationListRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateOperationListRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateOperationListRequest) ProtoMessage() {}
+
+func (x *CreateOperationListRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[4]
+ 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 CreateOperationListRequest.ProtoReflect.Descriptor instead.
+func (*CreateOperationListRequest) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CreateOperationListRequest) GetOperationType() int64 {
+ if x != nil {
+ return x.OperationType
+ }
+ 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
+ }
+ return nil
+}
+
+func (x *CreateOperationListRequest) GetWarehouseId() string {
+ if x != nil {
+ return x.WarehouseId
+ }
+ return ""
+}
+
+func (x *CreateOperationListRequest) GetOperationSource() common.OperationSource {
+ if x != nil {
+ return x.OperationSource
+ }
+ return common.OperationSource(0)
+}
+
+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[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateOperationListResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateOperationListResponse) ProtoMessage() {}
+
+func (x *CreateOperationListResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[6]
+ 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 CreateOperationListResponse.ProtoReflect.Descriptor instead.
+func (*CreateOperationListResponse) Descriptor() ([]byte, []int) {
+ 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
+}
+
+type UpdateOutsourceOrderRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OutsourceNumber string `protobuf:"bytes,1,opt,name=OutsourceNumber,proto3" json:"OutsourceNumber,omitempty"`
+ Products []*OperationProduct `protobuf:"bytes,2,rep,name=Products,proto3" json:"Products,omitempty"`
+}
+
+func (x *UpdateOutsourceOrderRequest) Reset() {
+ *x = UpdateOutsourceOrderRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateOutsourceOrderRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateOutsourceOrderRequest) ProtoMessage() {}
+
+func (x *UpdateOutsourceOrderRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[12]
+ 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 UpdateOutsourceOrderRequest.ProtoReflect.Descriptor instead.
+func (*UpdateOutsourceOrderRequest) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *UpdateOutsourceOrderRequest) GetOutsourceNumber() string {
+ if x != nil {
+ return x.OutsourceNumber
+ }
+ return ""
+}
+
+func (x *UpdateOutsourceOrderRequest) GetProducts() []*OperationProduct {
+ if x != nil {
+ return x.Products
+ }
+ return nil
+}
+
+type UpdateOutsourceOrderResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateOutsourceOrderResponse) Reset() {
+ *x = UpdateOutsourceOrderResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateOutsourceOrderResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateOutsourceOrderResponse) ProtoMessage() {}
+
+func (x *UpdateOutsourceOrderResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[13]
+ 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 UpdateOutsourceOrderResponse.ProtoReflect.Descriptor instead.
+func (*UpdateOutsourceOrderResponse) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{13}
+}
+
+type GetOperationInfoRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SourceNumber []string `protobuf:"bytes,1,rep,name=SourceNumber,proto3" json:"SourceNumber,omitempty"` //鏉ユ簮缂栫爜
+ SalesDetailsNumber []string `protobuf:"bytes,2,rep,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"` //閿�鍞槑缁嗙紪鐮�
+ Status int64 `protobuf:"varint,3,opt,name=Status,proto3" json:"Status,omitempty"` //鐘舵��,3灏辩华,4瀹屾垚
+}
+
+func (x *GetOperationInfoRequest) Reset() {
+ *x = GetOperationInfoRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOperationInfoRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOperationInfoRequest) ProtoMessage() {}
+
+func (x *GetOperationInfoRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[14]
+ 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 GetOperationInfoRequest.ProtoReflect.Descriptor instead.
+func (*GetOperationInfoRequest) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *GetOperationInfoRequest) GetSourceNumber() []string {
+ if x != nil {
+ return x.SourceNumber
+ }
+ return nil
+}
+
+func (x *GetOperationInfoRequest) GetSalesDetailsNumber() []string {
+ if x != nil {
+ return x.SalesDetailsNumber
+ }
+ return nil
+}
+
+func (x *GetOperationInfoRequest) GetStatus() int64 {
+ if x != nil {
+ return x.Status
+ }
+ return 0
+}
+
+type GetOperationInfoResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ List []*OperationInfo `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+}
+
+func (x *GetOperationInfoResponse) Reset() {
+ *x = GetOperationInfoResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOperationInfoResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOperationInfoResponse) ProtoMessage() {}
+
+func (x *GetOperationInfoResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[15]
+ 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 GetOperationInfoResponse.ProtoReflect.Descriptor instead.
+func (*GetOperationInfoResponse) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *GetOperationInfoResponse) GetList() []*OperationInfo {
+ if x != nil {
+ return x.List
+ }
+ return nil
+}
+
+type OperationInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SourceNumber string `protobuf:"bytes,1,opt,name=SourceNumber,proto3" json:"SourceNumber,omitempty"` //鏉ユ簮缂栫爜
+ SalesDetailsNumber string `protobuf:"bytes,2,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"` //閿�鍞槑缁嗙紪鐮�
+ ProductId string `protobuf:"bytes,3,opt,name=ProductId,proto3" json:"ProductId,omitempty"`
+ Amount int64 `protobuf:"varint,4,opt,name=Amount,proto3" json:"Amount,omitempty"`
+}
+
+func (x *OperationInfo) Reset() {
+ *x = OperationInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OperationInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OperationInfo) ProtoMessage() {}
+
+func (x *OperationInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[16]
+ 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 OperationInfo.ProtoReflect.Descriptor instead.
+func (*OperationInfo) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *OperationInfo) GetSourceNumber() string {
+ if x != nil {
+ return x.SourceNumber
+ }
+ return ""
+}
+
+func (x *OperationInfo) GetSalesDetailsNumber() string {
+ if x != nil {
+ return x.SalesDetailsNumber
+ }
+ return ""
+}
+
+func (x *OperationInfo) GetProductId() string {
+ if x != nil {
+ return x.ProductId
+ }
+ return ""
+}
+
+func (x *OperationInfo) GetAmount() int64 {
+ if x != nil {
+ return x.Amount
+ }
+ return 0
+}
+
+type GetWorkerListRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *GetWorkerListRequest) Reset() {
+ *x = GetWorkerListRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetWorkerListRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetWorkerListRequest) ProtoMessage() {}
+
+func (x *GetWorkerListRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[17]
+ 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 GetWorkerListRequest.ProtoReflect.Descriptor instead.
+func (*GetWorkerListRequest) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{17}
+}
+
+type WorkerInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *WorkerInfo) Reset() {
+ *x = WorkerInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WorkerInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerInfo) ProtoMessage() {}
+
+func (x *WorkerInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[18]
+ 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 WorkerInfo.ProtoReflect.Descriptor instead.
+func (*WorkerInfo) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *WorkerInfo) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *WorkerInfo) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetWorkerListResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ List []*WorkerInfo `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"`
+}
+
+func (x *GetWorkerListResponse) Reset() {
+ *x = GetWorkerListResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventory_order_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetWorkerListResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetWorkerListResponse) ProtoMessage() {}
+
+func (x *GetWorkerListResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_inventory_order_proto_msgTypes[19]
+ 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 GetWorkerListResponse.ProtoReflect.Descriptor instead.
+func (*GetWorkerListResponse) Descriptor() ([]byte, []int) {
+ return file_inventory_order_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *GetWorkerListResponse) GetList() []*WorkerInfo {
+ if x != nil {
+ return x.List
+ }
+ return nil
+}
+
+var File_inventory_order_proto protoreflect.FileDescriptor
+
+var file_inventory_order_proto_rawDesc = []byte{
+ 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65,
+ 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x20, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65,
+ 0x72, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
+ 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
+ 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x22,
+ 0x58, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65,
+ 0x72, 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,
+ 0x18, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x10, 0x4f, 0x70, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x24, 0x0a,
+ 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x75, 0x6d,
+ 0x62, 0x65, 0x72, 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, 0x92, 0x01, 0x0a, 0x0d,
+ 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a,
+ 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 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,
+ 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
+ 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x53, 0x61,
+ 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
+ 0x22, 0xdc, 0x01, 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, 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, 0x12, 0x20, 0x0a, 0x0b, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x64,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73,
+ 0x65, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x4f,
+ 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f,
+ 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x22, 0x76,
+ 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a,
+ 0x0f, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4e, 0x75, 0x6d, 0x62, 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, 0x1e, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4f, 0x70,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44,
+ 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
+ 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3e,
+ 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e,
+ 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x6c, 0x69,
+ 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x99,
+ 0x01, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
+ 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75,
+ 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74,
+ 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75,
+ 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49,
+ 0x64, 0x18, 0x03, 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, 0x04, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65,
+ 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x22, 0x30, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
+ 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65,
+ 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a,
+ 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x57, 0x6f,
+ 0x72, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x32, 0xc5,
+ 0x04, 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, 0x12, 0x55, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65,
+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74,
+ 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e,
+ 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65,
+ 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65,
+ 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x47,
+ 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 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,
+}
+
+var (
+ file_inventory_order_proto_rawDescOnce sync.Once
+ file_inventory_order_proto_rawDescData = file_inventory_order_proto_rawDesc
+)
+
+func file_inventory_order_proto_rawDescGZIP() []byte {
+ file_inventory_order_proto_rawDescOnce.Do(func() {
+ file_inventory_order_proto_rawDescData = protoimpl.X.CompressGZIP(file_inventory_order_proto_rawDescData)
+ })
+ return file_inventory_order_proto_rawDescData
+}
+
+var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
+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
+ (*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
+ (*UpdateOutsourceOrderRequest)(nil), // 12: UpdateOutsourceOrderRequest
+ (*UpdateOutsourceOrderResponse)(nil), // 13: UpdateOutsourceOrderResponse
+ (*GetOperationInfoRequest)(nil), // 14: GetOperationInfoRequest
+ (*GetOperationInfoResponse)(nil), // 15: GetOperationInfoResponse
+ (*OperationInfo)(nil), // 16: OperationInfo
+ (*GetWorkerListRequest)(nil), // 17: GetWorkerListRequest
+ (*WorkerInfo)(nil), // 18: WorkerInfo
+ (*GetWorkerListResponse)(nil), // 19: GetWorkerListResponse
+ (common.OperationSource)(0), // 20: OperationSource
+}
+var file_inventory_order_proto_depIdxs = []int32{
+ 2, // 0: OperationList.Products:type_name -> OperationProduct
+ 3, // 1: CreateOperationListRequest.List:type_name -> OperationList
+ 20, // 2: CreateOperationListRequest.OperationSource:type_name -> OperationSource
+ 5, // 3: CreateOperationListResponse.List:type_name -> OperationResponse
+ 10, // 4: GetWarehouseInfoResponse.List:type_name -> WarehouseInfo
+ 2, // 5: UpdateOutsourceOrderRequest.Products:type_name -> OperationProduct
+ 16, // 6: GetOperationInfoResponse.list:type_name -> OperationInfo
+ 18, // 7: GetWorkerListResponse.List:type_name -> WorkerInfo
+ 0, // 8: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest
+ 4, // 9: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest
+ 7, // 10: inventoryOrderService.UpdateMaterialApplyStatus:input_type -> UpdateMaterialApplyStatusRequest
+ 9, // 11: inventoryOrderService.GetWarehouseInfo:input_type -> GetWarehouseInfoRequest
+ 12, // 12: inventoryOrderService.UpdateOutsourceOrder:input_type -> UpdateOutsourceOrderRequest
+ 14, // 13: inventoryOrderService.GetOperationInfo:input_type -> GetOperationInfoRequest
+ 17, // 14: inventoryOrderService.GetWorkerList:input_type -> GetWorkerListRequest
+ 1, // 15: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse
+ 6, // 16: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse
+ 8, // 17: inventoryOrderService.UpdateMaterialApplyStatus:output_type -> UpdateMaterialApplyStatusResponse
+ 11, // 18: inventoryOrderService.GetWarehouseInfo:output_type -> GetWarehouseInfoResponse
+ 13, // 19: inventoryOrderService.UpdateOutsourceOrder:output_type -> UpdateOutsourceOrderResponse
+ 15, // 20: inventoryOrderService.GetOperationInfo:output_type -> GetOperationInfoResponse
+ 19, // 21: inventoryOrderService.GetWorkerList:output_type -> GetWorkerListResponse
+ 15, // [15:22] is the sub-list for method output_type
+ 8, // [8:15] is the sub-list for method input_type
+ 8, // [8:8] is the sub-list for extension type_name
+ 8, // [8:8] is the sub-list for extension extendee
+ 0, // [0:8] is the sub-list for field type_name
+}
+
+func init() { file_inventory_order_proto_init() }
+func file_inventory_order_proto_init() {
+ if File_inventory_order_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_inventory_order_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateNewOrderRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateNewOrderResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OperationProduct); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OperationList); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateOperationListRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ 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:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateOutsourceOrderRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateOutsourceOrderResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOperationInfoRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOperationInfoResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OperationInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetWorkerListRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WorkerInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventory_order_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetWorkerListResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_inventory_order_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 20,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_inventory_order_proto_goTypes,
+ DependencyIndexes: file_inventory_order_proto_depIdxs,
+ MessageInfos: file_inventory_order_proto_msgTypes,
+ }.Build()
+ File_inventory_order_proto = out.File
+ file_inventory_order_proto_rawDesc = nil
+ file_inventory_order_proto_goTypes = nil
+ file_inventory_order_proto_depIdxs = nil
+}
diff --git a/proto/inventory_order/inventory_order_grpc.pb.go b/proto/inventory_order/inventory_order_grpc.pb.go
new file mode 100644
index 0000000..c1a3978
--- /dev/null
+++ b/proto/inventory_order/inventory_order_grpc.pb.go
@@ -0,0 +1,331 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc v3.19.0
+// source: inventory_order.proto
+
+package inventory_order
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ InventoryOrderService_CreateNewOrder_FullMethodName = "/inventoryOrderService/CreateNewOrder"
+ InventoryOrderService_CreateOperationList_FullMethodName = "/inventoryOrderService/CreateOperationList"
+ InventoryOrderService_UpdateMaterialApplyStatus_FullMethodName = "/inventoryOrderService/UpdateMaterialApplyStatus"
+ InventoryOrderService_GetWarehouseInfo_FullMethodName = "/inventoryOrderService/GetWarehouseInfo"
+ InventoryOrderService_UpdateOutsourceOrder_FullMethodName = "/inventoryOrderService/UpdateOutsourceOrder"
+ InventoryOrderService_GetOperationInfo_FullMethodName = "/inventoryOrderService/GetOperationInfo"
+ InventoryOrderService_GetWorkerList_FullMethodName = "/inventoryOrderService/GetWorkerList"
+)
+
+// InventoryOrderServiceClient is the client API for InventoryOrderService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+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)
+ UpdateOutsourceOrder(ctx context.Context, in *UpdateOutsourceOrderRequest, opts ...grpc.CallOption) (*UpdateOutsourceOrderResponse, error)
+ GetOperationInfo(ctx context.Context, in *GetOperationInfoRequest, opts ...grpc.CallOption) (*GetOperationInfoResponse, error)
+ GetWorkerList(ctx context.Context, in *GetWorkerListRequest, opts ...grpc.CallOption) (*GetWorkerListResponse, error)
+}
+
+type inventoryOrderServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewInventoryOrderServiceClient(cc grpc.ClientConnInterface) InventoryOrderServiceClient {
+ return &inventoryOrderServiceClient{cc}
+}
+
+func (c *inventoryOrderServiceClient) CreateNewOrder(ctx context.Context, in *CreateNewOrderRequest, opts ...grpc.CallOption) (*CreateNewOrderResponse, error) {
+ out := new(CreateNewOrderResponse)
+ err := c.cc.Invoke(ctx, InventoryOrderService_CreateNewOrder_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *inventoryOrderServiceClient) CreateOperationList(ctx context.Context, in *CreateOperationListRequest, opts ...grpc.CallOption) (*CreateOperationListResponse, error) {
+ out := new(CreateOperationListResponse)
+ err := c.cc.Invoke(ctx, InventoryOrderService_CreateOperationList_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ 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_FullMethodName, 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_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *inventoryOrderServiceClient) UpdateOutsourceOrder(ctx context.Context, in *UpdateOutsourceOrderRequest, opts ...grpc.CallOption) (*UpdateOutsourceOrderResponse, error) {
+ out := new(UpdateOutsourceOrderResponse)
+ err := c.cc.Invoke(ctx, InventoryOrderService_UpdateOutsourceOrder_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *inventoryOrderServiceClient) GetOperationInfo(ctx context.Context, in *GetOperationInfoRequest, opts ...grpc.CallOption) (*GetOperationInfoResponse, error) {
+ out := new(GetOperationInfoResponse)
+ err := c.cc.Invoke(ctx, InventoryOrderService_GetOperationInfo_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *inventoryOrderServiceClient) GetWorkerList(ctx context.Context, in *GetWorkerListRequest, opts ...grpc.CallOption) (*GetWorkerListResponse, error) {
+ out := new(GetWorkerListResponse)
+ err := c.cc.Invoke(ctx, InventoryOrderService_GetWorkerList_FullMethodName, 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)
+ UpdateOutsourceOrder(context.Context, *UpdateOutsourceOrderRequest) (*UpdateOutsourceOrderResponse, error)
+ GetOperationInfo(context.Context, *GetOperationInfoRequest) (*GetOperationInfoResponse, error)
+ GetWorkerList(context.Context, *GetWorkerListRequest) (*GetWorkerListResponse, error)
+ mustEmbedUnimplementedInventoryOrderServiceServer()
+}
+
+// UnimplementedInventoryOrderServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedInventoryOrderServiceServer struct {
+}
+
+func (UnimplementedInventoryOrderServiceServer) CreateNewOrder(context.Context, *CreateNewOrderRequest) (*CreateNewOrderResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateNewOrder not implemented")
+}
+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) UpdateOutsourceOrder(context.Context, *UpdateOutsourceOrderRequest) (*UpdateOutsourceOrderResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateOutsourceOrder not implemented")
+}
+func (UnimplementedInventoryOrderServiceServer) GetOperationInfo(context.Context, *GetOperationInfoRequest) (*GetOperationInfoResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetOperationInfo not implemented")
+}
+func (UnimplementedInventoryOrderServiceServer) GetWorkerList(context.Context, *GetWorkerListRequest) (*GetWorkerListResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetWorkerList not implemented")
+}
+func (UnimplementedInventoryOrderServiceServer) mustEmbedUnimplementedInventoryOrderServiceServer() {}
+
+// UnsafeInventoryOrderServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to InventoryOrderServiceServer will
+// result in compilation errors.
+type UnsafeInventoryOrderServiceServer interface {
+ mustEmbedUnimplementedInventoryOrderServiceServer()
+}
+
+func RegisterInventoryOrderServiceServer(s grpc.ServiceRegistrar, srv InventoryOrderServiceServer) {
+ s.RegisterService(&InventoryOrderService_ServiceDesc, srv)
+}
+
+func _InventoryOrderService_CreateNewOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateNewOrderRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(InventoryOrderServiceServer).CreateNewOrder(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: InventoryOrderService_CreateNewOrder_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InventoryOrderServiceServer).CreateNewOrder(ctx, req.(*CreateNewOrderRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _InventoryOrderService_CreateOperationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateOperationListRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(InventoryOrderServiceServer).CreateOperationList(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: InventoryOrderService_CreateOperationList_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InventoryOrderServiceServer).CreateOperationList(ctx, req.(*CreateOperationListRequest))
+ }
+ 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_FullMethodName,
+ }
+ 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_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InventoryOrderServiceServer).GetWarehouseInfo(ctx, req.(*GetWarehouseInfoRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _InventoryOrderService_UpdateOutsourceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateOutsourceOrderRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(InventoryOrderServiceServer).UpdateOutsourceOrder(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: InventoryOrderService_UpdateOutsourceOrder_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InventoryOrderServiceServer).UpdateOutsourceOrder(ctx, req.(*UpdateOutsourceOrderRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _InventoryOrderService_GetOperationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetOperationInfoRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(InventoryOrderServiceServer).GetOperationInfo(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: InventoryOrderService_GetOperationInfo_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InventoryOrderServiceServer).GetOperationInfo(ctx, req.(*GetOperationInfoRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _InventoryOrderService_GetWorkerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetWorkerListRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(InventoryOrderServiceServer).GetWorkerList(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: InventoryOrderService_GetWorkerList_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(InventoryOrderServiceServer).GetWorkerList(ctx, req.(*GetWorkerListRequest))
+ }
+ 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)
+var InventoryOrderService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "inventoryOrderService",
+ HandlerType: (*InventoryOrderServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "CreateNewOrder",
+ Handler: _InventoryOrderService_CreateNewOrder_Handler,
+ },
+ {
+ MethodName: "CreateOperationList",
+ Handler: _InventoryOrderService_CreateOperationList_Handler,
+ },
+ {
+ MethodName: "UpdateMaterialApplyStatus",
+ Handler: _InventoryOrderService_UpdateMaterialApplyStatus_Handler,
+ },
+ {
+ MethodName: "GetWarehouseInfo",
+ Handler: _InventoryOrderService_GetWarehouseInfo_Handler,
+ },
+ {
+ MethodName: "UpdateOutsourceOrder",
+ Handler: _InventoryOrderService_UpdateOutsourceOrder_Handler,
+ },
+ {
+ MethodName: "GetOperationInfo",
+ Handler: _InventoryOrderService_GetOperationInfo_Handler,
+ },
+ {
+ MethodName: "GetWorkerList",
+ Handler: _InventoryOrderService_GetWorkerList_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "inventory_order.proto",
+}
diff --git a/proto/purchase_wms.proto b/proto/purchase_wms.proto
index f261b55..41044ef 100644
--- a/proto/purchase_wms.proto
+++ b/proto/purchase_wms.proto
@@ -2,6 +2,8 @@
option go_package = "./purchase_wms";
+import "common.proto";
+
service PurchaseService {
rpc PurchaseToWms(PurchaseToWmsRequest) returns (PurchaseToWmsResponse);
rpc UpdatePurchaseStatus(UpdatePurchaseStatusRequest) returns (UpdatePurchaseStatusResponse) {}
@@ -30,16 +32,6 @@
repeated PurchaseProduct Product = 6;
OperationSource OperationSource = 7;
string SalesDetailsNumber = 8;
-}
-
-enum OperationSource {
- OperationSourceEmpty = 0; //绌�
- OperationSourcePurchase = 1; //閲囪喘鍏ュ簱
- OperationSourceProduction = 2; //鐢熶骇鍏ュ簱
- OperationSourceOutsourcing = 3; //濮斿鍏ュ簱
- OperationSourceProductionApply = 4; //鐢熶骇棰嗘枡
- OperationSourceOutsourcingApply = 5; //濮斿棰嗘枡
- OperationSourceSaleDelivery = 6; //閿�鍞彂璐�
}
message PurchaseToWmsResponse {
diff --git a/proto/purchase_wms/purchase_wms.pb.go b/proto/purchase_wms/purchase_wms.pb.go
index 2f13bf9..f541304 100644
--- a/proto/purchase_wms/purchase_wms.pb.go
+++ b/proto/purchase_wms/purchase_wms.pb.go
@@ -10,6 +10,7 @@
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
+ common "srm/proto/common"
sync "sync"
)
@@ -19,67 +20,6 @@
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-
-type OperationSource int32
-
-const (
- OperationSource_OperationSourceEmpty OperationSource = 0 //绌�
- OperationSource_OperationSourcePurchase OperationSource = 1 //閲囪喘鍏ュ簱
- OperationSource_OperationSourceProduction OperationSource = 2 //鐢熶骇鍏ュ簱
- OperationSource_OperationSourceOutsourcing OperationSource = 3 //濮斿鍏ュ簱
- OperationSource_OperationSourceProductionApply OperationSource = 4 //鐢熶骇棰嗘枡
- OperationSource_OperationSourceOutsourcingApply OperationSource = 5 //濮斿棰嗘枡
- OperationSource_OperationSourceSaleDelivery OperationSource = 6 //閿�鍞彂璐�
-)
-
-// Enum value maps for OperationSource.
-var (
- OperationSource_name = map[int32]string{
- 0: "OperationSourceEmpty",
- 1: "OperationSourcePurchase",
- 2: "OperationSourceProduction",
- 3: "OperationSourceOutsourcing",
- 4: "OperationSourceProductionApply",
- 5: "OperationSourceOutsourcingApply",
- 6: "OperationSourceSaleDelivery",
- }
- OperationSource_value = map[string]int32{
- "OperationSourceEmpty": 0,
- "OperationSourcePurchase": 1,
- "OperationSourceProduction": 2,
- "OperationSourceOutsourcing": 3,
- "OperationSourceProductionApply": 4,
- "OperationSourceOutsourcingApply": 5,
- "OperationSourceSaleDelivery": 6,
- }
-)
-
-func (x OperationSource) Enum() *OperationSource {
- p := new(OperationSource)
- *p = x
- return p
-}
-
-func (x OperationSource) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (OperationSource) Descriptor() protoreflect.EnumDescriptor {
- return file_purchase_wms_proto_enumTypes[0].Descriptor()
-}
-
-func (OperationSource) Type() protoreflect.EnumType {
- return &file_purchase_wms_proto_enumTypes[0]
-}
-
-func (x OperationSource) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use OperationSource.Descriptor instead.
-func (OperationSource) EnumDescriptor() ([]byte, []int) {
- return file_purchase_wms_proto_rawDescGZIP(), []int{0}
-}
type PurchaseProduct struct {
state protoimpl.MessageState
@@ -141,14 +81,14 @@
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Number string `protobuf:"bytes,1,opt,name=Number,proto3" json:"Number,omitempty"` //閲囪喘缂栧彿
- SupplierName string `protobuf:"bytes,2,opt,name=SupplierName,proto3" json:"SupplierName,omitempty"` //渚涘簲鍟嗗悕绉�
- Source string `protobuf:"bytes,3,opt,name=Source,proto3" json:"Source,omitempty"` //鏉ユ簮
- SupplierId int64 `protobuf:"varint,4,opt,name=SupplierId,proto3" json:"SupplierId,omitempty"` //渚涘簲鍟唅d
- WarehouseName string `protobuf:"bytes,5,opt,name=WarehouseName,proto3" json:"WarehouseName,omitempty"` //浠撳簱鍚嶇О
- Product []*PurchaseProduct `protobuf:"bytes,6,rep,name=Product,proto3" json:"Product,omitempty"`
- OperationSource OperationSource `protobuf:"varint,7,opt,name=OperationSource,proto3,enum=OperationSource" json:"OperationSource,omitempty"`
- SalesDetailsNumber string `protobuf:"bytes,8,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"`
+ Number string `protobuf:"bytes,1,opt,name=Number,proto3" json:"Number,omitempty"` //閲囪喘缂栧彿
+ SupplierName string `protobuf:"bytes,2,opt,name=SupplierName,proto3" json:"SupplierName,omitempty"` //渚涘簲鍟嗗悕绉�
+ Source string `protobuf:"bytes,3,opt,name=Source,proto3" json:"Source,omitempty"` //鏉ユ簮
+ SupplierId int64 `protobuf:"varint,4,opt,name=SupplierId,proto3" json:"SupplierId,omitempty"` //渚涘簲鍟唅d
+ WarehouseName string `protobuf:"bytes,5,opt,name=WarehouseName,proto3" json:"WarehouseName,omitempty"` //浠撳簱鍚嶇О
+ Product []*PurchaseProduct `protobuf:"bytes,6,rep,name=Product,proto3" json:"Product,omitempty"`
+ OperationSource common.OperationSource `protobuf:"varint,7,opt,name=OperationSource,proto3,enum=OperationSource" json:"OperationSource,omitempty"`
+ SalesDetailsNumber string `protobuf:"bytes,8,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"`
}
func (x *PurchaseToWmsRequest) Reset() {
@@ -225,11 +165,11 @@
return nil
}
-func (x *PurchaseToWmsRequest) GetOperationSource() OperationSource {
+func (x *PurchaseToWmsRequest) GetOperationSource() common.OperationSource {
if x != nil {
return x.OperationSource
}
- return OperationSource_OperationSourceEmpty
+ return common.OperationSource(0)
}
func (x *PurchaseToWmsRequest) GetSalesDetailsNumber() string {
@@ -1181,9 +1121,9 @@
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"`
- OperationSource OperationSource `protobuf:"varint,2,opt,name=OperationSource,proto3,enum=OperationSource" json:"OperationSource,omitempty"`
- SalesDetailsNumber string `protobuf:"bytes,3,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"`
+ Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"`
+ OperationSource common.OperationSource `protobuf:"varint,2,opt,name=OperationSource,proto3,enum=OperationSource" json:"OperationSource,omitempty"`
+ SalesDetailsNumber string `protobuf:"bytes,3,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"`
}
func (x *SrmGetOperationInfoRequest) Reset() {
@@ -1225,11 +1165,11 @@
return ""
}
-func (x *SrmGetOperationInfoRequest) GetOperationSource() OperationSource {
+func (x *SrmGetOperationInfoRequest) GetOperationSource() common.OperationSource {
if x != nil {
return x.OperationSource
}
- return OperationSource_OperationSourceEmpty
+ return common.OperationSource(0)
}
func (x *SrmGetOperationInfoRequest) GetSalesDetailsNumber() string {
@@ -1448,229 +1388,215 @@
var file_purchase_wms_proto_rawDesc = []byte{
0x0a, 0x12, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x5f, 0x77, 0x6d, 0x73, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65,
- 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,
- 0xc8, 0x02, 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, 0x1e, 0x0a, 0x0a,
- 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x0a, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d,
- 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0d, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, 0x61,
- 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x06, 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, 0x12, 0x3a,
- 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61,
- 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
- 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74,
- 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 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,
- 0x4d, 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, 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, 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, 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,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 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, 0xc8, 0x02,
+ 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, 0x1e, 0x0a, 0x0a, 0x53, 0x75,
+ 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
+ 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x57, 0x61,
+ 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0d, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65,
+ 0x12, 0x2a, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x06, 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, 0x12, 0x3a, 0x0a, 0x0f,
+ 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61, 0x6c, 0x65,
+ 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69,
+ 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 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, 0x4d, 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, 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, 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, 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, 0xbc,
- 0x02, 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, 0x12,
- 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d,
- 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x07,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12,
- 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
- 0x73, 0x70, 0x65, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x09, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6e,
- 0x69, 0x73, 0x68, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 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, 0x22, 0x34, 0x0a,
- 0x14, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
- 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
- 0x74, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70,
- 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
- 0x45, 0x78, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x45, 0x78, 0x69,
- 0x73, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65,
- 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x22, 0x5e, 0x0a, 0x10, 0x53, 0x72, 0x6d, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65,
- 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72,
- 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65,
- 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c,
- 0x22, 0x44, 0x0a, 0x1b, 0x53, 0x72, 0x6d, 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,
- 0x25, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e,
- 0x53, 0x72, 0x6d, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f,
- 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xa0, 0x01, 0x0a, 0x1a, 0x53, 0x72, 0x6d, 0x47, 0x65,
- 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3a, 0x0a,
- 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61, 0x6c,
- 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61,
- 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf6, 0x01, 0x0a, 0x0c, 0x53, 0x72,
- 0x6d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75,
- 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62,
- 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e,
- 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x72, 0x65, 0x68,
- 0x6f, 0x75, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64,
- 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70,
- 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72,
- 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
- 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75,
- 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
- 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09,
- 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74,
- 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x22, 0x4c, 0x0a, 0x1b, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x72, 0x6d, 0x4f, 0x70, 0x65, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x22, 0x6d, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61,
- 0x73, 0x65, 0x42, 0x79, 0x41, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20,
- 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
- 0x12, 0x2d, 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x52, 0x03, 0x72, 0x65, 0x71, 0x2a,
- 0xf1, 0x01, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0x00, 0x12, 0x1b, 0x0a,
- 0x17, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x70,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f,
- 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x70, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x70, 0x65,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x64,
- 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x10, 0x04, 0x12, 0x23, 0x0a,
- 0x1f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79,
- 0x10, 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72,
- 0x79, 0x10, 0x06, 0x32, 0xeb, 0x05, 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, 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, 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,
+ 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, 0xbc, 0x02, 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, 0x12, 0x20, 0x0a,
+ 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a,
+ 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x70,
+ 0x65, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73,
+ 0x68, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66,
+ 0x69, 0x6e, 0x69, 0x73, 0x68, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 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, 0x22, 0x34, 0x0a, 0x14, 0x45,
+ 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49,
+ 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69,
+ 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x78,
+ 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x45, 0x78, 0x69, 0x73, 0x74,
+ 0x22, 0x1c, 0x0a, 0x1a, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f,
+ 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e,
+ 0x0a, 0x10, 0x53, 0x72, 0x6d, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e,
+ 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
+ 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0x44,
+ 0x0a, 0x1b, 0x53, 0x72, 0x6d, 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, 0x25, 0x0a,
+ 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x53, 0x72,
+ 0x6d, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04,
+ 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xa0, 0x01, 0x0a, 0x1a, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f,
+ 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0f, 0x4f,
+ 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73,
+ 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
+ 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf6, 0x01, 0x0a, 0x0c, 0x53, 0x72, 0x6d, 0x4f,
+ 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,
+ 0x12, 0x24, 0x0a, 0x0d, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75,
+ 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
+ 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f,
+ 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64,
+ 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f,
+ 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a,
+ 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f,
+ 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
+ 0x6f, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x22, 0x4c, 0x0a, 0x1b, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x2d, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x72, 0x6d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6d,
+ 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65,
+ 0x42, 0x79, 0x41, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x2d,
+ 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 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, 0x12, 0x40, 0x0a, 0x0d, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70,
- 0x6c, 0x69, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70,
- 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x45, 0x78,
- 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57,
- 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x53,
- 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e,
- 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x53, 0x72, 0x6d, 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, 0x12, 0x52, 0x0a, 0x13, 0x53, 0x72, 0x6d,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x03, 0x72, 0x65, 0x71, 0x32, 0xeb, 0x05,
+ 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, 0x12, 0x40, 0x0a,
+ 0x0d, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x15,
+ 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70,
+ 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+ 0x52, 0x0a, 0x13, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75,
+ 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57,
+ 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x53, 0x72, 0x6d, 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, 0x12, 0x52, 0x0a, 0x13, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x53, 0x72, 0x6d,
0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
- 0x12, 0x1b, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
- 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
- 0x6e, 0x66, 0x6f, 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, 0x41, 0x70, 0x73, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72,
- 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x41, 0x70, 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, 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,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74,
+ 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 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, 0x41, 0x70, 0x73, 0x12, 0x1b,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42,
+ 0x79, 0x41, 0x70, 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, 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 (
@@ -1685,60 +1611,59 @@
return file_purchase_wms_proto_rawDescData
}
-var file_purchase_wms_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_purchase_wms_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_purchase_wms_proto_goTypes = []interface{}{
- (OperationSource)(0), // 0: OperationSource
- (*PurchaseProduct)(nil), // 1: PurchaseProduct
- (*PurchaseToWmsRequest)(nil), // 2: PurchaseToWmsRequest
- (*PurchaseToWmsResponse)(nil), // 3: PurchaseToWmsResponse
- (*UpdatePurchaseStatusRequest)(nil), // 4: UpdatePurchaseStatusRequest
- (*UpdatePurchaseStatusResponse)(nil), // 5: UpdatePurchaseStatusResponse
- (*GetSupplierListByProductIdRequest)(nil), // 6: GetSupplierListByProductIdRequest
- (*SupplierList)(nil), // 7: SupplierList
- (*GetSupplierListByProductIdResponse)(nil), // 8: GetSupplierListByProductIdResponse
- (*CreatePurchaseByWmsRequest)(nil), // 9: CreatePurchaseByWmsRequest
- (*CreatePurchaseByWmsResponse)(nil), // 10: CreatePurchaseByWmsResponse
- (*GetPurchaseInfoRequest)(nil), // 11: GetPurchaseInfoRequest
- (*PurchaseInfo)(nil), // 12: PurchaseInfo
- (*GetPurchaseInfoResponse)(nil), // 13: GetPurchaseInfoResponse
- (*ExistSupplierRequest)(nil), // 14: ExistSupplierRequest
- (*ExistSupplierResponse)(nil), // 15: ExistSupplierResponse
- (*SrmGetWarehouseInfoRequest)(nil), // 16: SrmGetWarehouseInfoRequest
- (*SrmWarehouseInfo)(nil), // 17: SrmWarehouseInfo
- (*SrmGetWarehouseInfoResponse)(nil), // 18: SrmGetWarehouseInfoResponse
- (*SrmGetOperationInfoRequest)(nil), // 19: SrmGetOperationInfoRequest
- (*SrmOperation)(nil), // 20: SrmOperation
- (*SrmGetOperationInfoResponse)(nil), // 21: SrmGetOperationInfoResponse
- (*CreatePurchaseByApsRequest)(nil), // 22: CreatePurchaseByApsRequest
+ (*PurchaseProduct)(nil), // 0: PurchaseProduct
+ (*PurchaseToWmsRequest)(nil), // 1: PurchaseToWmsRequest
+ (*PurchaseToWmsResponse)(nil), // 2: PurchaseToWmsResponse
+ (*UpdatePurchaseStatusRequest)(nil), // 3: UpdatePurchaseStatusRequest
+ (*UpdatePurchaseStatusResponse)(nil), // 4: UpdatePurchaseStatusResponse
+ (*GetSupplierListByProductIdRequest)(nil), // 5: GetSupplierListByProductIdRequest
+ (*SupplierList)(nil), // 6: SupplierList
+ (*GetSupplierListByProductIdResponse)(nil), // 7: GetSupplierListByProductIdResponse
+ (*CreatePurchaseByWmsRequest)(nil), // 8: CreatePurchaseByWmsRequest
+ (*CreatePurchaseByWmsResponse)(nil), // 9: CreatePurchaseByWmsResponse
+ (*GetPurchaseInfoRequest)(nil), // 10: GetPurchaseInfoRequest
+ (*PurchaseInfo)(nil), // 11: PurchaseInfo
+ (*GetPurchaseInfoResponse)(nil), // 12: GetPurchaseInfoResponse
+ (*ExistSupplierRequest)(nil), // 13: ExistSupplierRequest
+ (*ExistSupplierResponse)(nil), // 14: ExistSupplierResponse
+ (*SrmGetWarehouseInfoRequest)(nil), // 15: SrmGetWarehouseInfoRequest
+ (*SrmWarehouseInfo)(nil), // 16: SrmWarehouseInfo
+ (*SrmGetWarehouseInfoResponse)(nil), // 17: SrmGetWarehouseInfoResponse
+ (*SrmGetOperationInfoRequest)(nil), // 18: SrmGetOperationInfoRequest
+ (*SrmOperation)(nil), // 19: SrmOperation
+ (*SrmGetOperationInfoResponse)(nil), // 20: SrmGetOperationInfoResponse
+ (*CreatePurchaseByApsRequest)(nil), // 21: CreatePurchaseByApsRequest
+ (common.OperationSource)(0), // 22: OperationSource
}
var file_purchase_wms_proto_depIdxs = []int32{
- 1, // 0: PurchaseToWmsRequest.Product:type_name -> PurchaseProduct
- 0, // 1: PurchaseToWmsRequest.OperationSource:type_name -> OperationSource
- 7, // 2: GetSupplierListByProductIdResponse.List:type_name -> SupplierList
- 12, // 3: GetPurchaseInfoResponse.Infos:type_name -> PurchaseInfo
- 17, // 4: SrmGetWarehouseInfoResponse.info:type_name -> SrmWarehouseInfo
- 0, // 5: SrmGetOperationInfoRequest.OperationSource:type_name -> OperationSource
- 20, // 6: SrmGetOperationInfoResponse.operations:type_name -> SrmOperation
- 9, // 7: CreatePurchaseByApsRequest.req:type_name -> CreatePurchaseByWmsRequest
- 2, // 8: PurchaseService.PurchaseToWms:input_type -> PurchaseToWmsRequest
- 4, // 9: PurchaseService.UpdatePurchaseStatus:input_type -> UpdatePurchaseStatusRequest
- 6, // 10: PurchaseService.GetSupplierListByProductId:input_type -> GetSupplierListByProductIdRequest
- 9, // 11: PurchaseService.CreatePurchaseByWms:input_type -> CreatePurchaseByWmsRequest
- 11, // 12: PurchaseService.GetPurchaseInfo:input_type -> GetPurchaseInfoRequest
- 14, // 13: PurchaseService.ExistSupplier:input_type -> ExistSupplierRequest
- 16, // 14: PurchaseService.SrmGetWarehouseInfo:input_type -> SrmGetWarehouseInfoRequest
- 19, // 15: PurchaseService.SrmGetOperationInfo:input_type -> SrmGetOperationInfoRequest
- 22, // 16: PurchaseService.CreatePurchaseByAps:input_type -> CreatePurchaseByApsRequest
- 3, // 17: PurchaseService.PurchaseToWms:output_type -> PurchaseToWmsResponse
- 5, // 18: PurchaseService.UpdatePurchaseStatus:output_type -> UpdatePurchaseStatusResponse
- 8, // 19: PurchaseService.GetSupplierListByProductId:output_type -> GetSupplierListByProductIdResponse
- 10, // 20: PurchaseService.CreatePurchaseByWms:output_type -> CreatePurchaseByWmsResponse
- 13, // 21: PurchaseService.GetPurchaseInfo:output_type -> GetPurchaseInfoResponse
- 15, // 22: PurchaseService.ExistSupplier:output_type -> ExistSupplierResponse
- 18, // 23: PurchaseService.SrmGetWarehouseInfo:output_type -> SrmGetWarehouseInfoResponse
- 21, // 24: PurchaseService.SrmGetOperationInfo:output_type -> SrmGetOperationInfoResponse
- 10, // 25: PurchaseService.CreatePurchaseByAps:output_type -> CreatePurchaseByWmsResponse
+ 0, // 0: PurchaseToWmsRequest.Product:type_name -> PurchaseProduct
+ 22, // 1: PurchaseToWmsRequest.OperationSource:type_name -> OperationSource
+ 6, // 2: GetSupplierListByProductIdResponse.List:type_name -> SupplierList
+ 11, // 3: GetPurchaseInfoResponse.Infos:type_name -> PurchaseInfo
+ 16, // 4: SrmGetWarehouseInfoResponse.info:type_name -> SrmWarehouseInfo
+ 22, // 5: SrmGetOperationInfoRequest.OperationSource:type_name -> OperationSource
+ 19, // 6: SrmGetOperationInfoResponse.operations:type_name -> SrmOperation
+ 8, // 7: CreatePurchaseByApsRequest.req:type_name -> CreatePurchaseByWmsRequest
+ 1, // 8: PurchaseService.PurchaseToWms:input_type -> PurchaseToWmsRequest
+ 3, // 9: PurchaseService.UpdatePurchaseStatus:input_type -> UpdatePurchaseStatusRequest
+ 5, // 10: PurchaseService.GetSupplierListByProductId:input_type -> GetSupplierListByProductIdRequest
+ 8, // 11: PurchaseService.CreatePurchaseByWms:input_type -> CreatePurchaseByWmsRequest
+ 10, // 12: PurchaseService.GetPurchaseInfo:input_type -> GetPurchaseInfoRequest
+ 13, // 13: PurchaseService.ExistSupplier:input_type -> ExistSupplierRequest
+ 15, // 14: PurchaseService.SrmGetWarehouseInfo:input_type -> SrmGetWarehouseInfoRequest
+ 18, // 15: PurchaseService.SrmGetOperationInfo:input_type -> SrmGetOperationInfoRequest
+ 21, // 16: PurchaseService.CreatePurchaseByAps:input_type -> CreatePurchaseByApsRequest
+ 2, // 17: PurchaseService.PurchaseToWms:output_type -> PurchaseToWmsResponse
+ 4, // 18: PurchaseService.UpdatePurchaseStatus:output_type -> UpdatePurchaseStatusResponse
+ 7, // 19: PurchaseService.GetSupplierListByProductId:output_type -> GetSupplierListByProductIdResponse
+ 9, // 20: PurchaseService.CreatePurchaseByWms:output_type -> CreatePurchaseByWmsResponse
+ 12, // 21: PurchaseService.GetPurchaseInfo:output_type -> GetPurchaseInfoResponse
+ 14, // 22: PurchaseService.ExistSupplier:output_type -> ExistSupplierResponse
+ 17, // 23: PurchaseService.SrmGetWarehouseInfo:output_type -> SrmGetWarehouseInfoResponse
+ 20, // 24: PurchaseService.SrmGetOperationInfo:output_type -> SrmGetOperationInfoResponse
+ 9, // 25: PurchaseService.CreatePurchaseByAps:output_type -> CreatePurchaseByWmsResponse
17, // [17:26] is the sub-list for method output_type
8, // [8:17] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
@@ -2022,14 +1947,13 @@
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_purchase_wms_proto_rawDesc,
- NumEnums: 1,
+ NumEnums: 0,
NumMessages: 22,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_purchase_wms_proto_goTypes,
DependencyIndexes: file_purchase_wms_proto_depIdxs,
- EnumInfos: file_purchase_wms_proto_enumTypes,
MessageInfos: file_purchase_wms_proto_msgTypes,
}.Build()
File_purchase_wms_proto = out.File
diff --git a/router/outsourcing/outsourcing.go b/router/outsourcing/outsourcing.go
new file mode 100644
index 0000000..6c6d9e6
--- /dev/null
+++ b/router/outsourcing/outsourcing.go
@@ -0,0 +1,28 @@
+package outsourcing
+
+import (
+ "github.com/gin-gonic/gin"
+ "srm/api/v1/outsourcing"
+)
+
+func InitRouter(Router *gin.RouterGroup) {
+ outsourcingGroup := Router.Group("outsourcing")
+ outsourcingApi := new(outsourcing.OutsourcingController)
+ {
+ outsourcingGroup.POST("enterprise/add", outsourcingApi.AddOutsourcingEnterprise) // 濮斿浼佷笟鏂板
+ outsourcingGroup.POST("enterprise/update", outsourcingApi.UpdateOutsourcingEnterprise) // 濮斿浼佷笟淇敼
+ outsourcingGroup.GET("enterprise/list", outsourcingApi.OutsourcingEnterpriseList) // 濮斿浼佷笟鍒楄〃
+ outsourcingGroup.GET("enterprise/overview", outsourcingApi.EnterpriseOverview) // 濮斿浼佷笟缁熻
+ //outsourcingGroup.GET("order/list", outsourcingApi.OutsourcingOrderList) // 濮斿璁㈠崟鍒楄〃
+ //outsourcingGroup.GET("order/overview", outsourcingApi.OrderOverview) // 濮斿璁㈠崟缁熻
+ //outsourcingGroup.GET("order/productList", outsourcingApi.OutsourcingOrderProductList) // 濮斿璁㈠崟浜у搧鍒楄〃
+ //outsourcingGroup.GET("enterprise/productList", outsourcingApi.OutsourcingEnterpriseProductList) // 濮斿浼佷笟渚涜揣鍘嗗彶
+ //outsourcingGroup.POST("order/assign", outsourcingApi.OutsourcingOrderAssign) // 濮斿璁㈠崟鍒嗛厤渚涘簲鍟�
+ //outsourcingGroup.POST("order/saveMaterialApply", outsourcingApi.SaveMaterialApply) // 淇濆瓨鐗╂枡鐢宠鍗�
+ //outsourcingGroup.POST("order/getMaterialApplyList", outsourcingApi.GetMaterialApplyList) // 鑾峰彇鐗╂枡鐢宠鍗�
+ //outsourcingGroup.POST("order/changeStatus", outsourcingApi.ChangeStatus) // 淇敼鐘舵��
+ //outsourcingGroup.POST("order/deliveryList", outsourcingApi.GetDeliveryList) // 濮斿璁㈠崟鍙戣揣鍒楄〃
+ //outsourcingGroup.POST("order/confirmReceipt", outsourcingApi.ConfirmReceipt) // 濮斿璁㈠崟纭鏀惰揣
+ //outsourcingGroup.POST("order/getInventoryInputDetails", outsourcingApi.GetInventoryInputDetails) // 濮斿璁㈠崟鍏ュ簱鏄庣粏
+ }
+}
diff --git a/router/router.go b/router/router.go
new file mode 100644
index 0000000..4df8cb9
--- /dev/null
+++ b/router/router.go
@@ -0,0 +1,15 @@
+package router
+
+import (
+ "github.com/gin-gonic/gin"
+ v1 "srm/api/v1"
+)
+
+func InitRouter(Router *gin.RouterGroup) {
+ dictGroup := Router.Group("dict")
+ dictCtl := new(v1.DictController)
+ {
+ dictGroup.POST("saveMiniDict", dictCtl.SaveMiniDict) // 鏇存柊杩蜂綘瀛楀吀
+ dictGroup.POST("getMiniDictList", dictCtl.GetMiniDictList) // 鑾峰彇杩蜂綘瀛楀吀鍒楄〃
+ }
+}
diff --git a/utils/code/code.go b/utils/code/code.go
new file mode 100644
index 0000000..9766f1f
--- /dev/null
+++ b/utils/code/code.go
@@ -0,0 +1,38 @@
+package code
+
+import "net/http"
+
+// Code 閿欒杈撳嚭鏁版嵁缁撴瀯
+type Code struct {
+ Status int `json:"status"` // HTTP 鐘舵��
+ Message string `json:"msg"` // 鎻忚堪淇℃伅
+}
+
+var (
+ Success = &Code{http.StatusOK, "璇锋眰澶勭悊鎴愬姛"}
+ UpdateSuccess = &Code{http.StatusOK, "鏇存柊鎴愬姛"}
+ DeleteSuccess = &Code{http.StatusOK, "鍒犻櫎鎴愬姛"}
+
+ SaveFail = &Code{3001, "鏂板澶辫触"}
+ RequestParamError = &Code{3002, "璇锋眰鍙傛暟鏈夎"}
+ DeleteUsingError = &Code{3003, "鍒犻櫎澶辫触"}
+ NameExistedError = &Code{3004, "鍚嶇О宸插瓨鍦�"}
+ OrderSchedulingError = &Code{3005, "璁㈠崟姝e湪鎺掔▼涓�"}
+ InventoryNotEnoughError = &Code{3006, "鐗╂枡搴撳瓨涓嶈冻"}
+ UseAmountNotEnoughError = &Code{3007, "浣跨敤鏁伴噺涓嶈冻"}
+ OrderProductNoProcedureError = &Code{3008, "璁㈠崟浜у搧鏃犲伐搴�"}
+ SetStatusError = &Code{3009, "璁剧疆鐘舵�佸け璐�"}
+ NoTemplateError = &Code{3010, "鏈厤缃鍗曟ā鏉�"}
+ InternalError = &Code{3011, "鍐呴儴閿欒"}
+ NoProductionRequiredError = &Code{3012, "褰撳墠搴撳瓨婊¤冻姣涢渶姹傞噺锛屾殏鏃舵棤闇�杩涜鐢熶骇"}
+ PlcFileContentNotValid = &Code{3013, "鏂囦欢鍐呭鏍煎紡閿欒"}
+ PlcFileChanelAmountError = &Code{3014, "鏂囦欢閲屽寘鍚�氶亾鏁伴噺涓庤澶囬噷閰嶇疆鐨勯�氶亾鏁伴噺涓嶇"}
+ PlcFileFinishAmountNotEqualTotalAmount = &Code{3014, "瀹屾垚閲忓湴鍧�鏁伴噺鍜屾�婚噺鍦板潃鏁伴噺涓嶄竴鑷�"}
+ GrpcError = &Code{3015, "grpc璋冪敤閿欒"}
+ PlanAmountAddUseAmountLessThanNeedAmountError = &Code{3016, "璁″垝鐢熶骇閲�+搴撳瓨浣跨敤閲忎笉鑳藉皬浜庢瘺闇�姹傞噺"}
+ UseAmountGreaterThanInventoryError = &Code{3016, "搴撳瓨浣跨敤閲忎笉鑳藉ぇ浜庡簱瀛樺墿浣欓噺"}
+ //BOMIncompleteError = &Code{3017, "BOM涓嶅畬鏁达紝璇锋鏌�"}
+ BomMissError = &Code{3017, "BOM缂哄け锛岃妫�鏌�"}
+ ProductProcedureMissOrInCompleteError = &Code{3018, "浜у搧宸ュ簭缂哄け鎴栦笉瀹屾暣锛岃妫�鏌�"}
+ ProductProcedureInCompleteError = &Code{3019, "浜у搧宸ュ簭涓嶅畬鏁达紝璇锋鏌�"}
+)
diff --git a/utils/response.go b/utils/response.go
new file mode 100644
index 0000000..93adc73
--- /dev/null
+++ b/utils/response.go
@@ -0,0 +1,82 @@
+package utils
+
+import (
+ "fmt"
+ "github.com/gin-gonic/gin"
+ "net/http"
+ "srm/utils/code"
+)
+
+type Response struct {
+ Code int `json:"code"`
+ Msg string `json:"msg"`
+ Data interface{} `json:"data"`
+}
+
+type ResponseList struct {
+ Code int `json:"code"`
+ Msg string `json:"msg"`
+ Data interface{} `json:"data"`
+ Total int `json:"total"`
+ Page int `json:"page"`
+ PageSize int `json:"pageSize"`
+}
+
+// ResponseFormat 杩斿洖鏁版嵁鏍煎紡鍖�
+func ResponseFormat(c *gin.Context, respStatus *code.Code, data interface{}) {
+ if respStatus == nil {
+ respStatus = code.RequestParamError
+ }
+ if respStatus.Status != http.StatusOK {
+ c.JSON(http.StatusOK, Response{
+ respStatus.Status,
+ fmt.Sprintf("%v", data),
+ nil,
+ })
+ } else {
+ c.JSON(http.StatusOK, Response{
+ respStatus.Status,
+ respStatus.Message,
+ data,
+ })
+ }
+}
+
+// ResponseFail 澶辫触杩斿洖
+func ResponseFail(c *gin.Context, respStatus *code.Code) {
+ if respStatus == nil {
+ respStatus = code.RequestParamError
+ }
+ c.JSON(http.StatusOK, Response{
+ respStatus.Status,
+ respStatus.Message,
+ nil,
+ })
+}
+
+// ResponseFormatList 杩斿洖鍖呭惈鎬绘暟鐨勫垪琛�
+func ResponseFormatList(c *gin.Context, respStatus *code.Code, data interface{}, count int) {
+ if respStatus == nil {
+ respStatus = code.RequestParamError
+ }
+ c.JSON(http.StatusOK, ResponseList{
+ Code: respStatus.Status,
+ Msg: respStatus.Message,
+ Data: data,
+ Total: count,
+ })
+}
+
+func ResponseFormatListWithPage(c *gin.Context, respStatus *code.Code, data interface{}, count int, page, pageSize int) {
+ if respStatus == nil {
+ respStatus = code.RequestParamError
+ }
+ c.JSON(respStatus.Status, ResponseList{
+ Code: respStatus.Status,
+ Msg: respStatus.Message,
+ Data: data,
+ Total: count,
+ Page: page,
+ PageSize: pageSize,
+ })
+}
diff --git a/utils/structx/structx.go b/utils/structx/structx.go
new file mode 100644
index 0000000..e038656
--- /dev/null
+++ b/utils/structx/structx.go
@@ -0,0 +1,16 @@
+package structx
+
+import "encoding/json"
+
+func AssignTo(from interface{}, to interface{}) error {
+ data, err := json.Marshal(from)
+ if err != nil {
+ return err
+ }
+
+ err = json.Unmarshal(data, to)
+ if err != nil {
+ return err
+ }
+ return nil
+}
--
Gitblit v1.8.0