作者 陈志颖

合并分支 'dev' 到 'test'

fix:分红预算增加项目有无判断



查看合并请求 !48
@@ -8,6 +8,19 @@ import ( @@ -8,6 +8,19 @@ import (
8 "github.com/beego/beego/v2/core/validation" 8 "github.com/beego/beego/v2/core/validation"
9 ) 9 )
10 10
  11 +type SearchCooperationProjectExtQuery struct {
  12 + // 公司ID,通过集成REST上下文获取
  13 + ExtCompanyId int64 `cname:"公司ID" json:"extCompanyId,omitempty"`
  14 + // 组织机构ID
  15 + ExtOrgId int64 `cname:"组织机构ID" json:"extOrgId,omitempty"`
  16 + // 关联的组织机构ID列表
  17 + ExtOrgIds []int64 `cname:"关联的组织机构ID列表" json:"extOrgIds,omitempty"`
  18 + // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
  19 + ExtUserId int64 `cname:"用户ID" json:"extUserId,omitempty"`
  20 + // 用户基础数据id
  21 + ExtUserBaseId int64 `cname:"用户基础数据ID" json:"extUserBaseId,omitempty"`
  22 +}
  23 +
11 type SearchCooperationProjectQuery struct { 24 type SearchCooperationProjectQuery struct {
12 // 页面大小 25 // 页面大小
13 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 26 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
@@ -35,6 +48,8 @@ type SearchCooperationProjectQuery struct { @@ -35,6 +48,8 @@ type SearchCooperationProjectQuery struct {
35 UserId int64 `cname:"用户ID" json:"userId"` 48 UserId int64 `cname:"用户ID" json:"userId"`
36 // 用户基础数据id 49 // 用户基础数据id
37 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` 50 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
  51 + // 额外的查询条件
  52 + SearchCooperationProjectExtQueries []*SearchCooperationProjectExtQuery `cname:"额外的查询条件" json:"searchCooperationProjectExtQueries"`
38 } 53 }
39 54
40 func (searchCooperationProjectQuery *SearchCooperationProjectQuery) Valid(validation *validation.Validation) { 55 func (searchCooperationProjectQuery *SearchCooperationProjectQuery) Valid(validation *validation.Validation) {
@@ -124,11 +124,11 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo @@ -124,11 +124,11 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo
124 } 124 }
125 125
126 // 获取共创项目 126 // 获取共创项目
  127 + if cooperationContract.CooperationProjectNumber != "" {
127 cooperationProject, err := cooperationProjectRepository.FindOne(map[string]interface{}{ 128 cooperationProject, err := cooperationProjectRepository.FindOne(map[string]interface{}{
128 "cooperationProjectNumber": cooperationContract.CooperationProjectNumber, 129 "cooperationProjectNumber": cooperationContract.CooperationProjectNumber,
129 "companyId": cooperationContract.Company.CompanyId, 130 "companyId": cooperationContract.Company.CompanyId,
130 "orgId": cooperationContract.Org.OrgId, 131 "orgId": cooperationContract.Org.OrgId,
131 - //"notPause": true,  
132 }) 132 })
133 if err != nil { 133 if err != nil {
134 var orderNumber string 134 var orderNumber string
@@ -144,10 +144,9 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo @@ -144,10 +144,9 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo
144 DividendsAmount: 0, 144 DividendsAmount: 0,
145 OrderOrReturnedOrderNumber: orderNumber, 145 OrderOrReturnedOrderNumber: orderNumber,
146 IsSuccessfully: false, 146 IsSuccessfully: false,
147 - Reason: "共创项目" + orderGood.CooperationContractNumber + "查询错误", 147 + Reason: "共创项目" + cooperationContract.CooperationProjectNumber + "查询错误",
148 }) 148 })
149 continue 149 continue
150 - //return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
151 } 150 }
152 if cooperationProject == nil { 151 if cooperationProject == nil {
153 var orderNumber string 152 var orderNumber string
@@ -163,10 +162,11 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo @@ -163,10 +162,11 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo
163 DividendsAmount: 0, 162 DividendsAmount: 0,
164 OrderOrReturnedOrderNumber: orderNumber, 163 OrderOrReturnedOrderNumber: orderNumber,
165 IsSuccessfully: false, 164 IsSuccessfully: false,
166 - Reason: "共创项目" + orderGood.CooperationContractNumber + "已结束或不存在", 165 + Reason: "共创项目" + cooperationContract.CooperationProjectNumber + "已结束或不存在",
167 }) 166 })
168 continue 167 continue
169 } 168 }
  169 + }
170 170
171 if orderGood.DividendsOrderNumber != "" { // 获取分红订单 171 if orderGood.DividendsOrderNumber != "" { // 获取分红订单
172 // 获取分红订单 172 // 获取分红订单