| | |
| | | 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; |
| | |
| | | _context = factory.CreateScope().ServiceProvider.GetRequiredService<zhengcaioaContext>(); |
| | | _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; |
| | | DateTime datenowfasongxiaoxi = DateTime.Now.Date; |
| | | while (!stoppingToken.IsCancellationRequested) |
| | | { |
| | | _logger.LogInformation("TimerGetShopUsersService 开始执行"); |
| | | _logger.LogInformation(datenow.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | if (datenowfasongxiaoxi.Day == DateTime.Now.Day && DateTime.Now.Hour == 12) |
| | | _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) |
| | | { |
| | | |
| | | _logger.LogInformation("datenowfasongxiaoxi.Day" + datenowfasongxiaoxi.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | try |
| | | { |
| | | datenowfasongxiaoxi.AddDays(1); |
| | | datenowfasongxiaoxi = DateTime.Now.Date.AddDays(1); |
| | | this.fasongxiaoxi(); |
| | | |
| | | } |
| | |
| | | //查询并且发送短信和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 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) |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id ).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id ).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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 = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | 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" |
| | | + "}"; |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | 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(); |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | } |
| | | |
| | | |
| | | //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 && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | 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" |
| | | + "}"; |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | 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(); |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | } |
| | | |
| | | //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) |
| | |
| | | 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; |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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 = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | |
| | | |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).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" |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | |
| | | 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); |
| | | |
| | | } |
| | | //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 && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | 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 + "}}" |
| | | + "}" |
| | | + "}"; |
| | | |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | 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); |
| | | 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); |
| | | |
| | | // } |
| | | |
| | | } |
| | | |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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 = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | 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" |
| | | + "}"; |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | 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(); |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | } |
| | | |
| | | //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 && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | 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" |
| | | + "}"; |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | 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(); |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation( "无业务经理推送app给客户" + customename); |
| | | } |
| | | //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); |
| | | //} |
| | | |
| | | } |
| | | |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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 = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | 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" |
| | | + "}"; |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | 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(); |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | } |
| | | |
| | | //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 && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | 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" |
| | | + "}"; |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | 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(); |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | } |
| | | |
| | | //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); |
| | | //} |
| | | |
| | | } |
| | | |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl; |
| | | projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id; |
| | | projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId; |
| | | projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | //projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1); |
| | | |
| | | //查询该企业下的其他人员 |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList(); |
| | | var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id).ToList(); |
| | | if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0) |
| | | { |
| | | var huiyuanids = new List<Guid>(); |
| | |
| | | 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 = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == ywjl.Id).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | 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" |
| | | + "}"; |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | 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(); |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation(ywjl.UserName + "推送app给客户" + customename); |
| | | } |
| | | |
| | | //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 && x.Tel != null && x.Tel.StartsWith("1")).ToList(); |
| | | int j = 0; |
| | | while (j * 1000 <= projectfasongxiaoxisywjl.Count) |
| | | var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null).ToList(); |
| | | for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++) |
| | | { |
| | | 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" |
| | | + "}"; |
| | | + "\"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.PushApp(conment); |
| | | string result2 = SMSHelper.PushAppduandu(conment); |
| | | _logger.LogInformation("result2:" + result2); |
| | | JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2); |
| | | |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1") |
| | | if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "200") |
| | | { |
| | | var isOK = jobjectresult["isOK"].ToString(); |
| | | 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); |
| | | |
| | | 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(); |
| | | } |
| | | _context.SaveChanges(); |
| | | _logger.LogInformation("无业务经理推送app给客户推送app给客户" + projectfasongxiaoxisywjl[i].Khname); |
| | | |
| | | |
| | | |
| | | _logger.LogInformation("无业务经理推送app给客户" + customename); |
| | | } |
| | | |
| | | //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); |
| | | //} |
| | | |
| | | |
| | | |
| | | } |