From 67a0042c5f29e4bb0e0b82f6190f2bc51480b45c Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 28 二月 2023 13:25:09 +0800
Subject: [PATCH] 工资绩效改版

---
 zhengcaioa/Services/ProjectService.cs |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs
index 6fcde97..089febc 100644
--- a/zhengcaioa/Services/ProjectService.cs
+++ b/zhengcaioa/Services/ProjectService.cs
@@ -1400,5 +1400,48 @@
 
             return resultEntity;
         }
+
+
+        public ResultEntity GetZhengfuProjectDTOByTitle(string Title, string Id, DateTime? NoticeTime)
+        {
+            ResultEntity resultEntity = new ResultEntity();
+            resultEntity.Result = true;
+            if(!string.IsNullOrWhiteSpace(Title) && NoticeTime.HasValue)
+            {
+                var checkUserSn = _webcontext.ZhengfuProjects.Where(x => x.Title == Title && x.RecStatus == "A" && x.Id != Id && x.NoticeTime >= NoticeTime.Value.AddDays(-1) && x.NoticeTime <= NoticeTime.Value.AddDays(1)).FirstOrDefault();
+                if (checkUserSn != null && (string.IsNullOrWhiteSpace(Id) || (!string.IsNullOrWhiteSpace(Id) && checkUserSn.Id != Id)))
+                {
+                    resultEntity.Result = false;
+                    resultEntity.Message = "璇ラ〉闈㈠凡缁忓瓨鍦�";
+
+                }
+            }
+           
+
+
+            return resultEntity;
+        }
+
+       
+        public ResultEntity saveProjectfasongxiaoxi(Projectfasongxiaoxi project)
+        {
+            ResultEntity resultEntity = new ResultEntity();
+            try
+            {
+
+                project.Id = Guid.NewGuid().ToString();
+                _context.Projectfasongxiaoxis.Add(project);
+                _context.SaveChanges();
+                resultEntity.ReturnID = project.Id;
+                resultEntity.Result = true;
+            }
+            catch (Exception ex)
+            {
+                resultEntity.Result = false;
+                resultEntity.Message = "淇濆瓨澶辫触锛岃鑱旂郴绠$悊鍛�";
+
+            }
+            return resultEntity;
+        }
     }
 }

--
Gitblit v1.9.1