Преглед на файлове

西昌公文及默认密码配置从金隅移植

西昌缴费二期
liangkun преди 3 години
родител
ревизия
54d43b68cb
променени са 20 файла, в които са добавени 967 реда и са изтрити 9 реда
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.js
  2. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js
  3. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs
  4. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs
  5. +131
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_DefaultPwdConfigController.cs
  6. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.cshtml
  7. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js
  8. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.cshtml
  9. +112
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js
  10. +2
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  11. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  12. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  13. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs
  14. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_DefaultPwdConfigMap.cs
  15. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  16. +171
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs
  17. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigEntity.cs
  18. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs
  19. +213
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs
  20. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/IdCardLogin/IdCardLogin.js Целия файл

@@ -38,7 +38,7 @@
$page.find('#loginBtn').on('tap', function () {
var account = $('#idcard').val();
var password = $('#pwd').val();
var up = true;
var up = false;
if (account === "") {
learun.layer.warning('身份证号不能为空!', function () { }, '提示', '关闭');
}else if(account.length<=6){


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/modifypasswordandnotice/modifypasswordandnotice.js Целия файл

@@ -23,16 +23,16 @@

var req = {
newpassword: $.md5(formdata.newpassword),
oldpassword: $.md5(formdata.oldpassword)
oldpassword: formdata.oldpassword
};
learun.layer.loading(true);
// 访问后台修改密码
learun.httppost(config.webapi + "learun/adms/user/modifypw", req, (data,info) => {
learun.httppost(config.webapi + "learun/adms/user/modifypwiden", req, (data,info) => {
learun.layer.loading(false);
if (data) {// 表单数据保存成功,发起流程
learun.layer.toast(info);
learun.storage.set('logininfo', null);
learun.storage.set('pwd', false);
learun.storage.set('pwdandnotice', false);
learun.nav.go({ path: 'login', isBack: false, isHead: false });
}
return false;


+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs Целия файл

@@ -879,6 +879,42 @@ namespace Learun.Application.Organization
}
}
/// <summary>
/// 修改用户登录密码身份证后8位
/// </summary>
/// <param name="newPassword">新密码(MD5 小写)</param>
/// <param name="oldPassword">旧密码(身份证后8位)</param>
public bool RevisePasswordiden(string newPassword, string oldPassword)
{
try
{
UserInfo userInfo = LoginUserInfo.Get();
cache.Remove(cacheKeyId + userInfo.userId, CacheId.user);
cache.Remove(cacheKeyAccount + userInfo.account, CacheId.user);

var entity = userService.GetEntity(userInfo.userId);
if (oldPassword == entity.F_IdentityCardNo.Substring(entity.F_IdentityCardNo.Length - 8, 8))
{
userService.RevisePassword(userInfo.userId, newPassword);
}
else
{
return false;
}
return true;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 重置密码
/// </summary>
/// <param name="keyValue">账号主键</param>


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs Целия файл

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

/// <summary>
/// 通过身份证后8位修改密码
/// </summary>
/// <param name="newPassword"></param>
/// <param name="oldPassword"></param>
/// <returns></returns>
bool RevisePasswordiden(string newPassword, string oldPassword);
}
}

+ 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();
}

+ 2
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs Целия файл

@@ -17,7 +17,6 @@ using Learun.Application.OA;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.Application.TwoDevelopment.Permission;
using Learun.Application.WorkFlow;
using Learun.Application.TwoDevelopment.LR_LGManager;

namespace Learun.Application.Web.Controllers
{
@@ -59,8 +58,6 @@ namespace Learun.Application.Web.Controllers
private Perm_FunctionIBLL perm_FunctionIBLL = new Perm_FunctionBLL();
private ICache redisCache = CacheFactory.CaChe();
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();
private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL();
private StudentLeave_zcIBLL studentLeave_ZcIBLL = new StudentLeave_zcBLL();
#region 视图功能

public ActionResult ChangePwd()
@@ -493,9 +490,9 @@ namespace Learun.Application.Web.Controllers
paginationobj.sidx = "SendTime";
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count();
//普通教师请假-未归档数
ViewBag.UnfileLeave = studentLeaveIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count();
ViewBag.UnfileLeave = 0;
//中层领导请假-未归档数
ViewBag.UnfileLeaveZC = studentLeave_ZcIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count();
ViewBag.UnfileLeaveZC = 0;

ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail + ViewBag.UnfileLeave + ViewBag.UnfileLeaveZC;
#endregion


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Целия файл

@@ -331,6 +331,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StuGrantController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuInfoBasicChangeController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuScoreNotPassController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_DefaultPwdConfigController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_ReceiveDocumentController.cs" />
<Compile Include="Areas\EvaluationTeach\EvaluationTeachAreaRegistration.cs" />
<Compile Include="Areas\EvaluationTeach\Controllers\Eval_MainController.cs" />
@@ -1002,6 +1003,8 @@
<Content Include="Areas\EducationalAdministration\Views\StuScore\GraduateScoreQueryAllIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndexTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.js" />
@@ -6963,6 +6966,8 @@
<Content Include="Areas\LR_Desktop\Views\MessageRind\Form.cshtml" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\UnreadIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 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>

+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs Целия файл

@@ -27,6 +27,7 @@ namespace Learun.Application.WebApi
{
Post["/login"] = Login;
Post["/modifypw"] = ModifyPassword;
Post["/modifypwiden"] = ModifyPasswordiden;
Post["/unbundWeiXin"] = DoUnbundWeiXin;
Post["/loginbyIdCard"] = LoginByIdCard;

@@ -247,6 +248,26 @@ namespace Learun.Application.WebApi
}
}
}
private Response ModifyPasswordiden(dynamic _)
{
ModifyModel modifyModel = this.GetReqData<ModifyModel>();
if (userInfo.isSystem)
{
return Fail("当前账户不能修改密码");
}
else
{
bool res = userIBLL.RevisePasswordiden(modifyModel.newpassword, modifyModel.oldpassword);
if (!res)
{
return Fail("原密码错误,请重新输入");
}
else
{
return Success("密码修改成功");
}
}
}

/// <summary>
/// 解绑微信


+ 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 Целия файл

@@ -87,6 +87,7 @@
<Compile Include="EducationalAdministration\StuInfoFreshOnlineServiceMap.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPassMap.cs" />
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePreMap.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfigMap.cs" />
<Compile Include="EducationalAdministration\Sys_ReceiveFileMap.cs" />
<Compile Include="EducationalAdministration\TeachPlanMap.cs" />
<Compile Include="EducationalAdministration\TeachSwitchMap.cs" />


+ 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 Целия файл

@@ -191,6 +191,10 @@
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreEntity.cs" />
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreIBLL.cs" />
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreService.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigBLL.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigEntity.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigIBLL.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigService.cs" />
<Compile Include="EducationalAdministration\Sys_ReceiveDocument\Sys_ReceiveDocumentBLL.cs" />
<Compile Include="EducationalAdministration\Sys_ReceiveDocument\Sys_ReceiveDocumentEntity.cs" />
<Compile Include="EducationalAdministration\Sys_ReceiveDocument\Sys_ReceiveDocumentIBLL.cs" />


Зареждане…
Отказ
Запис