chinaXLG пре 3 година
родитељ
комит
235245765c
55 измењених фајлова са 1264 додато и 231 уклоњено
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/Ask/AskPaper/AskPaper.js
  2. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form/form.js
  3. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentPre/form/form.js
  4. +4
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StudentQRCode/StudentQRCode.js
  5. +29
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs
  6. +10
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs
  7. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
  8. +131
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_DefaultPwdConfigController.cs
  9. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.cshtml
  10. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js
  11. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.cshtml
  12. +112
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js
  13. +18
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs
  14. +12
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  15. +60
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
  16. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  17. +9
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js
  18. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktopTop.cshtml
  19. +29
    -27
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml
  20. +30
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js
  21. +0
    -19
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/DefaultWxLogin.cshtml
  22. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive.cshtml
  23. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive/Index.js
  24. +0
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFiveWxLogin.cshtml
  25. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour.cshtml
  26. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour/Index.js
  27. +0
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFourWxLogin.cshtml
  28. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne.cshtml
  29. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne/Index.js
  30. +0
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOneWxLogin.cshtml
  31. +8
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml
  32. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix/Index.js
  33. +1
    -19
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSixWxLogin.cshtml
  34. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree.cshtml
  35. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree/Index.js
  36. +0
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThreeWxLogin.cshtml
  37. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo.cshtml
  38. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo/Index.js
  39. +0
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwoWxLogin.cshtml
  40. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  41. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AskApi.cs
  42. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseNoAuthentication.cs
  43. +34
    -16
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OpenLessonPlanOfElectiveStudentApi.cs
  44. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Web.config
  45. +0
    -9
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/_sgbak/database.config.31244.2.2019-11-26.11-41-13.0935
  46. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_DefaultPwdConfigMap.cs
  47. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  48. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
  49. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs
  50. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs
  51. +171
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs
  52. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigEntity.cs
  53. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs
  54. +213
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs
  55. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/Ask/AskPaper/AskPaper.js Прегледај датотеку

