From 206ed11cec79b42b018efc632872fbcff95c3334 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 23 Oct 2024 11:56:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp/constant.go | 6 ++++++ erp/custom.go | 17 +++++++++-------- erp/shipment.go | 12 ++++++++++++ erp/shipment/bean.go | 1 + erp/shipment/customs.go | 6 +++--- erp/shipment/exchangeSettlement.go | 6 +++--- erp/shipment/serial.go | 6 +++--- 7 files changed, 37 insertions(+), 17 deletions(-) diff --git a/erp/constant.go b/erp/constant.go index 4e3f4c7..75b13d4 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -51,3 +51,9 @@ const ( ExportTypeExchangeSettlement = "exchangeSettlement" // 结汇导出 ExportTypeAccounting = "accounting" // 做账导出 ) + +type BanFlag = int64 // 出舱状态 +const ( + BanFlagDisabled BanFlag = 1 // 禁用 + BanFlagEnabled BanFlag = 2 // 可用 +) diff --git a/erp/custom.go b/erp/custom.go index ee98240..c52355c 100644 --- a/erp/custom.go +++ b/erp/custom.go @@ -17,14 +17,15 @@ type ArgsCustomList struct { Search CustomSearch } type CustomSearch struct { - Name string // 公司名称 - ShortName string // 公司简称 - Rank string // 客户等级 - TradeCountry string // 贸易国别 - Origin string // 客户来源 - DepartmentIds []int64 // 所属部门 - BanFlag int64 // 禁用标记 1=禁用 2=启用 - StaffIds []int64 // 业务员 + Name string // 公司名称 + ShortName string // 公司简称 + Rank string // 客户等级 + TradeCountry string // 贸易国别 + Origin string // 客户来源 + DepartmentIds []int64 // 所属部门 + BanFlag int64 // 禁用标记 1=禁用 2=启用 + StaffIds []int64 // 业务员 + CreatedStaffIds []int64 // 业务员 } type ReplyCustomList struct { List []CustomItem `json:"list"` diff --git a/erp/shipment.go b/erp/shipment.go index 0d22159..e62caee 100644 --- a/erp/shipment.go +++ b/erp/shipment.go @@ -29,6 +29,7 @@ type ShipmentSearch struct { InvoiceDateEnd *time.Time // 发票日期 ContractDateStart *time.Time // 合同日期 ContractDateEnd *time.Time // 合同日期 + BanFlag int64 // 是否有效 } type ReplyShipmentList struct { List []ShipmentItem `json:"list"` @@ -229,3 +230,14 @@ func (s *shipment) Customs(ctx context.Context, shipmentId int64) (reply bean2.R err = xClient.Call(ctx, "Customs", shipmentId, &reply) return } + +// Cancel @TITLE 作废 +func (s *shipment) Cancel(ctx context.Context, shipmentId int64) (err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Cancel", shipmentId, &reply) + return +} diff --git a/erp/shipment/bean.go b/erp/shipment/bean.go index 97bc64d..55929e0 100644 --- a/erp/shipment/bean.go +++ b/erp/shipment/bean.go @@ -75,4 +75,5 @@ type ReplyShipmentInfo struct { SaleCurrencyName string `json:"saleCurrencyName"` SaleCurrencySymbol string `json:"saleCurrencySymbol"` SaleCurrencyRate decimal.Decimal `json:"saleCurrencyRate"` + BanFlag int64 `json:"banFlag"` } diff --git a/erp/shipment/customs.go b/erp/shipment/customs.go index bbbc47f..86d3732 100644 --- a/erp/shipment/customs.go +++ b/erp/shipment/customs.go @@ -20,7 +20,7 @@ type CustomsSearch struct { InvoiceSerial string // 出运发票号 CustomIds []int64 // 客户筛选 StaffIds []int64 // 业务员筛选 - IsCancel int64 // 是否有效 + BanFlag int64 // 是否有效 CustomsIds []int64 // 报关id } type ReplyCustomsList struct { @@ -40,7 +40,7 @@ type CustomsItem struct { EstSailingDate *time.Time `json:"estSailingDate"` ShipPort string `json:"shipPort"` DischargePort string `json:"dischargePort"` - IsCancel int64 `json:"isCancel"` + BanFlag int64 `json:"banFlag"` CreatedStaffId int64 `json:"createdStaffId"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` @@ -60,7 +60,7 @@ type ReplyCustomsInfo struct { ReplyShipmentInfo CustomsNo string `json:"customsNo"` ShipmentId int64 `json:"shipmentId"` - IsCancel int64 `json:"isCancel"` + BanFlag int64 `json:"banFlag"` } // Info @TITLE 详情 diff --git a/erp/shipment/exchangeSettlement.go b/erp/shipment/exchangeSettlement.go index 5ddf08e..894ffa2 100644 --- a/erp/shipment/exchangeSettlement.go +++ b/erp/shipment/exchangeSettlement.go @@ -19,7 +19,7 @@ type ExchangeSettlementSearch struct { InvoiceSerial string // 出运发票号 CustomIds []int64 // 客户筛选 StaffIds []int64 // 业务员筛选 - IsCancel int64 // 是否有效 + BanFlag int64 // 是否有效 ExchangeSettlementIds []int64 // 结汇id } type ReplyExchangeSettlementList struct { @@ -39,7 +39,7 @@ type ExchangeSettlementItem struct { EstSailingDate *time.Time `json:"estSailingDate"` ShipPort string `json:"shipPort"` DischargePort string `json:"dischargePort"` - IsCancel int64 `json:"isCancel"` + BanFlag int64 `json:"banFlag"` CreatedStaffId int64 `json:"createdStaffId"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` @@ -80,7 +80,7 @@ type ReplyExchangeSettlementInfo struct { Info string `json:"info"` CustomsInvoiceDate *time.Time `json:"customsInvoiceDate"` VesselNameVoyage string `json:"vesselNameVoyage"` - IsCancel int64 `json:"isCancel"` + BanFlag int64 `json:"banFlag"` RecBankAddress string `json:"recBankAddress"` } diff --git a/erp/shipment/serial.go b/erp/shipment/serial.go index d4657e5..041a8f8 100644 --- a/erp/shipment/serial.go +++ b/erp/shipment/serial.go @@ -20,7 +20,7 @@ type SerialSearch struct { InvoiceSerial string // 出运发票号 CustomIds []int64 // 客户筛选 StaffIds []int64 // 业务员筛选 - IsCancel int64 // 是否有效 + BanFlag int64 // 是否有效 SerialIds []int64 // 商检id } type ReplySerialList struct { @@ -40,7 +40,7 @@ type SerialItem struct { EstSailingDate *time.Time `json:"estSailingDate"` ShipPort string `json:"shipPort"` DischargePort string `json:"dischargePort"` - IsCancel int64 `json:"isCancel"` + BanFlag int64 `json:"banFlag"` CreatedStaffId int64 `json:"createdStaffId"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` @@ -60,7 +60,7 @@ type ReplySerialInfo struct { ReplyShipmentInfo SerialNo string `json:"serialNo"` ShipmentId int64 `json:"shipmentId"` - IsCancel int64 `json:"isCancel"` + BanFlag int64 `json:"banFlag"` } // Info @TITLE 详情