diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs index b126a4503..2a8d131ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs @@ -326,6 +326,15 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers { return View(); } + /// + /// 收文统计 定制化开发 + /// + /// + [HttpGet] + public ActionResult MissiveStats() + { + return View(); + } #endregion #region 获取数据 @@ -474,6 +483,22 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers var data = nWFTaskIBLL.GetEntity(taskId); return Success(data); } + + [HttpGet] + [AjaxOnly] + public ActionResult GetMissiveStats(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var list = nWFProcessIBLL.MissiveStats(paginationobj, queryJson); + var jsonData = new + { + rows = list, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records, + }; + return Success(jsonData); + } #endregion #region 保存更新删除 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MissiveStats.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MissiveStats.cshtml new file mode 100644 index 000000000..553fef686 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MissiveStats.cshtml @@ -0,0 +1,38 @@ +@{ + ViewBag.Title = "健康打卡时段"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
来文单位
+ +
+
+
标题
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MissiveStats.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MissiveStats.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MissiveStats.js new file mode 100644 index 000000000..cee675089 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MissiveStats.js @@ -0,0 +1,83 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-06-17 09:17 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + 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: '0', + 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(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetMissiveStats', + headData: [ + { + label: "来文时间", name: "lwsj", width: 130, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + } + }, + { label: "来问单位", name: "lwdw", width: 130, align: "left", }, + { label: "标题", name: "wjbt", width: 90, align: "left", }, + { label: "次数", name: "num", width: 90, align: "left" }, + ], + mainId: 'ID', + isPage: true, + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index e97d7955b..a7497632e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1634,6 +1634,7 @@ + @@ -8302,6 +8303,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LC_swcldMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LC_swcldMap.cs new file mode 100644 index 000000000..483548f09 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LC_swcldMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LR_LGManager; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-07 14:26 + /// 描 述:流程合同 + /// + public class LC_swcldMap : EntityTypeConfiguration + { + public LC_swcldMap() + { + #region 表、主键 + //表 + this.ToTable("LC_swcld"); + //主键 + this.HasKey(t => t.id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index cc022206f..ff6bf2f5c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -180,6 +180,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_swcld/LC_swcldEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_swcld/LC_swcldEntity.cs new file mode 100644 index 000000000..0ab79ed39 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_swcld/LC_swcldEntity.cs @@ -0,0 +1,134 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.LR_LGManager + +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-05-07 14:26 + /// 描 述:流程用印申请 + /// + public class LC_swcldEntity + { + #region 实体成员 + + [Column("ID")] + public string id { get; set; } + + [Column("LWDW")] + public string lwdw { get; set; } + + [Column("LWSJ")] + public string lwsj { get; set; } + + [Column("WJBT")] + public string wjbt { get; set; } + + [Column("WH")] + public string wh { get; set; } + [Column("FJ")] + public string wfjh { get; set; } + [Column("SF")] + public string sf { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.id = keyValue; + } + #endregion + #region 扩展数据 + /// + /// 主键 + /// + /// + [NotMapped] + public string F_Id { get; set; } + /// + /// 流程模板主键 + /// + /// + [NotMapped] + public string F_SchemeId { get; set; } + /// + /// 流程模板编码 + /// + /// + [NotMapped] + public string F_SchemeCode { get; set; } + /// + /// 流程模板名称 + /// + /// + [NotMapped] + public string F_SchemeName { get; set; } + /// + /// 流程进程自定义标题 + /// + /// + [NotMapped] + public string F_Title { get; set; } + /// + /// 流程进程等级 + /// + /// + [NotMapped] + public int? F_Level { get; set; } + /// + /// 流程进程有效标志 1正常2草稿3作废4终止 + /// + /// + [NotMapped] + public int? F_EnabledMark { get; set; } + /// + /// 流程进程是否结束1是0不是 + /// + /// + [NotMapped] + public int? F_IsFinished { get; set; } + /// + /// 是否被催办 1 被催办了 + /// + /// + [NotMapped] + public int? F_IsUrge { get; set; } + /// + /// 创建时间 + /// + /// + [NotMapped] + public DateTime? F_CreateDate { get; set; } + /// + /// 创建人主键 + /// + /// + [NotMapped] + public string F_CreateUserId { get; set; } + /// + /// 创建人名称 + /// + /// + [NotMapped] + public string F_CreateUserNameInProcess { get; set; } + + [NotMapped] + public string num { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index b7defa8f1..48ba25082 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -456,6 +456,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs index 1e640d77d..4b30027a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs @@ -213,7 +213,10 @@ namespace Learun.Application.WorkFlow { nWFProcessSerive.DeleteEntity(processId); } - + public IEnumerable MissiveStats(Pagination pagination, string queryJson) + { + return nWFProcessSerive.MissiveStats(pagination, queryJson); + } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs index 94973cc84..340c69c3c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs @@ -109,6 +109,9 @@ namespace Learun.Application.WorkFlow List GetDelegateProcess(string userId); + + IEnumerable MissiveStats(Pagination pagination, string queryJson); + #endregion #region 保存更新删除 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs index 5ad944f79..837e08ab3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs @@ -169,7 +169,7 @@ namespace Learun.Application.WorkFlow expression = expression.And(t => t.F_IsChild == 0); var result = this.BaseRepository().FindList(expression, pagination); - if (result.Count()>0 ) + if (result.Count() > 0) { foreach (var item in result) { @@ -1284,7 +1284,50 @@ namespace Learun.Application.WorkFlow } } - + /// + /// 获取流程信息列表 + /// + /// 分页参数 + /// 查询条件 + /// + public IEnumerable MissiveStats(Pagination pagination, string queryJson) + { + try + { + var dbName = this.BaseRepository().getDbConnection().Database; + var queryParam = queryJson.ToJObject(); + var dp = new DynamicParameters(new { }); + var strSql = new StringBuilder(); + strSql.Append($@" select t.lwsj,t.lwdw,t.wjbt,Count(*) as num from LC_swcld t + left join {dbName}.[dbo].LR_NWF_PROCESS lnp on t.id = lnp.f_id + where lnp.F_IsFinished = 1 and lnp.F_EnabledMark != '3' and F_IsChild = '0' and F_IsStart = 1 "); + if (!queryParam["name"].IsEmpty()) + { + strSql.Append(" and wjbt like '%" + queryParam["name"].ToString() + "%' "); + } + if (!queryParam["unit"].IsEmpty()) + { + strSql.Append(" and lwdw like '%" + queryParam["unit"].ToString() + "%' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty() && (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01")) + { + strSql.Append(" AND ( lwsj >= '" + queryParam["StartTime"].ToDate() + "' AND lwsj <= '" + queryParam["EndTime"].ToDate() + "' ) "); + } + strSql.Append(" Group by t.lwsj,t.lwdw,t.wjbt "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 获取sql语句