| | |
| | | |
| | | var listPosition = _context.IntentionCustomers.Where(r => r.RecStatus == "A").ToList(); |
| | | |
| | | var intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition); |
| | | CacheHelperNetCore.CacheInsert("intentionCustomerDTOs", intentionCustomerDTOs); |
| | | |
| | | // var intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition); |
| | | //CacheHelperNetCore.CacheInsert("intentionCustomerDTOs", intentionCustomerDTOs); |
| | | CacheHelperNetCore.CacheNull("intentionCustomerDTOs"); |
| | | resultEntity.ReturnID = intentionCustomer.Id; |
| | | resultEntity.Result = true; |
| | | } |
| | |
| | | Zuijinzhuizongtime = a.Zuijinzhuizongtime, |
| | | ZuijinzhuizongtimeName = a.Zuijinzhuizongtime.HasValue ? a.Zuijinzhuizongtime.Value.ToString("yyyy-MM-dd") : "", |
| | | Visittimes = lll.Visittimes, |
| | | Kuaidistatus = a.Kuaidistatus, |
| | | Kuaiditime = a.Kuaiditime, |
| | | } |
| | | ); |
| | | |
| | | if (!string.IsNullOrWhiteSpace(searchEntity.Shifouweixin)) |
| | | { |
| | | query = query.Where( a=>a.Shifoutianjiaweixin == searchEntity.Shifouweixin.Trim()); |
| | | } |
| | | |
| | | 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); |
| | | } |
| | | |
| | | } |
| | | |
| | | if (!string.IsNullOrWhiteSpace(searchEntity.Ywjl)) |
| | |
| | | /// <returns></returns> |
| | | public List<IntentionCustomerDTO> GetList(string huiyuanId = null) |
| | | { |
| | | |
| | | |
| | | List<IntentionCustomerDTO> intentionCustomerDTOs = (List<IntentionCustomerDTO>)CacheHelperNetCore.CacheValue("intentionCustomerDTOs"); |
| | | |
| | | |
| | | if (intentionCustomerDTOs != null && intentionCustomerDTOs.Count > 0) |
| | | { |
| | |
| | | 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); |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(huiyuanId)) |
| | | { |
| | | intentionCustomerDTOs = intentionCustomerDTOs.Where(x => x.HuiyuanId == huiyuanId).ToList(); |
| | | listPosition = listPosition.Where(x => x.HuiyuanId == huiyuanId).ToList(); |
| | | } |
| | | |
| | | intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition); |
| | | return intentionCustomerDTOs; |
| | | } |
| | | |
| | |
| | | return resultEntity; |
| | | } |
| | | |
| | | |
| | | |
| | | public ResultEntity GetZhengfuProjectDTOByTitle(string Name, string Id) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | resultEntity.Result = true; |
| | | if (!string.IsNullOrWhiteSpace(Name)) |
| | | { |
| | | var checkUserSn = _context.IntentionCustomers.Where(r => r.RecStatus == "A" && r.Name == Name).FirstOrDefault(); |
| | | if (checkUserSn != null && (string.IsNullOrWhiteSpace(Id) || (!string.IsNullOrWhiteSpace(Id) && checkUserSn.Id != Id))) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "该档案客户已经存在"; |
| | | |
| | | } |
| | | var checkUserSncooper = _context.CooperatecustomCustomers.Where(r => r.RecStatus == "A" && r.Name == Name).FirstOrDefault(); |
| | | if (checkUserSncooper != null && (string.IsNullOrWhiteSpace(Id) || (!string.IsNullOrWhiteSpace(Id) && checkUserSncooper.Id != Id))) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "该合作客户已经存在"; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | return resultEntity; |
| | | } |
| | | |
| | | } |
| | | } |