今日开发    问题新增   增加是否出书   是否收藏:是、否   每个人的收藏不一样
档案客户访问: 选择短信内容,然后提交的时候发送短信给客户
15个文件已修改
3个文件已添加
770 ■■■■ 已修改文件
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/IntentionVisitDuanxinDTO.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/LiaotianDTO.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/LiaotianShoucangDTO.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IIntentionVisitService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/ILiaotianService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/Liaotian.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/LiaotianShoucang.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zhengcaioaContext.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/IntentionVisitService.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/LiaotianService.cs 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/LiaotianController.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/IntentionVisit/Edit.cshtml 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Liaotian/Indexcheck.cshtml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
表修改.sql 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -215,6 +215,11 @@
            CreateMap<OrderBanciOrder, OrderBanciOrderDTO>();
            CreateMap<OrderBanciOrderDTO, OrderBanciOrder>();
            CreateMap<LiaotianShoucang, LiaotianShoucangDTO>();
            CreateMap<LiaotianShoucangDTO, LiaotianShoucang>();
            CreateMap<IntentionVisitDuanxin, IntentionVisitDuanxinDTO>();
            CreateMap<IntentionVisitDuanxinDTO, IntentionVisitDuanxin>();
        }
    }
}
zhengcaioa/DTO/IntentionVisitDuanxinDTO.cs
New file
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DTO
{
    public class IntentionVisitDuanxinDTO
    {
        public string Id { get; set; }
        public string DuanxinTitle { get; set; }
        public string DuanxinNeirong { get; set; }
        public string RecStatus { get; set; }
        public string Creater { get; set; }
        public DateTime Createtime { get; set; }
        public string Modifier { get; set; }
        public DateTime Modifytime { get; set; }
    }
}
zhengcaioa/DTO/LiaotianDTO.cs
@@ -20,6 +20,7 @@
        public string Questiontype { get; set; }
        public string Problemtype { get; set; }
        public string ChushuStatus { get; set; }
        public string _Modifytimetxt; 
        public string Modifytimetxt
@@ -48,6 +49,8 @@
                _Createtimetxt = value;
            }
        }
        public string ShouCangStatus { get; set; }
    }
    public class LiaotianDTOSearch : SearchEntity
@@ -64,7 +67,10 @@
        public string Creater { get; set; }
        public string Shifoushenhe { get; set; }
        public string ChushuStatus { get; set; }
        public string ShouCangStatus { get; set; }
        public string ShouCangCreater { get; set; }
    }
}
zhengcaioa/DTO/LiaotianShoucangDTO.cs
New file
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DTO
{
    public class LiaotianShoucangDTO
    {
        public string Id { get; set; }
        public string LiaotianId { get; set; }
        public string RecStatus { get; set; }
        public string Creater { get; set; }
        public DateTime Createtime { get; set; }
        public string Modifier { get; set; }
        public DateTime Modifytime { get; set; }
    }
}
zhengcaioa/IServices/IIntentionVisitService.cs
@@ -21,5 +21,9 @@
        List<IntentionCustomerDTO> GetList(string[] id);
        List<IntentionVisitDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax);
        IntentionVisitDuanxinDTO GetDuanxin(string id);
        List<IntentionVisitDuanxinDTO> GetListDuanxin();
    }
}
zhengcaioa/IServices/ILiaotianService.cs
@@ -21,5 +21,11 @@
        List<LiaotianDTO> SearchForPrint(LiaotianDTOSearch searchEntity);
        ResultEntity saveLiaotianShoucang(LiaotianShoucangDTO liaotian);
        ResultEntity ModifyStatusLiaotianShoucang(string id, string userid);
        List<LiaotianShoucangDTO> getListLiaotianShoucang(string userId,string LiaotianId);
    }
}
zhengcaioa/Model/Liaotian.cs
@@ -19,5 +19,8 @@
        public string Questiontype { get; set; }
        public string Problemtype { get; set; }
        public string Shiyongfatiao { get; set; }
        public string ChushuStatus { get; set; }
    }
}
zhengcaioa/Model/LiaotianShoucang.cs
New file
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace zhengcaioa.Models
{
    public partial class LiaotianShoucang
    {
        public string Id { get; set; }
        public string LiaotianId { get; set; }
        public string RecStatus { get; set; }
        public string Creater { get; set; }
        public DateTime Createtime { get; set; }
        public string Modifier { get; set; }
        public DateTime Modifytime { get; set; }
    }
}
zhengcaioa/Model/zhengcaioaContext.cs
@@ -69,6 +69,7 @@
        public virtual DbSet<IntentionVisit> IntentionVisits { get; set; }
        public virtual DbSet<IntentionVisitDuanxin> IntentionVisitDuanxins { get; set; }
        public virtual DbSet<Liaotian> Liaotians { get; set; }
        public virtual DbSet<LiaotianShoucang> LiaotianShoucangs { get; set; }
        public virtual DbSet<LZhuanjiahuidum> LZhuanjiahuida { get; set; }
        public virtual DbSet<Oayouhui> Oayouhuis { get; set; }
        public virtual DbSet<OrderBanci> OrderBancis { get; set; }
