From 3a57c342ff5b39467b9dd0d5ba3c624311a581f1 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期五, 22 八月 2025 16:44:06 +0800
Subject: [PATCH] feat:开发

---
 FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs b/FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs
index 564a73d..ba2e8dd 100644
--- a/FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs
+++ b/FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs
@@ -7,6 +7,7 @@
 using Furion.HttpRemote;
 using Mapster;
 using MediatR;
+using Microsoft.AspNetCore.Components.Forms;
 using Microsoft.EntityFrameworkCore;
 using MiniExcelLibs;
 using NetTopologySuite.Index.HPRtree;
@@ -25,14 +26,16 @@
     /// 鐏靛伐鍛戒护澶勭悊鍣�
     /// </summary>
     public class EnterpriseEmployeesCommandHandler(
+            IMediator mediator,
             IRepository<EnterpriseEmployee> rep,
             IRepository<User> repUser,
             IRepository<EnterpriseEmployeeContract> repEnterpriseEmployeeContract
         ) :
         IRequestHandler<ImportEnterpriseEmployeesCommand, ImportEnterpriseEmployeesCommandResult>,
         IRequestHandler<EditEnterpriseEmployeeCommand, Guid>,
-        IRequestHandler<InviteEnterpriseEmployeeElectronSignCommand, Guid>
+        IRequestHandler<InviteElectronSignCommand, Guid>
     {
+        private readonly IMediator mediator = mediator;
         private readonly IRepository<EnterpriseEmployee> rep = rep;
         private readonly IRepository<User> repUser = repUser;
         private readonly IRepository<EnterpriseEmployeeContract> repEnterpriseEmployeeContract = repEnterpriseEmployeeContract;
@@ -200,7 +203,7 @@
         /// <param name="request"></param>
         /// <param name="cancellationToken"></param>
         /// <returns></returns>
-        public async Task<Guid> Handle(InviteEnterpriseEmployeeElectronSignCommand request, CancellationToken cancellationToken)
+        public async Task<Guid> Handle(InviteElectronSignCommand request, CancellationToken cancellationToken)
         {
             var logier = JwtUtils.GetCurrentLogier();
             var entity = await rep.AsQueryable()
@@ -210,6 +213,10 @@
             if (entity.UserSignContractStatus == EnumTaskUserSignContractStatus.Pass) throw Oops.Oh(EnumErrorCodeType.s400, "宸茬绾�");
             if (entity.UserSignContractStatus == EnumTaskUserSignContractStatus.Effect) throw Oops.Oh(EnumErrorCodeType.s400, "宸茬敓鏁�");
             if (entity.UserSignContractStatus == EnumTaskUserSignContractStatus.Wait) throw Oops.Oh(EnumErrorCodeType.s400, "宸查個璇�");
+            await mediator.Send(new CheckContractTemplateCommand
+            {
+                Id = request.Id
+            }, cancellationToken);
             entity.ContractTemplateId = request.Id;
             entity.UserSignContractStatus = EnumTaskUserSignContractStatus.Wait;
             entity.UserSignContractTime = null;

--
Gitblit v1.9.1