Merge branch 'master' of git.oa00.com:supply-chain/service

finance
杨赟 2 years ago
commit 4cbe918b49

@ -150,3 +150,18 @@ func (u *user) ServiceInfo(ctx context.Context, args ArgsUserServiceInfo) (reply
err = xClient.Call(ctx, "ServiceInfo", args, &reply) err = xClient.Call(ctx, "ServiceInfo", args, &reply)
return return
} }
type UserInfoItem struct {
Id uint `json:"id"`
Name string `json:"name"`
}
// FindByIds @Title 根据用户Ids查询用户信息
func (u *user) FindByIds(ctx context.Context, userIds []uint) (reply []UserInfoItem, err error) {
xClient, err := client.GetClient(u)
if err != nil {
return
}
err = xClient.Call(ctx, "FindByIds", userIds, &reply)
return
}

@ -3,6 +3,7 @@ package supply
import ( import (
"context" "context"
"git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
) )
@ -97,3 +98,50 @@ func (o *order) Finish(ctx context.Context, args ArgsOrderFinish) (err error) {
err = xClient.Call(ctx, "Finish", args, &reply) err = xClient.Call(ctx, "Finish", args, &reply)
return return
} }
type ArgsRetailOrderLists struct {
Search RetailOrderSearch
Page bean.Page
}
type RetailOrderSearch struct {
OrderSubSn uint64 `label:"订单号"`
SupplierId uint `label:"供应商"`
CustomerId uint `label:"客户"`
WaybillCode string `label:"运单号"`
Status uint `label:"订单状态"`
PayStartDate string `label:"支付开始日期"`
PayEndDate string `label:"支付结束日期"`
FinishStartDate string `label:"完成开始日期"`
FinishEndDate string `label:"完成结束日期"`
}
type RetailOrderItem struct {
Id uint `json:"id"`
OrderSubSn uint64 `json:"orderSubSn"`
SourceName string `json:"sourceName"`
CustomerName string `json:"customerName"`
OrderStatus uint `json:"orderStatus"`
LogisticsName string `json:"logisticsName"`
WaybillCode string `json:"waybillCode"`
OrderFee decimal.Decimal `json:"orderFee"`
FreightFee decimal.Decimal `json:"freightFee"`
SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"`
PayTime int64 `json:"payTime"`
FinishAt int64 `json:"finishAt"`
}
type ReplyRetailOrderLists struct {
Lists []RetailOrderItem `json:"lists"`
Total int64 `json:"total"`
}
// Lists @Title 订单列表
func (o *order) Lists(ctx context.Context, args ArgsRetailOrderLists) (reply ReplyRetailOrderLists, err error) {
xClient, err := client.GetClient(o)
if err != nil {
return
}
err = xClient.Call(ctx, "Lists", args, &reply)
return
}

@ -1,9 +1,30 @@
package supply package supply
type Source struct { import (
"context"
"git.oa00.com/supply-chain/service/client"
)
type sourceRpc struct {
Id uint `gorm:"primaryKey"` Id uint `gorm:"primaryKey"`
Name string // 供货商名称 Name string // 供货商名称
Base string // rpc服务基础名称 Base string // rpc服务基础名称
SkuName string // sku名称 SkuName string // sku名称
OrderName string // order名称 OrderName string // order名称
} }
type SourceItem struct {
Id uint `json:"id"`
Name string `json:"name"`
}
// Select @Title 订单列表
func (s *sourceRpc) Select(ctx context.Context) (reply []SourceItem, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
args := 0
err = xClient.Call(ctx, "Select", args, &reply)
return
}

@ -13,4 +13,5 @@ type Supply struct {
Channel channel.Channel Channel channel.Channel
Setting setting.Setting Setting setting.Setting
Order order Order order
Source sourceRpc
} }

Loading…
Cancel
Save