diff --git a/api/members/members.pb.go b/api/members/members.pb.go index 55967da..34d8782 100644 --- a/api/members/members.pb.go +++ b/api/members/members.pb.go @@ -699,9 +699,9 @@ type Management struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image"` - Status int32 `protobuf:"varint,3,opt,name=status,proto3" json:"status"` - Brief string `protobuf:"bytes,4,opt,name=brief,proto3" json:"brief"` - Introduction string `protobuf:"bytes,5,opt,name=introduction,proto3" json:"introduction"` + Brief string `protobuf:"bytes,3,opt,name=brief,proto3" json:"brief"` + Introduction string `protobuf:"bytes,4,opt,name=introduction,proto3" json:"introduction"` + Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status"` IsSetting int32 `protobuf:"varint,6,opt,name=isSetting,proto3" json:"isSetting"` } @@ -751,13 +751,6 @@ func (x *Management) GetImage() string { return "" } -func (x *Management) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - func (x *Management) GetBrief() string { if x != nil { return x.Brief @@ -772,6 +765,13 @@ func (x *Management) GetIntroduction() string { return "" } +func (x *Management) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + func (x *Management) GetIsSetting() int32 { if x != nil { return x.IsSetting @@ -1175,9 +1175,9 @@ type CommitteeAppointments struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status"` - AuditCommittee string `protobuf:"bytes,3,opt,name=auditCommittee,proto3" json:"auditCommittee"` - CompensationCommittee string `protobuf:"bytes,4,opt,name=compensationCommittee,proto3" json:"compensationCommittee"` - NominatingCommittee string `protobuf:"bytes,5,opt,name=nominatingCommittee,proto3" json:"nominatingCommittee"` + AuditCommittee int32 `protobuf:"varint,3,opt,name=auditCommittee,proto3" json:"auditCommittee"` + CompensationCommittee int32 `protobuf:"varint,4,opt,name=compensationCommittee,proto3" json:"compensationCommittee"` + NominatingCommittee int32 `protobuf:"varint,5,opt,name=nominatingCommittee,proto3" json:"nominatingCommittee"` IsSetting int32 `protobuf:"varint,6,opt,name=isSetting,proto3" json:"isSetting"` } @@ -1227,25 +1227,25 @@ func (x *CommitteeAppointments) GetStatus() int32 { return 0 } -func (x *CommitteeAppointments) GetAuditCommittee() string { +func (x *CommitteeAppointments) GetAuditCommittee() int32 { if x != nil { return x.AuditCommittee } - return "" + return 0 } -func (x *CommitteeAppointments) GetCompensationCommittee() string { +func (x *CommitteeAppointments) GetCompensationCommittee() int32 { if x != nil { return x.CompensationCommittee } - return "" + return 0 } -func (x *CommitteeAppointments) GetNominatingCommittee() string { +func (x *CommitteeAppointments) GetNominatingCommittee() int32 { if x != nil { return x.NominatingCommittee } - return "" + return 0 } func (x *CommitteeAppointments) GetIsSetting() int32 { @@ -1263,9 +1263,9 @@ type EditCommitteeAppointmentsReq struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` Status int32 `protobuf:"varint,3,opt,name=status,proto3" json:"status"` - AuditCommittee string `protobuf:"bytes,4,opt,name=auditCommittee,proto3" json:"auditCommittee"` - CompensationCommittee string `protobuf:"bytes,5,opt,name=compensationCommittee,proto3" json:"compensationCommittee"` - NominatingCommittee string `protobuf:"bytes,6,opt,name=nominatingCommittee,proto3" json:"nominatingCommittee"` + AuditCommittee int32 `protobuf:"varint,4,opt,name=auditCommittee,proto3" json:"auditCommittee"` + CompensationCommittee int32 `protobuf:"varint,5,opt,name=compensationCommittee,proto3" json:"compensationCommittee"` + NominatingCommittee int32 `protobuf:"varint,6,opt,name=nominatingCommittee,proto3" json:"nominatingCommittee"` IsSetting int32 `protobuf:"varint,7,opt,name=isSetting,proto3" json:"isSetting"` Operator string `protobuf:"bytes,8,opt,name=operator,proto3" json:"operator"` OperatorId int32 `protobuf:"varint,9,opt,name=operatorId,proto3" json:"operatorId"` @@ -1324,25 +1324,25 @@ func (x *EditCommitteeAppointmentsReq) GetStatus() int32 { return 0 } -func (x *EditCommitteeAppointmentsReq) GetAuditCommittee() string { +func (x *EditCommitteeAppointmentsReq) GetAuditCommittee() int32 { if x != nil { return x.AuditCommittee } - return "" + return 0 } -func (x *EditCommitteeAppointmentsReq) GetCompensationCommittee() string { +func (x *EditCommitteeAppointmentsReq) GetCompensationCommittee() int32 { if x != nil { return x.CompensationCommittee } - return "" + return 0 } -func (x *EditCommitteeAppointmentsReq) GetNominatingCommittee() string { +func (x *EditCommitteeAppointmentsReq) GetNominatingCommittee() int32 { if x != nil { return x.NominatingCommittee } - return "" + return 0 } func (x *EditCommitteeAppointmentsReq) GetIsSetting() int32 { @@ -1496,12 +1496,12 @@ var file_api_members_members_proto_rawDesc = []byte{ 0x0a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x62, 0x72, 0x69, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x72, - 0x69, 0x65, 0x66, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x72, 0x69, 0x65, 0x66, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x72, 0x69, 0x65, 0x66, 0x12, 0x22, 0x0a, 0x0c, 0x69, + 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xfd, 0x01, 0x0a, 0x11, 0x45, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x75, @@ -1555,13 +1555,13 @@ var file_api_members_members_proto_rawDesc = []byte{ 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x28, 0x05, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x05, 0x52, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xc8, 0x02, 0x0a, 0x1c, 0x45, 0x64, 0x69, @@ -1572,13 +1572,13 @@ var file_api_members_members_proto_rawDesc = []byte{ 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x05, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, diff --git a/pkg/router/router.go b/pkg/router/router.go index c310457..f0de128 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -223,7 +223,7 @@ func NewRouter() *gin.Engine { membersRouteLogin.POST("/list", members.GetMemberList) membersRouteLogin.POST("/edit", members.EditMember) membersRouteLogin.POST("/delete", members.DeleteMember) - // 成员信息管理 + // 成员部门信息管理 membersRouteLogin.POST("/management/edit", members.EditManagement) // 董事会信息管理 membersRouteLogin.POST("/boardofdirectors/edit", members.EditBoardOfDirectors) diff --git a/pkg/service/bundle/reconciliation.go b/pkg/service/bundle/reconciliation.go index 29e4e88..4bdd7af 100644 --- a/pkg/service/bundle/reconciliation.go +++ b/pkg/service/bundle/reconciliation.go @@ -24,6 +24,33 @@ func GetReconciliationList(c *gin.Context) { service.Error(c, err) return } + res := &bundle.GetReconciliationListResp{} + // Step 1: 如果有姓名/电话筛选,先查用户列表 + if req.UserName != "" { + userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{ + BlurNameTel: req.UserName, + Domain: "app", + }) + if err != nil { + service.Error(c, err) + return + } + + if len(userListResp.UserList) == 0 { + // 没查到用户,直接返回空结果 + res.Page = req.Page + res.PageSize = req.PageSize + res.Total = 0 + service.Success(c, res) + return + } + + // 提取用户ID列表 + for _, u := range userListResp.UserList { + req.UserIDS = append(req.UserIDS, u.Id) + } + } + req.UserName = "" detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req) if detailErr != nil { service.Error(c, detailErr) @@ -63,6 +90,31 @@ func GetReconciliationListDownload(c *gin.Context) { service.Error(c, err) return } + res := &bundle.GetReconciliationListResp{} + if req.UserName != "" { + userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{ + BlurNameTel: req.UserName, + Domain: "app", + }) + if err != nil { + service.Error(c, err) + return + } + + if len(userListResp.UserList) == 0 { + // 没查到用户,直接返回空结果 + res.Page = req.Page + res.PageSize = req.PageSize + res.Total = 0 + service.Success(c, res) + return + } + + // 提取用户ID列表 + for _, u := range userListResp.UserList { + req.UserIDS = append(req.UserIDS, u.Id) + } + } detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req) if detailErr != nil { service.Error(c, detailErr) @@ -306,7 +358,7 @@ func AutoCreateUserAndOrder(c *gin.Context) { ) // 当前 未将 签名 写入合同中 todo 金额和有效时间待修改 contract := "https://e-cdn.fontree.cn/fonchain-main/prod/file/saas/contract/template-25032801.pdf" - expirationDay = t.AddDate(10, 0, 0).Format("2006-01-02") + expirationDay = t.AddDate(1, 0, 0).Format("2006-01-02") signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay) if signContractErr != nil { service.Error(c, signContractErr)