From 45c0e976bd0864dbf103717b45d68a6e0419f456 Mon Sep 17 00:00:00 2001
From: LR-20210131IOQH\Administrator <jackcold@163.com>
Date: 星期日, 27 六月 2021 13:09:34 +0800
Subject: [PATCH] 工资核对状态逻辑修改,3天自动确认;物品添加默认启用;

---
 zhengcaioa/Services/HrSalaryService.cs |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/zhengcaioa/Services/HrSalaryService.cs b/zhengcaioa/Services/HrSalaryService.cs
index 5a28eb1..01f2772 100644
--- a/zhengcaioa/Services/HrSalaryService.cs
+++ b/zhengcaioa/Services/HrSalaryService.cs
@@ -178,7 +178,7 @@
                         }
                     }
 
-                    updatepltRole.Islock = "Q";
+                    updatepltRole.Islock = "H";
                     updatepltRole.Modifier = dto.Modifier;
                     updatepltRole.Modifytime =DateTime.Now;
                     var count= _context.SaveChanges();
@@ -558,7 +558,7 @@
             var entity = (from a in _context.HrSalaries
                           join b in _context.PltUsers on a.Userid equals b.Id
                           join c in _context.HrDepts on b.DeptId equals c.Id
-                          where a.RecStatus=="A" && a.Userid == userid && a.Year == year && a.Month==month
+                          where a.RecStatus=="A" && a.Islock!="D" && a.Userid == userid && a.Year == year && a.Month==month
                           select new HrSalaryDTO()
                           {
                               Id = a.Id,
@@ -799,5 +799,17 @@
             data.LoadData(searchEntity, rolelist);
             return data;
         }
+
+        public void AutoCheck()
+        {
+            try
+            {
+                var salary = _context.Database.ExecuteSqlRaw("update [hr_salary] set islock='Q',[modifier]='e4c93811-b9b1-4998-89f5-c416ebab0c07',modifytime=getdate() where islock = 'H' and DATEDIFF(hh,[modifytime], getdate()) > 72");
+            }
+            catch (Exception)
+            {
+                throw;
+            }
+        }
     }
 }

--
Gitblit v1.9.1