| | |
| | | updateproject.RecStatus = entity.RecStatus; |
| | | updateproject.Modifier = entity.Modifier; |
| | | updateproject.Modifytime = entity.Modifytime; |
| | | updateproject.DuanxinNeirong = entity.DuanxinNeirong; |
| | | |
| | | } |
| | | |
| | |
| | | var query = (from a in _context.IntentionVisits |
| | | join b in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "visType") |
| | | on a.VisType equals b.CodeSn |
| | | into bzsssss |
| | | from bzzzzz in bzsssss.DefaultIfEmpty() |
| | | |
| | | join c in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "jtype") |
| | | on a.Jtype equals c.CodeSn |
| | | into czsssss |
| | | from czzzzz in czsssss.DefaultIfEmpty() |
| | | |
| | | join d in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "zw") |
| | | on a.Zw equals d.CodeSn |
| | | into dzsssss |
| | | from dzzzzz in dzsssss.DefaultIfEmpty() |
| | | |
| | | join e in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "yx") |
| | | on a.Yx equals e.CodeSn |
| | | into ezsssss |
| | | from ezzzzz in ezsssss.DefaultIfEmpty() |
| | | |
| | | join f in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "jy") |
| | | on a.Jy equals f.CodeSn |
| | | into fzsssss |
| | | from fzzzzz in fzsssss.DefaultIfEmpty() |
| | | |
| | | join zz in _context.IntentionCustomers.Where(x => x.RecStatus == "A") |
| | | on a.Viscustomer equals zz.Id |
| | | join g in _context.Areas on zz.Sheng equals g.CodeId |
| | | join h in _context.Areas on zz.City equals h.CodeId |
| | | join i in _context.Areas on zz.AreaId equals i.CodeId |
| | | into zzzsssss |
| | | from zzzzzzz in zzzsssss.DefaultIfEmpty() |
| | | |
| | | //join g in _context.Areas on zzzzzzz.Sheng equals g.CodeId |
| | | //into gzsssss |
| | | //from gzzzzz in gzsssss.DefaultIfEmpty() |
| | | |
| | | //join h in _context.Areas on zzzzzzz.City equals h.CodeId |
| | | //into hzsssss |
| | | //from hzzzzz in hzsssss.DefaultIfEmpty() |
| | | |
| | | //join i in _context.Areas on zzzzzzz.AreaId equals i.CodeId |
| | | //into izsssss |
| | | //from izzzzz in izsssss.DefaultIfEmpty() |
| | | |
| | | |
| | | join zzz in _context.PltUsers.Where(x => x.RecStatus == "A") |
| | | on a.Creater equals zzz.Id |
| | | into zsssss |
| | | from zzzzz in zsssss.DefaultIfEmpty() |
| | | |
| | | |
| | | |
| | | |
| | | where a.RecStatus == "A" |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Vistime) || (a.Vistime >= Vistimestart && a.Vistime <= Vistimeend)) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Name) || zz.Name.Contains(searchEntity.Name.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Khly) || zz.Khly == searchEntity.Khly.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Hyfl) || zz.Hyfl == searchEntity.Hyfl.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Khlx) || zz.Khlx == searchEntity.Khlx.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Ywjl) || zz.Ywjl == searchEntity.Ywjl.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Sheng) || zz.Sheng == searchEntity.Sheng.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.City) || zz.City == searchEntity.City.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || zz.AreaId == searchEntity.AreaId.Trim()) |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Name) || zzzzzzz.Name.Contains(searchEntity.Name.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Khly) || zzzzzzz.Khly == searchEntity.Khly.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Hyfl) || zzzzzzz.Hyfl == searchEntity.Hyfl.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Khlx) || zzzzzzz.Khlx == searchEntity.Khlx.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Ywjl) || zzzzzzz.Ywjl == searchEntity.Ywjl.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Sheng) || zzzzzzz.Sheng == searchEntity.Sheng.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.City) || zzzzzzz.City == searchEntity.City.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || zzzzzzz.AreaId == searchEntity.AreaId.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Viscustomer) || a.Viscustomer == searchEntity.Viscustomer.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.Creater == searchEntity.Creater.Trim()) |
| | | select new IntentionVisitDTO |
| | | { |
| | | Id = a.Id, |
| | | Vistime = a.Vistime, |
| | | VisType = a.VisType, |
| | | Viscustomer = a.Viscustomer, |
| | | Name = zz.Name, |
| | | Name = zzzzzzz.Name, |
| | | Jtype = a.Jtype, |
| | | Jdr = a.Jdr, |
| | | ShengName = g.Name + "-" + h.Name + "-" + i.Name, |
| | | VisTypeName = b.Comments, |
| | | JtypeName = c.Comments, |
| | | ZwName = d.Comments, |
| | | YxName = e.Comments, |
| | | JyName = f.Comments, |
| | | //ShengName = gzzzzz.Name + "-" + hzzzzz.Name + "-" + izzzzz.Name, |
| | | VisTypeName = bzzzzz.Comments, |
| | | JtypeName = czzzzz.Comments, |
| | | ZwName = dzzzzz.Comments, |
| | | YxName = ezzzzz.Comments, |
| | | JyName = fzzzzz.Comments, |
| | | Zw = a.Zw, |
| | | Talk = a.Talk, |
| | | Khfk = a.Khfk, |
| | | Yx = a.Yx, |
| | | CreaterName = zzzzz.UserName, |
| | | |
| | | Jy = a.Jy, |
| | | Creater = a.Creater, |
| | |
| | | Modifier = a.Modifier, |
| | | Modifytime = a.Modifytime, |
| | | VistimeName = a.Vistime.ToString("yyyy-MM-dd"), |
| | | DuanxinNeirong = a.DuanxinNeirong, |
| | | } |
| | | ).OrderByDescending(x => x.Vistime).ToList(); |
| | | |
| | | |
| | | |
| | | 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(); |
| | | data.LoadData(searchEntity, lianlist); |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | public List<IntentionVisitDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax) |
| | | { |
| | | |
| | | |
| | | // var listCooperVisits = _context.CooperVisits.Where(r => id.Contains(r.Id) && r.RecStatus == "A").Select(x => x.Viscustomer).ToList(); |
| | | |
| | | var listCooperatecustomCustomers = _context.IntentionVisits.Where(r => r.RecStatus == "A" && r.Creater == userid && r.Vistime >= datemin && r.Vistime < datemax).ToList(); |
| | | |
| | | var result = _mapper.Map<List<IntentionVisitDTO>>(listCooperatecustomCustomers); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | public IntentionVisitDuanxinDTO GetDuanxin(string id) |
| | | { |
| | | |
| | | var entity = _context.IntentionVisitDuanxins.Find(id); |
| | | |
| | | if (entity.RecStatus != "A") |
| | | { |
| | | entity = new IntentionVisitDuanxin(); |
| | | } |
| | | |
| | | var result = _mapper.Map<IntentionVisitDuanxinDTO>(entity); |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取所有有效意向客户 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<IntentionVisitDuanxinDTO> GetListDuanxin() |
| | | { |
| | | |
| | | var listIntentionCustomers = _context.IntentionVisitDuanxins.Where(r => r.RecStatus == "A").ToList(); |
| | | |
| | | var result = _mapper.Map<List<IntentionVisitDuanxinDTO>>(listIntentionCustomers); |
| | | |
| | | return result; |
| | | } |
| | | } |
| | | } |