@@ -93,8 +93,8 @@
learun.layer.toast('有选择项少选或多选');
return
}
learun.httpget(path + "/learun/ask/savepaper",
// return
learun.httppost(path + "/learun/ask/savepaper",
{
VID: param.VID,
LessonNo: param.LessonNo,


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudent/form/form.js Прегледај датотеку

@@ -34,7 +34,8 @@
(dataresult, inforesult) => {
learun.layer.loading(false);
clearInterval(timer);
learun.layer.toast(inforesult);
//learun.layer.toast(inforesult);
learun.layer.toast(dataresult.msg);
learun.nav.closeCurrent();
var prepage = learun.nav.getpage('EducationalAdministration/OpenLessonPlanOfElectiveStudent');
prepage.grid.reload();


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/OpenLessonPlanOfElectiveStudentPre/form/form.js Прегледај датотеку

@@ -26,7 +26,8 @@
learun.httppost(config.webapi + 'learun/EducationalAdministration/OpenLessonPlanOfElectiveStudent/SignInPre', _postData, (data,info) => {
learun.layer.loading(false);
if (data) {// 表单数据保存成功
learun.layer.toast(info);
//learun.layer.toast(info);
learun.layer.toast(data.msg);
learun.nav.closeCurrent();
var prepage = learun.nav.getpage('EducationalAdministration/OpenLessonPlanOfElectiveStudentPre');
prepage.grid.reload();


+ 4
- 3
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StudentQRCode/StudentQRCode.js Прегледај датотеку

@@ -21,8 +21,8 @@

var logininfo = learun.storage.get('userinfo');
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuInfoBasic/stuinfoDetail',logininfo.baseinfo.account, function (data) {
// learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuInfoBasic/stuinfoDetail','2018010108', function (data) {
//learun.httpget(config.webapi + 'learun/EducationalAdministration/StuInfoBasic/stuinfoDetail',logininfo.baseinfo.account, function (data) {
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuInfoBasic/stuinfoDetail','2018010108', function (data) {
console.log(data);
$('.sQrList div strong').eq(0).html(data.stuInfo.StuName);
$('.sQrList div strong').eq(1).html(data.majorInfo.MajorName);
@@ -33,7 +33,8 @@
learun.code.encode({ id: 'lr_mycode_qrcode', text: data.stuInfo.StuNo });
})
// learun.code.encode({ id: 'lr_mycode_qrcode', text: '2019010211' });
//learun.code.encode({ id: 'lr_mycode_qrcode', text: '2019010211' });

},
bind: function ($page, param) {



+ 29
- 4
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs Прегледај датотеку

@@ -857,7 +857,7 @@ namespace Learun.Application.Organization
/// 重置密码
/// </summary>
/// <param name="keyValue">账号主键</param>
public void ResetPassword(string keyValue)
public void ResetPassword(string keyValue, string defaultpwd)
{
try
{
@@ -871,7 +871,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)
@@ -908,7 +908,7 @@ namespace Learun.Application.Organization
/// 重置密码(八位)
/// </summary>
/// <param name="keyValue">账号主键</param>
public void ResetPasswordEight(string keyValue)
public void ResetPasswordEight(string keyValue, string defaultpwd)
{
try
{
@@ -916,7 +916,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)
@@ -1201,6 +1201,31 @@ namespace Learun.Application.Organization
}
}


/// <summary>
/// 修改用户的允许登录结束时间
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="state">状态:1-赋值;0-重置</param>
public void UpdateAllowEndTime(string keyValue, int state)
{
try
{
userService.UpdateAllowEndTime(keyValue, state);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

///// <summary>
///// 获取用户头像
///// </summary>


+ 10
- 3
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs Прегледај датотеку

@@ -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>
@@ -179,7 +179,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

@@ -195,5 +195,12 @@ namespace Learun.Application.Organization
void UpdateIp(string ip, string id);
void GetImgForDC(string userId);
UserEntity GetEntityByWeixinOpenIdPC(string openId);

/// <summary>
/// 修改用户的允许登录结束时间
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="state">状态:1-赋值;0-重置</param>
void UpdateAllowEndTime(string keyValue, int state);
}
}

+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs Прегледај датотеку

@@ -848,6 +848,38 @@ namespace Learun.Application.Organization
}
}
}

/// <summary>
/// 修改用户的允许登录结束时间
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="state">状态:1-赋值;0-重置</param>
public void UpdateAllowEndTime(string keyValue, int state)
{
try
{
if (state == 0)
{
this.BaseRepository().ExecuteBySql("update LR_Base_User set F_AllowEndTime=null where F_UserId='" + keyValue + "'");
}
else
{
this.BaseRepository().ExecuteBySql("update LR_Base_User set F_AllowEndTime='" + DateTime.Now + "' where F_UserId='" + keyValue + "'");
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

}

}

+ 131
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_DefaultPwdConfigController.cs Прегледај датотеку

@@ -0,0 +1,131 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-01-19 11:14
/// 描 述:默认密码配置
/// </summary>
public class Sys_DefaultPwdConfigController : MvcControllerBase
{
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = sys_DefaultPwdConfigIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Sys_DefaultPwdConfigData = sys_DefaultPwdConfigIBLL.GetSys_DefaultPwdConfigEntity( keyValue );
var jsonData = new {
Sys_DefaultPwdConfig = Sys_DefaultPwdConfigData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
sys_DefaultPwdConfigIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Sys_DefaultPwdConfigEntity entity = strEntity.ToObject<Sys_DefaultPwdConfigEntity>();
entity.IsEnabled = false;
sys_DefaultPwdConfigIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}

/// <summary>
/// 启用
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoEnabled(string keyValue)
{
sys_DefaultPwdConfigIBLL.DoEnabled(keyValue);
return Success("操作成功!");
}
#endregion

}
}

+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.cshtml Прегледај датотеку

@@ -0,0 +1,15 @@
@{
ViewBag.Title = "默认密码配置";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Sys_DefaultPwdConfig" >
<div class="lr-form-item-title">密码名称<font face="宋体">*</font></div>
<input id="PwdName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_DefaultPwdConfig" >
<div class="lr-form-item-title">密码<font face="宋体">*</font></div>
<input id="Pwd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js")

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js Прегледај датотеку

@@ -0,0 +1,51 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-01-19 11:14
* 描 述:默认密码配置
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.cshtml Прегледај датотеку

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "默认密码配置";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">密码名称</div>
<input id="PwdName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;启用</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js")

+ 112
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js Прегледај датотеку

@@ -0,0 +1,112 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-01-19 11:14
* 描 述:默认密码配置
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 启用
$('#lr_enabled').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var IsEnabled = $('#gridtable').jfGridValue('IsEnabled');
if (IsEnabled == true) {
learun.alert.warning("当前项已启用!");
return false;
}
learun.layerConfirm('是否确认启用该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/DoEnabled', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/GetPageList',
headData: [
{ label: "密码名称", name: "PwdName", width: 150, align: "left"},
{ label: "密码", name: "Pwd", width: 150, align: "left"},
{
label: "是否启用", name: "IsEnabled", width: 100, align: "left",
formatter: function (cellvalue, rowObject) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId:'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 18
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs Прегледај датотеку

@@ -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
{
@@ -23,6 +25,8 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
private UserRelationIBLL userRelationIBLL = new UserRelationBLL();
private RoleIBLL roleIBLL = new RoleBLL();

private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();


#region 获取视图

@@ -334,7 +338,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 +356,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("操作成功!");
}



+ 12
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs Прегледај датотеку

@@ -57,6 +57,7 @@ namespace Learun.Application.Web.Controllers
private Sys_UpdateRecordIBLL sys_UpdateRecordIBLL = new Sys_UpdateRecordBLL();
private Perm_FunctionIBLL perm_FunctionIBLL = new Perm_FunctionBLL();
private ICache redisCache = CacheFactory.CaChe();
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();
#region 视图功能

public ActionResult ChangePwd()
@@ -229,6 +230,11 @@ namespace Learun.Application.Web.Controllers
string qingJuurl = ConfigurationManager.AppSettings["QingJuurl"];
string qingjuregisterurl = ConfigurationManager.AppSettings["QingJuRegisterurl"];
string defpwd = ConfigurationManager.AppSettings["defaultpwd"];
//读取默认密码配置中已启用的密码
if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null)
{
defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd;
}
var qjinfo = qjAccountIbll.GetQingJu_UserAccountEntityByAccount(userinfo.account);
if (qjinfo == null || string.IsNullOrEmpty(qjinfo.UserAccount))
{
@@ -335,6 +341,11 @@ namespace Learun.Application.Web.Controllers
string qingJuurl = ConfigurationManager.AppSettings["QingJuurl"];
string qingjuregisterurl = ConfigurationManager.AppSettings["QingJuRegisterurl"];
string defpwd = ConfigurationManager.AppSettings["defaultpwd"];
//读取默认密码配置中已启用的密码
if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null)
{
defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd;
}
if (up != null && !string.IsNullOrEmpty(up.QUserName))
{
if (userinfo.Description == "教师")
@@ -423,7 +434,7 @@ namespace Learun.Application.Web.Controllers

#region 待办
var userinfo = LoginUserInfo.Get();
Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" };
Pagination paginationobj = new Pagination() { rows = 100, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" };
//未读邮件
ViewBag.UnreadMail = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userinfo.userId + "\"}").Count(m => m.READFLAG == 0);
//办公事项


+ 60
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs Прегледај датотеку

@@ -38,6 +38,7 @@ namespace Learun.Application.Web.Controllers
private LoginModelIBLL loginModelIbll = new LoginModelBLL();
private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL();
WeChatDevelopIBLL weChatDevelopIbll = new WeChatDevelopBLL();
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();
#endregion

#region 视图功能
@@ -184,6 +185,15 @@ namespace Learun.Application.Web.Controllers
}
//获取错误次数
ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum();
//获取初始密码设置中已启用的密码
ViewBag.IsSetDefaultPwd = false;
ViewBag.DefaultPwd = "";
var defaultPwdEntity = sys_DefaultPwdConfigIBLL.GetEnabledEntity();
if (defaultPwdEntity != null)
{
ViewBag.IsSetDefaultPwd = true;
ViewBag.DefaultPwd = defaultPwdEntity.Pwd;
}
//获取高职版跳转地址
ViewBag.DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"];
ViewBag.Returnurl = "http://" + Request.Url.Host + ":" + Request.Url.Port;
@@ -499,11 +509,13 @@ namespace Learun.Application.Web.Controllers
/// <param name="username">用户名</param>
/// <param name="password">密码</param>
/// <param name="verifycode">验证码</param>
/// <param name="up">密码是否是强密码</param>
/// <param name="defaultPwdTip">密码是否是初始密码,是则需要提示(true)</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
[HandlerValidateAntiForgeryToken]
public ActionResult CheckLogin(string username, string password, string verifycode, string up)
public ActionResult CheckLogin(string username, string password, string verifycode, string up, string defaultPwdTip)
{

int error = OperatorHelper.Instance.GetCurrentErrorNum();
@@ -521,6 +533,41 @@ namespace Learun.Application.Web.Controllers
#region 内部账户验证
UserEntity userEntity = userBll.CheckLogin(username, password);

#region 登录次数限制,禁止登录时间限制
int defaultForbidLoginNum = 5;//默认的禁止登录次数
double defaultForbidLoginMinutes = 10;//默认的禁止登录分钟数
if (!string.IsNullOrEmpty(Config.GetValue("ForbidLoginNum")))
{
defaultForbidLoginNum = Config.GetValue("ForbidLoginNum").ToInt();
}
if (!string.IsNullOrEmpty(Config.GetValue("ForbidLoginMinutes")))
{
defaultForbidLoginMinutes = Config.GetValue("ForbidLoginMinutes").ToDouble();
}
//错误次数大于等于5时,判断禁止登录时间是否超过10分钟:若是则修改用户的允许登录结束时间,可以登录;若否,禁止登录;
if (error >= defaultForbidLoginNum)
{
if (userEntity.LoginOk)//登录成功
{
if (userEntity.F_AllowEndTime.HasValue)
{
var period = (DateTime.Now - userEntity.F_AllowEndTime.Value).TotalMinutes;
if (period >= defaultForbidLoginMinutes)
{
userBll.UpdateAllowEndTime(userEntity.F_UserId, 0);
}
else
{
return Fail("错误次数超过" + defaultForbidLoginNum + "次,已被禁止登录,请" + defaultForbidLoginMinutes + "分钟后重试!", error);
}
}
}
else//登录失败
{
return Fail(userEntity.LoginMsg, error);
}
}
#endregion

#region 写入日志
LogEntity logEntity = new LogEntity();
@@ -540,6 +587,11 @@ namespace Learun.Application.Web.Controllers
logEntity.F_ExecuteResultJson = "登录失败:" + userEntity.LoginMsg;
logEntity.WriteLog();
int num = OperatorHelper.Instance.AddCurrentErrorNum();
//判断登录错误次数大于等于5,修改用户的允许登录结束时间;
if (num >= defaultForbidLoginNum)
{
userBll.UpdateAllowEndTime(userEntity.F_UserId, 1);
}
return Fail(userEntity.LoginMsg, num);
}
else
@@ -552,12 +604,15 @@ namespace Learun.Application.Web.Controllers
logEntity.F_ExecuteResultJson = "登录成功";
logEntity.WriteLog();
OperatorHelper.Instance.ClearCurrentErrorNum();
//修改用户的允许登录结束时间;
userBll.UpdateAllowEndTime(userEntity.F_UserId, 0);
//是否强密码验证
if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["verifypwd"]) && ConfigurationManager.AppSettings["verifypwd"] == "true" && up == "false")
{
return Success(new { pwd = true });
return Success(new { pwd = true, pwdtip = defaultPwdTip == "true" ? true : false });
}
return Success("登录成功");
//返回成功的数据(pwdtip:初始密码提示弹框;pwd:弱密码修改弹框;)
return Success("登录成功", new { pwdtip = defaultPwdTip == "true" ? true : false });
}
#endregion
}
@@ -899,8 +954,8 @@ namespace Learun.Application.Web.Controllers
{
string appid = "76d40062-349f-486d-b871-35bed08d2f59";
string secret = "cgpi";
string appkey =Request.QueryString["appkey"];
string response = Util.HttpMethods.HttpGet("http://localhost:20472/SSOSystem/authorize?appid=" + appid + "&secret=" + secret + "&appkey="+ appkey);
string appkey = Request.QueryString["appkey"];
string response = Util.HttpMethods.HttpGet("http://localhost:20472/SSOSystem/authorize?appid=" + appid + "&secret=" + secret + "&appkey=" + appkey);
return Content(response);
}



