From c06eb4d284a80dbee4a2d040046c37bf73dcfcd5 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 29 八月 2022 09:50:58 +0800
Subject: [PATCH] 风险代理确认订单后计算业绩
---
zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs | 292 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 263 insertions(+), 29 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs
index ef524e0..3e42b4d 100644
--- a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs
@@ -18,13 +18,15 @@
private readonly ILogger<SysCodeController> _logger;
private readonly ISysCodeService _sysCodeService;
private readonly ILiaotianService _liaotianService;
+ private readonly IPltPageService _pltPageService;
-
- public SysCodeController(ILogger<SysCodeController> logger, ISysCodeService sysCodeService, ILiaotianService liaotianService)
+ public SysCodeController(ILogger<SysCodeController> logger, ISysCodeService sysCodeService, ILiaotianService liaotianService
+ , IPltPageService pltPageService)
{
_logger = logger;
_sysCodeService = sysCodeService;
_liaotianService = liaotianService;
+ _pltPageService = pltPageService;
}
[CheckLogin]
@@ -537,13 +539,25 @@
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);
+ //ActionEntity actionEntity1 = new ActionEntity();
+ //actionEntity1.OpenType = 0;
+ //actionEntity1.ActionUrl = "";
+ //actionEntity1.ActionFun = "Add";
+ //actionEntity1.PageIco = "fa fa-plus";
+ //actionEntity1.ActionName = "鏂板";
+ //actionlist.Add(actionEntity1);
+ List<PageEntity> pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/SysCode/Indexrequestinfo");
+ var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList();
+ 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;
return View();
}
@@ -563,6 +577,28 @@
public IActionResult Editrequestinfo(string id)
+ {
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ViewData["curentuser"] = curentuser;
+
+ var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/SysCode/Indexrequestinfo");
+ var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList();
+ ViewData["ActionInfo2"] = pageEntities2;
+ SysCodeDtlEntity sysCodeDtlEntity = new SysCodeDtlEntity();
+
+
+ sysCodeDtlEntity = _sysCodeService.GetSysCodeDtlInfo(id, "t_challengeletter", "request_info");
+
+
+ ViewData.Model = sysCodeDtlEntity;
+
+
+
+
+ return View();
+ }
+
+ public IActionResult Editrequestinfozidingyi(string id)
{
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
@@ -599,13 +635,26 @@
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);
+ //ActionEntity actionEntity1 = new ActionEntity();
+ //actionEntity1.OpenType = 0;
+ //actionEntity1.ActionUrl = "";
+ //actionEntity1.ActionFun = "Add";
+ //actionEntity1.PageIco = "fa fa-plus";
+ //actionEntity1.ActionName = "鏂板";
+ //actionlist.Add(actionEntity1);
+ List<PageEntity> pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/SysCode/Indexquestion");
+ var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList();
+ 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;
return View();
}
@@ -629,7 +678,9 @@
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
-
+ var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/SysCode/Indexquestion");
+ var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList();
+ ViewData["ActionInfo2"] = pageEntities2;
SysCodeDtlEntity sysCodeDtlEntity = new SysCodeDtlEntity();
@@ -661,13 +712,26 @@
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);
+ //ActionEntity actionEntity1 = new ActionEntity();
+ //actionEntity1.OpenType = 0;
+ //actionEntity1.ActionUrl = "";
+ //actionEntity1.ActionFun = "Add";
+ //actionEntity1.PageIco = "fa fa-plus";
+ //actionEntity1.ActionName = "鏂板";
+ //actionlist.Add(actionEntity1);
+ List<PageEntity> pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/SysCode/Indexlaw");
+ var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList();
+ 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.falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
ViewBag.question = _liaotianService.GetSYScode("t_challenge_items", "question").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
@@ -682,7 +746,7 @@
//JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
searchEntity.CodeTable = "t_complaint_items";
searchEntity.CodeField = "law";
- searchEntity.Sort = "CodeSn";
+ searchEntity.Sort1 = "CodeSn";
ResultDataEntity<SysCodeDtlEntity> resultDataEntity = _sysCodeService.SearchSysCodeDtlPaging(searchEntity);
@@ -708,7 +772,177 @@
- public IActionResult Editlaw(string id)
+ public IActionResult Editlaw(string Classify1="")
+ {
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ViewData["curentuser"] = curentuser;
+ var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/SysCode/Indexlaw");
+ var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList();
+ ViewData["ActionInfo2"] = pageEntities2;
+
+ SysCodeDtlEntity sysCodeDtlEntity = new SysCodeDtlEntity();
+
+ var sysCodeDtlEntities = _sysCodeService.GetSysCodeDtlInfoss(Classify1, "t_complaint_items", "law");
+ sysCodeDtlEntity.Classify1 = Classify1;
+ sysCodeDtlEntity.CodeId = sysCodeDtlEntities[0].CodeId;
+
+ ViewData.Model = sysCodeDtlEntity;
+
+ ViewBag.falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv");
+ ViewBag.question = _liaotianService.GetSYScode("t_challenge_items", "question");
+ ViewBag.sysCodeDtlEntities = sysCodeDtlEntities;
+
+ return View();
+ }
+
+
+
+
+ public IActionResult Editlawzidingyi(string Classify1 = "")
+ {
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ViewData["curentuser"] = curentuser;
+
+
+ SysCodeDtlEntity sysCodeDtlEntity = new SysCodeDtlEntity();
+
+ var sysCodeDtlEntities = _sysCodeService.GetSysCodeDtlInfoss("涓嶅瓨鍦�", "t_complaint_items", "law");
+ sysCodeDtlEntity.Classify1 = Classify1;
+ sysCodeDtlEntity.CodeId = sysCodeDtlEntities[0].CodeId;
+
+ ViewData.Model = sysCodeDtlEntity;
+
+ ViewBag.falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv");
+ ViewBag.question = _liaotianService.GetSYScode("t_challenge_items", "question");
+ ViewBag.sysCodeDtlEntities = sysCodeDtlEntities;
+ ViewBag.Classify1 = Classify1;
+
+ return View();
+ }
+
+
+ /// <summary>
+ /// 淇濆瓨
+ /// </summary>
+ /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param>
+ /// <returns></returns>
+ [HttpPost]
+
+ public string addquestiontypes(SysCodeDtlEntity data)
+ {
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ResultEntity resultEntity = new ResultEntity();
+ resultEntity.Result = false;
+ ViewData["curentuser"] = curentuser;
+ data.RecStatus = "A";
+ if (String.IsNullOrEmpty(data.Id))
+ {
+ data.Creater = curentuser.Id;
+ data.Createtime = DateTime.Now;
+ }
+ data.Modifier = curentuser.Id;
+ data.Modifytime = DateTime.Now;
+ if (data.CodeSns == null || data.CodeSns.Length == 0)
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "娉曞緥渚濇嵁涓嶈兘涓虹┖锛�";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ foreach (var CodeSn in data.CodeSns)
+ {
+ if (string.IsNullOrWhiteSpace(CodeSn))
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "缂栫爜涓嶈兘涓虹┖锛�";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ }
+ if (data.Commentss == null || data.Commentss.Length == 0)
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "娉曞緥鍚嶇О涓嶈兘涓虹┖锛�";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ foreach (var Comment in data.Commentss)
+ {
+ if (string.IsNullOrWhiteSpace(Comment))
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "娉曞緥鍚嶇О涓嶈兘涓虹┖锛�";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ }
+
+
+ resultEntity = _sysCodeService.addSysCodeDtls(data);
+
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+
+
+
+ /// <summary>
+ /// 淇濆瓨
+ /// </summary>
+ /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param>
+ /// <returns></returns>
+ [HttpPost]
+
+ public string Savequestiontypes(SysCodeDtlEntity data)
+ {
+ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+ ResultEntity resultEntity = new ResultEntity();
+ resultEntity.Result = false;
+ ViewData["curentuser"] = curentuser;
+ data.RecStatus = "A";
+ if (String.IsNullOrEmpty(data.Id))
+ {
+ data.Creater = curentuser.Id;
+ data.Createtime = DateTime.Now;
+ }
+ data.Modifier = curentuser.Id;
+ data.Modifytime = DateTime.Now;
+ if(data.CodeSns==null || data.CodeSns.Length == 0)
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "娉曞緥渚濇嵁涓嶈兘涓虹┖锛�";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ foreach (var CodeSn in data.CodeSns)
+ {
+ if (string.IsNullOrWhiteSpace(CodeSn))
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "缂栫爜涓嶈兘涓虹┖锛�";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ }
+ if (data.Commentss == null || data.Commentss.Length == 0)
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "娉曞緥鍚嶇О涓嶈兘涓虹┖锛�";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ foreach (var Comment in data.Commentss)
+ {
+ if (string.IsNullOrWhiteSpace(Comment))
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "娉曞緥鍚嶇О涓嶈兘涓虹┖锛�";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ }
+
+
+ resultEntity = _sysCodeService.SaveSysCodeDtls(data);
+
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+
+
+
+
+ public IActionResult Editquestionzidingyi(string id)
{
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
@@ -717,13 +951,13 @@
SysCodeDtlEntity sysCodeDtlEntity = new SysCodeDtlEntity();
- sysCodeDtlEntity = _sysCodeService.GetSysCodeDtlInfo(id, "t_complaint_items", "law");
+ sysCodeDtlEntity = _sysCodeService.GetSysCodeDtlInfo(id, "t_challenge_items", "question");
ViewData.Model = sysCodeDtlEntity;
- ViewBag.falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv");
- ViewBag.question = _liaotianService.GetSYScode("t_challenge_items", "question");
+
+
return View();
}
--
Gitblit v1.9.1