username@email.com
2023-03-27 0d96ff4e0833d6a2813a969e1ae0a48f27eee497
会员发送app后台消息
13个文件已修改
5个文件已添加
2274 ■■■■■ 已修改文件
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/CooperatecustomCustomerDTO.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/zcUserInfoN_db/FrameworkUserDTO.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/ICooperatecustomCustomerService.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/CustomerGuanlianhuiyuan.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/WebCrawler/WebCrawlerContext.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zcweb/zcwebContext.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zhengcaioaContext.cs 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/CooperatecustomCustomerService.cs 514 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Timer/TimerGetShopUsersService.cs 866 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelectHuiyuan.cshtml 314 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuan.cshtml 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuanchakantongshi.cshtml 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Shared/_Layout_Search.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/wwwroot/js/plugins/search/search.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -2,6 +2,7 @@
using DTO;
using DTO.Models;
using DTO.WebCrawler;
using DTO.zcUserInfoN_db;
using System;
using System.Collections.Generic;
using System.Text;
@@ -345,7 +346,8 @@
            CreateMap<IntentionCustomer, CooperatecustomCustomerDTO>();
            CreateMap<FrameworkUser, FrameworkUserDTO>();
            CreateMap<FrameworkUserDTO, FrameworkUser>();
        }
    }
}
zhengcaioa/DTO/CooperatecustomCustomerDTO.cs
@@ -53,6 +53,9 @@
        public string AreaIdName { get; set; }
        public string YwjlName { get; set; }
        public string Yx { get; set; }
        public string YxName { get; set; }
        public Boolean zhuanyi { get; set; }
        public string Weixin { get; set; }
