feat(erp): 添加银行账户信息字段和批量修改功能
- 在报销单、付款单和申请单中添加银行账号和账号名称字段 - 为报销单、付款单和申请单实现批量修改银行账户信息功能 - 在ik3cloud常量中添加银行账户操作类型 - 新增字典查询相关结构体和过滤条件类型 - 更新金蝶同步相关服务以支持银行账户信息处理
This commit is contained in:
@@ -23,6 +23,8 @@ type ExpenseSearch struct {
|
||||
CreatedAtEnd *time.Time // 创建结束时间
|
||||
ExpenseIds []int64 // 报销单id
|
||||
BanFlag int64 // 禁用标记 1=禁用 2=启用
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
type ReplyExpenseList struct {
|
||||
List []ExpenseItem `json:"list"`
|
||||
@@ -36,6 +38,8 @@ type ExpenseItem struct {
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Remarks string `json:"remarks"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
@@ -71,6 +75,8 @@ type ExpenseAdd struct {
|
||||
CurrencyRate decimal.Decimal // 币种汇率
|
||||
Remarks string // 备注
|
||||
ExpenseStaffId int64 // 报销人
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@@ -92,6 +98,8 @@ type ReplyExpenseInfo struct {
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Remarks string `json:"remarks"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
@@ -130,6 +138,25 @@ func (r *expense) Edit(ctx context.Context, args ArgsExpenseEdit) (err error) {
|
||||
return xClient.Call(ctx, "Edit", args, &reply)
|
||||
}
|
||||
|
||||
type ArgsExpenseChange struct {
|
||||
ExpenseIds []int64 // 报销单id
|
||||
ExpenseChangeItem
|
||||
}
|
||||
type ExpenseChangeItem struct {
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// BatchChange @TITLE 批量修改
|
||||
func (r *expense) BatchChange(ctx context.Context, args ArgsExpenseChange) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "BatchChange", args, &reply)
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 同步
|
||||
func (r *expense) Ik3cloud(ctx context.Context, expenseId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
|
||||
@@ -21,6 +21,8 @@ type PaymentSearch struct {
|
||||
CreatedAtStart *time.Time
|
||||
CreatedAtEnd *time.Time
|
||||
PurchaseStaffIds []int64 // 采购人员
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
type ReplyPaymentList struct {
|
||||
Total int64 `json:"total"`
|
||||
@@ -38,6 +40,8 @@ type PaymentItem struct {
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
PurchaseStaffId int64 `json:"purchaseStaffId"`
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
@@ -66,6 +70,25 @@ func (p *payment) Gen(ctx context.Context, payableId int64) (err error) {
|
||||
return xClient.Call(ctx, "Gen", payableId, &reply)
|
||||
}
|
||||
|
||||
type ArgsPaymentChange struct {
|
||||
PaymentIds []int64
|
||||
PaymentChangeItem
|
||||
}
|
||||
type PaymentChangeItem struct {
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// BatchChange @TITLE 批量修改
|
||||
func (p *payment) BatchChange(ctx context.Context, args ArgsPaymentChange) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "BatchChange", args, &reply)
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 金蝶同步
|
||||
func (p *payment) Ik3cloud(ctx context.Context, paymentId int64) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
|
||||
@@ -23,6 +23,8 @@ type RequestSearch struct {
|
||||
CreatedAtEnd *time.Time // 创建结束时间
|
||||
RequestIds []int64 // 申请单id
|
||||
BanFlag int64 // 禁用标记 1=禁用 2=启用
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
type ReplyRequestList struct {
|
||||
List []RequestItem `json:"list"`
|
||||
@@ -40,6 +42,8 @@ type RequestItem struct {
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Remarks string `json:"remarks"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
BanFlag int64 `json:"banFlag"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
@@ -78,6 +82,8 @@ type RequestAdd struct {
|
||||
CurrencyRate decimal.Decimal // 币种汇率
|
||||
Remarks string // 备注
|
||||
Amount decimal.Decimal // 金额
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// Add @TITLE 添加
|
||||
@@ -103,6 +109,8 @@ type ReplyRequestInfo struct {
|
||||
CurrencyRate decimal.Decimal `json:"currencyRate"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
Remarks string `json:"remarks"`
|
||||
BankAccount string `json:"bankAccount"`
|
||||
BankName string `json:"bankName"`
|
||||
WorkflowId int64 `json:"workflowId"`
|
||||
WorkflowStatus int64 `json:"workflowStatus"`
|
||||
WorkflowReason string `json:"workflowReason"`
|
||||
@@ -140,6 +148,25 @@ func (r *request) Edit(ctx context.Context, args ArgsRequestEdit) (err error) {
|
||||
return xClient.Call(ctx, "Edit", args, &reply)
|
||||
}
|
||||
|
||||
type ArgsRequestChange struct {
|
||||
RequestIds []int64
|
||||
RequestChangeItem
|
||||
}
|
||||
type RequestChangeItem struct {
|
||||
BankAccount string // 银行账号
|
||||
BankName string // 账号名称
|
||||
}
|
||||
|
||||
// BatchChange @TITLE 批量修改
|
||||
func (r *request) BatchChange(ctx context.Context, args ArgsRequestChange) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "BatchChange", args, &reply)
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 同步
|
||||
func (r *request) Ik3cloud(ctx context.Context, requestId int64) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
|
||||
@@ -21,6 +21,7 @@ const (
|
||||
ActionPayment Action = "AP_PAYBILL" // 付款单
|
||||
ActionInformation Action = "BOS_ASSISTANTDATA_DETAIL" // 辅助资料
|
||||
ActionReceiptAction Action = "AR_RECEIVEBILL" // 收款单
|
||||
ActionBankAccount Action = "CN_BANKACNT" // 银行账户
|
||||
)
|
||||
|
||||
var ActionIdField = map[Action]string{
|
||||
@@ -99,3 +100,9 @@ type InformationType = string
|
||||
const (
|
||||
InformationTypeInvoiceSerial InformationType = "FYP" // 采购付款单
|
||||
)
|
||||
|
||||
type FilterCompare = string
|
||||
|
||||
const (
|
||||
FilterCompareEqual FilterCompare = "67"
|
||||
)
|
||||
|
||||
@@ -20,6 +20,19 @@ type DictItem struct {
|
||||
Field8 any `json:"field8"`
|
||||
}
|
||||
|
||||
type ArgsDictAll struct {
|
||||
CompanyType constant.Action // 类型
|
||||
FilterItem []FilterItem // 筛选
|
||||
}
|
||||
type FilterItem struct {
|
||||
FieldName string `json:"FieldName"`
|
||||
Compare constant.FilterCompare `json:"Compare"`
|
||||
Value string `json:"Value"`
|
||||
Left string `json:"Left"`
|
||||
Right string `json:"Right"`
|
||||
Logic string `json:"Logic"`
|
||||
}
|
||||
|
||||
// All @TITLE 获取字典
|
||||
func (d *dict) All(ctx context.Context, companyType constant.Action) (reply []DictItem, err error) {
|
||||
xClient, err := client.GetClient(d)
|
||||
|
||||
@@ -34,6 +34,7 @@ type PaymentCostItem struct {
|
||||
//SettlementMethod string // 结算方式
|
||||
PaymentPurpose constant.PaymentPurpose // 付款用途
|
||||
ExpenseItem string // 费用项目
|
||||
BankAccount string // 银行账号
|
||||
}
|
||||
|
||||
// Save @TITLE 保存付款单
|
||||
|
||||
Reference in New Issue
Block a user