+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Прегледај датотеку

@@ -792,6 +792,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_InformationPushController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuLeaveManagementController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\EATalentTrainController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_DefaultPwdConfigController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6124,6 +6125,10 @@
<Content Include="Areas\EducationalAdministration\Views\EATalentTrain\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\EATalentTrain\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EATalentTrain\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />


+ 9
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js Прегледај датотеку

@@ -6,7 +6,9 @@
* 描 述:经典风格皮肤
*/
var autoopenid = request('autoopen');
var pwd = request("pwd");
var pwd = request("pwd");//弱密码修改弹框
var pwdtip = request("pwdtip");//初始密码提示弹框
var pwdpwdtip = request("pwdpwdtip");//弱密码修改弹框&初始密码提示弹框
var bootstrap = function ($, learun) {
"use strict";
// 菜单操作
@@ -197,7 +199,8 @@ var bootstrap = function ($, learun) {
// area: ['500px', '300px']
// });
//}
if (pwd == "true") {
//弱密码修改弹框
if (pwd == "true" || pwdpwdtip == "true") {
top.layer.open({
id: 'pwdform',
title: '密码修改',
@@ -225,6 +228,10 @@ var bootstrap = function ($, learun) {
}
});
}
//初始密码提示弹框
if (pwdtip == "true" || pwdpwdtip == "true") {
learun.layerConfirm('当前登录密码还是初始密码!', function (res) { });
}
//上网认证
if (ACIp != null && ACIp != "") {
//Ip上网


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktopTop.cshtml Прегледај датотеку

@@ -314,7 +314,7 @@
.lr-scroll-wrap {
position: relative;
overflow: hidden;
height: 100%;
height: 70%;
width: 100%
}



+ 29
- 27
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml Прегледај датотеку

@@ -49,6 +49,8 @@
<link href="~/Content/css/process.css" rel="stylesheet" />
<!-- <img src="~/Content/images/Logins/loginBg.jpg" /> -->
<input id="errornum" type="hidden" value="@ViewBag.errornum" />
<input id="DefaultPwd" type="hidden" value="@ViewBag.DefaultPwd" data-IsSetDefaultPwd="@ViewBag.IsSetDefaultPwd"/>

<div class="lr-login-body">

<div class="lr-login-logo">
@@ -59,7 +61,7 @@
<div class="lr-login-middle">
@if (ViewBag.WeixinLoginSwitch)
{
<a href="/Login/LoginForWeixin?login=one" class="wxLogin down" title="使用微信登录">
<a href="/Login/LoginForWeixin?login=one" class="wxLogin down" title="使用微信登录">
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录
</a>
}
@@ -121,14 +123,14 @@
</div>
</div>
</div>
<div class="lr-login-footer" style="font-size: 12px;color: #fff;width: 880px;right:0;margin: auto;">
<div class="tips">
<img src="~/Content/images/LoginPage/tips3.png" alt=""> <span>建议使用360或谷歌浏览器</span>
</div>
<div style="position: relative;">
Copyright © 2019 数字化智慧校园 版权所有 <span class="OnlineUserNumBox" style="position: absolute;right: 0;top: 0;">在线用户数:<span class="OnlineUserNum">@ViewBag.OnlineUserNum</span>人</span>
</div>
<div class="lr-login-footer" style="font-size: 12px;color: #fff;width: 880px;right:0;margin: auto;">
<div class="tips">
<img src="~/Content/images/LoginPage/tips3.png" alt=""> <span>建议使用360或谷歌浏览器</span>
</div>
<div style="position: relative;">
Copyright © 2019 数字化智慧校园 版权所有 <span class="OnlineUserNumBox" style="position: absolute;right: 0;top: 0;">在线用户数:<span class="OnlineUserNum">@ViewBag.OnlineUserNum</span>人</span>
</div>
</div>
<img id="loginFoot" src="~/Content/images/logins/login1.png" alt="">
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script>
@@ -172,24 +174,24 @@
@Html.AppendJsFile("/Views/Login/Default/Index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")

<script>
//点击版本号,显示版本号历史进程
$('.versionBtn').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';
@*<script>
//点击版本号,显示版本号历史进程
$('.versionBtn').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';

layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
})
});
</script>
layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
});
});
</script>*@
</body>
</html>

