From c60a7d7b29faba465969555e2a9c69acb8510f90 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期五, 25 二月 2022 09:11:41 +0800 Subject: [PATCH] 如果客户资料中有“*”的内容,生产文书时自动填上,质疑单位默认填写客户名称,可修改 --- zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs index 07d97cb..485fb56 100644 --- a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs @@ -740,6 +740,8 @@ 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)) @@ -749,8 +751,39 @@ } 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 resultEntity = _sysCodeService.SaveSysCodeDtls(data); + resultEntity = _sysCodeService.SaveSysCodeDtls(data); return JsonConvert.SerializeObject(resultEntity); } -- Gitblit v1.9.1