Browse Source

公务差旅查询统计

应县
ndbs 1 year ago
parent
commit
cf72e76840
11 changed files with 309 additions and 1 deletions
  1. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs
  2. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/StatsIndex.cshtml
  3. +122
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/StatsIndex.js
  4. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LR_ZX_cwclspdMap.cs
  6. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  7. +37
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LR_ZX_cwclspd/LR_ZX_cwclspdEntity.cs
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  9. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
  10. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs
  11. +48
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs

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

@@ -349,6 +349,12 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
{
return View();
}

[HttpGet]
public ActionResult StatsIndex()
{
return View();
}
#endregion

#region 获取数据
@@ -507,6 +513,23 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
};
return Success(jsonData);
}


[HttpGet]
[AjaxOnly]
public ActionResult OfficialTravelStats(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var list = nWFProcessIBLL.OfficialTravelStats(paginationobj, queryJson);
var jsonData = new
{
rows = list,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records,
};
return Success(jsonData);
}
#endregion

#region 保存更新删除


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

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "经费开支申报";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="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="dept"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="name" 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/StatsIndex.js")

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

@@ -0,0 +1,122 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-11-07 14:25
* 描 述:公务差旅
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var processId = '';
var page = {
init: function () {
page.initGird();
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,
// 默认
dfvalue: '3',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});


$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);

$('#dept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/OfficialTravelStats',
headData: [
{
label: "姓名", name: "name", 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: "dept", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('department', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "目的地", name: "mdd", width: 150, align: "left" },
{ label: "开始日期", name: "starttime", width: 200, align: "left" },
{ label: "结束日期", name: "endtime", width: 200, align: "left" },
{ label: "出差天数", name: "yjts", width: 200, align: "left", statistics: true },
],
mainId: 'Id',
isPage: true,
sidx: 'tdsj desc'
});
//page.search();
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function (res, postData) {
if (!!res) {
if (res.code == 200) {
// 发起流程
var postData = {
schemeCode: 'LC_FundsApply',// 填写流程对应模板编号
processId: processId,
level: '1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});
}
page.search();
}
};
page.init();
}

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

@@ -1772,6 +1772,7 @@
<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\StatisticTimeForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\StatsIndex.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Form.css" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Form.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Index.js" />
@@ -8113,6 +8114,7 @@
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\qrCode.cshtml" />
<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" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LR_ZX_cwclspdMap.cs View File

