正在显示
10 个修改的文件
包含
84 行增加
和
11 行删除
@@ -149,6 +149,11 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred | @@ -149,6 +149,11 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred | ||
149 | Status: dividendsEstimate.DividendsUser.Status, | 149 | Status: dividendsEstimate.DividendsUser.Status, |
150 | Company: dividendsEstimate.DividendsUser.Company, | 150 | Company: dividendsEstimate.DividendsUser.Company, |
151 | }, | 151 | }, |
152 | + AccountDetail: &domain.AccountDetail{ | ||
153 | + DividendsEstimateOrderNumber: dividendsEstimate.DividendsEstimateOrderNumber, | ||
154 | + DividendsType: dividendsEstimate.DividendsType, | ||
155 | + DividendsAmount: dividendsEstimate.DividendsAmount, | ||
156 | + }, | ||
152 | PaymentDocumentAttachment: nil, | 157 | PaymentDocumentAttachment: nil, |
153 | Org: organization, | 158 | Org: organization, |
154 | Company: company, | 159 | Company: company, |
@@ -10,10 +10,8 @@ import ( | @@ -10,10 +10,8 @@ import ( | ||
10 | 10 | ||
11 | // ConfirmDividendsIncentivesEstimateCommand 确定业绩分红预算 | 11 | // ConfirmDividendsIncentivesEstimateCommand 确定业绩分红预算 |
12 | type ConfirmDividendsIncentivesEstimateCommand struct { | 12 | type ConfirmDividendsIncentivesEstimateCommand struct { |
13 | - // 分红订单号/退货单号 | ||
14 | - OrderOrReturnedOrderNum string `cname:"分红订单号/退货单号" json:"orderOrReturnedOrderNum" valid:"Required"` | ||
15 | - // 合约编号 | ||
16 | - CooperationContractNumber string `cname:"合约编号" json:"cooperationContractNumber" valid:"Required"` | 13 | + // 订单产品ID列表 |
14 | + OrderGoodIds []string `cname:"订单产品ID列表" json:"orderGoodIds" valid:"Required"` | ||
17 | // 公司ID,通过集成REST上下文获取 | 15 | // 公司ID,通过集成REST上下文获取 |
18 | CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` | 16 | CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` |
19 | // 组织机构ID | 17 | // 组织机构ID |
@@ -10,12 +10,12 @@ import ( | @@ -10,12 +10,12 @@ import ( | ||
10 | 10 | ||
11 | // ConfirmMoneyIncentivesEstimateCommand 确定金额激励分红预算 | 11 | // ConfirmMoneyIncentivesEstimateCommand 确定金额激励分红预算 |
12 | type ConfirmMoneyIncentivesEstimateCommand struct { | 12 | type ConfirmMoneyIncentivesEstimateCommand struct { |
13 | - // 共创项目合约编号 | ||
14 | - CooperationContractNumber string `cname:"共创项目合约编号" json:"cooperationContractNumber" valid:"Required"` | 13 | + // 共创合约ID列表 |
14 | + CooperationContractIds []string `cname:"共创合约ID列表" json:"cooperationContractIds" valid:"Required"` | ||
15 | // 分红阶段 | 15 | // 分红阶段 |
16 | DividendsIncentivesStage int64 `cname:"分红阶段" json:"dividendsIncentivesStage,string" valid:"Required"` | 16 | DividendsIncentivesStage int64 `cname:"分红阶段" json:"dividendsIncentivesStage,string" valid:"Required"` |
17 | // 承接人UID | 17 | // 承接人UID |
18 | - UndertakerUid string `cname:"承接人UID" json:"undertakerUid" valid:"Required"` | 18 | + UndertakerUids []string `cname:"承接人UID列表" json:"undertakerUids" valid:"Required"` |
19 | // 公司ID,通过集成REST上下文获取 | 19 | // 公司ID,通过集成REST上下文获取 |
20 | CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` | 20 | CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` |
21 | // 组织机构ID | 21 | // 组织机构ID |
@@ -353,7 +353,7 @@ func (dividendsEstimateService *DividendsEstimateService) CreateDividendsEstimat | @@ -353,7 +353,7 @@ func (dividendsEstimateService *DividendsEstimateService) CreateDividendsEstimat | ||
353 | } | 353 | } |
354 | } | 354 | } |
355 | 355 | ||
356 | -// ConfirmDividendsIncentivesEstimate 确定业绩激励分红预算 | 356 | +// ConfirmDividendsIncentivesEstimate TODO 确定业绩激励分红预算 |
357 | func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncentivesEstimate(confirmDividendsIncentivesEstimateCommand *command.ConfirmDividendsIncentivesEstimateCommand) (interface{}, error) { | 357 | func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncentivesEstimate(confirmDividendsIncentivesEstimateCommand *command.ConfirmDividendsIncentivesEstimateCommand) (interface{}, error) { |
358 | if err := confirmDividendsIncentivesEstimateCommand.ValidateCommand(); err != nil { | 358 | if err := confirmDividendsIncentivesEstimateCommand.ValidateCommand(); err != nil { |
359 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | 359 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) |
@@ -374,7 +374,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent | @@ -374,7 +374,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent | ||
374 | return nil, nil | 374 | return nil, nil |
375 | } | 375 | } |
376 | 376 | ||
377 | -// ConfirmMoneyIncentivesEstimate 确定金额激励分红预算 | 377 | +// ConfirmMoneyIncentivesEstimate TODO 确定金额激励分红预算 |
378 | func (dividendsEstimateService *DividendsEstimateService) ConfirmMoneyIncentivesEstimate(confirmMoneyIncentivesEstimateCommand *command.ConfirmMoneyIncentivesEstimateCommand) (interface{}, error) { | 378 | func (dividendsEstimateService *DividendsEstimateService) ConfirmMoneyIncentivesEstimate(confirmMoneyIncentivesEstimateCommand *command.ConfirmMoneyIncentivesEstimateCommand) (interface{}, error) { |
379 | if err := confirmMoneyIncentivesEstimateCommand.ValidateCommand(); err != nil { | 379 | if err := confirmMoneyIncentivesEstimateCommand.ValidateCommand(); err != nil { |
380 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | 380 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) |
@@ -29,3 +29,19 @@ func CreateCooperationStatisticsService(options map[string]interface{}) (*domain | @@ -29,3 +29,19 @@ func CreateCooperationStatisticsService(options map[string]interface{}) (*domain | ||
29 | } | 29 | } |
30 | return domain_service.NewCooperationStatisticsService(transactionContext) | 30 | return domain_service.NewCooperationStatisticsService(transactionContext) |
31 | } | 31 | } |
32 | + | ||
33 | +func CreateConfirmDividendsIncentivesEstimateService(options map[string]interface{}) (*domain_service.ConfirmDividendsIncentivesEstimateService, error) { | ||
34 | + var transactionContext *pgTransaction.TransactionContext | ||
35 | + if value, ok := options["transactionContext"]; ok { | ||
36 | + transactionContext = value.(*pgTransaction.TransactionContext) | ||
37 | + } | ||
38 | + return domain_service.NewConfirmDividendsIncentivesEstimateService(transactionContext) | ||
39 | +} | ||
40 | + | ||
41 | +func CreateConfirmMoneyIncentivesEstimateService(options map[string]interface{}) (*domain_service.ConfirmMoneyIncentivesEstimateService, error) { | ||
42 | + var transactionContext *pgTransaction.TransactionContext | ||
43 | + if value, ok := options["transactionContext"]; ok { | ||
44 | + transactionContext = value.(*pgTransaction.TransactionContext) | ||
45 | + } | ||
46 | + return domain_service.NewConfirmMoneyIncentivesEstimateService(transactionContext) | ||
47 | +} |
@@ -3,8 +3,8 @@ package domain | @@ -3,8 +3,8 @@ package domain | ||
3 | type AccountDetail struct { | 3 | type AccountDetail struct { |
4 | // 分红预算单号 | 4 | // 分红预算单号 |
5 | DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` | 5 | DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` |
6 | - // 分红类型 | ||
7 | - DividendsType string `json:"dividendsType"` | 6 | + // 分红类型,1订单分红,2退货冲销,3金额激励 |
7 | + DividendsType int32 `json:"dividendsType"` | ||
8 | // 分红金额 | 8 | // 分红金额 |
9 | DividendsAmount float64 `json:"dividendsAmount"` | 9 | DividendsAmount float64 `json:"dividendsAmount"` |
10 | } | 10 | } |
1 | +package domain_service | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + coreDomain "github.com/linmadan/egglib-go/core/domain" | ||
6 | + pgTransaction "github.com/linmadan/egglib-go/transaction/pg" | ||
7 | +) | ||
8 | + | ||
9 | +type ConfirmDividendsIncentivesEstimateService struct { | ||
10 | + coreDomain.BaseEventPublisher | ||
11 | + transactionContext *pgTransaction.TransactionContext | ||
12 | +} | ||
13 | + | ||
14 | +func NewConfirmDividendsIncentivesEstimateService(transactionContext *pgTransaction.TransactionContext) (*ConfirmDividendsIncentivesEstimateService, error) { | ||
15 | + if transactionContext == nil { | ||
16 | + return nil, fmt.Errorf("transactionContext参数不能为空") | ||
17 | + } else { | ||
18 | + return &ConfirmDividendsIncentivesEstimateService{ | ||
19 | + transactionContext: transactionContext, | ||
20 | + }, nil | ||
21 | + } | ||
22 | +} |
1 | +package domain_service | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + coreDomain "github.com/linmadan/egglib-go/core/domain" | ||
6 | + pgTransaction "github.com/linmadan/egglib-go/transaction/pg" | ||
7 | +) | ||
8 | + | ||
9 | +type ConfirmMoneyIncentivesEstimateService struct { | ||
10 | + coreDomain.BaseEventPublisher | ||
11 | + transactionContext *pgTransaction.TransactionContext | ||
12 | +} | ||
13 | + | ||
14 | +func NewConfirmMoneyIncentivesEstimateService(transactionContext *pgTransaction.TransactionContext) (*ConfirmMoneyIncentivesEstimateService, error) { | ||
15 | + if transactionContext == nil { | ||
16 | + return nil, fmt.Errorf("transactionContext参数不能为空") | ||
17 | + } else { | ||
18 | + return &ConfirmMoneyIncentivesEstimateService{ | ||
19 | + transactionContext: transactionContext, | ||
20 | + }, nil | ||
21 | + } | ||
22 | +} |
-
请 注册 或 登录 后发表评论