Bläddra i källkod

请假申请统计

新疆影视学院高职
ndbs 2 år sedan
förälder
incheckning
f50bdf1595
8 ändrade filer med 394 tillägg och 4 borttagningar
  1. +43
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs
  2. +64
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveStatistics.cshtml
  3. +177
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveStatistics.js
  4. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
  6. +37
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs
  7. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs
  8. +63
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs

+ 43
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs Visa fil

@@ -253,6 +253,16 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
return View();
}
[HttpGet]
public ActionResult LeaveStatistics()
{
return View();
}
[HttpGet]
public ActionResult Transceiver()
{
return View();
}
[HttpGet]
public ActionResult MonitorIndexRenShi()
{
return View();
@@ -320,6 +330,36 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
};
return Success(jsonData);
}
[HttpGet]
[AjaxOnly]
public ActionResult GetLeaveStatistics(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var list = nWFProcessIBLL.GetLeaveStatistics(paginationobj, queryJson);
var jsonData = new
{
rows = list,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records,
};
return Success(jsonData);
}
//[HttpGet]
//[AjaxOnly]
//public ActionResult GetUseCar(string pagination, string queryJson)
//{
// Pagination paginationobj = pagination.ToObject<Pagination>();
// var list = nWFProcessIBLL.GetUseCar(paginationobj, queryJson);
// var jsonData = new
// {
// rows = list,
// total = paginationobj.total,
// page = paginationobj.page,
// records = paginationobj.records,
// };
// return Success(jsonData);
//}

public ActionResult GetFirstTaskByProcessId(string processId)
{
@@ -924,7 +964,7 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
{
var userentity = userIbll.GetEntityByUserId(uid);
string deptname = departmentIbll.GetEntity(userentity?.F_DepartmentId)?.F_FullName;
usernamelist.Add("["+ deptname + "]"+userentity?.F_RealName);
usernamelist.Add("[" + deptname + "]" + userentity?.F_RealName);
}
return SuccessString(string.Join(",", usernamelist));
}
@@ -932,8 +972,8 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
[HttpGet]
public ActionResult GetNextUserMonitor(string F_ProcessId)
{
var tasklist=nWFTaskIBLL.GetUnFinishTaskList(F_ProcessId).FirstOrDefault();
if (tasklist!=null&&!string.IsNullOrEmpty(tasklist.F_Id))
var tasklist = nWFTaskIBLL.GetUnFinishTaskList(F_ProcessId).FirstOrDefault();
if (tasklist != null && !string.IsNullOrEmpty(tasklist.F_Id))
{
List<string> usernamelist = new List<string>();
List<string> nextlist = nWFTaskIBLL.GetTaskUserList(tasklist.F_Id).Select(m => m.F_UserId).ToList();


+ 64
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveStatistics.cshtml Visa fil

@@ -0,0 +1,64 @@
@{
ViewBag.Title = "用车申请统计";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div id="lr_layout" class="lr-layout lr-layout-left-center">
<div class="lr-layout-left">
<div class="lr-layout-wrap lr-layout-wrap-notitle" style="padding-top:10px;">
<div class="lr-layout-body">
<ul class="lr-left-list" id="lr_left_list">
<li class="active lrlg" data-value="1">未完成</li>
<li data-value="2" class="lrlg">已完成</li>
</ul>
</div>
</div>
</div>
<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-6 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<div id ="qj_name"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">联系电话</div>
<input id="qj_bm" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">请假种类</div>
<div id="qj_lx"></div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-item">
<div id="datesearch">用车部门</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">
<a id="lr_eye" class="btn btn-default"><i class="fa fa-eye"></i>&nbsp;<span class="lrlg">查看</span></a>
@*<a id="lr_appoint" class="btn btn-default"><i class="fa fa-magic"></i>&nbsp;<span class="lrlg">指派审核人</span></a>
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;<span class="lrlg">作废</span></a>*@
</div>
</div>
</div>

<div class="lr-layout-body" id="gridtable">
</div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveStatistics.js")






+ 177
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveStatistics.js Visa fil

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

var page = {
init: function () {
$('#lr_verify').hide();
page.initleft();
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);
}, 200, 400);
$('#qj_lx').lrDataItemSelect({ code: 'LeaveType' });
$('#qj_name').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
// 刷新
$('#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');
page.search();
});
},
initGrid: function () {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetLeaveStatistics',
headData: [
{
label: "姓名", name: "qj_name", width: 100, align: "center",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data["f_realname"]);
}
});
}
},
{ label: "填表时间", name: "qj_txsj", width: 150, align: "center" },
{ label: "联系电话", name: "qj_bm", width: 100, align: "center" },
{
label: "请假种类", name: "qj_lx", width: 100, align: "center" ,
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "开始时间", name: "qj_sjks", width: 150, align: "center" },
{ label: "结束时间", name: "qj_sjjs", width: 150, align: "center" },
{
label: "请假天数", name: "qj_dh", width: 100, align: "center" ,
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'LeaveDay',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "请假事由", name: "qj_ly", width: 100, align: "center" },
{
label: "状态", name: "F_EnabledMark", width: 100, align: "center",
formatter: function (cellvalue, row) {
if (row.F_IsFinished == 0) {
if (cellvalue == 1) {
if (row.F_IsUrge == "1" && categoryId == '2') {
return "<span class=\"label label-danger\">催办加急</span>";
}
return "<span class=\"label label-success\">运行中</span>";
} else if (cellvalue == 2) {
return "<span class=\"label label-primary\">草稿</span>";
} else {
return "<span class=\"label label-danger\">作废</span>";
}
}
else {
return "<span class=\"label label-warning\">结束</span>";
}

}
},
],
mainId: 'F_Id',
isPage: true,
sidx: 'qj_txsj DESC',
dblclick: function () {
page.eye();
}
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = logbegin;
param.EndTime = logend;
param.categoryId = categoryId;
param.F_Category = 'LC_leave';
param.F_SchemeCode = 'LC_leave';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
},
eye: function () {
var processId = $('#gridtable').jfGridValue('LC_ID') || '';
var title = $('#gridtable').jfGridValue('F_Title');
var schemeName = $('#gridtable').jfGridValue('F_SchemeName');

if (schemeName != title && title) {
title = schemeName + "(" + title + ")";
}
else {
title = schemeName;
}

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

page.init();
}