+ 30
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js Прегледај датотеку

@@ -69,6 +69,7 @@
$("#lr_verifycode_input").val('');
$("#lr_verifycode_img").attr("src", $.rootUrl + "/Login/VerifyCode?time=" + Math.random());
});
//错误次数
var errornum = $('#errornum').val();
if (errornum >= 3) {

@@ -114,6 +115,14 @@
$("#lr_login_btn").on('click', function () {
lrPage.login();
});

//java的统一身份认证
var javaName = request("u");
if (javaName) {
$("#lr_username").val(javaName);
$("#lr_password").val('123456');
lrPage.login();
}
},
login: function () {
lrPage.tip();
@@ -121,6 +130,12 @@
var $username = $("#lr_username"), $password = $("#lr_password"), $verifycode = $("#lr_verifycode_input");
var username = $.trim($username.val()), password = $.trim($password.val()), verifycode = $.trim($verifycode.val());
var up = true;
var defaultPwdTip = false;//用户输入的密码不是初始密码,不需要提示;
if ($("#DefaultPwd").attr('data-IsSetDefaultPwd').toLowerCase() == "true" || $("#DefaultPwd").attr('data-IsSetDefaultPwd').toLowerCase() == true) {
if ($("#DefaultPwd").val() == password) {
defaultPwdTip = true;
}
}

if (username == "") {
lrPage.tip('请输入账户');
@@ -132,6 +147,7 @@
$password.focus();
return false;
}
//强密码验证
var reg = /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\.])[0-9a-zA-Z!@#$%^&*,\.]{8,20}$/;
if (!reg.test(password)) {
up = false;
@@ -154,7 +170,7 @@
$.ajax({
url: $.rootUrl + "/Login/CheckLogin",
headers: { __RequestVerificationToken: $.lrToken },
data: { username: username, password: password, verifycode: verifycode, up: up },
data: { username: username, password: password, verifycode: verifycode, up: up, defaultPwdTip: defaultPwdTip },
type: "post",
dataType: "json",
success: function (res) {
@@ -163,11 +179,20 @@
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index";
} else {
if (res.data.pwd == true) {
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true";
if (res.data.pwdtip == true) {
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true";
} else {
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true";
}
}
else {
if (res.data.pwdtip == true) {
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true";
} else {
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index";
}
//window.location.href = "/Home/Index";
}
else
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index";
//window.location.href = "/Home/Index";
}
}
else if (res.code == 400) {


+ 0
- 19
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/DefaultWxLogin.cshtml Прегледај датотеку

@@ -159,24 +159,5 @@
@Html.AppendJsFile("/Views/Login/Default/IndexWxLogin.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")

<script>
//点击版本号,显示版本号历史进程
$('.versionBtn').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';

layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
})
});
</script>
</body>
</html>

+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive.cshtml Прегледај датотеку

@@ -148,9 +148,9 @@
</script>
@Html.AppendJsFile("/Views/Login/PageFive/Index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
@*<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
$('.bbh_span2').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
@@ -166,6 +166,6 @@
content: html
})
});
</script>
</script>*@

</html>

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive/Index.js Прегледај датотеку

@@ -113,6 +113,13 @@
$("#lr_login_btn").on('click', function () {
lrPage.login();
});
//java的统一身份认证
var javaName = request("u");
if (javaName) {
$("#lr_username").val(javaName);
$("#lr_password").val('123456');
lrPage.login();
}
},
login: function () {
lrPage.tip();


+ 0
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFiveWxLogin.cshtml Прегледај датотеку

@@ -136,24 +136,6 @@
</script>
@Html.AppendJsFile("/Views/Login/PageFive/IndexWxLogin.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';

layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
})
});
</script>

</html>

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour.cshtml Прегледај датотеку

@@ -148,7 +148,7 @@

@Html.AppendJsFile("/Views/Login/PageFour/Index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
@*<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
@@ -166,5 +166,5 @@
content: html
})
});
</script>
</script>*@
</html>

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour/Index.js Прегледај датотеку

@@ -114,6 +114,13 @@
$("#lr_login_btn").on('click', function () {
lrPage.login();
});
//java的统一身份认证
var javaName = request("u");
if (javaName) {
$("#lr_username").val(javaName);
$("#lr_password").val('123456');
lrPage.login();
}
},
login: function () {
lrPage.tip();


+ 0
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFourWxLogin.cshtml Прегледај датотеку

@@ -129,23 +129,5 @@

@Html.AppendJsFile("/Views/Login/PageFour/IndexWxLogin.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';

layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
})
});
</script>
</html>

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne.cshtml Прегледај датотеку

@@ -142,7 +142,7 @@

@Html.AppendJsFile("/Views/Login/PageOne/Index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
@*<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
@@ -160,6 +160,6 @@
content: html
})
});
</script>
</script>*@

</html>

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne/Index.js Прегледај датотеку

@@ -113,6 +113,13 @@
$("#lr_login_btn").on('click', function () {
lrPage.login();
});
//java的统一身份认证
var javaName = request("u");
if (javaName) {
$("#lr_username").val(javaName);
$("#lr_password").val('123456');
lrPage.login();
}
},
login: function () {
lrPage.tip();


+ 0
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOneWxLogin.cshtml Прегледај датотеку

@@ -132,24 +132,6 @@

@Html.AppendJsFile("/Views/Login/PageOne/IndexWxLogin.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';

layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
})
});
</script>

</html>

+ 8
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml Прегледај датотеку

@@ -14,6 +14,7 @@
<link href="~/Content/css/LoginModel/loginPublic.css" rel="stylesheet" />
<link href="~/Content/css/LoginModel/common.css" rel="stylesheet" />
<link href="~/Content/css/LoginModel/login8.css" rel="stylesheet" />
<link href="~/Content/css/process.css" rel="stylesheet" />
<!--自适应-->
<!--自适应-->

@@ -94,10 +95,12 @@
</div>
<div class="loginFooter">
<div>
版本号 : @if (ViewBag.Version)
<span class="loginEdition">
版本号 : @if (ViewBag.Version)
{
@ViewBag.errornum
} &nbsp; &nbsp; &nbsp; 在线用户人数 : @ViewBag.OnlineUserNum 人
@ViewBag.VersionNum
}
</span>&nbsp; &nbsp; &nbsp; 在线用户人数 : @ViewBag.OnlineUserNum 人
</div>
<div>北京金隅科技学校 &nbsp; &nbsp; &nbsp; 智慧校园 版权所有</div>
<!--京ICP备13045367号-->
@@ -139,7 +142,7 @@
</script>
@Html.AppendJsFile("/Views/Login/PageSix/Index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
@*<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
@@ -157,7 +160,7 @@
content: html
})
});
</script>
</script>*@
</body>