zhengcaioa/DTO/zcUserInfoN_db/FrameworkUserDTO.cs
New file
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DTO.zcUserInfoN_db
{
    public class FrameworkUserDTO
    {
        public Guid Id { get; set; }
        public string Email { get; set; }
        public int? Gender { get; set; }
        public string CellPhone { get; set; }
        public string HomePhone { get; set; }
        public string Address { get; set; }
        public string ZipCode { get; set; }
        public int IsIndividual { get; set; }
        public DateTime? CreateTime { get; set; }
        public string CreateTimeName { get; set; }
        public string CreateBy { get; set; }
        public DateTime? UpdateTime { get; set; }
        public string UpdateBy { get; set; }
        public string Itcode { get; set; }
        public string Password { get; set; }
        public string Name { get; set; }
        public bool IsValid { get; set; }
        public Guid? PhotoId { get; set; }
        public string TenantCode { get; set; }
        public string WxOpenid { get; set; }
        public int? Agent { get; set; }
        public string CustomerId { get; set; }
        public string CustomerName { get; set; }
    }
    public class FrameworkUserSearch : SearchEntity
    {
        public string Itcode { get; set; }
        public string Name { get; set; }
        public string ShifouGuanluan { get; set; }
        public string Createtime { get; set; }
    }
}
zhengcaioa/IServices/ICooperatecustomCustomerService.cs
@@ -1,4 +1,5 @@
using DTO;
using DTO.zcUserInfoN_db;
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
@@ -41,5 +42,12 @@
        ResultDataEntity<CooperatecustomCustomerDTO> SearchByPagingAll(CooperatecustomCustomerDTOSearch searchEntity);
        ResultEntity saveKhlx(CooperatecustomCustomerDTO cooperatecustomCustomerDTO);
        ResultDataEntity<FrameworkUserDTO> SearchByPagingGuanlianHuiyuan(FrameworkUserSearch searchEntity);
        ResultEntity saveCustomerGuanlian(CustomerGuanlianhuiyuan DTO, string CustomerIddel);
        List<FrameworkUserDTO> GetListFrameworkUser(string CustomerId);
    }
}
zhengcaioa/Model/CustomerGuanlianhuiyuan.cs
New file
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace zhengcaioa.Models
{
    public partial class CustomerGuanlianhuiyuan
    {
        public string Id { get; set; }
        public string Huiyuanid { get; set; }
        public string Customerid { get; set; }
        public string Customertype { get; set; }
        public string RecStatus { get; set; }
        public string Creater { get; set; }
        public DateTime Createtime { get; set; }
        public string Modifier { get; set; }
        public DateTime Modifytime { get; set; }
    }
}
zhengcaioa/Model/WebCrawler/WebCrawlerContext.cs
@@ -10,6 +10,7 @@
    {
        public WebCrawlerContext()
        {
            this.Database.SetCommandTimeout(60);
        }
        public WebCrawlerContext(DbContextOptions<WebCrawlerContext> options)
zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs
@@ -10,6 +10,7 @@
    {
        public zcUserInfoN_dbContext()
        {
            this.Database.SetCommandTimeout(60);
        }
        public zcUserInfoN_dbContext(DbContextOptions<zcUserInfoN_dbContext> options)
zhengcaioa/Model/zcweb/zcwebContext.cs
@@ -10,6 +10,7 @@
    {
        public zcwebContext()
        {
            this.Database.SetCommandTimeout(60);
        }
        public zcwebContext(DbContextOptions<zcwebContext> options)
zhengcaioa/Model/zhengcaioaContext.cs
@@ -10,6 +10,7 @@
    {
        public zhengcaioaContext()
        {
            this.Database.SetCommandTimeout(60);
        }
        public zhengcaioaContext(DbContextOptions<zhengcaioaContext> options)
@@ -63,6 +64,7 @@
        public virtual DbSet<CooperVisit> CooperVisits { get; set; }
        public virtual DbSet<CooperatecustomCustomer> CooperatecustomCustomers { get; set; }
        public virtual DbSet<CustomerYwjl> CustomerYwjls { get; set; }
        public virtual DbSet<CustomerGuanlianhuiyuan> CustomerGuanlianhuiyuans { get; set; }
        public virtual DbSet<CustomerGuanlian> CustomerGuanlians { get; set; }
        public virtual DbSet<CusFangwenjilu> CusFangwenjilus { get; set; }
        public virtual DbSet<FiAccount> FiAccounts { get; set; }
@@ -2793,6 +2795,53 @@
                    .HasColumnName("ywjlId");
            });
            modelBuilder.Entity<CustomerGuanlianhuiyuan>(entity =>
            {
                entity.ToTable("CustomerGuanlianhuiyuan");
                entity.Property(e => e.Id).HasMaxLength(50);
                entity.Property(e => e.Creater)
                    .IsRequired()
                    .HasMaxLength(50)
                    .HasColumnName("creater")
                    .HasDefaultValueSql("('1')");
                entity.Property(e => e.Createtime)
                    .HasColumnType("datetime")
                    .HasColumnName("createtime")
                    .HasDefaultValueSql("(getdate())");
                entity.Property(e => e.Customerid)
                    .HasMaxLength(50)
                    .HasColumnName("customerid");
                entity.Property(e => e.Customertype)
                    .HasMaxLength(50)
                    .HasColumnName("customertype");
                entity.Property(e => e.Huiyuanid)
                    .HasMaxLength(50)
                    .HasColumnName("huiyuanid");
                entity.Property(e => e.Modifier)
                    .IsRequired()
                    .HasMaxLength(50)
                    .HasColumnName("modifier")
                    .HasDefaultValueSql("('1')");
                entity.Property(e => e.Modifytime)
                    .HasColumnType("datetime")
                    .HasColumnName("modifytime")
                    .HasDefaultValueSql("(getdate())");
                entity.Property(e => e.RecStatus)
                    .IsRequired()
                    .HasMaxLength(1)
                    .HasColumnName("rec_status")
                    .HasDefaultValueSql("('A')");
            });
            modelBuilder.Entity<CustomerGuanlian>(entity =>
            {
                entity.ToTable("CustomerGuanlian");
zhengcaioa/Services/CooperatecustomCustomerService.cs
@@ -5,6 +5,7 @@
using AutoMapper;
using CommonToolsCore;
using DTO;
using DTO.zcUserInfoN_db;
using IServices;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
@@ -69,6 +70,7 @@
                    }
                    cooperatecustomCustomer.Id = Guid.NewGuid().ToString();
                    cooperatecustomCustomerDTO.Id = cooperatecustomCustomer.Id;
                    _context.CooperatecustomCustomers.Add(cooperatecustomCustomer);
                }
                else
@@ -710,54 +712,45 @@
            var query = (from a in _context.CooperatecustomCustomers
                         join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly")
                         on a.Khly equals b.CodeSn
                         into bsss
                         from bbb in bsss.DefaultIfEmpty()
                        // join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly")
                        // on a.Khly equals b.CodeSn
                        // into bsss
                        // from bbb in bsss.DefaultIfEmpty()
                         join c in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "hyfl")
                         on a.Hyfl equals c.CodeSn
                          into csss
                         from ccc in csss.DefaultIfEmpty()
                        // join c in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "hyfl")
                        // on a.Hyfl equals c.CodeSn
                        //  into csss
                        // from ccc in csss.DefaultIfEmpty()
                         join d in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khlx")
                        on a.Khlx equals d.CodeSn
                         into dsss
                         from ddd in dsss.DefaultIfEmpty()
                        // join d in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khlx")
                        //on a.Khlx equals d.CodeSn
                        // into dsss
                        // from ddd in dsss.DefaultIfEmpty()
                         join e in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A" && x.IsYwjl == "A")
                         on a.Ywjl equals e.Id
                         into esss
                         from abi in esss.DefaultIfEmpty()
                        // join e in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A" && x.IsYwjl == "A")
                        // on a.Ywjl equals e.Id
                        // into esss
                        // from abi in esss.DefaultIfEmpty()
                         join i in _context.CooperOrders.Where(x => x.RecStatus == "A" && x.ChedanStatus != "A").GroupBy(q => new { q.Khdw }).Select(q => new
                         {
                             Khdw = q.Key.Khdw,
                             Moneycount = q.Sum(i => i.Money),
                             Ordercount = q.Count(),
                         }
                         )
                         on a.Id equals i.Khdw
                         into isss
                         from iii in isss.DefaultIfEmpty()
                         join f in _context.Areas on a.Sheng equals f.CodeId
                            into fsss
                         from fff in fsss.DefaultIfEmpty()
                        // join f in _context.Areas on a.Sheng equals f.CodeId
                        //    into fsss
                        // from fff in fsss.DefaultIfEmpty()
                         join g in _context.Areas on a.City equals g.CodeId
                            into gsss
                         from ggg in gsss.DefaultIfEmpty()
                        // join g in _context.Areas on a.City equals g.CodeId
                        //    into gsss
                        // from ggg in gsss.DefaultIfEmpty()
                         join h in _context.Areas on a.AreaId equals h.CodeId
                            into hsss
                         from hhh in hsss.DefaultIfEmpty()
                        // join h in _context.Areas on a.AreaId equals h.CodeId
                        //    into hsss
                        // from hhh in hsss.DefaultIfEmpty()
@@ -784,21 +777,19 @@
                             Hyfl = a.Hyfl,
                             Khlx = a.Khlx,
                             Ywjl = a.Ywjl,
                             ShengName = fff.Name + "-" + ggg.Name + "-" + hhh.Name,
                             CityName = ggg.Name,
                             AreaIdName = hhh.Name,
                             KhlyName = bbb.Comments,
                             HyflName = ccc.Comments,
                             KhlxName = ddd.Comments,
                             YwjlName = abi.UserName,
                             //ShengName = fff.Name + "-" + ggg.Name + "-" + hhh.Name,
                             //CityName = ggg.Name,
                             //AreaIdName = hhh.Name,
                             //KhlyName = bbb.Comments,
                             //HyflName = ccc.Comments,
                             //KhlxName = ddd.Comments,
                             //YwjlName = abi.UserName,
                             Name = a.Name,
                             Postal = a.Postal,
                             Address = a.Address,
                             Url = a.Url,
                             Tel = a.Tel,
                             Ordercount = iii.Ordercount.ToString(),
                             Moneycount = iii.Moneycount.ToString(),
                             Moneycountde = iii.Moneycount,
                             Phone = a.Phone,
                             Qq = a.Qq,
                             Email = a.Email,
@@ -852,54 +843,49 @@
            var queryinter = (from a in _context.IntentionCustomers
                         join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly")
                         on a.Khly equals b.CodeSn
                         into bsss
                         from bbb in bsss.DefaultIfEmpty()
                         join c in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "hyfl")
                         on a.Hyfl equals c.CodeSn
                          into csss
                         from ccc in csss.DefaultIfEmpty()
                         join d in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khlx")
                        on a.Khlx equals d.CodeSn
                         into dsss
                         from ddd in dsss.DefaultIfEmpty()
                         join e in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A" && x.IsYwjl == "A")
                         on a.Ywjl equals e.Id
                         into esss
                         from abi in esss.DefaultIfEmpty()
                         join i in _context.CooperOrders.Where(x => x.RecStatus == "A" && x.ChedanStatus != "A").GroupBy(q => new { q.Khdw }).Select(q => new
                         {
                             Khdw = q.Key.Khdw,
                             Moneycount = q.Sum(i => i.Money),
                             Ordercount = q.Count(),
                         }
                         )
                         on a.Id equals i.Khdw
                         into isss
                         from iii in isss.DefaultIfEmpty()
                         join f in _context.Areas on a.Sheng equals f.CodeId
                            into fsss
                         from fff in fsss.DefaultIfEmpty()
                        // join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly")
                        // on a.Khly equals b.CodeSn
                        // into bsss
                        // from bbb in bsss.DefaultIfEmpty()
                        // join c in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "hyfl")
                        // on a.Hyfl equals c.CodeSn
                        //  into csss
                        // from ccc in csss.DefaultIfEmpty()
                        // join d in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khlx")
                        //on a.Khlx equals d.CodeSn
                        // into dsss
                        // from ddd in dsss.DefaultIfEmpty()
                         join g in _context.Areas on a.City equals g.CodeId
                            into gsss
                         from ggg in gsss.DefaultIfEmpty()
                         //join e in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A" && x.IsYwjl == "A")
                         //on a.Ywjl equals e.Id
                         //into esss
                         //from abi in esss.DefaultIfEmpty()
                         join h in _context.Areas on a.AreaId equals h.CodeId
                            into hsss
                         from hhh in hsss.DefaultIfEmpty()
                         //join f in _context.Areas on a.Sheng equals f.CodeId
                         //   into fsss
                         //from fff in fsss.DefaultIfEmpty()
                         //join g in _context.Areas on a.City equals g.CodeId
                         //   into gsss
                         //from ggg in gsss.DefaultIfEmpty()
                         //join h in _context.Areas on a.AreaId equals h.CodeId
                         //   into hsss
                         //from hhh in hsss.DefaultIfEmpty()
@@ -926,21 +912,19 @@
                             Hyfl = a.Hyfl,
                             Khlx = a.Khlx,
                             Ywjl = a.Ywjl,
                             ShengName = fff.Name + "-" + ggg.Name + "-" + hhh.Name,
                             CityName = ggg.Name,
                             AreaIdName = hhh.Name,
                             KhlyName = bbb.Comments,
                             HyflName = ccc.Comments,
                             KhlxName = ddd.Comments,
                             YwjlName = abi.UserName,
                             //ShengName = fff.Name + "-" + ggg.Name + "-" + hhh.Name,
                             //CityName = ggg.Name,
                             //AreaIdName = hhh.Name,
                             //KhlyName = bbb.Comments,
                             //HyflName = ccc.Comments,
                             //KhlxName = ddd.Comments,
                             //YwjlName = abi.UserName,
                             Name = a.Name,
                             Postal = a.Postal,
                             Address = a.Address,
                             Url = a.Url,
                             Tel = a.Tel,
                             Ordercount = iii.Ordercount.ToString(),
                             Moneycount = iii.Moneycount.ToString(),
                             Moneycountde = iii.Moneycount,
                             Phone = a.Phone,
                             Qq = a.Qq,
                             Email = a.Email,
@@ -990,12 +974,96 @@
            searchEntity.totalrows = chaxun.Count();
             
            var lianlist = chaxun.OrderByDescending(x => x.Modifytime).Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
            if(lianlist!=null&& lianlist.Count > 0)
            {
                var khlys= listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly").ToList();
                var hyfls = listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "hyfl").ToList();
                var khlxs = listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khlx").ToList();
                var pltUsers = _context.PltUsers.ToList();
                var areas  = _context.Areas.ToList();
                var yx = listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "yx").ToList();
                foreach (var cooperatecustomCustomerDTO  in lianlist)
                {
                   var khly = khlys.Where(x=>x.CodeSn == cooperatecustomCustomerDTO.Khly).FirstOrDefault();
                    if (khly != null)
                    {
                        cooperatecustomCustomerDTO.KhlyName = khly.Comments;
                    }
                    var hyfl = hyfls.Where(x => x.CodeSn == cooperatecustomCustomerDTO.Hyfl).FirstOrDefault();
                    if (hyfl != null)
                    {
                        cooperatecustomCustomerDTO.HyflName = hyfl.Comments;
                    }
                    var khlx = khlxs.Where(x => x.CodeSn == cooperatecustomCustomerDTO.Khlx).FirstOrDefault();
                    if (khlx != null)
                    {
                        cooperatecustomCustomerDTO.KhlxName = khlx.Comments;
                    }
                    var ywjl = pltUsers.Where(x => x.Id == cooperatecustomCustomerDTO.Ywjl).FirstOrDefault();
                    if (ywjl != null)
                    {
                        cooperatecustomCustomerDTO.YwjlName = ywjl.UserName;
                    }
                    var city = areas.Where(x => x.CodeId == cooperatecustomCustomerDTO.City).FirstOrDefault();
                    if (city != null)
                    {
                        cooperatecustomCustomerDTO.CityName = city.Name;
                    }
                    var areaId = areas.Where(x => x.CodeId == cooperatecustomCustomerDTO.AreaId).FirstOrDefault();
                    if (areaId != null)
                    {
                        cooperatecustomCustomerDTO.AreaIdName = areaId.Name;
                    }
                    var sheng = areas.Where(x => x.CodeId == cooperatecustomCustomerDTO.Sheng).FirstOrDefault();
                    if (sheng != null)
                    {
                        cooperatecustomCustomerDTO.ShengName = sheng.Name + "-" + cooperatecustomCustomerDTO.CityName + "-" + cooperatecustomCustomerDTO.AreaIdName;
                    }
                    if (cooperatecustomCustomerDTO.Customertype == "合作客户")
                    {
                        var kehuyx = _context.CooperVisits.Where(x => x.RecStatus == "A" && x.Viscustomer == cooperatecustomCustomerDTO.Id).OrderByDescending(x => x.Vistime).FirstOrDefault();
                        if (kehuyx != null)
                        {
                            cooperatecustomCustomerDTO.Yx = kehuyx.Yx;
                            var yxname = yx.Where(x => x.CodeSn == kehuyx.Yx).FirstOrDefault();
                            if (yxname != null)
                            {
                                cooperatecustomCustomerDTO.YxName = yxname.Comments;
                            }
                        }
                    }
                    else
                    {
                        var kehuyx = _context.IntentionVisits.Where(x => x.RecStatus == "A" && x.Viscustomer == cooperatecustomCustomerDTO.Id).OrderByDescending(x => x.Vistime).FirstOrDefault();
                        if (kehuyx != null)
                        {
                            cooperatecustomCustomerDTO.Yx = kehuyx.Yx;
                            var yxname = yx.Where(x => x.CodeSn == kehuyx.Yx).FirstOrDefault();
                            if (yxname != null)
                            {
                                cooperatecustomCustomerDTO.YxName = yxname.Comments;
                            }
                        }
                    }
                }
            }
            data.LoadData(searchEntity, lianlist);
            return data;
        }
