From 844533c5dbcbfdb7dcf33cd28c21dcf9ed0aa12d Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 26 Sep 2024 16:58:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp/sale/product.go | 2 + erp/shipment.go | 83 +++------------ erp/shipment/bean.go | 77 ++++++++++++++ erp/shipment/customs.go | 111 ++++++++++++++++++++ erp/shipment/exchangeSettlement.go | 160 +++++++++++++++++++++++++++++ erp/shipment/saleProduct.go | 7 +- erp/shipment/serial.go | 111 ++++++++++++++++++++ erp/shipment/shipment.go | 15 +-- oa/role.go | 14 +++ 9 files changed, 500 insertions(+), 80 deletions(-) create mode 100644 erp/shipment/bean.go create mode 100644 erp/shipment/customs.go create mode 100644 erp/shipment/exchangeSettlement.go create mode 100644 erp/shipment/serial.go diff --git a/erp/sale/product.go b/erp/sale/product.go index 5d05326..3bd541b 100644 --- a/erp/sale/product.go +++ b/erp/sale/product.go @@ -57,6 +57,7 @@ type ProductListItem struct { QuoteFactoryName string `json:"quoteFactoryName"` QuoteStartNum int64 `json:"quoteStartNum"` QuoteMeasureUnit string `json:"quoteMeasureUnit"` + OuterNum *int64 `json:"outerNum"` Currency string `json:"currency"` CurrencyName string `json:"currencyName"` CurrencySymbol string `json:"currencySymbol"` @@ -112,6 +113,7 @@ type ProductItem struct { QuoteFactoryName string `json:"quoteFactoryName"` QuoteStartNum int64 `json:"quoteStartNum"` QuoteMeasureUnit string `json:"quoteMeasureUnit"` + OuterNum *int64 `json:"outerNum"` Currency string `json:"currency"` CurrencyName string `json:"currencyName"` CurrencySymbol string `json:"currencySymbol"` diff --git a/erp/shipment.go b/erp/shipment.go index 2d9b312..79978c2 100644 --- a/erp/shipment.go +++ b/erp/shipment.go @@ -17,9 +17,13 @@ type ArgsShipmentList struct { Search ShipmentSearch } type ShipmentSearch struct { - InvoiceSerial string // 出运发票号 - CustomIds []int64 // 客户筛选 - StaffIds []int64 // 业务员筛选 + InvoiceSerial string // 出运发票号 + CustomIds []int64 // 客户筛选 + StaffIds []int64 // 业务员筛选 + WorkflowStatus []int64 // 审核状态 + IsSerial int64 // 是否商检 + IsCustoms int64 // 是否报关 + IsExchangeSettlement int64 // 是否结汇 } type ReplyShipmentList struct { List []ShipmentItem `json:"list"` @@ -36,6 +40,7 @@ type ShipmentItem struct { EstSailingDate *time.Time `json:"estSailingDate"` ShipPort string `json:"shipPort"` DischargePort string `json:"dischargePort"` + WorkflowStatus int64 `json:"workflowStatus"` CreatedStaffId int64 `json:"createdStaffId"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` @@ -56,7 +61,8 @@ type ArgsShipmentAdd struct { ShipmentAdd ShipmentAdd } type ShipmentAdd struct { - CustomID int64 // 客户id + CustomId int64 // 客户id + VouchingClerkId int64 // 单证id EstSailingDate *time.Time // 预计船期 InvoiceSerial string // 发票号 InvoiceDate time.Time // 发票日期 @@ -124,74 +130,8 @@ func (s *shipment) Add(ctx context.Context, args ArgsShipmentAdd) (shipmentId in return } -type ReplyShipmentInfo struct { - Id int64 `json:"id"` - CustomName string `json:"customName"` - CustomShortName string `json:"customShortName"` - EstSailingDate *time.Time `json:"estSailingDate"` - InvoiceSerial string `json:"invoiceSerial"` - InvoiceDate time.Time `json:"invoiceDate"` - ContractDate *time.Time `json:"contractDate"` - TradeType string `json:"tradeType"` - OurCompany string `json:"ourCompany"` - PaymentType string `json:"paymentType"` - PaymentDepositRate *decimal.Decimal `json:"paymentDepositRate"` - PaymentDepositAmount *decimal.Decimal `json:"paymentDepositAmount"` - PaymentCycle *int64 `json:"paymentCycle"` - PaymentTerms string `json:"paymentTerms"` - CommissionRate *decimal.Decimal `json:"commissionRate"` - TradeCountry string `json:"tradeCountry"` - RecBank string `json:"recBank"` - RecBankEng string `json:"recBankEng"` - RecBankName string `json:"recBankName"` - RecBankNameEng string `json:"recBankNameEng"` - RecBankCardNo string `json:"recBankCardNo"` - RecBankCardName string `json:"recBankCardName"` - Shipper string `json:"shipper"` - Consignee string `json:"consignee"` - Notifier string `json:"notifier"` - DueRecDate *time.Time `json:"dueRecDate"` - ShipMode string `json:"shipMode"` - ContainerType string `json:"containerType"` - ReadyDate *time.Time `json:"readyDate"` - ShipPort string `json:"shipPort"` - DischargePort string `json:"dischargePort"` - DischargePortEng string `json:"dischargePortEng"` - DeliveryCountry string `json:"deliveryCountry"` - DeliveryCountryEng string `json:"deliveryCountryEng"` - Destination string `json:"destination"` - FactoryHaulAdress string `json:"factoryHaulAdress"` - LogisticsCompanyId int64 `json:"logisticsCompanyId"` - LogisticsCompany string `json:"logisticsCompany"` - LogisticsCompanyContactName string `json:"logisticsCompanyContactName"` - LogisticsCompanyContactPhone string `json:"logisticsCompanyContactPhone"` - LogisticsCompanyContactTel string `json:"logisticsCompanyContactTel"` - LogisticsCompanyContactEmail string `json:"logisticsCompanyContactEmail"` - SeparableFlag int64 `json:"separableFlag"` - CopyCount *int64 `json:"copyCount"` - InsuranceRatio *int64 `json:"insuranceRatio"` - CreditSerial string `json:"creditSerial"` - CreditDate *time.Time `json:"creditDate"` - InlandShipWay string `json:"inlandShipWay"` - PackagingType string `json:"packagingType"` - ShipmentNo string `json:"shipmentNo"` - CnoSno string `json:"cnoSno"` - Declare1 string `json:"declare1"` - Declare2 string `json:"declare2"` - Info string `json:"info"` - RegulatoryMethods string `json:"regulatoryMethods"` - TaxExemptionNature string `json:"taxExemptionNature"` - MarkText string `json:"markText"` - MarkImg string `json:"markImg"` - WorkflowId int64 `json:"workflowId"` - WorkflowStatus int64 `json:"workflowStatus"` - WorkflowReason string `json:"workflowReason"` - CreatedStaffId int64 `json:"createdStaffId"` - CreatedAt *time.Time `json:"createdAt"` -} - // Info @TITLE 详情 -func (s *shipment) Info(ctx context.Context, shipmentId int64) (reply ReplyShipmentInfo, err error) { +func (s *shipment) Info(ctx context.Context, shipmentId int64) (reply shipment2.ReplyShipmentInfo, err error) { xClient, err := client.GetClient(s) if err != nil { return @@ -259,6 +199,7 @@ type ArgsShipmentData struct { TaxExemptionNature string // 征免性质 MarkText string // 唛头文字 MarkImg string // 唛头图片 + VouchingClerkId int64 // 单证id } // Edit @TITLE 编辑 diff --git a/erp/shipment/bean.go b/erp/shipment/bean.go new file mode 100644 index 0000000..4d310a0 --- /dev/null +++ b/erp/shipment/bean.go @@ -0,0 +1,77 @@ +package shipment + +import ( + "github.com/shopspring/decimal" + "time" +) + +type ReplyShipmentInfo struct { + Id int64 `json:"id"` + VouchingClerkId int64 `json:"vouchingClerkId"` + CustomName string `json:"customName"` + CustomShortName string `json:"customShortName"` + EstSailingDate *time.Time `json:"estSailingDate"` + InvoiceSerial string `json:"invoiceSerial"` + InvoiceDate time.Time `json:"invoiceDate"` + ContractDate *time.Time `json:"contractDate"` + TradeType string `json:"tradeType"` + OurCompany string `json:"ourCompany"` + PaymentType string `json:"paymentType"` + PaymentDepositRate *decimal.Decimal `json:"paymentDepositRate"` + PaymentDepositAmount *decimal.Decimal `json:"paymentDepositAmount"` + PaymentCycle *int64 `json:"paymentCycle"` + PaymentTerms string `json:"paymentTerms"` + CommissionRate *decimal.Decimal `json:"commissionRate"` + TradeCountry string `json:"tradeCountry"` + RecBank string `json:"recBank"` + RecBankEng string `json:"recBankEng"` + RecBankName string `json:"recBankName"` + RecBankNameEng string `json:"recBankNameEng"` + RecBankCardNo string `json:"recBankCardNo"` + RecBankCardName string `json:"recBankCardName"` + Shipper string `json:"shipper"` + Consignee string `json:"consignee"` + Notifier string `json:"notifier"` + DueRecDate *time.Time `json:"dueRecDate"` + ShipMode string `json:"shipMode"` + ContainerType string `json:"containerType"` + ReadyDate *time.Time `json:"readyDate"` + ShipPort string `json:"shipPort"` + DischargePort string `json:"dischargePort"` + DischargePortEng string `json:"dischargePortEng"` + DeliveryCountry string `json:"deliveryCountry"` + DeliveryCountryEng string `json:"deliveryCountryEng"` + Destination string `json:"destination"` + FactoryHaulAdress string `json:"factoryHaulAdress"` + LogisticsCompanyId int64 `json:"logisticsCompanyId"` + LogisticsCompany string `json:"logisticsCompany"` + LogisticsCompanyContactName string `json:"logisticsCompanyContactName"` + LogisticsCompanyContactPhone string `json:"logisticsCompanyContactPhone"` + LogisticsCompanyContactTel string `json:"logisticsCompanyContactTel"` + LogisticsCompanyContactEmail string `json:"logisticsCompanyContactEmail"` + SeparableFlag int64 `json:"separableFlag"` + CopyCount *int64 `json:"copyCount"` + InsuranceRatio *int64 `json:"insuranceRatio"` + CreditSerial string `json:"creditSerial"` + CreditDate *time.Time `json:"creditDate"` + InlandShipWay string `json:"inlandShipWay"` + PackagingType string `json:"packagingType"` + ShipmentNo string `json:"shipmentNo"` + CnoSno string `json:"cnoSno"` + Declare1 string `json:"declare1"` + Declare2 string `json:"declare2"` + Info string `json:"info"` + RegulatoryMethods string `json:"regulatoryMethods"` + TaxExemptionNature string `json:"taxExemptionNature"` + MarkText string `json:"markText"` + MarkImg string `json:"markImg"` + WorkflowId int64 `json:"workflowId"` + WorkflowStatus int64 `json:"workflowStatus"` + WorkflowReason string `json:"workflowReason"` + CreatedStaffId int64 `json:"createdStaffId"` + CreatedAt *time.Time `json:"createdAt"` + SaleCurrency string `json:"saleCurrency"` + SaleCurrencyName string `json:"saleCurrencyName"` + SaleCurrencySymbol string `json:"saleCurrencySymbol"` + SaleCurrencyRate decimal.Decimal `json:"saleCurrencyRate"` +} diff --git a/erp/shipment/customs.go b/erp/shipment/customs.go new file mode 100644 index 0000000..4be7d99 --- /dev/null +++ b/erp/shipment/customs.go @@ -0,0 +1,111 @@ +package shipment + +import ( + "context" + "git.kumo.work/shama/service/client" + "git.kumo.work/shama/service/lib/bean" + "time" +) + +type customs struct { +} + +type ArgsCustomsList struct { + Page bean.Page + Search CustomsSearch +} +type CustomsSearch struct { + CustomsNo string // 报关单号 + InvoiceSerial string // 出运发票号 + CustomIds []int64 // 客户筛选 + StaffIds []int64 // 业务员筛选 + IsCancel int64 // 是否有效 +} +type ReplyCustomsList struct { + List []CustomsItem `json:"list"` + Total int64 `json:"total"` +} + +type CustomsItem struct { + Id int64 `json:"id"` + ShipmentId int64 `json:"shipmentId"` + InvoiceSerial string `json:"invoiceSerial"` + CustomsNo string `json:"customsNo"` + ContractDate *time.Time `json:"contractDate"` + InvoiceDate time.Time `json:"invoiceDate"` + CustomName string `json:"customName"` + CustomShortName string `json:"customShortName"` + EstSailingDate *time.Time `json:"estSailingDate"` + ShipPort string `json:"shipPort"` + DischargePort string `json:"dischargePort"` + IsCancel int64 `json:"isCancel"` + CreatedStaffId int64 `json:"createdStaffId"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` +} + +// List @TITLE 列表 +func (c *customs) List(ctx context.Context, args ArgsCustomsList) (reply ReplyCustomsList, err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + err = xClient.Call(ctx, "List", args, &reply) + return +} + +type ReplyCustomsInfo struct { + ReplyShipmentInfo + CustomsNo string `json:"customsNo"` + ShipmentId int64 `json:"shipmentId"` + IsCancel int64 `json:"isCancel"` +} + +// Info @TITLE 详情 +func (c *customs) Info(ctx context.Context, customsId int64) (reply ReplyCustomsInfo, err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + err = xClient.Call(ctx, "Info", customsId, &reply) + return +} + +// Products @TITLE 获取产品 +func (c *customs) Products(ctx context.Context, customsId int64) (reply []SaleProductItem, err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + err = xClient.Call(ctx, "Products", customsId, &reply) + return +} + +type ArgsCustomsGen struct { + ShipmentId int64 // 订舱id + CustomsNo string // 报关单号 + ShipmentSaleProductIds []int64 // 订舱产品id + StaffId int64 // 操作员工 +} + +// Gen @TITLE 生成 +func (c *customs) Gen(ctx context.Context, args ArgsCustomsGen) (err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Gen", args, &reply) + return +} + +// Cancel @TITLE 作废 +func (c *customs) Cancel(ctx context.Context, customsId int64) (err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Cancel", customsId, &reply) + return +} diff --git a/erp/shipment/exchangeSettlement.go b/erp/shipment/exchangeSettlement.go new file mode 100644 index 0000000..906c264 --- /dev/null +++ b/erp/shipment/exchangeSettlement.go @@ -0,0 +1,160 @@ +package shipment + +import ( + "context" + "git.kumo.work/shama/service/client" + "git.kumo.work/shama/service/lib/bean" + "time" +) + +type exchangeSettlement struct { +} + +type ArgsExchangeSettlementList struct { + Page bean.Page + Search ExchangeSettlementSearch +} +type ExchangeSettlementSearch struct { + ExchangeSettlementNo string // 结汇单号 + InvoiceSerial string // 出运发票号 + CustomIds []int64 // 客户筛选 + StaffIds []int64 // 业务员筛选 + IsCancel int64 // 是否有效 +} +type ReplyExchangeSettlementList struct { + List []ExchangeSettlementItem `json:"list"` + Total int64 `json:"total"` +} + +type ExchangeSettlementItem struct { + Id int64 `json:"id"` + InvoiceSerial string `json:"invoiceSerial"` + ExchangeSettlementNo string `json:"exchangeSettlementNo"` + ContractDate *time.Time `json:"contractDate"` + InvoiceDate time.Time `json:"invoiceDate"` + CustomName string `json:"customName"` + CustomShortName string `json:"customShortName"` + EstSailingDate *time.Time `json:"estSailingDate"` + ShipPort string `json:"shipPort"` + DischargePort string `json:"dischargePort"` + IsCancel int64 `json:"isCancel"` + CreatedStaffId int64 `json:"createdStaffId"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` +} + +// List @TITLE 列表 +func (e *exchangeSettlement) List(ctx context.Context, args ArgsExchangeSettlementList) (reply ReplyExchangeSettlementList, err error) { + xClient, err := client.GetClient(e) + if err != nil { + return + } + err = xClient.Call(ctx, "List", args, &reply) + return +} + +type ReplyExchangeSettlementInfo struct { + ReplyShipmentInfo + ExchangeSettlementNo string `json:"exchangeSettlementNo"` + ShipmentId int64 `json:"shipmentId"` + EstSailingDate *time.Time `json:"estSailingDate"` + InvoiceDate time.Time `json:"invoiceDate"` + ReadyDate *time.Time `json:"readyDate"` + ShipPort string `json:"shipPort"` + DischargePort string `json:"dischargePort"` + DischargePortEng string `json:"dischargePortEng"` + Destination string `json:"destination"` + CreditSerial string `json:"creditSerial"` + RecBank string `json:"recBank"` + RecBankEng string `json:"recBankEng"` + RecBankName string `json:"recBankName"` + RecBankNameEng string `json:"recBankNameEng"` + RecBankCardNo string `json:"recBankCardNo"` + RecBankCardName string `json:"recBankCardName"` + ShipmentNo string `json:"shipmentNo"` + CnoSno string `json:"cnoSno"` + Declare1 string `json:"declare1"` + Declare2 string `json:"declare2"` + Info string `json:"info"` + CustomsInvoiceDate *time.Time `json:"customsInvoiceDate"` + VesselNameVoyage string `json:"vesselNameVoyage"` + IsCancel int64 `json:"isCancel"` +} + +// Info @TITLE 详情 +func (e *exchangeSettlement) Info(ctx context.Context, exchangeSettlementId int64) (reply ReplyExchangeSettlementInfo, err error) { + xClient, err := client.GetClient(e) + if err != nil { + return + } + err = xClient.Call(ctx, "Info", exchangeSettlementId, &reply) + return +} + +type ArgsExchangeSettlementGen struct { + ShipmentId int64 // 订舱id + ExchangeSettlementNo string // 结汇单号 + StaffId int64 // 操作员工 +} + +// Gen @TITLE 生成 +func (e *exchangeSettlement) Gen(ctx context.Context, args ArgsExchangeSettlementGen) (err error) { + xClient, err := client.GetClient(e) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Gen", args, &reply) + return +} + +// Cancel @TITLE 作废 +func (e *exchangeSettlement) Cancel(ctx context.Context, exchangeSettlementId int64) (err error) { + xClient, err := client.GetClient(e) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Cancel", exchangeSettlementId, &reply) + return +} + +type ArgsExchangeSettlementEdit struct { + ExchangeSettlementId int64 // 结汇单id + ArgsExchangeSettlementData +} + +type ArgsExchangeSettlementData struct { + EstSailingDate *time.Time // 预计发运日期 + InvoiceDate *time.Time // 发票日期 + ReadyDate *time.Time // 预计发运日期 + ShipPort string // 港口 + DischargePort string // 卸货港口 + DischargePortEng string // 卸货港口英文 + Destination string // 目的地 + CreditSerial string // 信用证号 + RecBank string // 收款银行 + RecBankEng string // 收款银行英文 + RecBankName string // 收款银行名称 + RecBankNameEng string // 收款银行名称英文 + RecBankCardNo string // 收款银行卡号 + RecBankCardName string // 收款银行卡名 + ShipmentNo string // shipmentNO + CnoSno string // CONTAINER NO./SEAL NO. + Declare1 string // 声明1 + Declare2 string // 声明2 + Info string // 备注 + CustomsInvoiceDate *time.Time // 清关发票日期 + VesselNameVoyage string // 船名航次 +} + +// Edit @TITLE 编辑 +func (e *exchangeSettlement) Edit(ctx context.Context, args ArgsExchangeSettlementEdit) (err error) { + xClient, err := client.GetClient(e) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Edit", args, &reply) + return +} diff --git a/erp/shipment/saleProduct.go b/erp/shipment/saleProduct.go index 334ae0f..0905ba8 100644 --- a/erp/shipment/saleProduct.go +++ b/erp/shipment/saleProduct.go @@ -68,9 +68,10 @@ type SaleProductItem struct { UpdatedAt *time.Time `json:"updatedAt"` } type ArgsSaleProductSearch struct { - ShipmentId int64 // 出舱单 - SaleIds []int64 // 销售合同 - PiSerial string // pi号 + ShipmentId int64 // 出舱单 + SaleIds []int64 // 销售合同 + PiSerial string // pi号 + ShipmentSaleProductIds []int64 // 出舱单商品id } // All @TITLE 获取商品 diff --git a/erp/shipment/serial.go b/erp/shipment/serial.go new file mode 100644 index 0000000..680b2c6 --- /dev/null +++ b/erp/shipment/serial.go @@ -0,0 +1,111 @@ +package shipment + +import ( + "context" + "git.kumo.work/shama/service/client" + "git.kumo.work/shama/service/lib/bean" + "time" +) + +type serial struct { +} + +type ArgsSerialList struct { + Page bean.Page + Search SerialSearch +} +type SerialSearch struct { + SerialNo string // 商检单号 + InvoiceSerial string // 出运发票号 + CustomIds []int64 // 客户筛选 + StaffIds []int64 // 业务员筛选 + IsCancel int64 // 是否有效 +} +type ReplySerialList struct { + List []SerialItem `json:"list"` + Total int64 `json:"total"` +} + +type SerialItem struct { + Id int64 `json:"id"` + ShipmentId int64 `json:"shipmentId"` + InvoiceSerial string `json:"invoiceSerial"` + SerialNo string `json:"serialNo"` + ContractDate *time.Time `json:"contractDate"` + InvoiceDate time.Time `json:"invoiceDate"` + CustomName string `json:"customName"` + CustomShortName string `json:"customShortName"` + EstSailingDate *time.Time `json:"estSailingDate"` + ShipPort string `json:"shipPort"` + DischargePort string `json:"dischargePort"` + IsCancel int64 `json:"isCancel"` + CreatedStaffId int64 `json:"createdStaffId"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` +} + +// List @TITLE 列表 +func (s *serial) List(ctx context.Context, args ArgsSerialList) (reply ReplySerialList, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "List", args, &reply) + return +} + +type ReplySerialInfo struct { + ReplyShipmentInfo + SerialNo string `json:"serialNo"` + ShipmentId int64 `json:"shipmentId"` + IsCancel int64 `json:"isCancel"` +} + +// Info @TITLE 详情 +func (s *serial) Info(ctx context.Context, serialId int64) (reply ReplySerialInfo, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "Info", serialId, &reply) + return +} + +// Products @TITLE 获取产品 +func (s *serial) Products(ctx context.Context, serialId int64) (reply []SaleProductItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "Products", serialId, &reply) + return +} + +type ArgsSerialGen struct { + ShipmentId int64 // 订舱id + SerialNo string // 商检单号 + ShipmentSaleProductIds []int64 // 订舱产品id + StaffId int64 // 操作员工 +} + +// Gen @TITLE 生成 +func (s *serial) Gen(ctx context.Context, args ArgsSerialGen) (err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Gen", args, &reply) + return +} + +// Cancel @TITLE 作废 +func (s *serial) Cancel(ctx context.Context, serialId int64) (err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Cancel", serialId, &reply) + return +} diff --git a/erp/shipment/shipment.go b/erp/shipment/shipment.go index 2f3f590..4dc3df3 100644 --- a/erp/shipment/shipment.go +++ b/erp/shipment/shipment.go @@ -1,10 +1,13 @@ package shipment type Shipment struct { - Sale sale - Cost cost - SaleProduct saleProduct - Audit audit - CustomsCost customsCost - Gift gift + Sale sale + Cost cost + SaleProduct saleProduct + Audit audit + CustomsCost customsCost + Gift gift + Serial serial + Customs customs + ExchangeSettlement exchangeSettlement } diff --git a/oa/role.go b/oa/role.go index 015c0fd..76aa068 100644 --- a/oa/role.go +++ b/oa/role.go @@ -94,3 +94,17 @@ func (r *role) SetStaff(ctx context.Context, args ArgsRoleSetStaff) (err error) var reply int return xClient.Call(ctx, "SetStaff", args, &reply) } + +type ArgsRoleStaffs struct { + Name string // 角色名称 +} + +// Staffs @TITLE 角色员工 +func (r *role) Staffs(ctx context.Context, args ArgsRoleStaffs) (reply []StaffItem, err error) { + xClient, err := client.GetClient(r) + if err != nil { + return + } + err = xClient.Call(ctx, "Staffs", args, &reply) + return +}