| | |
| | | updateproject.Shifoutianjiaweixin = cooperatecustomCustomer.Shifoutianjiaweixin; |
| | | updateproject.Weixintime = cooperatecustomCustomer.Weixintime; |
| | | updateproject.Weixiner = cooperatecustomCustomer.Weixiner; |
| | | updateproject.Shouxinedu = cooperatecustomCustomer.Shouxinedu; |
| | | } |
| | | |
| | | _context.SaveChanges(); |
| | |
| | | DateTime.TryParse(Createtimes[1], out Createtimeend); |
| | | Createtimeend = Createtimeend.AddDays(1); |
| | | } |
| | | |
| | | |
| | | |
| | | var query = (from a in _context.CooperatecustomCustomers |
| | | join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly") |
| | |
| | | from abi in esss.DefaultIfEmpty() |
| | | |
| | | |
| | | join i in _context.CooperOrders.Where(x => x.RecStatus == "A" && x.ChedanStatus !="A" ).GroupBy(q => new { q.Khdw }).Select(q => new |
| | | join i in _context.CooperOrders.Where(x => x.RecStatus == "A" && x.ChedanStatus != "A").GroupBy(q => new { q.Khdw }).Select(q => new |
| | | { |
| | | Khdw = q.Key.Khdw, |
| | | Moneycount = q.Sum(i => i.Money), |
| | | Ordercount = q.Count(), |
| | | } |
| | | } |
| | | ) |
| | | on a.Id equals i.Khdw |
| | | into isss |
| | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Sheng) || a.Sheng == searchEntity.Sheng.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.City) || a.City == searchEntity.City.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || a.AreaId == searchEntity.AreaId.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Shifouweixin) || a.Shifoutianjiaweixin == searchEntity.Shifouweixin.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Shifouweixin) || a.Shifoutianjiaweixin == searchEntity.Shifouweixin.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.HuiyuanId) || a.HuiyuanId == searchEntity.HuiyuanId.Trim()) |
| | | |
| | | select new CooperatecustomCustomerDTO |
| | |
| | | Hyfl = a.Hyfl, |
| | | Khlx = a.Khlx, |
| | | Ywjl = a.Ywjl, |
| | | ShengName = fff.Name + "-" + ggg.Name+ "-" + hhh.Name, |
| | | ShengName = fff.Name + "-" + ggg.Name + "-" + hhh.Name, |
| | | CityName = ggg.Name, |
| | | AreaIdName = hhh.Name, |
| | | KhlyName = bbb.Comments, |
| | |
| | | Tel = a.Tel, |
| | | Ordercount = iii.Ordercount.ToString(), |
| | | Moneycount = iii.Moneycount.ToString(), |
| | | Moneycountde = iii.Moneycount, |
| | | Phone = a.Phone, |
| | | Qq = a.Qq, |
| | | Email = a.Email, |
| | |
| | | HuiyuanId = a.HuiyuanId, |
| | | Weixiner = a.Weixiner, |
| | | Weixintime = a.Weixintime, |
| | | Yufukuan = a.Yufukuan ?? 0, |
| | | Shouxinedu = a.Shouxinedu ?? 0, |
| | | Shenyushouxin = a.Shenyushouxin ?? 0, |
| | | YufukuanName = a.Yufukuan.HasValue ? a.Yufukuan.Value.ToString("f2") : "", |
| | | ShouxineduName = a.Shouxinedu.HasValue ? a.Shouxinedu.Value.ToString("f2") : "", |
| | | ShenyushouxinName = a.Shenyushouxin.HasValue ? a.Shenyushouxin.Value.ToString("f2") : "", |
| | | } |
| | | ).OrderByDescending(x => x.Modifytime).ToList(); |
| | | |
| | |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | data.Heji1 = Math.Round(query.Sum(x => x.Yufukuan) ?? 0, 2); |
| | | data.Heji2 = Math.Round(query.Sum(x => x.Shouxinedu) ?? 0, 2); |
| | | data.Heji3 = Math.Round(query.Sum(x => x.Shenyushouxin) ?? 0, 2); |
| | | data.Heji4 = Math.Round(query.Sum(x => x.Moneycountde) ?? 0, 2); |
| | | var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | data.DangyeHeji1 = Math.Round(lianlist.Sum(x => x.Yufukuan) ?? 0, 2); |
| | | data.DangyeHeji2 = Math.Round(lianlist.Sum(x => x.Shouxinedu) ?? 0, 2); |
| | | data.DangyeHeji3 = Math.Round(lianlist.Sum(x => x.Shenyushouxin) ?? 0, 2); |
| | | data.DangyeHeji4 = Math.Round(lianlist.Sum(x => x.Moneycountde) ?? 0, 2); |
| | | data.LoadData(searchEntity, lianlist); |
| | | return data; |
| | | } |