Pārlūkot izejas kodu

学生宿舍管理导入功能

临城职教中职
zhangli pirms 2 gadiem
vecāks
revīzija
cca1047544
1 mainītis faili ar 29 papildinājumiem un 19 dzēšanām
  1. +29
    -19
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs

+ 29
- 19
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs Parādīt failu

@@ -1963,40 +1963,50 @@ where ID='{ParentID}'
if (string.IsNullOrEmpty(DeptNo))
{
fnum++;
dr["导入错误"] = dr["系部"] + "导入错误";
dr["导入错误"] = "系部导入错误";
failDt.Rows.Add(dr.ItemArray);
continue;
}
if (string.IsNullOrEmpty(MajorNo))
{
fnum++;
dr["导入错误"] = dr["专业"] + "导入错误";
dr["导入错误"] = "专业导入错误";
failDt.Rows.Add(dr.ItemArray);
continue;
}
if (string.IsNullOrEmpty(ClassNo))
{
fnum++;
dr["导入错误"] = dr["班级"] + "导入错误";
dr["导入错误"] = "班级导入错误";
failDt.Rows.Add(dr.ItemArray);
continue;
}
var leaderno = stuinfobasic.Where(x => x.StuNo == dr["舍长学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo;
var stuno = stuinfobasic.Where(x => x.StuNo == dr["学生学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo;
//if (string.IsNullOrEmpty(stuno))
//{
// fnum++;
// dr["导入错误"] = dr["学生学号"] + "导入错误";
// failDt.Rows.Add(dr.ItemArray);
// continue;
//}
//if (string.IsNullOrEmpty(leaderno))
//{
// fnum++;
// dr["导入错误"] = dr["舍长学号"] + "导入错误";
// failDt.Rows.Add(dr.ItemArray);
// continue;
//}

var leaderno = "";
if (!string.IsNullOrEmpty(dr["舍长学号"].ToString()))
{
leaderno = stuinfobasic.Where(x => x.StuNo == dr["舍长学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo;
if (string.IsNullOrEmpty(leaderno))
{
fnum++;
dr["导入错误"] = dr["舍长学号"] + "导入错误";
failDt.Rows.Add(dr.ItemArray);
continue;
}
}

var stuno = "";
if (!string.IsNullOrEmpty(dr["舍长学号"].ToString()))
{
stuno = stuinfobasic.Where(x => x.StuNo == dr["学生学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo;
if (string.IsNullOrEmpty(stuno))
{
fnum++;
dr["导入错误"] = dr["学生学号"] + "导入错误";
failDt.Rows.Add(dr.ItemArray);
continue;
}
}

var parent = dormitoryBuildList.Where(x => x.Name == "数字化智慧校园").FirstOrDefault();
if (parent == null)


Notiek ielāde…
Atcelt
Saglabāt