From 00446e5e764fd57ea0f28b30921f4a5daa60c890 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 23 七月 2021 14:10:31 +0800
Subject: [PATCH] 流程  费用申请,物品申领

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

diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs
index a46891d..5193469 100644
--- a/zhengcaioa/Services/ProjectService.cs
+++ b/zhengcaioa/Services/ProjectService.cs
@@ -333,7 +333,26 @@
                     sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (b.[defen]-a.[drhx_defen])  <= " + aaaa + " ) ");
                 }
             }
+            if (!string.IsNullOrWhiteSpace(searchEntity.Baojiachaxiaoyu))
+            {
+                decimal aaaa = 0;
+                decimal.TryParse(searchEntity.Baojiachaxiaoyu, out aaaa);
+                if (aaaa > 0)
+                {
+                    sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (convert(numeric(10,2),b.[price] )-convert(numeric(10,2),a.[drhx_price] ))  <= " + aaaa + " ) ");
+                }
+            }
+            
 
+            if (!string.IsNullOrWhiteSpace(searchEntity.Fenchadayu))
+            {
+                decimal aaaa = 0;
+                decimal.TryParse(searchEntity.Fenchadayu, out aaaa);
+                if (aaaa > 0)
+                {
+                    sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (b.[defen]-a.[drhx_defen])  >= " + aaaa + " ) ");
+                }
+            }
 
             if (!string.IsNullOrWhiteSpace(searchEntity.Shuliang))
             {
@@ -519,7 +538,7 @@
             
 
             
-            if (searchEntity.totalrows == 0)
+            //if (searchEntity.totalrows == 0)
                 searchEntity.totalrows = query.Count();
             var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
             list = _mapper.Map<List<ProjectDTO>>(lianlist);
@@ -617,5 +636,16 @@
             CacheHelperNetCore.CacheInsert("Projects", list);
             return list;
         }
+
+
+        public List<ProjectDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax)
+        {
+
+
+            var listPosition = _context.Projects.Where(r => r.RecStatus == "A" && r.Creater == userid && r.Createtime >= datemin && r.Createtime < datemax).ToList();
+
+            var list = _mapper.Map<List<ProjectDTO>>(listPosition);
+            return list;
+        }
     }
 }

--
Gitblit v1.9.1