From 4e2d0f2583d1956b2d718a5c5af1f27df79741ca Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 18 七月 2022 08:53:08 +0800
Subject: [PATCH] 提交
---
zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs | 70 ++++++++++++++++++++++++++++++++--
1 files changed, 65 insertions(+), 5 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs
index ef524e0..485fb56 100644
--- a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs
@@ -682,7 +682,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 +708,7 @@
- public IActionResult Editlaw(string id)
+ public IActionResult Editlaw(string Classify1="")
{
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
@@ -716,17 +716,77 @@
SysCodeDtlEntity sysCodeDtlEntity = new SysCodeDtlEntity();
-
- sysCodeDtlEntity = _sysCodeService.GetSysCodeDtlInfo(id, "t_complaint_items", "law");
-
+ 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();
}
+
+ /// <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);
+ }
+
}
}
--
Gitblit v1.9.1