@@ -913,7 +913,7 @@ namespace Learun.Application.Organization | |||
/// 重置密码 | |||
/// </summary> | |||
/// <param name="keyValue">账号主键</param> | |||
public void ResetPassword(string keyValue) | |||
public void ResetPassword(string keyValue, string defaultpwd) | |||
{ | |||
try | |||
{ | |||
@@ -927,7 +927,7 @@ namespace Learun.Application.Organization | |||
{ | |||
cache.Remove(cacheKeyId + item, CacheId.user); | |||
} | |||
string password = Md5Helper.Encrypt(ConfigurationManager.AppSettings["defaultpwd"], 32).ToLower(); | |||
string password = Md5Helper.Encrypt(defaultpwd, 32).ToLower(); | |||
userService.RevisePasswordBatch(keyValue, password); | |||
} | |||
catch (Exception ex) | |||
@@ -964,7 +964,7 @@ namespace Learun.Application.Organization | |||
/// 重置密码(八位) | |||
/// </summary> | |||
/// <param name="keyValue">账号主键</param> | |||
public void ResetPasswordEight(string keyValue) | |||
public void ResetPasswordEight(string keyValue, string defaultpwd) | |||
{ | |||
try | |||
{ | |||
@@ -972,7 +972,7 @@ namespace Learun.Application.Organization | |||
{ | |||
cache.Remove(cacheKeyId + item, CacheId.user); | |||
} | |||
string password = Md5Helper.Encrypt(ConfigurationManager.AppSettings["defaultpwdeight"], 32).ToLower(); | |||
string password = Md5Helper.Encrypt(defaultpwd, 32).ToLower(); | |||
userService.RevisePasswordBatch(keyValue, password); | |||
} | |||
catch (Exception ex) | |||
@@ -130,12 +130,12 @@ namespace Learun.Application.Organization | |||
/// 重置密码 | |||
/// </summary> | |||
/// <param name="keyValue">账号主键</param> | |||
void ResetPassword(string keyValue); | |||
void ResetPassword(string keyValue, string defaultpwd); | |||
/// <summary> | |||
/// 重置密码(八位) | |||
/// </summary> | |||
/// <param name="keyValue">账号主键</param> | |||
void ResetPasswordEight(string keyValue); | |||
void ResetPasswordEight(string keyValue, string defaultpwd); | |||
/// <summary> | |||
/// 修改用户状态 | |||
/// </summary> | |||
@@ -186,7 +186,7 @@ namespace Learun.Application.Organization | |||
/// <param name="userId">用户ID</param> | |||
void GetImg(string userId); | |||
void setPassword(string userid,string pwd); | |||
void setPassword(string userid, string pwd); | |||
List<UserEntity> GetStudents(); | |||
#endregion | |||
@@ -76,6 +76,21 @@ var bootstrap = function ($, learun) { | |||
$("#ClassNosName").val($("#ClassNos").find(".lr-select-placeholder").text()); | |||
$("#GradeNosName").val($("#GradeNos").find(".lr-select-placeholder").text()); | |||
$("#LessonNosName").val($("#LessonNos").find(".lr-select-placeholder").text()); | |||
if ($("#DeptNosName").val() == "==请选择==") { | |||
$("#DeptNosName").val(""); | |||
} | |||
if ($("#MajorNosName").val() == "==请选择==") { | |||
$("#MajorNosName").val(""); | |||
} | |||
if ($("#ClassNosName").val() == "==请选择==") { | |||
$("#ClassNosName").val(""); | |||
} | |||
if ($("#GradeNosName").val() == "==请选择==") { | |||
$("#GradeNosName").val(""); | |||
} | |||
if ($("#LessonNosName").val() == "==请选择==") { | |||
$("#LessonNosName").val(""); | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
@@ -59,6 +59,9 @@ var bootstrap = function ($, learun) { | |||
return false; | |||
} | |||
$("#DepartmentIdsName").val($("#DepartmentIds").find(".lr-select-placeholder").text()); | |||
if ($("#DepartmentIdsName").val() == "==请选择==") { | |||
$("#DepartmentIdsName").val(""); | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
@@ -124,9 +124,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoCancelPunish(string keyValue, bool status, string File) | |||
public ActionResult DoCancelPunish(string keyValue, bool status, string File,string CancelFileNo) | |||
{ | |||
stuPunishmentIBLL.DoCancelPunish(keyValue, status, File); | |||
stuPunishmentIBLL.DoCancelPunish(keyValue, status, File,CancelFileNo); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
#endregion | |||
@@ -82,8 +82,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var TeachPlanData = teachPlanIBLL.GetTeachPlanEntity( keyValue ); | |||
var jsonData = new { | |||
var TeachPlanData = teachPlanIBLL.GetTeachPlanEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
TeachPlan = TeachPlanData, | |||
}; | |||
return Success(jsonData); | |||
@@ -114,8 +115,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
UserInfo userInfo = LoginUserInfo.Get(); TeachPlanEntity entity = strEntity.ToObject<TeachPlanEntity>(); | |||
teachPlanIBLL.SaveEntity(userInfo,keyValue,entity); | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
TeachPlanEntity entity = strEntity.ToObject<TeachPlanEntity>(); | |||
var planList = teachPlanIBLL.GetPlan(entity.PlanNo); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (planList != null) | |||
{ | |||
return Fail("计划号已存在!"); | |||
} | |||
} | |||
else | |||
{ | |||
if (planList != null && planList.ID != keyValue) | |||
{ | |||
return Fail("计划号已存在!"); | |||
} | |||
} | |||
teachPlanIBLL.SaveEntity(userInfo, keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
@@ -39,21 +39,21 @@ var bootstrap = function ($, learun) { | |||
value: "ccode", | |||
text: "cname", | |||
maxHeight: 200, | |||
select: function (item) { | |||
if (item) { | |||
var code = $("#City").lrselectGet(); | |||
//县区 | |||
$('#County').lrselectRefresh({ | |||
allowSearch: true, | |||
//type: 'multiple', | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||
param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, | |||
value: "acode", | |||
text: "aname", | |||
maxHeight: 200, | |||
}); | |||
} | |||
} | |||
//select: function (item) { | |||
// if (item) { | |||
// var code = $("#City").lrselectGet(); | |||
// //县区 | |||
// $('#County').lrselectRefresh({ | |||
// allowSearch: true, | |||
// //type: 'multiple', | |||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', | |||
// param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " }, | |||
// value: "acode", | |||
// text: "aname", | |||
// maxHeight: 200, | |||
// }); | |||
// } | |||
//} | |||
}); | |||
//县区 | |||
$('#County').lrselect({ | |||
@@ -31,7 +31,7 @@ | |||
<li>性 别 : {{studentInfo.GenderNo | sex}}</li> | |||
<li>出生日期 : {{studentInfo.Birthday | date}}</li> | |||
<li>联系电话 : {{studentInfo.mobile}}</li> | |||
<li>校 区 : {{baseInfo.companyId | company}}</li> | |||
<li>校 区 : {{baseInfo.F_SchoolId | company}}</li> | |||
<li>学 号 : {{studentInfo.StuNo}}</li> | |||
<li>本 专 科 : {{studentInfo.GraduateNo | graduateNo}}</li> | |||
<li>年 级 : {{studentInfo.Grade}}</li> | |||
@@ -11,9 +11,9 @@ | |||
.StuScoreBox { | |||
text-align: left; | |||
} | |||
.StuScoreBox .tableTxt { | |||
display: inline-block; | |||
} | |||
.StuScoreBox .tableTxt { | |||
display: inline-block; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
@@ -27,7 +27,7 @@ | |||
<td>学号</td> | |||
<td>@Model.StuNo</td> | |||
<td>性别</td> | |||
<td id="GenderNo">@Model.GenderNo</td> | |||
<td id="GenderNo">@Model.GenderNo.ToString()</td> | |||
<td rowspan="3"> | |||
<div class="tableImg"><img src="@Model.Photo" alt=""></div> | |||
</td> | |||
@@ -125,7 +125,7 @@ | |||
var msgObject = $.parseJSON(msg); | |||
if (msgObject.code == 200) { | |||
$.each(msgObject.data, function (i, item) { | |||
if (item["F_ItemValue"] == valueStr) { | |||
if (item["F_ItemValue"] == valueStr.toLocaleLowerCase()) { | |||
$(box).html(item["F_ItemName"]); | |||
return; | |||
} | |||
@@ -138,7 +138,7 @@ | |||
return; | |||
}; | |||
GetDataItemStr("usersexbit", "@Model.GenderNo","#GenderNo"); | |||
GetDataItemStr("BCdNationality", "@Model.NationalityNo","#NationalityNo"); | |||
GetDataItemStr("National", "@Model.NationalityNo","#NationalityNo"); | |||
GetDataSourceStr("CdDeptInfo", "deptno", "deptname", "@Model.DeptNo", "#DeptNo"); | |||
GetDataSourceStr("CdMajorInfo", "majorno", "majorname", "@Model.MajorNo", "#MajorNo"); | |||
GetDataSourceStr("bjsj", "classno", "classname", "@Model.ClassNo", "#ClassNo"); | |||
@@ -114,7 +114,8 @@ var bootstrap = function ($, learun) { | |||
//取消分配 | |||
$("#btn_CancelApply").on("click", function () { | |||
if (selectedItem.ID) { | |||
var data = $('#gridtable2').jfGridGet('rowdata'); | |||
var data = $('#gridtable').jfGridGet('rowdata'); | |||
console.log(data, "btn_CancelApply"); | |||
if (data.length > 0) { | |||
learun.layerConfirm('是否确认取消分配班级 [' + selectedItem.Name + ']', | |||
function (res) { | |||
@@ -23,9 +23,9 @@ var bootstrap = function ($, learun) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
var EmpNo = postData.EmpNo; | |||
var CancelFileNo = postData.CancelFileNo; | |||
var File = postData.CancelFilePatch; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: true, File: File }, function () { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: true, File: File, CancelFileNo: CancelFileNo }, function () { | |||
}); | |||
if (!!callBack) { | |||
callBack(); | |||
@@ -4,8 +4,8 @@ | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="TeachPlan" > | |||
<div class="lr-form-item-title">计划号</div> | |||
<input id="PlanNo" type="text" class="form-control" /> | |||
<div class="lr-form-item-title">计划号<font face="宋体">*</font></div> | |||
<input id="PlanNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="TeachPlan" > | |||
<div class="lr-form-item-title">版本号</div> | |||
@@ -6,6 +6,8 @@ using Learun.Application.Base.AuthorizeModule; | |||
using System.Linq; | |||
using System; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Configuration; | |||
namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
{ | |||
@@ -22,6 +24,7 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | |||
private UserRelationIBLL userRelationIBLL = new UserRelationBLL(); | |||
private RoleIBLL roleIBLL = new RoleBLL(); | |||
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); | |||
#region 获取视图 | |||
@@ -334,7 +337,13 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
[AjaxOnly] | |||
public ActionResult ResetPassword(string keyValue) | |||
{ | |||
userIBLL.ResetPassword(keyValue); | |||
string defpwd = ConfigurationManager.AppSettings["defaultpwd"]; | |||
//读取默认密码配置中已启用的密码 | |||
if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null) | |||
{ | |||
defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd; | |||
} | |||
userIBLL.ResetPassword(keyValue, defpwd); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
@@ -346,7 +355,13 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
[AjaxOnly] | |||
public ActionResult ResetPasswordEight(string keyValue) | |||
{ | |||
userIBLL.ResetPasswordEight(keyValue); | |||
string defpwd = ConfigurationManager.AppSettings["defaultpwdeight"]; | |||
//读取默认密码配置中已启用的密码 | |||
if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null) | |||
{ | |||
defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd; | |||
} | |||
userIBLL.ResetPasswordEight(keyValue, defpwd); | |||
return Success("操作成功!"); | |||
} | |||
@@ -2163,6 +2163,7 @@ | |||
<Content Include="Content\images\LoginPage\del2.png" /> | |||
<Content Include="Content\images\LoginPage\del3.png" /> | |||
<Content Include="Content\images\LoginPage\download.png" /> | |||
<Content Include="Content\images\LoginPage\download2.jpg" /> | |||
<Content Include="Content\images\LoginPage\icon.png" /> | |||
<Content Include="Content\images\LoginPage\iphoneLogin.png" /> | |||
<Content Include="Content\images\LoginPage\iphoneLogin3.png" /> | |||
@@ -2203,9 +2204,11 @@ | |||
<Content Include="Content\images\LoginPage\tips3.png" /> | |||
<Content Include="Content\images\LoginPage\tips4.png" /> | |||
<Content Include="Content\images\LoginPage\tips5.png" /> | |||
<Content Include="Content\images\LoginPage\title.jpg" /> | |||
<Content Include="Content\images\LoginPage\true2.png" /> | |||
<Content Include="Content\images\LoginPage\variCode.png" /> | |||
<Content Include="Content\images\LoginPage\verCode.png" /> | |||
<Content Include="Content\images\LoginPage\wq.jpg" /> | |||
<Content Include="Content\images\LoginPage\wxLogin.png" /> | |||
<Content Include="Content\images\LoginPage\xxlogo.png" /> | |||
<Content Include="Content\images\LoginPage\zuo.png" /> | |||
@@ -168,7 +168,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
opfirst.LessonSection +=","+ oplast.LessonSection; | |||
opfirst.LessonTime += "," + oplast.LessonTime; | |||
db.Update(opfirst); | |||
db.ExecuteBySql("insert into OpenLessonPlanOfElectiveDel select * from OpenLessonPlanOfElective where id='"+ oplast.Id+ "'"); | |||
db.ExecuteBySql($@"insert into OpenLessonPlanOfElectiveDel(Id, MakeDate, AcademicYearNo, Semester, LessonNo, PartCode, LessonName, LessonSortNo, LessonSortDetailNo, LessonSection, LessonTime, StudyScore, StartWeek, EndWeek, StartDate, EndDate, CheckStyleNo, ScoreRecordStyleNo, EmpNo, EmpName, ClassRoomNo, ClassRoomName, CheckMark, StuNumMax, StuNum, ModifyTime, ModifyUserId, ModifyUserName, F_SchoolId ) | |||
select Id, MakeDate, AcademicYearNo, Semester, LessonNo, PartCode, LessonName, LessonSortNo, LessonSortDetailNo, LessonSection, LessonTime, StudyScore, StartWeek, EndWeek, StartDate, EndDate, CheckStyleNo, ScoreRecordStyleNo, EmpNo, EmpName, ClassRoomNo, ClassRoomName, CheckMark, StuNumMax, StuNum, ModifyTime, ModifyUserId, ModifyUserName, F_SchoolId from OpenLessonPlanOfElective | |||
where id ='"+ oplast.Id+ "'"); | |||
db.Delete(oplast); | |||
db.Commit(); | |||
} | |||
@@ -425,6 +425,13 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi | |||
UserIBLL userIBLL = new UserBLL(); | |||
var alluserlist = userIBLL.GetAllList().Where(m => m.F_Description == "教师"); | |||
var roleId = Config.GetValue("GenerateTeachersRoleId"); | |||
var defaultpwd = Config.GetValue("defaultpwd"); | |||
//读取默认密码配置中已启用的密码 | |||
var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true); | |||
if (Sys_DefaultPwdConfigEntity != null) | |||
{ | |||
defaultpwd = Sys_DefaultPwdConfigEntity.Pwd; | |||
} | |||
var studentList = new List<UserEntity>(); | |||
foreach (var tEntity in teacherList) | |||
{ | |||
@@ -444,7 +451,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi | |||
userbase.F_Account = tEntity.EmpNo; | |||
userbase.F_RealName = tEntity.EmpName; | |||
userbase.F_EnCode = tEntity.EmpNo; | |||
userbase.F_Password = Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32).ToLower(); | |||
userbase.F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower(); | |||
userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url; | |||
userbase.F_Gender = tEntity.GenderNo.HasValue ? Convert.ToInt32(tEntity.GenderNo.Value) : 1; | |||
userbase.F_DeleteMark = 0; | |||
@@ -327,32 +327,28 @@ where l.EPLId='{EPLId}' | |||
//排考记录表 | |||
var examPlan = db.FindEntity<Exam_ExamPlanEntity>(EPId); | |||
//查询当前考试记录所有考试课程 | |||
var lessonList = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == EPId); | |||
var lessonList = db.FindList<Exam_ExamPlanLessonEntity>($@"select a.*,b.MajorNo as TeachMajorNo FROM [dbo].[Exam_ExamPlanLesson] a | |||
left join [dbo].[Exam_ExamPlan] c on c.epid=a.epid | |||
left join [dbo].[Exam_ExamLesson] b on a.lessonno=b.lessonno and b.AcademicYearNo=c.AcademicYearNo and b.Semester=c.Semester and b.Grade=a.Grade | |||
where a.EPId='{EPId}'"); | |||
foreach (var lesson in lessonList) | |||
{ | |||
var lessonno = lesson.LessonNo; | |||
if (lesson.LessonNo.Contains("(")) | |||
{ | |||
lessonno = lesson.LessonNo.Split('(')[0]; | |||
} | |||
//查询课程信息 | |||
var lessoninfo = db.FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,l.* from lessoninfo l | |||
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{lessonno}' ").FirstOrDefault(); | |||
if (lessoninfo != null) | |||
var cdLessonType = db.FindEntity<CdLessonTypeEntity>(lesson.LessonTypeId); | |||
if (cdLessonType != null) | |||
{ | |||
if (lessoninfo.LessonTypeName.Contains("专业")) | |||
if (cdLessonType.LessonTypeName.Contains("专业")) | |||
{ | |||
//专业课添加此专业的所有班级 | |||
var addSql = $@"insert into Exam_ExamPlanClass | |||
SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t | |||
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.Grade='{lesson.Grade}' | |||
and t.ESType='{examPlan.PlanType}' and c.majorno='{lessoninfo.TeachMajorNo}' | |||
and t.ESType='{examPlan.PlanType}' and c.majorno='{lesson.TeachMajorNo}' | |||
and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') | |||
group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; | |||
db.ExecuteBySql(addSql); | |||
} | |||
else if (lessoninfo.LessonTypeName.Contains("公共") || lessoninfo.LessonTypeName.Contains("公开")) | |||
else if (cdLessonType.LessonTypeName.Contains("公共") || cdLessonType.LessonTypeName.Contains("公开")) | |||
{ | |||
//公共课添加所有班级 | |||
var addSql = $@"insert into Exam_ExamPlanClass | |||
@@ -776,9 +776,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
UserIBLL userIBLL = new UserBLL(); | |||
try | |||
{ | |||
var stuInfoBasicEntities = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(m => m.CheckMark != "0"); | |||
var alluserlist = userIBLL.GetAllList().Where(m => m.F_Description == "学生"); | |||
var roleId = Config.GetValue("GenerateStudentsRoleId"); | |||
var defaultpwd = Config.GetValue("defaultpwd"); | |||
//读取默认密码配置中已启用的密码 | |||
var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true); | |||
if (Sys_DefaultPwdConfigEntity != null) | |||
{ | |||
defaultpwd = Sys_DefaultPwdConfigEntity.Pwd; | |||
} | |||
var studentList = new List<UserEntity>(); | |||
foreach (var tEntity in stuInfoBasicEntities) | |||
{ | |||
@@ -800,7 +808,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
userbase.F_Account = tEntity.StuNo; | |||
userbase.F_RealName = tEntity.StuName; | |||
userbase.F_EnCode = tEntity.StuNo; | |||
userbase.F_Password = Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32).ToLower(); | |||
userbase.F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower(); | |||
userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url; | |||
userbase.F_Gender = tEntity.GenderNo.HasValue ? Convert.ToInt32(tEntity.GenderNo.Value) : 1; | |||
userbase.F_DeleteMark = 0; | |||
@@ -1279,7 +1279,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
UserRelationIBLL userRelationIBLL = new UserRelationBLL(); | |||
UserIBLL userIBLL = new UserBLL(); | |||
var defaultpwd = Config.GetValue("defaultpwd"); | |||
//读取默认密码配置中已启用的密码 | |||
var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true); | |||
if (Sys_DefaultPwdConfigEntity != null) | |||
{ | |||
defaultpwd = Sys_DefaultPwdConfigEntity.Pwd; | |||
} | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
@@ -1308,7 +1314,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
F_Account = entity.StuNo, | |||
F_RealName = entity.StuName, | |||
F_EnCode = entity.StuNo, | |||
F_Password = Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32).ToLower(), | |||
F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower(), | |||
F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url, | |||
F_Gender = entity.GenderNo == "1" ? 1 : 0, | |||
F_DeleteMark = 0, | |||
@@ -216,11 +216,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DoCancelPunish(string keyValue, bool status,string File) | |||
public void DoCancelPunish(string keyValue, bool status,string File, string CancelFileNo) | |||
{ | |||
try | |||
{ | |||
stuPunishmentService.DoCancelPunish(keyValue, status, File); | |||
stuPunishmentService.DoCancelPunish(keyValue, status, File, CancelFileNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -73,7 +73,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
void DoCancelPunish(string keyValue, bool status, string File); | |||
void DoCancelPunish(string keyValue, bool status, string File,string CancelFileNo); | |||
#endregion | |||
} | |||
@@ -244,16 +244,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DoCancelPunish(string keyValue, bool status, string File) | |||
public void DoCancelPunish(string keyValue, bool status, string File, string CancelFileNo) | |||
{ | |||
try | |||
{ | |||
var userList = LoginUserInfo.Get(); | |||
var keyvalue = Convert.ToInt32(keyValue); | |||
//var keyvalue = Convert.ToInt32(keyValue); | |||
if (status) | |||
{ | |||
//解除处分 | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelUser='" + userList.realName + "',CancelPunishDate='" + DateTime.Now + "',CancelFilePatch='" + File + "' where Id= " + keyValue); | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelUser='" + userList.realName + "',CancelPunishDate='" + DateTime.Now + "',CancelFilePatch='" + File + "',CancelFileNo = '" + CancelFileNo + "' where Id= " + keyValue); | |||
} | |||
else | |||
{ | |||
@@ -173,17 +173,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
var strSql = new StringBuilder(); | |||
strSql.Append(@"select isnull(ssnp.score,0) as BKScore ,ssnp.checkmark as IsSubmit,a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) | |||
else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, | |||
case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) | |||
else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, | |||
case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) | |||
else CONVERT(varchar,a.Score) end as Score2,b.MoveType,b.StudyModality "); | |||
strSql.Append(@" from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo "); | |||
strSql.Append( | |||
@" left join StuScoreNotPass ssnp on ssnp.StuNo = a.StuNo and ssnp.lessonno = a.lessonno "); | |||
strSql.Append(@" where 1=1 and ( ssnp.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) | |||
and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); | |||
//旧 | |||
// strSql.Append(@"select isnull(ssnp.score,0) as BKScore ,ssnp.checkmark as IsSubmit,a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) | |||
//else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, | |||
//case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) | |||
//else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, | |||
//case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) | |||
//else CONVERT(varchar,a.Score) end as Score2,b.MoveType,b.StudyModality "); | |||
// strSql.Append(@" from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo "); | |||
// strSql.Append( | |||
// @" left join StuScoreNotPass ssnp on ssnp.StuNo = a.StuNo and ssnp.lessonno = a.lessonno "); | |||
// strSql.Append(@" where 1=1 and ( ssnp.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) | |||
// and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); | |||
//新 | |||
strSql.Append(@"select ISNULL(ssnp.Score,0) as BKScore,ssnp.CheckMark as IsSubmit,c.classname,a.*,CONVERT(varchar,a.OrdinaryScore) as OrdinaryScore2,CONVERT(varchar,a.TermEndScore) as TermEndScore2,CONVERT(varchar,a.Score) as Score2,b.MoveType,b.StudyModality | |||
from StuScore a | |||
left join StuScoreNotPass ssnp on ssnp.StuNo=a.StuNo and ssnp.AcademicYearNo=a.AcademicYearNo and ssnp.Semester=a.Semester and ssnp.LessonNo=a.LessonNo | |||
left join ClassInfo c on c.ClassNo=a.ClassNo | |||
left join StuInfoBasic b on b.StuNo=a.StuNo | |||
where 1=1 and a.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus =1) | |||
and a.LessonSortNo='1' | |||
and a.Score<60 | |||
and b.StuId is not null | |||
and (b.EduSystem is null or b.EduSystem != '6') "); | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
strSql.Append($" and a.AcademicYearNo ='{queryParam["AcademicYearNo"].ToString()}'"); | |||
@@ -220,8 +235,8 @@ else CONVERT(varchar,a.Score) end as Score2,b.MoveType,b.StudyModality "); | |||
{ | |||
strSql.Append($" and ssnp.CheckMark ='{queryParam["CheckMark"].ToString()}'"); | |||
} | |||
strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); | |||
//旧 | |||
//strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); | |||
return this.BaseRepository("CollegeMIS").FindList<NotPassEntity>(strSql.ToString(), pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -265,17 +265,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
var strSql = new StringBuilder(); | |||
strSql.Append(@"select isnull(ssnpt.score,0) as BKScore,ssnpt.checkmark as IsSubmit,a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) | |||
else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, | |||
case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) | |||
else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, | |||
case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) | |||
else CONVERT(varchar,a.Score) end as Score2 "); | |||
strSql.Append(@" from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo "); | |||
strSql.Append( | |||
@" left join StuScoreNotPassTwo ssnpt on ssnpt.StuNo = a.StuNo and ssnpt.lessonno = a.lessonno "); | |||
strSql.Append(@"where 1=1 and ( ssnpt.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) | |||
and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); | |||
//旧 | |||
// strSql.Append(@"select isnull(ssnpt.score,0) as BKScore,ssnpt.checkmark as IsSubmit,a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) | |||
//else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, | |||
//case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) | |||
//else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, | |||
//case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) | |||
//else CONVERT(varchar,a.Score) end as Score2 "); | |||
// strSql.Append(@" from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo "); | |||
// strSql.Append( | |||
// @" left join StuScoreNotPassTwo ssnpt on ssnpt.StuNo = a.StuNo and ssnpt.lessonno = a.lessonno "); | |||
// strSql.Append(@"where 1=1 and ( ssnpt.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) | |||
//and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); | |||
//新 | |||
strSql.Append(@"select ISNULL(ssnpt.Score,0) as BKScore,ssnpt.CheckMark as IsSubmit,c.classname,a.*,CONVERT(varchar,a.OrdinaryScore) as OrdinaryScore2,CONVERT(varchar,a.TermEndScore) as TermEndScore2,CONVERT(varchar,a.Score) as Score2,b.MoveType,b.StudyModality | |||
from StuScoreNotPass a | |||
left join StuScoreNotPassTwo ssnpt on ssnpt.StuNo = a.StuNo and ssnpt.AcademicYearNo = a.AcademicYearNo and ssnpt.Semester = a.Semester and ssnpt.LessonNo = a.LessonNo | |||
left join ClassInfo c on c.ClassNo = a.ClassNo | |||
left join StuInfoBasic b on b.StuNo = a.StuNo | |||
where 1 = 1 | |||
and a.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus = 1) | |||
and a.LessonSortNo = '1' | |||
and a.Score < 60 | |||
and b.StuId is not null | |||
and (b.EduSystem is null or b.EduSystem != '6') "); | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
strSql.Append($" and a.AcademicYearNo ='{queryParam["AcademicYearNo"].ToString()}'"); | |||
@@ -312,7 +328,8 @@ and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Sco | |||
{ | |||
strSql.Append($" and ssnpt.CheckMark ='{queryParam["CheckMark"].ToString()}'"); | |||
} | |||
strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); | |||
//旧 | |||
//strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); | |||
return this.BaseRepository("CollegeMIS").FindList<NotPassEntity>(strSql.ToString(), pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -91,6 +91,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 获取TeachPlan表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public TeachPlanEntity GetPlan(string PlanNo) | |||
{ | |||
try | |||
{ | |||
return teachPlanService.GetPlan(PlanNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -34,6 +34,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
TeachPlanEntity GetTeachPlanEntity(string keyValue); | |||
TeachPlanEntity GetPlan(string PlanNo); | |||
#endregion | |||
#region 提交数据 | |||
@@ -57,12 +57,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo",queryParam["DeptNo"].ToString(), DbType.String); | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo",queryParam["MajorNo"].ToString(), DbType.String); | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
@@ -70,7 +70,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("Grade", "%" + queryParam["Grade"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Grade Like @Grade "); | |||
} | |||
return this.BaseRepository().FindList<TeachPlanEntity>(strSql.ToString(),dp, pagination); | |||
return this.BaseRepository().FindList<TeachPlanEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -122,12 +122,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo",queryParam["DeptNo"].ToString(), DbType.String); | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo",queryParam["MajorNo"].ToString(), DbType.String); | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
@@ -135,7 +135,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("Grade", "%" + queryParam["Grade"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Grade Like @Grade "); | |||
} | |||
return this.BaseRepository().FindList<TeachPlanEntity>(strSql.ToString(),dp); | |||
return this.BaseRepository().FindList<TeachPlanEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -173,7 +173,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取TeachPlan表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public TeachPlanEntity GetPlan(string PlanNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<TeachPlanEntity>(x => x.PlanNo == PlanNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -187,7 +209,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository().Delete<TeachPlanEntity>(t=>t.ID == keyValue); | |||
this.BaseRepository().Delete<TeachPlanEntity>(t => t.ID == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -207,13 +229,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void SaveEntity( UserInfo userInfo, string keyValue, TeachPlanEntity entity) | |||
public void SaveEntity(UserInfo userInfo, string keyValue, TeachPlanEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue,userInfo); | |||
entity.Modify(keyValue, userInfo); | |||
this.BaseRepository().Update(entity); | |||
} | |||
else | |||