zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -164,6 +164,9 @@ CreateMap<WfRunProcess, WfRunProcessDTO>(); CreateMap<WfRunProcessDTO, WfRunProcess>(); CreateMap<WfHistoryDTO, WfNeeddeelDTO>(); CreateMap<WfNeeddeelDTO, WfHistoryDTO>(); CreateMap<SysAttachment, SysAttachmentDTO>(); CreateMap<SysAttachmentDTO, SysAttachment>(); zhengcaioa/DTO/AdmSignInDTO.cs
@@ -80,6 +80,11 @@ public string CreaterName { get; set; } public string Tittle { get; set; } public string Content { get; set; } public string Tongguojujue { get; set; } public string Step { get; set; } } @@ -111,6 +116,10 @@ public string CreaterName { get; set; } public string Tittle { get; set; } public string Content { get; set; } public string Tongguojujue { get; set; } public string Step { get; set; } } zhengcaioa/DTO/IntentionCustomerDTO.cs
@@ -50,6 +50,13 @@ public string CityName { get; set; } public string AreaIdName { get; set; } public string YwjlName { get; set; } public DateTime? Yixiangtime { get; set; } public string YixiangtimeName { get; set; } public string Yixiang { get; set; } public string Dianxiaozhuanyuan { get; set; } public string DianxiaozhuanyuanName { get; set; } public DateTime? Zuijinzhuizongtime { get; set; } public string ZuijinzhuizongtimeName { get; set; } } public class IntentionCustomerDTOSearch : SearchEntity @@ -67,5 +74,12 @@ public string Creater { get; set; } public string Yixiangtime { get; set; } public string Dianxiaozhuanyuan { get; set; } public string Yixiang { get; set; } public string YwjlYx { get; set; } } } zhengcaioa/DTO/IntentionVisitDTO.cs
@@ -32,6 +32,9 @@ public string ShengName { get; set; } public string Name { get; set; } public string IsYwjl { get; set; } } public class IntentionVisitDTOSearch : SearchEntity @@ -47,5 +50,7 @@ public string Vistime { get; set; } public string Viscustomer { get; set; } } } zhengcaioa/DTO/WfHistoryDTO.cs
@@ -31,6 +31,9 @@ public DateTime Modifytime { get; set; } public string Contentyijian { get; set; } public int? Sort { get; set; } public string ChuliStatusName { get; set; } public string DeelUserIdName { get; set; } public string ModifytimeName { get; set; } } public class WfHistoryDTOSearch : SearchEntity @@ -45,5 +48,7 @@ public string ShenpiStatus { get; set; } public string Creater { get; set; } } } zhengcaioa/DTO/WfNeeddeelDTO.cs
@@ -40,10 +40,10 @@ public string Applytime { get; set; } public string DeptId { get; set; } public string ApplyUserName { get; set; } public string Applytiye { get; set; } public string ShenpiStatus { get; set; } public string Creater { get; set; } } } zhengcaioa/DTO/WfRunProcessDTO.cs
@@ -22,6 +22,7 @@ public DateTime Createtime { get; set; } public string Modifier { get; set; } public DateTime Modifytime { get; set; } public string Deelurl { get; set; } } public class WfRunProcessDTOSearch : SearchEntity @@ -34,5 +35,10 @@ public string Applyno { get; set; } public string Creater { get; set; } } } zhengcaioa/IServices/IWfHistoryService.cs
@@ -15,6 +15,8 @@ ResultEntity ModifyStatus(string id, string userid); List<WfHistoryDTO> GetList(); List<WfHistoryDTO> GetList(string RunProcessId ="" ); List<WfHistoryDTO> GetListshenpi(string RunProcessId); } } zhengcaioa/IServices/IWfNeeddeelService.cs
@@ -15,6 +15,8 @@ ResultEntity ModifyStatus(string id, string userid); List<WfNeeddeelDTO> GetList(); List<WfNeeddeelDTO> GetList(string RunProcessId = "", string step = ""); List<WfNeeddeelDTO> GetListTracking(string RunProcessId = "", string step = ""); } } zhengcaioa/IServices/IWfRunProcessService.cs
@@ -15,6 +15,10 @@ ResultEntity ModifyStatus(string id, string userid); List<WfRunProcessDTO> GetList(); List<WfRunProcessDTO> GetList(string DanjuId = "", string Applytiye = ""); ResultEntity WfAskLeave(string DanjuId, string step, string tongguojujue , string Userid, string Content, string title, string version); ResultEntity WfAskLeaveOff(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version); } } zhengcaioa/Model/IntentionCustomer.cs
@@ -41,5 +41,9 @@ public DateTime Createtime { get; set; } public string Modifier { get; set; } public DateTime Modifytime { get; set; } public DateTime? Yixiangtime { get; set; } public string Yixiang { get; set; } public string Dianxiaozhuanyuan { get; set; } public DateTime? Zuijinzhuizongtime { get; set; } } } zhengcaioa/Model/WfRunProcess.cs
@@ -21,5 +21,6 @@ public DateTime Createtime { get; set; } public string Modifier { get; set; } public DateTime Modifytime { get; set; } public string Deelurl { get; set; } } } zhengcaioa/Model/zhengcaioaContext.cs
@@ -2904,6 +2904,10 @@ .HasColumnName("createtime") .HasDefaultValueSql("(getdate())"); entity.Property(e => e.Dianxiaozhuanyuan) .HasMaxLength(50) .HasColumnName("dianxiaozhuanyuan"); entity.Property(e => e.Email) .HasMaxLength(500) .HasColumnName("email") @@ -3021,6 +3025,10 @@ .HasColumnName("url") .HasComment("ç½å"); entity.Property(e => e.Yixiang).HasMaxLength(50); entity.Property(e => e.Yixiangtime).HasColumnType("datetime"); entity.Property(e => e.YwName) .HasMaxLength(500) .HasColumnName("yw_name") @@ -3040,6 +3048,10 @@ .HasMaxLength(50) .HasColumnName("ywjl") .HasComment("ä¸å¡ç»ç"); entity.Property(e => e.Zuijinzhuizongtime) .HasColumnType("datetime") .HasColumnName("zuijinzhuizongtime"); }); modelBuilder.Entity<IntentionOrder>(entity => @@ -4863,6 +4875,10 @@ .HasColumnName("danjuId") .HasComment("åæ®Id"); entity.Property(e => e.Deelurl) .HasMaxLength(500) .HasColumnName("deelurl"); entity.Property(e => e.Modifier) .IsRequired() .HasMaxLength(50) zhengcaioa/Services/IntentionCustomerService.cs
@@ -90,7 +90,12 @@ updateproject.Modifier = intentionCustomer.Modifier; updateproject.Modifytime = intentionCustomer.Modifytime; } updateproject.Yixiangtime = intentionCustomer.Yixiangtime; updateproject.Yixiang = intentionCustomer.Yixiang; updateproject.Dianxiaozhuanyuan = intentionCustomer.Dianxiaozhuanyuan; updateproject.Zuijinzhuizongtime = intentionCustomer.Zuijinzhuizongtime; } _context.SaveChanges(); resultEntity.ReturnID = intentionCustomer.Id; @@ -175,10 +180,18 @@ DateTime.TryParse(Createtimes[1], out Createtimeend); Createtimeend = Createtimeend.AddDays(1); } DateTime Yixiangtimestart = DateTime.Now; DateTime Yixiangtimeend = DateTime.Now; if (!string.IsNullOrWhiteSpace(searchEntity.Yixiangtime)) { string[] Yixiangtimes = searchEntity.Yixiangtime.Split("|"); DateTime.TryParse(Yixiangtimes[0], out Yixiangtimestart); DateTime.TryParse(Yixiangtimes[1], out Yixiangtimeend); // Yixiangtimeend = Yixiangtimeend.AddDays(1); } var query = (from a in _context.IntentionCustomers join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly") var query = (from a in _context.IntentionCustomers join b in listCode.Where(x => x.CodeTable == "IntentionCustomer" && x.CodeField == "khly") on a.Khly equals b.CodeSn join c in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "hyfl") on a.Hyfl equals c.CodeSn @@ -188,7 +201,13 @@ on a.Ywjl equals e.Id into esss from abi in esss.DefaultIfEmpty() join f in _context.Areas on a.Sheng equals f.CodeId join f in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A" ) on a.Dianxiaozhuanyuan equals f.Id into fsss from fff in fsss.DefaultIfEmpty() join f in _context.Areas on a.Sheng equals f.CodeId join g in _context.Areas on a.City equals g.CodeId join h in _context.Areas on a.AreaId equals h.CodeId @@ -204,7 +223,11 @@ && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || a.AreaId == searchEntity.AreaId.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.Creater == searchEntity.Creater.Trim()) select new IntentionCustomerDTO && (string.IsNullOrWhiteSpace(searchEntity.Dianxiaozhuanyuan) || a.Dianxiaozhuanyuan == searchEntity.Dianxiaozhuanyuan.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Yixiangtime) || (a.Yixiangtime >= Yixiangtimestart && a.Yixiangtime <= Yixiangtimeend)) && (string.IsNullOrWhiteSpace(searchEntity.Yixiang) || ( a.Yixiang == searchEntity.Yixiang.Trim() && (a.Ywjl == null || a.Ywjl == searchEntity.YwjlYx) )) select new IntentionCustomerDTO { Id = a.Id, Sheng = a.Sheng, @@ -249,7 +272,14 @@ Modifier = a.Modifier, Modifytime = a.Modifytime, CreatetimeName = a.Createtime.ToString("yyyy-MM-dd"), } Yixiangtime = a.Yixiangtime, YixiangtimeName = a.Yixiangtime.HasValue? a.Yixiangtime.Value.ToString("yyyy-MM-dd"):"", Yixiang = a.Yixiang, Dianxiaozhuanyuan = a.Dianxiaozhuanyuan, DianxiaozhuanyuanName = fff.UserName, Zuijinzhuizongtime = a.Zuijinzhuizongtime, ZuijinzhuizongtimeName = a.Zuijinzhuizongtime.HasValue ? a.Zuijinzhuizongtime.Value.ToString("yyyy-MM-dd") : "", } ).OrderByDescending(x => x.Modifytime).ToList(); zhengcaioa/Services/IntentionVisitService.cs
@@ -161,7 +161,7 @@ && (string.IsNullOrWhiteSpace(searchEntity.Sheng) || zz.Sheng == searchEntity.Sheng.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.City) || zz.City == searchEntity.City.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || zz.AreaId == searchEntity.AreaId.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Viscustomer) || a.Viscustomer == searchEntity.Viscustomer.Trim()) select new IntentionVisitDTO { Id = a.Id, zhengcaioa/Services/WfHistoryService.cs
@@ -116,7 +116,7 @@ string[] Applytimes = searchEntity.Applytime.Split("|"); DateTime.TryParse(Applytimes[0], out Applytimestart); DateTime.TryParse(Applytimes[1], out Applytimeend); //Applytimeend = Applytimeend.AddDays(1); Applytimeend = Applytimeend.AddDays(1); } ///WfHistories @@ -140,7 +140,7 @@ from fff in fsssss.DefaultIfEmpty() join d in _context.WfApplytypes on k.Applytiye equals d.Id on k.Applytiye equals d.Applyno join b in _context.PltUsers on k.Creater equals b.Id @@ -159,7 +159,7 @@ && (string.IsNullOrWhiteSpace(searchEntity.RunProcessId) || a.RunProcessId == searchEntity.RunProcessId.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Applyno) || k.Applyno == searchEntity.Applyno.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.DeelUserId == searchEntity.Creater.Trim()) select new WfHistoryDTO { @@ -191,10 +191,10 @@ NeeddeelTypeName = fff.Comments, Contentyijian = a.Content, Sort = a.Sort, Deelurl = a.Deelurl, Creater = a.Creater, Createtime = a.Createtime, Step = a.Step, RecStatus = a.RecStatus, Modifier = a.Modifier, Modifytime = a.Modifytime, @@ -235,14 +235,72 @@ /// è·åæææææµç¨ç±»å /// </summary> /// <returns></returns> public List<WfHistoryDTO> GetList() public List<WfHistoryDTO> GetList(string RunProcessId = "") { var listRole = _context.WfHistories.Where(r => r.RecStatus == "A").ToList(); var listRole = _context.WfHistories.Where(r => r.RecStatus == "A").OrderBy(x=>x.Sort).ToList(); if (!string.IsNullOrEmpty(RunProcessId)) { listRole = listRole.Where(x => x.RunProcessId == RunProcessId).ToList(); } var list = _mapper.Map<List<WfHistoryDTO>>(listRole); return list; } /// <summary> /// æ¥è¯¢åå²å®¡æ¹æè§ /// </summary> /// <returns></returns> public List<WfHistoryDTO> GetListshenpi(string RunProcessId) { var listRole = (from a in _context.WfHistories.Where(x => x.RecStatus == "A" && x.NeeddeelType =="1" && x.ChuliStatus != "0" && x.RunProcessId == RunProcessId) join b in _context.PltUsers on a.DeelUserId equals b.Id select new WfHistoryDTO { RunProcessId = a.RunProcessId, SendUserId = a.SendUserId, DeelUserId = a.DeelUserId, Sendtime = a.Sendtime, Resivetime = a.Resivetime, Step = a.Step, ChuliStatus = a.ChuliStatus, Deelurl = a.Deelurl, NeeddeelType = a.NeeddeelType, Sort = a.Sort, Content = a.Content, RecStatus = a.RecStatus, Creater = a.Creater, Createtime = a.Createtime, Modifier = a.Modifier, Modifytime = a.Modifytime, ChuliStatusName = a.Step == "æäº¤"? "æäº¤" : a.ChuliStatus == "2" ? "åæ" : "æç»", DeelUserIdName = b.UserName, ModifytimeName = a.Modifytime.ToString("yyyy-MM-dd HH:mm:ss"), } ).OrderBy(x => x.Modifytime).ToList(); // _context.WfHistories.Where(r => r.RecStatus == "A").OrderBy(x => x.Sort).ToList(); //if (!string.IsNullOrEmpty(RunProcessId)) //{ // listRole = listRole.Where(x => x.RunProcessId == RunProcessId).ToList(); //} return listRole; } } } zhengcaioa/Services/WfNeeddeelService.cs
@@ -2,6 +2,7 @@ using DTO; using DTO.Models; using IServices; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; @@ -117,7 +118,7 @@ string[] Applytimes = searchEntity.Applytime.Split("|"); DateTime.TryParse(Applytimes[0], out Applytimestart); DateTime.TryParse(Applytimes[1], out Applytimeend); //Applytimeend = Applytimeend.AddDays(1); Applytimeend = Applytimeend.AddDays(1); } ///WfNeeddeels @@ -141,7 +142,7 @@ from fff in fsssss.DefaultIfEmpty() join d in _context.WfApplytypes on k.Applytiye equals d.Id on k.Applytiye equals d.Applyno join b in _context.PltUsers on k.Creater equals b.Id @@ -160,7 +161,7 @@ && (string.IsNullOrWhiteSpace(searchEntity.RunProcessId) || a.RunProcessId == searchEntity.RunProcessId.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Applyno) || k.Applyno == searchEntity.Applyno.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.DeelUserId == searchEntity.Creater.Trim()) select new WfNeeddeelDTO { @@ -192,10 +193,10 @@ NeeddeelTypeName = fff.Comments, Contentyijian = a.Content, Sort = a.Sort, Deelurl = a.Deelurl, Creater = a.Creater, Createtime = a.Createtime, Step = a.Step, RecStatus = a.RecStatus, Modifier = a.Modifier, Modifytime = a.Modifytime, @@ -236,12 +237,37 @@ /// è·åæææææµç¨ç±»å /// </summary> /// <returns></returns> public List<WfNeeddeelDTO> GetList() public List<WfNeeddeelDTO> GetList(string RunProcessId = "", string step = "") { var listRole = _context.WfNeeddeels.AsNoTracking().Where(r => r.RecStatus == "A").ToList(); if (!string.IsNullOrEmpty(RunProcessId) && !string.IsNullOrEmpty(step)) { listRole = listRole.Where(x => x.RunProcessId == RunProcessId && x.Step == step).ToList(); } var list = _mapper.Map<List<WfNeeddeelDTO>>(listRole); return list; } /// <summary> /// è·åæææææµç¨ç±»å /// </summary> /// <returns></returns> public List<WfNeeddeelDTO> GetListTracking(string RunProcessId = "", string step = "") { var listRole = _context.WfNeeddeels.Where(r => r.RecStatus == "A").ToList(); if (!string.IsNullOrEmpty(RunProcessId) && !string.IsNullOrEmpty(step)) { listRole = listRole.Where(x => x.RunProcessId == RunProcessId && x.Step == step).ToList(); } var list = _mapper.Map<List<WfNeeddeelDTO>>(listRole); return list; } zhengcaioa/Services/WfRunProcessService.cs
@@ -2,6 +2,7 @@ using DTO; using DTO.Models; using IServices; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; @@ -15,10 +16,12 @@ { private readonly zhengcaioaContext _context; private readonly IMapper _mapper; public WfRunProcessService(zhengcaioaContext context, IMapper mapper) private readonly IWfNeeddeelService _wfNeeddeelService; public WfRunProcessService(zhengcaioaContext context, IMapper mapper, IWfNeeddeelService wfNeeddeelService) { _context = context; _mapper = mapper; _wfNeeddeelService = wfNeeddeelService; } public ResultEntity save(WfRunProcessDTO dto) { @@ -29,6 +32,17 @@ if (String.IsNullOrEmpty(model.Id)) { model.Id = Guid.NewGuid().ToString(); dto.Id = model.Id; var datestreing = DateTime.Now.ToString("yyyyMMdd"); var Applyno = _context.WfRunProcesses.Where(x => x.Applyno.Contains(datestreing)).Max(x => x.Applyno); if (string.IsNullOrEmpty(Applyno)) { model.Applyno = datestreing + 1.ToString().PadLeft(4, '0'); } else { model.Applyno = datestreing + (int.Parse(Applyno.Substring(Applyno.Length - 4)) + 1).ToString().PadLeft(4, '0'); } _context.WfRunProcesses.Add(model); } else @@ -42,7 +56,7 @@ updateWfRunProcess.Step = model.Step; updateWfRunProcess.ShenpiStatus = model.ShenpiStatus; updateWfRunProcess.Version = model.Version; updateWfRunProcess.Deelurl = model.Deelurl; updateWfRunProcess.RecStatus = model.RecStatus; // updateWfRunProcess.Creater = WfRunProcess.Creater; @@ -112,25 +126,21 @@ string[] Applytimes = searchEntity.Applytime.Split("|"); DateTime.TryParse(Applytimes[0], out Applytimestart); DateTime.TryParse(Applytimes[1], out Applytimeend); //Applytimeend = Applytimeend.AddDays(1); Applytimeend = Applytimeend.AddDays(1); } ///WfRunProcesses var query = (from a in _context.WfRunProcesses join e in listCode.Where(x => x.CodeTable == "wf_run_process" && x.CodeField == "shenpi_status") on a.ShenpiStatus equals e.CodeSn into esssss from eee in esssss.DefaultIfEmpty() join d in _context.WfApplytypes on a.Applytiye equals d.Id on a.Applytiye equals d.Applyno join b in _context.PltUsers on a.Creater equals b.Id @@ -146,7 +156,7 @@ && (string.IsNullOrWhiteSpace(searchEntity.ShenpiStatus) || a.ShenpiStatus == searchEntity.ShenpiStatus.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Applyno) || a.Applyno == searchEntity.Applyno.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.Creater == searchEntity.Creater.Trim()) select new WfRunProcessDTO { @@ -159,10 +169,11 @@ Content = a.Content, ShenpiStatusName = eee.Comments, ShenpiStatus = a.ShenpiStatus, Step = a.Step, Version = a.Version, Createtime = a.Createtime, Deelurl = a.Deelurl, RecStatus = a.RecStatus, Modifier = a.Modifier, Modifytime = a.Modifytime, @@ -203,14 +214,1075 @@ /// è·åæææææµç¨ç±»å /// </summary> /// <returns></returns> public List<WfRunProcessDTO> GetList() public List<WfRunProcessDTO> GetList(string DanjuId = "",string Applytiye = "") { var listRole = _context.WfRunProcesses.Where(r => r.RecStatus == "A").ToList(); if(!string.IsNullOrEmpty(DanjuId) && !string.IsNullOrEmpty(Applytiye)) { listRole = listRole.Where(x=>x.DanjuId == DanjuId && x.Applytiye == Applytiye).ToList(); } var list = _mapper.Map<List<WfRunProcessDTO>>(listRole); return list; } public ResultEntity WfAskLeave(string DanjuId, string step, string tongguojujue, string Userid,string Content, string title, string version) { ResultEntity result = new ResultEntity(); result.Result = true; WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "01").FirstOrDefault(); if (wfRunProcessDTO != null) { version = wfRunProcessDTO.Version; } if (version == "v1") { if (step == "æäº¤") { //æ´æ°æµç¨å®ä¾ // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "01").FirstOrDefault(); if (wfRunProcessDTO == null) { //æå ¥æµç¨å®ä¾ wfRunProcessDTO = new WfRunProcessDTO(); //wfRunProcessDTO.Applyno = wfRunProcessDTO.Applytime = DateTime.Now; wfRunProcessDTO.Applytiye = "01"; wfRunProcessDTO.DanjuId = DanjuId; wfRunProcessDTO.Content = title; wfRunProcessDTO.Step = "人äºå®¡æ¹"; wfRunProcessDTO.ShenpiStatus = "D"; wfRunProcessDTO.Version = version; wfRunProcessDTO.RecStatus = "A"; wfRunProcessDTO.Creater = Userid; wfRunProcessDTO.Createtime = DateTime.Now; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; wfRunProcessDTO.Deelurl = "/Signin/AskLeave?id=" + DanjuId; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "人äº").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥å¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "人äºå®¡æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeave?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } //æå ¥æ°çå·²å WfHistory wfHistoryDTO1 = new WfHistory(); wfHistoryDTO1.Id = Guid.NewGuid().ToString(); wfHistoryDTO1.RunProcessId = wfRunProcessDTO.Id; wfHistoryDTO1.SendUserId = Userid; wfHistoryDTO1.DeelUserId = wfRunProcessDTO.Creater; wfHistoryDTO1.Sendtime = DateTime.Now; wfHistoryDTO1.Resivetime = DateTime.Now; wfHistoryDTO1.Step = "æäº¤"; wfHistoryDTO1.NeeddeelType = "1"; wfHistoryDTO1.ChuliStatus = "2"; wfHistoryDTO1.Deelurl = "/Signin/AskLeave?id=" + DanjuId; wfHistoryDTO1.Content = ""; wfHistoryDTO1.Sort = 1; wfHistoryDTO1.RecStatus = "A"; wfHistoryDTO1.Creater = Userid; wfHistoryDTO1.Createtime = DateTime.Now; wfHistoryDTO1.Modifier = Userid; wfHistoryDTO1.Modifytime = wfHistoryDTO1.Createtime; _context.WfHistories.Add(wfHistoryDTO1); _context.SaveChanges(); } else { wfRunProcessDTO.Step = "人äºå®¡æ¹"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æäº¤"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "人äº").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "人äºå®¡æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeave?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 2; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } } if (step == "人äºå®¡æ¹") { //æ´æ°æµç¨å®ä¾ //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "01").FirstOrDefault(); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°æµç¨å®ä¾"; return result; } if (wfRunProcessDTO.Step != "人äºå®¡æ¹") { result.Result = false; result.Message = "å½åæ¥éª¤å·²ç»å¤ç"; return result; } if (tongguojujue == "A") { wfRunProcessDTO.Step = "æ»ç»ç审æ¹"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "人äºå®¡æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "æ»ç»ç").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æ»ç»ç审æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeave?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 3; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } else { wfRunProcessDTO.Step = "æäº¤"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "人äºå®¡æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "1"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = wfRunProcessDTO.Creater; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æäº¤"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeave?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } if (step == "æ»ç»ç审æ¹") { //æ´æ°æµç¨å®ä¾ //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "01").FirstOrDefault(); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°æµç¨å®ä¾"; return result; } if (wfRunProcessDTO.Step != "æ»ç»ç审æ¹") { result.Result = false; result.Message = "å½åæ¥éª¤å·²ç»å¤ç"; return result; } if (tongguojujue == "A") { wfRunProcessDTO.Step = "å®ç»"; wfRunProcessDTO.ShenpiStatus = "A"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°åæ® var askLeave = _context.AdmAskLeaves.Find(DanjuId); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°åæ®"; return result; } askLeave.ShenpiStatus = "A"; _context.SaveChanges(); List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æ»ç»ç审æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { // _wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); } else { wfRunProcessDTO.Step = "æäº¤"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æ»ç»ç审æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "1"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = wfRunProcessDTO.Creater; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æäº¤"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeave?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } } return result; } public ResultEntity WfAskLeaveOff(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version) { ResultEntity result = new ResultEntity(); result.Result = true; WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "02").FirstOrDefault(); if (wfRunProcessDTO != null) { version = wfRunProcessDTO.Version; } if (version == "v1") { if (step == "æäº¤") { //æ´æ°æµç¨å®ä¾ // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "02").FirstOrDefault(); if (wfRunProcessDTO == null) { //æå ¥æµç¨å®ä¾ wfRunProcessDTO = new WfRunProcessDTO(); //wfRunProcessDTO.Applyno = wfRunProcessDTO.Applytime = DateTime.Now; wfRunProcessDTO.Applytiye = "02"; wfRunProcessDTO.DanjuId = DanjuId; wfRunProcessDTO.Content = title; wfRunProcessDTO.Step = "人äºå®¡æ¹"; wfRunProcessDTO.ShenpiStatus = "D"; wfRunProcessDTO.Version = version; wfRunProcessDTO.RecStatus = "A"; wfRunProcessDTO.Creater = Userid; wfRunProcessDTO.Createtime = DateTime.Now; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; wfRunProcessDTO.Deelurl = "/Signin/AskLeaveOff?id=" + DanjuId; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "人äº").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥å¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "人äºå®¡æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeaveOff?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } //æå ¥æ°çå·²å WfHistory wfHistoryDTO1 = new WfHistory(); wfHistoryDTO1.Id = Guid.NewGuid().ToString(); wfHistoryDTO1.RunProcessId = wfRunProcessDTO.Id; wfHistoryDTO1.SendUserId = Userid; wfHistoryDTO1.DeelUserId = wfRunProcessDTO.Creater; wfHistoryDTO1.Sendtime = DateTime.Now; wfHistoryDTO1.Resivetime = DateTime.Now; wfHistoryDTO1.Step = "æäº¤"; wfHistoryDTO1.NeeddeelType = "1"; wfHistoryDTO1.ChuliStatus = "2"; wfHistoryDTO1.Deelurl = "/Signin/AskLeaveOff?id=" + DanjuId; wfHistoryDTO1.Content = ""; wfHistoryDTO1.Sort = 1; wfHistoryDTO1.RecStatus = "A"; wfHistoryDTO1.Creater = Userid; wfHistoryDTO1.Createtime = DateTime.Now; wfHistoryDTO1.Modifier = Userid; wfHistoryDTO1.Modifytime = wfHistoryDTO1.Createtime; _context.WfHistories.Add(wfHistoryDTO1); _context.SaveChanges(); } else { wfRunProcessDTO.Step = "人äºå®¡æ¹"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æäº¤"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "人äº").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "人äºå®¡æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeaveOff?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 2; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } } if (step == "人äºå®¡æ¹") { //æ´æ°æµç¨å®ä¾ //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "02").FirstOrDefault(); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°æµç¨å®ä¾"; return result; } if (wfRunProcessDTO.Step != "人äºå®¡æ¹") { result.Result = false; result.Message = "å½åæ¥éª¤å·²ç»å¤ç"; return result; } if (tongguojujue == "A") { wfRunProcessDTO.Step = "æ»ç»ç审æ¹"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "人äºå®¡æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "æ»ç»ç").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æ»ç»ç审æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeaveOff?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 3; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } else { wfRunProcessDTO.Step = "æäº¤"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "人äºå®¡æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "1"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = wfRunProcessDTO.Creater; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æäº¤"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/AskLeaveOff?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } if (step == "æ»ç»ç审æ¹") { //æ´æ°æµç¨å®ä¾ //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "02").FirstOrDefault(); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°æµç¨å®ä¾"; return result; } if (wfRunProcessDTO.Step != "æ»ç»ç审æ¹") { result.Result = false; result.Message = "å½åæ¥éª¤å·²ç»å¤ç"; return result; } if (tongguojujue == "A") { wfRunProcessDTO.Step = "å®ç»"; wfRunProcessDTO.ShenpiStatus = "A"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°åæ® var askLeaveOff = _context.AdmAskLeaveOffs.Find(DanjuId); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°åæ®"; return result; } askLeaveOff.ShenpiStatus = "A"; _context.SaveChanges(); List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æ»ç»ç审æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { // _wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); } else { wfRunProcessDTO.Step = "æäº¤"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æ»ç»ç审æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "1"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = wfRunProcessDTO.Creater; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æäº¤"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/Signin/askLeaveOff?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } } return result; } } } zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs
@@ -22,15 +22,22 @@ private readonly ISysAttachmentService _sysAttachmentService; private readonly IAdmAttendanceRuleService _attendanceRuleService; private readonly ILiaotianService _liaotianService; private readonly IWfRunProcessService _wfRunProcessService; private readonly IWfHistoryService _wfHistoryService; private readonly IWfNeeddeelService _wfNeeddeelService; [CheckLogin] public SigninController(ILogger<SigninController> logger, IAdmSigninService signinService, ISysAttachmentService sysAttachmentService , IAdmAttendanceRuleService attendanceRuleService, ILiaotianService liaotianService) , IAdmAttendanceRuleService attendanceRuleService, ILiaotianService liaotianService, IWfRunProcessService wfRunProcessService , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService) { _logger = logger; _signinService = signinService; _sysAttachmentService = sysAttachmentService; _attendanceRuleService = attendanceRuleService; _liaotianService = liaotianService; _wfRunProcessService = wfRunProcessService; _wfHistoryService = wfHistoryService; _wfNeeddeelService = wfNeeddeelService; } #region èå¤ç¾å°æå¡ @@ -272,6 +279,51 @@ ViewData["Lavetype"] = _liaotianService.GetSYScode("ADM_AskLeave", "Lavetype"); string shifoubiaoji = "A"; string sifoudangqian = "A"; string dangqianbuzhou = "æäº¤"; var lishiyijian = new List<WfHistoryDTO>(); //æµç¨ç¸å ³ if (!string.IsNullOrEmpty(id)) { var wfRunProcessDTO = _wfRunProcessService.GetList(id,"01").FirstOrDefault(); if (wfRunProcessDTO == null) { shifoubiaoji = "D"; sifoudangqian = "D"; } else { dangqianbuzhou = wfRunProcessDTO.Step; //æ¥è¯¢åå²æè§ lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id); if(wfRunProcessDTO.Step != "æäº¤") { shifoubiaoji = "D"; } //æ¥è¯¢å¾ å var chaxundaiban = _wfNeeddeelService.GetListTracking(wfRunProcessDTO.Id, wfRunProcessDTO.Step).Where(x=>x.DeelUserId == curentuser.Id).ToList(); if(chaxundaiban!=null && chaxundaiban.Count > 0) { sifoudangqian = "A"; } else { sifoudangqian = "D"; } } } ViewBag.shifoubiaoji = shifoubiaoji; ViewBag.sifoudangqian = sifoudangqian; ViewBag.lishiyijian = lishiyijian; ViewBag.dangqianbuzhou = dangqianbuzhou; return View(); } @@ -283,61 +335,72 @@ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; admAsk.RecStatus = "A"; //æªæå®¡æ¹æµï¼æäº¤ç´æ¥éè¿ admAsk.ShenpiStatus = "A"; if (String.IsNullOrEmpty(admAsk.Id)) { admAsk.Creater = curentuser.Id; admAsk.Createtime = DateTime.Now; } else { admAsk.Modifier = curentuser.Id; admAsk.Modifytime = DateTime.Now; } ResultEntity resultEntity = new ResultEntity(); resultEntity.Result = false; if (String.IsNullOrEmpty(admAsk.Id)) { admAsk.Creater = curentuser.Id; admAsk.Createtime = DateTime.Now; } else { admAsk.Modifier = curentuser.Id; admAsk.Modifytime = DateTime.Now; } using (TransactionScope scope = new TransactionScope()) { resultEntity = _signinService.SaveAskLeave(admAsk); if (resultEntity.Result == false) if (admAsk.Step == "æäº¤") { return JsonConvert.SerializeObject(resultEntity); } string[] Filepaths = admAsk.Filepath; if (Filepaths != null && Filepaths.Length > 0) { for (int i = 0; i < Filepaths.Length; i++) resultEntity = _signinService.SaveAskLeave(admAsk); if (resultEntity.Result == false) { if (string.IsNullOrEmpty(admAsk.attachmentid[i])) { SysAttachmentDTO sysAttachmentDTO = new SysAttachmentDTO(); //sysAttachmentDTO.Id = sysAttachmentDTO.AttObj = "AskLeave"; sysAttachmentDTO.AttObjid = admAsk.Id; sysAttachmentDTO.Filefullname = admAsk.Filefullname[i]; sysAttachmentDTO.Filepath = admAsk.Filepath[i]; sysAttachmentDTO.Creater = curentuser.Id; sysAttachmentDTO.Modifier = curentuser.Id; sysAttachmentDTO.Createtime = DateTime.Now; sysAttachmentDTO.Modifytime = sysAttachmentDTO.Createtime; resultEntity = _sysAttachmentService.save(sysAttachmentDTO); if (resultEntity.Result == false) { return JsonConvert.SerializeObject(resultEntity); } } return JsonConvert.SerializeObject(resultEntity); } string[] Filepaths = admAsk.Filepath; if (Filepaths != null && Filepaths.Length > 0) { for (int i = 0; i < Filepaths.Length; i++) { if (string.IsNullOrEmpty(admAsk.attachmentid[i])) { SysAttachmentDTO sysAttachmentDTO = new SysAttachmentDTO(); //sysAttachmentDTO.Id = sysAttachmentDTO.AttObj = "AskLeave"; sysAttachmentDTO.AttObjid = admAsk.Id; sysAttachmentDTO.Filefullname = admAsk.Filefullname[i]; sysAttachmentDTO.Filepath = admAsk.Filepath[i]; sysAttachmentDTO.Creater = curentuser.Id; sysAttachmentDTO.Modifier = curentuser.Id; sysAttachmentDTO.Createtime = DateTime.Now; sysAttachmentDTO.Modifytime = sysAttachmentDTO.Createtime; resultEntity = _sysAttachmentService.save(sysAttachmentDTO); if (resultEntity.Result == false) { return JsonConvert.SerializeObject(resultEntity); } } } } } //åèµ·æµç¨ç¸å ³ resultEntity = _wfRunProcessService.WfAskLeave(admAsk.Id, admAsk.Step, admAsk.Tongguojujue, curentuser.Id, admAsk.Content, admAsk.Tittle, "v1"); scope.Complete(); } return JsonConvert.SerializeObject(resultEntity); @@ -785,6 +848,53 @@ ViewData["Lavetype"] = _liaotianService.GetSYScode("ADM_AskLeaveOff", "Lavetype"); ViewData.Model = askLeaveOffDTO; string shifoubiaoji = "A"; string sifoudangqian = "A"; string dangqianbuzhou = "æäº¤"; var lishiyijian = new List<WfHistoryDTO>(); //æµç¨ç¸å ³ if (!string.IsNullOrEmpty(id)) { var wfRunProcessDTO = _wfRunProcessService.GetList(id, "02").FirstOrDefault(); if (wfRunProcessDTO == null) { shifoubiaoji = "D"; sifoudangqian = "D"; } else { dangqianbuzhou = wfRunProcessDTO.Step; //æ¥è¯¢åå²æè§ lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id); if (wfRunProcessDTO.Step != "æäº¤") { shifoubiaoji = "D"; } //æ¥è¯¢å¾ å var chaxundaiban = _wfNeeddeelService.GetListTracking(wfRunProcessDTO.Id, wfRunProcessDTO.Step).Where(x => x.DeelUserId == curentuser.Id).ToList(); if (chaxundaiban != null && chaxundaiban.Count > 0) { sifoudangqian = "A"; } else { sifoudangqian = "D"; } } } ViewBag.shifoubiaoji = shifoubiaoji; ViewBag.sifoudangqian = sifoudangqian; ViewBag.lishiyijian = lishiyijian; ViewBag.dangqianbuzhou = dangqianbuzhou; return View(); } @@ -806,41 +916,45 @@ resultEntity.Result = false; using (TransactionScope scope = new TransactionScope()) { resultEntity = _signinService.SaveAskLeaveOff(leaveOff); if(resultEntity.Result == false) if (leaveOff.Step == "æäº¤") { return JsonConvert.SerializeObject(resultEntity); } string[] Filepaths = leaveOff.Filepath; if (Filepaths != null && Filepaths.Length > 0) { for (int i = 0; i < Filepaths.Length; i++) resultEntity = _signinService.SaveAskLeaveOff(leaveOff); if (resultEntity.Result == false) { if (string.IsNullOrEmpty(leaveOff.attachmentid[i])) { SysAttachmentDTO sysAttachmentDTO = new SysAttachmentDTO(); //sysAttachmentDTO.Id = sysAttachmentDTO.AttObj = "AskLeaveOff"; sysAttachmentDTO.AttObjid = leaveOff.Id; sysAttachmentDTO.Filefullname = leaveOff.Filefullname[i]; sysAttachmentDTO.Filepath = leaveOff.Filepath[i]; sysAttachmentDTO.Creater = curentuser.Id; sysAttachmentDTO.Modifier = curentuser.Id; sysAttachmentDTO.Createtime = DateTime.Now; sysAttachmentDTO.Modifytime = sysAttachmentDTO.Createtime; return JsonConvert.SerializeObject(resultEntity); } string[] Filepaths = leaveOff.Filepath; resultEntity = _sysAttachmentService.save(sysAttachmentDTO); if (resultEntity.Result == false) if (Filepaths != null && Filepaths.Length > 0) { for (int i = 0; i < Filepaths.Length; i++) { if (string.IsNullOrEmpty(leaveOff.attachmentid[i])) { return JsonConvert.SerializeObject(resultEntity); SysAttachmentDTO sysAttachmentDTO = new SysAttachmentDTO(); //sysAttachmentDTO.Id = sysAttachmentDTO.AttObj = "AskLeaveOff"; sysAttachmentDTO.AttObjid = leaveOff.Id; sysAttachmentDTO.Filefullname = leaveOff.Filefullname[i]; sysAttachmentDTO.Filepath = leaveOff.Filepath[i]; sysAttachmentDTO.Creater = curentuser.Id; sysAttachmentDTO.Modifier = curentuser.Id; sysAttachmentDTO.Createtime = DateTime.Now; sysAttachmentDTO.Modifytime = sysAttachmentDTO.Createtime; resultEntity = _sysAttachmentService.save(sysAttachmentDTO); if (resultEntity.Result == false) { return JsonConvert.SerializeObject(resultEntity); } } } } } resultEntity = _wfRunProcessService.WfAskLeaveOff(leaveOff.Id, leaveOff.Step, leaveOff.Tongguojujue, curentuser.Id, leaveOff.Content, leaveOff.Tittle, "v1"); scope.Complete(); } zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
@@ -114,7 +114,7 @@ ViewBag.khlx = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); ViewBag.khly = _liaotianService.GetSYScode("CooperatecustomCustomer", "khly").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(); @@ -133,6 +133,41 @@ { //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); return new JsonResult(_intentionCustomerService.SearchByPaging(search)); } public IActionResult IndexYiXiang() { 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); ViewData["ActionInfo"] = actionlist; ViewBag.khly = _liaotianService.GetSYScode("IntentionCustomer", "khly").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); ViewBag.ywjl = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList(); ViewBag.Dianxiaozhuanyuan = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList(); ViewBag.ywjlId = curentuser.Id; //ViewBag.khlx = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx").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.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); return View(); } public IActionResult Edit(string id = null,string namecus = null) @@ -163,7 +198,7 @@ var users = _userService.GetList().Where(x => x.IsYwjl == "A").ToList(); ; ViewData["khlx"] = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx"); ViewData["khly"] = _liaotianService.GetSYScode("CooperatecustomCustomer", "khly"); ViewData["khly"] = _liaotianService.GetSYScode("IntentionCustomer", "khly"); ViewData["hyfl"] = _liaotianService.GetSYScode("CooperatecustomCustomer", "hyfl"); ViewData["users"] = users; @@ -196,7 +231,7 @@ var users = _userService.GetList().Where(x => x.IsYwjl == "A").ToList(); ; ViewData["khlx"] = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx"); ViewData["khly"] = _liaotianService.GetSYScode("CooperatecustomCustomer", "khly"); ViewData["khly"] = _liaotianService.GetSYScode("IntentionCustomer", "khly"); ViewData["hyfl"] = _liaotianService.GetSYScode("CooperatecustomCustomer", "hyfl"); ViewData["users"] = users; @@ -282,11 +317,11 @@ for (int i = 0; i < result.Count; i++) { resultEntity = _intentionCustomerService.ModifyStatus(result[i].Id, curentuser.Id); if (!resultEntity.Result) { return new JsonResult(resultEntity); } //resultEntity = _intentionCustomerService.ModifyStatus(result[i].Id, curentuser.Id); //if (!resultEntity.Result) //{ // return new JsonResult(resultEntity); //} var dto = _mapper.Map<CooperatecustomCustomerDTO>(result[i]); dto.Id = ""; zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
@@ -18,6 +18,7 @@ using CommonToolsCore; using static CommonToolsCore.SendMailHelper; using System.Net.Mail; using System.Transactions; namespace zhengcaioa.Controllers.Customer { @@ -46,7 +47,7 @@ } public IActionResult Index() public IActionResult Index(string Viscustomer = "", string IsYwjl = "") { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; @@ -74,13 +75,13 @@ ViewBag.khlx = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); ViewBag.khly = _liaotianService.GetSYScode("CooperatecustomCustomer", "khly").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.Viscustomer = Viscustomer; ViewBag.IsYwjl = IsYwjl; ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); return View(); @@ -93,7 +94,7 @@ return new JsonResult(_intentionVisitService.SearchByPaging(search)); } public IActionResult Edit(string id = null) public IActionResult Edit(string id = null,string Viscustomer = null,string IsYwjl = "") { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; @@ -107,6 +108,10 @@ else { dto.Vistime = DateTime.Now; if (!string.IsNullOrWhiteSpace(Viscustomer)) { dto.Viscustomer = Viscustomer; } } @@ -121,7 +126,7 @@ ViewData["jy"] = _liaotianService.GetSYScode("CooperVisit", "jy"); ViewBag.IsYwjl = IsYwjl; ViewData.Model = dto; return View(); @@ -147,8 +152,37 @@ } data.Modifier = curentuser.Id; data.Modifytime = DateTime.Now; ResultEntity resultEntity = new ResultEntity(); using (TransactionScope scope = new TransactionScope()) { resultEntity = _intentionVisitService.save(data); ResultEntity resultEntity = _intentionVisitService.save(data); if (!string.IsNullOrEmpty(data.IsYwjl)) { IntentionCustomerDTO intentionCustomerDTO = _intentionCustomerService.Get(data.Viscustomer); intentionCustomerDTO.Zuijinzhuizongtime = data.Vistime; if (string.IsNullOrEmpty(intentionCustomerDTO.Ywjl)) { intentionCustomerDTO.Ywjl = curentuser.Id; } resultEntity = _intentionCustomerService.save(intentionCustomerDTO); } else if (data.Jy == "05") { IntentionCustomerDTO intentionCustomerDTO = _intentionCustomerService.Get(data.Viscustomer); intentionCustomerDTO.Yixiang = data.Jy; intentionCustomerDTO.Yixiangtime = data.Vistime; intentionCustomerDTO.Dianxiaozhuanyuan = curentuser.Id; resultEntity = _intentionCustomerService.save(intentionCustomerDTO); } scope.Complete(); } return new JsonResult(resultEntity); } zhengcaioa/zhengcaioa/Controllers/WorkFlow/WorkFlowTaskController.cs
New file @@ -0,0 +1,163 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using AutoMapper; using AngleSharp.Html.Parser; using DTO; using IServices; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Builder.Integration.AspNet.Core; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Net.Http; using System.Threading.Tasks; using zhengcaioa.Models; using zhengcaioa.IService; using System.Net.Mail; using static CommonToolsCore.SendMailHelper; using CommonToolsCore; namespace zhengcaioa.Controllers.WorkFlow { [CheckLogin] public class WorkFlowTaskController : Controller { private readonly ILogger<WorkFlowTaskController> _logger; private readonly IWfRunProcessService _wfRunProcessService; private readonly IWfHistoryService _wfHistoryService; private readonly IWfNeeddeelService _wfNeeddeelService; private readonly IWfApplytypeService _wfApplytypeService; private readonly ILiaotianService _liaotianService; [CheckLogin] public WorkFlowTaskController(ILogger<WorkFlowTaskController> logger, IWfRunProcessService wfRunProcessService , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService, IWfApplytypeService wfApplytypeService , ILiaotianService liaotianService) { _logger = logger; _wfRunProcessService = wfRunProcessService; _wfHistoryService = wfHistoryService; _wfNeeddeelService = wfNeeddeelService; _wfApplytypeService = wfApplytypeService; _liaotianService = liaotianService; } public IActionResult Index() { 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); ViewData["ActionInfo"] = actionlist; ViewBag.Applytiye = _wfApplytypeService.GetList().Select(x => new { code = x.Applyno, label = x.Applytiye }).ToList(); return View(); } public IActionResult GetList(WfNeeddeelDTOSearch search) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; search.Creater = curentuser.Id; //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); return new JsonResult(_wfNeeddeelService.SearchByPaging(search)); } public int CountRemindRecord() { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; WfNeeddeelDTOSearch search = new WfNeeddeelDTOSearch(); search.page = 1; search.rows = 10; search.Creater = curentuser.Id; ResultDataEntity<WfNeeddeelDTO> resultDataEntity = _wfNeeddeelService.SearchByPaging(search); return search.totalrows; } public IActionResult IndexYiBan() { 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); ViewData["ActionInfo"] = actionlist; ViewBag.Applytiye = _wfApplytypeService.GetList().Select(x => new { code = x.Applyno, label = x.Applytiye }).ToList(); return View(); } public IActionResult GetListYiBan(WfHistoryDTOSearch search) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; search.Creater = curentuser.Id; //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); return new JsonResult(_wfHistoryService.SearchByPaging(search)); } public IActionResult IndexMyApply() { 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); ViewData["ActionInfo"] = actionlist; ViewBag.Applytiye = _wfApplytypeService.GetList().Select(x => new { code = x.Applyno, label = x.Applytiye }).ToList(); ViewBag.ShenpiStatus = _liaotianService.GetSYScode("wf_run_process", "shenpi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); return View(); } public IActionResult GetListMyApply(WfRunProcessDTOSearch search) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; search.Creater = curentuser.Id; //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); return new JsonResult(_wfRunProcessService.SearchByPaging(search)); } } } zhengcaioa/zhengcaioa/Startup.cs
@@ -132,7 +132,10 @@ services.AddScoped(typeof(ILZhuanjiahuidumService), typeof(LZhuanjiahuidumService)); services.AddScoped(typeof(IWfApplytypeService), typeof(WfApplytypeService)); services.AddScoped(typeof(IWfApplytypeService), typeof(WfApplytypeService)); services.AddScoped(typeof(IWfRunProcessService), typeof(WfRunProcessService)); services.AddScoped(typeof(IWfNeeddeelService), typeof(WfNeeddeelService)); services.AddScoped(typeof(IWfHistoryService), typeof(WfHistorieservice)); //宿¶æ§è¡ services.AddHostedService<TimedBackgroundService>(); zhengcaioa/zhengcaioa/Views/IntentionCustomer/Index.cshtml
@@ -21,12 +21,19 @@ return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/IntentionCustomer/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; } }, { 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: 'YwjlName', labtype: 'txt', hidden: false, width: 100 }, { label: '客æ·è®¿é®', name: 'Name111', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('æ°å¢æåå®¢æ·æè®¿','98%','100%', '/IntentionVisit/Edit?id=&Viscustomer=" + rowObject.Id + "')\" >客æ·è®¿é®</a>"; } }, ]; dataUrl = "/IntentionCustomer/GetList"; zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml
New file @@ -0,0 +1,93 @@ @{ ViewBag.Title = "IntentionCustomer"; Layout = "~/Views/Shared/_Layout_Search.cshtml"; string ywjlId = ViewBag.ywjlId as string; } @section headerStyle{ <script type="text/javascript"> var ywjls = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ywjl))'; var khlys = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khly))'; var Dianxiaozhuanyuans = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Dianxiaozhuanyuan))'; loseherght = 60; //gridConfig = { multiselect: true, selectcol: "Id" }; dataCol = [ { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, { label: 'æåæ¶é´', name: 'YixiangtimeName', labtype: 'txt', hidden: false, width: 100 }, { label: 'æåæ¥æº', name: 'KhlyName', labtype: 'txt', hidden: false, width: 100 }, { label: 'çµéä¸å', name: 'DianxiaozhuanyuanName', labtype: 'txt', hidden: false, width: 100 }, { label: '客æ·åä½', name: 'Name', labtype: 'txt', hidden: false, width: 400, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/IntentionCustomer/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; } }, { label: 'æ¿å人', name: 'YwjlName', labtype: 'txt', hidden: false, width: 100 }, { label: 'æè¿è·è¸ªæ¶é´', name: 'ZuijinzhuizongtimeName', labtype: 'txt', hidden: false, width: 100 }, { label: 'è·è¸ªè®°å½', name: 'Name111', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('è·è¸ªè®°å½','98%','100%', '/IntentionVisit/Index?IsYwjl=true&Viscustomer=" + rowObject.Id + "')\" >è·è¸ªè®°å½</a>"; } }, ]; dataUrl = "/IntentionCustomer/GetList?Yixiang=05&YwjlYx=@ywjlId"; searchCol = [ { label: 'æåæ¶é´', name: 'Yixiangtime', labtype: 'datearea', hidden: false }, { label: 'æåæ¥æº', name: 'Khly', labtype: 'combox', hidden: false, data: JSON.parse(khlys)/*, cwidth: '5%', cccwidth: '8%'*/ }, { label: 'çµéä¸å', name: 'Dianxiaozhuanyuan', labtype: 'combox', hidden: false, data: JSON.parse(Dianxiaozhuanyuans)/*, cwidth: '5%', cccwidth: '8%' */}, { label: '客æ·åä½', name: 'Name', labtype: 'txt', hidden: false }, { label: 'æ¿å人', name: 'Ywjl', labtype: 'combox', hidden: false, data: JSON.parse(ywjls) }, ]; 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"> </script> } zhengcaioa/zhengcaioa/Views/IntentionVisit/Edit.cshtml
@@ -10,6 +10,7 @@ List<SysCodeDtl> zw = ViewData["zw"] as List<SysCodeDtl>; //èå¡ List<SysCodeDtl> yx = ViewData["yx"] as List<SysCodeDtl>; //æäº¤æå List<SysCodeDtl> jy = ViewData["jy"] as List<SysCodeDtl>; //è·è¸ªå»ºè®® string IsYwjl = ViewBag.IsYwjl as string; } @@ -133,6 +134,7 @@ </select> <input type="hidden" id="Id" name="Id" value="@Model.Id" /> <input type="hidden" id="IsYwjl" name="IsYwjl" value="@IsYwjl" /> </div> </div> zhengcaioa/zhengcaioa/Views/IntentionVisit/Index.cshtml
@@ -1,6 +1,9 @@ @{ ViewBag.Title = "IntentionVisit"; Layout = "~/Views/Shared/_Layout_Search.cshtml"; string Viscustomer = ViewBag.Viscustomer as string; string IsYwjl = ViewBag.IsYwjl as string; } @section headerStyle{ <script type="text/javascript"> @@ -13,11 +16,11 @@ gridConfig = { multiselect: true, selectcol: "Id" }; dataCol = [ { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, { label: 'æè®¿æ¶é´', name: 'VistimeName', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/IntentionVisit/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/IntentionVisit/Edit?id=" + rowObject.Id + "&Viscustomer=@Viscustomer&IsYwjl=@IsYwjl')\" >" + cellvalue + "</a>"; } }, @@ -32,7 +35,7 @@ { label: 'è·è¸ªå»ºè®®', name: 'JyName', labtype: 'txt', hidden: false, width: 100 }, ]; dataUrl = "/IntentionVisit/GetList"; dataUrl = "/IntentionVisit/GetList?Viscustomer=@Viscustomer"; 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%' }, @@ -49,11 +52,11 @@ ]; var _pageAdd = function () { OpenWindow("æ°å¢æåå®¢æ·æè®¿", "98%", "90%", "/IntentionVisit/Edit/"); OpenWindow("æ°å¢æåå®¢æ·æè®¿", "98%", "90%", "/IntentionVisit/Edit?Viscustomer=@Viscustomer&IsYwjl=@IsYwjl"); } var _afterSave = function (result) { if (result) { zhengcaioa/zhengcaioa/Views/Shared/_Layout.cshtml
@@ -161,6 +161,29 @@ } }); $.ajax({ type: "POST", url: "/WorkFlowTask/CountRemindRecord", dataType: "json", global: false, async: false, //data: $('form').serializeArray(), success: function (data) { // console.log(data); $("#wfmsgcount").text(data); if (parseInt(data) > 0) { $("#showmsgcounts").attr("style", 'font-size:18px; color:#0d9c63;'); } else { $("#showmsgcounts").attr("style", 'font-size: larger;'); } }, error: function () { parent.layer.msg('失败', { icon: 5 }); } }); }; timerId(); zhengcaioa/zhengcaioa/Views/Signin/AskLeave.cshtml
@@ -3,6 +3,7 @@ @using zhengcaioa.Models; @{ Layout = null; ResultDataEntity<SysAttachmentDTO> attachment = ViewBag.attachment as ResultDataEntity<SysAttachmentDTO>; //é®é¢ç±»å List<SysAttachmentDTO> attachmentsssss = attachment.DataList; @@ -10,8 +11,14 @@ { attachmentsssss = new List<SysAttachmentDTO>(); } List<SysCodeDtl> Lavetype = ViewData["Lavetype"] as List<SysCodeDtl>; //æè®¿æ¹å¼ //æµç¨ç¸å ³ string shifoubiaoji = ViewBag.shifoubiaoji as string; string sifoudangqian = ViewBag.sifoudangqian as string; string dangqianbuzhou = ViewBag.dangqianbuzhou as string; List<WfHistoryDTO> lishiyijian = ViewData["lishiyijian"] as List<WfHistoryDTO>; //åå²æè§ } <!DOCTYPE html> <html> @@ -78,21 +85,21 @@ <tbody> <tr> <td class="title">åæ®åç§°</td> <td> <input type="text" class="form-control" value="@Model.Tittle" name="Tittle" id="Tittle" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" readonly="readonly"> <td colspan="4"> <input type="text" class="form-control" value="@Model.Tittle" name="Tittle" id="Tittle" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" readonly="readonly"> </td> </tr> <tr> <td class="title">ç³è¯·äºº</td> <td> <td colspan="4"> <input type="text" class="form-control" value="@Model.CreaterName" name="CreaterName" id="CreaterName" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" readonly="readonly"> </td> </tr> <tr> <td class="title">è¯·åæ¶é´</td> <td> <td colspan="4"> <input type="text" class="layui-input layer-date ldate form-control" value="@Model.StratTimeName" name="StratTime" id="StratTime" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" readonly="readonly">- <input type="text" class="layui-input layer-date ldate form-control" value="@Model.EndTimeName" name="EndTime" id="EndTime" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" readonly="readonly"> </td> @@ -100,7 +107,7 @@ <tr> <td class="title">请åç±»å</td> <td> <td colspan="4"> <select class="leaveType form-control data" name="Lavetype" id="Lavetype" style="margin-right: 4px;"> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in Lavetype) @@ -136,38 +143,78 @@ </tr> <tr> <td class="title">è¯·åæ¶é¿</td> <td> <td colspan="4"> <input class="layui-input data" style="width:100px !important;float: left;" type="number" value="@Model.LaveDay" name="LaveDay" id="LaveDay" min="0" step="1" readonly="readonly">天 <input class="layui-input data" style="width:100px !important;" type="number" value="@Model.LavehHour" name="LavehHour" id="LavehHour" min="0" step="1" readonly="readonly">å°æ¶ </td> </tr> <tr> <td class="title">å¤ æ³¨</td> <td> <td colspan="4"> <textarea class="form-control data" name="Remark" style="width:374px; vertical-align: top;height:100px" maxlength="500">@Model.Remark</textarea> </td> </tr> <tr> <td class="title">ä¸ä¼ éä»¶</td> <td> <td colspan="4"> <input type="file" name="file" id="fileUp" multiple> </td> </tr> <tr> <td colspan="10" style="text-align: center"> <a class="btn btn-success" href="javascript:void(0)" onclick="Save();" style="margin-left:4px; border-radius:4px;"> <span class="bold">æäº¤</span> </a> <tr id="shenpiyijian"> <td class="title">å®¡æ¹æè§</td> <td colspan="4"> <textarea class="form-control data" id="Content" name="Content" style="width:374px; vertical-align: top;height:100px" maxlength="500"></textarea> </td> </tr> <tr> <td class="title">å岿è§</td> <td colspan="4"> </td> </tr> <tr> <td colspan="10"> <table> @foreach (var wfHistory in lishiyijian) { <tr> <td style="border:1px solid #ccc;width:150px;">@wfHistory.Step</td> <td style="border:1px solid #ccc;width:50px;">@wfHistory.ChuliStatusName</td> <td style="border:1px solid #ccc;width:150px;">@wfHistory.ModifytimeName</td> <td style="border:1px solid #ccc;width:300px;">@wfHistory.Content</td> <td style="border:1px solid #ccc;width:100px;">@wfHistory.DeelUserIdName</td> </tr> } </table></td> </tr> </tbody> <tr> <td colspan="10" style="text-align: center"> <a class="btn btn-success" id="tijiao" href="javascript:void(0)" onclick="Save('');" style="margin-left:4px; border-radius:4px;"> <span class="bold">æäº¤</span> </a> <a class="btn btn-success" id="tongyi" href="javascript:void(0)" onclick="Save('A');" style="margin-left:4px; border-radius:4px;"> <span class="bold">åæ</span> </a> <a class="btn btn-success" id="jujue" href="javascript:void(0)" onclick="Save('D');" style="margin-left:4px; border-radius:4px;"> <span class="bold">æç»</span> </a> <input type="hidden" id="Id" name="Id" value="@Model.Id" /> <input type="hidden" id="Tongguojujue" name="Tongguojujue" value="" /> <input type="hidden" id="Step" name="Step" value="@dangqianbuzhou" /> </td> </tr> </tbody> </table> <div id='file-list-display' style="width: 100%;text-align: left; background-color:white"> @{ for (int i = 0; i < attachmentsssss.Count; i++) { <div> <a download href='@attachmentsssss[i].Filepath'>@attachmentsssss[i].Filefullname </a> <a href='javascript: void (0);' onclick='js_method(this,"@attachmentsssss[i].Id")'><i class='glyphicon glyphicon-remove'></i> </a> <a download href='@attachmentsssss[i].Filepath'>@attachmentsssss[i].Filefullname </a> <a href='javascript: void (0);' class = 'fujianshanchu' onclick='js_method(this,"@attachmentsssss[i].Id")'><i class='glyphicon glyphicon-remove'></i> </a> <input type="hidden" name="attachmentid" value="@attachmentsssss[i].Id" /> <input type="hidden" name="Filepath" value="@attachmentsssss[i].Filepath" /> <input type="hidden" name="Filefullname" value="@attachmentsssss[i].Filefullname" /> @@ -184,7 +231,7 @@ </form> <script type="text/javascript"> var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95; $("#div_content").height(hh); @@ -209,33 +256,74 @@ $(function () { $(".ldate").each(function (el) { laydate({ elem: "#" + $(this).attr('id'), //对åºid format: 'YYYY-MM-DD hh:mm', //æ¥ææ ¼å¼ // åé符å¯ä»¥ä»»æå®ä¹ï¼è¯¥ä¾åè¡¨ç¤ºåªæ¾ç¤ºå¹´æ min: '2021-01-01', //è®¾å®æå°æ¥æä¸ºå½åæ¥æ max: '2099-06-16', //æå¤§æ¥æ type: 'datetime', festival: false, //æ¾ç¤ºèæ¥ istime: true,  //æ¯å¦æ¾ç¤ºæ¶åç§ istoday: true, //æ¯å¦æ¯ä»å¤© choose: function (datas) { //éæ©æ¥æå®æ¯çåè° // console.log("234234234234324"); // end.min = datas; //å¼å§æ¥é好åï¼éç½®ç»ææ¥çæå°æ¥æ // end.start = datas //å°ç»ææ¥çåå§å¼è®¾å®ä¸ºå¼å§æ¥ checktime(); } }); }); $("#Lavetype").val("@Model.Lavetype"); if ("@shifoubiaoji" != "A") { $("input").attr('readonly', true); $("textarea").attr('readonly', true); $(':radio').attr('disabled', true); $(':checkbox').attr('disabled', true); $(':button').attr('disabled', true); //$('a').removeAttr('onclick'); $('select').attr('disabled', true); $("#fileUp").attr('disabled', true); $('.fujianshanchu').removeAttr('onclick'); if ("@sifoudangqian" == "A") { $("#Content").attr('readonly', false); $('#tijiao').hide(); } else { $('#tongyi').hide(); $('#jujue').hide(); $('#tijiao').hide(); $('#shenpiyijian').hide(); } } else { //审æ¹ç¸å ³ $('#shenpiyijian').hide(); if ("@sifoudangqian" == "A") { $('#tongyi').hide(); $('#jujue').hide(); } else { $('#tongyi').hide(); $('#jujue').hide(); $('#tijiao').hide(); } $(".ldate").each(function (el) { laydate({ elem: "#" + $(this).attr('id'), //对åºid format: 'YYYY-MM-DD hh:mm', //æ¥ææ ¼å¼ // åé符å¯ä»¥ä»»æå®ä¹ï¼è¯¥ä¾åè¡¨ç¤ºåªæ¾ç¤ºå¹´æ min: '2021-01-01', //è®¾å®æå°æ¥æä¸ºå½åæ¥æ max: '2099-06-16', //æå¤§æ¥æ type: 'datetime', festival: false, //æ¾ç¤ºèæ¥ istime: true,  //æ¯å¦æ¾ç¤ºæ¶åç§ istoday: true, //æ¯å¦æ¯ä»å¤© choose: function (datas) { //éæ©æ¥æå®æ¯çåè° // console.log("234234234234324"); // end.min = datas; //å¼å§æ¥é好åï¼éç½®ç»ææ¥çæå°æ¥æ // end.start = datas //å°ç»ææ¥çåå§å¼è®¾å®ä¸ºå¼å§æ¥ checktime(); } }); }); } }) function Save() { function Save(tongyi) { if ($("#StratTime").val() == '') { toastr.warning("å¼å§æ¥æä¸è½ä¸ºç©º"); return; @@ -264,9 +352,9 @@ return; } $("#Tongguojujue").val(tongyi); //var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" } $.ajax({ type: "POST", @@ -355,7 +443,7 @@ var fileListDisplay = $("#file-list-display"); if (data.DataList && data.DataList.length > 0) { for (var i = 0; i < data.DataList.length; i++) { var aaa = "<div><a download href ='" + data.DataList[i].Filepath + "'>" + data.DataList[i].Filefullname + " </a> <a href='javascript: void (0);' onclick='js_method(this,\"\")' ><i class='glyphicon glyphicon-remove'></i> </a> " var aaa = "<div><a download href ='" + data.DataList[i].Filepath + "'>" + data.DataList[i].Filefullname + " </a> <a href='javascript: void (0);' class = 'fujianshanchu' onclick='js_method(this,\"\")' ><i class='glyphicon glyphicon-remove'></i> </a> " aaa += ' <input type="hidden" name="attachmentid" value="" /> '; aaa += ' <input type="hidden" name="Filepath" value="' + data.DataList[i].Filepath + '" /> '; aaa += ' <input type="hidden" name="Filefullname" value="' + data.DataList[i].Filefullname + '" /> '; @@ -411,7 +499,7 @@ } function checktime() { if ($("#StratTime").val() == '') { @@ -426,8 +514,8 @@ return; } @@ -442,14 +530,14 @@ success: function (data) { if (data.Result) { $("#LaveDay").val(data.DataInfo.LaveDay); $("#LavehHour").val(data.DataInfo.LavehHour); $("#LavehHour").val(data.DataInfo.LavehHour); } else { toastr.error(data.Message); } }, error: function () { zhengcaioa/zhengcaioa/Views/Signin/AskLeaveOff.cshtml
@@ -14,6 +14,13 @@ } List<SysCodeDtl> Lavetype = ViewData["Lavetype"] as List<SysCodeDtl>; //æè®¿æ¹å¼ //æµç¨ç¸å ³ string shifoubiaoji = ViewBag.shifoubiaoji as string; string sifoudangqian = ViewBag.sifoudangqian as string; string dangqianbuzhou = ViewBag.dangqianbuzhou as string; List<WfHistoryDTO> lishiyijian = ViewData["lishiyijian"] as List<WfHistoryDTO>; //åå²æè§ } <!DOCTYPE html> @@ -107,28 +114,28 @@ <tbody> <tr> <td class="title">åæ®åç§°</td> <td> <td colspan="4"> <input type="text" class="form-control" value="@Model.Tittle" name="Tittle" id="Tittle" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" readonly="readonly"> </td> </tr> <tr> <td class="title">ç³è¯·äºº</td> <td> <td colspan="4"> <input type="text" class="form-control" value="@Model.CreaterName" name="CreaterName" id="CreaterName" style="width:150px;margin-right: 4px;" validate="RequiredField" autocomplete="off" readonly="readonly"> </td> </tr> <tr> <td class="title">éåæ¶é´</td> <td> <td colspan="4"> <input type="text" class="layui-input layer-date ldate form-control" value="@Model.StratTimeName" name="StratTime" id="StratTime" style="width:150px;margin-right: 4px;" autocomplete="off" readonly="readonly">- <input type="text" class="layui-input layer-date ldate form-control" value="@Model.EndTimeName" name="EndTime" id="EndTime" style="width:150px;margin-right: 4px;" autocomplete="off" readonly="readonly"> </td> </tr> <tr> <td class="title">éåç±»å</td> <td> <td colspan="4"> <select class="leaveType form-control" name="Lavetype" id="Lavetype" style="width:150px;margin-right: 4px;"> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in Lavetype) @@ -156,7 +163,7 @@ </tr> <tr> <td class="title">ç³è¯·çç±</td> <td> <td colspan="4"> <textarea name="Remark" style="width:374px; vertical-align: top;height:100px" maxlength="500">@Model.Remark</textarea> </td> </tr> @@ -164,7 +171,7 @@ <tr style="height:120px;"> <td class="title">ä¸ä¼ ç å</td> <td> <td colspan="4"> <div class="img-box"> <div id="ImgMedicalRecord" class="ImgMedicalRecord"></div> <input type="hidden" id="MedicalRecord" name="MedicalRecord" value="@Model.MedicalRecord" /> @@ -178,17 +185,57 @@ </td> </tr> <tr> <td class="title">ä¸ä¼ éä»¶</td> <td> <td class="title" >ä¸ä¼ éä»¶</td> <td colspan="4" > <input type="file" name="file" id="fileUp" multiple> </td> </tr> <tr id="shenpiyijian"> <td class="title">å®¡æ¹æè§</td> <td colspan="4"> <textarea class="form-control data" id="Content" name="Content" style="width:374px; vertical-align: top;height:100px" maxlength="500"></textarea> </td> </tr> <tr> <td class="title">å岿è§</td> <td colspan="4"> </td> </tr> <tr> <td colspan="10"> <table> @foreach (var wfHistory in lishiyijian) { <tr> <td style="border:1px solid #ccc;width:150px;">@wfHistory.Step</td> <td style="border:1px solid #ccc;width:50px;">@wfHistory.ChuliStatusName</td> <td style="border:1px solid #ccc;width:150px;">@wfHistory.ModifytimeName</td> <td style="border:1px solid #ccc;width:300px;">@wfHistory.Content</td> <td style="border:1px solid #ccc;width:100px;">@wfHistory.DeelUserIdName</td> </tr> } </table> </td> </tr> <tr> <td colspan="10" style="text-align: center"> <a class="btn btn-success" href="javascript:void(0)" onclick="Save();" style="margin-left:4px; border-radius:4px;"> <a class="btn btn-success" id="tijiao" href="javascript:void(0)" onclick="Save();" style="margin-left:4px; border-radius:4px;"> <span class="bold">æäº¤</span> </a> <a class="btn btn-success" id="tongyi" href="javascript:void(0)" onclick="Save('A');" style="margin-left:4px; border-radius:4px;"> <span class="bold">åæ</span> </a> <a class="btn btn-success" id="jujue" href="javascript:void(0)" onclick="Save('D');" style="margin-left:4px; border-radius:4px;"> <span class="bold">æç»</span> </a> <input type="hidden" id="Tongguojujue" name="Tongguojujue" value="" /> <input type="hidden" id="Step" name="Step" value="@dangqianbuzhou" /> </td> </tr> </tbody> @@ -233,27 +280,7 @@ }; var imgPath = "@Url.Content("~/UploadFile/")"; $(function () { $(".ldate").each(function (el) { laydate({ elem: "#" + $(this).attr('id'), //对åºid format: 'YYYY-MM-DD hh:mm', //æ¥ææ ¼å¼ // åé符å¯ä»¥ä»»æå®ä¹ï¼è¯¥ä¾åè¡¨ç¤ºåªæ¾ç¤ºå¹´æ min: '2021-01-01', //è®¾å®æå°æ¥æä¸ºå½åæ¥æ max: '2099-06-16', //æå¤§æ¥æ type: 'datetime', festival: false, //æ¾ç¤ºèæ¥ istime: true,  //æ¯å¦æ¾ç¤ºæ¶åç§ istoday: true, //æ¯å¦æ¯ä»å¤© choose: function (datas) { //éæ©æ¥æå®æ¯çåè° // end.min = datas; //å¼å§æ¥é好åï¼éç½®ç»ææ¥çæå°æ¥æ // end.start = datas //å°ç»ææ¥çåå§å¼è®¾å®ä¸ºå¼å§æ¥ } }); }); var imgPath = "@Url.Content("~/UploadFile/")"; new DragImgUpload("#ImgMedicalRecord", { callback: function (files) { let img = imgUploadCallback(files); @@ -265,7 +292,71 @@ }); let img = "@Model.MedicalRecord"; if ($.trim(img) !== "") $(function () { if ("@shifoubiaoji" != "A") { $("input").attr('readonly', true); $("textarea").attr('readonly', true); $(':radio').attr('disabled', true); $(':checkbox').attr('disabled', true); $(':button').attr('disabled', true); //$('a').removeAttr('onclick'); $('select').attr('disabled', true); $("#fileUp").attr('disabled', true); $("#ImgMedicalRecord").unbind("click"); $('.fujianshanchu').removeAttr('onclick'); if ("@sifoudangqian" == "A") { $("#Content").attr('readonly', false); $('#tijiao').hide(); } else { $('#tongyi').hide(); $('#jujue').hide(); $('#tijiao').hide(); $('#shenpiyijian').hide(); } } else { //审æ¹ç¸å ³ $('#shenpiyijian').hide(); if ("@sifoudangqian" == "A") { $('#tongyi').hide(); $('#jujue').hide(); } else { $('#tongyi').hide(); $('#jujue').hide(); $('#tijiao').hide(); } $(".ldate").each(function (el) { laydate({ elem: "#" + $(this).attr('id'), //对åºid format: 'YYYY-MM-DD hh:mm', //æ¥ææ ¼å¼ // åé符å¯ä»¥ä»»æå®ä¹ï¼è¯¥ä¾åè¡¨ç¤ºåªæ¾ç¤ºå¹´æ min: '2021-01-01', //è®¾å®æå°æ¥æä¸ºå½åæ¥æ max: '2099-06-16', //æå¤§æ¥æ type: 'datetime', festival: false, //æ¾ç¤ºèæ¥ istime: true,  //æ¯å¦æ¾ç¤ºæ¶åç§ istoday: true, //æ¯å¦æ¯ä»å¤© choose: function (datas) { //éæ©æ¥æå®æ¯çåè° // console.log("234234234234324"); // end.min = datas; //å¼å§æ¥é好åï¼éç½®ç»ææ¥çæå°æ¥æ // end.start = datas //å°ç»ææ¥çåå§å¼è®¾å®ä¸ºå¼å§æ¥ checktime(); } }); }); } if ($.trim(img) !== "") { $("#ImgMedicalRecord img").each(function (i) { $(this).attr("src", img); @@ -274,7 +365,13 @@ $("#Lavetype").val("@Model.Lavetype"); $("#SigninId").val("@ViewBag.SigninId"); }) function imgUploadCallback(files) { var fileName = ""; @@ -300,7 +397,7 @@ return fileName; }; function Save() { function Save(tongyi) { if ($("#StratTime").val() == '') { toastr.warning("å¼å§æ¥æä¸è½ä¸ºç©º"); return; @@ -316,17 +413,17 @@ return; } if ($("#Lavetype").val() == '') { toastr.warning("éåç±»åä¸è½ä¸ºç©º"); return; } $("#Tongguojujue").val(tongyi); //var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" } $.ajax({ type: "POST", @@ -336,7 +433,7 @@ async: false, data: $('form').serializeArray(), success: function (data) { if (data.Result) { // parent._afterSave(true); @@ -418,7 +515,7 @@ aaa += ' <input type="hidden" name="attachmentid" value="" /> '; aaa += ' <input type="hidden" name="Filepath" value="' + data.DataList[i].Filepath + '" /> '; aaa += ' <input type="hidden" name="Filefullname" value="' + data.DataList[i].Filefullname + '" /> '; aaa += "</div>"; fileListDisplay.append(aaa); } zhengcaioa/zhengcaioa/Views/WfApplytype/Index.cshtml
@@ -84,7 +84,7 @@ <div class="col-sm-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5> <i class="fa fa-list"></i> åèµ·æµç¨</h5>@*<div class="ibox-tools"> <h5> <i class="fa fa-list"></i> åèµ·ç³è¯·</h5>@*<div class="ibox-tools"> <a class="collapse-link" onclick="collapseBox(this);"><i class="fa fa-chevron-up" title="æå /å±å¼æç»"></i></a> </div>*@ </div> zhengcaioa/zhengcaioa/Views/WorkFlowTask/Index.cshtml
New file @@ -0,0 +1,80 @@ @{ ViewBag.Title = "WorkFlowTask"; Layout = "~/Views/Shared/_Layout_Search.cshtml"; } @section headerStyle{ <script type="text/javascript"> var Applytiye = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Applytiye))'; loseherght = 60; dataCol = [ { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, { label: 'ç³è¯·æ¶é´', name: 'ApplytimeName', labtype: 'txt', hidden: false, width: 100 }, { label: 'ç³è¯·åå·', name: 'Applyno', labtype: 'txt', hidden: false, width: 100 }, { label: 'é¨é¨', name: 'DeptName', labtype: 'txt', hidden: false, width: 100 }, { label: 'ç³è¯·äºº', name: 'CreaterName', labtype: 'txt', hidden: false, width: 100 }, { label: '请示åç§°', name: 'Content', labtype: 'txt', hidden: false, width: 100 }, { label: 'æ¥éª¤', name: 'Step', labtype: 'txt', hidden: false, width: 100 }, { label: '审æ¹', name: 'Remark', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('审æ¹','100%','100%', '" + rowObject.Deelurl + "')\" >审æ¹</a> "; } }, ]; dataUrl = "/WorkFlowTask/GetList"; searchCol = [ { label: 'ç³è¯·æ¶é´', name: 'Applytime', labtype: 'datearea', hidden: false }, { label: 'ç³è¯·åå·', name: 'Applyno', labtype: 'txt', hidden: false }, { label: 'ç³è¯·äºº', name: 'ApplyUserName', labtype: 'txt', hidden: false }, { label: 'ç³è¯·æµç¨', name: 'Applytiye', labtype: 'combox', hidden: false, data: JSON.parse(Applytiye)/*, cwidth: '5%', cccwidth: '8%' */}, ]; 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"> </script> } zhengcaioa/zhengcaioa/Views/WorkFlowTask/IndexMyApply.cshtml
New file @@ -0,0 +1,81 @@ @{ ViewBag.Title = "WorkFlowTask"; Layout = "~/Views/Shared/_Layout_Search.cshtml"; } @section headerStyle{ <script type="text/javascript"> var Applytiye = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Applytiye))'; var ShenpiStatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShenpiStatus))'; loseherght = 60; dataCol = [ { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, { label: 'ç³è¯·æ¶é´', name: 'ApplytimeName', labtype: 'txt', hidden: false, width: 100 }, { label: 'ç³è¯·åå·', name: 'Applyno', labtype: 'txt', hidden: false, width: 100 }, //{ label: 'é¨é¨', name: 'DeptName', labtype: 'txt', hidden: false, width: 100 }, //{ label: 'ç³è¯·äºº', name: 'CreaterName', labtype: 'txt', hidden: false, width: 100 }, { label: '请示åç§°', name: 'Content', labtype: 'txt', hidden: false, width: 100 }, { label: 'æ¥éª¤', name: 'Step', labtype: 'txt', hidden: false, width: 100 }, { label: 'æ¹å¤ç¶æ', name: 'ShenpiStatusName', labtype: 'txt', hidden: false, width: 100 }, { label: 'æ¥ç', name: 'Remark', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('æ¥ç','100%','100%', '" + rowObject.Deelurl + "')\" >æ¥ç</a> "; } }, ]; dataUrl = "/WorkFlowTask/GetListMyApply"; searchCol = [ { label: 'ç³è¯·æ¶é´', name: 'Applytime', labtype: 'datearea', hidden: false }, { label: 'ç³è¯·åå·', name: 'Applyno', labtype: 'txt', hidden: false }, { label: 'ç³è¯·æµç¨', name: 'Applytiye', labtype: 'combox', hidden: false, data: JSON.parse(Applytiye)/*, cwidth: '5%', cccwidth: '8%' */ }, { label: 'æ¹å¤ç¶æ', name: 'ShenpiStatus', labtype: 'combox', hidden: false, data: JSON.parse(ShenpiStatus)/*, cwidth: '5%', cccwidth: '8%' */ }, ]; 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"> </script> } zhengcaioa/zhengcaioa/Views/WorkFlowTask/IndexYiBan.cshtml
New file @@ -0,0 +1,79 @@ @{ ViewBag.Title = "WorkFlowTask"; Layout = "~/Views/Shared/_Layout_Search.cshtml"; } @section headerStyle{ <script type="text/javascript"> var Applytiye = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Applytiye))'; loseherght = 60; dataCol = [ { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, { label: 'ç³è¯·æ¶é´', name: 'ApplytimeName', labtype: 'txt', hidden: false, width: 100 }, { label: 'ç³è¯·åå·', name: 'Applyno', labtype: 'txt', hidden: false, width: 100 }, { label: 'é¨é¨', name: 'DeptName', labtype: 'txt', hidden: false, width: 100 }, { label: 'ç³è¯·äºº', name: 'CreaterName', labtype: 'txt', hidden: false, width: 100 }, { label: '请示åç§°', name: 'Content', labtype: 'txt', hidden: false, width: 100 }, { label: 'æ¥éª¤', name: 'Step', labtype: 'txt', hidden: false, width: 100 }, { label: 'æ¥ç', name: 'Remark', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('æ¥ç','100%','100%', '" + rowObject.Deelurl + "')\" >æ¥ç</a> "; } }, ]; dataUrl = "/WorkFlowTask/GetListYiBan"; searchCol = [ { label: 'ç³è¯·æ¶é´', name: 'Applytime', labtype: 'datearea', hidden: false }, { label: 'ç³è¯·åå·', name: 'Applyno', labtype: 'txt', hidden: false }, { label: 'ç³è¯·äºº', name: 'ApplyUserName', labtype: 'txt', hidden: false }, { label: 'ç³è¯·æµç¨', name: 'Applytiye', labtype: 'combox', hidden: false, data: JSON.parse(Applytiye)/*, cwidth: '5%', cccwidth: '8%' */}, ]; 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"> </script> } ±íÐÞ¸Ä.sql
@@ -1,3 +1,42 @@ USE [zhengcaioa] GO ALTER TABLE [dbo].[wf_run_process] ADD [deelurl] [nvarchar](500) NULL; GO ALTER TABLE [dbo].[IntentionCustomer] ADD [Yixiangtime] [datetime] NULL; GO ALTER TABLE [dbo].[IntentionCustomer] ADD [Yixiang] [nvarchar](50) NULL; GO ALTER TABLE [dbo].[IntentionCustomer] ADD [dianxiaozhuanyuan] [nvarchar](50) NULL; GO ALTER TABLE [dbo].[IntentionCustomer] ADD [zuijinzhuizongtime] [datetime] NULL; GO USE [zhengcaioa] GO