部署
This commit is contained in:
parent
8219a1dd58
commit
8343d54dba
@ -149,13 +149,13 @@ func (a *accounting) Edit(ctx context.Context, args ArgsAccountingEdit) (err err
|
||||
}
|
||||
|
||||
type InvoiceProductItem struct {
|
||||
FactoryId int64 `json:"factoryId"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
CustomsSerial string `json:"customsSerial"`
|
||||
CustomsName string `json:"customsName"`
|
||||
CustomsInvoiceUnit string `json:"customsInvoiceUnit"`
|
||||
InvoiceCount decimal.Decimal `json:"invoiceCount"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
FactoryId int64 `json:"factoryId" label:"工厂id"` // 工厂id
|
||||
FactoryName string `json:"factoryName" label:"工厂名称"` // 工厂名称
|
||||
CustomsSerial string `json:"customsSerial" label:"hs编码"` // hs编码
|
||||
CustomsName string `json:"customsName" label:"报关名称"` // 报关名称
|
||||
CustomsInvoiceUnit string `json:"customsInvoiceUnit" label:"开票单位"` // 开票单位
|
||||
InvoiceCount decimal.Decimal `json:"invoiceCount" label:"开票数量"` // 开票数量
|
||||
Amount decimal.Decimal `json:"amount" label:"金额"` // 金额
|
||||
}
|
||||
|
||||
// InvoiceProducts @TITLE 开票产品资料
|
||||
@ -168,3 +168,19 @@ func (a *accounting) InvoiceProducts(ctx context.Context, accountingId int64) (r
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
type ReplyAccountFactoryItem struct {
|
||||
FactoryId int64 // 工厂id
|
||||
FactoryName string // 工厂名称
|
||||
}
|
||||
|
||||
// Factories @TITLE 做账工厂
|
||||
func (a *accounting) Factories(ctx context.Context, accountingId int64) (reply []ReplyAccountFactoryItem, err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Factories", accountingId, &reply)
|
||||
return
|
||||
|
||||
}
|
||||
|
25
erp/bean/shipment.go
Normal file
25
erp/bean/shipment.go
Normal file
@ -0,0 +1,25 @@
|
||||
package bean
|
||||
|
||||
import "github.com/shopspring/decimal"
|
||||
|
||||
type ReplyCustoms struct {
|
||||
CostAmount decimal.Decimal `json:"costAmount" label:"费用"` // 费用
|
||||
CustomsCostAmount decimal.Decimal `json:"customsCostAmount" label:"报关费用"` // 报关费用
|
||||
SaleTotalAmount decimal.Decimal `json:"saleTotalAmount" label:"销售总金额"` // 销售总金额
|
||||
CustomsTotalAmount decimal.Decimal `json:"customsTotalAmount" label:"报关总金额"` // 报关总金额
|
||||
Products []CustomsProductItem `json:"products" label:"产品"` // 产品
|
||||
}
|
||||
|
||||
type CustomsProductItem struct {
|
||||
Index int `json:"index" label:"序号"` // 序号
|
||||
Serial string `json:"serial" label:"货号"` // 货号
|
||||
CustomsName string `json:"customsName" label:"客户货号"` // 客户货号
|
||||
ShipmentCount int64 `json:"shipmentCount" label:"出运数量"` // 出运数量
|
||||
SalePrice decimal.Decimal `json:"salePrice" label:"销售单价"` // 销售单价
|
||||
SaleAmount decimal.Decimal `json:"saleAmount" label:"销售金额"` // 销售金额
|
||||
CustomsPrice decimal.Decimal `json:"customsPrice" label:"报关单价"` // 报关单价
|
||||
CustomsAmount decimal.Decimal `json:"customsAmount" label:"报关金额"` // 报关金额
|
||||
AdjustAmount decimal.Decimal `json:"adjustAmount" label:"调整金额"` // 调整金额
|
||||
RealCustomsPrice decimal.Decimal `json:"realCustomsPrice" label:"真实报关单价"` // 真实报关单价
|
||||
RealCustomsAmount decimal.Decimal `json:"realCustomsAmount" label:"真实报关金额"` // 真实报关金额
|
||||
}
|
@ -113,14 +113,18 @@ type ReplyListAccounting struct {
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type ListAccountingItem struct {
|
||||
Id int64 `json:"id"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
PoSerial string `json:"poSerial"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
ProductSerial string `json:"productSerial"`
|
||||
ProductCustomSerial string `json:"productCustomSerial"`
|
||||
ProductName string `json:"productName"`
|
||||
HasAccountingCount int64 `json:"hasAccountingCount"`
|
||||
Id int64 `json:"id"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
PoSerial string `json:"poSerial"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
ProductSerial string `json:"productSerial"`
|
||||
ProductCustomSerial string `json:"productCustomSerial"`
|
||||
ProductName string `json:"productName"`
|
||||
HasAccountingCount int64 `json:"hasAccountingCount"`
|
||||
NetWeight *decimal.Decimal `json:"netWeight"`
|
||||
Num *int64 `json:"num"`
|
||||
Volume *decimal.Decimal `json:"volume"`
|
||||
GrossWeight *decimal.Decimal `json:"grossWeight"`
|
||||
}
|
||||
|
||||
// ListAccounting @TITLE 做账商品列表
|
||||
|
@ -3,6 +3,7 @@ package erp
|
||||
import (
|
||||
"context"
|
||||
"git.kumo.work/shama/service/client"
|
||||
bean2 "git.kumo.work/shama/service/erp/bean"
|
||||
shipment2 "git.kumo.work/shama/service/erp/shipment"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
@ -17,13 +18,11 @@ type ArgsShipmentList struct {
|
||||
Search ShipmentSearch
|
||||
}
|
||||
type ShipmentSearch struct {
|
||||
InvoiceSerial string // 出运发票号
|
||||
CustomIds []int64 // 客户筛选
|
||||
StaffIds []int64 // 业务员筛选
|
||||
WorkflowStatus []int64 // 审核状态
|
||||
IsSerial int64 // 是否商检
|
||||
IsCustoms int64 // 是否报关
|
||||
IsExchangeSettlement int64 // 是否结汇
|
||||
InvoiceSerial string // 出运发票号
|
||||
CustomIds []int64 // 客户筛选
|
||||
StaffIds []int64 // 业务员筛选
|
||||
WorkflowStatus []int64 // 审核状态
|
||||
IsAudit int64 // 审核状态 是否审核 1=是 2=否
|
||||
}
|
||||
type ReplyShipmentList struct {
|
||||
List []ShipmentItem `json:"list"`
|
||||
@ -215,30 +214,8 @@ func (s *shipment) Edit(ctx context.Context, args ArgsShipmentEdit) (err error)
|
||||
return
|
||||
}
|
||||
|
||||
type ReplyCustoms struct {
|
||||
CostAmount decimal.Decimal `json:"costAmount"`
|
||||
CustomsCostAmount decimal.Decimal `json:"customsCostAmount"`
|
||||
SaleTotalAmount decimal.Decimal `json:"saleTotalAmount"`
|
||||
CustomsTotalAmount decimal.Decimal `json:"customsTotalAmount"`
|
||||
Products []CustomsProductItem `json:"products"`
|
||||
}
|
||||
|
||||
type CustomsProductItem struct {
|
||||
Index int `json:"index"`
|
||||
Serial string `json:"serial"`
|
||||
CustomsName string `json:"customsName"`
|
||||
ShipmentCount int64 `json:"shipmentCount"`
|
||||
SalePrice decimal.Decimal `json:"salePrice"`
|
||||
SaleAmount decimal.Decimal `json:"saleAmount"`
|
||||
CustomsPrice decimal.Decimal `json:"customsPrice"`
|
||||
CustomsAmount decimal.Decimal `json:"customsAmount"`
|
||||
AdjustAmount decimal.Decimal `json:"adjustAmount"`
|
||||
RealCustomsPrice decimal.Decimal `json:"realCustomsPrice"`
|
||||
RealCustomsAmount decimal.Decimal `json:"realCustomsAmount"`
|
||||
}
|
||||
|
||||
// Customs @TITLE 报关信息
|
||||
func (s *shipment) Customs(ctx context.Context, shipmentId int64) (reply ReplyCustoms, err error) {
|
||||
func (s *shipment) Customs(ctx context.Context, shipmentId int64) (reply bean2.ReplyCustoms, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
|
@ -3,6 +3,7 @@ package shipment
|
||||
import (
|
||||
"context"
|
||||
"git.kumo.work/shama/service/client"
|
||||
bean2 "git.kumo.work/shama/service/erp/bean"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"time"
|
||||
)
|
||||
@ -81,10 +82,21 @@ func (c *customs) Products(ctx context.Context, customsId int64) (reply []SalePr
|
||||
return
|
||||
}
|
||||
|
||||
// Gifts @TITLE 获取赠品
|
||||
func (c *customs) Gifts(ctx context.Context, customsId int64) (reply []GiftItem, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Gifts", customsId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsCustomsGen struct {
|
||||
ShipmentId int64 // 订舱id
|
||||
CustomsNo string // 报关单号
|
||||
ShipmentSaleProductIds []int64 // 订舱产品id
|
||||
ShipmentGiftIds []int64 // 订舱赠品id
|
||||
StaffId int64 // 操作员工
|
||||
}
|
||||
|
||||
@ -109,3 +121,13 @@ func (c *customs) Cancel(ctx context.Context, customsId int64) (err error) {
|
||||
err = xClient.Call(ctx, "Cancel", customsId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Customs @TITLE 报关信息
|
||||
func (c *customs) Customs(ctx context.Context, customsId int64) (reply bean2.ReplyCustoms, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Customs", customsId, &reply)
|
||||
return
|
||||
}
|
||||
|
@ -10,6 +10,11 @@ import (
|
||||
type gift struct {
|
||||
}
|
||||
|
||||
type ArgsGiftSearch struct {
|
||||
ShipmentId int64 // 出舱单
|
||||
ShipmentGiftIds []int64 // 出舱单赠品id
|
||||
}
|
||||
|
||||
type GiftItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
@ -32,16 +37,18 @@ type GiftItem struct {
|
||||
SealNumber string `json:"sealNumber"`
|
||||
Remark string `json:"remark"`
|
||||
Sort int64 `json:"sort"`
|
||||
IsSerial int64 `json:"isSerial"`
|
||||
IsCustoms int64 `json:"isCustoms"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
// All @TITLE 全部赠品
|
||||
func (g *gift) All(ctx context.Context, shipmentId int64) (reply []GiftItem, err error) {
|
||||
func (g *gift) All(ctx context.Context, args ArgsGiftSearch) (reply []GiftItem, err error) {
|
||||
xClient, err := client.GetClient(g)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "All", shipmentId, &reply)
|
||||
err = xClient.Call(ctx, "All", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package shipment
|
||||
import (
|
||||
"context"
|
||||
"git.kumo.work/shama/service/client"
|
||||
bean2 "git.kumo.work/shama/service/erp/bean"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"time"
|
||||
)
|
||||
@ -81,10 +82,21 @@ func (s *serial) Products(ctx context.Context, serialId int64) (reply []SaleProd
|
||||
return
|
||||
}
|
||||
|
||||
// Gifts @TITLE 获取赠品
|
||||
func (s *serial) Gifts(ctx context.Context, serialId int64) (reply []GiftItem, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Gifts", serialId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsSerialGen struct {
|
||||
ShipmentId int64 // 订舱id
|
||||
SerialNo string // 商检单号
|
||||
ShipmentSaleProductIds []int64 // 订舱产品id
|
||||
ShipmentGiftIds []int64 // 订舱赠品id
|
||||
StaffId int64 // 操作员工
|
||||
}
|
||||
|
||||
@ -109,3 +121,13 @@ func (s *serial) Cancel(ctx context.Context, serialId int64) (err error) {
|
||||
err = xClient.Call(ctx, "Cancel", serialId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Customs @TITLE 报关信息
|
||||
func (s *serial) Customs(ctx context.Context, customsId int64) (reply bean2.ReplyCustoms, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Customs", customsId, &reply)
|
||||
return
|
||||
}
|
||||
|
21
oa/staff.go
21
oa/staff.go
@ -28,6 +28,7 @@ type ReplyStaffInfo struct {
|
||||
DepartmentName string `json:"departmentName"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
Fax string `json:"fax"`
|
||||
}
|
||||
|
||||
// Login @TITLE 登录
|
||||
@ -87,15 +88,16 @@ type ReplyStaffList struct {
|
||||
Total int64 `json:"total"` // 总数
|
||||
}
|
||||
type StaffItem struct {
|
||||
Id int64 `json:"id"` // 员工id
|
||||
Name string `json:"name"` // 中文名
|
||||
EnName string `json:"enName"` // 英文名
|
||||
Account string `json:"account"` // 账号
|
||||
Status int64 `json:"status"` // 状态 1=启用 2=停用
|
||||
Avatar string `json:"avatar"` // 头像
|
||||
Gender string `json:"gender"` // 性别
|
||||
Phone string `json:"phone"` // 手机号
|
||||
Email string `json:"email"` // 邮箱
|
||||
Id int64 `json:"id"` // 员工id
|
||||
Name string `json:"name"` // 中文名
|
||||
EnName string `json:"enName"` // 英文名
|
||||
Account string `json:"account"` // 账号
|
||||
Status int64 `json:"status"` // 状态 1=启用 2=停用
|
||||
Avatar string `json:"avatar"` // 头像
|
||||
Gender string `json:"gender"` // 性别
|
||||
Phone string `json:"phone"` // 手机号
|
||||
Email string `json:"email"` // 邮箱
|
||||
Fax string `json:"fax"`
|
||||
DepartmentId int64 `json:"departmentId"` // 部门id
|
||||
DepartmentName string `json:"departmentName"` // 部门名称
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
@ -122,6 +124,7 @@ type ArgsStaffAdd struct {
|
||||
Gender string // 性别
|
||||
Phone string // 手机号
|
||||
Email string // 邮箱
|
||||
Fax string // 传真
|
||||
DepartmentId int64 // 所属部门
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user