| | |
| | | List<LiaotianElasticsearchDTO> liaotianElasticsearchDTOs = new List<LiaotianElasticsearchDTO>(); |
| | | |
| | | string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | | string url = $"{api_domain}/liaotian/person/_search"; |
| | | string url = $"{api_domain}/liaotian/_doc/_search"; |
| | | |
| | | string question = info; |
| | | |
| | |
| | | foreach (var liaotianDTO in liaotianDTOs) |
| | | { |
| | | string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | | string url = $"{api_domain}/liaotian/person/" + liaotianDTO.Id; |
| | | string url = $"{api_domain}/liaotian/_doc/" + liaotianDTO.Id; |
| | | |
| | | LiaotianElasticsearchDTO liaotianElasticsearchDTO = new LiaotianElasticsearchDTO(); |
| | | liaotianElasticsearchDTO.id = liaotianDTO.Id; |
| | |
| | | [CheckLogin] |
| | | public string GetLiaotianList(LiaotianDTOSearch search) |
| | | { |
| | | |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | search.ShouCangCreater = curentuser.Id; |
| | | //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); |
| | | return JsonConvert.SerializeObject(_liaotianService.SearchByPaging(search)); |
| | | } |
| | |
| | | if (!String.IsNullOrEmpty(id)) |
| | | { |
| | | liaotianDTO = _liaotianService.GetLiaotianEntity(id); |
| | | var liaotianShoucangDTOs = _liaotianService.getListLiaotianShoucang(curentuser.Id, id); |
| | | if(liaotianShoucangDTOs!=null&& liaotianShoucangDTOs.Count > 0) |
| | | { |
| | | liaotianDTO.ShouCangStatus = "A"; |
| | | } |
| | | else |
| | | { |
| | | liaotianDTO.ShouCangStatus = "D"; |
| | | |
| | | } |
| | | } |
| | | ViewData.Model = liaotianDTO; |
| | | |
| | |
| | | ViewData["questiontype"] = _liaotianService.GetSYScode("Liaotian", "questiontype"); |
| | | |
| | | ViewData["problemtype"] = _liaotianService.GetSYScode("Liaotian", "problemtype").Where(x=>x.Contents == liaotianDTO.Questiontype).ToList(); |
| | | |
| | | |
| | | return View(); |
| | | } |
| | |
| | | [CheckLogin] |
| | | public async Task<string> SaveAsync(LiaotianDTO data) |
| | | { |
| | | |
| | | |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | resultEntity.Result = false; |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | data.RecStatus = "A"; |
| | | data.Clientid = "D"; |
| | | data.Shenheer = null; |
| | | data.Shenhetime = null; |
| | | if (String.IsNullOrEmpty(data.Id)) |
| | | { |
| | | data.Creater= curentuser.Id; |
| | |
| | | { |
| | | |
| | | string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | | string url = $"{api_domain}/liaotian/person/" + data.Id; |
| | | string url = $"{api_domain}/liaotian/_doc/" + data.Id; |
| | | //string requestJson = "{\"id\": \"" + Id + "\",\"question\": \"" + data.Question + "\",\"anwser\": \"" + data.Anwser + "\"}"; |
| | | try |
| | | { |
| | |
| | | |
| | | resultEntity = _liaotianService.saveLiaotian(data); |
| | | |
| | | |
| | | |
| | | |
| | | //string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | | //string url = $"{api_domain}/liaotian/person/"+ data.Id; |
| | | //string url = $"{api_domain}/liaotian/_doc/"+ data.Id; |
| | | //LiaotianElasticsearchDTO liaotianElasticsearchDTO = new LiaotianElasticsearchDTO(); |
| | | //liaotianElasticsearchDTO.id = data.Id; |
| | | //liaotianElasticsearchDTO.question = data.Question; |
| | |
| | | return JsonConvert.SerializeObject(resultEntity); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 提交并审核 |
| | | /// </summary> |
| | | /// <param name="data">岗位实体类对象</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [CheckLogin] |
| | | public IActionResult ShouCang(LiaotianDTO data) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | resultEntity.Result = false; |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | |
| | | var liaotianShoucangDTOs = _liaotianService.getListLiaotianShoucang(curentuser.Id, data.Id); |
| | | if (data.ShouCangStatus == "A") |
| | | { |
| | | if (liaotianShoucangDTOs == null || liaotianShoucangDTOs.Count == 0) |
| | | { |
| | | LiaotianShoucangDTO liaotianShoucangDTO = new LiaotianShoucangDTO(); |
| | | liaotianShoucangDTO.LiaotianId = data.Id; |
| | | liaotianShoucangDTO.RecStatus = "A"; |
| | | liaotianShoucangDTO.Creater = curentuser.Id; |
| | | liaotianShoucangDTO.Createtime = DateTime.Now; |
| | | liaotianShoucangDTO.Modifier = curentuser.Id; |
| | | liaotianShoucangDTO.Modifytime = DateTime.Now; |
| | | resultEntity = _liaotianService.saveLiaotianShoucang(liaotianShoucangDTO); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (liaotianShoucangDTOs != null || liaotianShoucangDTOs.Count > 0) |
| | | { |
| | | foreach (var liaotianShoucangDTO in liaotianShoucangDTOs) |
| | | { |
| | | resultEntity = _liaotianService.ModifyStatusLiaotianShoucang(liaotianShoucangDTO.Id, curentuser.Id); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return new JsonResult(resultEntity); ; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 提交并审核 |
| | |
| | | [CheckLogin] |
| | | public async Task<string> TijiaobingshenheAsync(LiaotianDTO data) |
| | | { |
| | | |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | resultEntity.Result = false; |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | data.RecStatus = "A"; |
| | | data.Clientid = "A"; |
| | | data.Shenheer = curentuser.Id; |
| | | data.Shenhetime = DateTime.Now; |
| | | if (String.IsNullOrEmpty(data.Id)) |
| | | { |
| | | data.Creater = curentuser.Id; |
| | |
| | | |
| | | resultEntity = _liaotianService.saveLiaotian(data); |
| | | |
| | | |
| | | |
| | | string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | | string url = $"{api_domain}/liaotian/person/" + data.Id; |
| | | string url = $"{api_domain}/liaotian/_doc/" + data.Id; |
| | | LiaotianElasticsearchDTO liaotianElasticsearchDTO = new LiaotianElasticsearchDTO(); |
| | | liaotianElasticsearchDTO.id = data.Id; |
| | | liaotianElasticsearchDTO.question = data.Question; |
| | |
| | | |
| | | |
| | | LiaotianDTO data = _liaotianService.GetLiaotianEntity(Id); |
| | | |
| | | data.Shenheer = curentuser.Id; |
| | | data.Shenhetime = DateTime.Now; |
| | | data.Clientid = "A"; |
| | | data.Modifier = curentuser.Id; |
| | | data.Modifytime = DateTime.Now; |
| | | resultEntity = _liaotianService.saveLiaotian(data); |
| | | |
| | | string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | | string url = $"{api_domain}/liaotian/person/" + data.Id; |
| | | string url = $"{api_domain}/liaotian/_doc/" + data.Id; |
| | | LiaotianElasticsearchDTO liaotianElasticsearchDTO = new LiaotianElasticsearchDTO(); |
| | | liaotianElasticsearchDTO.id = data.Id; |
| | | liaotianElasticsearchDTO.question = data.Question; |
| | |
| | | ResultEntity resultEntity = _liaotianService.ModifyStatus(Id, curentuser.Id); |
| | | |
| | | string api_domain = _configuration.GetSection("Elasticsearchurl").Value; |
| | | string url = $"{api_domain}/liaotian/person/" + Id; |
| | | string url = $"{api_domain}/liaotian/_doc/" + Id; |
| | | //string requestJson = "{\"id\": \"" + Id + "\",\"question\": \"" + data.Question + "\",\"anwser\": \"" + data.Anwser + "\"}"; |
| | | try |
| | | { |