全院学生成绩查看页面:考试课显示分数,考察课显示A B C D四个等级 评教管理不满意的答案内容批量导出 教师注册功能需要关闭 学生的手机号修改,去掉其他必填验证娄底高职分支
@@ -19,6 +19,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
UserIBLL userIBLL = new UserBLL(); | UserIBLL userIBLL = new UserBLL(); | ||||
EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); | EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); | ||||
AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | ||||
private TeachSwitchIBLL teachSwitchIBLL = new TeachSwitchBLL(); | |||||
public ActionResult FormAdd() | public ActionResult FormAdd() | ||||
{ | { | ||||
return View(); | return View(); | ||||
@@ -116,19 +117,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
EmpInfoEntity entity = strEntity.ToObject<EmpInfoEntity>(); | |||||
if (!string.IsNullOrEmpty(entity.EmpNo)) | |||||
var result = teachSwitchIBLL.FindFirst("js"); | |||||
if (result) | |||||
{ | { | ||||
var empentity = empInfoIBLL.GetEmpInfoEntityByEmpNo(entity.EmpNo); | |||||
var userEntity = userIBLL.GetEntityByAccount(entity.EmpNo); | |||||
if (null != empentity || null != userEntity) | |||||
EmpInfoEntity entity = strEntity.ToObject<EmpInfoEntity>(); | |||||
if (!string.IsNullOrEmpty(entity.EmpNo)) | |||||
{ | { | ||||
return Success(new { data = entity, info = "有重复的职工编号" }); | |||||
var empentity = empInfoIBLL.GetEmpInfoEntityByEmpNo(entity.EmpNo); | |||||
var userEntity = userIBLL.GetEntityByAccount(entity.EmpNo); | |||||
if (null != empentity || null != userEntity) | |||||
{ | |||||
return Success(new { data = entity, info = "有重复的职工编号" }); | |||||
} | |||||
} | } | ||||
entity.EmpId = Guid.NewGuid().ToString(); | |||||
empInfoIBLL.SaveEntity(keyValue, entity); | |||||
return Success(new { data = entity, info = "保存成功" }); | |||||
} | } | ||||
entity.EmpId = Guid.NewGuid().ToString(); | |||||
empInfoIBLL.SaveEntity(keyValue, entity); | |||||
return Success(new { data = entity, info = "保存成功" }); | |||||
return Success("教师注册功能已关闭"); | |||||
} | } | ||||
@@ -63,11 +63,15 @@ | |||||
<div class="lr-form-item-title">修读对象</div> | <div class="lr-form-item-title">修读对象</div> | ||||
<div id="WhoStudy"></div> | <div id="WhoStudy"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="LessonInfo"> | |||||
<div class="col-xs-4 lr-form-item" data-table="LessonInfo"> | |||||
<div class="lr-form-item-title">考核方式<font face="宋体">*</font></div> | |||||
<div id="AssessmentMethodNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="LessonInfo"> | |||||
<div class="lr-form-item-title">课程分类<font face="宋体">*</font></div> | <div class="lr-form-item-title">课程分类<font face="宋体">*</font></div> | ||||
<div id="LessonSortNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="LessonSortNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="LessonInfo"> | |||||
<div class="col-xs-4 lr-form-item" data-table="LessonInfo"> | |||||
<div class="lr-form-item-title">课程分类明细</div> | <div class="lr-form-item-title">课程分类明细</div> | ||||
<div id="LessonSortDetailNo"></div> | <div id="LessonSortDetailNo"></div> | ||||
</div> | </div> | ||||
@@ -51,6 +51,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
$('#HaveBeforeLesson').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#HaveBeforeLesson').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#AssessmentMethodNo').lrDataItemSelect({ code: 'AssessmentMethod' }); | |||||
$('#BeforeLesson').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | $('#BeforeLesson').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | ||||
$('#WhoStudy').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | $('#WhoStudy').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | ||||
$('#LessonSortNo').lrDataSourceSelect({ code: 'CdLessonSort', value: 'lessonsortno', text: 'lessonsortname' }); | $('#LessonSortNo').lrDataSourceSelect({ code: 'CdLessonSort', value: 'lessonsortno', text: 'lessonsortname' }); | ||||
@@ -222,6 +222,18 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "考核方式", name: "AssessmentMethodNo", width: 120, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'AssessmentMethod', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: "课程分类", name: "LessonSortNo", width: 150, align: "left", | label: "课程分类", name: "LessonSortNo", width: 150, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
@@ -307,7 +319,19 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}, { | |||||
label: "考核方式", name: "AssessmentMethodNo", width: 120, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'AssessmentMethod', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | }, | ||||
{ | { | ||||
label: "课程分类", name: "LessonSortNo", width: 150, align: "left", | label: "课程分类", name: "LessonSortNo", width: 150, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
@@ -16,12 +16,12 @@ | |||||
<input id="StuCode" type="text" class="form-control" /> | <input id="StuCode" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">考生号<font face="宋体">*</font></div> | |||||
<input id="ksh" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">考生号</div> | |||||
<input id="ksh" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">通知书号<font face="宋体">*</font></div> | |||||
<input id="NoticeNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">通知书号</div> | |||||
<input id="NoticeNo" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | <div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | ||||
@@ -48,8 +48,8 @@ | |||||
<div id="PartyFaceNo"></div> | <div id="PartyFaceNo"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">出生日期<font face="宋体">*</font></div> | |||||
<input id="Birthday" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#Birthday').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">出生日期</div> | |||||
<input id="Birthday" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#Birthday').trigger('change'); } })"/> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">健康状况</div> | <div class="lr-form-item-title">健康状况</div> | ||||
@@ -80,24 +80,24 @@ | |||||
<input id="EMail" type="text" class="form-control" /> | <input id="EMail" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">开户银行<font face="宋体">*</font></div> | |||||
<div id="DepositBank" isvalid="yes" checkexpession="NotNull"></div> | |||||
<div class="lr-form-item-title">开户银行</div> | |||||
<div id="DepositBank"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">开户卡账号<font face="宋体">*</font></div> | |||||
<input id="BankCard" type="text" class="form-control" isvalid="yes" checkexpession="BankCard" /> | |||||
<div class="lr-form-item-title">开户卡账号</div> | |||||
<input id="BankCard" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">开户银行位置</div> | <div class="lr-form-item-title">开户银行位置</div> | ||||
<input id="BankLocation" type="text" class="form-control" /> | <input id="BankLocation" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">通信地址<font face="宋体">*</font></div> | |||||
<input id="MailAddress" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">通信地址</div> | |||||
<input id="MailAddress" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">邮政编码<font face="宋体">*</font></div> | |||||
<input id="PostalCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">邮政编码</div> | |||||
<input id="PostalCode" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-12 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">户口所在地</div> | <div class="lr-form-item-title">户口所在地</div> | ||||
@@ -176,8 +176,8 @@ | |||||
<div id="EduSystem"></div> | <div id="EduSystem"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">报到日期<font face="宋体">*</font></div> | |||||
<input id="RegisterDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#RegisterDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">报到日期</div> | |||||
<input id="RegisterDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#RegisterDate').trigger('change'); } })"/> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">学习形式</div> | <div class="lr-form-item-title">学习形式</div> | ||||
@@ -208,8 +208,8 @@ | |||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">入学年月<font face="宋体">*</font></div> | |||||
<input id="EntranceDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#EntranceDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">入学年月</div> | |||||
<input id="EntranceDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#EntranceDate').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-4 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">入党时间</div> | <div class="lr-form-item-title">入党时间</div> | ||||
@@ -82,7 +82,26 @@ var bootstrap = function ($, learun) { | |||||
{ label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, | { label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, | ||||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | { label: '科目', name: 'LessonName', width: 300, align: "left" }, | ||||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | { label: '学分', name: 'StudyScore', width: 50, align: "left" }, | ||||
{ label: '成绩', name: 'Score', width: 100, align: "left" }, | |||||
{ | |||||
label: '成绩', name: 'Score', width: 100, align: "left", | |||||
formatter: function (value, row) { | |||||
if (row.ExamType ==="1") { | |||||
return value; | |||||
} else { | |||||
if (value >= 80 && value <= 100) { | |||||
return 'A'; | |||||
} else if (value >= 60 && value < 80) { | |||||
return 'B'; | |||||
} else if (value >= 40 && value < 60) { | |||||
return 'C'; | |||||
} else if (value >= 0 && value < 40) { | |||||
return 'D'; | |||||
} else { | |||||
return '无效分数'; // 处理无效分数 | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
{ label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | { label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | ||||
{ label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | { label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | ||||
{ label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, | { label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, | ||||
@@ -6,6 +6,7 @@ using System.Collections.Generic; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | using Learun.Application.TwoDevelopment.EducationalAdministration; | ||||
using Learun.Application.TwoDevelopment.EvaluationTeach; | using Learun.Application.TwoDevelopment.EvaluationTeach; | ||||
using System.Linq; | using System.Linq; | ||||
using Learun.Application.Organization; | |||||
namespace Learun.Application.Web.Areas.EvaluationTeach.Controllers | namespace Learun.Application.Web.Areas.EvaluationTeach.Controllers | ||||
{ | { | ||||
@@ -185,7 +186,12 @@ namespace Learun.Application.Web.Areas.EvaluationTeach.Controllers | |||||
var data = ask_MainIBLL.GetTeacherIndexPageList2(null, queryJson); | var data = ask_MainIBLL.GetTeacherIndexPageList2(null, queryJson); | ||||
return Success(data); | return Success(data); | ||||
} | } | ||||
[HttpGet] | |||||
public ActionResult GetDissatisfiedExport(string keyValue) | |||||
{ | |||||
ask_MainIBLL.GetExportList(keyValue); | |||||
return Success("导出成功。"); | |||||
} | |||||
[HttpGet] | [HttpGet] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetTeacherIndexPageList2(string pagination, string queryJson) | public ActionResult GetTeacherIndexPageList2(string pagination, string queryJson) | ||||
@@ -35,6 +35,7 @@ | |||||
<a id="lr_teacher" class="btn btn-default"><i class="fa fa-envelope-open"></i> 教师被评情况</a> | <a id="lr_teacher" class="btn btn-default"><i class="fa fa-envelope-open"></i> 教师被评情况</a> | ||||
<a id="lr_teacher2" class="btn btn-default"><i class="fa fa-envelope-open"></i> 教师被评情况2</a> | <a id="lr_teacher2" class="btn btn-default"><i class="fa fa-envelope-open"></i> 教师被评情况2</a> | ||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看问卷</a> | <a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看问卷</a> | ||||
<a id="lr_export" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 不满意结果导出</a> | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | <a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | ||||
@@ -54,6 +54,13 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//导出 | |||||
$('#lr_export').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
location.href = top.$.rootUrl + "/EvaluationTeach/Eval_Main/GetDissatisfiedExport?keyValue=" + keyValue; | |||||
} | |||||
}); | |||||
// 删除 | // 删除 | ||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('VID'); | var keyValue = $('#gridtable').jfGridValue('VID'); | ||||
@@ -165,6 +165,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("INTRODUCTION")] | [Column("INTRODUCTION")] | ||||
public string Introduction { get; set; } | public string Introduction { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 考核方式 | |||||
/// </summary> | |||||
[Column("ASSESSMENTMETHODNO")] | |||||
public string AssessmentMethodNo { get; set; } | |||||
/// <summary> | |||||
/// SyncFlag | /// SyncFlag | ||||
/// </summary> | /// </summary> | ||||
[Column("SYNCFLAG")] | [Column("SYNCFLAG")] | ||||
@@ -2093,7 +2093,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||||
tableName = queryParam["TableName"].ToString(); | tableName = queryParam["TableName"].ToString(); | ||||
} | } | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,bb.Score,bb.Remark,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); | |||||
strSql.Append(" select p.ExamType,bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,bb.Score,bb.Remark,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); | |||||
strSql.Append(" from ( "); | strSql.Append(" from ( "); | ||||
strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,Max(s.Score) as Score,MAX(s.Remark) as Remark from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); | strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,Max(s.Score) as Score,MAX(s.Remark) as Remark from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); | ||||
strSql.Append(" where 1=1 and s.CheckMark='1' "); | strSql.Append(" where 1=1 and s.CheckMark='1' "); | ||||
@@ -2124,6 +2124,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||||
strSql.Append(" left join LessonInfo li on bb.LessonNo= li.LessonNo and li.CheckMark='1' "); | strSql.Append(" left join LessonInfo li on bb.LessonNo= li.LessonNo and li.CheckMark='1' "); | ||||
strSql.Append(" left join CdMajor cm on bb.MajorNo= cm.MajorNo and cm.CheckMark='1' "); | strSql.Append(" left join CdMajor cm on bb.MajorNo= cm.MajorNo and cm.CheckMark='1' "); | ||||
strSql.Append(" left join ClassInfo ci on bb.ClassNo= ci.ClassNo and ci.CheckMark='1' "); | strSql.Append(" left join ClassInfo ci on bb.ClassNo= ci.ClassNo and ci.CheckMark='1' "); | ||||
strSql.Append(" left join OpenLessonPlan p on bb.AcademicYearNo=p.AcademicYearNo and bb.Semester=p.Semester and bb.MajorNo=p.MajorNo and bb.LessonNo=p.LessonNo and bb.LessonSortNo=p.LessonSortNo"); | |||||
var result = this.BaseRepository("CollegeMIS").FindList<StuScoreEntity>(strSql.ToString(), dp); | var result = this.BaseRepository("CollegeMIS").FindList<StuScoreEntity>(strSql.ToString(), dp); | ||||
@@ -323,6 +323,50 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach | |||||
} | } | ||||
} | } | ||||
public void GetExportList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
//取出数据源 | |||||
DataTable exportTable = ask_MainService.GetExportList(keyValue); | |||||
//设置导出格式 | |||||
ExcelConfig excelconfig = new ExcelConfig(); | |||||
excelconfig.Title = "评教不满意结果导出"; | |||||
excelconfig.TitleFont = "微软雅黑"; | |||||
excelconfig.TitlePoint = 23; | |||||
excelconfig.FileName = "不满意结果导出.xls"; | |||||
excelconfig.IsAllSizeColumn = true; | |||||
//每一列的设置,没有设置的列信息,系统将按datatable中的列名导出 | |||||
excelconfig.ColumnEntity = new List<ColumnModel> | |||||
{ | |||||
new ColumnModel() { Column = "uname", ExcelColumn = "评教学生" }, | |||||
new ColumnModel() { Column = "uid", ExcelColumn = "学生账号" }, | |||||
new ColumnModel() { Column = "empno", ExcelColumn = "教师编号" }, | |||||
new ColumnModel() { Column = "empname", ExcelColumn = "被评教师" }, | |||||
new ColumnModel() { Column = "utext", ExcelColumn = "不满意内容" }, | |||||
new ColumnModel() { Column = "utime", ExcelColumn = "评教时间" }, | |||||
new ColumnModel() { Column = "qtitle", ExcelColumn = "问题标题" }, | |||||
new ColumnModel() { Column = "vtitle", ExcelColumn = "评教标题" }, | |||||
new ColumnModel() { Column = "academicyearno", ExcelColumn = "学年" }, | |||||
new ColumnModel() { Column = "semester", ExcelColumn = "学期" }, | |||||
new ColumnModel() { Column = "vserial", ExcelColumn = "评教编号" } | |||||
}; | |||||
//调用导出方法 | |||||
ExcelHelper.ExcelDownload(exportTable, excelconfig); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -76,5 +76,9 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach | |||||
string LessonNo); | string LessonNo); | ||||
bool HasEnabled(string keyValue); | bool HasEnabled(string keyValue); | ||||
/// <summary> | |||||
/// 不满意结果导出 | |||||
/// </summary> | |||||
void GetExportList(string keyValue); | |||||
} | } | ||||
} | } |
@@ -82,7 +82,7 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach | |||||
strSql_Elective.Append("left join Eval_Main b on a.AcademicYearNo=b.AcademicYearNo and a.Semester=b.Semester where b.Status=1 and a.StuNo='" + queryParam["StuNo"] + "' and a.StuNo not in (select StuNo from " + misdbname + ".dbo.StuInfoBasic where ChangeStatus=1) ) aa "); | strSql_Elective.Append("left join Eval_Main b on a.AcademicYearNo=b.AcademicYearNo and a.Semester=b.Semester where b.Status=1 and a.StuNo='" + queryParam["StuNo"] + "' and a.StuNo not in (select StuNo from " + misdbname + ".dbo.StuInfoBasic where ChangeStatus=1) ) aa "); | ||||
strSql_Elective.Append("left join (select distinct b.EmpNo, b.LessonNo, b.UID from Eval_Question a left join Eval_QuestionResult b on a.QID=b.QID left join Eval_Main m on a.VID=m.VID where m.Status=1) bb on aa.EmpNo=bb.EmpNo and aa.LessonNo=bb.LessonNo and aa.StuNo=bb.UID "); | strSql_Elective.Append("left join (select distinct b.EmpNo, b.LessonNo, b.UID from Eval_Question a left join Eval_QuestionResult b on a.QID=b.QID left join Eval_Main m on a.VID=m.VID where m.Status=1) bb on aa.EmpNo=bb.EmpNo and aa.LessonNo=bb.LessonNo and aa.StuNo=bb.UID "); | ||||
strSql_Elective.Append("left join " + misdbname + ".dbo.EmpInfo cc on aa.EmpNo=cc.EmpNo left join " + misdbname + ".dbo.LessonInfo dd on aa.LessonNo = dd.LessonNo "); | strSql_Elective.Append("left join " + misdbname + ".dbo.EmpInfo cc on aa.EmpNo=cc.EmpNo left join " + misdbname + ".dbo.LessonInfo dd on aa.LessonNo = dd.LessonNo "); | ||||
if (pagination != null) | if (pagination != null) | ||||
{ | { | ||||
//var l1 = this.BaseRepository().FindList<Eval_QuestionResultEntity>(strSql.ToString(), pagination); | //var l1 = this.BaseRepository().FindList<Eval_QuestionResultEntity>(strSql.ToString(), pagination); | ||||
@@ -572,7 +572,7 @@ where 1=1 "); | |||||
strSql.Append(" and cc.EmpName like '%" + queryParam["keyword"] + "%' "); | strSql.Append(" and cc.EmpName like '%" + queryParam["keyword"] + "%' "); | ||||
} | } | ||||
strSql.Append(" order by ss.EmpNo,ss.LessonNo"); | strSql.Append(" order by ss.EmpNo,ss.LessonNo"); | ||||
return this.BaseRepository().FindList<Eval_QuestionResultEntity>(strSql.ToString()); | return this.BaseRepository().FindList<Eval_QuestionResultEntity>(strSql.ToString()); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -602,7 +602,7 @@ where 1=1 "); | |||||
{ | { | ||||
string sql = @"select c.* from [dbo].[Eval_Main] a left join [dbo].[Eval_Question] b on a.vid=b.vid | string sql = @"select c.* from [dbo].[Eval_Main] a left join [dbo].[Eval_Question] b on a.vid=b.vid | ||||
left join[dbo].[Eval_QuestionResult] c on b.qid=c.qid | left join[dbo].[Eval_QuestionResult] c on b.qid=c.qid | ||||
where a.vid='"+keyValue+"' and c.empno='"+EmpNo+"' and c.lessonno= '"+LessonNo+"' and c.uid= '"+stuno+"'"; | |||||
where a.vid='" + keyValue + "' and c.empno='" + EmpNo + "' and c.lessonno= '" + LessonNo + "' and c.uid= '" + stuno + "'"; | |||||
return BaseRepository().FindList<Eval_QuestionResultEntity>(sql); | return BaseRepository().FindList<Eval_QuestionResultEntity>(sql); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -642,5 +642,34 @@ where 1=1 "); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public DataTable GetExportList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
var misdbname = BaseRepository("CollegeMIS").getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append( | |||||
@"SELECT a.UName,a.UID,a.EmpNo,d.EmpName,a.UText,a.UTime,b.QTitle,c.VTitle,c.AcademicYearNo,c.Semester,c.VSerial | |||||
FROM [dbo].[Eval_QuestionResult] a | |||||
LEFT JOIN Eval_Question b on b.QID=a.QID | |||||
LEFT JOIN Eval_Main c on b.VID=c.VID | |||||
LEFT JOIN " + misdbname + @".dbo.EmpInfo d on d.EmpNo=a.EmpNo | |||||
where UText IS NOT NULL | |||||
AND c.VID='" + keyValue + "' ORDER BY a.UTime DESC"); | |||||
return this.BaseRepository().FindTable(strSql.ToString()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
} | } |