作者 tangxuhui

更新

... ... @@ -94,11 +94,11 @@ type ContractUndertaker struct {
Department domain.Department `json:"department"`
HasReferrer bool `json:"hasReferrer"`
HasSalesman bool `json:"hasSalesman"`
ReferrerUser struct {
ReferrerUser *struct {
UserId int `json:"userId,string,"`
UserInfo domain.UserInfo `json:"userInfo"`
} `json:"referrerUser"`
SalesmanUser struct {
SalesmanUser *struct {
UserId int `json:"userId,string,"`
UserInfo domain.UserInfo `json:"userInfo"`
} `json:"salesmanUser"`
... ... @@ -189,14 +189,26 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
UserCode: v.UserInfo.UserCode,
},
}
u.SalesmanUser.UserId = v.Salesman.UserId
u.SalesmanUser.UserInfo.UsersId = v.Salesman.UserId
u.SalesmanUser.UserInfo.UsersName = v.Salesman.UserName
u.SalesmanUser.UserInfo.Phone = v.Salesman.UserPhone
u.ReferrerUser.UserId = v.Referrer.UserId
u.ReferrerUser.UserInfo.UsersId = v.Referrer.UserId
u.ReferrerUser.UserInfo.UsersName = v.Referrer.UserName
u.ReferrerUser.UserInfo.Phone = v.Referrer.UserPhone
if v.Salesman.UserId > 0 {
u.SalesmanUser = &struct {
UserId int `json:"userId,string,"`
UserInfo domain.UserInfo `json:"userInfo"`
}{}
u.SalesmanUser.UserId = v.Salesman.UserId
u.SalesmanUser.UserInfo.UsersId = v.Salesman.UserId
u.SalesmanUser.UserInfo.UsersName = v.Salesman.UserName
u.SalesmanUser.UserInfo.Phone = v.Salesman.UserPhone
}
if v.Referrer.UserId > 0 {
u.ReferrerUser = &struct {
UserId int `json:"userId,string,"`
UserInfo domain.UserInfo `json:"userInfo"`
}{}
u.ReferrerUser.UserId = v.Referrer.UserId
u.ReferrerUser.UserInfo.UsersId = v.Referrer.UserId
u.ReferrerUser.UserInfo.UsersName = v.Referrer.UserName
u.ReferrerUser.UserInfo.Phone = v.Referrer.UserPhone
}
contractUndertaker = append(contractUndertaker, u)
}
undertakerTypesUncheckedAvailable := param.UndertakerTypesUncheckedAvailable
... ...
... ... @@ -118,6 +118,7 @@ func (cooperationContractService *CooperationContractService) ListCooperationCon
PageSize: listCooperationContractQuery.PageSize,
SponsorName: listCooperationContractQuery.SponsorName,
CooperationContractNumber: listCooperationContractQuery.CooperationContractNumber,
OrgIds: listCooperationContractQuery.Operator.OrgIds,
})
if err != nil {
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ... @@ -214,6 +215,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC
PageNumber: queryParam.PageNumber,
PageIndex: queryParam.PageSize,
CompanyId: queryParam.Operator.CompanyId,
OrgIds: queryParam.Operator.OrgIds,
})
return result.Grid.Total, result.Grid.List, err
... ...
... ... @@ -235,6 +235,8 @@ type (
OrgId int64 ` json:"orgId"`
// 用户基础数据id
UserBaseId int64 `json:"userBaseId"`
// 组织机构ID
OrgIds []int64 ` json:"orgIds"`
}
DataCooperationContractSearch struct {
... ... @@ -248,13 +250,14 @@ type (
//根据承接人查询并返回共创项目合约
type (
ReqCooperationContractSearchByUndertaker struct {
CooperationContractName string `json:"cooperationContractName"` //合约名称
SponsorName string `json:"sponsorName"` //项目发起人姓名
PageNumber int `json:"pageNumber"`
PageIndex int `json:"pageIndex"`
CompanyId int64 ` json:"companyId"`
OrgId int64 ` json:"orgId"`
UserBaseId int64 `json:"userBaseId"`
CooperationContractName string `json:"cooperationContractName"` //合约名称
SponsorName string `json:"sponsorName"` //项目发起人姓名
PageNumber int `json:"pageNumber"`
PageIndex int `json:"pageIndex"`
CompanyId int64 ` json:"companyId"`
OrgId int64 ` json:"orgId"`
UserBaseId int64 `json:"userBaseId"`
OrgIds []int64 ` json:"orgIds"`
}
DataCooperationContractSearchByUndertaker struct {
... ...
... ... @@ -7,12 +7,12 @@ type (
ReqContractChangeLogsSearch struct {
OperationType int `json:"operationType,"` // 合约变更操作类型,1编辑、2暂停、3恢复
CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号
PageNumber int ` json:"pageNumber,"` // 页码
PageNumber int `json:"pageNumber,"` // 页码
PageSize int `json:"pageSize,"` // 页面大小
CompanyId int `json:"companyId"` //公司ID
OrgId int64 `json:"orgId"` // 组织机构ID
OrgIds []int64 `json:"orgIds"` // 关联的组织机构ID列表
UserId int64 ` json:"userId"` // 用户ID,
UserId int64 `json:"userId"` // 用户ID,
UserBaseId int64 `json:"userBaseId"` // 用户基础数据id
}
... ...