From af64b7b8fef6b3121b46085305884d2c26a99225 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 12 Jan 2022 10:21:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=BF=E8=88=8D=E5=AF=BC=E5=85=A5=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Excel/Import/ExcelImportBLL.cs | 9 ++++++++- .../Accommodation/AccommodationService.cs | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs index 9ce7c5bc2..9dd856915 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs @@ -640,7 +640,9 @@ namespace Learun.Application.Excel var data = accommodationIBLL.GetAllList().ToList(); - foreach (DataRow dr in dt.Rows) + var dTList = dt.Rows; + int i = 0; + foreach (DataRow dr in dTList) { try { @@ -661,6 +663,11 @@ namespace Learun.Application.Excel fnum++; failDt.Rows.Add(dr.ItemArray); } + i++; + if (i == dTList.Count) + { + break; + } } catch (Exception e) { 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 72d6b7479..fd28eb6be 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 @@ -734,6 +734,10 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } bedInfo.StudentID = stuInfo.StuId; bedInfo.StuName = stuInfo.StuName; + bedInfo.Dept = stuInfo.DeptNo; + bedInfo.Major = stuInfo.MajorNo; + bedInfo.Class = stuInfo.ClassNo; + bedInfo.Sex = stuInfo.GenderNo != null && stuInfo.GenderNo.Value ? "男" : "女"; this.BaseRepository("CollegeMIS").Update(bedInfo); return true; }