@@ -3300,6 +3301,11 @@
                    .HasMaxLength(4000)
                    .HasColumnName("anwser");
                entity.Property(e => e.ChushuStatus)
                   .HasMaxLength(1)
                   .HasColumnName("chushu_status")
                   .HasDefaultValueSql("('D')");
                entity.Property(e => e.Clientid)
                    .HasMaxLength(50)
                    .HasColumnName("clientid");
@@ -3350,6 +3356,45 @@
                    .HasColumnName("shiyongfatiao");
            });
            modelBuilder.Entity<LiaotianShoucang>(entity =>
            {
                entity.ToTable("Liaotian_shoucang");
                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.LiaotianId)
                    .HasMaxLength(50)
                    .HasColumnName("Liaotian_id");
                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<LZhuanjiahuidum>(entity =>
            {
                entity.ToTable("l_zhuanjiahuida");
zhengcaioa/Services/IntentionVisitService.cs
@@ -304,5 +304,35 @@
            return result;
        }
        public IntentionVisitDuanxinDTO GetDuanxin(string id)
        {
            var entity = _context.IntentionVisitDuanxins.Find(id);
            if (entity.RecStatus != "A")
            {
                entity = new IntentionVisitDuanxin();
            }
            var result = _mapper.Map<IntentionVisitDuanxinDTO>(entity);
            return result;
        }
        /// <summary>
        /// èŽ·å–æ‰€æœ‰æœ‰æ•ˆæ„å‘å®¢æˆ·
        /// </summary>
        /// <returns></returns>
        public List<IntentionVisitDuanxinDTO> GetListDuanxin()
        {
            var listIntentionCustomers = _context.IntentionVisitDuanxins.Where(r => r.RecStatus == "A").ToList();
            var result = _mapper.Map<List<IntentionVisitDuanxinDTO>>(listIntentionCustomers);
            return result;
        }
    }
}
zhengcaioa/Services/LiaotianService.cs
@@ -9,7 +9,7 @@
namespace Services
{
    public class LiaotianService: ILiaotianService
    public class LiaotianService : ILiaotianService
    {
        private readonly zhengcaioaContext _context;
        private readonly IMapper _mapper;
@@ -19,7 +19,7 @@
            _mapper = mapper;
        }
       public ResultEntity saveLiaotian(LiaotianDTO liaotiandto)
        public ResultEntity saveLiaotian(LiaotianDTO liaotiandto)
        {
            ResultEntity resultEntity = new ResultEntity();
            try
@@ -42,18 +42,19 @@
                }
                else
                {
                  var updateliaotian  = _context.Liaotians.Find(liaotian.Id);
                    var updateliaotian = _context.Liaotians.Find(liaotian.Id);
                    updateliaotian.Question = liaotian.Question;
                    updateliaotian.Anwser = liaotian.Anwser;
                    updateliaotian.RecStatus = liaotian.RecStatus;
                    updateliaotian.Clientid = liaotian.Clientid;
                   // updateliaotian.Creater = liaotian.Creater;
                    // updateliaotian.Creater = liaotian.Creater;
                    //updateliaotian.Createtime = liaotian.Createtime;
                    updateliaotian.Modifier = liaotian.Modifier;
                    updateliaotian.Modifytime = liaotian.Modifytime;
                    updateliaotian.Questiontype = liaotian.Questiontype;
                    updateliaotian.Problemtype = liaotian.Problemtype;
                    updateliaotian.Shiyongfatiao = liaotian.Shiyongfatiao;
                    updateliaotian.ChushuStatus = liaotian.ChushuStatus;
                }
                _context.SaveChanges();
@@ -64,7 +65,7 @@
            {
                resultEntity.Result = false;
                resultEntity.Message = "保存失败,请联系管理员";
            }
            return resultEntity;
        }
@@ -83,21 +84,21 @@
            return liaotiandto;
        }
        public List<SysCodeDtl> GetSYScode(string code_table,string code_field)
        public List<SysCodeDtl> GetSYScode(string code_table, string code_field)
        {
            List<SysCodeDtl> sysCodeDtls = (from e in _context.SysCodes
                                            join c in _context.SysCodeDtls
                                            on e.Id equals c.CodeId
                                            where e.RecStatus == "A"
                                            on e.Id equals c.CodeId
                                            where e.RecStatus == "A"
                                            && c.RecStatus == "A"
                                            && e.CodeTable == code_table
                                            && e.CodeTable == code_table
                                            && e.CodeField == code_field
                                            select c).OrderBy(x=>x.Sort).ToList();
                                            select c).OrderBy(x => x.Sort).ToList();
@@ -108,29 +109,8 @@
        public ResultDataEntity<LiaotianDTO> SearchByPaging(LiaotianDTOSearch searchEntity)
        {
            ResultDataEntity<LiaotianDTO> data = new ResultDataEntity<LiaotianDTO>();
            List<LiaotianDTO> list = new List<LiaotianDTO>();
            //筛选
            var query = _context.Liaotians
                .Where(b => b.RecStatus=="A")
                .ToList();
            //List<LiaotianDTO> list = new List<LiaotianDTO>();
            if (!string.IsNullOrEmpty(searchEntity.Question))
            {
                query = query.Where(m => m.Question.Contains(searchEntity.Question)).ToList();
            }
            if (!string.IsNullOrEmpty(searchEntity.Questiontype))
            {
                query = query.Where(m => m.Questiontype == searchEntity.Questiontype).ToList();
            }
            if (!string.IsNullOrEmpty(searchEntity.Problemtype))
            {
                query = query.Where(m => m.Problemtype.Contains(searchEntity.Problemtype)).ToList();
            }
            if (!string.IsNullOrEmpty(searchEntity.Shifoushenhe))
            {
                query = query.Where(m => m.Clientid == searchEntity.Shifoushenhe ).ToList();
            }
            DateTime Createtimestart = DateTime.Now;
            DateTime Createtimeend = DateTime.Now;
            if (!string.IsNullOrWhiteSpace(searchEntity.Createtime))
@@ -140,50 +120,61 @@
                DateTime.TryParse(Createtimes[1], out Createtimeend);
                Createtimeend = Createtimeend.AddDays(1);
            }
            if (!string.IsNullOrEmpty(searchEntity.Createtime))
            {
                query = query.Where(m => m.Createtime >= Createtimestart).ToList();
            }
            if (!string.IsNullOrEmpty(searchEntity.Createtime))
            {
                query = query.Where(m => m.Createtime <= Createtimeend).ToList();
            }
            if (!string.IsNullOrEmpty(searchEntity.Creater))
            {
                query = query.Where(m => m.Creater == searchEntity.Creater).ToList();
            }
            if (!string.IsNullOrEmpty(searchEntity.Info))
            {
                var check = searchEntity.Info.Split(' ');
                List<Liaotian> liaotians = new List<Liaotian>();
                if(check!=null&& check.Length > 0)
                {
                    for(int i = 0;i< check.Length; i++)
                    {
                        if (!string.IsNullOrWhiteSpace(check[i])){
                            liaotians = liaotians.Union(query.Where(m => m.Question.Contains(check[i])).ToList()).Distinct().ToList();
                        }
                    }
                }
                query = liaotians;
            //筛选
            var query = (from a in _context.Liaotians
            }
            else
            {
                query = query.OrderByDescending(x => x.Modifytime).ToList();
            }
                         join h in _context.LiaotianShoucangs.Where(x => x.RecStatus == "A" && x.Creater == searchEntity.ShouCangCreater)
                      on a.Id equals h.LiaotianId
                     into hsss
                         from hhh in hsss.DefaultIfEmpty()
                         where a.RecStatus == "A"
                         && (string.IsNullOrWhiteSpace(searchEntity.Createtime) || (a.Createtime >= Createtimestart && a.Createtime <= Createtimeend))
                    && (string.IsNullOrWhiteSpace(searchEntity.Question) || (a.Question.Contains(searchEntity.Question.Trim())))
                     && (string.IsNullOrWhiteSpace(searchEntity.Questiontype) || (a.Questiontype == searchEntity.Questiontype.Trim()))
                       && (string.IsNullOrWhiteSpace(searchEntity.Problemtype) || (a.Problemtype.Contains(searchEntity.Problemtype.Trim())))
   && (string.IsNullOrWhiteSpace(searchEntity.Shifoushenhe) || (a.Clientid == searchEntity.Shifoushenhe.Trim()))
    && (string.IsNullOrWhiteSpace(searchEntity.ChushuStatus) || (a.ChushuStatus == searchEntity.ChushuStatus.Trim()))
     && (string.IsNullOrWhiteSpace(searchEntity.Creater) || (a.Creater == searchEntity.Creater.Trim()))
      && (string.IsNullOrWhiteSpace(searchEntity.ShouCangStatus) || (searchEntity.ShouCangStatus == "A" && hhh.Id !=null) || (searchEntity.ShouCangStatus != "A" && hhh.Id == null))
                         select new LiaotianDTO
                         {
                             Id = a.Id,
                             Question = a.Question,
                             Anwser = a.Anwser,
                             RecStatus = a.RecStatus,
                             Creater = a.Creater,
                             Createtime = a.Createtime,
                             Modifier = a.Modifier,
                             Modifytime = a.Modifytime,
                             Clientid = a.Clientid,
                             Questiontype = a.Questiontype,
                             Problemtype = a.Problemtype,
                             Shiyongfatiao = a.Shiyongfatiao,
                             ChushuStatus= a.ChushuStatus,
                         }
              )
              .Distinct() .OrderByDescending(x => x.Modifytime).ToList();
            
            if (searchEntity.totalrows == 0)
                searchEntity.totalrows = query.Count();
            var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
            list = _mapper.Map<List<LiaotianDTO>>(lianlist);
            data.LoadData(searchEntity, list);
            //list = _mapper.Map<List<LiaotianDTO>>(lianlist);
            data.LoadData(searchEntity, query);
            return data;
        }
@@ -219,7 +210,7 @@
        /// <returns></returns>
        public List<LiaotianDTO> SearchForPrint(LiaotianDTOSearch searchEntity)
        {
            List<LiaotianDTO> list = new List<LiaotianDTO>();
            //筛选
            var query = _context.Liaotians
@@ -262,10 +253,82 @@
            query = query.OrderByDescending(x => x.Modifytime).ToList();
            list = _mapper.Map<List<LiaotianDTO>>(query);
            return list;
        }
        public ResultEntity saveLiaotianShoucang(LiaotianShoucangDTO dto)
        {
            ResultEntity resultEntity = new ResultEntity();
            try
            {
                var liaotian = _mapper.Map<LiaotianShoucang>(dto);
                if (String.IsNullOrEmpty(liaotian.Id))
                {
                    liaotian.Id = Guid.NewGuid().ToString();
                    dto.Id = liaotian.Id;
                    _context.LiaotianShoucangs.Add(liaotian);
                }
                else
                {
                    var updateliaotian = _context.LiaotianShoucangs.Find(liaotian.Id);
                    updateliaotian.LiaotianId = liaotian.LiaotianId;
                    updateliaotian.RecStatus = liaotian.RecStatus;
                    // updateliaotian.Creater = liaotian.Creater;
                    //updateliaotian.Createtime = liaotian.Createtime;
                    updateliaotian.Modifier = liaotian.Modifier;
                    updateliaotian.Modifytime = liaotian.Modifytime;
                }
                _context.SaveChanges();
                resultEntity.ReturnID = liaotian.Id;
                resultEntity.Result = true;
            }
            catch (Exception ex)
            {
                resultEntity.Result = false;
                resultEntity.Message = "保存失败,请联系管理员";
            }
            return resultEntity;
        }
        public ResultEntity ModifyStatusLiaotianShoucang(string id, string userid)
        {
            ResultEntity result = new ResultEntity();
            result.Result = true;
            var model = _context.LiaotianShoucangs.Find(id);
            if (model != null)
            {
                model.RecStatus = "D";
                model.Modifier = userid;
                model.Modifytime = DateTime.Now;
                _context.SaveChanges();
            }
            return result;
        }
        public List<LiaotianShoucangDTO> getListLiaotianShoucang(string userId, string LiaotianId)
        {
            List<LiaotianShoucangDTO> result = new List<LiaotianShoucangDTO>();
            var listFiServices = _context.LiaotianShoucangs.Where(r => r.RecStatus == "A" && (string.IsNullOrEmpty(userId) || r.Creater == userId) && (string.IsNullOrEmpty(LiaotianId) || r.LiaotianId == LiaotianId)).OrderBy(x => x.Createtime).ToList();
            result = _mapper.Map<List<LiaotianShoucangDTO>>(listFiServices);
            return result;
        }
    }
}
zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
@@ -197,7 +197,7 @@
            {
                for (int i = 0; i < result.Count; i++)
                {
                    number.Append(result[i].Phone);
                    number.Append(string.IsNullOrEmpty(result[i].Phone) ? result[i].Tel : result[i].Phone);
                    customename += result[i].Name + ",";
                    if (i != result.Count - 1)
                    {
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
@@ -138,11 +138,30 @@
            ViewData["yx"] = _liaotianService.GetSYScode("CooperVisit", "yx");
            ViewData["jy"] = _liaotianService.GetSYScode("CooperVisit", "jy");
            ViewData["Duanxin"] = _intentionVisitService.GetListDuanxin();
            ViewBag.IsYwjl = IsYwjl;
            ViewData.Model = dto;
            return View();
        }
        public IActionResult getDuanxin(string id)
        {
            ResultEntity resultEntity = new ResultEntity();
            resultEntity.Result = true;
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
          var intentionVisitDuanxinDTO =   _intentionVisitService.GetDuanxin(id);
            if(intentionVisitDuanxinDTO!=null && !string.IsNullOrEmpty(intentionVisitDuanxinDTO.DuanxinNeirong))
            {
                resultEntity.Message = string.Format(intentionVisitDuanxinDTO.DuanxinNeirong, curentuser.UserName, curentuser.Phone);
            }
            return new JsonResult(resultEntity);
        }
@@ -169,7 +188,10 @@
            using (TransactionScope scope = new TransactionScope())
            {
                resultEntity = _intentionVisitService.save(data);
                if (!resultEntity.Result)
                {
                    return new JsonResult(resultEntity);
                }
               
               
                if (!string.IsNullOrEmpty(data.IsYwjl))
@@ -181,6 +203,10 @@
                        intentionCustomerDTO.Ywjl = curentuser.Id;
                    }
                    resultEntity = _intentionCustomerService.save(intentionCustomerDTO);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                }
                else if (data.Jy == "05")
                {
@@ -189,8 +215,41 @@
                    intentionCustomerDTO.Yixiangtime = data.Vistime;
                    intentionCustomerDTO.Dianxiaozhuanyuan = curentuser.Id;
                    resultEntity = _intentionCustomerService.save(intentionCustomerDTO);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                }
                if (!string.IsNullOrEmpty(data.DuanxinNeirong))
                {
                    IntentionCustomerDTO intentionCustomerDTO = _intentionCustomerService.Get(data.Viscustomer);
                    if(intentionCustomerDTO!=null && ( !string.IsNullOrEmpty(intentionCustomerDTO.Phone) ||  !string.IsNullOrEmpty(intentionCustomerDTO.Tel)))
                    {
                        string sss = SMSHelper.PushWToUserMES(string.IsNullOrEmpty(intentionCustomerDTO.Phone)? intentionCustomerDTO.Tel: intentionCustomerDTO.Phone, data.DuanxinNeirong);
                        if (int.Parse(sss) <= 0)
                        {
                            resultEntity.Result = false;
                            resultEntity.Message = "短信发送失败";
                        }
                        if (!resultEntity.Result)
                        {
                            return new JsonResult(resultEntity);
                        }
                    }
                    else
                    {
                        resultEntity.Result = false;
                        resultEntity.Message = "客户无手机号码";
                        return new JsonResult(resultEntity);
                    }
                }
               
                scope.Complete();
@@ -250,7 +309,7 @@
            {
                for(int i=0;i< result.Count; i++)
                {
                    number.Append(result[i].Phone);
                    number.Append(string.IsNullOrEmpty(result[i].Phone)? result[i].Tel: result[i].Phone);
                    customename += result[i].Name + ",";
                    if (i!= result.Count - 1)
                    {
zhengcaioa/zhengcaioa/Controllers/LiaotianController.cs
@@ -261,7 +261,9 @@
        [CheckLogin]
        public string GetLiaotianList(LiaotianDTOSearch search)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            search.ShouCangCreater = curentuser.Id;
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            return  JsonConvert.SerializeObject(_liaotianService.SearchByPaging(search)); 
        }
@@ -276,6 +278,16 @@
            if (!String.IsNullOrEmpty(id))
            {
                liaotianDTO = _liaotianService.GetLiaotianEntity(id);
                var liaotianShoucangDTOs = _liaotianService.getListLiaotianShoucang(curentuser.Id, id);
                if(liaotianShoucangDTOs!=null&& liaotianShoucangDTOs.Count > 0)
                {
                    liaotianDTO.ShouCangStatus = "A";
                }
                else
                {
                    liaotianDTO.ShouCangStatus = "D";
                }
            }
            ViewData.Model = liaotianDTO;
@@ -287,6 +299,7 @@
            ViewData["questiontype"] = _liaotianService.GetSYScode("Liaotian", "questiontype");
            ViewData["problemtype"] = _liaotianService.GetSYScode("Liaotian", "problemtype").Where(x=>x.Contents == liaotianDTO.Questiontype).ToList();
            return View();
        }
@@ -314,6 +327,8 @@
        [CheckLogin]
        public async Task<string> SaveAsync(LiaotianDTO data)
        {
            ResultEntity resultEntity = new ResultEntity();
            resultEntity.Result = false;
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
@@ -369,6 +384,8 @@
           
              resultEntity = _liaotianService.saveLiaotian(data);
            //string api_domain = _configuration.GetSection("Elasticsearchurl").Value;
@@ -427,6 +444,49 @@
            return JsonConvert.SerializeObject(resultEntity);
        }
        /// <summary>
        /// æäº¤å¹¶å®¡æ ¸
        /// </summary>
        /// <param name="data">岗位实体类对象</param>
        /// <returns></returns>
        [HttpPost]
        [CheckLogin]
        public IActionResult  ShouCang(LiaotianDTO data)
        {
            ResultEntity resultEntity = new ResultEntity();
            resultEntity.Result = false;
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            var liaotianShoucangDTOs = _liaotianService.getListLiaotianShoucang(curentuser.Id, data.Id);
            if (data.ShouCangStatus == "A")
            {
                if (liaotianShoucangDTOs == null || liaotianShoucangDTOs.Count == 0)
                {
                    LiaotianShoucangDTO liaotianShoucangDTO = new LiaotianShoucangDTO();
                    liaotianShoucangDTO.LiaotianId = data.Id;
                    liaotianShoucangDTO.RecStatus = "A";
                    liaotianShoucangDTO.Creater = curentuser.Id;
                    liaotianShoucangDTO.Createtime = DateTime.Now;
                    liaotianShoucangDTO.Modifier = curentuser.Id;
                    liaotianShoucangDTO.Modifytime = DateTime.Now;
                    resultEntity =  _liaotianService.saveLiaotianShoucang(liaotianShoucangDTO);
                }
            }
            else
            {
                if (liaotianShoucangDTOs != null || liaotianShoucangDTOs.Count > 0)
                {
                    foreach (var liaotianShoucangDTO in liaotianShoucangDTOs)
                    {
                        resultEntity = _liaotianService.ModifyStatusLiaotianShoucang(liaotianShoucangDTO.Id, curentuser.Id);
                    }
                }
            }
            return new JsonResult(resultEntity); ;
        }
        /// <summary>
        /// æäº¤å¹¶å®¡æ ¸
@@ -437,6 +497,7 @@
        [CheckLogin]
        public async Task<string> TijiaobingshenheAsync(LiaotianDTO data)
        {
            ResultEntity resultEntity = new ResultEntity();
            resultEntity.Result = false;
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
@@ -455,6 +516,8 @@
            resultEntity = _liaotianService.saveLiaotian(data);
            string api_domain = _configuration.GetSection("Elasticsearchurl").Value;
            string url = $"{api_domain}/liaotian/person/" + data.Id;
            LiaotianElasticsearchDTO liaotianElasticsearchDTO = new LiaotianElasticsearchDTO();
zhengcaioa/zhengcaioa/Views/IntentionVisit/Edit.cshtml
@@ -13,6 +13,8 @@
    string IsYwjl = ViewBag.IsYwjl as string;
    List<IntentionVisitDuanxinDTO> Duanxin = ViewData["Duanxin"] as List<IntentionVisitDuanxinDTO>; //短信
}
@{
    Layout = null;
@@ -302,7 +304,32 @@
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">短信模板<i class="red">*</i></label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <select id="Duanxin" class="form-control" name="Duanxin" data-placeholder="选择 åºåˆ— ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in Duanxin)
                                            {
                                                <option value="@item.Id" hassubinfo="true">
                                                    @item.DuanxinTitle
                                                </option>
                                            }
                                        </select>
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">短信内容<i class="red">*</i></label>
                                    <div class="col-sm-8 col-md-8">
                                        <textarea class="form-control bt" id="DuanxinNeirong" name="DuanxinNeirong" title="短信内容" isempty="" maxlength="4000"  length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'" >@Model.DuanxinNeirong</textarea>
                                    </div>
                                </div>
@@ -328,6 +355,11 @@
    </form>
    <script type="text/javascript">
        var DuanxinNeirong = document.getElementById("DuanxinNeirong");
        DuanxinNeirong.style.height = DuanxinNeirong.scrollHeight + 'px';
        var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
        $("#div_content").height(hh);
@@ -492,8 +524,33 @@
      
        $("#Duanxin").change(function () {
            var sheng = $("#Duanxin").val();
            $.ajax({
                type: "GET",
                url: "/IntentionVisit/getDuanxin?id=" + sheng,
                dataType: "json",
                global: false,
                data: "",
                success: function (data) {
                    if (data.Result) {
                        $("#DuanxinNeirong").val(data.Message);
                        var DuanxinNeirong = document.getElementById("DuanxinNeirong");
                        DuanxinNeirong.style.height = DuanxinNeirong.scrollHeight + 'px';
                    } else {
                        parent.layer.msg('查询失败', { icon: 5 });
                    }
                },
                error: function () {
                    parent.layer.msg('查询失败', { icon: 5 });
                }
            });
        });
        function _pageAutoClose() {
            parent.window._reloadPageData();
zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml
@@ -159,6 +159,38 @@
                                    </div>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
                                        æ˜¯å¦å‡ºä¹¦
                                    </label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        @if ("A" == Model.ChushuStatus)
                                        {
                                            <input type="checkbox" class="form-control" id="ChushuStatusName" checked="checked" name="ChushuStatusName" value="A" />
                                        }
                                        else
                                        {
                                            <input type="checkbox" class="form-control" id="ChushuStatusName" name="ChushuStatusName" value="A" />
                                        }
                                        <input type="hidden" id="ChushuStatus" name="ChushuStatus" value="" />
                                    </div>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
                                        æ”¶è—
                                    </label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        @if ("A" == Model.ShouCangStatus)
                                        {
                                            <input type="checkbox" class="form-control" id="ShouCangStatusName" checked="checked" name="ShouCangStatusName" value="A" />
                                        }
                                        else
                                        {
                                            <input type="checkbox" class="form-control" id="ShouCangStatusName" name="ShouCangStatusName" value="A" />
                                        }
                                        <input type="hidden" id="ShouCangStatus" name="ShouCangStatus" value="" />
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label class="text-right col-sm-1 col-md-1 control-label">问题<i class="red">*</i></label>
@@ -363,6 +395,15 @@
                toastr.warning("答案不能为空");
                return;
            }
            if ($("#ChushuStatusName").is(':checked')) {
                $("#ChushuStatus").val("A");
            } else {
                $("#ChushuStatus").val("D");
            }
            imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] });
            $.ajax({
@@ -370,7 +411,7 @@
                url: "/Liaotian/Save",
                dataType: "json",
                global: false,
                data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val()},
                data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(),  ChushuStatus: $("#ChushuStatus").val()},
                success: function (data) {
@@ -420,6 +461,13 @@
                toastr.warning("答案不能为空");
                return;
            }
            if ($("#ChushuStatusName").is(':checked')) {
                $("#ChushuStatus").val("A");
            } else {
                $("#ChushuStatus").val("D");
            }
            imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] });
            $.ajax({
@@ -427,7 +475,7 @@
                url: "/Liaotian/Tijiaobingshenhe",
                dataType: "json",
                global: false,
                data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val() },
                data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(), ChushuStatus: $("#ChushuStatus").val()  },
                success: function (data) {
@@ -456,9 +504,43 @@
            });
        }
        
        $("#ShouCangStatusName").change(function () {
            if ($("#ShouCangStatusName").is(':checked')) {
                $("#ShouCangStatus").val("A");
            } else {
                $("#ShouCangStatus").val("D");
            }
            $.ajax({
                type: "POST",
                url: "/Liaotian/ShouCang",
                dataType: "json",
                global: false,
                data:{ Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(), ChushuStatus: $("#ChushuStatus").val(), ShouCangStatus: $("#ShouCangStatus").val() },
                success: function (data) {
                    if (data.Result) {
                        //  parent._afterSave(true);
                        parent.layer.msg('操作成功', { icon: 6 });
                    }
                    else {
                        parent.layer.msg(data.Message, { icon: 5 });
                    }
                },
                error: function () {
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        });
        $("#Questiontype").change(function () {
zhengcaioa/zhengcaioa/Views/Liaotian/Indexcheck.cshtml
@@ -33,7 +33,21 @@
                   
                } },
                }
            },
            {
                label: '是否出书', name: 'ChushuStatus', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    if (cellvalue == "D") {
                        return "否"
                    } else {
                        return "是"
                    }
                }
            },
            { label: '状态', name: 'RecStatus', labtype: 'txt', hidden: true },
            { label: '创建人', name: 'Creater', labtype: 'txt', hidden: true },
            { label: '创建时间', name: 'Createtimetxt', labtype: 'txt', hidden: true },
