feat: 增加删除最近指派人

This commit is contained in:
cjy 2025-11-28 15:31:25 +08:00
parent 3847142b91
commit 6c729bb8bd
5 changed files with 1977 additions and 1739 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,8 @@ import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
_ "google.golang.org/protobuf/types/descriptorpb"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
@ -530,10 +530,23 @@ func (this *TaskAssignRequest) Validate() error {
func (this *UpdatePendingCountRequest) Validate() error {
return nil
}
func (this *AddHiddenTaskAssigneeRequest) Validate() error {
return nil
}
func (this *RecentAssignRecordsRequest) Validate() error {
return nil
}
func (this *RecentAssigneeItem) Validate() error {
return nil
}
func (this *RecentAssignRecordsResponse) Validate() error {
for _, item := range this.OperatorList {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("OperatorList", err)
}
}
}
return nil
}
func (this *EmployeeTaskQueryRequest) Validate() error {

View File

@ -102,6 +102,7 @@ type BundleClient interface {
BatchAssignTask(ctx context.Context, in *BatchAssignTaskRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
BatchTerminateTask(ctx context.Context, in *BatchTerminateTaskRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
GetArtistUploadStatsList(ctx context.Context, in *TaskQueryRequest, opts ...grpc_go.CallOption) (*ArtistUploadStatsResponse, common.ErrorWithAttachment)
// 数据指标
MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment)
MetricsOperatingCreate(ctx context.Context, in *MetricsOperatingCreateReq, opts ...grpc_go.CallOption) (*MetricsOperatingCreateResp, common.ErrorWithAttachment)
MetricsOperatingStatus(ctx context.Context, in *MetricsOperatingStatusReq, opts ...grpc_go.CallOption) (*MetricsOperatingStatusResp, common.ErrorWithAttachment)
@ -112,6 +113,7 @@ type BundleClient interface {
SetPendingTaskLayout(ctx context.Context, in *SetPendingTaskLayoutReq, opts ...grpc_go.CallOption) (*SetPendingTaskLayoutResp, common.ErrorWithAttachment)
GetPendingUploadBreakdown(ctx context.Context, in *PendingUploadBreakdownRequest, opts ...grpc_go.CallOption) (*PendingUploadBreakdownResponse, common.ErrorWithAttachment)
RevertTaskCompletionByUUIDItem(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenTaskAssigneeRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
}
type bundleClient struct {
@ -196,6 +198,7 @@ type BundleClientImpl struct {
SetPendingTaskLayout func(ctx context.Context, in *SetPendingTaskLayoutReq) (*SetPendingTaskLayoutResp, error)
GetPendingUploadBreakdown func(ctx context.Context, in *PendingUploadBreakdownRequest) (*PendingUploadBreakdownResponse, error)
RevertTaskCompletionByUUIDItem func(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error)
AddHiddenTaskAssignee func(ctx context.Context, in *AddHiddenTaskAssigneeRequest) (*ComResponse, error)
}
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
@ -672,6 +675,12 @@ func (c *bundleClient) RevertTaskCompletionByUUIDItem(ctx context.Context, in *R
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RevertTaskCompletionByUUIDItem", in, out)
}
func (c *bundleClient) AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenTaskAssigneeRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment) {
out := new(ComResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddHiddenTaskAssignee", in, out)
}
// BundleServer is the server API for Bundle service.
// All implementations must embed UnimplementedBundleServer
// for forward compatibility
@ -750,6 +759,7 @@ type BundleServer interface {
BatchAssignTask(context.Context, *BatchAssignTaskRequest) (*ComResponse, error)
BatchTerminateTask(context.Context, *BatchTerminateTaskRequest) (*ComResponse, error)
GetArtistUploadStatsList(context.Context, *TaskQueryRequest) (*ArtistUploadStatsResponse, error)
// 数据指标
MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error)
MetricsOperatingCreate(context.Context, *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error)
MetricsOperatingStatus(context.Context, *MetricsOperatingStatusReq) (*MetricsOperatingStatusResp, error)
@ -760,6 +770,7 @@ type BundleServer interface {
SetPendingTaskLayout(context.Context, *SetPendingTaskLayoutReq) (*SetPendingTaskLayoutResp, error)
GetPendingUploadBreakdown(context.Context, *PendingUploadBreakdownRequest) (*PendingUploadBreakdownResponse, error)
RevertTaskCompletionByUUIDItem(context.Context, *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error)
AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error)
mustEmbedUnimplementedBundleServer()
}
@ -999,6 +1010,9 @@ func (UnimplementedBundleServer) GetPendingUploadBreakdown(context.Context, *Pen
func (UnimplementedBundleServer) RevertTaskCompletionByUUIDItem(context.Context, *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RevertTaskCompletionByUUIDItem not implemented")
}
func (UnimplementedBundleServer) AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddHiddenTaskAssignee not implemented")
}
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
@ -3260,6 +3274,35 @@ func _Bundle_RevertTaskCompletionByUUIDItem_Handler(srv interface{}, ctx context
return interceptor(ctx, in, info, handler)
}
func _Bundle_AddHiddenTaskAssignee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(AddHiddenTaskAssigneeRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("AddHiddenTaskAssignee", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -3575,6 +3618,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "RevertTaskCompletionByUUIDItem",
Handler: _Bundle_RevertTaskCompletionByUUIDItem_Handler,
},
{
MethodName: "AddHiddenTaskAssignee",
Handler: _Bundle_AddHiddenTaskAssignee_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "pb/bundle.proto",

View File

@ -73,6 +73,9 @@ func TaskBenchRouter(r *gin.RouterGroup) {
// 查询艺人待上传列表并导出Excel
taskBenchRoute.POST("pending-upload-list-download", taskbench.GetArtistUploadStatsListDownload)
// 添加隐藏任务指派人
taskBenchRoute.POST("hide", taskbench.AddHiddenTaskAssignee)
}
// 员工任务相关路由需要App登录验证

View File

@ -182,6 +182,22 @@ func GetRecentAssignRecords(c *gin.Context) {
service.Success(c, res)
}
func AddHiddenTaskAssignee(c *gin.Context) {
var req bundle.AddHiddenTaskAssigneeRequest
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.AddHiddenTaskAssignee(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
// GetEmployeeAssignedTasks 根据登录人信息查询被指派给该员工的任务
func GetEmployeeAssignedTasks(c *gin.Context) {
var req bundle.EmployeeTaskQueryRequest