From 1c4f3bce3d88557b7ddb5f0a49b4be5e91b416f1 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期四, 14 十月 2021 13:42:33 +0800 Subject: [PATCH] 专家测试--题库管理 --- zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs | 39 +++++++++++++++++++++++++++++++-------- 1 files changed, 31 insertions(+), 8 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs index f223d0c..0a10213 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs @@ -30,9 +30,11 @@ private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService; private readonly IUserService _userService; private readonly ICooperVisitService _cooperVisitService; + private readonly ICusFangwenjiluService _cusFangwenjiluService; - public CooperVisitController(ILogger<CooperVisitController> logger, IProjectService projectService, ILiaotianService liaotianService, ICooperatecustomCustomerService cooperatecustomCustomerService, IUserService userService, ICooperVisitService cooperVisitService) + public CooperVisitController(ILogger<CooperVisitController> logger, IProjectService projectService, ILiaotianService liaotianService, ICooperatecustomCustomerService cooperatecustomCustomerService, IUserService userService, ICooperVisitService cooperVisitService + , ICusFangwenjiluService cusFangwenjiluService) { _logger = logger; _projectService = projectService; @@ -40,9 +42,10 @@ _cooperatecustomCustomerService = cooperatecustomCustomerService; _userService = userService; _cooperVisitService = cooperVisitService; + _cusFangwenjiluService = cusFangwenjiluService; } - public IActionResult Index() + public IActionResult Index(string Viscustomer = "") { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; @@ -74,7 +77,7 @@ ViewBag.users = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList(); - + ViewBag.Viscustomer = Viscustomer; ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); return View(); @@ -87,7 +90,7 @@ return new JsonResult(_cooperVisitService.SearchByPaging(search)); } - public IActionResult Edit(string id = null) + public IActionResult Edit(string id = null, string Viscustomer = null) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; @@ -100,6 +103,7 @@ } else { + dto.Viscustomer = Viscustomer; dto.Vistime = DateTime.Now; } @@ -194,7 +198,7 @@ { for (int i = 0; i < result.Count; i++) { - number.Append(result[i].Phone); + number.Append(string.IsNullOrEmpty(result[i].Phone) ? result[i].Tel : result[i].Phone); customename += result[i].Name + ","; if (i != result.Count - 1) { @@ -208,13 +212,23 @@ resultEntity.Message = "鏃犺仈绯讳汉"; } - string sss = SMSHelper.PushWToUserMES(number.ToString(), neirong); + string sss = SMSHelper.PushWToUserMES(number.ToString(), neirong + " 閫�璁㈠洖N"); if (int.Parse(sss) <= 0) { resultEntity.Result = false; resultEntity.Message = "鐭俊鍙戦�佸け璐�"; - + return new JsonResult(resultEntity); } + CusFangwenjiluDTO dto = new CusFangwenjiluDTO(); + dto.Fasongfangshi = "01"; + dto.Fasongneirong = neirong; + dto.Jieshouren = baifangid; + dto.RecStatus = "A"; + dto.Creater = curentuser.Id; + dto.Modifytime = DateTime.Now; + dto.Modifier = curentuser.Id; + dto.Createtime = dto.Modifytime; + resultEntity = _cusFangwenjiluService.save(dto); _logger.LogInformation(curentuser.UserName + "鍙戦�佺煭淇$粰瀹㈡埛" + customename); return new JsonResult(resultEntity); } @@ -284,7 +298,16 @@ { return new JsonResult(resultEntity); } - + CusFangwenjiluDTO dto = new CusFangwenjiluDTO(); + dto.Fasongfangshi = "02"; + dto.Fasongneirong = neirong; + dto.Jieshouren = baifangid; + dto.RecStatus = "A"; + dto.Creater = curentuser.Id; + dto.Modifytime = DateTime.Now; + dto.Modifier = curentuser.Id; + dto.Createtime = dto.Modifytime; + resultEntity = _cusFangwenjiluService.save(dto); _logger.LogInformation(curentuser.UserName + "鍙戦�侀偖浠剁粰瀹㈡埛" + customename); return new JsonResult(resultEntity); -- Gitblit v1.9.1