From 599c41c1367017234123485198c82198e83e2f51 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Tue, 19 Apr 2022 11:16:15 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E5=8A=9E?= =?UTF-8?q?=E4=BA=8B=E5=A4=A7=E5=8E=85=E5=A2=9E=E5=8A=A0=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1-?= =?UTF-8?q?=E7=94=A8=E5=8D=B0=E7=94=B3=E8=AF=B7=E7=BB=9F=E8=AE=A1=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/NWFProcessController.cs | 34 ++++ .../NWFProcess/MonitorIndexOfyyspd.cshtml | 50 ++++++ .../Views/NWFProcess/MonitorIndexOfyyspd.js | 141 +++++++++++++++ .../Learun.Application.Web.csproj | 2 + .../LR_LGManager/LC_yyspdMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../LR_LGManager/LC_yyspd/LC_yyspdEntity.cs | 165 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 1 + .../Process/NWFProcessBLL.cs | 32 ++++ .../Process/NWFProcessIBLL.cs | 15 ++ .../Process/NWFProcessSerivce.cs | 71 ++++++++ 11 files changed, 541 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LC_yyspdMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_yyspd/LC_yyspdEntity.cs 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 8cdb35b3a..9becdb2ed 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 @@ -267,6 +267,15 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers { return View(); } + /// + /// 用印申请统计 + /// + /// + [HttpGet] + public ActionResult MonitorIndexOfyyspd() + { + return View(); + } #endregion #region 获取数据 @@ -387,6 +396,31 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers } #endregion + #region 流程表单数据统计 + /// + /// 用印申请流程表单统计 + /// + /// 分页参数 + /// 查询条件 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListOfyyspd(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var list = nWFProcessIBLL.GetPageListOfyyspd(paginationobj, queryJson); + var jsonData = new + { + rows = list, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records, + }; + return Success(jsonData); + } + + #endregion + #region 流程API /// /// 获取流程模板 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.cshtml new file mode 100644 index 000000000..4f4bb8414 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "流程监控"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
    +
  • 未完成
  • +
  • 已完成
  • +
