From 402f9568e48e6e1a9d29d37dcda46737047425d5 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 25 十一月 2021 10:49:10 +0800
Subject: [PATCH] 专家通讯录优化

---
 zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs b/zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs
index 2aecacb..2624935 100644
--- a/zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs
@@ -35,7 +35,7 @@
         }
 
         public IActionResult Index()
-        {
+        {           
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
             List<ActionEntity> actionlist = new List<ActionEntity>();
@@ -124,6 +124,19 @@
 
         public IActionResult Save(HrJixiaotichengDTO data)
         {
+            ResultEntity resultEntity = new ResultEntity();
+            if ( (data.Renwustandard == "01" || data.Renwustandard == "02") && data.Tichengstandard != "01")
+            {
+                resultEntity.Result = false;
+                resultEntity.Message = "浠诲姟鏍囧噯锛堜釜锛夊彧鑳藉搴旀彁鎴愭爣鍑嗭紙瀹氶锛夛紒";
+                return new JsonResult(resultEntity);
+            }
+            if ((data.Renwustandard == "03" || data.Renwustandard == "04") && data.Tichengstandard != "02")
+            {
+                resultEntity.Result = false;
+                resultEntity.Message = "浠诲姟鏍囧噯锛堝厓锛夊彧鑳藉搴旀彁鎴愭爣鍑嗭紙娴姩锛夛紒";
+                return new JsonResult(resultEntity);
+            }
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
             data.RecStatus = "A";
@@ -135,7 +148,7 @@
             data.Modifier = curentuser.Id;
             data.Modifytime = DateTime.Now;
 
-            ResultEntity resultEntity = _hrJixiaotichengService.save(data);
+             resultEntity = _hrJixiaotichengService.save(data);
 
             return new JsonResult(resultEntity);
         }

--
Gitblit v1.9.1