From 6055afb34cda11df71a1704fdde1eb3955e92992 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 25 一月 2022 16:03:27 +0800
Subject: [PATCH] 提交

---
 zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml |    4 ++--
 zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml |    4 ++--
 zhengcaioa/zhengcaioa/Views/CooperOrder/EditTousushu.cshtml  |    6 +++---
 zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs       |   35 ++++++++++++++++++++++++++++++++++-
 zhengcaioa/Model/zhengcaioaContext.cs                        |    4 ++--
 zhengcaioa/zhengcaioa/Views/CooperOrder/EditZhiyihan.cshtml  |    6 +++---
 6 files changed, 46 insertions(+), 13 deletions(-)

diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs
index 53daa49..a30d55d 100644
--- a/zhengcaioa/Model/zhengcaioaContext.cs
+++ b/zhengcaioa/Model/zhengcaioaContext.cs
@@ -7028,7 +7028,7 @@
                     .HasColumnName("challenge_id");
 
                 entity.Property(e => e.Evidential)
-                    .HasMaxLength(300)
+                    .HasMaxLength(4000)
                     .HasColumnName("evidential");
 
                 entity.Property(e => e.Law)
@@ -7176,7 +7176,7 @@
                     .HasColumnName("complaint_id");
 
                 entity.Property(e => e.Evidential)
-                    .HasMaxLength(300)
+                    .HasMaxLength(4000)
                     .HasColumnName("evidential");
 
                 entity.Property(e => e.Law)
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);
         }
diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/EditTousushu.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/EditTousushu.cshtml
index 261fe0d..062e2f5 100644
--- a/zhengcaioa/zhengcaioa/Views/CooperOrder/EditTousushu.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/EditTousushu.cshtml
@@ -671,7 +671,7 @@
                                             <div class="clearfix layer-area" style="padding-bottom:15px;">
                                                 <label grouptype="Vdata" id="Evidentiallabel" class="text-right col-sm-1 col-md-1 control-label">浜嬪疄渚濇嵁</label>
                                                 <div class="col-sm-8 col-md-8">
-                                                    <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="300" length="long">@complaintItemDTOs[i].Evidential</textarea>
+                                                    <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="3500" length="long">@complaintItemDTOs[i].Evidential</textarea>
                                                 </div>
                                             </div>
 
@@ -744,7 +744,7 @@
                                             <div class="clearfix layer-area" style="padding-bottom:15px;">
                                                 <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">浜嬪疄渚濇嵁@(i+1)</label>
                                                 <div class="col-sm-8 col-md-8">
-                                                    <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="300" length="long">@complaintItemDTOs[i].Evidential</textarea>
+                                                    <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="3500" length="long">@complaintItemDTOs[i].Evidential</textarea>
                                                 </div>
                                             </div>
 
@@ -1382,7 +1382,7 @@
                                         <div class="clearfix layer-area" style="padding-bottom:15px;">
                                             <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">浜嬪疄渚濇嵁`+ (sss + 1) + `</label>
                                             <div class="col-sm-8 col-md-8">
-                                                <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="4000" length="long"></textarea>
+                                                <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="3500" length="long"></textarea>
                                             </div>
                                         </div>
 
diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/EditZhiyihan.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/EditZhiyihan.cshtml
index b470e0f..2caea50 100644
--- a/zhengcaioa/zhengcaioa/Views/CooperOrder/EditZhiyihan.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/EditZhiyihan.cshtml
@@ -313,7 +313,7 @@
                                             <div class="clearfix layer-area" style="padding-bottom:15px;">
                                                 <label grouptype="Vdata" id="Evidentiallabel" class="text-right col-sm-1 col-md-1 control-label">浜嬪疄渚濇嵁</label>
                                                 <div class="col-sm-8 col-md-8">
-                                                    <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="300" length="long">@challengeItemDTOs[i].Evidential</textarea>
+                                                    <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="3500" length="long">@challengeItemDTOs[i].Evidential</textarea>
                                                 </div>
                                             </div>
                                             <div id="falvyiju@(i)">
@@ -390,7 +390,7 @@
                                             <div class="clearfix layer-area" style="padding-bottom:15px;">
                                                 <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">浜嬪疄渚濇嵁@(i+1)</label>
                                                 <div class="col-sm-8 col-md-8">