+
+
+
+
+
+
+
+ @*
+
+
*@ +
+ +
+
+  查询 +
+
+
+
+ +
+
+  查看 +
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.js") + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.js new file mode 100644 index 000000000..6e082bee0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndexOfyyspd.js @@ -0,0 +1,141 @@ +/* + * 版 本 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(); + } + }); + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); + }); + // 刷新 + $('#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/GetPageListOfyyspd', + headData: [ + { label: "用印部门", name: "LC_yybm", width: 100, align: "center" }, + { label: "用印名称", name: "LC_yzmc", width: 150, align: "center" }, + { label: "用印份数", name: "LC_yyfs", width: 100, align: "center" }, + { label: "用印时间", name: "LC_yysj", width: 120, align: "center" }, + { label: "用印事项", name: "LC_yysx", width: 250, align: "center" }, + { label: "经办人", name: "F_CreateUserName", width: 100, align: "center" }, + { + label: "流程审批状态", name: "F_EnabledMark", width: 70, align: "center", + formatter: function (cellvalue, row) { + if (row.F_IsFinished == 0) { + if (cellvalue == 1) { + if (row.F_IsUrge == "1" && categoryId == '2') { + return "催办加急"; + } + return "运行中"; + } else if (cellvalue == 2) { + return "草稿"; + } else if (cellvalue == 3) { + return "作废"; + } else { + return "终止"; + } + } + else { + return "结束"; + } + + } + }, + ], + mainId: 'F_Id', + isPage: true, + sidx: 'F_CreateDate DESC', + dblclick: function () { + page.eye(); + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = logbegin; + param.EndTime = logend; + param.categoryId = categoryId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + eye: function () { + var processId = $('#gridtable').jfGridValue('F_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(); +} + + 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 f3c9f7bbd..d0890b265 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 @@ -1375,6 +1375,7 @@ + @@ -7719,6 +7720,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LC_yyspdMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LC_yyspdMap.cs new file mode 100644 index 000000000..1f9a75e92 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/LC_yyspdMap.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_yyspdMap : EntityTypeConfiguration + { + public LC_yyspdMap() + { + #region 表、主键 + //表 + this.ToTable("LC_YYSPD"); + //主键 + this.HasKey(t => t.LC_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 f84dc15fa..b94b32bbd 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 @@ -148,6 +148,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_yyspd/LC_yyspdEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_yyspd/LC_yyspdEntity.cs new file mode 100644 index 000000000..e6b0a6449 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_yyspd/LC_yyspdEntity.cs @@ -0,0 +1,165 @@ +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_yyspdEntity + { + #region 实体成员 + /// + /// ID + /// + /// + [Column("LC_ID")] + public string LC_ID { get; set; } + /// + /// 经办人 + /// + /// + [Column("F_CREATEUSERNAME")] + public string F_CreateUserName { get; set; } + /// + /// 用印部门 + /// + /// + [Column("LC_YYBM")] + public string LC_yybm { get; set; } + /// + /// 印章名称 + /// + /// + [Column("LC_YZMC")] + public string LC_yzmc { get; set; } + /// + /// 用印时间 + /// + /// + [Column("LC_YYSJ")] + public string LC_yysj { get; set; } + /// + /// 用印份数 + /// + /// + [Column("LC_YYFS")] + public string LC_yyfs { get; set; } + /// + /// 用印事项 + /// + /// + [Column("LC_YYSX")] + public string LC_yysx { get; set; } + /// + /// LC_fj + /// + /// + [Column("LC_FJ")] + public string LC_fj { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.LC_ID = Guid.NewGuid().ToString(); + UserInfo userInfo = LoginUserInfo.Get(); + this.F_CreateUserName = userInfo.realName; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.LC_ID = keyValue; + UserInfo userInfo = LoginUserInfo.Get(); + } + #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; } + + #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 2695e667b..458d768f7 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 @@ -362,6 +362,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 a10328c61..070ac41b9 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 @@ -199,6 +199,38 @@ namespace Learun.Application.WorkFlow #endregion + + #region 流程表单数据统计 + + /// + /// 用印申请流程表单统计 + /// + /// 分页参数 + /// 查询条件 + /// + public IEnumerable GetPageListOfyyspd(Pagination pagination, string queryJson) + { + try + { + return nWFProcessSerive.GetPageListOfyyspd(pagination,queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + #endregion + + #region 流程API #region 委托方法 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 c9126951c..6685aa55b 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 @@ -115,6 +115,21 @@ namespace Learun.Application.WorkFlow void DeleteEntity(string processId); #endregion + + #region 流程表单数据统计 + + /// + /// 用印申请流程表单统计 + /// + /// 分页参数 + /// 查询条件 + /// + IEnumerable GetPageListOfyyspd(Pagination pagination, string queryJson); + + + #endregion + + #region 流程API /// 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 665e2dcf1..f2896c352 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 @@ -6,6 +6,7 @@ using System.Data; using System.Linq; using System.Text; using Learun.Application.TwoDevelopment.LR_LGManager; +using Dapper; namespace Learun.Application.WorkFlow { @@ -767,6 +768,76 @@ namespace Learun.Application.WorkFlow } } + #region 流程表单数据统计 + + /// + /// 用印申请流程表单统计 + /// + /// 分页参数 + /// 查询条件 + /// + public IEnumerable GetPageListOfyyspd(Pagination pagination, string queryJson) + { + try + { + var misdbname = BaseRepository("CollegeMIS").getDbConnection().Database; + var basedbname = BaseRepository().getDbConnection().Database; + + var strSql = new StringBuilder(); + strSql.Append("select y.*,t.F_Id,t.F_SchemeId,t.F_SchemeCode,t.F_SchemeName,t.F_Title,t.F_Level,t.F_EnabledMark,t.F_IsFinished,t.F_CreateDate,t.F_CreateUserId,t.F_CreateUserName as F_CreateUserNameInProcess from LR_NWF_Process t left join LR_NWF_SchemeInfo s on t.F_SchemeCode=s.F_Code "); + strSql.Append($" left join {misdbname}.dbo.LC_yyspd y on y.LC_ID=t.F_Id "); + strSql.Append(" where 1=1 and t.F_EnabledMark !=2 and t.F_EnabledMark != 3 and t.F_IsChild = 0 "); + strSql.Append(" and s.F_Code='LC_yyspd' "); + + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + + // 分类 + if (!queryParam["categoryId"].IsEmpty()) // 1:未完成 2:已完成 + { + if (queryParam["categoryId"].ToString() == "1") + { + strSql.Append(" and t.F_IsFinished = 0 "); + } + else + { + strSql.Append(" and t.F_IsFinished = 1 "); + } + } + //用印名称、用印事项、用印时间 + if (!queryParam["keyword"].IsEmpty()) + { + dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); + strSql.Append(" AND (y.LC_yzmc like @keyword or y.LC_yysx like @keyword or y.LC_yysj like @keyword) "); + } + // 用印时间 + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("StartTime", queryParam["StartTime"].ToString(), DbType.Date); + dp.Add("EndTime", queryParam["EndTime"].ToString(), DbType.Date); + strSql.Append(" and (y.LC_yysj >= @StartTime and y.LC_yysj <= @EndTime)"); + } + + var result = this.BaseRepository().FindList(strSql.ToString(),dp); + + return result; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + #endregion #region 获取sql语句 ///