| | |
| | | private readonly ILiaotianService _liaotianService; |
| | | private readonly IHttpClientFactory _clientFactory; |
| | | private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService; |
| | | private readonly IIntentionCustomerService _intentionCustomerService; |
| | | private readonly zhengcaioaContext _context; |
| | | private readonly IMapper _mapper; |
| | | private readonly zcUserInfoN_dbContext _zcUserInfoN_DbContext; |
| | | private readonly IMdbtestContext _iMdbtestContext; |
| | | public TimerGetShopUsersService(ILogger<TimerGetShopUsersService> logger, IServiceScopeFactory factory) |
| | | { |
| | | _logger = logger; |
| | |
| | | _liaotianService = factory.CreateScope().ServiceProvider.GetRequiredService<ILiaotianService>(); |
| | | _clientFactory = factory.CreateScope().ServiceProvider.GetRequiredService<IHttpClientFactory>(); |
| | | _cooperatecustomCustomerService = factory.CreateScope().ServiceProvider.GetRequiredService<ICooperatecustomCustomerService>(); |
| | | _intentionCustomerService = factory.CreateScope().ServiceProvider.GetRequiredService<IIntentionCustomerService>(); |
| | | _context = factory.CreateScope().ServiceProvider.GetRequiredService<zhengcaioaContext>(); |
| | | _mapper = factory.CreateScope().ServiceProvider.GetRequiredService<IMapper>(); ; |
| | | _mapper = factory.CreateScope().ServiceProvider.GetRequiredService<IMapper>(); |
| | | _zcUserInfoN_DbContext = factory.CreateScope().ServiceProvider.GetRequiredService<zcUserInfoN_dbContext>(); |
| | | _iMdbtestContext = factory.CreateScope().ServiceProvider.GetRequiredService<IMdbtestContext>(); |
| | | } |
| | | |
| | | protected override async Task ExecuteAsync(CancellationToken stoppingToken) |
| | |
| | | //stoppingToken.Register(() => File.Create($"E:\\dotnetCore\\Practice\\Practice\\{DateTime.Now.Millisecond}.txt")); |
| | | |
| | | DateTime datenow = DateTime.Now; |
| | | DateTime datenowfasongxiaoxi = DateTime.Now.Date; |
| | | while (!stoppingToken.IsCancellationRequested) |
| | | { |
| | | _logger.LogInformation("TimerGetShopUsersService 开始执行"); |
| | | _logger.LogInformation(datenow.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | if (DateTime.Now.Hour == 6) |
| | | _logger.LogInformation("datenowfasongxiaoxi.Day:" + datenowfasongxiaoxi.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | _logger.LogInformation("DateTime.Now.Hour:" + DateTime.Now.Hour); |
| | | if (datenowfasongxiaoxi <= DateTime.Now.Date && DateTime.Now.Hour == 11) |
| | | //if (true) |
| | | { |
| | | this.fasongxiaoxi(); |
| | | _logger.LogInformation("datenowfasongxiaoxi.Day" + datenowfasongxiaoxi.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | try |
| | | { |
| | | datenowfasongxiaoxi = DateTime.Now.Date.AddDays(1); |
| | | this.fasongxiaoxi(); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _logger.LogInformation(ex.ToString()); |
| | | } |
| | | } |
| | | |
| | | //每个小时计算一次 |
| | |
| | | //查询并且发送短信和app消息给客户 |
| | | public void fasongxiaoxi() |
| | | { |
| | | string appkey = "BC-3ed0636563ff4f0f96d6fab0c150e940"; |
| | | string huawei = "IM"; |
| | | string oppo = "IM"; |
| | | string xiaomi = "IM"; |
| | | string vivo = "1"; |
| | | var startdate = DateTime.Now.AddMonths(-3); |
| | | |
| | | var projects =_context.Projects.Where(x => x.RecStatus == "A" && x.StartTime >= startdate).ToList(); |
| | |
| | | var intentionCustomers = _context.IntentionCustomers.Where(x => x.RecStatus == "A").ToList(); |
| | | |
| | | var cooperatecustomCustomers = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A").ToList(); |
| | | |
| | | |
| | | //关联表 |
| | | var customerGuanlianhuiyuans = _context.CustomerGuanlianhuiyuans.Where(x => x.RecStatus == "A").ToList(); |
| | | |
| | | //会员表 |
| | | var frameworkUsers = _zcUserInfoN_DbContext.FrameworkUsers.Where(x => x.IsValid == true).ToList(); |
| | | |
| | | //昵称标 |
| | | var imUserInfos = _iMdbtestContext.ImUserInfos.ToList(); |
| | | |
| | | //StringBuilder number = new StringBuilder(); ; |
| | | //if (result != null && result.Count > 0) |
| | |
| | | { |
| | | fbprojiectid.Add(project.Id); |
| | | } |
| | | var fbprojectzhongbiaos = _context.Projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectzhongbiaos = projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | var fbprojectreasons = _context.Projectreasons.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectreasons = projectreasons.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | var fbprojectyouxiaos = _context.Projectyouxiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectyouxiaos = projectyouxiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | |
| | | var projectfasongxiaoxiDTOsduanxin = new List<ProjectfasongxiaoxiDTO>(); |
| | |
| | | } |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送短信的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | if(customerGuanlianhuiyuansqita!=null&& customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x=> huiyuanids.Contains(x.Id)).ToList(); |
| | | if(frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower() ; |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送App消息的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id ).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id ).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | | string customename = ""; |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | | numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | } |
| | | } |
| | | |
| | | if (numberstring.EndsWith(",")) |
| | | { |
| | | numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | } |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司的“标书预评审”服务\"," |
| | | + "\"content\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"getui_alias\": [" + numberstring + "]," |
| | | + "\"payload\": {\"text\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:" + ywjl.Phone + " \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | { |
| | | if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | | |
| | | |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | | string customename = ""; |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | | numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | } |
| | | } |
| | | |
| | | if (numberstring.EndsWith(",")) |
| | | { |
| | | numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | } |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司的“标书预评审”服务\"," |
| | | + "\"content\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:400-028-8080 \"," |
| | | + "\"getui_alias\": [" + numberstring + "]," |
| | | + "\"payload\": {\"text\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:400-028-8080 \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | { |
| | | if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | | |
| | | |
| | | _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //发送短信 |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | | while (j*1000<= projectfasongxiaoxisywjl.Count) |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if(countt> projectfasongxiaoxisywjl.Count) |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i+j-1].Tel) >= 0) |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"" + ywjl.UserSn + "\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \""+ ywjl.UserName + "\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \""+ projectfasongxiaoxisywjl[i].HuiyuanName+ "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司的“标书预评审”服务 \",\"body\": \"政采咨询公司的“标书预评审”服务 \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":"+ vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | |
| | | |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | //int j = 0; |
| | | //while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | //{ |
| | | // j = j + 1; |
| | | // string numberstring = ""; |
| | | // string customename = ""; |
| | | // if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | // { |
| | | // int countt = (j * 1000); |
| | | // if (countt > projectfasongxiaoxisywjl.Count) |
| | | // { |
| | | // countt = projectfasongxiaoxisywjl.Count; |
| | | // } |
| | | |
| | | // for (int i = 0; i < countt; i++) |
| | | // { |
| | | // if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | // customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | // } |
| | | // } |
| | | |
| | | // if (numberstring.EndsWith(",")) |
| | | // { |
| | | // numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | // } |
| | | // if (string.IsNullOrEmpty(numberstring)) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司的“标书预评审”服务\"," |
| | | // + "\"content\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:" + ywjl.Phone + " \"," |
| | | // + "\"getui_alias\": [" + numberstring + "]," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:" + ywjl.Phone + " \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | // foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | // { |
| | | // if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // } |
| | | |
| | | |
| | | |
| | | // _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | //} |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"kehujingli\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"客户经理\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:400-028-8080 \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司的“标书预评审”服务 \",\"body\": \"政采咨询公司的“标书预评审”服务 \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | //int j = 0; |
| | | //while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | //{ |
| | | // j = j + 1; |
| | | // string numberstring = ""; |
| | | // string customename = ""; |
| | | // if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | // { |
| | | // int countt = (j * 1000); |
| | | // if (countt > projectfasongxiaoxisywjl.Count) |
| | | // { |
| | | // countt = projectfasongxiaoxisywjl.Count; |
| | | // } |
| | | // for (int i = 0; i < countt; i++) |
| | | // { |
| | | // if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | // customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | // } |
| | | // } |
| | | |
| | | // if (numberstring.EndsWith(",")) |
| | | // { |
| | | // numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | // } |
| | | // if (string.IsNullOrEmpty(numberstring)) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司的“标书预评审”服务\"," |
| | | // + "\"content\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:400-028-8080 \"," |
| | | // + "\"getui_alias\": [" + numberstring + "]," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司的“标书预评审”服务,由3位退休资深评审专家在开标前按照评标流程为您交叉检查标书,杜绝废标 、帮助您得到全部综合评审得分,经政采咨询公司检查过的标书,不可能被废标,详情请咨询:400-028-8080 \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | // foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | // { |
| | | // if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // } |
| | | |
| | | |
| | | |
| | | // _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | //} |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | fbprojiectid.Add(project.Id); |
| | | } |
| | | var fbprojectzhongbiaos = _context.Projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectzhongbiaos = projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | |
| | | var projectfasongxiaoxiDTOsduanxin = new List<ProjectfasongxiaoxiDTO>(); |
| | |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = "app"; |
| | | projectfasongxiaoxiDTO.Gyszl = "2"; |
| | | projectfasongxiaoxiDTO.Khname = project1.Drhx; |
| | | projectfasongxiaoxiDTO.RecStatus = project1.Drhx; |
| | | projectfasongxiaoxiDTO.RecStatus = "A"; |
| | | projectfasongxiaoxiDTO.Createtime = DateTime.Now; |
| | | projectfasongxiaoxiDTO.Projectname = project1.Name; |
| | | projectfasongxiaoxiDTOsapp.Add(projectfasongxiaoxiDTO); |
| | |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = "2"; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = "duanxin"; |
| | | projectfasongxiaoxiDTO.Gyszl = "3"; |
| | | projectfasongxiaoxiDTO.Khname = project1.Drhx; |
| | | projectfasongxiaoxiDTO.RecStatus = project1.Drhx; |
| | | projectfasongxiaoxiDTO.Khname = project1.Dshx; |
| | | projectfasongxiaoxiDTO.RecStatus = "A"; |
| | | projectfasongxiaoxiDTO.Createtime = DateTime.Now; |
| | | projectfasongxiaoxiDTO.Projectname = project1.Name; |
| | | projectfasongxiaoxiDTOsduanxin.Add(projectfasongxiaoxiDTO); |
| | |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = "2"; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = "app"; |
| | | projectfasongxiaoxiDTO.Gyszl = "3"; |
| | | projectfasongxiaoxiDTO.Khname = project1.Drhx; |
| | | projectfasongxiaoxiDTO.Khname = project1.Dshx; |
| | | projectfasongxiaoxiDTO.RecStatus = "A"; |
| | | projectfasongxiaoxiDTO.Createtime = DateTime.Now; |
| | | projectfasongxiaoxiDTO.Projectname = project1.Name; |
| | |
| | | |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送短信的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送App消息的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | } |
| | | } |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | |
| | | |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"getui_alias\": \"" + projectfasongxiaoxisywjl[i].Tel + "\"," |
| | | + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:" + ywjl.Phone + " \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | |
| | | if (isOK.IndexOf(projectfasongxiaoxisywjl[i].Tel) >= 0) |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:400-028-8080 \"," |
| | | + "\"getui_alias\": \"" + projectfasongxiaoxisywjl[i].Tel + "\"," |
| | | + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:400-028-8080 \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | |
| | | if (isOK.IndexOf(projectfasongxiaoxisywjl[i].Tel) >= 0) |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation( "无业务经理推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //发送短信 |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | } |
| | | } |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"" + ywjl.UserSn + "\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"" + ywjl.UserName + "\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司专业“标书检查”、“标书指导” \",\"body\": \"政采咨询公司专业“标书检查”、“标书指导” \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | |
| | | |
| | | //for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | //{ |
| | | // string conment = "{" |
| | | //+ "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | //+ "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | // + "\"getui_alias\": \"" + projectfasongxiaoxisywjl[i].Tel + "\"," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:" + ywjl.Phone + " \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | |
| | | // if (isOK.IndexOf(projectfasongxiaoxisywjl[i].Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | //} |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"kehujingli\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"客户经理\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:400-028-8080 \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司专业“标书检查”、“标书指导” \",\"body\": \"政采咨询公司专业“标书检查”、“标书指导” \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | |
| | | // for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | // { |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | // + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:400-028-8080 \"," |
| | | // + "\"getui_alias\": \"" + projectfasongxiaoxisywjl[i].Tel + "\"," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,如果您在参加“" + projectfasongxiaoxisywjl[i].Projectname + "”投标前找政采咨询检查标书,至少提升评审得分5-8分,也许中标的就是贵公司。了解详情请咨询:400-028-8080 \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | |
| | | // if (isOK.IndexOf(projectfasongxiaoxisywjl[i].Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // _logger.LogInformation( "无业务经理推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | // } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | { |
| | | fbprojiectid.Add(project.Id); |
| | | } |
| | | var fbprojectzhongbiaos = _context.Projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectzhongbiaos = projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | |
| | | var projectfasongxiaoxiDTOsduanxin = new List<ProjectfasongxiaoxiDTO>(); |
| | |
| | | |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送短信的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送App消息的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | | string customename = ""; |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | | numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | } |
| | | } |
| | | |
| | | if (numberstring.EndsWith(",")) |
| | | { |
| | | numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | } |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"getui_alias\": [" + numberstring + "]," |
| | | + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:" + ywjl.Phone + " \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | { |
| | | if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | | |
| | | |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | | string customename = ""; |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | | numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | } |
| | | } |
| | | |
| | | if (numberstring.EndsWith(",")) |
| | | { |
| | | numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | } |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:400-028-8080 \"," |
| | | + "\"getui_alias\": [" + numberstring + "]," |
| | | + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:400-028-8080 \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | { |
| | | if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | | |
| | | |
| | | _logger.LogInformation( "无业务经理推送app给客户" + customename); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //发送短信 |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | } |
| | | } |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"" + ywjl.UserSn + "\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"" + ywjl.UserName + "\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司专业“标书检查”、“标书指导” \",\"body\": \"政采咨询公司专业“标书检查”、“标书指导” \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | //int j = 0; |
| | | //while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | //{ |
| | | // j = j + 1; |
| | | // string numberstring = ""; |
| | | // string customename = ""; |
| | | // if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | // { |
| | | // int countt = (j * 1000); |
| | | // if (countt > projectfasongxiaoxisywjl.Count) |
| | | // { |
| | | // countt = projectfasongxiaoxisywjl.Count; |
| | | // } |
| | | |
| | | // for (int i = 0; i < countt; i++) |
| | | // { |
| | | // if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | // customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | // } |
| | | // } |
| | | |
| | | // if (numberstring.EndsWith(",")) |
| | | // { |
| | | // numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | // } |
| | | // if (string.IsNullOrEmpty(numberstring)) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | // + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | // + "\"getui_alias\": [" + numberstring + "]," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:" + ywjl.Phone + " \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | // foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | // { |
| | | // if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // } |
| | | |
| | | |
| | | |
| | | // _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | //} |
| | | |
| | | |
| | | |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"kehujingli\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"客户经理\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:400-028-8080 \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司专业“标书检查”、“标书指导” \",\"body\": \"政采咨询公司专业“标书检查”、“标书指导” \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | //int j = 0; |
| | | //while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | //{ |
| | | // j = j + 1; |
| | | // string numberstring = ""; |
| | | // string customename = ""; |
| | | // if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | // { |
| | | // int countt = (j * 1000); |
| | | // if (countt > projectfasongxiaoxisywjl.Count) |
| | | // { |
| | | // countt = projectfasongxiaoxisywjl.Count; |
| | | // } |
| | | |
| | | // for (int i = 0; i < countt; i++) |
| | | // { |
| | | // if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | // customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | // } |
| | | // } |
| | | |
| | | // if (numberstring.EndsWith(",")) |
| | | // { |
| | | // numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | // } |
| | | // if (string.IsNullOrEmpty(numberstring)) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | // + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:400-028-8080 \"," |
| | | // + "\"getui_alias\": [" + numberstring + "]," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让评审专家找不出主观方案扣分理由,至少助您提升综合评审得分5-10分。了解详情请咨询:400-028-8080 \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | // foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | // { |
| | | // if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // } |
| | | |
| | | |
| | | |
| | | // _logger.LogInformation( "无业务经理推送app给客户" + customename); |
| | | //} |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | { |
| | | fbprojiectid.Add(project.Id); |
| | | } |
| | | var fbprojectzhongbiaos = _context.Projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectzhongbiaos = projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | |
| | | var projectfasongxiaoxiDTOsduanxin = new List<ProjectfasongxiaoxiDTO>(); |
| | |
| | | } |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送短信的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送App消息的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | | string customename = ""; |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | | numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | } |
| | | } |
| | | |
| | | if (numberstring.EndsWith(",")) |
| | | { |
| | | numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | } |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"getui_alias\": [" + numberstring + "]," |
| | | + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:" + ywjl.Phone + " \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | { |
| | | if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | | |
| | | |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | | string customename = ""; |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | | numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | } |
| | | } |
| | | |
| | | if (numberstring.EndsWith(",")) |
| | | { |
| | | numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | } |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:400-028-8080 \"," |
| | | + "\"getui_alias\": [" + numberstring + "]," |
| | | + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:400-028-8080 \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | { |
| | | if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | | |
| | | |
| | | _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //发送短信 |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | } |
| | | } |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"" + ywjl.UserSn + "\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"" + ywjl.UserName + "\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司专业“标书检查”、“标书指导 \",\"body\": \"政采咨询公司专业“标书检查”、“标书指导 \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | //int j = 0; |
| | | //while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | //{ |
| | | // j = j + 1; |
| | | // string numberstring = ""; |
| | | // string customename = ""; |
| | | // if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | // { |
| | | // int countt = (j * 1000); |
| | | // if (countt > projectfasongxiaoxisywjl.Count) |
| | | // { |
| | | // countt = projectfasongxiaoxisywjl.Count; |
| | | // } |
| | | |
| | | // for (int i = 0; i < countt; i++) |
| | | // { |
| | | // if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | // customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | // } |
| | | // } |
| | | |
| | | // if (numberstring.EndsWith(",")) |
| | | // { |
| | | // numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | // } |
| | | // if (string.IsNullOrEmpty(numberstring)) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | // + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | // + "\"getui_alias\": [" + numberstring + "]," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:" + ywjl.Phone + " \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | // foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | // { |
| | | // if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // } |
| | | |
| | | |
| | | |
| | | // _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | //} |
| | | |
| | | |
| | | |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"kehujingli\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"客户经理\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:400-028-8080 \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司专业“标书检查”、“标书指导”\",\"body\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | //int j = 0; |
| | | //while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | //{ |
| | | // j = j + 1; |
| | | // string numberstring = ""; |
| | | // string customename = ""; |
| | | // if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | // { |
| | | // int countt = (j * 1000); |
| | | // if (countt > projectfasongxiaoxisywjl.Count) |
| | | // { |
| | | // countt = projectfasongxiaoxisywjl.Count; |
| | | // } |
| | | |
| | | // for (int i = 0; i < countt; i++) |
| | | // { |
| | | // if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | // customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | // } |
| | | // } |
| | | |
| | | // if (numberstring.EndsWith(",")) |
| | | // { |
| | | // numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | // } |
| | | // if (string.IsNullOrEmpty(numberstring)) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\"," |
| | | // + "\"content\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:400-028-8080 \"," |
| | | // + "\"getui_alias\": [" + numberstring + "]," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司专业“标书检查”、“标书指导”,退休资深评审专家在开标前按照评标流程为您交叉检查、指导标书,让您得齐全部客观分和主观分,从此不再为标书制作操心。了解详情请咨询:400-028-8080 \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | // foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | // { |
| | | // if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // } |
| | | |
| | | |
| | | |
| | | // _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | //} |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | var fbprojectsDshxZhiyichengli = projects.Where(x => x.DshxZhiyichengli == "D").ToList(); |
| | | var fbprojectsDshxTousuchengli = projects.Where(x => x.DshxTousuchengli == "D").ToList(); |
| | | |
| | | var fbprojectzhongbiaosZbZhiyichengli = projectzhongbiaos.Where(x => x.ZbZhiyichengli == "D" ).ToList(); |
| | | var fbprojectzhongbiaosZbTousuchengli = projectzhongbiaos.Where(x => x.ZbTousuchengli == "D" ).ToList(); |
| | | |
| | | var fbprojectreasonsWxZhiyichengli = projectreasons.Where(x => x.WxZhiyichengli == "D" ).ToList(); |
| | | var fbprojectreasonsWxTousuchengli = projectreasons.Where(x => x.WxTousuchengli == "D" ).ToList(); |
| | | |
| | | var fbprojiectid = new List<string>(); |
| | | foreach (var project in projects) |
| | | { |
| | | fbprojiectid.Add(project.Id); |
| | | } |
| | | var fbprojectzhongbiaos = _context.Projectzhongbiaos.Where(x => fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | |
| | | |
| | | var fbprojectzhongbiaosZbZhiyichengli = _context.Projectzhongbiaos.Where(x => x.ZbZhiyichengli == "D" && fbprojiectid.Contains(x.ProjectId) ).ToList(); |
| | | var fbprojectzhongbiaosZbTousuchengli = _context.Projectzhongbiaos.Where(x => x.ZbTousuchengli == "D" && fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | var fbprojectreasonsWxZhiyichengli = _context.Projectreasons.Where(x => x.WxZhiyichengli == "D" && fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectreasonsWxTousuchengli = _context.Projectreasons.Where(x => x.WxTousuchengli == "D" && fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | |
| | | var fbprojectyouxiaosYxZhiyichengli = _context.Projectyouxiaos.Where(x => x.YxZhiyichengli == "D" && fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectyouxiaosYxTousuchengli = _context.Projectyouxiaos.Where(x => x.YxTousuchengli == "D" && fbprojiectid.Contains(x.ProjectId)).ToList(); |
| | | var fbprojectyouxiaosYxZhiyichengli = projectyouxiaos.Where(x => x.YxZhiyichengli == "D" ).ToList(); |
| | | var fbprojectyouxiaosYxTousuchengli = projectyouxiaos.Where(x => x.YxTousuchengli == "D" ).ToList(); |
| | | |
| | | var projectfasongxiaoxiDTOsduanxin = new List<ProjectfasongxiaoxiDTO>(); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送短信的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>(); |
| | | //查询需要发送App消息的客户 |
| | | foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp) |
| | | { |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | | foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita) |
| | | { |
| | | huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid)); |
| | | } |
| | | var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList(); |
| | | if (frameworkUsers1 != null && frameworkUsers1.Count > 0) |
| | | { |
| | | foreach (var frameworkUser in frameworkUsers1) |
| | | { |
| | | var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO(); |
| | | projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId; |
| | | projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId; |
| | | projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing; |
| | | projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei; |
| | | projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus; |
| | | projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime; |
| | | projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl; |
| | | projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname; |
| | | projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode; |
| | | projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl; |
| | | projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId; |
| | | projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower(); |
| | | projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname; |
| | | string name = ""; |
| | | var imUserInfo = imUserInfos.Where(x => x.Id == projectfasongxiaoxiDTO.HuiyuanId).FirstOrDefault(); |
| | | if (imUserInfo != null) |
| | | { |
| | | name = imUserInfo.NickName; |
| | | } |
| | | else |
| | | { |
| | | if (frameworkUser.Name.StartsWith("1") && frameworkUser.Name.Length == 11) |
| | | { |
| | | name = frameworkUser.Name.Substring(0, 3) + "****" + frameworkUser.Name.Substring(7, 4); |
| | | } |
| | | else |
| | | { |
| | | name = frameworkUser.Name; |
| | | } |
| | | } |
| | | projectfasongxiaoxiDTO.HuiyuanName = name; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | | string customename = ""; |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | | numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | } |
| | | } |
| | | |
| | | if (numberstring.EndsWith(",")) |
| | | { |
| | | numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | } |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司专业为供应商代拟质疑函、投诉书\"," |
| | | + "\"content\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"getui_alias\": [" + numberstring + "]," |
| | | + "\"payload\": {\"text\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:" + ywjl.Phone + " \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | { |
| | | if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | | |
| | | |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | { |
| | | j = j + 1; |
| | | string numberstring = ""; |
| | | string customename = ""; |
| | | if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | { |
| | | int countt = (j * 1000); |
| | | if (countt > projectfasongxiaoxisywjl.Count) |
| | | { |
| | | countt = projectfasongxiaoxisywjl.Count; |
| | | } |
| | | for (int i = 0; i < countt; i++) |
| | | { |
| | | if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | { |
| | | continue; |
| | | } |
| | | numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | } |
| | | } |
| | | |
| | | if (numberstring.EndsWith(",")) |
| | | { |
| | | numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | } |
| | | string conment = "{" |
| | | + "\"title\": \"政采咨询公司专业为供应商代拟质疑函、投诉书\"," |
| | | + "\"content\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:400-028-8080 \"," |
| | | + "\"getui_alias\": [" + numberstring + "]," |
| | | + "\"payload\": {\"text\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:400-028-8080 \"}," |
| | | + "\"force_notification\": true" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushApp(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | { |
| | | if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | } |
| | | } |
| | | _context.SaveChanges(); |
| | | } |
| | | |
| | | |
| | | |
| | | _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //发送短信 |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | if (projectfasongxiaoxisywjl.Count >= 100) |
| | | { |
| | | int j = 0; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //推送App |
| | | foreach (var ywjl in Ywjl) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"" + ywjl.UserSn + "\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"" + ywjl.UserName + "\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司专业为供应商代拟质疑函、投诉书 \",\"body\": \"政采咨询公司专业为供应商代拟质疑函、投诉书 \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | //int j = 0; |
| | | //while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | //{ |
| | | // j = j + 1; |
| | | // string numberstring = ""; |
| | | // string customename = ""; |
| | | // if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | // { |
| | | // int countt = (j * 1000); |
| | | // if (countt > projectfasongxiaoxisywjl.Count) |
| | | // { |
| | | // countt = projectfasongxiaoxisywjl.Count; |
| | | // } |
| | | |
| | | // for (int i = 0; i < countt; i++) |
| | | // { |
| | | // if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | // customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | // } |
| | | // } |
| | | |
| | | // if (numberstring.EndsWith(",")) |
| | | // { |
| | | // numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | // } |
| | | // if (string.IsNullOrEmpty(numberstring)) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司专业为供应商代拟质疑函、投诉书\"," |
| | | // + "\"content\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:" + ywjl.Phone + " \"," |
| | | // + "\"getui_alias\": [" + numberstring + "]," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:" + ywjl.Phone + " \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | // foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | // { |
| | | // if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // } |
| | | |
| | | |
| | | |
| | | // _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | //} |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | //业务经理为空 |
| | | if (true) |
| | | { |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | string conment = "{" |
| | | + "\"appkey\": \"" + appkey + "\"," |
| | | + "\"senderId\": \"kehujingli\"," |
| | | + "\"senderData\": { \"avatar\": \"\",\"name\": \"客户经理\"}," |
| | | + "\"to\": { \"type\": \"private\",\"id\": \"" + projectfasongxiaoxisywjl[i].HuiyuanId + "\",\"data\": { \"avatar\": \"\",\"name\": \"" + projectfasongxiaoxisywjl[i].HuiyuanName + "\"}}," |
| | | + "\"type\": \"text\"," |
| | | + "\"payload\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:400-028-8080 \"," |
| | | + "\"notification\": { \"title\": \"政采咨询公司专业为供应商代拟质疑函、投诉书 \",\"body\": \"政采咨询公司专业为供应商代拟质疑函、投诉书 \"," |
| | | + "\"vendorOptions\": {\"huawei\": {\"category\": \"" + huawei + "\"},\"oppo\": {\"channel_id\": \"" + oppo + "\"},\"xiaomi\": {\"channel_id\": \"" + xiaomi + "\"},\"vivo\": {\"classification\":" + vivo + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | projectfasongxiaoxi.ProjectId = projectfasongxiaoxisywjl[i].ProjectId; |
| | | projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoxisywjl[i].ProjectmingxiId; |
| | | projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoxisywjl[i].Xiaoxileixing; |
| | | projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoxisywjl[i].Xiaoxizhonglei; |
| | | projectfasongxiaoxi.Gyszl = projectfasongxiaoxisywjl[i].Gyszl; |
| | | projectfasongxiaoxi.Khname = projectfasongxiaoxisywjl[i].Khname; |
| | | projectfasongxiaoxi.RecStatus = "A"; |
| | | projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | } |
| | | |
| | | //var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | //int j = 0; |
| | | //while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | //{ |
| | | // j = j + 1; |
| | | // string numberstring = ""; |
| | | // string customename = ""; |
| | | // if (projectfasongxiaoxisywjl != null && projectfasongxiaoxisywjl.Count > 0) |
| | | // { |
| | | // int countt = (j * 1000); |
| | | // if (countt > projectfasongxiaoxisywjl.Count) |
| | | // { |
| | | // countt = projectfasongxiaoxisywjl.Count; |
| | | // } |
| | | // for (int i = 0; i < countt; i++) |
| | | // { |
| | | // if (numberstring.IndexOf(projectfasongxiaoxisywjl[i + j - 1].Tel) >= 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // numberstring += "\"" + projectfasongxiaoxisywjl[i + j - 1].Tel + "\","; |
| | | // customename += projectfasongxiaoxisywjl[i + j - 1].Khname + ","; |
| | | |
| | | // } |
| | | // } |
| | | |
| | | // if (numberstring.EndsWith(",")) |
| | | // { |
| | | // numberstring = numberstring.Substring(0, numberstring.Length - 1); |
| | | // } |
| | | // if (string.IsNullOrEmpty(numberstring)) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // string conment = "{" |
| | | // + "\"title\": \"政采咨询公司专业为供应商代拟质疑函、投诉书\"," |
| | | // + "\"content\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:400-028-8080 \"," |
| | | // + "\"getui_alias\": [" + numberstring + "]," |
| | | // + "\"payload\": {\"text\": \"政采咨询公司专业为供应商代拟质疑函、投诉书,资深政府采购法律专家、3000多件质疑投诉成功案例,找政采咨询,花钱更少、胜算更高,接受推风险代理,质疑投诉成功再收费。了解详情请咨询:400-028-8080 \"}," |
| | | // + "\"force_notification\": true" |
| | | // + "}"; |
| | | |
| | | // string result2 = SMSHelper.PushApp(conment); |
| | | // _logger.LogInformation("result2:" + result2); |
| | | // JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | // if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | // { |
| | | // var isOK = jobjectresult["isOK"].ToString(); |
| | | |
| | | // foreach (var projectfasongxiaoDTO in projectfasongxiaoxisywjl) |
| | | // { |
| | | // if (isOK.IndexOf(projectfasongxiaoDTO.Tel) >= 0) |
| | | // { |
| | | // var projectfasongxiaoxi = new Projectfasongxiaoxi(); |
| | | // projectfasongxiaoxi.Id = Guid.NewGuid().ToString(); |
| | | // projectfasongxiaoxi.ProjectmingxiId = projectfasongxiaoDTO.ProjectmingxiId; |
| | | // projectfasongxiaoxi.Xiaoxileixing = projectfasongxiaoDTO.Xiaoxileixing; |
| | | // projectfasongxiaoxi.Xiaoxizhonglei = projectfasongxiaoDTO.Xiaoxizhonglei; |
| | | // projectfasongxiaoxi.Gyszl = projectfasongxiaoDTO.Gyszl; |
| | | // projectfasongxiaoxi.Khname = projectfasongxiaoDTO.Khname; |
| | | // projectfasongxiaoxi.RecStatus = "A"; |
| | | // projectfasongxiaoxi.Createtime = DateTime.Now; |
| | | // _context.Projectfasongxiaoxis.Add(projectfasongxiaoxi); |
| | | // } |
| | | // } |
| | | // _context.SaveChanges(); |
| | | // } |
| | | |
| | | |
| | | |
| | | // _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | //} |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | cooperatecustomCustomerDTO.ShrAddress = hit["area"].ToString() + hit["address"].ToString(); |
| | | |
| | | resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO); |
| | | //2023-03-23 添加在职企业 |
| | | var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault(); |
| | | if (customerGuanlianhuiyuan1 == null) |
| | | { |
| | | CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan(); |
| | | customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString(); |
| | | customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId; |
| | | customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id; |
| | | customerGuanlianhuiyuan.Customertype = "合作客户"; |
| | | _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan); |
| | | _context.SaveChanges(); |
| | | } |
| | | if (!resultEntity.Result) |
| | | { |
| | | throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!"); |
| | |
| | | cooperatecustomCustomerDTO.ShrTel = hit["mobile"].ToString(); |
| | | cooperatecustomCustomerDTO.ShrAddress = hit["area"].ToString() + hit["address"].ToString(); |
| | | resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO); |
| | | //2023-03-23 添加在职企业 |
| | | var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault(); |
| | | if (customerGuanlianhuiyuan1 == null) |
| | | { |
| | | CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan(); |
| | | customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString(); |
| | | customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId; |
| | | customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id; |
| | | customerGuanlianhuiyuan.Customertype = "合作客户"; |
| | | _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan); |
| | | _context.SaveChanges(); |
| | | } |
| | | if (!resultEntity.Result) |
| | | { |
| | | throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!"); |
| | |
| | | cooperatecustomCustomerDTO.ShrTel = hit["mobile"].ToString(); |
| | | cooperatecustomCustomerDTO.ShrAddress = hit["area"].ToString() + hit["address"].ToString(); |
| | | resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO); |
| | | //2023-03-23 添加在职企业 |
| | | var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault(); |
| | | if (customerGuanlianhuiyuan1 == null) |
| | | { |
| | | CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan(); |
| | | customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString(); |
| | | customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId; |
| | | customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id; |
| | | customerGuanlianhuiyuan.Customertype = "合作客户"; |
| | | _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan); |
| | | _context.SaveChanges(); |
| | | } |
| | | if (!resultEntity.Result) |
| | | { |
| | | throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!"); |
| | |
| | | cooperatecustomCustomerDTO.Modifytime = cooperatecustomCustomerDTO.Createtime; |
| | | |
| | | resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO); |
| | | //2023-03-23 添加在职企业 |
| | | var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault(); |
| | | if (customerGuanlianhuiyuan1 == null) |
| | | { |
| | | CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan(); |
| | | customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString(); |
| | | customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId; |
| | | customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id; |
| | | customerGuanlianhuiyuan.Customertype = "合作客户"; |
| | | _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan); |
| | | _context.SaveChanges(); |
| | | } |
| | | if (!resultEntity.Result) |
| | | { |
| | | throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!"); |
| | |
| | | { |
| | | cooperatecustomCustomerDTO.HuiyuanId = hit["ID"].ToString(); |
| | | resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO); |
| | | //2023-03-23 添加在职企业 |
| | | var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault(); |
| | | if (customerGuanlianhuiyuan1 == null) |
| | | { |
| | | CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan(); |
| | | customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString(); |
| | | customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId; |
| | | customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id; |
| | | customerGuanlianhuiyuan.Customertype = "合作客户"; |
| | | _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan); |
| | | _context.SaveChanges(); |
| | | } |
| | | if (!resultEntity.Result) |
| | | { |
| | | throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!"); |