@@ -1035,5 +1103,253 @@
            }
            return resultEntity;
        }
        public ResultDataEntity<FrameworkUserDTO> SearchByPagingGuanlianHuiyuan(FrameworkUserSearch searchEntity)
        {
            ResultDataEntity<FrameworkUserDTO> data = new ResultDataEntity<FrameworkUserDTO>();
            var listCode = (from a in _context.SysCodeDtls
                            join b in _context.SysCodes
                            on a.CodeId equals b.Id
                            where a.RecStatus == "A"
                                          && b.RecStatus == "A"
                            select new CodeDataEntity()
                            {
                                CodeId = b.Id,
                                CodeTable = b.CodeTable,
                                CodeField = b.CodeField,
                                CodeSn = a.CodeSn,
                                Comments = a.Comments,
                                Contents = a.Contents,
                                RecStatus = a.RecStatus,
                                Sort = a.Sort
                            }
                      );
            DateTime Createtimestart = DateTime.Now;
            DateTime Createtimeend = DateTime.Now;
            if (!string.IsNullOrWhiteSpace(searchEntity.Createtime))
            {
                string[] Createtimes = searchEntity.Createtime.Split("|");
                DateTime.TryParse(Createtimes[0], out Createtimestart);
                DateTime.TryParse(Createtimes[1], out Createtimeend);
                Createtimeend = Createtimeend.AddDays(1);
            }
            var query = (from a in _zcUserInfoNcontext.FrameworkUsers
                         where a.IsValid == true
                          && (string.IsNullOrWhiteSpace(searchEntity.Createtime) || (a.CreateTime >= Createtimestart && a.CreateTime <= Createtimeend))
                         && (string.IsNullOrWhiteSpace(searchEntity.Name) || a.Name.Contains(searchEntity.Name.Trim()))
                           && (string.IsNullOrWhiteSpace(searchEntity.Itcode) || a.Name.Contains(searchEntity.Itcode.Trim()))
                         select new FrameworkUserDTO
                         {
                             Id = a.Id,
                             Email = a.Email,
                             Gender = a.Gender,
                             CellPhone = a.CellPhone,
                             HomePhone = a.HomePhone,
                             Address = a.Address,
                             ZipCode = a.ZipCode,
                             IsIndividual = a.IsIndividual,
                             CreateTime = a.CreateTime,
                             CreateTimeName = a.CreateTime.HasValue? a.CreateTime.Value.ToString("yyyy-MM-dd"):"",
                             CreateBy = a.CreateBy,
                             UpdateTime = a.UpdateTime,
                             UpdateBy = a.UpdateBy,
                             Itcode = a.Itcode,
                             Password = a.Password,
                             Name = a.Name,
                             IsValid = a.IsValid,
                             PhotoId = a.PhotoId,
                             TenantCode = a.TenantCode,
                             WxOpenid = a.WxOpenid,
                             Agent = a.Agent,
                         }
                        );
            if (!string.IsNullOrWhiteSpace(searchEntity.ShifouGuanluan))
            {
                var customerGuanlianhuiyuans = _context.CustomerGuanlianhuiyuans.Where(x => x.RecStatus == "A").ToList();
                var id = new List<Guid>();
                foreach(var  customerGuanlianhuiyuan in customerGuanlianhuiyuans)
                {
                    id.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                }
                if (searchEntity.ShifouGuanluan == "A")
                {
                    query = query.Where(a => id.Contains(a.Id));
                }
                else
                {
                    query = query.Where(a => !id.Contains(a.Id));
                }
            }
            //if (searchEntity.totalrows == 0)
            searchEntity.totalrows = query.Count();
            var lianlist = query.OrderByDescending(x => x.CreateTime).Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
            if (lianlist.Count > 0)
            {
                var customerGuanlianhuiyuans = _context.CustomerGuanlianhuiyuans.Where(x => x.RecStatus == "A").ToList();
                foreach (var lian in lianlist)
                {
                   var customerGuanlianhuiyuan  = customerGuanlianhuiyuans.Where(x => x.Huiyuanid == lian.Id.ToString().ToLower()).FirstOrDefault();
                    if (customerGuanlianhuiyuan != null)
                    {
                        var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == customerGuanlianhuiyuan.Customerid).FirstOrDefault();
                        if (cooperatecustomCustomer != null)
                        {
                            lian.CustomerId = cooperatecustomCustomer.Id;
                            lian.CustomerName = cooperatecustomCustomer.Name;
                        }
                        else
                        {
                            var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == customerGuanlianhuiyuan.Customerid).FirstOrDefault();
                            if (intentionCustomer != null)
                            {
                                lian.CustomerId = intentionCustomer.Id;
                                lian.CustomerName = intentionCustomer.Name;
                            }
                        }
                    }
                }
            }
            data.LoadData(searchEntity, lianlist);
            return data;
        }
        public ResultEntity saveCustomerGuanlian(CustomerGuanlianhuiyuan DTO,string CustomerIddel)
        {
            ResultEntity resultEntity = new ResultEntity();
            try
            {
                if (!string.IsNullOrEmpty(CustomerIddel))
                {
                    var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == CustomerIddel && x.HuiyuanId == DTO.Huiyuanid).FirstOrDefault();
                    if (cooperatecustomCustomer != null)
                    {
                        cooperatecustomCustomer.HuiyuanId = null;
                    }
                    var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == CustomerIddel && x.HuiyuanId == DTO.Huiyuanid).FirstOrDefault();
                    if (intentionCustomer != null)
                    {
                        intentionCustomer.HuiyuanId = null;
                    }
                    var customerGuanlianhuiyuan = _context.CustomerGuanlianhuiyuans.Where(x => x.RecStatus == "A" && x.Huiyuanid == DTO.Huiyuanid && x.Customerid == CustomerIddel).FirstOrDefault();
                    if (customerGuanlianhuiyuan != null)
                    {
                        _context.CustomerGuanlianhuiyuans.Remove(customerGuanlianhuiyuan);
                    }
                }
                if (String.IsNullOrEmpty(DTO.Id))
                {
                    DTO.Id = Guid.NewGuid().ToString();
                    _context.CustomerGuanlianhuiyuans.Add(DTO);
                }
                else
                {
                    var updateproject = _context.CustomerGuanlianhuiyuans.Find(DTO.Id);
                    updateproject.Huiyuanid = DTO.Huiyuanid;
                    updateproject.Customerid = DTO.Customerid;
                    updateproject.Customertype = DTO.Customertype;
                    updateproject.RecStatus = DTO.RecStatus;
                    updateproject.Modifier = DTO.Modifier;
                    updateproject.Modifytime = DTO.Modifytime;
                }
                _context.SaveChanges();
                resultEntity.ReturnID = DTO.Id;
                resultEntity.Result = true;
            }
            catch (Exception ex)
            {
                resultEntity.Result = false;
                resultEntity.Message = "保存失败,请联系管理员";
            }
            return resultEntity;
        }
        public List<FrameworkUserDTO> GetListFrameworkUser(string CustomerId)
        {
            var frameworkUsers = new List<FrameworkUser>();
            var listPositiontongshi = _context.CustomerGuanlianhuiyuans.Where(r => r.RecStatus == "A" && r.Customerid == CustomerId).ToList();
            var huiyuanids = new List<Guid>();
            foreach (var customerGuanlianhuiyuan in listPositiontongshi)
            {
                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
            }
            frameworkUsers = _zcUserInfoNcontext.FrameworkUsers.Where(x => x.IsValid == true && huiyuanids.Contains(x.Id)).ToList();
            var res = _mapper.Map<List<FrameworkUserDTO>>(frameworkUsers);
            if (res.Count > 0)
            {
                foreach (var lian in res)
                {
                    lian.CreateTimeName = lian.CreateTime.HasValue ? lian.CreateTime.Value.ToString("yyyy-MM-dd") : "";
                    var customerGuanlianhuiyuan = listPositiontongshi.Where(x => x.Huiyuanid == lian.Id.ToString().ToLower()).FirstOrDefault();
                    if (customerGuanlianhuiyuan != null)
                    {
                        var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == customerGuanlianhuiyuan.Customerid).FirstOrDefault();
                        if (cooperatecustomCustomer != null)
                        {
                            lian.CustomerId = cooperatecustomCustomer.Id;
                            lian.CustomerName = cooperatecustomCustomer.Name;
                        }
                        else
                        {
                            var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == customerGuanlianhuiyuan.Customerid).FirstOrDefault();
                            if (intentionCustomer != null)
                            {
                                lian.CustomerId = intentionCustomer.Id;
                                lian.CustomerName = intentionCustomer.Name;
                            }
                        }
                    }
                }
            }
            return res;
        }
    }
}
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
@@ -21,6 +21,7 @@
using OfficeOpenXml.Drawing.Chart;
using OfficeOpenXml.Style;
using System.IO;
using DTO.zcUserInfoN_db;
namespace zhengcaioa.Controllers.Customer
{
@@ -203,6 +204,205 @@
        public IActionResult Indexhuiyuan()
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            List<ActionEntity> actionlist = new List<ActionEntity>();
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
            actionlist.Add(actionEntity);
            //ActionEntity actionEntity1 = new ActionEntity();
            //actionEntity1.OpenType = 0;
            //actionEntity1.ActionUrl = "";
            //actionEntity1.ActionFun = "Add";
            //actionEntity1.PageIco = "fa fa-plus";
            //actionEntity1.ActionName = "新增";
            //actionlist.Add(actionEntity1);
            ViewData["ActionInfo"] = actionlist;
            ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.Baomingtimebegin = DateTime.Now.AddMonths(-6).ToString("yyyy-MM-dd");
            ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd");
            return View();
        }
        public IActionResult GetListhuiyuan(FrameworkUserSearch search)
        {
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            return new JsonResult(_cooperatecustomCustomerService.SearchByPagingGuanlianHuiyuan(search));
        }
        public IActionResult Indexhuiyuanchakantongshi(string CustomerId)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            List<ActionEntity> actionlist = new List<ActionEntity>();
            //ActionEntity actionEntity = new ActionEntity();
            //actionEntity.OpenType = 0;
            //actionEntity.ActionUrl = "";
            //actionEntity.ActionFun = "Search";
            //actionEntity.PageIco = "fa fa-search";
            //actionEntity.ActionName = "查询";
            //actionlist.Add(actionEntity);
            //ActionEntity actionEntity1 = new ActionEntity();
            //actionEntity1.OpenType = 0;
            //actionEntity1.ActionUrl = "";
            //actionEntity1.ActionFun = "Add";
            //actionEntity1.PageIco = "fa fa-plus";
            //actionEntity1.ActionName = "新增";
            //actionlist.Add(actionEntity1);
            ViewData["ActionInfo"] = actionlist;
            ViewBag.CustomerId = CustomerId;
            //ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            //ViewBag.Baomingtimebegin = DateTime.Now.AddMonths(-6).ToString("yyyy-MM-dd");
            //ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd");
            return View();
        }
        public IActionResult GetListhuiyuanchakantongshi(string CustomerId)
        {
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            return new JsonResult(_cooperatecustomCustomerService.GetListFrameworkUser(CustomerId));
        }
        public IActionResult IndexSelectHuiyuan(string Huiyuanid, string CustomerId)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            List<ActionEntity> actionlist = new List<ActionEntity>();
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
            actionlist.Add(actionEntity);
            ActionEntity actionEntity2 = new ActionEntity();
            actionEntity2.OpenType = 0;
            actionEntity2.ActionUrl = "";
            actionEntity2.ActionFun = "Zhuanyi";
            actionEntity2.PageIco = "fa fa-exchange";
            actionEntity2.ActionName = "确认";
            actionlist.Add(actionEntity2);
            ViewData["ActionInfo"] = actionlist;
            //ViewData["ActionInfo2"] = pageEntities2;
            ViewBag.khlx = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.khly = _liaotianService.GetSYScode("IntentionCustomer", "khly").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.hyfl = _liaotianService.GetSYScode("CooperatecustomCustomer", "hyfl").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.users = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList();
            ViewBag.Creater = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList();
            ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            var areaDTOs = _projectService.Getsheng().ToList();
            foreach (var areaDTO in areaDTOs)
            {
                if (areaDTO.CodeId == "510000")
                {
                    areaDTOs.Remove(areaDTO);
                    break;
                }
            }
            var areaDTOsic = new Area();
            areaDTOsic.CodeId = "510000";
            areaDTOsic.Name = "四川省";
            areaDTOsic.ParentId = "0     ";
            areaDTOs.Insert(1, areaDTOsic);
            ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList();
            ViewBag.Baomingtimebegin = DateTime.Now.AddMonths(-6).ToString("yyyy-MM-dd");
            ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd");
            ViewBag.Customertype = _liaotianService.GetSYScode("ADM_Askzczbwsydtl", "Customertype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.Huiyuanid = Huiyuanid;
            ViewBag.CustomerId = CustomerId;
            return View();
        }
        public IActionResult GetListSelectHuiyuan(CooperatecustomCustomerDTOSearch search)
        {
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
                return new JsonResult(_cooperatecustomCustomerService.SearchByPagingAll(search));
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="data">岗位实体类对象</param>
        /// <returns></returns>
        ///
        [HttpPost]
        public IActionResult Savezaizhiqiye(string CustomerId,string Huiyuanid,string khlx, string CustomerIddel)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            CustomerGuanlianhuiyuan DTO = new CustomerGuanlianhuiyuan();
            DTO.Huiyuanid = Huiyuanid;
            DTO.Customerid = CustomerId;
            DTO.Customertype = khlx;
            if (String.IsNullOrEmpty(DTO.Id))
            {
                DTO.Creater = curentuser.Id;
                DTO.Createtime = DateTime.Now;
            }
            DTO.Modifier = curentuser.Id;
            DTO.Modifytime = DateTime.Now;
            ResultEntity resultEntity = _cooperatecustomCustomerService.saveCustomerGuanlian(DTO, CustomerIddel);
            return new JsonResult(resultEntity);
        }
        public IActionResult IndexSelect()
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs
@@ -139,14 +139,13 @@
                            jisuangonglinggongzi();
                        }
                        _logger.LogInformation("把超过90天还没有转化的档案客户的业务经理归为无");
                        this.ywjlguiling();
                        _logger.LogInformation("把超过90天还没有转化的档案客户的业务经理归为无执行结束");
                        _logger.LogInformation("把会员系统和oa系统手机号相同的客户关联起来");
                        this.huiyuanguanlian();
                        _logger.LogInformation("把会员系统和oa系统手机号相同的客户关联起来执行结束");
                        _logger.LogInformation("把超过90天还没有转化的档案客户的业务经理归为无");
                        this.ywjlguiling();
                        _logger.LogInformation("把超过90天还没有转化的档案客户的业务经理归为无执行结束");
                    }
                    catch (Exception ex)
                    {
@@ -329,6 +328,18 @@
                        if (frameworkUser != null)
                        {
                            cooperatecustomCustomer.HuiyuanId = frameworkUser.Id.ToString();
                            //2023-03-23 添加在职企业
                            var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomer.HuiyuanId && x.Customerid == cooperatecustomCustomer.Id).FirstOrDefault();
                            if (customerGuanlianhuiyuan1 == null)
                            {
                                CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan();
                                customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString();
                                customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomer.HuiyuanId;
                                customerGuanlianhuiyuan.Customerid = cooperatecustomCustomer.Id;
                                customerGuanlianhuiyuan.Customertype = "合作客户";
                                _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan);
                            }
                        }
                    }
