Просмотр исходного кода

Merge commit '031589c39727babdc8f8c298cad7e5d7f5858e45' into 金隅分支

金隅分支
zhichao lei 4 лет назад
Родитель
Сommit
4700a3f84b
57 измененных файлов: 2157 добавлений и 237 удалений
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/JournalSend/JournalSend.js
  2. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/JournalSend/form/form.js
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeave.js
  4. +18
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/login.js
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/bindaccount/bindaccount.css
  6. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/bindaccount/bindaccount.html
  7. +110
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/bindaccount/bindaccount.js
  8. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/my.html
  9. +9
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.cshtml
  10. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Index.js
  11. +9
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js
  12. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.cshtml
  13. +10
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.js
  14. +1
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutItemApply/Form.cshtml
  15. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutItemApply/Form.js
  16. +14
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Form.js
  17. +9
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuAttendanceLeaveController.cs
  18. +176
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuLeaveManagementController.cs
  19. +19
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs
  20. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Index.cshtml
  21. +52
    -36
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Index.js
  22. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/IndexInStudent.cshtml
  23. +193
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/IndexInStudent.js
  24. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js
  25. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckForm.cshtml
  26. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckForm.js
  27. +41
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.cshtml
  28. +182
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js
  29. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Form.cshtml
  30. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Form.js
  31. +40
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.cshtml
  32. +212
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.js
  33. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.cshtml
  34. +52
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js
  35. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  36. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js
  37. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  38. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs
  39. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuLeaveManagementMap.cs
  40. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  41. +54
    -75
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs
  42. +21
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoApply/Ass_AssetsInfoApplyService.cs
  43. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemEntity.cs
  44. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs
  45. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Purchase/Ass_PurchaseService.cs
  46. +2
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Receive/Ass_ReceiveService.cs
  47. +13
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeaveEntity.cs
  48. +18
    -47
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeaveService.cs
  49. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementBLL.cs
  50. +122
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementEntity.cs
  51. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementIBLL.cs
  52. +195
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs
  53. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentBLL.cs
  54. +12
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentEntity.cs
  55. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentIBLL.cs
  56. +36
    -11
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs
  57. +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/EducationalAdministration/JournalSend/JournalSend.js Просмотреть файл

@@ -71,7 +71,7 @@
_postParam.queryJson = JSON.stringify({ userId: baseUser.baseinfo.userId });

