From 0d96ff4e0833d6a2813a969e1ae0a48f27eee497 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 27 三月 2023 14:24:05 +0800
Subject: [PATCH] 会员发送app后台消息
---
zhengcaioa/Model/WebCrawler/WebCrawlerContext.cs | 1
zhengcaioa/zhengcaioa/Views/Shared/_Layout_Search.cshtml | 2
zhengcaioa/DTO/zcUserInfoN_db/FrameworkUserDTO.cs | 43 +
zhengcaioa/Services/CooperatecustomCustomerService.cs | 514 ++++++++++--
zhengcaioa/DTO/CooperatecustomCustomerDTO.cs | 3
zhengcaioa/zhengcaioa/Timer/TimerGetShopUsersService.cs | 866 ++++++++++++++++++++++
zhengcaioa/Model/CustomerGuanlianhuiyuan.cs | 20
zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuan.cshtml | 130 +++
zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs | 1
zhengcaioa/Model/zhengcaioaContext.cs | 49 +
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs | 4
zhengcaioa/Model/zcweb/zcwebContext.cs | 1
zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuanchakantongshi.cshtml | 81 ++
zhengcaioa/zhengcaioa/wwwroot/js/plugins/search/search.js | 5
zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs | 32
zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelectHuiyuan.cshtml | 314 ++++++++
zhengcaioa/IServices/ICooperatecustomCustomerService.cs | 8
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs | 200 +++++
18 files changed, 2,144 insertions(+), 130 deletions(-)
diff --git a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
index 9e149f3..6a4cfdd 100644
--- a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
+++ b/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>();
}
}
}
diff --git a/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs b/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs
index 43431bf..ee56ac7 100644
--- a/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs
+++ b/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; }
diff --git a/zhengcaioa/DTO/zcUserInfoN_db/FrameworkUserDTO.cs b/zhengcaioa/DTO/zcUserInfoN_db/FrameworkUserDTO.cs
new file mode 100644
index 0000000..414fc41
--- /dev/null
+++ b/zhengcaioa/DTO/zcUserInfoN_db/FrameworkUserDTO.cs
@@ -0,0 +1,43 @@
+锘縰sing 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; }
+
+ }
+}
diff --git a/zhengcaioa/IServices/ICooperatecustomCustomerService.cs b/zhengcaioa/IServices/ICooperatecustomCustomerService.cs
index d289062..3ac6d7b 100644
--- a/zhengcaioa/IServices/ICooperatecustomCustomerService.cs
+++ b/zhengcaioa/IServices/ICooperatecustomCustomerService.cs
@@ -1,4 +1,5 @@
锘縰sing 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);
}
}
diff --git a/zhengcaioa/Model/CustomerGuanlianhuiyuan.cs b/zhengcaioa/Model/CustomerGuanlianhuiyuan.cs
new file mode 100644
index 0000000..00ede1e
--- /dev/null
+++ b/zhengcaioa/Model/CustomerGuanlianhuiyuan.cs
@@ -0,0 +1,20 @@
+锘縰sing 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; }
+ }
+}
diff --git a/zhengcaioa/Model/WebCrawler/WebCrawlerContext.cs b/zhengcaioa/Model/WebCrawler/WebCrawlerContext.cs
index 6699e51..51e75c2 100644
--- a/zhengcaioa/Model/WebCrawler/WebCrawlerContext.cs
+++ b/zhengcaioa/Model/WebCrawler/WebCrawlerContext.cs
@@ -10,6 +10,7 @@
{
public WebCrawlerContext()
{
+ this.Database.SetCommandTimeout(60);
}
public WebCrawlerContext(DbContextOptions<WebCrawlerContext> options)
diff --git a/zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs b/zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs
index 835cf46..f941aa7 100644
--- a/zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs
+++ b/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)
diff --git a/zhengcaioa/Model/zcweb/zcwebContext.cs b/zhengcaioa/Model/zcweb/zcwebContext.cs
index 43de4c2..64937e6 100644
--- a/zhengcaioa/Model/zcweb/zcwebContext.cs
+++ b/zhengcaioa/Model/zcweb/zcwebContext.cs
@@ -10,6 +10,7 @@
{
public zcwebContext()
{
+ this.Database.SetCommandTimeout(60);
}
public zcwebContext(DbContextOptions<zcwebContext> options)
diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs
index 1548672..cb8e88d 100644
--- a/zhengcaioa/Model/zhengcaioaContext.cs
+++ b/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");
diff --git a/zhengcaioa/Services/CooperatecustomCustomerService.cs b/zhengcaioa/Services/CooperatecustomCustomerService.cs
index c4bee87..d4ba3a4 100644
--- a/zhengcaioa/Services/CooperatecustomCustomerService.cs
+++ b/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;
+ }
}
}
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
index 886a536..d9fdd47 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
+++ b/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"));
diff --git a/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs b/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs
index 5a71989..76d3848 100644
--- a/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs
+++ b/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 = "妗f瀹㈡埛";
+ _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan);
+ }
}
}
diff --git a/zhengcaioa/zhengcaioa/Timer/TimerGetShopUsersService.cs b/zhengcaioa/zhengcaioa/Timer/TimerGetShopUsersService.cs
index 9d8d7f7..dd4d546 100644
--- a/zhengcaioa/zhengcaioa/Timer/TimerGetShopUsersService.cs
+++ b/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>();
//鏌ヨ闇�瑕佸彂閫丄pp娑堟伅鐨勫鎴�
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>();
//鏌ヨ闇�瑕佸彂閫丄pp娑堟伅鐨勫鎴�
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>();
//鏌ヨ闇�瑕佸彂閫丄pp娑堟伅鐨勫鎴�
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>();
//鏌ヨ闇�瑕佸彂閫丄pp娑堟伅鐨勫鎴�
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>();
//鏌ヨ闇�瑕佸彂閫丄pp娑堟伅鐨勫鎴�
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\": \"鏀块噰鍜ㄨ鍏徃涓撲笟涓轰緵搴斿晢浠f嫙璐ㄧ枒鍑姐�佹姇璇変功\","
@@ -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\": \"鏀块噰鍜ㄨ鍏徃涓撲笟涓轰緵搴斿晢浠f嫙璐ㄧ枒鍑姐�佹姇璇変功\","
@@ -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 + "鍑洪敊锛�");
diff --git a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelectHuiyuan.cshtml b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelectHuiyuan.cshtml
new file mode 100644
index 0000000..81ec9f8
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelectHuiyuan.cshtml
@@ -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"> </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"> </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>
+}
diff --git a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuan.cshtml b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuan.cshtml
new file mode 100644
index 0000000..7162f12
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuan.cshtml
@@ -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> " + " <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>
+}
diff --git a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuanchakantongshi.cshtml b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuanchakantongshi.cshtml
new file mode 100644
index 0000000..41b35f8
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/Indexhuiyuanchakantongshi.cshtml
@@ -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>
+}
diff --git a/zhengcaioa/zhengcaioa/Views/Shared/_Layout_Search.cshtml b/zhengcaioa/zhengcaioa/Views/Shared/_Layout_Search.cshtml
index 0011c7f..1ea2bb5 100644
--- a/zhengcaioa/zhengcaioa/Views/Shared/_Layout_Search.cshtml
+++ b/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>
diff --git a/zhengcaioa/zhengcaioa/wwwroot/js/plugins/search/search.js b/zhengcaioa/zhengcaioa/wwwroot/js/plugins/search/search.js
index 33dd3ca..e795aa7 100644
--- a/zhengcaioa/zhengcaioa/wwwroot/js/plugins/search/search.js
+++ b/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() {
--
Gitblit v1.9.1