From 15eb82df2d6ec539e9d4245bfe08d531e8eb6379 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期日, 27 四月 2025 14:33:26 +0800 Subject: [PATCH] 修改培训订单占多个座位 --- zhengcaioa/zhengcaioa/Controllers/ProjectController.cs | 576 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 570 insertions(+), 6 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs index 7f7a075..a2d268f 100644 --- a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs @@ -17,6 +17,9 @@ using System.IdentityModel.Tokens.Jwt; using CommonToolsCore; using System.Transactions; +using DTO.WebCrawler; +using System.Net.Http.Headers; +using Microsoft.Extensions.Configuration; namespace zhengcaioa.Controllers { @@ -32,13 +35,14 @@ private readonly IFiOrderrecievemoneyService _fiOrderrecievemoneyService; private readonly IAreaService _areaService; private readonly IPltPageService _pltPageService; - + private readonly IConfiguration _configuration; public ProjectController(ILogger<ProjectController> logger, IProjectService projectService, ILiaotianService liaotianService,IIntentionCustomerService intentionCustomerService, IUserService userService , ICooperatecustomCustomerService cooperatecustomCustomerService , ISysBaimingdanService sysBaimingdanService , IFiOrderrecievemoneyService fiOrderrecievemoneyService , IAreaService areaService - , IPltPageService pltPageService) + , IPltPageService pltPageService + , IConfiguration configuration) { _logger = logger; _projectService = projectService; @@ -50,6 +54,7 @@ _fiOrderrecievemoneyService = fiOrderrecievemoneyService; _areaService = areaService; _pltPageService = pltPageService; + _configuration = configuration; } [CheckLogin] public IActionResult Index() @@ -386,8 +391,11 @@ ViewBag.flbx = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); ViewBag.ShiFouyReasonname = _liaotianService.GetSYScode("Project", "ShiFouyReasonname").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); - ViewBag.Baomingtimebegin = DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd"); + ViewBag.Baomingtimebegin = DateTime.Now.AddMonths(-6).ToString("yyyy-MM-dd"); ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd"); + + + ViewBag.wanshan = _liaotianService.GetSYScode("Project", "wanshan").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); return View(); } @@ -452,6 +460,15 @@ } } + var feibiaoliyous = cDocumet.QuerySelectorAll("div").Where(m => m.Id == "_notice_content_reason-reason"); + if (feibiaoliyous != null && feibiaoliyous.ToList().Count > 0) + { + var feibiaoliyou = feibiaoliyous.First(); + projectDTO.Fbyy = feibiaoliyou.TextContent.Replace("\n", "").Replace("\t", ""); + projectDTO.Fblx = "缁堟閲囪喘"; + } + + var Numbers = cDocumet.QuerySelectorAll("h4"); foreach(var Number in Numbers ) { @@ -479,7 +496,15 @@ { var Fbyy = Number.QuerySelector("span"); projectDTO.Fbyy = Fbyy.TextContent.Trim(); + projectDTO.Fblx = "鍋滄璇勫"; } + if (Number != null && Number.TextContent.Contains("缁堟鍘熷洜")) + { + var Fbyy = Number.QuerySelector("span"); + projectDTO.Fbyy = Fbyy.TextContent.Trim(); + projectDTO.Fblx = "鍋滄璇勫"; + } + } var Caigourennames = cDocumet.QuerySelectorAll("span").Where(m => m.Id == "_notice_content_noticePurchase-purchaserOrgName"); if (Caigourennames != null && Caigourennames.ToList().Count > 0) @@ -567,6 +592,14 @@ } projectDTO.StartTimestr = timestr; } + + var tittle = document.QuerySelector("h1"); + if (tittle != null) + { + string tittlestr = tittle.TextContent; + + projectDTO.Name = tittlestr; + } var table = document.QuerySelector("table").QuerySelectorAll("tr"); if (table != null) { @@ -587,14 +620,34 @@ } } - else if (select != null && select.TextContent.IndexOf("椤圭洰鍚嶇О") >= 0) + //else if (select != null && select.TextContent.IndexOf("椤圭洰鍚嶇О") >= 0) + //{ + // if (table[i + 1] != null) + // { + // var td1 = table[i + 1].QuerySelector("td"); + // if (td1 != null) + // { + // projectDTO.Name = table[i + 1].QuerySelector("td").TextContent.Trim();//OuterHtml + // } + // } + + //} + else if (select != null && select.TextContent.IndexOf("椤圭洰缁堟鐨勫師鍥�") >= 0) { if (table[i + 1] != null) { var td1 = table[i + 1].QuerySelector("td"); if (td1 != null) { - projectDTO.Name = table[i + 1].QuerySelector("td").TextContent.Trim();//OuterHtml + projectDTO.Fbyy = table[i + 1].QuerySelector("td").TextContent.Trim();//OuterHtml + if (projectDTO.Fbyy.IndexOf("缁堟")<0) + { + projectDTO.Fblx = "鍋滄璇勫"; + } + else + { + projectDTO.Fblx = "缁堟閲囪喘"; + } } } @@ -919,7 +972,7 @@ { //string SecurityKey = _configuration.GetSection("SecurityKey").Value; var keyId = headers["Authorization"].FirstOrDefault(); - if (string.IsNullOrEmpty("keyId")) + if (string.IsNullOrEmpty(keyId)) { returnMsg.code = 2; returnMsg.error = "娌℃湁鑾峰彇鍒版潈闄愪俊鎭�"; @@ -1131,5 +1184,516 @@ return new JsonResult(returnMsg); } + + + + /// <summary> + /// 璐ㄧ枒 + /// </summary> + /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param> + /// <returns></returns> + /// + [CheckLogin] + public IActionResult Zhiyi(string projectid, string mingid, string type) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + ViewData["projectid"] = projectid; + ViewData["mingid"] = mingid; + ViewData["type"] = type; + var zhiyistatus = ""; + var zhiyishijian = ""; + var zhiyichengli = ""; + + var projectDTO = _projectService.GetLiaotianEntity(projectid); + if (type == "1") + { + var projectzhongbiaoDTO = projectDTO.Projectzhongbiaos.Where(x => x.ZhongbiaoId == mingid).FirstOrDefault(); + if (projectzhongbiaoDTO != null) + { + zhiyistatus = projectzhongbiaoDTO.ZbZhiyistatus; + zhiyishijian = projectzhongbiaoDTO.ZbZhiyishijian.HasValue? projectzhongbiaoDTO.ZbZhiyishijian.Value.ToString("yyyy-MM-dd"):""; + zhiyichengli = projectzhongbiaoDTO.ZbZhiyichengli; + } + } + else if (type == "2") + { + zhiyistatus = projectDTO.DehxZhiyistatus; + zhiyishijian = projectDTO.DehxZhiyishijian.HasValue ? projectDTO.DehxZhiyishijian.Value.ToString("yyyy-MM-dd") : ""; + zhiyichengli = projectDTO.DehxZhiyichengli; + } + else if (type == "3") + { + zhiyistatus = projectDTO.DshxZhiyistatus; + zhiyishijian = projectDTO.DshxZhiyishijian.HasValue ? projectDTO.DshxZhiyishijian.Value.ToString("yyyy-MM-dd") : ""; + zhiyichengli = projectDTO.DshxZhiyichengli; + } + else if (type == "4") + { + var projectyouxiao = projectDTO.Projectyouxiaos.Where(x => x.YouxiaoId == mingid).FirstOrDefault(); + if (projectyouxiao != null) + { + zhiyistatus = projectyouxiao.YxZhiyistatus; + zhiyishijian = projectyouxiao.YxZhiyishijian.HasValue ? projectyouxiao.YxZhiyishijian.Value.ToString("yyyy-MM-dd") : ""; + zhiyichengli = projectyouxiao.YxZhiyichengli; + } + } + else if (type == "5") + { + var projectreason = projectDTO.projectreasons.Where(x => x.ReasonId == mingid).FirstOrDefault(); + if (projectreason != null) + { + zhiyistatus = projectreason.WxZhiyistatus; + zhiyishijian = projectreason.WxZhiyishijian.HasValue ? projectreason.WxZhiyishijian.Value.ToString("yyyy-MM-dd") : ""; + zhiyichengli = projectreason.WxZhiyichengli; + } + } + + + if (string.IsNullOrWhiteSpace(zhiyishijian)) + { + zhiyishijian = DateTime.Now.ToString("yyyy-MM-dd"); + } + + ViewData["zhiyistatus"] = zhiyistatus; + ViewData["zhiyishijian"] = zhiyishijian; + ViewData["zhiyichengli"] = zhiyichengli; + ViewData.Model = new ProjectDTO(); + + return View(); + + + } + + + [CheckLogin] + public IActionResult Zhiyibaocun(ProjectDTO dto) + { + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = true; + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + + + + resultEntity = _projectService.savezhiyi("A", dto.Zhiyishijian, dto.Zhiyichengli, dto.Id, dto.MingxiId,dto.Type); + + return new JsonResult(resultEntity); + } + + /// <summary> + /// 鎶曡瘔 + /// </summary> + /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param> + /// <returns></returns> + /// + [CheckLogin] + public IActionResult Tousu(string projectid, string mingid, string type) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + ViewData["projectid"] = projectid; + ViewData["mingid"] = mingid; + ViewData["type"] = type; + var tousustatus = ""; + var tousushijian = ""; + var tousuchengli = ""; + + var projectDTO = _projectService.GetLiaotianEntity(projectid); + if (type == "1") + { + var projectzhongbiaoDTO = projectDTO.Projectzhongbiaos.Where(x => x.ZhongbiaoId == mingid).FirstOrDefault(); + if (projectzhongbiaoDTO != null) + { + tousustatus = projectzhongbiaoDTO.ZbTousustatus; + tousushijian = projectzhongbiaoDTO.ZbTousushijian.HasValue ? projectzhongbiaoDTO.ZbTousushijian.Value.ToString("yyyy-MM-dd") : ""; ; + tousuchengli = projectzhongbiaoDTO.ZbTousuchengli; + } + } + else if (type == "2") + { + tousustatus = projectDTO.DehxTousustatus; + tousushijian = projectDTO.DehxTousushijian.HasValue ? projectDTO.DehxTousushijian.Value.ToString("yyyy-MM-dd") : ""; ; + tousuchengli = projectDTO.DehxTousuchengli; + } + else if (type == "3") + { + tousustatus = projectDTO.DshxTousustatus; + tousushijian = projectDTO.DshxTousushijian.HasValue ? projectDTO.DshxTousushijian.Value.ToString("yyyy-MM-dd") : ""; ; + tousuchengli = projectDTO.DshxTousuchengli; + } + else if (type == "4") + { + var projectyouxiao = projectDTO.Projectyouxiaos.Where(x => x.YouxiaoId == mingid).FirstOrDefault(); + if (projectyouxiao != null) + { + tousustatus = projectyouxiao.YxTousustatus; + tousushijian = projectyouxiao.YxTousushijian.HasValue ? projectyouxiao.YxTousushijian.Value.ToString("yyyy-MM-dd") : ""; ; + tousuchengli = projectyouxiao.YxTousuchengli; + } + } + else if (type == "5") + { + var projectreason = projectDTO.projectreasons.Where(x => x.ReasonId == mingid).FirstOrDefault(); + if (projectreason != null) + { + tousustatus = projectreason.WxTousustatus; + tousushijian = projectreason.WxTousushijian.HasValue ? projectreason.WxTousushijian.Value.ToString("yyyy-MM-dd") : ""; ; + tousuchengli = projectreason.WxTousuchengli; + } + } + + + if (string.IsNullOrWhiteSpace(tousushijian)) + { + tousushijian = DateTime.Now.ToString("yyyy-MM-dd"); + } + + ViewData["tousustatus"] = tousustatus; + ViewData["tousushijian"] = tousushijian; + ViewData["tousuchengli"] = tousuchengli; + ViewData.Model = new ProjectDTO(); + + return View(); + + + } + + + [CheckLogin] + public IActionResult Tousubaocun(ProjectDTO dto) + { + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = true; + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + + + + resultEntity = _projectService.savetousu("A", dto.Tousushijian, dto.Tousuchengli, dto.Id, dto.MingxiId, dto.Type); + + return new JsonResult(resultEntity); + } + + + + + [CheckLogin] + public IActionResult indexZhengfuProject() + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + List<ActionEntity> actionlist = new List<ActionEntity>(); + //ActionEntity actionEntity = new ActionEntity(); + //actionEntity.OpenType = 0; + //actionEntity.ActionUrl = ""; + //actionEntity.ActionFun = "Search"; + //actionEntity.PageIco = "fa fa-search"; + //actionEntity.ActionName = "鏌ヨ"; + //actionlist.Add(actionEntity); + //ActionEntity actionEntity1 = new ActionEntity(); + //actionEntity1.OpenType = 0; + //actionEntity1.ActionUrl = ""; + //actionEntity1.ActionFun = "Add"; + //actionEntity1.PageIco = "fa fa-plus"; + //actionEntity1.ActionName = "鏂板"; + //actionlist.Add(actionEntity1); + var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/Project/indexZhengfuProject"); + var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList(); + if (pageEntities1.Count(x => x.PageShortcut == "Search") <= 0) + { + ActionEntity actionEntity = new ActionEntity(); + actionEntity.OpenType = 0; + actionEntity.ActionUrl = ""; + actionEntity.ActionFun = "Search"; + actionEntity.PageIco = "fa fa-search"; + actionEntity.ActionName = "鏌ヨ"; + actionlist.Add(actionEntity); + + ViewData["Creater11"] = curentuser.Id; + } + foreach (var pageEntity in pageEntities1) + { + ActionEntity actionEntity1 = new ActionEntity(); + actionEntity1.OpenType = pageEntity.OpenType; + actionEntity1.ActionUrl = ""; + actionEntity1.ActionFun = pageEntity.PageShortcut; + actionEntity1.PageIco = pageEntity.PageIco; + actionEntity1.ActionName = pageEntity.PageName; + actionlist.Add(actionEntity1); + } + + ViewData["ActionInfo"] = actionlist; + ViewBag.ProjectDropDown = _projectService.AllcgfsDropDown().Select(x => new { code = x.Value, label = x.Text }).ToList(); + //ViewBag.flbx = _liaotianService.GetSYScode("Project", "flbx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); + + ViewBag.Creater = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList(); + + + + ViewBag.gglx = _liaotianService.GetSYScode("zhengfu_Project", "gglx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + ViewBag.cgfs = _liaotianService.GetSYScode("zhengfu_Project", "cgfs").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + + + ViewBag.Baomingtimebegin = DateTime.Now.AddMonths(-6).ToString("yyyy-MM-dd"); + ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd"); + + + + + return View(); + } + + [CheckLogin] + public string GetZhengfuProjectList(ZhengfuProjectDTOSearch search) + { + //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); + return JsonConvert.SerializeObject(_projectService.SearchByPagingCaigougonggao(search)); + } + + + + public IActionResult ADDZhengfuProject(string id = null) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/Project/indexZhengfuProject"); + var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList(); + ViewData["ActionInfo2"] = pageEntities2; + ZhengfuProjectDTO zhengfuProjectDTO = new ZhengfuProjectDTO(); + if (!String.IsNullOrEmpty(id)) + { + zhengfuProjectDTO = _projectService.GetZhengfuProjectDTO(id); + + + + + + } + else + { + zhengfuProjectDTO.Sheng = "510000"; + zhengfuProjectDTO.City = "510100"; + zhengfuProjectDTO.RegionCode = "510107"; + zhengfuProjectDTO.NoticeTime = DateTime.Now; + zhengfuProjectDTO.Gglx = "02"; + //zhengfuProjectDTO.NoticeTime = DateTime.Now; + //zhengfuProjectDTO.NoticeTime = DateTime.Now; + } + + + var areaDTOs = _projectService.Getsheng().ToList(); + foreach (var areaDTO in areaDTOs) + { + if (areaDTO.CodeId == "510000") + { + areaDTOs.Remove(areaDTO); + break; + } + } + var areaDTOsic = new Area(); + areaDTOsic.CodeId = "510000"; + areaDTOsic.Name = "鍥涘窛鐪�"; + areaDTOsic.ParentId = "0 "; + areaDTOs.Insert(1, areaDTOsic); + var sheng = areaDTOs; + var shi = _projectService.Getshi(zhengfuProjectDTO.Sheng); + var quxian = _projectService.Getquxian(zhengfuProjectDTO.City); + + ViewBag.gglx = _liaotianService.GetSYScode("zhengfu_Project", "gglx"); + ViewBag.cgfs = _liaotianService.GetSYScode("zhengfu_Project", "cgfs"); + ViewBag.hyfl = _liaotianService.GetSYScode("CooperatecustomCustomer", "hyfl"); + + ViewBag.sheng = sheng; + ViewBag.shi = shi; + ViewBag.quxian = quxian; + ViewData.Model = zhengfuProjectDTO; + return View(); + } + + + + /// <summary> + /// 淇濆瓨 + /// </summary> + /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param> + /// <returns></returns> + /// + [CheckLogin] + [HttpPost] + public string SaveZhengfuProject(ZhengfuProjectDTO data) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + data.RecStatus = "A"; + if (String.IsNullOrEmpty(data.Id)) + { + data.Creater = curentuser.Id; + data.Createtime = DateTime.Now; + } + if (string.IsNullOrWhiteSpace(data.Content)) + { + data.Content = data.Content1; + } + data.Shorttitle = data.Title; + data.Modifier = curentuser.Id; + data.Modifytime = DateTime.Now; + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = false; + + resultEntity = _projectService.saveZhengfuProjectDTO(data); + if (resultEntity.Result) + { + var areaDTOs = _areaService.GetList(); + + string api_domain = _configuration.GetSection("Elasticsearchurl").Value; + string url = $"{api_domain}/webcrawler/_doc/" + data.Id; + string result = string.Empty; + Uri postUrl = new Uri(url); + eswebcrawler eswebcrawler1 = new eswebcrawler(); + eswebcrawler1.Id = data.Id; + eswebcrawler1.noticeTime = data.NoticeTime.ToString("yyyy-MM-dd HH:mm:ss"); + eswebcrawler1.openTenderTime = data.OpenTenderTime.HasValue ? data.OpenTenderTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : null; + eswebcrawler1.sheng = data.Sheng; + if (!string.IsNullOrWhiteSpace(data.Sheng)) + { + var areaDTO = areaDTOs.Where(x => x.CodeId == data.Sheng).FirstOrDefault(); + if (areaDTO != null) + { + eswebcrawler1.shengName = areaDTO.Name; + } + } + + eswebcrawler1.city = data.City; + if (!string.IsNullOrWhiteSpace(data.City)) + { + var areaDTO = areaDTOs.Where(x => x.CodeId == data.City).FirstOrDefault(); + if (areaDTO != null) + { + eswebcrawler1.cityName = areaDTO.Name; + } + } + eswebcrawler1.regionCode = data.RegionCode; + if (!string.IsNullOrWhiteSpace(data.RegionCode)) + { + var areaDTO = areaDTOs.Where(x => x.CodeId == data.RegionCode).FirstOrDefault(); + if (areaDTO != null) + { + eswebcrawler1.regionName = areaDTO.Name; + } + } + + eswebcrawler1.cgfs = data.Cgfs; + if (!string.IsNullOrWhiteSpace(data.Cgfs)) + { + var sysCodeDtl = _liaotianService.GetSYScode("zhengfu_Project", "cgfs").Where(x => x.CodeSn == data.Cgfs).FirstOrDefault(); + if (sysCodeDtl != null) + { + eswebcrawler1.cgfsName = sysCodeDtl.Comments; + } + } + + + eswebcrawler1.gglx = data.Gglx; + if (!string.IsNullOrWhiteSpace(data.Gglx)) + { + var sysCodeDtl = _liaotianService.GetSYScode("zhengfu_Project", "gglx").Where(x => x.CodeSn == data.Gglx).FirstOrDefault(); + if (sysCodeDtl != null) + { + eswebcrawler1.gglxName = sysCodeDtl.Comments; + } + } + eswebcrawler1.openTenderCode = data.OpenTenderCode; + eswebcrawler1.title = data.Title; + eswebcrawler1.shorttitle = data.Shorttitle; + eswebcrawler1.pageurl = data.Pageurl; + eswebcrawler1.pingmu = data.Pingmu; + eswebcrawler1.pingmuName = ""; + eswebcrawler1.purchaser = data.Purchaser; + eswebcrawler1.budget = data.Budget.HasValue ? data.Budget.Value.ToString() : ""; + eswebcrawler1.agency = data.Agency; + eswebcrawler1.agencyCode = data.AgencyCode; + eswebcrawler1.modifyTime = data.Modifytime.ToString("yyyy-MM-dd HH:mm:ss"); + + string requestJson = JsonConvert.SerializeObject(eswebcrawler1); + + using (HttpContent httpContent = new StringContent(requestJson)) + { + httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); + using (HttpClient httpClient = new HttpClient()) + { + httpClient.Timeout = TimeSpan.FromSeconds(60); + HttpResponseMessage responseMessage = httpClient.PutAsync(postUrl, httpContent).Result; + result = responseMessage.Content.ReadAsStringAsync().Result; + } + + } + + Newtonsoft.Json.Linq.JObject jobject = (Newtonsoft.Json.Linq.JObject)JsonConvert.DeserializeObject(result); + + if (jobject["error"] == null && jobject["_shards"]["successful"].ToString() == "1") + { + + } + else + { + resultEntity.Result = false; + resultEntity.Message = "淇濆瓨鏁版嵁搴撳嚭閿欙紒"; + + } + } + + + + + + + return JsonConvert.SerializeObject(resultEntity); + } + + + /// <summary> + /// 鑾峰彇椤圭洰鏄惁宸茬粡褰曞叆 + /// </summary> + /// <param name="shengid">甯俰d</param> + /// <returns></returns> + [CheckLogin] + public string getPageurl(string Pageurl, string Id) + { + var quxian = _projectService.GetZhengfuProjectDTOByPageurl(Pageurl, Id); + + return JsonConvert.SerializeObject(quxian); + + } + + + /// <summary> + /// 鑾峰彇椤圭洰鏄惁宸茬粡褰曞叆 + /// </summary> + /// <param name="shengid">甯俰d</param> + /// <returns></returns> + [CheckLogin] + public string getTitle(string Title, string Id, DateTime? NoticeTime) + { + var quxian = _projectService.GetZhengfuProjectDTOByTitle(Title, Id, NoticeTime); + + return JsonConvert.SerializeObject(quxian); + + } } } -- Gitblit v1.9.1