作者 tangxuhui
... ... @@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct {
// 模式编码,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
// 发起组织ID
OrgId int64 `json:"departmentId" valid:"Required"`
OrgId int `json:"departmentId" valid:"Required"`
// 共创项目名称
CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
// 共创发起人id
... ...
... ... @@ -35,7 +35,7 @@ type CreditAccountItem struct {
Company domain.CompanyData `json:"company"` // 公司
CreatedAt int64 `json:"createdAt"` // 创建时间
UpdatedAt int64 `json:"updatedAt"` // 更新时间
AccountDetail []struct {
AccountDetail struct {
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
DividendsType int `json:"dividendsType"`
DividendsAmount float64 `json:"dividendsAmount"`
... ...
... ... @@ -41,6 +41,9 @@ func (srv CooperationApplicationsService) GetCooperationApplications(application
resultApplication.CooperationProject.CooperationMode.CooperationModeNumber = resultProject.CooperationMode.CooperationModeNumber
resultApplication.CooperationProject.CooperationMode.CooperationModeName = resultProject.CooperationMode.CooperationModeName
resultApplication.CooperationProject.CooperationMode.CooperationModeId = resultProject.CooperationMode.CooperationModeId
resultApplication.Department.DepartmentID = resultApplication.Org.OrgID
resultApplication.Department.DepartmentName = resultApplication.Org.OrgName
return resultApplication, nil
}
... ... @@ -75,6 +78,10 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat
CompanyId: int(applicationQuery.Operator.CompanyId),
CooperationApplicationStatus: applicationQuery.Status,
})
for i := 0; i < len(resultApplications.Grid.List); i++ {
resultApplications.Grid.List[i].Department.DepartmentID = resultApplications.Grid.List[i].Org.OrgID
resultApplications.Grid.List[i].Department.DepartmentName = resultApplications.Grid.List[i].Org.OrgName
}
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
... ...
... ... @@ -27,6 +27,7 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
Attachment: createCooperationProjectCommand.Attachment,
DepartmentId: createCooperationProjectCommand.OrgId,
})
if err != nil {
... ... @@ -92,6 +93,7 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm
PageNumber: projectQuery.PageNumber,
PageSize: projectQuery.PageSize,
Status: int(projectQuery.Status),
OrgId: projectQuery.Operator.OrgId,
})
if err != nil {
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -19,6 +19,7 @@ func (srv CompanyCreditAccountService) CreditAccountSearch(cmd *command.CreditAc
PageNumber: cmd.PageNumber,
PageSize: cmd.PageSize,
PaymentStatus: cmd.PaymentStatus,
OrgId: cmd.Operator.OrgId,
})
if err != nil {
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -13,7 +13,7 @@ type UpdateUserInfoCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 头像
Avatar string `cname:"头像" json:"avatar" valid:"Required"`
Avatar string `cname:"头像" json:"avatar"`
// 用户姓名
UserName string `cname:"用户姓名" json:"userName" valid:"Required"`
// 邮箱
... ...
... ... @@ -100,7 +100,9 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, "用户不存在")
}
if _, ok := updateUserInfoCommand.BodyKV["avatar"]; !ok {
updateUserInfoCommand.Avatar = user.UserInfo.Avatar
}
if _, ok := updateUserInfoCommand.BodyKV["email"]; !ok {
updateUserInfoCommand.Email = user.UserInfo.Email
}
... ...
... ... @@ -25,10 +25,10 @@ type CreditAccountItem struct {
OrgID int `json:"orgId,string"`
OrgName string `json:"orgName"`
} `json:"org"` // 数据所属组织机构
Company domain.CompanyData `json:"company"` // 公司
Company domain.CompanyData `json:"company11"` // TODO:暂时不需要公司
CreatedAt int64 `json:"createdAt"` // 创建时间
UpdatedAt int64 `json:"updatedAt"` // 更新时间
AccountDetail []struct {
AccountDetail struct {
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
DividendsType int `json:"dividendsType"`
DividendsAmount float64 `json:"dividendsAmount"`
... ...
... ... @@ -195,7 +195,7 @@ func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.Co
//数据转换
cnt := int64(result.Count)
var (
listData []dto.CompanyUserItem
listData = make([]dto.CompanyUserItem, 0)
item dto.CompanyUserItem
)
for _, v := range result.Users {
... ... @@ -374,7 +374,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery *
InOrgIds: cooperationUserListQuery.Operator.OrgIds,
})
var (
listData []dto.CooperationUserItem
listData = make([]dto.CooperationUserItem, 0)
item dto.CooperationUserItem
)
cnt := result.Count
... ...
... ... @@ -57,6 +57,10 @@ type CooperationApplication struct {
OrgID int `json:"orgId"`
OrgName string `json:"orgName"`
} `json:"org"`
Department struct {
DepartmentID int `json:"departmentId"`
DepartmentName string `json:"departmentName"`
} `json:"department"`
IsCanceled bool `json:"isCanceled"`
Company struct {
CompanyID int `json:"companyId"`
... ...
... ... @@ -38,10 +38,10 @@ type CreditAccount struct {
OrgID int `json:"orgId,string"`
OrgName string `json:"orgName"`
} `json:"org"` // 数据所属组织机构
Company domain.CompanyData `json:"company"` // 公司
Company domain.CompanyData `json:"company1"` // 公司
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
AccountDetail []struct {
AccountDetail struct {
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
DividendsType int `json:"dividendsType"`
DividendsAmount float64 `json:"dividendsAmount"`
... ... @@ -76,6 +76,16 @@ type (
PaymentStatus int32 `json:"paymentStatus" valid:"Required"`
// 结算周期,按年“2021”或者按月结算”2021-07“
Period time.Time `json:"period,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID" json:"companyId"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
}
DataCreditAccountsSearch struct {
... ...