From 2e177c04047f38876f89e5d9ccabcc3bed112727 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期四, 08 七月 2021 15:06:20 +0800 Subject: [PATCH] 今日开发 问题新增 增加是否出书 是否收藏:是、否 每个人的收藏不一样 档案客户访问: 选择短信内容,然后提交的时候发送短信给客户 --- zhengcaioa/Services/IntentionCustomerService.cs | 51 +++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 43 insertions(+), 8 deletions(-) diff --git a/zhengcaioa/Services/IntentionCustomerService.cs b/zhengcaioa/Services/IntentionCustomerService.cs index d935679..22e37f2 100644 --- a/zhengcaioa/Services/IntentionCustomerService.cs +++ b/zhengcaioa/Services/IntentionCustomerService.cs @@ -90,7 +90,15 @@ updateproject.Modifier = intentionCustomer.Modifier; updateproject.Modifytime = intentionCustomer.Modifytime; - } + updateproject.Yixiangtime = intentionCustomer.Yixiangtime; + updateproject.Yixiang = intentionCustomer.Yixiang; + updateproject.Dianxiaozhuanyuan = intentionCustomer.Dianxiaozhuanyuan; + updateproject.Zuijinzhuizongtime = intentionCustomer.Zuijinzhuizongtime; + + updateproject.Weixin = intentionCustomer.Weixin; + updateproject.Shifoutianjiaweixin = intentionCustomer.Shifoutianjiaweixin; + + } _context.SaveChanges(); resultEntity.ReturnID = intentionCustomer.Id; @@ -175,10 +183,18 @@ DateTime.TryParse(Createtimes[1], out Createtimeend); Createtimeend = Createtimeend.AddDays(1); } - + DateTime Yixiangtimestart = DateTime.Now; + DateTime Yixiangtimeend = DateTime.Now; + if (!string.IsNullOrWhiteSpace(searchEntity.Yixiangtime)) + { + string[] Yixiangtimes = searchEntity.Yixiangtime.Split("|"); + DateTime.TryParse(Yixiangtimes[0], out Yixiangtimestart); + DateTime.TryParse(Yixiangtimes[1], out Yixiangtimeend); + // Yixiangtimeend = Yixiangtimeend.AddDays(1); + } - var query = (from a in _context.IntentionCustomers - join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly") + var query = (from a in _context.IntentionCustomers + join b in listCode.Where(x => x.CodeTable == "IntentionCustomer" && x.CodeField == "khly") on a.Khly equals b.CodeSn join c in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "hyfl") on a.Hyfl equals c.CodeSn @@ -188,7 +204,13 @@ on a.Ywjl equals e.Id into esss from abi in esss.DefaultIfEmpty() - join f in _context.Areas on a.Sheng equals f.CodeId + + join f in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A" ) + on a.Dianxiaozhuanyuan equals f.Id + into fsss + from fff in fsss.DefaultIfEmpty() + + join f in _context.Areas on a.Sheng equals f.CodeId join g in _context.Areas on a.City equals g.CodeId join h in _context.Areas on a.AreaId equals h.CodeId @@ -204,7 +226,12 @@ && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || a.AreaId == searchEntity.AreaId.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.Creater == searchEntity.Creater.Trim()) - select new IntentionCustomerDTO + && (string.IsNullOrWhiteSpace(searchEntity.Dianxiaozhuanyuan) || a.Dianxiaozhuanyuan == searchEntity.Dianxiaozhuanyuan.Trim()) + + && (string.IsNullOrWhiteSpace(searchEntity.Yixiangtime) || (a.Yixiangtime >= Yixiangtimestart && a.Yixiangtime <= Yixiangtimeend)) + && (string.IsNullOrWhiteSpace(searchEntity.Yixiang) || ( a.Yixiang == searchEntity.Yixiang.Trim() && (a.Ywjl == null || a.Ywjl == searchEntity.YwjlYx) )) + && (string.IsNullOrWhiteSpace(searchEntity.Shifouweixin) || (searchEntity.Shifouweixin == "A" && a.Weixin != null) || (searchEntity.Shifouweixin != "A" && a.Weixin == null)) + select new IntentionCustomerDTO { Id = a.Id, Sheng = a.Sheng, @@ -244,12 +271,20 @@ ShrTel = a.ShrTel, ShrAddress = a.ShrAddress, Remark = a.Remark, - + Weixin = a.Weixin, + Shifoutianjiaweixin = a.Shifoutianjiaweixin, RecStatus = a.RecStatus, Modifier = a.Modifier, Modifytime = a.Modifytime, CreatetimeName = a.Createtime.ToString("yyyy-MM-dd"), - } + Yixiangtime = a.Yixiangtime, + YixiangtimeName = a.Yixiangtime.HasValue? a.Yixiangtime.Value.ToString("yyyy-MM-dd"):"", + Yixiang = a.Yixiang, + Dianxiaozhuanyuan = a.Dianxiaozhuanyuan, + DianxiaozhuanyuanName = fff.UserName, + Zuijinzhuizongtime = a.Zuijinzhuizongtime, + ZuijinzhuizongtimeName = a.Zuijinzhuizongtime.HasValue ? a.Zuijinzhuizongtime.Value.ToString("yyyy-MM-dd") : "", + } ).OrderByDescending(x => x.Modifytime).ToList(); -- Gitblit v1.9.1