Sfoglia il codice sorgente

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

长阳分支推送专用
liangkun 2 anni fa
parent
commit
9b00a0b78f
5 ha cambiato i file con 82 aggiunte e 9 eliminazioni
  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 Vedi File

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


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


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


+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs Vedi File

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


+ 20
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs Vedi File

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


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs Vedi File

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


void GenerateAccout(); void GenerateAccout();


+ 40
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs Vedi File

@@ -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(); var DiplomaNoList = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(x => x.DiplomaNo.Contains(year + schoolCode)).Select(x => x.DiplomaNo).ToList();
if (DiplomaNoList.Any()) 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) foreach (var item in stuList)
{ {
item.DiplomaNo = year + schoolCode + numberCode.ToString().PadLeft(4, '0'); item.DiplomaNo = year + schoolCode + numberCode.ToString().PadLeft(4, '0');
@@ -423,7 +423,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration


numberCode++; numberCode++;
} }
db.Commit(); db.Commit();
} }
catch (Exception ex) catch (Exception ex)
@@ -1131,7 +1131,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var room = db.FindEntity<Acc_DormitoryBuildEntity>(x => x.ID == dormitory.ParentID); var room = db.FindEntity<Acc_DormitoryBuildEntity>(x => x.ID == dormitory.ParentID);
if (room != null) if (room != null)
{ {
if (room.CheckInStu.HasValue && room.CheckInStu.Value>0)
if (room.CheckInStu.HasValue && room.CheckInStu.Value > 0)
{ {
room.CheckInStu--; room.CheckInStu--;
db.Update(room); 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() public IEnumerable<StuInfoBasicEntity> GetAllList()
{ {
try try


Caricamento…
Annulla
Salva