Browse Source

教职工请假单统计

应县
ndbs 1 year ago
parent
commit
df30112f41
7 changed files with 319 additions and 0 deletions
  1. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs
  2. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/TeachLeaveIndex.cshtml
  3. +196
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/TeachLeaveIndex.js
  4. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveBLL.cs
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveIBLL.cs
  7. +40
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveService.cs

+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs View File

@@ -355,6 +355,12 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
{
return View();
}
[HttpGet]
public ActionResult TeachLeaveIndex()
{
return View();
}

#endregion

#region 获取数据
@@ -530,6 +536,21 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
};
return Success(jsonData);
}
[HttpGet]
[AjaxOnly]
public ActionResult TeachLeaveStats(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var list = studentLeaveIBLL.TeachLeaveStats(paginationobj, queryJson);
var jsonData = new
{
rows = list,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records,
};
return Success(jsonData);
}
#endregion

#region 保存更新删除


+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/TeachLeaveIndex.cshtml View File

@@ -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>
<div id="F_CreateUserName"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">所属部门</div>
<div id="F_BuMen"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">请假类型</div>
<div id="F_QJType"></div>
</div>
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">请假事由</div>
<input id="F_Description" 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>
</div>
<div class="lr-layout-body" id="gridtable">
</div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/TeachLeaveIndex.js")






+ 196
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/TeachLeaveIndex.js View File

@@ -0,0 +1,196 @@
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2018 上海力软信息技术有限公司
* 创建人:力软-前端开发组
* 日 期:2021.05.18
* 描 述:教职工请假
*/
var bootstrap = function ($, learun) {
"use strict";
var categoryId = '1';
var logbegin = '';
var logend = '';

var page = {
init: function () {
$('#lr_verify').hide();
page.initGrid();
page.bind();
},
bind: function () {
$('#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,
selectfn: function (begin, end) {
logbegin = begin;
logend = end;
page.search();
}
});
// 查询
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#F_CreateUserName').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
$('#F_QJType').lrDataItemSelect({ code: 'LeaveType' });
$('#F_BuMen').lrselect({
type: 'tree',
// 展开最大高度
maxHeight: 200,
// 是否允许搜索
allowSearch: true,
// 访问数据接口地址
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree',
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 查看
$('#lr_eye').on('click', function () {
page.eye();
});
},
initleft: function () {
$('#lr_left_list li').on('click', function () {
var $this = $(this);
var $parent = $this.parent();
$parent.find('.active').removeClass('active');
$this.addClass('active');
categoryId = $this.attr('data-value');
if (categoryId == 3) {
categoryId = 1;
F_EnabledMark = true;
} else {
F_EnabledMark = false;
}
page.search();
});
},
initGrid: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/TeachLeaveStats',
headData: [
{
label: '姓名', name: 'F_CreateUserName', width: 80, align: "left",
formatterAsync: function (callback, value, row) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (item) {
callback(item.name);
}
});
}
},
{
label: '所属部门', name: 'F_BuMen', width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: '开始时间', name: 'StartDate', width: 140, align: "left",
formatter: function (cellvalue, row) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{
label: '上下午', name: 'F_shangxiawu', width: 60, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'sxw',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: '结束时间', name: 'EndDate', width: 140, align: "left",
formatter: function (cellvalue, row) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{
label: '上下午', name: 'F_sxw', width: 60, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'sxw',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: '请假天数', name: 'F_tianshu', width: 60, align: "left",
statistics: true
},
{
label: '请假类型', name: 'F_QJType', width: 80, 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: 'F_Description', width: 80, align: "left" },
],
mainId: 'SLId',
isPage: true,
sidx: 'F_CreateDate DESC',
//dblclick: function () {
// page.eye();
//}
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = logbegin;
param.EndTime = logend;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
},
//eye: function () {
// var processId = $('#gridtable').jfGridValue('SLId') || '';
// var title = $('#gridtable').jfGridValue('F_Description');

// if (learun.checkrow(processId)) {
// learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看-' + title, F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId });
// }
//}
};

page.init();
}



+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -1757,6 +1757,7 @@
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\AddTaskForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaderLeaveFiling.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaderLeaveFilingMonitor.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\TeachLeaveIndex.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaveFiling.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\ContractFilingMonitor.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\htPrint.css" />
@@ -8115,6 +8116,7 @@
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexAll.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\ReinstateIndex.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\StatsIndex.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\TeachLeaveIndex.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveBLL.cs View File

@@ -116,6 +116,11 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
}
}

public IEnumerable<StudentLeaveEntity> TeachLeaveStats(Pagination pagination, string queryJson)
{
return studentLeaveService.TeachLeaveStats(pagination, queryJson);
}

#endregion

#region 提交数据


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveIBLL.cs View File

@@ -42,6 +42,8 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
/// <param name="keyValue">主键</param>
/// <returns></returns>
StudentLeaveEntity GetEntity(string keyValue);

IEnumerable<StudentLeaveEntity> TeachLeaveStats(Pagination pagination, string queryJson);
#endregion

#region 提交数据


+ 40
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveService.cs View File

@@ -240,6 +240,46 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
}
}

public IEnumerable<StudentLeaveEntity> TeachLeaveStats(Pagination pagination, string queryJson)
{
try
{
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
var strSql = new StringBuilder();
strSql.Append(@" select zb.* from StudentLeave zb
left join LR_NWF_PROCESS lnp on zb.slID = lnp.f_id
where F_IsFinished = 1 and lnp.F_EnabledMark != '3' and F_IsChild = '0' and F_IsStart = 1 ");
if (!queryParam["F_CreateUserName"].IsEmpty())
{
strSql.Append(" and zb.F_CreateUserName = '" + queryParam["F_CreateUserName"].ToString() + "' ");
}
if (!queryParam["F_BuMen"].IsEmpty())
{
strSql.Append(" and F_BuMen = '" + queryParam["F_BuMen"].ToString() + "' ");
}
if (!queryParam["F_QJType"].IsEmpty())
{
strSql.Append(" and F_QJType = '" + queryParam["F_QJType"].ToString() + "' ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty() && (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01"))
{
strSql.Append(" AND ( starttime >= '" + queryParam["StartTime"].ToDate() + "' AND endtime <= '" + queryParam["EndTime"].ToDate() + "' ) ");
}
return this.BaseRepository().FindList<StudentLeaveEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据


Loading…
Cancel
Save