Files
service/erp/accounting/old/cost.go
kanade 940b5fb0e9 feat(accounting): 初始化旧版做账服务模块
- 添加费用(cost)相关结构体与方法定义
- 添加产品(product)相关结构体与方法定义
- 添加备注(remark)相关结构体与方法定义
- 添加做账主服务(old)及列表、详情等核心接口
- 定义做账单据相关的数据模型和查询参数结构
- 实现通过RPC客户端调用后端服务的通用逻辑
- 添加开票产品资料和做账工厂相关接口定义
2025-11-11 11:24:07 +08:00

35 lines
882 B
Go

package old
import (
"context"
"time"
"git.kumo.work/shama/service/client"
"github.com/shopspring/decimal"
)
type cost struct {
}
type CostItem struct {
Id int64 `json:"id"`
FactoryId int64 `json:"factoryId"`
FactoryName string `json:"factoryName"`
FactoryShortName string `json:"factoryShortName"`
Name string `json:"name"`
Amount decimal.Decimal `json:"amount"`
Remarks string `json:"remarks"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
}
// All @TITLE 获取费用
func (c *cost) All(ctx context.Context, accountingId int64) (reply []CostItem, err error) {
xClient, err := client.GetClient(c)
if err != nil {
return
}
err = xClient.Call(ctx, "All", accountingId, &reply)
return
}