正在显示
7 个修改的文件
包含
43 行增加
和
9 行删除
@@ -2,13 +2,14 @@ package service | @@ -2,13 +2,14 @@ package service | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + "math/rand" | ||
6 | + "time" | ||
7 | + | ||
5 | "github.com/linmadan/egglib-go/core/application" | 8 | "github.com/linmadan/egglib-go/core/application" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | 9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | 10 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" |
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 11 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | 12 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" |
10 | - "math/rand" | ||
11 | - "time" | ||
12 | ) | 13 | ) |
13 | 14 | ||
14 | // 企业端统计 【25%】 | 15 | // 企业端统计 【25%】 |
@@ -48,6 +49,10 @@ func (srv CompanyStatisticsService) IndexStatistics(cmd *command.IndexStatistics | @@ -48,6 +49,10 @@ func (srv CompanyStatisticsService) IndexStatistics(cmd *command.IndexStatistics | ||
48 | models, err := gateway.CooperationModeList(allied_creation_cooperation.ReqCooperationModeList{ | 49 | models, err := gateway.CooperationModeList(allied_creation_cooperation.ReqCooperationModeList{ |
49 | PageSize: 20, | 50 | PageSize: 20, |
50 | PageNumber: 1, | 51 | PageNumber: 1, |
52 | + CompanyId: cmd.Operator.CompanyId, | ||
53 | + OrgId: cmd.Operator.OrgId, | ||
54 | + UserId: cmd.Operator.UserId, | ||
55 | + UserBaseId: cmd.Operator.UserBaseId, | ||
51 | }) | 56 | }) |
52 | if err != nil { | 57 | if err != nil { |
53 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 58 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -219,6 +219,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC | @@ -219,6 +219,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC | ||
219 | SponsorName: queryParam.ContractSponsor, | 219 | SponsorName: queryParam.ContractSponsor, |
220 | PageNumber: queryParam.PageNumber, | 220 | PageNumber: queryParam.PageNumber, |
221 | PageIndex: queryParam.PageSize, | 221 | PageIndex: queryParam.PageSize, |
222 | + CompanyId: queryParam.Operator.CompanyId, | ||
222 | }) | 223 | }) |
223 | data := []dto.CooperationContractUndertake{{}} | 224 | data := []dto.CooperationContractUndertake{{}} |
224 | return 10, data, err | 225 | return 10, data, err |
@@ -71,6 +71,10 @@ func (cooperationModeService *CooperationModeService) ListCooperationMode(listCo | @@ -71,6 +71,10 @@ func (cooperationModeService *CooperationModeService) ListCooperationMode(listCo | ||
71 | PageSize: listCooperationModeQuery.PageSize, | 71 | PageSize: listCooperationModeQuery.PageSize, |
72 | CooperationModeName: listCooperationModeQuery.CooperationModeName, | 72 | CooperationModeName: listCooperationModeQuery.CooperationModeName, |
73 | OrganizationName: listCooperationModeQuery.OrganizationName, | 73 | OrganizationName: listCooperationModeQuery.OrganizationName, |
74 | + CompanyId: listCooperationModeQuery.Operator.CompanyId, | ||
75 | + UserId: 0, | ||
76 | + OrgId: 0, | ||
77 | + UserBaseId: 0, | ||
74 | }) | 78 | }) |
75 | if err != nil { | 79 | if err != nil { |
76 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 80 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
@@ -19,9 +19,9 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD | @@ -19,9 +19,9 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD | ||
19 | if err := createDividendsOrderCommand.ValidateCommand(); err != nil { | 19 | if err := createDividendsOrderCommand.ValidateCommand(); err != nil { |
20 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | 20 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) |
21 | } | 21 | } |
22 | - orderGoods := []allied_creation_cooperation.DividendsOrderGoods{} | 22 | + orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{} |
23 | for _, v := range createDividendsOrderCommand.OrderGoods { | 23 | for _, v := range createDividendsOrderCommand.OrderGoods { |
24 | - good := allied_creation_cooperation.DividendsOrderGoods{ | 24 | + good := allied_creation_cooperation.DividendsOrderGoodAdd{ |
25 | CooperationContractNumber: v.CooperationContractNumber, | 25 | CooperationContractNumber: v.CooperationContractNumber, |
26 | DividendsOrderNumber: v.DividendsOrderNumber, | 26 | DividendsOrderNumber: v.DividendsOrderNumber, |
27 | OrderGoodAmount: v.OrderGoodAmount, | 27 | OrderGoodAmount: v.OrderGoodAmount, |
@@ -12,7 +12,7 @@ type CooperationContract struct { | @@ -12,7 +12,7 @@ type CooperationContract struct { | ||
12 | CooperationContractName string `json:"cooperationContractName"` // 共创合约名称 | 12 | CooperationContractName string `json:"cooperationContractName"` // 共创合约名称 |
13 | CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号 | 13 | CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号 |
14 | CooperationProjectNumber string `json:"cooperationProjectNumber"` | 14 | CooperationProjectNumber string `json:"cooperationProjectNumber"` |
15 | - CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开 | 15 | + CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerTypes"` // 共创合约承接对象,1员工,2共创用户,3公开 |
16 | Department struct { | 16 | Department struct { |
17 | DepartmentId int `json:"departmentId,string"` | 17 | DepartmentId int `json:"departmentId,string"` |
18 | DepartmentName string `json:"departmentName"` | 18 | DepartmentName string `json:"departmentName"` |
@@ -235,6 +235,9 @@ type ( | @@ -235,6 +235,9 @@ type ( | ||
235 | SponsorName string `json:"sponsorName"` //项目发起人姓名 | 235 | SponsorName string `json:"sponsorName"` //项目发起人姓名 |
236 | PageNumber int `json:"pageNumber"` | 236 | PageNumber int `json:"pageNumber"` |
237 | PageIndex int `json:"pageIndex"` | 237 | PageIndex int `json:"pageIndex"` |
238 | + CompanyId int64 ` json:"companyId"` | ||
239 | + OrgId int64 ` json:"orgId"` | ||
240 | + UserBaseId int64 `json:"userBaseId"` | ||
238 | } | 241 | } |
239 | 242 | ||
240 | DataCooperationContractSearchByUndertaker struct { | 243 | DataCooperationContractSearchByUndertaker struct { |
@@ -42,6 +42,10 @@ type ( | @@ -42,6 +42,10 @@ type ( | ||
42 | ReqCooperationModeList struct { | 42 | ReqCooperationModeList struct { |
43 | PageSize int `json:"pageSize"` | 43 | PageSize int `json:"pageSize"` |
44 | PageNumber int `json:"pageNumber"` | 44 | PageNumber int `json:"pageNumber"` |
45 | + CompanyId int64 `json:"companyId"` | ||
46 | + OrgId int64 `json:"orgId"` | ||
47 | + UserId int64 `json:"userId"` | ||
48 | + UserBaseId int64 `json:"userBaseId"` | ||
45 | } | 49 | } |
46 | 50 | ||
47 | DataCooperationModeList struct { | 51 | DataCooperationModeList struct { |
@@ -155,6 +159,10 @@ type ( | @@ -155,6 +159,10 @@ type ( | ||
155 | CooperationModeName string `json:"cooperationModeName"` | 159 | CooperationModeName string `json:"cooperationModeName"` |
156 | //组织名称 | 160 | //组织名称 |
157 | OrganizationName string `json:"organizationName"` | 161 | OrganizationName string `json:"organizationName"` |
162 | + CompanyId int64 `json:"companyId"` | ||
163 | + OrgId int64 `json:"orgId"` | ||
164 | + UserId int64 `json:"userId"` | ||
165 | + UserBaseId int64 `json:"userBaseId"` | ||
158 | } | 166 | } |
159 | 167 | ||
160 | DataCooperationModesSearch struct { | 168 | DataCooperationModesSearch struct { |
@@ -53,9 +53,7 @@ type DividendsOrder struct { | @@ -53,9 +53,7 @@ type DividendsOrder struct { | ||
53 | Returned bool `json:"returned"` //是否有退货记录,true:有退货记录,false:无退货记录 | 53 | Returned bool `json:"returned"` //是否有退货记录,true:有退货记录,false:无退货记录 |
54 | } | 54 | } |
55 | 55 | ||
56 | -type ( | ||
57 | - //订单产品 | ||
58 | - DividendsOrderGoods struct { | 56 | +type DividendsOrderGoods struct { |
59 | // 订单产品 | 57 | // 订单产品 |
60 | OrderGoodId int64 `json:"orderGoodId,string"` | 58 | OrderGoodId int64 `json:"orderGoodId,string"` |
61 | CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号 | 59 | CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号 |
@@ -66,13 +64,28 @@ type ( | @@ -66,13 +64,28 @@ type ( | ||
66 | OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价 | 64 | OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价 |
67 | OrderGoodQuantity int `json:"orderGoodQuantity,string"` //订单产品数量 | 65 | OrderGoodQuantity int `json:"orderGoodQuantity,string"` //订单产品数量 |
68 | OrderGoodDividendsStatus int32 `json:"orderGoodDividendsStatus"` // 订单产品分红状态, 1待分红,2已分红 | 66 | OrderGoodDividendsStatus int32 `json:"orderGoodDividendsStatus"` // 订单产品分红状态, 1待分红,2已分红 |
67 | +} | ||
68 | + | ||
69 | +type ( | ||
70 | + DividendsOrderGoodAdd struct { | ||
71 | + // 订单产品 | ||
72 | + OrderGoodId int64 `json:"orderGoodId,string"` | ||
73 | + CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号 | ||
74 | + DividendsOrderNumber string `json:"dividendsOrderNumber"` //关联分红订单号 | ||
75 | + OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额 | ||
76 | + OrderGoodExpense float64 `json:"orderGoodExpense"` //订单产品费用 | ||
77 | + OrderGoodName string `json:"orderGoodName"` //订单产品名称 | ||
78 | + OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价 | ||
79 | + OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量 | ||
80 | + OrderGoodDividendsStatus int32 `json:"orderGoodDividendsStatus"` // 订单产品分红状态, 1待分红,2已分红 | ||
69 | } | 81 | } |
82 | + //订单产品 | ||
70 | ReqDividendsOrderAdd struct { | 83 | ReqDividendsOrderAdd struct { |
71 | CompanyId int `json:"companyId,string"` | 84 | CompanyId int `json:"companyId,string"` |
72 | CustomerName string `json:"customerName"` //客户名称 | 85 | CustomerName string `json:"customerName"` //客户名称 |
73 | DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 | 86 | DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 |
74 | OperatorUid int `json:"operatorUid,string"` //订单操作人id | 87 | OperatorUid int `json:"operatorUid,string"` //订单操作人id |
75 | - OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表 | 88 | + OrderGoods []DividendsOrderGoodAdd `json:"orderGoods"` //订单产品列表 |
76 | OrderTime string `json:"orderTime"` //订单日期,13位长度字符串类型时间戳 | 89 | OrderTime string `json:"orderTime"` //订单日期,13位长度字符串类型时间戳 |
77 | Remarks string `json:"remarks"` //备注 | 90 | Remarks string `json:"remarks"` //备注 |
78 | UserId int `json:"userId,string"` // | 91 | UserId int `json:"userId,string"` // |
-
请 注册 或 登录 后发表评论