console.log(baseUser);
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Journal/pagelist', _postParam, (data) => {
learun.httpget(config.webapi + 'Learun/adms/EducationalAdministration/Journal/pagelist', _postParam, (data) => {

$page.find('.lr-badge').text('0');
if (data) {
@@ -109,7 +109,7 @@
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在删除该笔数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Journal/delete', item.JournalSendId, (data) => {
learun.httppost(config.webapi + 'Learun/adms/EducationalAdministration/Journal/delete', item.JournalSendId, (data) => {
if (data) {// 删除数据成功
page.grid.reload();
}


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/JournalSend/form/form.js Просмотреть файл

@@ -61,7 +61,7 @@
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在删除该笔数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Journal/delete', keyValue, (data) => {
learun.httppost(config.webapi + 'Learun/adms/EducationalAdministration/Journal/delete', keyValue, (data) => {
learun.layer.loading(false);
if (data) {// 删除数据成功
learun.nav.closeCurrent();
@@ -88,7 +88,7 @@
_postData.keyValue = keyValue;
_postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet());
learun.layer.loading(true, '正在提交数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Journal/save', _postData, (data) => {
learun.httppost(config.webapi + 'Learun/adms/EducationalAdministration/Journal/save', _postData, (data) => {
learun.layer.loading(false);
if (data) {// 表单数据保存成功
if (keyValue) {
@@ -119,7 +119,7 @@
_postData.keyValue = keyValue;
_postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet());
learun.layer.loading(true, '正在提交数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Journal/saveDraft', _postData, (data) => {
learun.httppost(config.webapi + 'Learun/adms/EducationalAdministration/Journal/saveDraft', _postData, (data) => {
learun.layer.loading(false);
if (data) {// 表单数据保存成功
if (keyValue) {
@@ -146,7 +146,7 @@
$header.find('.lr-form-header-btnlist').show();
// 获取表单数据
learun.layer.loading(true, '获取表单数据');
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Journal/form', keyValue, (data) => {
learun.httpget(config.webapi + 'Learun/adms/EducationalAdministration/Journal/form', keyValue, (data) => {
if (data) {
for (var id in data) {
if (data[id].length) {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeave.js Просмотреть файл

@@ -59,6 +59,7 @@
$page.find('.lr-badge').text('0');
if (data) {
$page.find('.lr-badge').text(data.records);
console.log(data.rows);
callback(data.rows, parseInt(data.records));
}
else {


+ 18
- 1
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/login/login.js Просмотреть файл

@@ -1,7 +1,24 @@
(function () {
var isBindAccountLogin = '';//切换账号登录
var bindUserName = '';//绑定账号
var bindUserPassword = '';//绑定账号密码

var page = {
headColor: '#ffffff',
init: function ($page) {
init: function ($page, param) {
//切换账号登录时:登录页赋值,触发登录事件;
isBindAccountLogin = param.isBindAccountLogin;
bindUserName = param.bindUserName;
bindUserPassword = param.bindUserPassword;
if (isBindAccountLogin == 1) {
$page.find('#account').val(bindUserName);
$page.find('#password').val(bindUserPassword);
var timer = setTimeout(function () {
$page.find('#loginBtn').trigger("tap");
clearTimeout(timer);
}, 3000);
}

var path = config.webapi;
learun.http.get(path + "Learun/EducationalAdministration/EmpRegister/registerbutton",
{}, (res) => {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/bindaccount/bindaccount.css Просмотреть файл

@@ -0,0 +1 @@


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/bindaccount/bindaccount.html Просмотреть файл

@@ -0,0 +1,19 @@
<div class="lr-page lr-EducationalAdministrationLoginUserBind-page">
<div class="lr-page-tool">
<div class="lr-tool-left">
总共<span class="lr-badge lr-badge-primary">0</span>条
</div>
<div class="lr-tool-right">
<div class="lr-tool-right-btn lr_multiple_search">
<i class="iconfont icon-searchlist"></i>
<div class="lr-tool-right-btn-content lr-form-container">
<div class="lr-form-row">
<label>绑定账号</label>
<input id="BindUserAccount" type="text">
</div>
</div>
</div>
</div>
</div>
<div class="lr-page-content" id="lr_EducationalAdministrationLoginUserBind_list"></div>
</div>

+ 110
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/bindaccount/bindaccount.js Просмотреть файл

@@ -0,0 +1,110 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2020-11-19 14:50
* 描 述:切换账号
*/
(function () {
var begin = '';
var end = '';
var multipleData = null;
var userinfo = null;
var page = {
grid: null,
init: function ($page) {
// 获取登录者信息
userinfo = learun.storage.get('userinfo');
begin = '';
end = '';
multipleData = null;
page.grid = $page.find('#lr_EducationalAdministrationLoginUserBind_list').lrpagination({
lclass: page.lclass,
rows: 10, // 每页行数
getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
param.multipleData = multipleData;
page.loadData(param, callback, $page);
},
renderData: function (_index, _item, _$item) {// 渲染数据模板
return page.rowRender(_index, _item, _$item, $page);
},
click: function (item, $item, $et) {// 列表行点击事件
if ($et.hasClass('lr-btn-danger')) {
page.btnClick(item, $item, $page);
}
else {
//page.rowClick(item, $item, $page);
}
},
btns: page.rowBtns
});
// 多条件查询
var $multiple = $page.find('.lr_multiple_search').multiplequery({
callback: function (data) {
begin = '';
end = '';
multipleData = data || {};
page.grid.reload();
}
});
},
lclass: 'lr-list',
loadData: function (param, callback, $page) {// 列表加载后台数据
var _postParam = {
pagination: {
rows: param.rows,
page: param.page,
sidx: 'CreateTime desc',
sord: 'DESC'
},
queryJson: JSON.stringify({ CreateUserId: learun.storage.get('userinfo').baseinfo.userId })
};
if (param.multipleData) {
multipleData.CreateUserId = learun.storage.get('userinfo').baseinfo.userId;
_postParam.queryJson = JSON.stringify(multipleData);
}
if (param.begin && param.end) {
_postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, CreateUserId: learun.storage.get('userinfo').baseinfo.userId });
}
learun.httpget(config.webapi + 'learun/EducationalAdministration/LoginUserBind/pagelist', _postParam, (data) => {
$page.find('.lr-badge').text('0');
if (data) {
$page.find('.lr-badge').text(data.records);
callback(data.rows, parseInt(data.records));
}
else {
callback([], 0);
}
});
},
rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据
_$item.addClass('lr-list-item lr-list-item-multi');
_$item.append($('<p class="lr-ellipsis"><span>绑定账号:</span></p>').dataFormatter({ value: _item.BindUserAccount }));
_$item.append($('<p class="lr-ellipsis"><span>绑定时间:</span></p>').dataFormatter({
value: _item.CreateTime,
type: 'datetime',
dateformat: 'yyyy-MM-dd hh:mm:ss'
}));
return '';
},
//rowClick: function (item, $item, $page) {// 列表行点击触发方法
// learun.nav.go({ path: 'EducationalAdministration/LoginUserBind/form', title: '详情', type: 'right', param: { keyValue: item.Id } });
//},
btnClick: function (item, $item, $page) {// 左滑按钮点击事件
//安全退出;自动登录;
learun.isOutLogin = true;
learun.storage.set('logininfo', null);
learun.nav.go({ path: 'login', isBack: false, isHead: false, param: { isBindAccountLogin: 1, bindUserName: item.BindUserAccount, bindUserPassword: item.BindUserPassword } });
if (learun.storage.get("Ip") != null && learun.storage.get("ACIp") != "") {
//Ip上网
sendToAc(learun.storage.get("ACIp"), 'logout', learun.storage.get("Ip"), userinfo.baseinfo.account, '');
}
if (learun.storage.get("Ip") != null && learun.storage.get("ACIp2") != "") {
//Ip上网
sendToAc(learun.storage.get("ACIp2"), 'logout', learun.storage.get("Ip"), userinfo.baseinfo.account, '');
}
},
rowBtns: ['<a class="lr-btn-danger">登录</a>'] // 列表行左滑按钮
};
return page;
})();

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/my/my.html Просмотреть файл

@@ -19,6 +19,10 @@
<i class="iconfont icon-write"></i>
<a class="lr-nav-right">修改密码</a>
</div>
<div class="lr-list-item lr-list-item-icon" data-value="bindaccount">
<i class="iconfont icon-group"></i>
<a class="lr-nav-right">切换账号</a>
</div>
</div>
<div class="lr-list" style="margin-top:15px;">
<div class="lr-list-item" id="unbundweixin" style="padding-left:38px;">解绑微信</div>


+ 9
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.cshtml Просмотреть файл

@@ -4,7 +4,7 @@
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo">
<div class="lr-form-item-title">资产类<font face="宋体">*</font></div>
<div class="lr-form-item-title">资产类<font face="宋体">*</font></div>
<div id="ATId" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo">
@@ -31,6 +31,14 @@
<div class="lr-form-item-title">生产厂家</div>
<input id="AManufacturer" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo">
<div class="lr-form-item-title">用途</div>
<input id="AUse" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo">
<div class="lr-form-item-title">规格</div>
<input id="ASpecification" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo">
<div class="lr-form-item-title">资产来源</div>
<div id="ASource"></div>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Index.js Просмотреть файл

@@ -112,7 +112,7 @@ var bootstrap = function ($, learun) {
{ label: "资产编号", name: "ACode", width: 200, align: "left" },
{ label: "资产名称", name: "AName", width: 200, align: "left" },
{
label: "资产类", name: "ATId", width: 100, align: "left",
label: "资产类", name: "ATId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType',


+ 9
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js Просмотреть файл

@@ -23,12 +23,18 @@ var bootstrap = function ($, learun) {
bind: function () {

// 初始化左侧树形数据lr_printBar
//$('#dataTree').lrtree({
// url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetTree',
// nodeClick: function (item) {
// page.search({ AIAssType: item.value });
// }
//});
$('#dataTree').lrtree({
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetTree',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetTree',
nodeClick: function (item) {
page.search({ AIAssType: item.value });
page.search({ AIASSClass: item.value });
}
});
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 400, 400);


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.cshtml Просмотреть файл

@@ -59,7 +59,7 @@
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply">
<div class="lr-form-item-title">数量单位</div>
<div id="AAIUnit" readonly="readonly"></div>
<div id="AAIUnit" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply">
<div class="lr-form-item-title">排序<font face="宋体">*</font></div>


+ 10
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.js Просмотреть файл

@@ -59,11 +59,11 @@ var bootstrap = function ($, learun) {
select: function (values, texts) {
if (values && values.length > 0) {
//绑定
$("#AAITId").attr("readonly", "readonly");
$("#AAICode").attr("readonly", "readonly");
$("#AAIName").attr("readonly", "readonly");
$("#AAIUnit").attr("readonly", "readonly");
$("#AAIHasDetail").attr("readonly", "readonly");
//$("#AAITId").attr("readonly", "readonly");
//$("#AAICode").attr("readonly", "readonly");
//$("#AAIName").attr("readonly", "readonly");
//$("#AAIUnit").attr("readonly", "readonly");
//$("#AAIHasDetail").attr("readonly", "readonly");
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) {
data = data.Ass_AssetsInfo;
$('#AAITId').lrselectSet(data.ATId);
@@ -80,11 +80,11 @@ var bootstrap = function ($, learun) {
},
unknowselect: function () {
$("#AAOldCode").find('span').text("");
$("#AAITId").removeAttr("readonly");
$("#AAICode").removeAttr("readonly");
$("#AAIName").removeAttr("readonly");
$("#AAIUnit").removeAttr("readonly");
$("#AAIHasDetail").removeAttr("readonly");
//$("#AAITId").removeAttr("readonly");
//$("#AAICode").removeAttr("readonly");
//$("#AAIName").removeAttr("readonly");
//$("#AAIUnit").removeAttr("readonly");
//$("#AAIHasDetail").removeAttr("readonly");
$('#AAITId').lrselectSet("");
$('#AAICode').val("");
$('#AAIName').val("");


+ 1
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutItemApply/Form.cshtml Просмотреть файл

@@ -47,7 +47,7 @@
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply">
<div class="lr-form-item-title">用途</div>
<input id="AOIUse" type="text" class="form-control" readonly="readonly" />
<input id="AOIUse" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply">
<div class="lr-form-item-title">原使用部门</div>
@@ -73,10 +73,6 @@
<div class="lr-form-item-title">新库存位置<font face="宋体">*</font></div>
<div id="AOINewStorageId" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply">
<div class="lr-form-item-title">用途</div>
<input id="AOIUse" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsOutItemApply">
<div class="lr-form-item-title">数量单位</div>
<div id="AOIUnit" readonly="readonly"></div>


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutItemApply/Form.js Просмотреть файл

@@ -67,6 +67,27 @@ var bootstrap = function ($, learun) {
grid: [
{ label: '资产编号', name: 'aicodenumjy', width: 150, align: 'left' },
{ label: '资产名称', name: 'aiassname', width: 150, align: 'left' },
{
label: '使用部门', name: 'aidepartment', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('department', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{
label: '使用人员', name: 'aiusepeople', width: 150, align: 'left',
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{
label: '所在库房', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {


+ 14
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Form.js Просмотреть файл

@@ -39,7 +39,10 @@ var bootstrap = function ($, learun) {

},
{
label: "数量", name: "ANum", width: 100, align: "left",
label: "库存数量", name: "ACNum", width: 100, align: "left",
},
{
label: "领取数量", name: "ANum", width: 100, align: "left",
edit: {
type: 'input',
inputType: 'number',
@@ -111,6 +114,10 @@ var bootstrap = function ($, learun) {
$('.jfgrid-data-cell[colname="AID"][rowIndex="' + rowIndex + '"]').attr('title', data.AId).html(data.AId);
$('#Ass_ReceiveItem')[0].dfop.running.rowdata[rowIndex]['jfgridRowData']['AID'] = data.AId;

$('jfgrid_edit_Ass_ReceiveItem_' + 'ACNum').val(data.AId);
$('.jfgrid-data-cell[colname="ACNum"][rowIndex="' + rowIndex + '"]').attr('title', data.AStock).html(data.AStock);
$('#Ass_ReceiveItem')[0].dfop.running.rowdata[rowIndex]['jfgridRowData']['ACNum'] = data.AStock;

});
}
},
@@ -151,7 +158,7 @@ var bootstrap = function ($, learun) {
}
});
}
callback && callback();
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
@@ -174,7 +181,11 @@ var bootstrap = function ($, learun) {
$.each(itemList, function (i, item) {
if (item.ANum <= 0) {
learun.alert.warning("请填写<" + item.AName + ">的申请数量");
num++
num++;
}
if (item.ANum > item.ACNum) {
learun.alert.warning("领取数量不能大于库存数量!");
num++;
}
})
if (num > 0) {


+ 9
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuAttendanceLeaveController.cs Просмотреть файл

@@ -40,14 +40,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}



[HttpGet]
public ActionResult CheckForm()
{
return View();
}
/// <summary>
/// 主页面【学子在线】
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexInStudent()
{
return View();
}
#endregion

#region 获取数据


+ 176
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuLeaveManagementController.cs Просмотреть файл

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-27 10:05
/// 描 述:学生请假管理
/// </summary>
public class StuLeaveManagementController : MvcControllerBase
{
private StuLeaveManagementIBLL stuLeaveManagementIBLL = new StuLeaveManagementBLL();

#region 视图功能

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

/// <summary>
/// 主页面【学工信息管理】
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult CheckIndex()
{
ViewBag.IsDeptDirector = false; //登录用户是否是系主任标识
var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId");
var loginInfoRoleIds = LoginUserInfo.Get().roleIds;
if (loginInfoRoleIds.IndexOf(',') == -1)
{
if (loginInfoRoleIds == deptDirectorRoleId)
{
ViewBag.IsDeptDirector = true;
}
}
else
{
if (loginInfoRoleIds.Split(',').Contains(deptDirectorRoleId))
{
ViewBag.IsDeptDirector = true;
}
}
return View();
}
/// <summary>
/// 表单页【学工信息管理】
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult CheckForm()
{
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 = stuLeaveManagementIBLL.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 StuLeaveManagementData = stuLeaveManagementIBLL.GetStuLeaveManagementEntity(keyValue);
var jsonData = new
{
StuLeaveManagement = StuLeaveManagementData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
stuLeaveManagementIBLL.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)
{
var loginInfo = LoginUserInfo.Get();
StuLeaveManagementEntity entity = strEntity.ToObject<StuLeaveManagementEntity>();
entity.CreateUserId = loginInfo.userId;
entity.CreateUserNo = loginInfo.account;
entity.CreateTime = DateTime.Now;
stuLeaveManagementIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveCheckForm(string keyValue, string strEntity)
{
var loginInfo = LoginUserInfo.Get();
StuLeaveManagementEntity entity = strEntity.ToObject<StuLeaveManagementEntity>();
entity.CheckUserId = loginInfo.userId;
entity.CheckUserNo = loginInfo.account;
entity.CheckTime = DateTime.Now;
stuLeaveManagementIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion

}
}

+ 19
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs Просмотреть файл

@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
#endregion

@@ -69,8 +69,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var StuPunishmentData = stuPunishmentIBLL.GetStuPunishmentEntity( keyValue );
var jsonData = new {
var StuPunishmentData = stuPunishmentIBLL.GetStuPunishmentEntity(keyValue);
var jsonData = new
{
StuPunishment = StuPunishmentData,
};
return Success(jsonData);
@@ -102,9 +103,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
StuPunishmentEntity entity = strEntity.ToObject<StuPunishmentEntity>();
stuPunishmentIBLL.SaveEntity(keyValue,entity);
stuPunishmentIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 解除处分
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoCancelPunish(string keyValue, bool status)
{
stuPunishmentIBLL.DoCancelPunish(keyValue, status);
return Success("操作成功!");
}
#endregion

}


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Index.cshtml Просмотреть файл

@@ -38,10 +38,10 @@
<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_check" class="btn btn-default"><i class="fa fa-joomla"></i>&nbsp;审批</a>
@*<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>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>*@
<a id="lr_check" class="btn btn-default"><i class="fa fa-joomla"></i>&nbsp;审批</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>


+ 52
- 36
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Index.js Просмотреть файл

@@ -16,33 +16,33 @@ var bootstrap = function ($, learun) {
},
bind: function () {
page.search();
//// 时间搜索框
//$('#datesearch').lrdate({
// dfdata: [
// { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
// { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
// { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
// { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
// ],
// // 月
// mShow: false,
// premShow: false,
// // 季度
// jShow: false,
// prejShow: false,
// // 年
// ysShow: false,
// yxShow: false,
// preyShow: false,
// yShow: false,
// // 默认
// dfvalue: '1',
// selectfn: function (begin, end) {
// startTime = begin;
// endTime = end;
// page.search();
// }
//});
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
@@ -97,16 +97,16 @@ var bootstrap = function ($, learun) {
var keyValue = $("#gridtable").jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var check = $("#gridtable").jfGridValue('IsCheck');
if (check != null) {
learun.alert.warning("已经审核过了");
if (check == "1") {
learun.alert.warning("该项已审核同意!");
return false;
} else {
learun.layerForm({
id: 'form',
id: 'checkform',
title: '审核',
url: top.$.rootUrl + '/EducationalAdministration/StuAttendanceLeave/CheckForm?keyValue=' + keyValue,
width: 600,
height: 400,
width: 1200,
height: 800,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -126,7 +126,7 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuAttendanceLeave/GetPageList',
headData: [
{ label: "学年度", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "申请时间", name: "UpdateDate", width: 100, align: "left" },
{
label: "审核状态", name: "IsCheck", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
@@ -134,11 +134,25 @@ var bootstrap = function ($, learun) {
key: value,
code: 'LeaveCheck',
callback: function (_data) {
callback(_data.text ? _data.text : "未审核");
callback(_data.text ? _data.text : "申请中");
}
});
}
},
{ label: "审核备注", name: "TecRemark", width: 100, align: "left" },
{
label: "请假类型", name: "LeaveType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" },
@@ -155,18 +169,20 @@ var bootstrap = function ($, learun) {
{ label: "课程类别", name: "LessonSortName", width: 100, align: "left" },
{ label: "原上课日期", name: "LessonDate", width: 100, align: "left" },
{ label: "上课时间", name: "LessonTime", width: 100, align: "left" },
{ label: "请假类型", name: "LeaveType", width: 100, align: "left" },
{ label: "教师号", name: "EmpNo", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true
isPage: true,
sord: 'UpdateDate desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
param.ClassManagerNo = learun.clientdata.get(['userinfo']).account;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/IndexInStudent.cshtml Просмотреть файл

@@ -0,0 +1,53 @@
@{
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="datesearch"></div>
</div>*@
<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="LessonName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教师号</div>
<input id="EmpNo" 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>*@
@*<a id="lr_check" class="btn btn-default"><i class="fa fa-joomla"></i>&nbsp;审批</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>*@
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuAttendanceLeave/IndexInStudent.js")

+ 193
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/IndexInStudent.js Просмотреть файл

@@ -0,0 +1,193 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-05-24 15:40
* 描 述:学生请假记录
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
page.search();
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#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/StuAttendanceLeave/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/StuAttendanceLeave/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/StuAttendanceLeave/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//审核
$("#lr_check").on('click', function () {
var keyValue = $("#gridtable").jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var check = $("#gridtable").jfGridValue('IsCheck');
if (check == "1") {
learun.alert.warning("该项已审核同意!");
return false;
} else {
learun.layerForm({
id: 'checkform',
title: '审核',
url: top.$.rootUrl + '/EducationalAdministration/StuAttendanceLeave/CheckForm?keyValue=' + keyValue,
width: 1200,
height: 800,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});

}
}

})
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuAttendanceLeave/GetPageList',
headData: [
{ label: "申请时间", name: "UpdateDate", width: 100, align: "left" },
{
label: "审核状态", name: "IsCheck", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveCheck',
callback: function (_data) {
callback(_data.text ? _data.text : "申请中");
}
});
}
},
{ label: "审核备注", name: "TecRemark", width: 100, align: "left" },
{
label: "请假类型", name: "LeaveType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" },
{ label: "年级", name: "Grade", width: 100, align: "left" },
{ label: "系所码", name: "DeptNo", width: 100, align: "left" },
{ label: "系名", name: "DeptName", width: 100, align: "left" },
{ label: "专业码", name: "MajorNo", width: 100, align: "left" },
{ label: "专业名", name: "MajorName", width: 100, align: "left" },
{ label: "所在行政班号 ", name: "ClassNo", width: 100, align: "left" },
{ label: "班级名称", name: "ClassName", width: 100, align: "left" },
{ label: "课程号", name: "LessonNo", width: 100, align: "left" },
{ label: "课程名称", name: "LessonName", width: 100, align: "left" },
{ label: "课程类别码", name: "LessonSortNo", width: 100, align: "left" },
{ label: "课程类别", name: "LessonSortName", width: 100, align: "left" },
{ label: "原上课日期", name: "LessonDate", width: 100, align: "left" },
{ label: "上课时间", name: "LessonTime", width: 100, align: "left" },
{ label: "教师号", name: "EmpNo", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true,
sord: 'UpdateDate desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
param.StuNo = learun.clientdata.get(['userinfo']).account;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js Просмотреть файл

@@ -337,6 +337,9 @@ var bootstrap = function ($, learun) {
{ label: "入学年月", name: "EntranceDate", width: 100, align: "left" },
{ label: "余额", name: "Balance", width: 100, align: "left" },
{ label: "通信地址", name: "MailAddress", width: 100, align: "left" },
{ label: "联系电话", name: "mobile", width: 100, align: "left" },
{ label: "户口所在地", name: "FatherUnit", width: 100, align: "left" },
{ label: "档案所在地", name: "MatherUnit", width: 100, align: "left" },
{
label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center",
formatter: function (cellvalue) {


+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckForm.cshtml Просмотреть файл

@@ -0,0 +1,35 @@
@{
ViewBag.Title = "学生请假管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">请假类型<font face="宋体">*</font></div>
<div id="LeaveType" readonly isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div>
<input id="StartTime" readonly type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>
<input id="EndTime" readonly type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">请假天数<font face="宋体">*</font></div>
<input id="LeaveDay" readonly type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">请假事由</div>
<textarea id="LeaveReason" readonly class="form-control" style="height:100px;"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">审核状态<font face="宋体">*</font></div>
<div id="CheckStatus" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">审核备注</div>
<textarea id="CheckRemark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckForm.js")

+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckForm.js Просмотреть файл

@@ -0,0 +1,52 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-11-27 10:05
* 描 述:学生请假管理
*/
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 () {
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
$('#CheckStatus').lrDataItemSelect({ code: 'LeaveCheck' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/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/StuLeaveManagement/SaveCheckForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 41
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.cshtml Просмотреть файл

@@ -0,0 +1,41 @@
@{
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>
<div id="LeaveType"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">审核状态</div>
<div id="CheckStatus"></div>
</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_check" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;审核</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js")
<script>
var IsDeptDirector = "@ViewBag.IsDeptDirector";
</script>

+ 182
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js Просмотреть файл

@@ -0,0 +1,182 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-11-27 10:05
* 描 述:学生请假管理
*/
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);
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
$('#CheckStatus').lrDataItemSelect({ code: 'LeaveCheck' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 审核
$('#lr_check').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
//判断是否可以审核:请假天数大于2天且登录用户不是系主任,提示无法审核;
var day = $('#gridtable').jfGridValue('LeaveDay');
if (day > 2 && IsDeptDirector.toLowerCase() == "false") {
learun.alert.warning("该请假申请大于2天,需要由系主任审核!");
return false;
}
learun.layerForm({
id: 'checkform',
title: '审核',
url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/CheckForm?keyValue=' + keyValue,
width: 800,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/GetPageList',
headData: [
{
label: "审核状态", name: "CheckStatus", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveCheck',
callback: function (_data) {
callback(_data.text ? _data.text : "申请中");
}
});
}
},
{ label: "审核备注", name: "CheckRemark", width: 100, align: "left" },
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" },
{
label: "审核人", name: "CheckUserNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
}
},
{
label: "请假类型", name: "LeaveType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "开始时间", name: "StartTime", width: 100, align: "left" },
{ label: "结束时间", name: "EndTime", width: 100, align: "left" },
{ label: "请假天数", name: "LeaveDay", width: 100, align: "left" },
{ label: "请假事由", name: "LeaveReason", width: 100, align: "left" },
{ label: "学号", name: "CreateUserNo", width: 100, align: "left" },
{ label: "姓名", name: "CreateUserName", width: 100, align: "left" },
{ label: "申请时间", name: "CreateTime", width: 130, align: "left" },
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{
label: "系部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
}
},
{
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
}
},

],
mainId: 'Id',
isPage: true,
sord: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.ClassManagerNo = learun.clientdata.get(['userinfo']).account;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Form.cshtml Просмотреть файл

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "学生请假管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">请假类型<font face="宋体">*</font></div>
<div id="LeaveType" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div>
<input id="StartTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'EndTime\')}', dateFmt:'yyyy-MM-dd',onpicked: function () { $('#StartTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'StartTime\')}',dateFmt:'yyyy-MM-dd',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">请假天数<font face="宋体">*</font></div>
<input id="LeaveDay" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement">
<div class="lr-form-item-title">请假事由</div>
<textarea id="LeaveReason" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuLeaveManagement/Form.js")

+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Form.js Просмотреть файл

@@ -0,0 +1,52 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-11-27 10:05
* 描 述:学生请假管理
*/
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 () {
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
$('#CheckStatus').lrDataItemSelect({ code: 'LeaveCheck' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/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/StuLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 40
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.cshtml Просмотреть файл

@@ -0,0 +1,40 @@
@{
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>
<div id="LeaveType"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">审核状态</div>
<div id="CheckStatus"></div>
</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>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.js")

+ 212
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.js Просмотреть файл

@@ -0,0 +1,212 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-11-27 10:05
* 描 述:学生请假管理
*/
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);
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
$('#CheckStatus').lrDataItemSelect({ code: 'LeaveCheck' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/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)) {
var status = $('#gridtable').jfGridValue('CheckStatus');
if (status == "1" || status == "2") {
learun.alert.warning("该项已审核无法编辑!");
return false;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/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)) {
var status = $('#gridtable').jfGridValue('CheckStatus');
if (status == "1") {
learun.alert.warning("该项已审核通过无法删除!");
return false;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/GetPageList',
headData: [
{
label: "审核状态", name: "CheckStatus", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveCheck',
callback: function (_data) {
callback(_data.text ? _data.text : "申请中");
}
});
}
},
{ label: "审核备注", name: "CheckRemark", width: 100, align: "left" },
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" },
{
label: "审核人", name: "CheckUserNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
}
},
{
label: "请假类型", name: "LeaveType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "开始时间", name: "StartTime", width: 100, align: "left" },
{ label: "结束时间", name: "EndTime", width: 100, align: "left" },
{ label: "请假天数", name: "LeaveDay", width: 100, align: "left" },
{ label: "请假事由", name: "LeaveReason", width: 100, align: "left" },
{ label: "学号", name: "CreateUserNo", width: 100, align: "left" },
{ label: "姓名", name: "CreateUserName", width: 100, align: "left" },
{ label: "申请时间", name: "CreateTime", width: 130, align: "left" },
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{
label: "系部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
}
},
{
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
}
},

],
mainId: 'Id',
isPage: true,
sord: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.StuNo = learun.clientdata.get(['userinfo']).account;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.cshtml Просмотреть файл

@@ -16,6 +16,8 @@
<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>
<a id="lr_cancelPunish" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;解除处分</a>
<a id="lr_cancelPunishNot" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;取消解除处分</a>
</div>
</div>
</div>


+ 52
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js Просмотреть файл

@@ -19,7 +19,7 @@ var bootstrap = function ($, learun) {
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/StuPunishment/Form',
@@ -50,9 +50,45 @@ var bootstrap = function ($, learun) {
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 解除处分
$('#lr_cancelPunish').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var status = $('#gridtable').jfGridValue('IsCancelPunish');
if (status == true) {
learun.alert.warning("该项已解除处分!");
return false;
}
learun.layerConfirm('是否确认解除处分该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: true }, function () {
refreshGirdData();
});
}
});
}
});
// 取消解除处分
$('#lr_cancelPunishNot').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var status = $('#gridtable').jfGridValue('IsCancelPunish');
if (status != true) {
learun.alert.warning("该项未解除处分,无法取消解除!");
return false;
}
learun.layerConfirm('是否确认取消解除处分该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: false }, function () {
refreshGirdData();
});
}
@@ -65,23 +101,29 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuPunishment/GetPageList',
headData: [
{ label: "学号", name: "StuNo", width: 100, align: "left"},
{ label: "姓名", name: "StuName", width: 100, align: "left"},
{ label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" },
{
label: "处分名称", name: "PunishName", width: 100, align: "left"
},
{ label: "处分原因", name: "PunishReason", width: 100, align: "left"},
{ label: "处分日期", name: "PunishDate", width: 100, align: "left"},
{ label: "处分文号", name: "FileNo", width: 100, align: "left"},
{ label: "处分原因", name: "PunishReason", width: 100, align: "left" },
{ label: "处分日期", name: "PunishDate", width: 100, align: "left" },
{ label: "处分文号", name: "FileNo", width: 100, align: "left" },
{
label: "是否解除处分", name: "IsCancelPunish", width: 100, align: "left", formatter: function (cellvalue) {
return cellvalue == true ? "是" : "否";
}
},
{ label: "解除处分日期", name: "CancelPunishDate", width: 100, align: "left" },
],
mainId:'Id',
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {


+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Просмотреть файл

@@ -790,6 +790,7 @@
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_AcceptanceController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\LoginUserBindController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_InformationPushController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuLeaveManagementController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -943,6 +944,7 @@
<Content Include="Areas\EducationalAdministration\Views\R_EnterSchool\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuAttendanceLeave\IndexInStudent.js" />
<Content Include="Areas\EducationalAdministration\Views\StuAttendance\IndexOfUnrecord.js" />
<Content Include="Areas\EducationalAdministration\Views\StuAttendance\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuCancelExam\Detail.js" />
@@ -970,6 +972,8 @@
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\FormDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\SchoolUniform.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\IndexDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckForm.js" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexInTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\Monitor.js" />
@@ -6110,6 +6114,10 @@
<Content Include="Areas\EducationalAdministration\Views\Sys_InformationPush\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_InformationPush\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_InformationPush\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />
@@ -6872,6 +6880,9 @@
<Content Include="Areas\AssetManagementSystem\Views\Ass_AllocationItem\Index.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\ViewForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\BindAccountIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuAttendanceLeave\IndexInStudent.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckIndex.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js Просмотреть файл

@@ -301,7 +301,7 @@
}
else {
var data = storage.get("userData").data || {};
var keys = op.key.split(',');
var keys = (op.key || '').split(',');
var array=new Array();
if (keys.length > 1) {
$.each(keys,


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config Просмотреть файл

@@ -161,4 +161,6 @@
<!--第三方登录跳转地址(最后不加/)-->
<add key="redirect_url" value="http://localhost:20472"/>
<add key="QJUrl" value="www.qj.com"/>
<!--系主任角色Id-->
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" />
</appSettings>

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs Просмотреть файл

@@ -95,7 +95,7 @@ namespace Learun.Application.Excel
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ExcelImportEntity GetEntity(string keyValue)
public ExcelImportEntity GetEntity(string keyValue)//1
{
try
{


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuLeaveManagementMap.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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-27 10:05
/// 描 述:学生请假管理
/// </summary>
public class StuLeaveManagementMap : EntityTypeConfiguration<StuLeaveManagementEntity>
{
public StuLeaveManagementMap()
{
#region 表、主键
//表
this.ToTable("STULEAVEMANAGEMENT");
//主键
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 Просмотреть файл

@@ -542,6 +542,7 @@
<Compile Include="AssetManagementSystem\Ass_AcceptanceMap.cs" />
<Compile Include="EducationalAdministration\LoginUserBindMap.cs" />
<Compile Include="EducationalAdministration\Sys_InformationPushMap.cs" />
<Compile Include="EducationalAdministration\StuLeaveManagementMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 54
- 75
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs Просмотреть файл

@@ -273,94 +273,39 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
db.Delete<Ass_AssetsChangeItemEntity>(m => m.AIId == Ass_AssetsInfoItem.AId);
db.Delete(Ass_AssetsInfoItem);
}
//新增明细
if (entity.HasDetail == true)
{
if (entity.AStock > 0)
{
for (int i = 0; i < entity.AStock; i++)
{
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AICodeNum = i + 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = true;
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;
Ass_AssetsInfoItem.AIUse = entity.AUse;
db.Insert(Ass_AssetsInfoItem);
}
}
else
{
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AICodeNum = 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = false;
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;
Ass_AssetsInfoItem.AIUse = entity.AUse;
db.Insert(Ass_AssetsInfoItem);
}
}
else
{
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AICodeNum = 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = entity.AStock > 0;
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;
Ass_AssetsInfoItem.AIUse = entity.AUse;
db.Insert(Ass_AssetsInfoItem);
}

}
else
{
entity.Create();
db.Insert(entity);
if (entity.HasDetail == true)
}

//新增明细
if (entity.HasDetail == true)
{
if (entity.AStock > 0)
{
if (entity.AStock > 0)
{
for (int i = 0; i < entity.AStock; i++)
{
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AIASSName = entity.AName;
Ass_AssetsInfoItem.AICodeNumJY = entity.ACode;
Ass_AssetsInfoItem.AICodeNum = i + 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = true;
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;
Ass_AssetsInfoItem.AIAssType = entity.AAssType;
Ass_AssetsInfoItem.AIUse = entity.AUse;
db.Insert(Ass_AssetsInfoItem);
}
}
else
for (int i = 0; i < entity.AStock; i++)
{
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AIASSName = entity.AName;
Ass_AssetsInfoItem.AICodeNumJY = entity.ACode;
Ass_AssetsInfoItem.AICodeNum = 1;
Ass_AssetsInfoItem.AIAssValue = entity.APrice;//价值
Ass_AssetsInfoItem.AIUnits = entity.AUnit;//单位
Ass_AssetsInfoItem.AISpecificationtype = entity.AModel;//型号
Ass_AssetsInfoItem.AIASSClass = entity.ATId;//类别
Ass_AssetsInfoItem.AIManufacturer = entity.AManufacturer;//厂家
Ass_AssetsInfoItem.AIUse = entity.AUse;//用途
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;//规格
Ass_AssetsInfoItem.AIAssType = entity.AAssType;//属性
Ass_AssetsInfoItem.AICodeNum = i + 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AICodeNumJY = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = false;
Ass_AssetsInfoItem.AIIsInStorage = true;
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;
Ass_AssetsInfoItem.AIUse = entity.AUse;
db.Insert(Ass_AssetsInfoItem);
@@ -371,16 +316,50 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AIASSName = entity.AName;
Ass_AssetsInfoItem.AIAssValue = entity.APrice;
Ass_AssetsInfoItem.AIUnits = entity.AUnit;//单位
Ass_AssetsInfoItem.AISpecificationtype = entity.AModel;//型号
Ass_AssetsInfoItem.AIASSClass = entity.ATId;//类别
Ass_AssetsInfoItem.AIManufacturer = entity.AManufacturer;//厂家
Ass_AssetsInfoItem.AIUse = entity.AUse;//用途
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;//规格
Ass_AssetsInfoItem.AIAssType = entity.AAssType;//属性
Ass_AssetsInfoItem.AICodeNum = 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AICodeNumJY = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = entity.AStock > 0;
Ass_AssetsInfoItem.AIIsInStorage = false;
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;
Ass_AssetsInfoItem.AIUse = entity.AUse;
db.Insert(Ass_AssetsInfoItem);
}
}
else
{
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AIASSName = entity.AName;
Ass_AssetsInfoItem.AIAssValue = entity.APrice;
Ass_AssetsInfoItem.AIUnits = entity.AUnit;//单位
Ass_AssetsInfoItem.AISpecificationtype = entity.AModel;//型号
Ass_AssetsInfoItem.AIASSClass = entity.ATId;//类别
Ass_AssetsInfoItem.AIManufacturer = entity.AManufacturer;//厂家
Ass_AssetsInfoItem.AIUse = entity.AUse;//用途
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;//规格
Ass_AssetsInfoItem.AIAssType = entity.AAssType;//属性
Ass_AssetsInfoItem.AICodeNum = 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AICodeNumJY = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = entity.AStock > 0;
Ass_AssetsInfoItem.AISpecification = entity.ASpecification;
Ass_AssetsInfoItem.AIUse = entity.AUse;
db.Insert(Ass_AssetsInfoItem);
}
db.Commit();
}
catch (Exception ex)


+ 21
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoApply/Ass_AssetsInfoApplyService.cs Просмотреть файл

@@ -317,14 +317,21 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
insertassinfoitem.AId = assinfoitem.AId;
insertassinfoitem.AICodeNum = Ass_AssetsInfoItemMaxNum + 1 + i;
insertassinfoitem.AICode = assinfoitem.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AICodeNumJY = assinfoitem.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AICodeNumJY = assinfoitem.ACode + "_" + insertassinfoitem.AICodeNum.ToString();//金隅编号
insertassinfoitem.AIAssValue = assinfoitem.APrice;//价值
insertassinfoitem.AIUnits = assinfoitem.AUnit;//单位
insertassinfoitem.AISpecificationtype = assinfoitem.AModel;//型号
insertassinfoitem.AIManufacturer = assinfoitem.AManufacturer;//厂家
insertassinfoitem.AIUse = assinfoitem.AUse;//用途
insertassinfoitem.AISpecification = assinfoitem.ASpecification;//规格

insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId;
insertassinfoitem.AIASSName = assitemapp.AAIName;
insertassinfoitem.AIIStoragePosition = assitemapp.AAIStoragePosition;
insertassinfoitem.AIIsInStorage = true;
insertassinfoitem.AISpecification = assitemapp.AAISpecification;
insertassinfoitem.AIAssType = assinfoapp.AAAssType;
insertassinfoitem.AIASSClass = assinfoitem.ATId;
insertassinfoitem.AIASSClass = assinfoitem.ATId;//类别
insertassinfoitem.AIUse = assitemapp.AAIUse;
db.Insert(insertassinfoitem);
//出入库明细表
@@ -417,6 +424,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
insertassinfoitem.AICodeNum = i + 1;
insertassinfoitem.AICode = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AIAssValue = assinfoitem.APrice;//价值
insertassinfoitem.AIUnits = assinfoitem.AUnit;//单位
insertassinfoitem.AISpecificationtype = assinfoitem.AModel;//型号
insertassinfoitem.AIManufacturer = assinfoitem.AManufacturer;//厂家
insertassinfoitem.AIUse = assinfoitem.AUse;//用途
insertassinfoitem.AISpecification = assinfoitem.ASpecification;//规格
insertassinfoitem.AIASSName = assitemapp.AAIName;
insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId;
insertassinfoitem.AIAssType = assinfoapp.AAAssType;
@@ -474,6 +487,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
insertassinfoitem.AICodeNum = 1;
insertassinfoitem.AICode = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AIAssValue = assinfoitem.APrice;//价值
insertassinfoitem.AIUnits = assinfoitem.AUnit;//单位
insertassinfoitem.AISpecificationtype = assinfoitem.AModel;//型号
insertassinfoitem.AIManufacturer = assinfoitem.AManufacturer;//厂家
insertassinfoitem.AIUse = assinfoitem.AUse;//用途
insertassinfoitem.AISpecification = assinfoitem.ASpecification;//规格
insertassinfoitem.AIASSName = assitemapp.AAIName;
insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId;
insertassinfoitem.AIAssType = assinfoapp.AAAssType;


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemEntity.cs Просмотреть файл

@@ -211,7 +211,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
public string AIUse { get; set; }

/// <summary>
/// 资产类别
/// 资产属性
/// </summary>
[Column("AIASSTYPE")]
public int? AIAssType { get; set; }


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs Просмотреть файл

@@ -183,6 +183,8 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
a.AIIStoragePosition,
a.AIIsInStorage,
a.AICodeNumJY,
a.AIUsePeople,
a.AIDepartment,
a.AIId,
a.AICode,
a.AIASSName,


+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Purchase/Ass_PurchaseService.cs Просмотреть файл

@@ -39,7 +39,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
t.PActualPrice,
t.PStatus,
t.PStoregeStatus,
t.POpinion,
a.PACode
");
strSql.Append(" FROM Ass_Purchase t join Ass_PurchaseApply a on t.PAId=a.PAId");


+ 2
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Receive/Ass_ReceiveService.cs Просмотреть файл

@@ -217,15 +217,10 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
if (num > 0)
{
var assInfoEntity = db.FindEntity<Ass_AssetsInfoEntity>(a => a.AId == item.AID);
if (assInfoEntity.AStock > num)
if (assInfoEntity.AStock >= num)
{
assInfoEntity.AStock = assInfoEntity.AStock - num;
var listAssInfoItemList =
db.FindList<Ass_AssetsInfoItemEntity>(a => a.AId == item.AID).Take(2);
foreach (var assInfoItem in listAssInfoItemList)
{
db.Delete(assInfoItem);
}
db.Update(assInfoEntity);
}
}



+ 13
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeaveEntity.cs Просмотреть файл

@@ -166,7 +166,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public DateTime? UpdateDate { get; set; }

/// <summary>
/// 审核状态
/// 审核状态(0请假申请中1请假通过2请假未通过)
/// </summary>
[Column("ISCHECK")]
public string IsCheck { get; set; }
@@ -216,5 +216,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}

#endregion 扩展操作
#region 扩展成员
/// <summary>
/// 班级班主任
/// </summary>
[NotMapped]
public string ClassDiredctorNo { get; set; }
/// <summary>
/// 班级辅导员
/// </summary>
[NotMapped]
public string ClassTutorNo { get; set; }
#endregion
}
}

+ 18
- 47
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeaveService.cs Просмотреть файл

@@ -30,34 +30,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.AcademicYearNo,
t.Semester,
t.StuNo,
t.StuName,
t.Grade,
t.DeptNo,
t.DeptName,
t.MajorNo,
t.MajorName,
t.ClassNo,
t.ClassName,
t.LessonNo,
t.LessonName,
t.TeachClassNo,
t.LessonSortNo,
t.LessonSortName,
t.LessonDate,
t.LessonTime,
t.LeaveType,
t.EmpNo,
t.Remark,
t.IsCheck,
t.TecRemark
");
strSql.Append(" FROM StuAttendanceLeave t ");
strSql.Append("SELECT t.*,c.ClassDiredctorNo,c.ClassTutorNo ");
strSql.Append(" FROM StuAttendanceLeave t left join ClassInfo c on t.ClassNo=c.ClassNo ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -75,8 +49,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
if (!queryParam["Grade"].IsEmpty())
{
dp.Add("Grade", "%" + queryParam["Grade"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Grade Like @Grade ");
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
strSql.Append(" AND t.Grade = @Grade ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String);
strSql.Append(" AND t.StuNo = @StuNo ");
}
if (!queryParam["StuName"].IsEmpty())
{
@@ -88,24 +67,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.EmpNo Like @EmpNo ");
}
var result = this.BaseRepository("CollegeMIS").FindList<StuAttendanceLeaveEntity>(strSql.ToString(), dp, pagination);
//var result = this.BaseRepository("CollegeMIS").FindList<StuAttendanceLeaveEntity>(strSql.ToString(), dp, pagination);
//获取登录帐号
var userInfo = LoginUserInfo.Get();
//获取当前帐号所管理的班级
var classes = this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(a => a.ClassDiredctorNo == userInfo.account).Select(a => a.ClassNo);
var list = result.Where(a => classes.Contains(a.ClassNo)).ToList();
return list;
//var stuSelectLessons = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>(a => a.EmpNo == userInfo.account).ToList();
////获取当前教师所教的课程
//var lessons = stuSelectLessons.GroupBy(a => a.LessonNo).Select(a => a.Key).ToList();
////获取要上当前教师所教课程的学生
//var students = stuSelectLessons.GroupBy(a => a.StuNo).Select(a => a.Key).ToList();
//var list2 = result.Where(a => students.Contains(a.StuNo))
// .Where(a => lessons.Contains(a.LessonNo)).ToList();
//list.AddRange(list2);
//return list.Distinct().ToList();
//班级班主任/辅导员
if (!queryParam["ClassManagerNo"].IsEmpty())
{
dp.Add("ClassManagerNo", queryParam["ClassManagerNo"].ToString(), DbType.String);
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo = @ClassManagerNo) ");
}

var result = this.BaseRepository("CollegeMIS").FindList<StuAttendanceLeaveEntity>(strSql.ToString(), dp, pagination);
return result;
}
catch (Exception ex)
{


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementBLL.cs Просмотреть файл

@@ -0,0 +1,125 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-27 10:05
/// 描 述:学生请假管理
/// </summary>
public class StuLeaveManagementBLL : StuLeaveManagementIBLL
{
private StuLeaveManagementService stuLeaveManagementService = new StuLeaveManagementService();

#region 获取数据

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

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

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
stuLeaveManagementService.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, StuLeaveManagementEntity entity)
{
try
{
stuLeaveManagementService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 122
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementEntity.cs Просмотреть файл

@@ -0,0 +1,122 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-27 10:05
/// 描 述:学生请假管理
/// </summary>
public class StuLeaveManagementEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 请假类型
/// </summary>
[Column("LEAVETYPE")]
public string LeaveType { get; set; }
/// <summary>
/// 开始时间
/// </summary>
[Column("STARTTIME")]
public DateTime? StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
[Column("ENDTIME")]
public DateTime? EndTime { get; set; }
/// <summary>
/// 请假天数
/// </summary>
[Column("LEAVEDAY")]
public decimal? LeaveDay { get; set; }
/// <summary>
/// 请假事由
/// </summary>
[Column("LEAVEREASON")]
public string LeaveReason { get; set; }
/// <summary>
/// 申请人ID
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 申请人编号
/// </summary>
[Column("CREATEUSERNO")]
public string CreateUserNo { get; set; }
/// <summary>
/// 申请时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 审核状态
/// </summary>
[Column("CHECKSTATUS")]
public string CheckStatus { get; set; }
/// <summary>
/// 审核备注
/// </summary>
[Column("CHECKREMARK")]
public string CheckRemark { get; set; }
/// <summary>
/// 审核人ID
/// </summary>
[Column("CHECKUSERID")]
public string CheckUserId { get; set; }
/// <summary>
/// 审核人编号
/// </summary>
[Column("CHECKUSERNO")]
public string CheckUserNo { get; set; }
/// <summary>
/// 审核时间
/// </summary>
[Column("CHECKTIME")]
public DateTime? CheckTime { 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 扩展字段
[NotMapped]
public string CreateUserName { get; set; }
[NotMapped]
public string ClassNo { get; set; }
[NotMapped]
public string DeptNo { get; set; }
[NotMapped]
public string MajorNo { get; set; }
[NotMapped]
public string ClassDiredctorNo { get; set; }
[NotMapped]
public string ClassTutorNo { get; set; }
#endregion
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementIBLL.cs Просмотреть файл

@@ -0,0 +1,48 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-27 10:05
/// 描 述:学生请假管理
/// </summary>
public interface StuLeaveManagementIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuLeaveManagementEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取StuLeaveManagement表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
StuLeaveManagementEntity GetStuLeaveManagementEntity(string keyValue);
#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, StuLeaveManagementEntity entity);
#endregion

}
}

+ 195
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs Просмотреть файл

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-27 10:05
/// 描 述:学生请假管理
/// </summary>
public class StuLeaveManagementService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuLeaveManagementEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.*,s.StuName as CreateUserName,s.ClassNo,s.DeptNo,s.MajorNo,c.ClassDiredctorNo,c.ClassTutorNo ");
strSql.Append(" FROM StuLeaveManagement t left join StuInfoBasic s on t.CreateUserNo=s.StuNo left join ClassInfo c on s.ClassNo=c.ClassNo ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["LeaveType"].IsEmpty())
{
dp.Add("LeaveType",queryParam["LeaveType"].ToString(), DbType.String);
strSql.Append(" AND t.LeaveType = @LeaveType ");
}
if (!queryParam["CheckStatus"].IsEmpty())
{
dp.Add("CheckStatus",queryParam["CheckStatus"].ToString(), DbType.String);
strSql.Append(" AND t.CheckStatus = @CheckStatus ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUserNo = @StuNo ");
}
//班级班主任/辅导员/系主任
if (!queryParam["ClassManagerNo"].IsEmpty())
{
dp.Add("ClassManagerNo", queryParam["ClassManagerNo"].ToString(), DbType.String);
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo = @ClassManagerNo ");
//登录用户是否是系主任:若是,展示大于2天的请假记录;
var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId");
if (deptDirectorRoleId != null)
{
var loginInfoRoleIds = LoginUserInfo.Get().roleIds;
if (loginInfoRoleIds.IndexOf(',') == -1)
{
if (loginInfoRoleIds == deptDirectorRoleId)
{
strSql.Append(" or t.LeaveDay>2 )");
}
else
{
strSql.Append(" ) ");
}
}
else
{
if (loginInfoRoleIds.Split(',').Contains(deptDirectorRoleId))
{
strSql.Append(" or t.LeaveDay>2 )");
}
else
{
strSql.Append(" ) ");
}
}
}
else
{
strSql.Append(" ) ");
}
}
return this.BaseRepository("CollegeMIS").FindList<StuLeaveManagementEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取StuLeaveManagement表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public StuLeaveManagementEntity GetStuLeaveManagementEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<StuLeaveManagementEntity>(keyValue);
}
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("CollegeMIS").Delete<StuLeaveManagementEntity>(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, StuLeaveManagementEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentBLL.cs Просмотреть файл

@@ -210,6 +210,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 解除处分
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DoCancelPunish(string keyValue, bool status)
{
try
{
stuPunishmentService.DoCancelPunish(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 12
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentEntity.cs Просмотреть файл

@@ -47,7 +47,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("PUNISHNO")]
public string PunishNo { get; set; }
/// <summary>
/// PunishName
/// 处分名称
/// </summary>
[Column("PUNISHNAME")]
public string PunishName { get; set; }
@@ -92,10 +92,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("CHECKMARK")]
public string CheckMark { get; set; }
/// <summary>
/// PunishmentDate
/// 处分日期
/// </summary>
[Column("PUNISHMENTDATE")]
public DateTime? PunishmentDate { get; set; }
/// <summary>
/// 是否解除处分
/// </summary>
[Column("ISCANCELPUNISH")]
public bool? IsCancelPunish { get; set; }
/// <summary>
/// 解除处分日期
/// </summary>
[Column("CANCELPUNISHDATE")]
public DateTime? CancelPunishDate { get; set; }
#endregion

#region 扩展操作


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentIBLL.cs Просмотреть файл

@@ -67,6 +67,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuPunishmentEntity> GetPunishmentListByStuNo(string stuNo);

/// <summary>
/// 解除处分
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DoCancelPunish(string keyValue, bool status);
#endregion

}


+ 36
- 11
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs Просмотреть файл

@@ -30,17 +30,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.StuNo,
t.StuName,
t.PunishNo,
t.PunishName,
t.PunishReason,
t.PunishDate,
t.FileNo
");
strSql.Append("SELECT t.* ");
strSql.Append(" FROM StuPunishment t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
@@ -248,6 +238,41 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 解除处分
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DoCancelPunish(string keyValue, bool status)
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
if (status)
{
//解除处分
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelPunishDate='" + DateTime.Now + "' where Id= " + keyValue);
}
else
{
//取消解除处分
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=0,CancelPunishDate=null where Id= " + keyValue);
}
}
catch (Exception ex)
{
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 Просмотреть файл

@@ -1589,6 +1589,10 @@
<Compile Include="EducationalAdministration\Sys_InformationPush\Sys_InformationPushService.cs" />
<Compile Include="EducationalAdministration\Sys_InformationPush\Sys_InformationPushBLL.cs" />
<Compile Include="EducationalAdministration\Sys_InformationPush\Sys_InformationPushIBLL.cs" />
<Compile Include="EducationalAdministration\StuLeaveManagement\StuLeaveManagementEntity.cs" />
<Compile Include="EducationalAdministration\StuLeaveManagement\StuLeaveManagementService.cs" />
<Compile Include="EducationalAdministration\StuLeaveManagement\StuLeaveManagementBLL.cs" />
<Compile Include="EducationalAdministration\StuLeaveManagement\StuLeaveManagementIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Загрузка…
Отмена
Сохранить