@@ -0,0 +1,30 @@
using Learun.Application.Language;
using Learun.Application.TwoDevelopment.LR_LGManager;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2018-09-29 14:51
/// 描 述:语言映射
/// </summary>
public class LR_ZX_cwclspdMap : EntityTypeConfiguration<LR_ZX_cwclspdEntity>
{
public LR_ZX_cwclspdMap()
{
#region 表、主键
//表
this.ToTable("LR_ZX_cwclspdMap");
//主键
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 View File

@@ -190,6 +190,7 @@
<Compile Include="LR_IM\IMSysUserMap.cs" />
<Compile Include="LR_LGManager\CorporateMaterialApplyMap.cs" />
<Compile Include="LR_LGManager\CorporateMaterialItemMap.cs" />
<Compile Include="LR_LGManager\LR_ZX_cwclspdMap.cs" />
<Compile Include="LR_LGManager\StudentLeave_zcMap.cs" />
<Compile Include="LR_LGManager\StudentLeaveMap.cs" />
<Compile Include="LR_LGManager\LC_hetongMap.cs" />


+ 37
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LR_ZX_cwclspd/LR_ZX_cwclspdEntity.cs View File

@@ -0,0 +1,37 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.TwoDevelopment.LR_LGManager

{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2020-05-07 14:26
/// 描 述:流程合同
/// </summary>
public class LR_ZX_cwclspdEntity
{
#region 实体成员
[Column("ID")]
public string ID { get; set; }
[Column("DEPT")]
public string dept { get; set; }
[Column("MDD")]
public string mdd { get; set; }
[Column("NAME")]
public string name { get; set; }
[Column("YJTS")]
public string yjts { get; set; }
[Column("STARTTIME")]
public DateTime? starttime { get; set; }
[Column("ENDTIME")]
public DateTime? endtime { get; set; }
[Column("TDSJ")]
public DateTime? tdsj { get; set; }
#endregion

}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj View File

@@ -492,6 +492,7 @@
<Compile Include="LR_LGManager\CorporateMaterialItem\CorporateMaterialItemEntity.cs" />
<Compile Include="LR_LGManager\CorporateMaterialItem\CorporateMaterialItemIBLL.cs" />
<Compile Include="LR_LGManager\CorporateMaterialItem\CorporateMaterialItemService.cs" />
<Compile Include="LR_LGManager\LR_ZX_cwclspd\LR_ZX_cwclspdEntity.cs" />
<Compile Include="LR_LGManager\StudentLeave_zc\StudentLeave_zcBLL.cs" />
<Compile Include="LR_LGManager\StudentLeave_zc\StudentLeave_zcEntity.cs" />
<Compile Include="LR_LGManager\StudentLeave_zc\StudentLeave_zcIBLL.cs" />


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

@@ -179,6 +179,10 @@ namespace Learun.Application.WorkFlow
return nWFProcessSerive.GetDelegateProcess(UserId);

}
public IEnumerable<LR_ZX_cwclspdEntity> OfficialTravelStats(Pagination pagination, string queryJson)
{
return nWFProcessSerive.OfficialTravelStats(pagination, queryJson);
}

#endregion



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

@@ -104,6 +104,8 @@ namespace Learun.Application.WorkFlow


List<UserInfo> GetDelegateProcess(string userId);
IEnumerable<LR_ZX_cwclspdEntity> OfficialTravelStats(Pagination pagination, string queryJson);

#endregion

#region 保存更新删除


+ 48
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using Learun.Application.TwoDevelopment.LR_LGManager;
using Learun.Application.Organization;
using Dapper;

namespace Learun.Application.WorkFlow
{
@@ -156,7 +157,7 @@ namespace Learun.Application.WorkFlow
expression = expression.And(t => t.F_IsChild == 0);

var result = this.BaseRepository().FindList<NWFProcessEntity>(expression, pagination);
if (result.Count()>0 )
if (result.Count() > 0)
{
foreach (var item in result)
{
@@ -976,6 +977,52 @@ namespace Learun.Application.WorkFlow
}
}
}
/// <summary>
/// 获取流程信息列表
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询条件</param>
/// <returns></returns>
public IEnumerable<LR_ZX_cwclspdEntity> OfficialTravelStats(Pagination pagination, string queryJson)
{
try
{
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
var strSql = new StringBuilder();
strSql.Append(@" select zb.dept,zb.mdd,zb.starttime,zb.endtime,zb.tdr as name,zb.yjts,zb.tdsj
from LR_ZX_cwclspd zb
left join LR_NWF_PROCESS lnp on zb.ID = lnp.f_id
where F_IsFinished = 1 and lnp.F_EnabledMark != '3' and F_IsChild = '0' and F_IsStart = 1 ");
if (!queryParam["dept"].IsEmpty())
{
strSql.Append(" and dept = '" + queryParam["dept"].ToString() + "' ");
}
if (!queryParam["name"].IsEmpty())
{
strSql.Append(" and tdr like '%" + queryParam["name"].ToString() + "%' ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty() && (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01"))
{
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
//dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( starttime >= '" + queryParam["StartTime"].ToDate() + "' AND endtime <= '" + queryParam["EndTime"].ToDate() + "' ) ");
}
var ss = this.BaseRepository().FindList<LR_ZX_cwclspdEntity>(strSql.ToString(), dp, pagination);
return ss;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#endregion


Loading…
Cancel
Save