Browse Source

修改信息批量修改BUG,优化。

应县
北京泉江 1 year ago
parent
commit
8f26d8bf03
4 changed files with 10 additions and 9 deletions
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js
  2. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/StuInfoBasicImport.xls
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs
  4. +8
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js View File

@@ -528,7 +528,7 @@ var bootstrap = function ($, learun) {
{ label: "户口所在地", name: "FatherUnit", width: 100, align: "left" },
{ label: "档案所在地", name: "MatherUnit", width: 100, align: "left" },
{
label: "五年一贯制", name: "FiveYear", width: 100, align: "left"
label: "分段培养方式", name: "FiveYear", width: 100, align: "left"
, formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,


BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/StuInfoBasicImport.xls View File


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs View File

@@ -23,7 +23,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public string F_SchoolId { get; set; }

/// <summary>
/// 学号
/// 学生编
/// </summary>
[Column("STUNO")]
public string StuNo { get; set; }


+ 8
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs View File

@@ -1371,6 +1371,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
//修改学生list
List<StuInfoBasicEntity> insertedorderlist = new List<StuInfoBasicEntity>();
var db = this.BaseRepository("CollegeMIS").BeginTrans();
var detailList = this.BaseRepository().FindList<DataItemDetailEntity>(@"SELECT t.*,t2.F_ItemCode FROM LR_Base_DataItemDetail t
INNER JOIN LR_Base_DataItem t2 ON t.F_ItemId = t2.F_ItemId
WHERE t.F_DeleteMark = 0");
// 循环遍历导入
foreach (DataRow dr in dt.Rows)
{
@@ -1385,9 +1388,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
throw (new Exception("【身份证号】不存在,请核对!"));
}
var detailList = this.BaseRepository().FindList<DataItemDetailEntity>(@"SELECT t.*,t2.F_ItemCode FROM LR_Base_DataItemDetail t
INNER JOIN LR_Base_DataItem t2 ON t.F_ItemId = t2.F_ItemId
WHERE t.F_DeleteMark = 0");
//写入要导入的数据
StuInfoBasicEntity stuUpdateList = new StuInfoBasicEntity();
var oriData = stuInfoBasicEntities.FirstOrDefault(s => s.IdentityCardNo.ToUpper() == dr[0].ToString().ToUpper());
@@ -1399,7 +1400,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (!string.IsNullOrWhiteSpace(dr[2].ToString()))
{
stuUpdateList.StuNo = dr[2].ToString();
stuUpdateList.ProvinceCode = dr[2].ToString();
}
if (!string.IsNullOrWhiteSpace(dr[3].ToString()))
{
@@ -1424,17 +1425,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
var PieceCultivateWay = dr["五年一贯制"].ToString().Trim();
var PieceCultivateWay = dr["分段培养方式"].ToString().Trim();
if (!string.IsNullOrWhiteSpace(PieceCultivateWay))
{
var PieceCultivateWaylity = detailList.FirstOrDefault(x => x.F_ItemCode == "PieceCultivateWay" && x.F_ItemName == PieceCultivateWay);
if (!string.IsNullOrEmpty(PieceCultivateWay) && PieceCultivateWaylity == null)
{
throw (new Exception("【五年一贯制】数据字典找不到对应的数据!"));
throw (new Exception("【分段培养方式】数据字典找不到对应的数据!"));
}
else
{
stuUpdateList.FiveYear = dr["五年一贯制"].ToString();
stuUpdateList.FiveYear = PieceCultivateWaylity.F_ItemValue;
}
}
insertedorderlist.Add(stuUpdateList);


Loading…
Cancel
Save