@@ -349,6 +360,17 @@
                        if (frameworkUser != null)
                        {
                            intentionCustomer.HuiyuanId = frameworkUser.Id.ToString();
                            //2023-03-23 添加在职企业
                            var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == intentionCustomer.HuiyuanId && x.Customerid == intentionCustomer.Id).FirstOrDefault();
                            if (customerGuanlianhuiyuan1 == null)
                            {
                                CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan();
                                customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString();
                                customerGuanlianhuiyuan.Huiyuanid = intentionCustomer.HuiyuanId;
                                customerGuanlianhuiyuan.Customerid = intentionCustomer.Id;
                                customerGuanlianhuiyuan.Customertype = "档案客户";
                                _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan);
                            }
                        }
                    }
zhengcaioa/zhengcaioa/Timer/TimerGetShopUsersService.cs
@@ -31,8 +31,10 @@
        private readonly ILiaotianService _liaotianService;
        private readonly IHttpClientFactory _clientFactory;
        private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
        private readonly IIntentionCustomerService _intentionCustomerService;
        private readonly zhengcaioaContext _context;
        private readonly IMapper _mapper;
        private readonly zcUserInfoN_dbContext _zcUserInfoN_DbContext;
        public TimerGetShopUsersService(ILogger<TimerGetShopUsersService> logger, IServiceScopeFactory factory)
        {
            _logger = logger;
@@ -40,8 +42,10 @@
            _liaotianService = factory.CreateScope().ServiceProvider.GetRequiredService<ILiaotianService>();
            _clientFactory = factory.CreateScope().ServiceProvider.GetRequiredService<IHttpClientFactory>();
            _cooperatecustomCustomerService = factory.CreateScope().ServiceProvider.GetRequiredService<ICooperatecustomCustomerService>();
            _intentionCustomerService = factory.CreateScope().ServiceProvider.GetRequiredService<IIntentionCustomerService>();
            _context = factory.CreateScope().ServiceProvider.GetRequiredService<zhengcaioaContext>();
            _mapper = factory.CreateScope().ServiceProvider.GetRequiredService<IMapper>(); ;
            _mapper = factory.CreateScope().ServiceProvider.GetRequiredService<IMapper>();
            _zcUserInfoN_DbContext = factory.CreateScope().ServiceProvider.GetRequiredService<zcUserInfoN_dbContext>();
        }
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
@@ -51,13 +55,25 @@
            //stoppingToken.Register(() => File.Create($"E:\\dotnetCore\\Practice\\Practice\\{DateTime.Now.Millisecond}.txt"));
            DateTime datenow = DateTime.Now;
            DateTime datenowfasongxiaoxi = DateTime.Now;
            while (!stoppingToken.IsCancellationRequested)
            {
                _logger.LogInformation("TimerGetShopUsersService 开始执行");
                _logger.LogInformation(datenow.ToString("yyyy-MM-dd HH:mm:ss"));
                if (DateTime.Now.Hour == 6)
                if (datenowfasongxiaoxi.Day == DateTime.Now.Day && DateTime.Now.Hour == 20)
                //if (true)
                {
                    this.fasongxiaoxi();
                    try
                    {
                        this.fasongxiaoxi();
                    }
                    catch (Exception ex)
                    {
                        _logger.LogInformation(ex.ToString());
                    }
                    datenowfasongxiaoxi.AddDays(1);
                }
                //每个小时计算一次
@@ -120,6 +136,13 @@
            var intentionCustomers = _context.IntentionCustomers.Where(x => x.RecStatus == "A").ToList();
            var cooperatecustomCustomers = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A").ToList();
            //关联表
            var customerGuanlianhuiyuans = _context.CustomerGuanlianhuiyuans.Where(x => x.RecStatus == "A").ToList();
            //会员表
            var frameworkUsers = _zcUserInfoN_DbContext.FrameworkUsers.Where(x => x.IsValid == true).ToList();
            //StringBuilder number = new StringBuilder(); ;
            //if (result != null && result.Count > 0)
@@ -370,6 +393,7 @@
                    }
                }
                var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送短信的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin)
                {
@@ -391,6 +415,44 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var  customerGuanlianhuiyuansqita  =  customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if(customerGuanlianhuiyuansqita!=null&& customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x=> huiyuanids.Contains(x.Id)).ToList();
                                if(frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower() ;
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
@@ -407,9 +469,44 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
                var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送App消息的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp)
                {
@@ -431,7 +528,40 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
                    else
@@ -447,6 +577,40 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
@@ -455,7 +619,7 @@
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    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)
                    {
@@ -485,6 +649,10 @@
                        if (numberstring.EndsWith(","))
                        {
                            numberstring = numberstring.Substring(0, numberstring.Length - 1);
                        }
                        if (string.IsNullOrEmpty(numberstring))
                        {
                            continue;
                        }
                        string conment = "{"
                            + "\"title\": \"政采咨询公司的“标书预评审”服务\","
@@ -533,7 +701,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    int j = 0;
                    while (j * 1000 <= projectfasongxiaoxisywjl.Count)
                    {
@@ -562,6 +730,10 @@
                        if (numberstring.EndsWith(","))
                        {
                            numberstring = numberstring.Substring(0, numberstring.Length - 1);
                        }
                        if (string.IsNullOrEmpty(numberstring))
                        {
                            continue;
                        }
                        string conment = "{"
                            + "\"title\": \"政采咨询公司的“标书预评审”服务\","
@@ -612,7 +784,7 @@
                //发送短信
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -681,7 +853,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -873,6 +1045,7 @@
                }
                var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送短信的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin)
                {
@@ -894,6 +1067,44 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
@@ -910,9 +1121,44 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
                var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送App消息的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp)
                {
@@ -934,7 +1180,40 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
                    else
@@ -950,6 +1229,40 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
@@ -958,7 +1271,7 @@
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    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++)
@@ -1002,7 +1315,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                        for (int i = 0; i < projectfasongxiaoxisywjl.Count; i++)
                        {
@@ -1049,7 +1362,7 @@
                //发送短信
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -1118,7 +1431,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -1260,6 +1573,7 @@
                }
                var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送短信的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin)
                {
@@ -1281,6 +1595,44 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
@@ -1297,9 +1649,44 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
                var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送App消息的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp)
                {
@@ -1321,7 +1708,40 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
                    else
@@ -1337,6 +1757,40 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
@@ -1345,7 +1799,7 @@
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    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)
                    {
@@ -1375,6 +1829,10 @@
                        if (numberstring.EndsWith(","))
                        {
                            numberstring = numberstring.Substring(0, numberstring.Length - 1);
                        }
                        if (string.IsNullOrEmpty(numberstring))
                        {
                            continue;
                        }
                        string conment = "{"
                            + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\","
@@ -1422,7 +1880,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    int j = 0;
                    while (j * 1000 <= projectfasongxiaoxisywjl.Count)
                    {
@@ -1452,6 +1910,10 @@
                        if (numberstring.EndsWith(","))
                        {
                            numberstring = numberstring.Substring(0, numberstring.Length - 1);
                        }
                        if (string.IsNullOrEmpty(numberstring))
                        {
                            continue;
                        }
                        string conment = "{"
                            + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\","
@@ -1500,7 +1962,7 @@
                //发送短信
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -1569,7 +2031,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -1704,6 +2166,7 @@
                    }
                }
                var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送短信的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin)
                {
@@ -1725,6 +2188,44 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
@@ -1741,9 +2242,44 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
                var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送App消息的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp)
                {
@@ -1765,7 +2301,40 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
                    else
@@ -1781,6 +2350,40 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
@@ -1789,7 +2392,7 @@
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    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)
                    {
@@ -1819,6 +2422,10 @@
                        if (numberstring.EndsWith(","))
                        {
                            numberstring = numberstring.Substring(0, numberstring.Length - 1);
                        }
                        if (string.IsNullOrEmpty(numberstring))
                        {
                            continue;
                        }
                        string conment = "{"
                            + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\","
@@ -1866,7 +2473,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    int j = 0;
                    while (j * 1000 <= projectfasongxiaoxisywjl.Count)
                    {
@@ -1896,6 +2503,10 @@
                        if (numberstring.EndsWith(","))
                        {
                            numberstring = numberstring.Substring(0, numberstring.Length - 1);
                        }
                        if (string.IsNullOrEmpty(numberstring))
                        {
                            continue;
                        }
                        string conment = "{"
                            + "\"title\": \"政采咨询公司专业“标书检查”、“标书指导”\","
@@ -1944,7 +2555,7 @@
                //发送短信
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -2013,7 +2624,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -2520,6 +3131,7 @@
                    }
                }
                var projectfasongxiaoxiDTOsduanxinzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送短信的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsduanxin)
                {
@@ -2541,6 +3153,44 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
@@ -2557,9 +3207,44 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsduanxinzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
                var projectfasongxiaoxiDTOsappzuizhong = new List<ProjectfasongxiaoxiDTO>();
                //查询需要发送App消息的客户
                foreach (var projectfasongxiaoxiDTO1 in projectfasongxiaoxiDTOsapp)
                {
@@ -2581,7 +3266,40 @@
                            projectfasongxiaoxiDTO1.Ywjl = cooperatecustomCustomer.Ywjl;
                            projectfasongxiaoxiDTO1.KhId = cooperatecustomCustomer.Id;
                            projectfasongxiaoxiDTO1.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                            projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                            //查询该企业下的其他人员
                            var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == cooperatecustomCustomer.Id && x.Huiyuanid != cooperatecustomCustomer.HuiyuanId).ToList();
                            if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                            {
                                var huiyuanids = new List<Guid>();
                                foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                                {
                                    huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                                }
                                var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                                if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                                {
                                    foreach (var frameworkUser in frameworkUsers1)
                                    {
                                        var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                        projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                        projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                        projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                        projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                        projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                        projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                        projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                        projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                        projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                        projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                        projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                        projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                        projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                    }
                                }
                            }
                        }
                    }
                    else
