|
@@ -66,8 +66,8 @@ func (cooperationModeService *CooperationModeService) ListCooperationMode(listCo |
|
@@ -66,8 +66,8 @@ func (cooperationModeService *CooperationModeService) ListCooperationMode(listCo |
66
|
OrganizationName: listCooperationModeQuery.OrganizationName,
|
66
|
OrganizationName: listCooperationModeQuery.OrganizationName,
|
67
|
CompanyId: listCooperationModeQuery.Operator.CompanyId,
|
67
|
CompanyId: listCooperationModeQuery.Operator.CompanyId,
|
68
|
UserId: 0,
|
68
|
UserId: 0,
|
69
|
- OrgIds: nil,
|
|
|
70
|
- OrgId: listCooperationModeQuery.Operator.OrgId,
|
69
|
+ OrgIds: listCooperationModeQuery.Operator.OrgIds,
|
|
|
70
|
+ OrgId: 0,
|
71
|
UserBaseId: 0,
|
71
|
UserBaseId: 0,
|
72
|
})
|
72
|
})
|
73
|
if err != nil {
|
73
|
if err != nil {
|
|
@@ -138,3 +138,39 @@ func NewCooperationModeService(options map[string]interface{}) *CooperationModeS |
|
@@ -138,3 +138,39 @@ func NewCooperationModeService(options map[string]interface{}) *CooperationModeS |
138
|
newCooperationModeService := &CooperationModeService{}
|
138
|
newCooperationModeService := &CooperationModeService{}
|
139
|
return newCooperationModeService
|
139
|
return newCooperationModeService
|
140
|
}
|
140
|
}
|
|
|
141
|
+
|
|
|
142
|
+//CooperationModeSelector 返回共创模式可选列表
|
|
|
143
|
+func (cooperationModeService *CooperationModeService) CooperationModeSelector(listCooperationModeQuery *query.ListCooperationModeQuery) (int64, interface{}, error) {
|
|
|
144
|
+
|
|
|
145
|
+ creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationModeQuery.Operator)
|
|
|
146
|
+ result, err := creationCooperationGateway.CooperationModesSearch(allied_creation_cooperation.ReqCooperationModesSearch{
|
|
|
147
|
+ PageNumber: listCooperationModeQuery.PageNumber,
|
|
|
148
|
+ PageSize: listCooperationModeQuery.PageSize,
|
|
|
149
|
+ CooperationModeName: listCooperationModeQuery.CooperationModeName,
|
|
|
150
|
+ OrganizationName: listCooperationModeQuery.OrganizationName,
|
|
|
151
|
+ CompanyId: listCooperationModeQuery.Operator.CompanyId,
|
|
|
152
|
+ UserId: 0,
|
|
|
153
|
+ OrgIds: nil,
|
|
|
154
|
+ OrgId: listCooperationModeQuery.Operator.OrgId,
|
|
|
155
|
+ UserBaseId: 0,
|
|
|
156
|
+ })
|
|
|
157
|
+ if err != nil {
|
|
|
158
|
+ return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
159
|
+ }
|
|
|
160
|
+ var (
|
|
|
161
|
+ listData = make([]dto.CooperationModeItem, 0)
|
|
|
162
|
+ item dto.CooperationModeItem
|
|
|
163
|
+ )
|
|
|
164
|
+ for _, v := range result.List {
|
|
|
165
|
+ item = dto.CooperationModeItem{
|
|
|
166
|
+ CooperationModeId: v.CooperationModeId,
|
|
|
167
|
+ CooperationModeName: v.CooperationModeName,
|
|
|
168
|
+ Remarks: v.Remarks,
|
|
|
169
|
+ Status: v.Status,
|
|
|
170
|
+ CooperationModeNumber: v.CooperationModeNumber,
|
|
|
171
|
+ Org: v.Org,
|
|
|
172
|
+ }
|
|
|
173
|
+ listData = append(listData, item)
|
|
|
174
|
+ }
|
|
|
175
|
+ return int64(result.Total), listData, nil
|
|
|
176
|
+} |