-                                                    <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="300" length="long">@challengeItemDTOs[i].Evidential</textarea>
+                                                    <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁" isempty="" maxlength="3500" length="long">@challengeItemDTOs[i].Evidential</textarea>
                                                 </div>
                                             </div>
                                             <div id="falvyiju@(i)">
@@ -830,7 +830,7 @@
                                         <div class="clearfix layer-area" style="padding-bottom:15px;">
                                             <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">浜嬪疄渚濇嵁`+ (sss + 1) + `</label>
                                             <div class="col-sm-8 col-md-8">
-                                                <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁`+ sss + `" isempty="" maxlength="4000" length="long"></textarea>
+                                                <textarea class="form-control bt" name="Evidential" title="浜嬪疄渚濇嵁`+ sss + `" isempty="" maxlength="3500" length="long"></textarea>
                                             </div>
                                         </div>
  <div  id="falvyiju`+ sss + `">
diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml
index 00a85bb..9d96439 100644
--- a/zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml
@@ -134,7 +134,7 @@
                                             <td colspan="2">
                                                 璐ㄧ枒浜嬮」锛�<span style="text-indent:10px">@challengeItemDTOs[i].QuestionName </span>
                                                 <br />
-                                                浜嬪疄渚濇嵁锛�<span>@challengeItemDTOs[i].Evidential</span>
+                                                浜嬪疄渚濇嵁锛欯Html.Raw("<span>" + (string.IsNullOrEmpty(challengeItemDTOs[i].Evidential) ? "" : challengeItemDTOs[i].Evidential.Replace(" ", "&nbsp;").Replace("\r", "<br/>"))  + "</span>");
                                                 <br />
                                                 @for (int j = 0; j < challengeItemDTOs[i].sysCodeDtls.Count; j++)
                                                 {
@@ -163,7 +163,7 @@
                                             <td colspan="2">
                                                 璐ㄧ枒浜嬮」@((i + 1) + "")锛�<span style="text-indent:10px">@challengeItemDTOs[i].QuestionName </span>
                                                 <br />
-                                                浜嬪疄渚濇嵁@((i + 1) + "")锛�<span>@challengeItemDTOs[i].Evidential</span>
+                                                浜嬪疄渚濇嵁@((i + 1) + "")锛� @Html.Raw("<span>" + (string.IsNullOrEmpty(challengeItemDTOs[i].Evidential) ? "" : challengeItemDTOs[i].Evidential.Replace(" ", "&nbsp;").Replace("\r", "<br/>")) + "</span>");
                                                 <br />
                                                 @for (int j = 0; j < challengeItemDTOs[i].sysCodeDtls.Count; j++)
                                                 {
diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml
index 3d3accb..4666fa0 100644
--- a/zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml
@@ -241,7 +241,7 @@
                                             <td colspan="2">
                                                 鎶曡瘔浜嬮」锛�<span style="text-indent:10px">@complaintItemDTOs[i].QuestionName </span>
                                                 <br />
-                                                浜嬪疄渚濇嵁锛�<span>@complaintItemDTOs[i].Evidential</span>
+                                                浜嬪疄渚濇嵁锛� @Html.Raw("<span>" + (string.IsNullOrEmpty(complaintItemDTOs[i].Evidential) ? "" : complaintItemDTOs[i].Evidential.Replace(" ", "&nbsp;").Replace("\r", "<br/>")) + "</span>");
                                                 <br />
                                                 @for (int j = 0; j < complaintItemDTOs[i].sysCodeDtls.Count; j++)
                                                 {
@@ -268,7 +268,7 @@
                                             <td colspan="2">
                                                 鎶曡瘔浜嬮」@((i+1)+"")锛�<span style="text-indent:10px">@complaintItemDTOs[i].QuestionName </span>
                                                 <br />
-                                                浜嬪疄渚濇嵁@((i+1)+"")锛�<span>@complaintItemDTOs[i].Evidential</span>
+                                                浜嬪疄渚濇嵁@((i+1)+"")锛欯Html.Raw("<span>" +(string.IsNullOrEmpty(complaintItemDTOs[i].Evidential)?"": complaintItemDTOs[i].Evidential.Replace(" ", "&nbsp;").Replace("\r", "<br/>"))  + "</span>");
                                                 <br />
                                                 @for (int j = 0; j < complaintItemDTOs[i].sysCodeDtls.Count; j++)
                                                 {

--
Gitblit v1.9.1