</html>

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix/Index.js Прегледај датотеку

@@ -113,6 +113,13 @@
$("#lr_login_btn").on('click', function () {
lrPage.login();
});
//java的统一身份认证
var javaName = request("u");
if (javaName) {
$("#lr_username").val(javaName);
$("#lr_password").val('123456');
lrPage.login();
}
},
login: function () {
lrPage.tip();


+ 1
- 19
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSixWxLogin.cshtml Прегледај датотеку

@@ -126,25 +126,7 @@
</script>
@Html.AppendJsFile("/Views/Login/PageSix/IndexWxLogin.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';

layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
})
});
</script>
</body>

</html>

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree.cshtml Прегледај датотеку

@@ -153,7 +153,7 @@
</script>
@Html.AppendJsFile("/Views/Login/PageThree/Index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
@*<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
@@ -171,6 +171,6 @@
content: html
})
});
</script>
</script>*@

</html>

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree/Index.js Прегледај датотеку

@@ -114,6 +114,13 @@
$("#lr_login_btn").on('click', function () {
lrPage.login();
});
//java的统一身份认证
var javaName = request("u");
if (javaName) {
$("#lr_username").val(javaName);
$("#lr_password").val('123456');
lrPage.login();
}
},
login: function () {
lrPage.tip();


+ 0
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThreeWxLogin.cshtml Прегледај датотеку

@@ -129,24 +129,6 @@
</script>
@Html.AppendJsFile("/Views/Login/PageThree/IndexWxLogin.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';

layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
})
});
</script>

</html>

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo.cshtml Прегледај датотеку

@@ -139,7 +139,7 @@
</script>
@Html.AppendJsFile("/Views/Login/PageTwo/Index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
@*<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
@@ -157,6 +157,6 @@
content: html
})
});
</script>
</script>*@

</html>

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo/Index.js Прегледај датотеку

@@ -113,6 +113,13 @@
$("#lr_login_btn").on('click', function () {
lrPage.login();
});
//java的统一身份认证
var javaName = request("u");
if (javaName) {
$("#lr_username").val(javaName);
$("#lr_password").val('123456');
lrPage.login();
}
},
login: function () {
lrPage.tip();


+ 0
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwoWxLogin.cshtml Прегледај датотеку

@@ -127,24 +127,6 @@
</script>
@Html.AppendJsFile("/Views/Login/PageTwo/IndexWxLogin.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
//点击版本号,显示版本号历史进程
$('.loginEdition').click(function () {
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">';
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) {
var index = i % 2 == 0 ? 1 : 2;
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ;
});
html += '</div></div>';

layer.open({
type: 1,
closeBtn: 2,
title: "版本号",
area: ['888px', '60%'],
content: html
})
});
</script>

</html>

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config Прегледај датотеку

@@ -163,4 +163,8 @@
<add key="QJUrl" value="www.qj.com"/>
<!--系主任角色Id-->
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" />
<!-- 登录次数限制:登录连续错误要禁止登录 -->
<add key="ForbidLoginNum" value="5"/>
<!-- 禁止登录时间(分钟) -->
<add key="ForbidLoginMinutes" value="10"/>
</appSettings>

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AskApi.cs Прегледај датотеку

@@ -22,7 +22,7 @@ namespace Learun.Application.WebApi.Modules
{
Get["/paper"] = GetPaper;// 获取组织机构数据映射表
Get["/studentlist"] = GetStudentList;
Get["/savepaper"] = SavePaper;
Post["/savepaper"] = SavePaper;
}

private Ask_MainIBLL ask_MainIBLL = new Ask_MainBLL();


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BaseNoAuthentication.cs Прегледај датотеку

