From d4431c7e89865a506af8662244004d0baa7ed609 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 11 六月 2025 12:24:15 +0800 Subject: [PATCH] 投诉处理,爬 --- zhengcaioa/Services/CooperatecustomCustomerService.cs | 62 +++++++++++++++++++++++-------- 1 files changed, 46 insertions(+), 16 deletions(-) diff --git a/zhengcaioa/Services/CooperatecustomCustomerService.cs b/zhengcaioa/Services/CooperatecustomCustomerService.cs index d4ba3a4..ac6a6b6 100644 --- a/zhengcaioa/Services/CooperatecustomCustomerService.cs +++ b/zhengcaioa/Services/CooperatecustomCustomerService.cs @@ -145,9 +145,7 @@ var listPosition = _context.CooperatecustomCustomers.Where(r => r.RecStatus == "A").ToList(); - var CooperatecustomCustomerDTOs = _mapper.Map<List<CooperatecustomCustomerDTO>>(listPosition); - CacheHelperNetCore.CacheInsert("CooperatecustomCustomerDTOs", CooperatecustomCustomerDTOs); - + CacheHelperNetCore.CacheNull("CooperatecustomCustomerDTOs"); resultEntity.ReturnID = cooperatecustomCustomer.Id; resultEntity.Result = true; } @@ -375,6 +373,8 @@ ShenyushouxinName = a.Shenyushouxin.HasValue ? a.Shenyushouxin.Value.ToString("f2") : "", Taocanjianshu = a.Taocanjianshu ?? 0, Customertype = "鍚堜綔瀹㈡埛", + Kuaidistatus = a.Kuaidistatus, + Kuaiditime = a.Kuaiditime, } ); @@ -389,6 +389,19 @@ query = query.Where(a => a.Ywjl == null); } + + } + + if (!string.IsNullOrWhiteSpace(searchEntity.Kuaidistatus)) + { + if (searchEntity.Kuaidistatus == "A") + { + query = query.Where(a => a.Kuaidistatus == searchEntity.Kuaidistatus.Trim()); + } + else + { + query = query.Where(a => a.Kuaidistatus == searchEntity.Kuaidistatus.Trim() || a.Kuaidistatus == null); + } } @@ -504,37 +517,31 @@ { CooperatecustomCustomerDTOs = CooperatecustomCustomerDTOs.Where(x => x.HuiyuanId == HuiyuanId).ToList(); } - if (!string.IsNullOrEmpty(Name)) { CooperatecustomCustomerDTOs = CooperatecustomCustomerDTOs.Where(x => x.Name == Name).ToList(); } - return CooperatecustomCustomerDTOs; } - var listPosition = _context.CooperatecustomCustomers.Where(r => r.RecStatus == "A").ToList(); - CooperatecustomCustomerDTOs = _mapper.Map<List<CooperatecustomCustomerDTO>>(listPosition); CacheHelperNetCore.CacheInsert("CooperatecustomCustomerDTOs", CooperatecustomCustomerDTOs); - if (!string.IsNullOrEmpty(HuiyuanId)) { - CooperatecustomCustomerDTOs = CooperatecustomCustomerDTOs.Where(x => x.HuiyuanId == HuiyuanId).ToList(); + listPosition = listPosition.Where(x => x.HuiyuanId == HuiyuanId).ToList(); } - if (!string.IsNullOrEmpty(Name)) { - CooperatecustomCustomerDTOs = CooperatecustomCustomerDTOs.Where(x => x.Name == Name).ToList(); + listPosition = listPosition.Where(x => x.Name == Name).ToList(); } - + CooperatecustomCustomerDTOs = _mapper.Map<List<CooperatecustomCustomerDTO>>(listPosition); return CooperatecustomCustomerDTOs; - + } public List<CooperatecustomCustomerDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax) @@ -1158,10 +1165,10 @@ - where a.IsValid == true + where a.IsValid == true && a.Itcode.Length<=20 && a.Itcode.Length > 8 && (string.IsNullOrWhiteSpace(searchEntity.Createtime) || (a.CreateTime >= Createtimestart && a.CreateTime <= Createtimeend)) && (string.IsNullOrWhiteSpace(searchEntity.Name) || a.Name.Contains(searchEntity.Name.Trim())) - && (string.IsNullOrWhiteSpace(searchEntity.Itcode) || a.Name.Contains(searchEntity.Itcode.Trim())) + && (string.IsNullOrWhiteSpace(searchEntity.Itcode) || a.Itcode.Contains(searchEntity.Itcode.Trim())) select new FrameworkUserDTO { @@ -1275,6 +1282,18 @@ { DTO.Id = Guid.NewGuid().ToString(); _context.CustomerGuanlianhuiyuans.Add(DTO); + + + var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault(); + if (cooperatecustomCustomer != null) + { + cooperatecustomCustomer.HuiyuanId = DTO.Huiyuanid; + } + var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault(); + if (intentionCustomer != null) + { + intentionCustomer.HuiyuanId = DTO.Huiyuanid; + } } else { @@ -1287,7 +1306,18 @@ updateproject.RecStatus = DTO.RecStatus; updateproject.Modifier = DTO.Modifier; updateproject.Modifytime = DTO.Modifytime; - + + var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault(); + if (cooperatecustomCustomer != null) + { + cooperatecustomCustomer.HuiyuanId = DTO.Huiyuanid; + } + var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault(); + if (intentionCustomer != null) + { + intentionCustomer.HuiyuanId = DTO.Huiyuanid; + } + } _context.SaveChanges(); -- Gitblit v1.9.1