今日开发 问题新增 增加是否出书 是否收藏:是、否 每个人的收藏不一样
档案客户访问: 选择短信内容,然后提交的时候发送短信给客户
| | |
| | | CreateMap<OrderBanciOrder, OrderBanciOrderDTO>(); |
| | | CreateMap<OrderBanciOrderDTO, OrderBanciOrder>(); |
| | | |
| | | CreateMap<LiaotianShoucang, LiaotianShoucangDTO>(); |
| | | CreateMap<LiaotianShoucangDTO, LiaotianShoucang>(); |
| | | |
| | | CreateMap<IntentionVisitDuanxin, IntentionVisitDuanxinDTO>(); |
| | | CreateMap<IntentionVisitDuanxinDTO, IntentionVisitDuanxin>(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | 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; } |
| | | } |
| | | } |
| | |
| | | |
| | | public string Questiontype { get; set; } |
| | | public string Problemtype { get; set; } |
| | | public string ChushuStatus { get; set; } |
| | | |
| | | public string _Modifytimetxt; |
| | | public string Modifytimetxt |
| | |
| | | _Createtimetxt = value; |
| | | } |
| | | } |
| | | |
| | | public string ShouCangStatus { get; set; } |
| | | } |
| | | |
| | | public class LiaotianDTOSearch : SearchEntity |
| | |
| | | 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; } |
| | | } |
| | | } |
New file |
| | |
| | | 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; } |
| | | } |
| | | } |
| | |
| | | List<IntentionCustomerDTO> GetList(string[] id); |
| | | |
| | | List<IntentionVisitDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax); |
| | | |
| | | IntentionVisitDuanxinDTO GetDuanxin(string id); |
| | | |
| | | List<IntentionVisitDuanxinDTO> GetListDuanxin(); |
| | | } |
| | | } |
| | |
| | | |
| | | List<LiaotianDTO> SearchForPrint(LiaotianDTOSearch searchEntity); |
| | | |
| | | ResultEntity saveLiaotianShoucang(LiaotianShoucangDTO liaotian); |
| | | |
| | | ResultEntity ModifyStatusLiaotianShoucang(string id, string userid); |
| | | |
| | | List<LiaotianShoucangDTO> getListLiaotianShoucang(string userId,string LiaotianId); |
| | | |
| | | } |
| | | } |
| | |
| | | public string Questiontype { get; set; } |
| | | public string Problemtype { get; set; } |
| | | public string Shiyongfatiao { get; set; } |
| | | |
| | | public string ChushuStatus { get; set; } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | 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; } |
| | | } |
| | | } |
| | |
| | | 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; } |
| | |
| | | .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"); |
| | |
| | | .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"); |
| | |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | namespace Services |
| | | { |
| | | public class LiaotianService: ILiaotianService |
| | | public class LiaotianService : ILiaotianService |
| | | { |
| | | private readonly zhengcaioaContext _context; |
| | | private readonly IMapper _mapper; |
| | |
| | | _mapper = mapper; |
| | | } |
| | | |
| | | public ResultEntity saveLiaotian(LiaotianDTO liaotiandto) |
| | | public ResultEntity saveLiaotian(LiaotianDTO liaotiandto) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | try |
| | |
| | | } |
| | | 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(); |
| | |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "ä¿å失败ï¼è¯·è系管çå"; |
| | | |
| | | |
| | | } |
| | | return resultEntity; |
| | | } |
| | |
| | | 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(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 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)) |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | public List<LiaotianDTO> SearchForPrint(LiaotianDTOSearch searchEntity) |
| | | { |
| | | |
| | | |
| | | List<LiaotianDTO> list = new List<LiaotianDTO>(); |
| | | //çé |
| | | var query = _context.Liaotians |
| | |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | 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) |
| | | { |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | |
| | | using (TransactionScope scope = new TransactionScope()) |
| | | { |
| | | resultEntity = _intentionVisitService.save(data); |
| | | |
| | | if (!resultEntity.Result) |
| | | { |
| | | return new JsonResult(resultEntity); |
| | | } |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(data.IsYwjl)) |
| | |
| | | intentionCustomerDTO.Ywjl = curentuser.Id; |
| | | } |
| | | resultEntity = _intentionCustomerService.save(intentionCustomerDTO); |
| | | if (!resultEntity.Result) |
| | | { |
| | | return new JsonResult(resultEntity); |
| | | } |
| | | } |
| | | else if (data.Jy == "05") |
| | | { |
| | |
| | | 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(); |
| | |
| | | { |
| | | 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) |
| | | { |
| | |
| | | [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)); |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | ViewData["questiontype"] = _liaotianService.GetSYScode("Liaotian", "questiontype"); |
| | | |
| | | ViewData["problemtype"] = _liaotianService.GetSYScode("Liaotian", "problemtype").Where(x=>x.Contents == liaotianDTO.Questiontype).ToList(); |
| | | |
| | | |
| | | return View(); |
| | | } |
| | |
| | | [CheckLogin] |
| | | public async Task<string> SaveAsync(LiaotianDTO data) |
| | | { |
| | | |
| | | |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | resultEntity.Result = false; |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | |
| | | |
| | | resultEntity = _liaotianService.saveLiaotian(data); |
| | | |
| | | |
| | | |
| | | |
| | | //string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | |
| | | 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> |
| | | /// æäº¤å¹¶å®¡æ ¸ |
| | |
| | | [CheckLogin] |
| | | public async Task<string> TijiaobingshenheAsync(LiaotianDTO data) |
| | | { |
| | | |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | resultEntity.Result = false; |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | |
| | | resultEntity = _liaotianService.saveLiaotian(data); |
| | | |
| | | |
| | | |
| | | string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | | string url = $"{api_domain}/liaotian/person/" + data.Id; |
| | | LiaotianElasticsearchDTO liaotianElasticsearchDTO = new LiaotianElasticsearchDTO(); |
| | |
| | | string IsYwjl = ViewBag.IsYwjl as string; |
| | | |
| | | |
| | | List<IntentionVisitDuanxinDTO> Duanxin = ViewData["Duanxin"] as List<IntentionVisitDuanxinDTO>; //çä¿¡ |
| | | |
| | | } |
| | | @{ |
| | | Layout = null; |
| | |
| | | </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> |
| | | |
| | | |
| | | |
| | |
| | | |
| | | </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); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | $("#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(); |
| | |
| | | |
| | | </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> |
| | |
| | | toastr.warning("çæ¡ä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | |
| | | if ($("#ChushuStatusName").is(':checked')) { |
| | | $("#ChushuStatus").val("A"); |
| | | } else { |
| | | $("#ChushuStatus").val("D"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] }); |
| | | $.ajax({ |
| | |
| | | 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) { |
| | | |
| | | |
| | |
| | | toastr.warning("çæ¡ä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | |
| | | if ($("#ChushuStatusName").is(':checked')) { |
| | | $("#ChushuStatus").val("A"); |
| | | } else { |
| | | $("#ChushuStatus").val("D"); |
| | | } |
| | | |
| | | |
| | | imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] }); |
| | | $.ajax({ |
| | |
| | | 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) { |
| | | |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | $("#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 () { |
| | | |
| | |
| | | |
| | | |
| | | |
| | | } }, |
| | | } |
| | | }, |
| | | { |
| | | 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 }, |
| | |
| | | { 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/"); |
| | |
| | | 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 |