@@ -139,6 +139,11 @@ namespace Learun.Application.WebApi
ResParameter res = new ResParameter { code = ResponseCode.fail, info = info, data = new object { } };
return Response.AsText(res.ToJson()).WithContentType("application/json");
}
public Response Fail<T>(T data) where T : class
{
ResParameter res = new ResParameter { code = ResponseCode.fail, info = "响应失败", data = data };
return Response.AsText(res.ToJson()).WithContentType("application/json");
}
public Response FailNoLogin(string info)
{
ResParameter res = new ResParameter { code = ResponseCode.nologin, info = info, data = new object { } };


+ 34
- 16
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OpenLessonPlanOfElectiveStudentApi.cs Прегледај датотеку

@@ -42,6 +42,8 @@ namespace Learun.Application.WebApi

private Response GetApplyResult(dynamic _)
{
var msg = "正在提交,请等待!";//返回结果信息
var resultData = new { msg = msg };
dynamic parameter = this.GetReqData<dynamic>();
string keyValue = parameter.keyValue;
string account = parameter.StuNo;
@@ -49,13 +51,15 @@ namespace Learun.Application.WebApi
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(account);
if (stuInfoBasicEntity == null)
{
return Success("当前学员不存在!");
msg = "当前学员不存在!";
return Success(resultData);
}
//课程信息
var olpeEntity = openLessonPlanOfElectiveIbll.GetOpenLessonPlanOfElectiveEntity(keyValue);
if (olpeEntity == null)
{
return Success("当前课程不存在!");
msg = "当前课程不存在!";
return Success(resultData);
}

//当前学员本学期是否有报名课程:每学期一门
@@ -93,11 +97,13 @@ namespace Learun.Application.WebApi
{
if (sslleEntity.Status == 1)
{
return Success("当前课程报名审核中,请耐心等待!");
msg = "当前课程报名审核中,请耐心等待!";
return Success(resultData);
}
else if (sslleEntity.Status == 2)
{
return Success("当前课程已报名成功!");
msg = "当前课程已报名成功!";
return Success(resultData);
}
}
else
@@ -107,7 +113,8 @@ namespace Learun.Application.WebApi
var aaa = aa.Count(x => x.Status == 1 || x.Status == 2);
if (aaa >= olpeEntity.StuNumMax)
{
return Success("当前课程报名人数已满,请选择其他课程!");
msg = "当前课程报名人数已满,请选择其他课程!";
return Success(resultData);
}
//每学期最多两门
var sslleList = stuSelectLessonListOfElectiveIBLL.GetStuSelectLessonListOfElectiveListByStuNo(account);
@@ -115,17 +122,19 @@ namespace Learun.Application.WebApi
var sslleListOfNow1 = sslleListOfNow.Where(x => x.Status == 1 || x.Status == 2);
if (sslleListOfNow1.Count() >= Config.GetValue("ElectiveLessonApplyMax").ToInt())
{
return Success("每学期最多选择" + Config.GetValue("ElectiveLessonApplyMax").ToInt() + "门选修课!");
msg = "每学期最多选择" + Config.GetValue("ElectiveLessonApplyMax").ToInt() + "门选修课!";
return Success(resultData);
}
//相同时间不能报名
if (sslleListOfNow1.Where(x => x.LessonSection == olpeEntity.LessonSection).Any())
{
//相同时间不能报名
return Success("本学期此时间段已有报名的选修课!");
msg = "本学期此时间段已有报名的选修课!";
return Success(resultData);
}
}

return Fail("正在提交,请等待!");
return Fail(resultData);
}

#region 获取数据
@@ -312,6 +321,8 @@ namespace Learun.Application.WebApi
/// <returns></returns>
public Response SignInPre(dynamic _)
{
var msg = "报名成功";//返回结果信息
var resultData = new { msg = msg };
dynamic parameter = this.GetReqData<dynamic>();
string keyValue = parameter.keyValue;
string account = parameter.StuNo;
@@ -319,20 +330,23 @@ namespace Learun.Application.WebApi
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(account);
if (stuInfoBasicEntity == null)
{
return Fail("当前学员不存在!");
msg = "当前学员不存在!";
return Fail(resultData);
}
//课程信息
var olpeEntity = openLessonPlanOfElectiveIbll.GetOpenLessonPlanOfElectiveEntity(keyValue);
if (olpeEntity == null)
{
return Fail("当前课程不存在!");
msg = "当前课程不存在!";
return Fail(resultData);
}
//所选课程的报名人数是否已满
var aa = stuSelectLessonListOfElectivePreIBLL.GetStuSelectLessonListOfElectivePreListByOLPEId(olpeEntity.Id);
var aaa = aa.Where(x => x.Status == 2).Count();
if (aaa >= olpeEntity.StuNumMax)
{
return Fail("当前课程报名人数已满,请选择其他课程!");
msg = "当前课程报名人数已满,请选择其他课程!";
return Fail(resultData);
}
//当前学员本学期是否有报名课程:每学期一门
//var sslleEntity = stuSelectLessonListOfElectivePreIBLL.GetStuSelectLessonListOfElectivePreEntityByStuNo(account, "");
@@ -364,7 +378,8 @@ namespace Learun.Application.WebApi
var sslleListOfNow2 = sslleListOfNow.Where(x => x.Status == 3);
if (sslleListOfNow1.Count() >= Config.GetValue("ElectiveLessonApplyMax").ToInt())
{
return Fail("每学期最多选择" + Config.GetValue("ElectiveLessonApplyMax").ToInt() + "门选修课!");
msg = "每学期最多选择" + Config.GetValue("ElectiveLessonApplyMax").ToInt() + "门选修课!";
return Fail(resultData);
}
else
{
@@ -373,11 +388,13 @@ namespace Learun.Application.WebApi
{
if (m.Status == 1)
{
return Fail("当前课程报名审核中,请耐心等待!");
msg = "当前课程报名审核中,请耐心等待!";
return Fail(resultData);
}
else if (m.Status == 2)
{
return Fail("当前课程已报名成功!");
msg = "当前课程已报名成功!";
return Fail(resultData);
}
}
}
@@ -392,7 +409,8 @@ namespace Learun.Application.WebApi
if (sslleListOfNow1.Select(x => x.LessonSection == olpeEntity.LessonSection).Any())
{
//相同时间不能报名
return Success("本学期此时间段已有报名的选修课!");
msg = "本学期此时间段已有报名的选修课!";
return Success(resultData);
}
//新增报名数据
var model = new StuSelectLessonListOfElectivePreEntity()
@@ -434,7 +452,7 @@ namespace Learun.Application.WebApi
};
stuSelectLessonListOfElectivePreIBLL.SaveEntity("", model);

return Success("报名成功");
return Success(resultData);
}
#endregion



+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Web.config Прегледај датотеку

