ソースを参照

学生学籍管理 审核去审核关联用户启用禁用

长阳分支推送专用
ndbs 2年前
コミット
5acd33c065
4個のファイルの変更66行の追加9行の削除
  1. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs
  2. +20
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs
  4. +40
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs

+ 5
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs ファイルの表示

@@ -421,7 +421,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpPost]
[AjaxOnly]

public ActionResult GetCard(string keyValue,string status, string strEntity)
public ActionResult GetCard(string keyValue, string status, string strEntity)
{
if (status == "1")//领取
{
@@ -430,7 +430,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
else//取消领取
{
stuInfoBasicIBLL.GetCard(keyValue,status,new StuInfoBasicEntity());
stuInfoBasicIBLL.GetCard(keyValue, status, new StuInfoBasicEntity());
}
return Success("操作成功");
}
@@ -513,7 +513,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpPost]
[AjaxOnly]

public ActionResult IsFileTransfer(string keyValue, string status,string fort)
public ActionResult IsFileTransfer(string keyValue, string status, string fort)
{
stuInfoBasicIBLL.IsFileTransfer(keyValue, status, fort);
return Success("操作成功");
@@ -615,6 +615,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult Check(string keyValue)
{
var keyValueArr = keyValue.Split(',');
stuInfoBasicIBLL.UpdateState(keyValue, "1");
foreach (var item in keyValueArr)
{
var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntity(item);
@@ -638,6 +639,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult UnCheck(string keyValue)
{
var keyValueArr = keyValue.Split(',');
stuInfoBasicIBLL.UpdateState(keyValue, "0");
foreach (var item in keyValueArr)
{
var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntity(item);


+ 20
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs ファイルの表示

@@ -394,6 +394,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public void UpdateState(string keyValue, string state)
{
try
{
stuInfoBasicService.UpdateState(keyValue, state);

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
@@ -426,7 +445,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
stuInfoBasicService.GetCard(keyValue, status,entity);
stuInfoBasicService.GetCard(keyValue, status, entity);
}
catch (Exception ex)
{


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs ファイルの表示

@@ -108,6 +108,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
void SaveEntity(string keyValue, StuInfoBasicEntity entity);
void UpdateAccount();
void UpdateState(string keyValue,string state);
#endregion

void GenerateAccout();


+ 40
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs ファイルの表示

@@ -411,11 +411,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var DiplomaNoList = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(x => x.DiplomaNo.Contains(year + schoolCode)).Select(x => x.DiplomaNo).ToList();
if (DiplomaNoList.Any())
{
numberCode = DiplomaNoList.Max(x => x).Substring(12,4).ToInt()+1;
numberCode = DiplomaNoList.Max(x => x).Substring(12, 4).ToInt() + 1;
}

//获取所有要毕业的学生按年级查询出来,再按学号进行由小到大排序,
var stuList = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(x => (x.FinishSchoolMark == "1" || x.FinishSchoolMark == "2") && (x.DiplomaNo == null || x.DiplomaNo == "")).OrderBy(x=>x.Grade).ThenBy(x=>x.StuNo);
var stuList = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(x => (x.FinishSchoolMark == "1" || x.FinishSchoolMark == "2") && (x.DiplomaNo == null || x.DiplomaNo == "")).OrderBy(x => x.Grade).ThenBy(x => x.StuNo);
foreach (var item in stuList)
{
item.DiplomaNo = year + schoolCode + numberCode.ToString().PadLeft(4, '0');
@@ -423,7 +423,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

numberCode++;
}
db.Commit();
}
catch (Exception ex)
@@ -1131,7 +1131,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var room = db.FindEntity<Acc_DormitoryBuildEntity>(x => x.ID == dormitory.ParentID);
if (room != null)
{
if (room.CheckInStu.HasValue && room.CheckInStu.Value>0)
if (room.CheckInStu.HasValue && room.CheckInStu.Value > 0)
{
room.CheckInStu--;
db.Update(room);
@@ -1440,7 +1440,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

public void UpdateState(string keyValue, string state)
{
var db = this.BaseRepository().BeginTrans();
try
{
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var StuNo = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(item).StuNo;
if (!StuNo.IsEmpty())
{
if (state == "1")
{
db.ExecuteBySql("update LR_Base_User set F_EnabledMark=1 where F_EnCode='" + StuNo + "'");
}
else
{
db.ExecuteBySql("update LR_Base_User set F_EnabledMark=0 where F_EnCode='" + StuNo + "'");
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
public IEnumerable<StuInfoBasicEntity> GetAllList()
{
try


読み込み中…
キャンセル
保存