From e649be7905be7e74f6e09d8d74a7bd7bcd3923b7 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 27 七月 2021 16:17:35 +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