| | |
| | | private readonly ICooperOrderService _cooperOrderService; |
| | | private readonly IFiAccountService _fiAccountService; |
| | | private readonly IFiAccountRecordService _iFiAccountRecordService; |
| | | private readonly IAreaService _iAreaService; |
| | | public ExpertController(ILogger<ExpertController> logger, IExpertService expertService, IProjectService projectService, ILiaotianService liaotianService, IUserService userService |
| | | , IFiSubjectService ifiSubjectService, ICooperOrderService cooperOrderService, IFiAccountService fiAccountService, IFiAccountRecordService iFiAccountRecordService) |
| | | , IFiSubjectService ifiSubjectService, ICooperOrderService cooperOrderService, IFiAccountService fiAccountService, IFiAccountRecordService iFiAccountRecordService |
| | | , IAreaService iAreaService) |
| | | { |
| | | _logger = logger; |
| | | _expertService = expertService; |
| | |
| | | _cooperOrderService = cooperOrderService; |
| | | _fiAccountService = fiAccountService; |
| | | _iFiAccountRecordService = iFiAccountRecordService; |
| | | _iAreaService = iAreaService; |
| | | } |
| | | [CheckLogin] |
| | | public IActionResult Index() |
| | |
| | | |
| | | |
| | | ViewBag.users = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList(); |
| | | ViewBag.YearJiou = _liaotianService.GetSYScode("experts", "year_jiou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | return View(); |
| | | } |
| | | |
| | | |
| | | #region 编辑 |
| | | [CheckLogin] |
| | | public ActionResult Edit(string id = null) |
| | | public ActionResult Edit(string id = null, string Province = null, string City = null) |
| | | { |
| | | |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | |
| | | } |
| | | else |
| | | { |
| | | if (string.IsNullOrEmpty(Province)) |
| | | { |
| | | expertDTO.Province = "510000"; |
| | | } |
| | | else |
| | | { |
| | | expertDTO.Province = Province; |
| | | } |
| | | if (string.IsNullOrEmpty(City)) |
| | | { |
| | | expertDTO.City = "510100"; |
| | | } |
| | | else |
| | | { |
| | | expertDTO.City = City; |
| | | } |
| | | expertDTO.ExpertType = "4"; |
| | | expertDTO.Level = "1"; |
| | | expertDTO.CertiNumber = "SC"; |
| | | expertDTO.InfoSource = "01"; |
| | | expertDTO.Sex = "1"; |
| | | expertDTO.YearJiou = "1"; |
| | | } |
| | | // var sheng = _projectService.Getsheng(); |
| | | |
| | |
| | | |
| | | ViewBag.Province = _projectService.Getsheng();//.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); |
| | | ViewBag.City = _projectService.Getshi(expertDTO.Province);//.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); |
| | | ViewBag.YearJiou = _liaotianService.GetSYScode("experts", "year_jiou");//.Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | ViewData.Model = expertDTO; |
| | | return View(); |
| | | } |
| | |
| | | return new JsonResult(resultEntity); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 判断身份证是否重复 |
| | | /// </summary> |
| | | /// <param name="shengid">省id</param> |
| | | /// <returns></returns> |
| | | /// |
| | | [CheckLogin] |
| | | public string IdCardChongfu(string IdCard = "",string Id = "") |
| | | { |
| | | ResultEntity resultEntity = _expertService.IdCardChongfu(IdCard, Id); |
| | | |
| | | return JsonConvert.SerializeObject(resultEntity); |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 判断专家证是否重复 |
| | | /// </summary> |
| | | /// <param name="shengid">省id</param> |
| | | /// <returns></returns> |
| | | /// |
| | | [CheckLogin] |
| | | public string CertiNumberChongfu(string CertiNumber = "", string Id = "") |
| | | { |
| | | ResultEntity resultEntity = _expertService.CertiNumberChongfu(CertiNumber, Id); |
| | | if (resultEntity.Result) |
| | | { |
| | | //拆解专家证号 |
| | | |
| | | var CertiNumber11 = CertiNumber.Replace("SC", ""); |
| | | var sysCodeDtls = _liaotianService.GetSYScode("experts", "City"); |
| | | |
| | | var chengshis = sysCodeDtls.Where(x => CertiNumber11.StartsWith(x.CodeSn)).ToList(); |
| | | if (chengshis.Count > 0) |
| | | { |
| | | var areaDTOs = _iAreaService.GetList(); |
| | | |
| | | var chengshi = areaDTOs.Where(x => x.Name == chengshis[0].Comments).FirstOrDefault(); |
| | | if (chengshi != null) |
| | | { |
| | | resultEntity.Message = chengshi.CodeId; |
| | | resultEntity.Remark = chengshi.ParentId; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | return JsonConvert.SerializeObject(resultEntity); |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 判断电话是否重复 |
| | | /// </summary> |
| | | /// <param name="shengid">省id</param> |
| | | /// <returns></returns> |
| | | /// |
| | | [CheckLogin] |
| | | public string Phone1Chongfu(string Phone1 = "", string Id = "") |
| | | { |
| | | ResultEntity resultEntity = _expertService.Phone1Chongfu(Phone1, Id); |
| | | |
| | | return JsonConvert.SerializeObject(resultEntity); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |