From aaa6a18bcba3bd4d74197745a964905c3ff1034e Mon Sep 17 00:00:00 2001 From: ndbs Date: Sun, 24 Apr 2022 18:08:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=AE=BF=E8=88=8D=E5=88=86?= =?UTF-8?q?=E9=85=8D=E5=AD=A6=E7=94=9F=E7=BC=96=E5=8F=B7=E9=9D=9E=E7=A9=BA?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Accommodation/AccommodationService.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs index ade272d6d..233ff523b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs @@ -1814,9 +1814,12 @@ where ID='{ParentID}' } } - //分配床位 - string sql = $"update Acc_DormitoryBuild set StudentID='{entity.StudentID}' where ID='{entity.ID}'"; - db.ExecuteBySql(sql); + if (!string.IsNullOrEmpty(entity.StudentID)) + { + //分配床位 + string sql = $"update Acc_DormitoryBuild set StudentID='{entity.StudentID}' where ID='{entity.ID}'"; + db.ExecuteBySql(sql); + } } int checkInStu = list.Where(x => x.StudentID != null).Count();