|
@@ -3,12 +3,14 @@ package service |
|
@@ -3,12 +3,14 @@ package service |
3
|
import (
|
3
|
import (
|
4
|
"fmt"
|
4
|
"fmt"
|
5
|
"github.com/linmadan/egglib-go/core/application"
|
5
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
6
|
+ "github.com/linmadan/egglib-go/transaction/pg"
|
6
|
"github.com/linmadan/egglib-go/utils/tool_funs"
|
7
|
"github.com/linmadan/egglib-go/utils/tool_funs"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/contractUndertakerFeedback/command"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/contractUndertakerFeedback/command"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/contractUndertakerFeedback/query"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/contractUndertakerFeedback/query"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/factory"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/factory"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain/service"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain/service"
|
|
|
13
|
+ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/dao"
|
12
|
"time"
|
14
|
"time"
|
13
|
)
|
15
|
)
|
14
|
|
16
|
|
|
@@ -32,6 +34,15 @@ func (contractUndertakerFeedbackService *ContractUndertakerFeedbackService) Crea |
|
@@ -32,6 +34,15 @@ func (contractUndertakerFeedbackService *ContractUndertakerFeedbackService) Crea |
32
|
_ = transactionContext.RollbackTransaction()
|
34
|
_ = transactionContext.RollbackTransaction()
|
33
|
}()
|
35
|
}()
|
34
|
|
36
|
|
|
|
37
|
+ contractDao, _ := dao.NewCooperationContractDao(transactionContext.(*pg.TransactionContext))
|
|
|
38
|
+ contract, err := contractDao.FindOne(map[string]interface{}{
|
|
|
39
|
+ "cooperationContractId": createContractUndertakerFeedbackCommand.CooperationContractId,
|
|
|
40
|
+ })
|
|
|
41
|
+ if err != nil {
|
|
|
42
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, "合约不存在")
|
|
|
43
|
+ }
|
|
|
44
|
+ createContractUndertakerFeedbackCommand.CompanyId = contract.Company.CompanyId
|
|
|
45
|
+ createContractUndertakerFeedbackCommand.OrgId = contract.Org.OrgId
|
35
|
// 用户REST服务初始化
|
46
|
// 用户REST服务初始化
|
36
|
var userService service.UserService
|
47
|
var userService service.UserService
|
37
|
if value, err := factory.CreateUserService(map[string]interface{}{}); err != nil {
|
48
|
if value, err := factory.CreateUserService(map[string]interface{}{}); err != nil {
|