+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Visa fil

@@ -1375,6 +1375,7 @@
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\AddTaskForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\htPrint.css" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\ContractFiling.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\Transceiver.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\MonitorIndexOfyyspd.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\MonitorIndexZiChan.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\MonitorIndexGongWen.js" />
@@ -1383,6 +1384,7 @@
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\PersonalFiling.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\SelectUserForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\SignForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaveStatistics.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\UseCar.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampInfo\EqualForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampInfo\Form.css" />
@@ -7723,6 +7725,8 @@
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormClear.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\MonitorIndexOfyyspd.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\UseCar.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaveStatistics.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\Transceiver.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs Visa fil

@@ -71,6 +71,10 @@ namespace Learun.Application.WorkFlow
{
return nWFProcessSerive.GetUseCar(pagination, queryJson);
}
public IEnumerable<NWFProcessEntity> GetLeaveStatistics(Pagination pagination, string queryJson)
{
return nWFProcessSerive.GetLeaveStatistics(pagination, queryJson);
}
public string GetFirstTaskByProcessId(string processId)
{
return nWFProcessSerive.GetFirstTaskByProcessId(processId);


+ 37
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs Visa fil

@@ -201,6 +201,43 @@ namespace Learun.Application.WorkFlow
public string LC_sjxm { get; set; }
[NotMapped]
public string LC_pj { get; set; }
//----------------------------

[NotMapped]
public string qj_name { get; set; }
[NotMapped]
public string qj_txsj { get; set; }
[NotMapped]
public string qj_bm { get; set; }
[NotMapped]
public string qj_lx { get; set; }
[NotMapped]
public string qj_sjks { get; set; }
[NotMapped]
public string qj_sjjs { get; set; }
[NotMapped]
public string qj_dh { get; set; }
[NotMapped]
public string qj_ly { get; set; }
//---------------------------------
[NotMapped]
public string LC_party { get; set; }
[NotMapped]
public string LC_accept { get; set; }
[NotMapped]
public string LC_amount { get; set; }
[NotMapped]
public string LC_num { get; set; }
[NotMapped]
public string LC_numdoc { get; set; }
[NotMapped]
public string LC_name { get; set; }
[NotMapped]
public string LC_important { get; set; }
[NotMapped]
public string LC_secret { get; set; }
[NotMapped]
public string LC_other { get; set; }
#endregion
}
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs Visa fil

