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/IntentionCustomerService.cs |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/zhengcaioa/Services/IntentionCustomerService.cs b/zhengcaioa/Services/IntentionCustomerService.cs
index 410bb6c..29c77ff 100644
--- a/zhengcaioa/Services/IntentionCustomerService.cs
+++ b/zhengcaioa/Services/IntentionCustomerService.cs
@@ -54,7 +54,7 @@
                         intentionCustomer.Ywjltime = DateTime.Now;
                         var Cooper = _context.CooperatecustomCustomers.Count(x => x.RecStatus == "A" && x.Ywjl == intentionCustomer.Ywjl);
                         var Inten = _context.IntentionCustomers.Count(x => x.RecStatus == "A" && x.Ywjl == intentionCustomer.Ywjl);
-                        if(Cooper+ Inten >= 2000)
+                        if(Cooper+ Inten > 2000)
                         {
                             resultEntity.Result = false;
                             resultEntity.Message = "璇ヤ笟鍔$粡鐞嗭紝瀹㈡埛鍗曚綅鍜屽悎浣滃鎴峰悎璁¤秴杩�2000锛�";
@@ -510,21 +510,35 @@
         /// 鑾峰彇鎵�鏈夋湁鏁堟剰鍚戝鎴�
         /// </summary>
         /// <returns></returns>
-        public List<IntentionCustomerDTO> GetList()
+        public List<IntentionCustomerDTO> GetList(string huiyuanId = null)
         {
             List<IntentionCustomerDTO> intentionCustomerDTOs = (List<IntentionCustomerDTO>)CacheHelperNetCore.CacheValue("intentionCustomerDTOs");
+             
+
             if (intentionCustomerDTOs != null && intentionCustomerDTOs.Count > 0)
             {
+                if (!string.IsNullOrEmpty(huiyuanId))
+                {
+                    intentionCustomerDTOs = intentionCustomerDTOs.Where(x => x.HuiyuanId == huiyuanId).ToList();
+                }
+
+                
                 return intentionCustomerDTOs;
             }
+
 
             var listPosition = _context.IntentionCustomers.Where(r => r.RecStatus == "A").ToList();
 
             intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition);
             CacheHelperNetCore.CacheInsert("intentionCustomerDTOs", intentionCustomerDTOs);
 
-            var list = _mapper.Map<List<IntentionCustomerDTO>>(listPosition);
-            return list;
+
+            if (!string.IsNullOrEmpty(huiyuanId))
+            {
+                intentionCustomerDTOs = intentionCustomerDTOs.Where(x => x.HuiyuanId == huiyuanId).ToList();
+            }
+
+            return intentionCustomerDTOs;
         }
 
         /// <summary>

--
Gitblit v1.9.1