| | |
| | | |
| | | namespace zhengcaioa.Controllers.Expert |
| | | { |
| | | [CheckLogin] |
| | | |
| | | public class ExpertController : Controller |
| | | { |
| | | private readonly ILogger<ExpertController> _logger; |
| | |
| | | _liaotianService = liaotianService; |
| | | _userService = userService; |
| | | } |
| | | [CheckLogin] |
| | | public IActionResult Index() |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | ViewBag.level = _liaotianService.GetSYScode("experts", "level").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | ViewBag.Province = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); |
| | | // ViewBag.City = _projectService.Getshi( ).Select(x => new { code = x.CodeId, label = x.Name }).ToList(); |
| | | ViewBag.level = _liaotianService.GetSYScode("experts", "level").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | ViewBag.ReviewItem = _liaotianService.GetSYScode("experts", "ReviewItem").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | return View(); |
| | | } |
| | | |
| | |
| | | public string GetList(ExpertDTOSearch search) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | search.ShenheStatus = "A"; |
| | | ViewData["curentuser"] = curentuser; |
| | | return JsonConvert.SerializeObject(_expertService.SearchByPaging(search)); |
| | | } |
| | |
| | | |
| | | |
| | | #region 编辑 |
| | | |
| | | [CheckLogin] |
| | | public ActionResult Edit(string id = null) |
| | | { |
| | | |
| | |
| | | ViewBag.sex = _liaotianService.GetSYScode("plt_user", "sex");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | ViewBag.expertType = _liaotianService.GetSYScode("experts", "expertType");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | ViewBag.level = _liaotianService.GetSYScode("experts", "level");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | |
| | | ViewBag.ReviewItem = _liaotianService.GetSYScode("experts", "ReviewItem");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | |
| | | |
| | | ViewBag.Province = _projectService.Getsheng();//.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); |
| | |
| | | /// <param name="data">岗位实体类对象</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | |
| | | [CheckLogin] |
| | | public string Save(ExpertDTO data) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | data.ShenheStatus = "A"; |
| | | data.ReviewItem = data.ReviewItemSelect; |
| | | data.RecStatus = "A"; |
| | | if (String.IsNullOrEmpty(data.Id)) |
| | | { |
| | |
| | | /// <param name="info">实体</param> |
| | | /// <returns></returns> |
| | | /// |
| | | |
| | | [CheckLogin] |
| | | public string Nullify(string Id = "") |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | /// <param name="data">保存推广记录</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [CheckLogin] |
| | | public string SavePromte(ExpertPromoteDTO data) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | #endregion |
| | | |
| | | #region 专家派工 |
| | | [CheckLogin] |
| | | public IActionResult ExpertOrderDispatch() |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | |
| | | return View(); |
| | | } |
| | | |
| | | [CheckLogin] |
| | | public string GetOrderList(ExpertOrderDipatchDTOSearch search) |
| | | { |
| | | return JsonConvert.SerializeObject(_expertService.SearchOrderDispatch(search)); |
| | | } |
| | | [CheckLogin] |
| | | public IActionResult Dispatch(string orderid) |
| | | { |
| | | |
| | |
| | | ViewBag.OrderId = orderid; |
| | | return View(); |
| | | } |
| | | [CheckLogin] |
| | | public string SaveDispatch(ExpertOrderDipatchDTO data) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |