Ver a proveniência

【修改】班级开课计划:强制设置录成绩教师;

新疆警官学校中职
dyy há 1 mês
ascendente
cometimento
8d638f37d5
11 ficheiros alterados com 157 adições e 35 eliminações
  1. +24
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.cshtml
  3. +29
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js
  4. +7
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js
  5. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs
  6. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs
  7. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs
  8. +26
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassBLL.cs
  9. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs
  10. +9
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassIBLL.cs
  11. +37
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs

+ 24
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs Ver ficheiro

@@ -24,7 +24,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
private StuScoreIBLL stuScoreIBLL = new StuScoreBLL();
private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL();
#region 视图功能

/// <summary>
@@ -105,6 +105,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
return Success(jsonData);
}

/// <summary>
/// 获取数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetEmpNoData(string keyValue)
{
var data = teachClassIBLL.GetEmpNoData(keyValue);

return Success(data);
}
#endregion

#region 提交数据
@@ -212,16 +226,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success("设置成功!");

}
/// <summary>
/// 强制设置录成绩教师
/// </summary>
/// <param name="keyValue"></param>
/// <param name="EmpNo">已选择的录成绩教师</param>
/// <returns></returns>
public ActionResult QzSetTeach(string keyValue, string EmpNo)
{
var entityList = teachClassIBLL.GetTeachListById(keyValue).ToList();
foreach (var item in entityList)
{
teachClassIBLL.UpEmpNos(item.AcademicYearNo, item.Semester, item.TeachClassNo, item.LessonNo, EmpNo, item.EmpNo,item.Grade);
stuScoreIBLL.UpEmpNos(item.AcademicYearNo, item.Semester, item.TeachClassNo, item.LessonNo, EmpNo, item.EmpNo, item.Grade);
teachClassIBLL.UpEmpNos(item.AcademicYearNo, item.Semester, item.TeachClassNo, item.LessonNo, EmpNo, item.EmpNo, item.Grade, item.LessonSortNo);
stuScoreIBLL.UpEmpNos(item.AcademicYearNo, item.Semester, item.TeachClassNo, item.LessonNo, EmpNo, item.EmpNo, item.Grade, item.LessonSortNo);
}

teachClassIBLL.UpEmpNo(keyValue, EmpNo); //更改当前教师
teachClassIBLL.UpEmpNo(keyValue, EmpNo);
return Success("设置成功!");
}
#endregion


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.cshtml Ver ficheiro

@@ -56,8 +56,8 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_teach" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;设置教师</a>
<a id="lr_qzteach" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;强制设置教师</a>
@*<a id="lr_teach" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;设置教师</a>*@
<a id="lr_qzteach" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;强制设置录成绩教师</a>
</div>
</div>
</div>


+ 29
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js Ver ficheiro

@@ -89,12 +89,19 @@ var bootstrap = function ($, learun) {
$('#lr_qzteach').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(",") != -1) {
learun.alert.warning("请选择单条记录进行操作!");
return false;
}
var EmpNo = $('#gridtable').jfGridValue('EmpNo');
if (EmpNo.indexOf(",") == -1) {
learun.alert.warning("不符合强制设置条件!");
return false;
}
learun.layerForm({
id: 'form',
title: '强制设置教师',
url: top.$.rootUrl +
'/EducationalAdministration/ClassPlanTeach/TeachFormQZ?keyValue=' +
keyValue,
url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/TeachFormQZ?keyValue=' + keyValue,
width: 400,
height: 300,
callBack: function (id) {
@@ -224,18 +231,26 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "教师编号", name: "EmpNo", width: 80, align: "left" },
{ label: "教师编号", name: "EmpNo", width: 150, align: "left" },
{
label: "教师名称", name: "EmpNo", width: 80, align: "left",
label: "教师名称", name: "EmpNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_encode',
callback: function (_data) {
callback(_data['f_realname']);
}
});
var valuearr = value.split(",");
var namearr = "";
for (var i = 0; i < valuearr.length; i++) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: valuearr[i],
keyId: 'f_encode',
callback: function (_data) {
namearr += _data['f_realname'];
if (i < valuearr.length - 1) {
namearr += ",";
}
}
});
}
callback(namearr);
}
},
{
@@ -253,6 +268,7 @@ var bootstrap = function ($, learun) {
{ label: "合上班", name: "RelatedClassNo", width: 80, align: "left" },
{ label: "拟开教学班数", name: "LessonSortNo", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
{ label: "录成绩教师编号", name: "EmpNoMain", width: 100, align: "left" },
],
mainId: 'ID',
sidx: 'ID desc',


+ 7
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js Ver ficheiro

@@ -14,7 +14,13 @@ var bootstrap = function ($, learun) {
page.bind();
},
bind: function () {
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' });
$('#EmpNo').lrselect({
placeholder: "请选择教师",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/GetEmpNoData?keyValue=' + keyValue,
value: 'EmpNo',
text: 'EmpName'
});
}
};
// 保存数据


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs Ver ficheiro

@@ -1061,11 +1061,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade)
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade, string LessonSortNo)
{
try
{
stuScoreService.UpEmpNos(xn, xq, classNo, LessonNo, EmpNo, HisEmpNo, Grade);
stuScoreService.UpEmpNos(xn, xq, classNo, LessonNo, EmpNo, HisEmpNo, Grade, LessonSortNo);
}
catch (Exception ex)
{


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs Ver ficheiro

@@ -253,6 +253,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
(DataTable failDt, int snum, int fnum) ExecuteImportExcel(int type, DataTable dt, string fileGuid, string queryJson);

IEnumerable<WebHelper.YearGrade> GetLessonNoDataFromStuNo(string academicYearNo, string semester, string stuNo);
void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade);
void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade, string LessonSortNo);
}
}

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs Ver ficheiro

@@ -1977,12 +1977,12 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string hisempno, string Grade)
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string hisempno, string Grade, string LessonSortNo)
{
try
{
StringBuilder sb = new StringBuilder();
sb.Append(" update StuScore set EmpNo ='" + EmpNo + "' where classno = '" + classNo + "' and Semester ='" + xq + "' and AcademicYearNo ='" + xn + "' and LessonNo ='" + LessonNo + "' and empno = '" + hisempno + "' and Grade='" + Grade + "' ");
sb.Append(" update StuScore set EmpNo ='" + EmpNo + "' where classno = '" + classNo + "' and Semester ='" + xq + "' and AcademicYearNo ='" + xn + "' and LessonNo ='" + LessonNo + "' and empno = '" + hisempno + "' and Grade='" + Grade + "' and LessonSortNo='" + LessonSortNo + "' ");
this.BaseRepository("CollegeMIS").ExecuteBySql(sb.ToString());
}
catch (Exception ex)


+ 26
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassBLL.cs Ver ficheiro

@@ -279,11 +279,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade)
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade, string LessonSortNo)
{
try
{
teachClassEntity.UpEmpNos(xn, xq, classNo, LessonNo, EmpNo, HisEmpNo, Grade);
teachClassEntity.UpEmpNos(xn, xq, classNo, LessonNo, EmpNo, HisEmpNo, Grade, LessonSortNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public IEnumerable<EmpInfoEntity> GetEmpNoData(string keyValue)
{
try
{
return teachClassEntity.GetEmpNoData(keyValue);
}
catch (Exception ex)
{


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs Ver ficheiro

@@ -112,6 +112,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
[Column("F_SCHOOLID")]
public string F_SchoolId { get; set; }
/// <summary>
/// 强制设置录成绩教师(EmpNo为多个教师时可以设置)
/// </summary>
/// <returns></returns>
[Column("EMPNOMAIN")]
public string EmpNoMain { get; set; }
/// <summary>
/// 强制设置人
/// </summary>
/// <returns></returns>
[Column("SETUSERID")]
public string SetUserId { get; set; }
/// <summary>
/// 强制设置时间
/// </summary>
/// <returns></returns>
[Column("SETTIME")]
public DateTime? SetTime { get; set; }
[NotMapped]
public int? StartWeek { get; set; }
[NotMapped]


+ 9
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassIBLL.cs Ver ficheiro

@@ -73,7 +73,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
void UpEmpNo(string keyvalue, string EmpNo);
string UpSetTeach(string keyvalue, string EmpNo);
string UpQzSetTeach(string keyvalue, string EmpNo);
void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade);
void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string HisEmpNo, string Grade, string LessonSortNo);


/// <summary>
/// 获取数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
IEnumerable<EmpInfoEntity> GetEmpNoData(string keyValue);
#endregion
}
}

+ 37
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs Ver ficheiro

@@ -32,8 +32,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM TeachClass t ");
strSql.Append(@" t.*,le.LessonName ");
strSql.Append(" FROM TeachClass t left join LessonInfo le on t.LessonNo=le.LessonNo ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -80,8 +80,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
if (!queryParam["EmpNo"].IsEmpty())
{
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String);
strSql.Append(" AND t.EmpNo = @EmpNo ");
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.EmpNo Like @EmpNo ");
}
return this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(strSql.ToString(), dp, pagination);
}
@@ -328,7 +328,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
foreach (var item in keyarray)
{
var entityList = this.GetTeachClassEntity(item);
entityList.EmpNo = EmpNo;
entityList.EmpNoMain = EmpNo;
entityList.SetUserId = LoginUserInfo.Get().userId;
entityList.SetTime = DateTime.Now;
db.Update(entityList);

}
@@ -697,12 +699,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string hisempno, string Grade)
public void UpEmpNos(string xn, string xq, string classNo, string LessonNo, string EmpNo, string hisempno, string Grade, string LessonSortNo)
{
try
{
StringBuilder sb = new StringBuilder();
sb.Append(" update StuSelectLessonList set EmpNo ='" + EmpNo + "' where classno = '" + classNo + "' and Semester ='" + xq + "' and AcademicYearNo ='" + xn + "' and LessonNo ='" + LessonNo + "' and empno = '" + hisempno + "' and Grade = '" + Grade + "'");
sb.Append(" update StuSelectLessonList set EmpNo ='" + EmpNo + "' where classno = '" + classNo + "' and Semester ='" + xq + "' and AcademicYearNo ='" + xn + "' and LessonNo ='" + LessonNo + "' and empno = '" + hisempno + "' and Grade = '" + Grade + "' and LessonSortNo='" + LessonSortNo + "' ");
this.BaseRepository("CollegeMIS").ExecuteBySql(sb.ToString());
}
catch (Exception ex)
@@ -717,6 +719,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}


/// <summary>
/// 获取数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public IEnumerable<EmpInfoEntity> GetEmpNoData(string keyValue)
{
try
{
int ID = Convert.ToInt32(keyValue);
var teachclassEntity = this.BaseRepository("CollegeMIS").FindEntity<TeachClassEntity>(ID);
return this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>($"select * from EmpInfo e where EmpNo in ({teachclassEntity.EmpNo}) ");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion
}
}

Carregando…
Cancelar
Guardar