@@ -2597,6 +3315,40 @@
                        projectfasongxiaoxiDTO1.Ywjl = intentionCustomer.Ywjl;
                        projectfasongxiaoxiDTO1.KhId = intentionCustomer.Id;
                        projectfasongxiaoxiDTO1.HuiyuanId = intentionCustomer.HuiyuanId;
                        projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO1);
                        //查询该企业下的其他人员
                        var customerGuanlianhuiyuansqita = customerGuanlianhuiyuans.Where(x => x.Customerid == intentionCustomer.Id && x.Huiyuanid != intentionCustomer.HuiyuanId).ToList();
                        if (customerGuanlianhuiyuansqita != null && customerGuanlianhuiyuansqita.Count > 0)
                        {
                            var huiyuanids = new List<Guid>();
                            foreach (var customerGuanlianhuiyuan in customerGuanlianhuiyuansqita)
                            {
                                huiyuanids.Add(Guid.Parse(customerGuanlianhuiyuan.Huiyuanid));
                            }
                            var frameworkUsers1 = frameworkUsers.Where(x => huiyuanids.Contains(x.Id)).ToList();
                            if (frameworkUsers1 != null && frameworkUsers1.Count > 0)
                            {
                                foreach (var frameworkUser in frameworkUsers1)
                                {
                                    var projectfasongxiaoxiDTO = new ProjectfasongxiaoxiDTO();
                                    projectfasongxiaoxiDTO.ProjectId = projectfasongxiaoxiDTO1.ProjectId;
                                    projectfasongxiaoxiDTO.ProjectmingxiId = projectfasongxiaoxiDTO1.ProjectmingxiId;
                                    projectfasongxiaoxiDTO.Xiaoxileixing = projectfasongxiaoxiDTO1.Xiaoxileixing;
                                    projectfasongxiaoxiDTO.Xiaoxizhonglei = projectfasongxiaoxiDTO1.Xiaoxizhonglei;
                                    projectfasongxiaoxiDTO.RecStatus = projectfasongxiaoxiDTO1.RecStatus;
                                    projectfasongxiaoxiDTO.Createtime = projectfasongxiaoxiDTO1.Createtime;
                                    projectfasongxiaoxiDTO.Gyszl = projectfasongxiaoxiDTO1.Gyszl;
                                    projectfasongxiaoxiDTO.Khname = projectfasongxiaoxiDTO1.Khname;
                                    projectfasongxiaoxiDTO.Tel = frameworkUser.Itcode;
                                    projectfasongxiaoxiDTO.Ywjl = projectfasongxiaoxiDTO1.Ywjl;
                                    projectfasongxiaoxiDTO.KhId = projectfasongxiaoxiDTO1.KhId;
                                    projectfasongxiaoxiDTO.HuiyuanId = frameworkUser.Id.ToString().ToLower();
                                    projectfasongxiaoxiDTO.Projectname = projectfasongxiaoxiDTO1.Projectname;
                                    projectfasongxiaoxiDTOsappzuizhong.Add(projectfasongxiaoxiDTO);
                                }
                            }
                        }
                    }
                }
