From f7441ac8e0ef8778c4271d4ffec890a7e39bd3ab Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期五, 22 八月 2025 14:39:27 +0800
Subject: [PATCH] feat:开发

---
 FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs b/FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs
index 98fea13..feb25e2 100644
--- a/FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs
+++ b/FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs
@@ -18,7 +18,8 @@
             IRepository<EnterpriseEmployee> rep
         ) :
         IRequestHandler<GetEnterpriseEmployeesQuery, GetEnterpriseEmployeesQueryResult>,
-        IRequestHandler<GetEnterpriseEmployeeQuery, GetEnterpriseEmployeeQueryResult>
+        IRequestHandler<GetEnterpriseEmployeeQuery, GetEnterpriseEmployeeQueryResult>,
+        IRequestHandler<GetEnterpriseEmployeeElectronSignsQuery, GetEnterpriseEmployeeElectronSignsQueryResult>
     {
         private readonly IRepository<EnterpriseEmployee> rep = rep;
 
@@ -138,5 +139,36 @@
 
             return model;
         }
+
+        /// <summary>
+        /// 鏌ヨ涓汉鐢ㄦ埛绛剧害鍒楄〃
+        /// </summary>
+        /// <param name="request"></param>
+        /// <param name="cancellationToken"></param>
+        /// <returns></returns>
+        public async Task<GetEnterpriseEmployeeElectronSignsQueryResult> Handle(GetEnterpriseEmployeeElectronSignsQuery request, CancellationToken cancellationToken)
+        {
+            var logier = JwtUtils.GetCurrentLogier();
+            var q = rep.AsQueryable().AsNoTracking()
+                .Where(it => it.UserId == logier.Id);
+            if (request.UserSignContractStatus.HasValue)
+            {
+                q = q.Where(it => it.UserSignContractStatus == request.UserSignContractStatus.Value);
+            }
+            else
+            {
+                q = q.Where(it =>
+                    it.UserSignContractStatus == EnumTaskUserSignContractStatus.Wait
+                    || it.UserSignContractStatus == EnumTaskUserSignContractStatus.Effect
+                    || it.UserSignContractStatus == EnumTaskUserSignContractStatus.Stop);
+            }
+            var s = q.Select(it => new GetEnterpriseEmployeeElectronSignsQueryResultItem
+            {
+                Id = it.Id,
+                EnterpriseName = it.Enterprise.EnterpriseName,
+                UserSignContractStatus = it.UserSignContractStatus,
+            });
+            return await request.PageModel.GetPagedListAsync<GetEnterpriseEmployeeElectronSignsQueryResult, GetEnterpriseEmployeeElectronSignsQueryResultItem>(s, cancellationToken);
+        }
     }
 }

--
Gitblit v1.9.1