正在显示
4 个修改的文件
包含
36 行增加
和
19 行删除
| @@ -94,11 +94,11 @@ type ContractUndertaker struct { | @@ -94,11 +94,11 @@ type ContractUndertaker struct { | ||
| 94 | Department domain.Department `json:"department"` | 94 | Department domain.Department `json:"department"` |
| 95 | HasReferrer bool `json:"hasReferrer"` | 95 | HasReferrer bool `json:"hasReferrer"` |
| 96 | HasSalesman bool `json:"hasSalesman"` | 96 | HasSalesman bool `json:"hasSalesman"` |
| 97 | - ReferrerUser struct { | 97 | + ReferrerUser *struct { |
| 98 | UserId int `json:"userId,string,"` | 98 | UserId int `json:"userId,string,"` |
| 99 | UserInfo domain.UserInfo `json:"userInfo"` | 99 | UserInfo domain.UserInfo `json:"userInfo"` |
| 100 | } `json:"referrerUser"` | 100 | } `json:"referrerUser"` |
| 101 | - SalesmanUser struct { | 101 | + SalesmanUser *struct { |
| 102 | UserId int `json:"userId,string,"` | 102 | UserId int `json:"userId,string,"` |
| 103 | UserInfo domain.UserInfo `json:"userInfo"` | 103 | UserInfo domain.UserInfo `json:"userInfo"` |
| 104 | } `json:"salesmanUser"` | 104 | } `json:"salesmanUser"` |
| @@ -189,14 +189,26 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon | @@ -189,14 +189,26 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon | ||
| 189 | UserCode: v.UserInfo.UserCode, | 189 | UserCode: v.UserInfo.UserCode, |
| 190 | }, | 190 | }, |
| 191 | } | 191 | } |
| 192 | - u.SalesmanUser.UserId = v.Salesman.UserId | ||
| 193 | - u.SalesmanUser.UserInfo.UsersId = v.Salesman.UserId | ||
| 194 | - u.SalesmanUser.UserInfo.UsersName = v.Salesman.UserName | ||
| 195 | - u.SalesmanUser.UserInfo.Phone = v.Salesman.UserPhone | ||
| 196 | - u.ReferrerUser.UserId = v.Referrer.UserId | ||
| 197 | - u.ReferrerUser.UserInfo.UsersId = v.Referrer.UserId | ||
| 198 | - u.ReferrerUser.UserInfo.UsersName = v.Referrer.UserName | ||
| 199 | - u.ReferrerUser.UserInfo.Phone = v.Referrer.UserPhone | 192 | + if v.Salesman.UserId > 0 { |
| 193 | + u.SalesmanUser = &struct { | ||
| 194 | + UserId int `json:"userId,string,"` | ||
| 195 | + UserInfo domain.UserInfo `json:"userInfo"` | ||
| 196 | + }{} | ||
| 197 | + u.SalesmanUser.UserId = v.Salesman.UserId | ||
| 198 | + u.SalesmanUser.UserInfo.UsersId = v.Salesman.UserId | ||
| 199 | + u.SalesmanUser.UserInfo.UsersName = v.Salesman.UserName | ||
| 200 | + u.SalesmanUser.UserInfo.Phone = v.Salesman.UserPhone | ||
| 201 | + } | ||
| 202 | + if v.Referrer.UserId > 0 { | ||
| 203 | + u.ReferrerUser = &struct { | ||
| 204 | + UserId int `json:"userId,string,"` | ||
| 205 | + UserInfo domain.UserInfo `json:"userInfo"` | ||
| 206 | + }{} | ||
| 207 | + u.ReferrerUser.UserId = v.Referrer.UserId | ||
| 208 | + u.ReferrerUser.UserInfo.UsersId = v.Referrer.UserId | ||
| 209 | + u.ReferrerUser.UserInfo.UsersName = v.Referrer.UserName | ||
| 210 | + u.ReferrerUser.UserInfo.Phone = v.Referrer.UserPhone | ||
| 211 | + } | ||
| 200 | contractUndertaker = append(contractUndertaker, u) | 212 | contractUndertaker = append(contractUndertaker, u) |
| 201 | } | 213 | } |
| 202 | undertakerTypesUncheckedAvailable := param.UndertakerTypesUncheckedAvailable | 214 | undertakerTypesUncheckedAvailable := param.UndertakerTypesUncheckedAvailable |
| @@ -118,6 +118,7 @@ func (cooperationContractService *CooperationContractService) ListCooperationCon | @@ -118,6 +118,7 @@ func (cooperationContractService *CooperationContractService) ListCooperationCon | ||
| 118 | PageSize: listCooperationContractQuery.PageSize, | 118 | PageSize: listCooperationContractQuery.PageSize, |
| 119 | SponsorName: listCooperationContractQuery.SponsorName, | 119 | SponsorName: listCooperationContractQuery.SponsorName, |
| 120 | CooperationContractNumber: listCooperationContractQuery.CooperationContractNumber, | 120 | CooperationContractNumber: listCooperationContractQuery.CooperationContractNumber, |
| 121 | + OrgIds: listCooperationContractQuery.Operator.OrgIds, | ||
| 121 | }) | 122 | }) |
| 122 | if err != nil { | 123 | if err != nil { |
| 123 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 124 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| @@ -214,6 +215,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC | @@ -214,6 +215,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC | ||
| 214 | PageNumber: queryParam.PageNumber, | 215 | PageNumber: queryParam.PageNumber, |
| 215 | PageIndex: queryParam.PageSize, | 216 | PageIndex: queryParam.PageSize, |
| 216 | CompanyId: queryParam.Operator.CompanyId, | 217 | CompanyId: queryParam.Operator.CompanyId, |
| 218 | + OrgIds: queryParam.Operator.OrgIds, | ||
| 217 | }) | 219 | }) |
| 218 | 220 | ||
| 219 | return result.Grid.Total, result.Grid.List, err | 221 | return result.Grid.Total, result.Grid.List, err |
| @@ -235,6 +235,8 @@ type ( | @@ -235,6 +235,8 @@ type ( | ||
| 235 | OrgId int64 ` json:"orgId"` | 235 | OrgId int64 ` json:"orgId"` |
| 236 | // 用户基础数据id | 236 | // 用户基础数据id |
| 237 | UserBaseId int64 `json:"userBaseId"` | 237 | UserBaseId int64 `json:"userBaseId"` |
| 238 | + // 组织机构ID | ||
| 239 | + OrgIds []int64 ` json:"orgIds"` | ||
| 238 | } | 240 | } |
| 239 | 241 | ||
| 240 | DataCooperationContractSearch struct { | 242 | DataCooperationContractSearch struct { |
| @@ -248,13 +250,14 @@ type ( | @@ -248,13 +250,14 @@ type ( | ||
| 248 | //根据承接人查询并返回共创项目合约 | 250 | //根据承接人查询并返回共创项目合约 |
| 249 | type ( | 251 | type ( |
| 250 | ReqCooperationContractSearchByUndertaker struct { | 252 | ReqCooperationContractSearchByUndertaker struct { |
| 251 | - CooperationContractName string `json:"cooperationContractName"` //合约名称 | ||
| 252 | - SponsorName string `json:"sponsorName"` //项目发起人姓名 | ||
| 253 | - PageNumber int `json:"pageNumber"` | ||
| 254 | - PageIndex int `json:"pageIndex"` | ||
| 255 | - CompanyId int64 ` json:"companyId"` | ||
| 256 | - OrgId int64 ` json:"orgId"` | ||
| 257 | - UserBaseId int64 `json:"userBaseId"` | 253 | + CooperationContractName string `json:"cooperationContractName"` //合约名称 |
| 254 | + SponsorName string `json:"sponsorName"` //项目发起人姓名 | ||
| 255 | + PageNumber int `json:"pageNumber"` | ||
| 256 | + PageIndex int `json:"pageIndex"` | ||
| 257 | + CompanyId int64 ` json:"companyId"` | ||
| 258 | + OrgId int64 ` json:"orgId"` | ||
| 259 | + UserBaseId int64 `json:"userBaseId"` | ||
| 260 | + OrgIds []int64 ` json:"orgIds"` | ||
| 258 | } | 261 | } |
| 259 | 262 | ||
| 260 | DataCooperationContractSearchByUndertaker struct { | 263 | DataCooperationContractSearchByUndertaker struct { |
| @@ -7,12 +7,12 @@ type ( | @@ -7,12 +7,12 @@ type ( | ||
| 7 | ReqContractChangeLogsSearch struct { | 7 | ReqContractChangeLogsSearch struct { |
| 8 | OperationType int `json:"operationType,"` // 合约变更操作类型,1编辑、2暂停、3恢复 | 8 | OperationType int `json:"operationType,"` // 合约变更操作类型,1编辑、2暂停、3恢复 |
| 9 | CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号 | 9 | CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号 |
| 10 | - PageNumber int ` json:"pageNumber,"` // 页码 | 10 | + PageNumber int `json:"pageNumber,"` // 页码 |
| 11 | PageSize int `json:"pageSize,"` // 页面大小 | 11 | PageSize int `json:"pageSize,"` // 页面大小 |
| 12 | CompanyId int `json:"companyId"` //公司ID | 12 | CompanyId int `json:"companyId"` //公司ID |
| 13 | OrgId int64 `json:"orgId"` // 组织机构ID | 13 | OrgId int64 `json:"orgId"` // 组织机构ID |
| 14 | OrgIds []int64 `json:"orgIds"` // 关联的组织机构ID列表 | 14 | OrgIds []int64 `json:"orgIds"` // 关联的组织机构ID列表 |
| 15 | - UserId int64 ` json:"userId"` // 用户ID, | 15 | + UserId int64 `json:"userId"` // 用户ID, |
| 16 | UserBaseId int64 `json:"userBaseId"` // 用户基础数据id | 16 | UserBaseId int64 `json:"userBaseId"` // 用户基础数据id |
| 17 | } | 17 | } |
| 18 | 18 |
-
请 注册 或 登录 后发表评论