浏览代码

学生宿舍管理导入功能

临城职教中职
zhangli 2 年前
父节点
当前提交
cca1047544
共有 1 个文件被更改,包括 29 次插入19 次删除
  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 查看文件

@@ -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)


正在加载...
取消
保存