@@ -29,6 +29,8 @@ namespace Learun.Application.WorkFlow
/// <returns></returns>
IEnumerable<NWFProcessEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<NWFProcessEntity> GetUseCar(Pagination pagination, string queryJson);
IEnumerable<NWFProcessEntity> GetLeaveStatistics(Pagination pagination, string queryJson);
string GetFirstTaskByProcessId(string processId);
IEnumerable<NWFProcessEntity> GetAllList();
LC_hetongEntity GetHTInfo(string keyValue);


+ 63
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs Visa fil

@@ -187,7 +187,7 @@ namespace Learun.Application.WorkFlow
strSql.Append(" and zb.F_IsFinished= '1' ");
}
strSql.Append(" and zb.F_SchemeCode = 'LC_gcsq' ");
strSql.Append(" and zb.F_EnabledMark != '3' and F_EnabledMark != '4' and F_IsChild='0' ");
strSql.Append(" and zb.F_EnabledMark != '3' and F_EnabledMark != '2' and F_IsChild='0' ");
//if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
//{
// DateTime startTime = queryParam["StartTime"].ToDate();
@@ -231,6 +231,68 @@ namespace Learun.Application.WorkFlow
}
}

/// <summary>
/// 获取流程信息列表
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询条件</param>
/// <returns></returns>
public IEnumerable<NWFProcessEntity> GetLeaveStatistics(Pagination pagination, string queryJson)
{
try
{
var queryParam = queryJson.ToJObject();
var dbName = this.BaseRepository().getDbConnection().Database;
var dbMISName = this.BaseRepository("CollegeMIS").getDbConnection().Database;
var dp = new DynamicParameters(new { });
var strSql = new StringBuilder();
strSql.Append(" select zb.*,lnp.* from "+ dbMISName + ".[dbo].cs_qj zb ");
strSql.Append(" left join " + dbName + ".[dbo].LR_NWF_PROCESS lnp on zb.LC_ID =lnp.F_id ");
strSql.Append(" where 1=1 ");
if (queryParam["categoryId"].ToString() == "1")
{
strSql.Append(" and lnp.F_IsFinished= '0' ");
}
else
{
strSql.Append(" and lnp.F_IsFinished= '1' ");
}
strSql.Append(" and lnp.F_SchemeCode = 'LC_leave' ");
strSql.Append(" and lnp.F_EnabledMark != '3' and lnp.F_EnabledMark != '2' and lnp.F_IsChild='0' ");
strSql.Append(" and lnp.F_IsStart=1 ");
if (!queryParam["qj_name"].IsEmpty())
{
strSql.Append(" and zb.qj_name = '" + queryParam["qj_name"].ToString() + "' ");
}
if (!queryParam["qj_bm"].IsEmpty())
{
strSql.Append(" and zb.qj_bm like '%" + queryParam["qj_bm"].ToString() + "%' ");
}
if (!queryParam["qj_lx"].IsEmpty())
{
strSql.Append(" and zb.qj_lx = '" + queryParam["qj_lx"].ToString() + "' ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
DateTime startTime = queryParam["StartTime"].ToDate();
DateTime endTime = queryParam["EndTime"].ToDate();
strSql.Append(" and ( zb.qj_txsj>= '" + startTime + "' and zb.qj_txsj <= '" + endTime + "' )");
}
return this.BaseRepository("CollegeMIS").FindList<NWFProcessEntity>(strSql.ToString(), dp);

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 根据processid 获取taskid
/// </summary>


Laddar…
Avbryt
Spara