From 1bc70e00b583aa129de0c7996df004535ef0b3e4 Mon Sep 17 00:00:00 2001 From: lg <999544862qq.com> Date: 星期四, 29 八月 2024 16:34:35 +0800 Subject: [PATCH] 用户管理 --- WebApi/Gs.User/Service/OrganizationController.cs | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/WebApi/Gs.User/Service/OrganizationController.cs b/WebApi/Gs.User/Service/OrganizationController.cs index 3ada6a5..997cc76 100644 --- a/WebApi/Gs.User/Service/OrganizationController.cs +++ b/WebApi/Gs.User/Service/OrganizationController.cs @@ -60,13 +60,13 @@ foreach (DataRow dr in dset.Tables[0].Rows) { _pglist.list.Add( - new + new { guid = Guid.Parse(dr["guid"].ToString()), upGuid = dr["upGuid"].ToString(), name = dr["name"].ToString(), conPeople = dr["conPeople"].ToString(), - conTel = int.Parse(dr["conTel"].ToString()), + conTel = dr["conTel"].ToString(), status = int.Parse(dr["status"].ToString()), } ); @@ -115,13 +115,22 @@ [RequestMethod(RequestMethods.POST)] public ReturnDto<int?> EditModel([FromBody] dynamic model) { - Guid? guid = model.guid; - Guid? upGuid = model.upGuid; + Guid? guid = UtilityHelper.GetGuid(model.guid.ToString()); + Guid? upGuid = UtilityHelper.GetGuid(model.upGuid.ToString()); string name = model.name; string conPeople = model.conPeople; string conTel = model.conTel; int status = model.status; int? rtnInt = (int)ReturnCode.Default; + if (upGuid == null)//鍙兘鏈変竴涓牴缁勭粐 + { + int cont = 0; + cont = int.Parse(DbHelperSQL.GetSingle("select count(1) from sys_Organization where upguid is null").ToString()); + if (cont > 0) + { + return ReturnDto<int>.QuickReturn(default(int?), ReturnCode.Exception, "澧炲姞澶辫触锛岃閫夋嫨涓婄骇缁勭粐锛�"); + } + } StringBuilder strSql = new StringBuilder(); if (guid != null) { -- Gitblit v1.9.3