@@ -50,8 +64,8 @@
            { label: '是否审核', name: 'Shifoushenhe', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
            { label: '录入时间', name: 'Createtime', labtype: 'datearea', hidden: false },
            { label: '录入人', name: 'Creater', labtype: 'combox', hidden: false, data: JSON.parse(Creater), cwidth: '5%', cccwidth: '8%' },
            { label: '是否出书', name: 'ChushuStatus', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
            { label: '是否收藏', name: 'ShouCangStatus', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
        ];
        var _pageAdd = function () {
            OpenWindow("新增问题", "98%", "90%", "/Liaotian/Edit/");
±íÐÞ¸Ä.sql
@@ -1,6 +1,112 @@
USE [zhengcaioa]
GO
/****** Object:  Table [dbo].[Liaotian_shoucang]    Script Date: 2021/7/8 8:49:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Liaotian_shoucang](
    [Id] [nvarchar](50) NOT NULL,
    [Liaotian_id] [nvarchar](50)  NULL,
    [rec_status] [nvarchar](1) NOT NULL,
    [creater] [nvarchar](50) NOT NULL,
    [createtime] [datetime] NOT NULL,
    [modifier] [nvarchar](50) NOT NULL,
    [modifytime] [datetime] NOT NULL,
 CONSTRAINT [PK_Liaotian_shoucang] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Liaotian_shoucang] ADD  DEFAULT ('a') FOR [rec_status]
GO
ALTER TABLE [dbo].[Liaotian_shoucang] ADD  DEFAULT ('1') FOR [creater]
GO
ALTER TABLE [dbo].[Liaotian_shoucang] ADD  CONSTRAINT [DF_Liaotian_shoucang_createtime]  DEFAULT (getdate()) FOR [createtime]
GO
ALTER TABLE [dbo].[Liaotian_shoucang] ADD  DEFAULT ('1') FOR [modifier]
GO
ALTER TABLE [dbo].[Liaotian_shoucang] ADD  CONSTRAINT [DF_Liaotian_shoucang_modifytime]  DEFAULT (getdate()) FOR [modifytime]
GO
ALTER TABLE [dbo].[Liaotian] ADD  [chushu_status] [nvarchar](1)   NULL DEFAULT ('D')
GO
update  [dbo].[Liaotian]  set  [chushu_status] = 'D'
GO
USE [zhengcaioa]
GO
/****** Object:  Table [dbo].[order_banci_order]    Script Date: 2021/7/5 14:33:24 ******/
SET ANSI_NULLS ON
GO