@@ -2605,7 +3357,7 @@
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    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)
                    {
@@ -2635,6 +3387,10 @@
                        if (numberstring.EndsWith(","))
                        {
                            numberstring = numberstring.Substring(0, numberstring.Length - 1);
                        }
                        if (string.IsNullOrEmpty(numberstring))
                        {
                            continue;
                        }
                        string conment = "{"
                            + "\"title\": \"政采咨询公司专业为供应商代拟质疑函、投诉书\","
@@ -2683,7 +3439,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsapp.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsappzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    int j = 0;
                    while (j * 1000 <= projectfasongxiaoxisywjl.Count)
                    {
@@ -2712,6 +3468,10 @@
                        if (numberstring.EndsWith(","))
                        {
                            numberstring = numberstring.Substring(0, numberstring.Length - 1);
                        }
                        if (string.IsNullOrEmpty(numberstring))
                        {
                            continue;
                        }
                        string conment = "{"
                            + "\"title\": \"政采咨询公司专业为供应商代拟质疑函、投诉书\","
@@ -2762,7 +3522,7 @@
                //发送短信
                foreach (var ywjl in Ywjl)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == ywjl.Id && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -2831,7 +3591,7 @@
                //业务经理为空
                if (true)
                {
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxin.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    var projectfasongxiaoxisywjl = projectfasongxiaoxiDTOsduanxinzuizhong.Where(x => x.Ywjl == null && x.Tel != null && x.Tel.StartsWith("1")).ToList();
                    if (projectfasongxiaoxisywjl.Count >= 100)
                    {
                        int j = 0;
@@ -3029,6 +3789,18 @@
                                cooperatecustomCustomerDTO.ShrAddress = hit["area"].ToString() + hit["address"].ToString();
                                resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO);
                                //2023-03-23 添加在职企业
                                var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault();
                                if (customerGuanlianhuiyuan1 == null)
                                {
                                    CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan();
                                    customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString();
                                    customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId;
                                    customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id;
                                    customerGuanlianhuiyuan.Customertype = "合作客户";
                                    _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan);
                                    _context.SaveChanges();
                                }
                                if (!resultEntity.Result)
                                {
                                    throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!");
@@ -3041,6 +3813,18 @@
                                cooperatecustomCustomerDTO.ShrTel = hit["mobile"].ToString();
                                cooperatecustomCustomerDTO.ShrAddress = hit["area"].ToString() + hit["address"].ToString();
                                resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO);
                                //2023-03-23 添加在职企业
                                var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault();
                                if (customerGuanlianhuiyuan1 == null)
                                {
                                    CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan();
                                    customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString();
                                    customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId;
                                    customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id;
                                    customerGuanlianhuiyuan.Customertype = "合作客户";
                                    _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan);
                                    _context.SaveChanges();
                                }
                                if (!resultEntity.Result)
                                {
                                    throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!");
@@ -3054,6 +3838,18 @@
                            cooperatecustomCustomerDTO.ShrTel = hit["mobile"].ToString();
                            cooperatecustomCustomerDTO.ShrAddress = hit["area"].ToString() + hit["address"].ToString();
                            resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO);
                            //2023-03-23 添加在职企业
                            var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault();
                            if (customerGuanlianhuiyuan1 == null)
                            {
                                CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan();
                                customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString();
                                customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId;
                                customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id;
                                customerGuanlianhuiyuan.Customertype = "合作客户";
                                _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan);
                                _context.SaveChanges();
                            }
                            if (!resultEntity.Result)
                            {
                                throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!");
@@ -3128,6 +3924,18 @@
                                cooperatecustomCustomerDTO.Modifytime = cooperatecustomCustomerDTO.Createtime;
                                resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO);
                                //2023-03-23 添加在职企业
                                var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault();
                                if (customerGuanlianhuiyuan1 == null)
                                {
                                    CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan();
                                    customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString();
                                    customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId;
                                    customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id;
                                    customerGuanlianhuiyuan.Customertype = "合作客户";
                                    _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan);
                                    _context.SaveChanges();
                                }
                                if (!resultEntity.Result)
                                {
                                    throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!");
@@ -3137,6 +3945,18 @@
                            {
                                cooperatecustomCustomerDTO.HuiyuanId = hit["ID"].ToString();
                                resultEntity = _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO);
                                //2023-03-23 添加在职企业
                                var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomerDTO.HuiyuanId && x.Customerid == cooperatecustomCustomerDTO.Id).FirstOrDefault();
                                if (customerGuanlianhuiyuan1 == null)
                                {
                                    CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan();
                                    customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString();
                                    customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomerDTO.HuiyuanId;
                                    customerGuanlianhuiyuan.Customerid = cooperatecustomCustomerDTO.Id;
                                    customerGuanlianhuiyuan.Customertype = "合作客户";
                                    _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan);
                                    _context.SaveChanges();
                                }
                                if (!resultEntity.Result)
                                {
                                    throw new Exception("保存合作客户:" + cooperatecustomCustomerDTO.Name + "出错!");
zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelectHuiyuan.cshtml
New file
@@ -0,0 +1,314 @@
@using DTO;
@{
    ViewBag.Title = "IntentionCustomer";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var khlxs = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khlx))';
        var khlys = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khly))';
        var hyfls = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.hyfl))';
        var users = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.users))';
        var shengDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShengDropDown))';
        var Creater = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Creater))';
        var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
        @*var Customertype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Customertype))';*@
        var Baomingtimebegin = '@Html.Raw(ViewBag.Baomingtimebegin)';
        var Baomingtimeend = '@Html.Raw(ViewBag.Baomingtimeend)';
        var Huiyuanid = '@Html.Raw(ViewBag.Huiyuanid)';
        var CustomerId1 = '@Html.Raw(ViewBag.CustomerId)';
       /* alert(CustomerId);*/
        loseherght = 60;
        gridConfig = { multiselect: true, selectcol: "Id" };
        dataCol = [
            {
                label: 'id', name: 'Id', labtype: 'txt', hidden: true
            },
            { label: '建档时间', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '客户单位', name: 'Name', labtype: 'txt', hidden: false, width: 400
            },
            { label: '联系电话', name: 'Tel', labtype: 'txt', hidden: false, width: 100 },
            { label: '所属区域', name: 'ShengName', labtype: 'txt', hidden: false, width: 100  },
            { label: '客户来源', name: 'KhlyName', labtype: 'txt', hidden: false, width: 100  },
            { label: '行业分类', name: 'HyflName', labtype: 'txt', hidden: false, width: 100 },
            { label: '客户类型', name: 'KhlxName', labtype: 'txt', hidden: false, width: 100},
            { label: '业务经理', name: 'YwjlName', labtype: 'txt', hidden: false, width: 100 },
            { label: '客户种类', name: 'Customertype', labtype: 'txt', hidden: false, width: 100 },
        ];
        dataUrl = "/IntentionCustomer/GetListSelectHuiyuan?Createtime=" + Baomingtimebegin + "|" + Baomingtimeend;
        searchCol = [
            { label: '客户来源', name: 'Khly', labtype: 'combox', hidden: false, data: JSON.parse(khlys), cwidth: '5%', cccwidth: '8%' },
            { label: '行业分类', name: 'Hyfl', labtype: 'combox', hidden: false, data: JSON.parse(hyfls), cwidth: '5%', cccwidth: '15%' },
            { label: '客户类型', name: 'Khlx', labtype: 'combox', hidden: false, data: JSON.parse(khlxs), cwidth: '5%', cccwidth: '8%' },
            { label: '业务经理', name: 'Ywjl', labtype: 'combox', hidden: false, data: JSON.parse(users), cwidth: '5%', cccwidth: '8%' },
            { label: '省', name: 'Sheng', labtype: 'combox', hidden: false, data: JSON.parse(shengDropDown), cwidth: '5%', cccwidth: '8%' },
            { label: '市', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '8%' },
            { label: '区县', name: 'AreaId', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '2%', cccwidth: '8%' },
            { label: '客户单位', name: 'Name', labtype: 'txt', hidden: false },
            { label: '建档时间', name: 'Createtime', labtype: 'datearea', hidden: false },
           /* { label: '客户种类', name: 'Customertype', labtype: 'combox', hidden: false, data: JSON.parse(Customertype), cwidth: '5%', cccwidth: '8%' },*/
        ];
         var _pageSearch = function () {
            $("#jqGrid").jqGrid('setGridParam', {
                url: dataUrl = "/IntentionCustomer/GetListSelectHuiyuan", postData: jsons, page: 1
            }); //重新载入
            var jsons = GetSearchEnd();
            if (jsons == false) {
                msg.info("请录入查询条件");
                return false;
            }
            LoadGrid(jsons);
        }
        var BeforeSelectRow = function () {
            $("#jqGrid").jqGrid('resetSelection');
            return (true);
        }
        var _pageZhuanyi = function () {
            var duanxin = GetGridSelect();
            var baifangid = "";
            if (duanxin != '') {
                for (var i = 0; i < duanxin.length; i++) {
                    baifangid += duanxin[i] + ',';
                    var rowData = $("#jqGrid").jqGrid('getRowData', duanxin[i]);
                    if (rowData.Tel == null || rowData.Tel == "") {
                        toastr.error("请补充客户联系电话");
                        return;
                    }
                    /*  alert(rowData.Id + ";" + rowData.Name + ";" + rowData.Tel + ";" + rowData.Customertype);*/
                    var data = { CustomerId: rowData.Id, Huiyuanid: Huiyuanid, khlx: rowData.Customertype, CustomerIddel: CustomerId1 }
                    $.ajax({
                        type: "POST",
                        url: "/IntentionCustomer/Savezaizhiqiye",
                        dataType: "json",
                        global: false,
                        data: data,
                        success: function (data) {
                            if (data.Result) {
                                //  parent._afterSave(true);
                                parent.layer.msg('成功保存', { icon: 6 });
                                //window.location = "/Project/add?id=" + data.ReturnID;
                                try {
                                    _pageAutoClose();//自动关闭页面方法
                                }
                                catch (err) {
                                    parent._CloseTab1("/IntentionCustomer/Edit/");
                                }
                            }
                            else {
                                // toastr.error("失败");
                                parent.layer.msg(data.Message, { icon: 5 });
                            }
                        },
                        error: function () {
                            parent.layer.msg('失败', { icon: 5 });
                        }
                    });
                }
            } else {
                toastr.error("请选择客户");
                return;
            }
        }
        function _pageAutoClose() {
            try {
                parent.window._reloadPageData();
            }
            catch (err) {
            }
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.isRefresh = true;
            parent.layer.closeAll('loading');
            parent.layer.close(index);
            return false;
        }
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除失败");
        /**/
    }
        }
    </script>
}
@section footerScripts{
    <script type="text/javascript">
        function send() {
            var msg = $("#PBSSheng");
            if (msg.length > 0) {
                $("#PBSSheng").change(function () {
                    var sheng = $("#PBSSheng").val();
                    $.ajax({
                        type: "GET",
                        url: "/Project/getCity?shengid=" + sheng,
                        dataType: "json",
                        global: false,
                        data: "",
                        success: function (data) {
                            var city = $("#PBSCity");
                            city.find('option').remove();
                            var aaa = '<option value="" hassubinfo="true">&nbsp;</option>';
                            city.append(aaa);
                            if (data.length > 0) {
                                for (var i = 0; i < data.length; i++) {
                                    var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
                                    city.append(o);
                                }
                            }
                            $("#PBSCity").trigger('chosen:updated');//更新选项
                        },
                        error: function () {
                            parent.layer.msg('失败', { icon: 5 });
                        }
                    });
                });
            } else {
                setTimeout(send, 1000);
            }
        }
        send();
        function sendCity() {
            var msg = $("#PBSCity");
            if (msg.length > 0) {
                $("#PBSCity").change(function () {
                    var city = $("#PBSCity").val();
                    $.ajax({
                        type: "GET",
                        url: "/Project/getAreaId?cityid=" + city,
                        dataType: "json",
                        global: false,
                        data: "",
                        success: function (data) {
                            var quxian = $("#PBSAreaId");
                            quxian.find('option').remove();
                            var aaa = '<option value="" hassubinfo="true">&nbsp;</option>';
                            quxian.append(aaa);
                            if (data.length > 0) {
                                for (var i = 0; i < data.length; i++) {
                                    var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
                                    quxian.append(o);
                                }
                            }
                            $("#PBSAreaId").trigger('chosen:updated');//更新选项
                        },
                        error: function () {
                            parent.layer.msg('失败', { icon: 5 });
                        }
                    });
                });
            } else {
                setTimeout(sendCity, 1000);
            }
        }
        sendCity();
        $(function () {
            $("#PBSCreatetimeend").val(Baomingtimeend);
            $("#PBSCreatetimestart").val(Baomingtimebegin);
            //$("#PBSCustomertype").val("01");
            //$("#PBSCustomertype").trigger('chosen:updated');//更新选项
            $("#cb_jqGrid").hide();
        });
    </script>
}
zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuan.cshtml
New file
@@ -0,0 +1,130 @@
@using DTO;
@{
    ViewBag.Title = "IntentionCustomer";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
    List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
    string Creater11 = ViewData["Creater11"] as string;
}
@section headerStyle{
    <script type="text/javascript">
        var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
        var Baomingtimebegin = '@Html.Raw(ViewBag.Baomingtimebegin)';
        var Baomingtimeend = '@Html.Raw(ViewBag.Baomingtimeend)';
        loseherght = 60;
        /*gridConfig = { multiselect: true, selectcol: "Id" };*/
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            { label: '注册时间', name: 'CreateTimeName', labtype: 'txt', hidden: false, width: 200 },
            { label: '用户账号', name: 'Itcode', labtype: 'txt', hidden: false, width: 200 },
            {
                label: '名称', name: 'Name', labtype: 'txt', hidden: false, width: 200
            },
            { label: '在职企业', name: 'CustomerName', labtype: 'txt', hidden: false, width: 200 },
            {
                label: '操作', name: 'Guanliankehushu', labtype: 'txt', hidden: false, width: 200,
                formatter: function (cellvalue, options, rowObject) {
                    if (rowObject.CustomerName == null || rowObject.CustomerName == '') {
                        return "<a onclick=\"OpenWindow('" + rowObject.Name.replace(/'/g, '') + "','100%','100%', '/IntentionCustomer/IndexSelectHuiyuan?Huiyuanid=" + rowObject.Id + "&CustomerId=" + rowObject.CustomerId + "')\"  >添加在职企业</a>   ";
                    } else {
                        return "<a onclick=\"OpenWindow('" + rowObject.Name.replace(/'/g, '') + "','100%','100%', '/IntentionCustomer/IndexSelectHuiyuan?Huiyuanid=" + rowObject.Id + "&CustomerId=" + rowObject.CustomerId + "')\"  >修改在职企业</a>   " + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a onclick=\"OpenWindow('" + rowObject.Name.replace(/'/g, '') + "','100%','100%', '/IntentionCustomer/Indexhuiyuanchakantongshi?CustomerId=" + rowObject.CustomerId + "')\"  >查看同事</a>";
                    }
                }
            },
        ];
        dataUrl = "/IntentionCustomer/GetListhuiyuan?Createtime=" + Baomingtimebegin + "|" + Baomingtimeend ;
        searchCol = [
            { label: '账号:', name: 'Itcode', labtype: 'txt', hidden: false },
            { label: '名称:', name: 'Name', labtype: 'txt', hidden: false },
            { label: '注册时间:', name: 'Createtime', labtype: 'datearea', hidden: false },
            { label: '有在职企业', name: 'ShifouGuanluan', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' }
        ];
         var _pageSearch = function () {
            $("#jqGrid").jqGrid('setGridParam', {
                url: dataUrl = "/IntentionCustomer/GetListhuiyuan", postData: jsons, page: 1
            }); //重新载入
            var jsons = GetSearchEnd();
            if (jsons == false) {
                msg.info("请录入查询条件");
                return false;
            }
            LoadGrid(jsons);
        }
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除失败");
        /**/
    }
        }
    </script>
}
@section footerScripts{
    <script type="text/javascript">
        $(function () {
            $("#PBSCreatetimeend").val(Baomingtimeend);
            $("#PBSCreatetimestart").val(Baomingtimebegin);
        });
    </script>
}
zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuanchakantongshi.cshtml
New file
@@ -0,0 +1,81 @@
@using DTO;
@{
    ViewBag.Title = "IntentionCustomer";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
    List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
    string Creater11 = ViewData["Creater11"] as string;
}
@section headerStyle{
    <script type="text/javascript">
        var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
        var Baomingtimebegin = '@Html.Raw(ViewBag.Baomingtimebegin)';
        var Baomingtimeend = '@Html.Raw(ViewBag.Baomingtimeend)';
        var CustomerId = '@Html.Raw(ViewBag.CustomerId)';
        loseherght = 0;
        /*gridConfig = { multiselect: true, selectcol: "Id" };*/
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            { label: '注册时间', name: 'CreateTimeName', labtype: 'txt', hidden: false, width: 200 },
            { label: '用户账号', name: 'Itcode', labtype: 'txt', hidden: false, width: 200 },
            {
                label: '名称', name: 'Name', labtype: 'txt', hidden: false, width: 200
            },
            { label: '在职企业', name: 'CustomerName', labtype: 'txt', hidden: false, width: 200 },
        ];
        dataUrl = "/IntentionCustomer/GetListhuiyuanchakantongshi?CustomerId=" + CustomerId;
        searchCol = [
        ];
    </script>
}
@section footerScripts{
    <script type="text/javascript">
    </script>
}
zhengcaioa/zhengcaioa/Views/Shared/_Layout_Search.cshtml
@@ -57,7 +57,7 @@
    <script src="~/js/plugins/search/searchtoolbar.js?v=20"></script>
    <script src="~/js/plugins/chosen/chosen.jquery.js"></script>
    <script src="~/js/plugins/iCheck/icheck.min.js"></script>
    <script src="~/js/plugins/search/search.js?v=1111111111111"></script>
    <script src="~/js/plugins/search/search.js?v=11111111111111"></script>
    <script src="~/js/plugins/datapicker/bootstrap-datepicker.js"></script>
    <script type="text/javascript" src="~/js/plugins/treeview/bootstrap-treeview.js"></script>
    <script src="~/js/TUJS.js"></script>
zhengcaioa/zhengcaioa/wwwroot/js/plugins/search/search.js
@@ -222,7 +222,8 @@
        },
        multiselect: gridConfig.multiselect
          , beforeRequest: BeforeRequest
        , beforeRequest: BeforeRequest
        , beforeSelectRow: BeforeSelectRow
    });
    //$("#jqGrid").jqGrid('setGroupHeaders', {
@@ -234,6 +235,8 @@
    jQuery("#jqGrid").jqGrid('navGrid', "#jqGridPager", { edit: false, add: false, del: false, search: false, refresh: true });
    doResize();
});
function BeforeSelectRow() {
}
function BeforeRequest() {