瀏覽代碼

Merge branch '长阳分支中职' of 123.57.209.16:bjquanjiang/DigitalScholl into 长阳分支中职

长阳分支推送专用
liangkun 2 年之前
父節點
當前提交
9b00a0b78f
共有 5 個文件被更改,包括 82 次插入9 次删除
  1. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs
  2. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
  3. +20
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs
  5. +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);


+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs 查看文件

@@ -556,6 +556,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
public void Lock(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
var db1 = this.BaseRepository().BeginTrans();
try
{
//单个启用
@@ -566,12 +567,19 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
foreach (var item in keyValueArr)
{
db.ExecuteBySql("update EmpInfo set CheckMark=1 where EmpId='" + item + "'");
var code = db.FindEntity<EmpInfoEntity>(item).EmpNo;
if (!code.IsEmpty())
{
db1.ExecuteBySql("update LR_Base_User set F_EnabledMark=1 where F_EnCode='" + code + "'");
}
}
db.Commit();
db1.Commit();
}
catch (Exception ex)
{
db.Rollback();
db1.Rollback();
if (ex is ExceptionEx)
{
throw;
@@ -586,6 +594,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
public void UnLock(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
var db1 = this.BaseRepository().BeginTrans();
try
{
//单个停用
@@ -596,12 +605,19 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
foreach (var item in keyValueArr)
{
db.ExecuteBySql("update EmpInfo set CheckMark=0 where EmpId='" + item + "'");
var code = db.FindEntity<EmpInfoEntity>(item).EmpNo;
if (!code.IsEmpty())
{
db1.ExecuteBySql("update LR_Base_User set F_EnabledMark=0 where F_EnCode='" + code + "'");
}
}
db.Commit();
db1.Commit();
}
catch (Exception ex)
{
db.Rollback();
db1.Rollback();
if (ex is ExceptionEx)
{
throw;


+ 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


Loading…
取消
儲存