From 976aa1a04fff81af4939affa80d3357013157353 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期四, 28 七月 2022 16:51:17 +0800 Subject: [PATCH] 文书管理 --- zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs | 63 +++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 1 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs index c123f4c..7b95a97 100644 --- a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs @@ -760,7 +760,7 @@ SysCodeDtlEntity sysCodeDtlEntity = new SysCodeDtlEntity(); - var sysCodeDtlEntities = _sysCodeService.GetSysCodeDtlInfoss(Classify1, "t_complaint_items", "law"); + var sysCodeDtlEntities = _sysCodeService.GetSysCodeDtlInfoss("涓嶅瓨鍦�", "t_complaint_items", "law"); sysCodeDtlEntity.Classify1 = Classify1; sysCodeDtlEntity.CodeId = sysCodeDtlEntities[0].CodeId; @@ -769,6 +769,7 @@ ViewBag.falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv"); ViewBag.question = _liaotianService.GetSYScode("t_challenge_items", "question"); ViewBag.sysCodeDtlEntities = sysCodeDtlEntities; + ViewBag.Classify1 = Classify1; return View(); } @@ -781,6 +782,66 @@ /// <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")); -- Gitblit v1.9.1