@@ -26,7 +26,8 @@
-->
<system.web>
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime />
<!--最大请求长度,单位为KB(千字节),默认为4M,设置为1G,上限为2G -->
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
<pages controlRenderingCompatibilityVersion="4.0" />
<httpHandlers>
<add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*" />


+ 0
- 9
Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/_sgbak/database.config.31244.2.2019-11-26.11-41-13.0935 Прегледај датотеку

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
<add name="BaseDb" connectionString="Server=192.168.2.126;Initial Catalog=adms7ultimate2;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=192.168.2.126;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />
<!--demo.quanjiang.com-->
<!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />-->
</connectionStrings>

+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_DefaultPwdConfigMap.cs Прегледај датотеку

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-01-19 11:14
/// 描 述:默认密码配置
/// </summary>
public class Sys_DefaultPwdConfigMap : EntityTypeConfiguration<Sys_DefaultPwdConfigEntity>
{
public Sys_DefaultPwdConfigMap()
{
#region 表、主键
//表
this.ToTable("SYS_DEFAULTPWDCONFIG");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Прегледај датотеку

@@ -544,6 +544,7 @@
<Compile Include="EducationalAdministration\Sys_InformationPushMap.cs" />
<Compile Include="EducationalAdministration\StuLeaveManagementMap.cs" />
<Compile Include="EducationalAdministration\EATalentTrainMap.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfigMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs Прегледај датотеку

@@ -336,6 +336,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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)
{
@@ -355,7 +362,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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;


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs Прегледај датотеку

@@ -715,6 +715,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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)
{
@@ -736,7 +743,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;


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs Прегледај датотеку

@@ -1178,6 +1178,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
@@ -1207,7 +1214,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,


+ 171
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs Прегледај датотеку

@@ -0,0 +1,171 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-01-19 11:14
/// 描 述:默认密码配置
/// </summary>
public class Sys_DefaultPwdConfigBLL : Sys_DefaultPwdConfigIBLL
{
private Sys_DefaultPwdConfigService sys_DefaultPwdConfigService = new Sys_DefaultPwdConfigService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Sys_DefaultPwdConfigEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return sys_DefaultPwdConfigService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Sys_DefaultPwdConfig表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue)
{
try
{
return sys_DefaultPwdConfigService.GetSys_DefaultPwdConfigEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Sys_DefaultPwdConfig表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Sys_DefaultPwdConfigEntity GetEnabledEntity()
{
try
{
return sys_DefaultPwdConfigService.GetEnabledEntity();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
sys_DefaultPwdConfigService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Sys_DefaultPwdConfigEntity entity)
{
try
{
sys_DefaultPwdConfigService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 启用
/// </summary>
/// <param name="keyValue">主键</param>
public void DoEnabled(string keyValue)
{
try
{
sys_DefaultPwdConfigService.DoEnabled(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigEntity.cs Прегледај датотеку

@@ -0,0 +1,60 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-01-19 11:14
/// 描 述:默认密码配置
/// </summary>
public class Sys_DefaultPwdConfigEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// PwdName
/// </summary>
[Column("PWDNAME")]
public string PwdName { get; set; }
/// <summary>
/// Pwd
/// </summary>
[Column("PWD")]
public string Pwd { get; set; }
/// <summary>
/// IsEnabled
/// </summary>
[Column("ISENABLED")]
public bool? IsEnabled { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs Прегледај датотеку

@@ -0,0 +1,61 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-01-19 11:14
/// 描 述:默认密码配置
/// </summary>
public interface Sys_DefaultPwdConfigIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Sys_DefaultPwdConfigEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Sys_DefaultPwdConfig表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue);

/// <summary>
/// 获取Sys_DefaultPwdConfig表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Sys_DefaultPwdConfigEntity GetEnabledEntity();
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Sys_DefaultPwdConfigEntity entity);

/// <summary>
/// 启用
/// </summary>
/// <param name="keyValue">主键</param>
void DoEnabled(string keyValue);
#endregion

}
}

+ 213
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs Прегледај датотеку

@@ -0,0 +1,213 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-01-19 11:14
/// 描 述:默认密码配置
/// </summary>
public class Sys_DefaultPwdConfigService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Sys_DefaultPwdConfigEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.PwdName,
t.Pwd,
t.IsEnabled
");
strSql.Append(" FROM Sys_DefaultPwdConfig t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["PwdName"].IsEmpty())
{
dp.Add("PwdName", "%" + queryParam["PwdName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PwdName Like @PwdName ");
}
return this.BaseRepository().FindList<Sys_DefaultPwdConfigEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Sys_DefaultPwdConfig表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue)
{
try
{
return this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Sys_DefaultPwdConfig表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Sys_DefaultPwdConfigEntity GetEnabledEntity()
{
try
{
return this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository().Delete<Sys_DefaultPwdConfigEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, Sys_DefaultPwdConfigEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository().Update(entity);
}
else
{
entity.Create();
this.BaseRepository().Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 启用
/// </summary>
/// <param name="keyValue">主键</param>
public void DoEnabled(string keyValue)
{
var db = this.BaseRepository().BeginTrans();
try
{
var model = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true);
if (model != null)
{
model.IsEnabled = false;
db.Update(model);
}
var newmodel = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.Id == keyValue);
if (newmodel != null)
{
newmodel.IsEnabled = true;
db.Update(newmodel);
}

db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Прегледај датотеку

@@ -1597,6 +1597,10 @@
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainService.cs" />
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainBLL.cs" />
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainIBLL.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigEntity.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigService.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigBLL.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Loading…
Откажи
Сачувај