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 18f764fb3..d696cb98d 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 @@ -170,6 +170,11 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers { return View(); } + [HttpGet] + public ActionResult ContractFilingMonitor() + { + return View(); + } /// /// 人事归档 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFiling.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFiling.js index 66e2b8326..0fb5e7356 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFiling.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFiling.js @@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { var page = { init: function () { $('#lr_verify').hide(); - page.initleft(); page.initGrid(); page.bind(); }, @@ -99,74 +98,42 @@ var bootstrap = function ($, learun) { $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').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetPorcessList', + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetContractList', headData: [ + { label: '合同编号', name: 'LC_htbh', width: 150, align: "left" }, + { label: '合同名称', name: 'LC_htmc', width: 200, align: "left" }, + { label: '合同额(万元)', name: 'LC_htzje', width: 200, align: "left" }, + { label: '申报人', name: 'F_ModifyUserName', width: 100, align: "left" }, + { label: '对方单位名称', name: 'LC_dfdw', width: 200, align: "left" }, + { label: '联系人', name: 'LC_dflxr', width: 100, align: "left" }, + { label: '联系方式', name: 'LC_dfdh', width: 120, align: "left" }, { - label: "标题", name: "F_Title", width: 300, align: "left", formatter: function (cellvalue, row) { - if (row.F_SchemeName != row.F_Title && row.F_Title) { - return row.F_SchemeName + "(" + row.F_Title + ")"; - } - else { - return row.F_SchemeName; - } + label: '合同开始时间', name: 'LC_htkssj', width: 100, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, - //{ - // label: "等级", name: "F_Level", width: 60, align: "center", - // formatter: function (cellvalue) { - // switch (cellvalue) { - // case 0: - // return '普通'; - // break; - // case 1: - // return '重要'; - // break; - // case 2: - // return '紧急'; - // break; - // default: - // return '普通'; - // break; - // } - // } - //}, { - 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 { - return "作废"; - } - } - else { - return "结束"; - } - + label: '合同结束时间', name: 'LC_htjssj', width: 100, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, - { label: "发起者", name: "F_CreateUserName", width: 80, align: "center" }, - { - label: "时间", name: "F_CreateDate", width: 150, align: "left", - formatter: function (cellvalue) { - return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); - } - } + { label: '文本盖章份数', name: 'LC_gzfs', width: 80, align: "left" }, + { label: '申报日期', name: 'F_ModifyDate', width: 200, align: "left" } ], mainId: 'F_Id', isPage: true, - sidx: 'F_CreateDate DESC', + sidx: 'F_ModifyDate DESC', dblclick: function () { page.eye(); } @@ -177,21 +144,12 @@ var bootstrap = function ($, learun) { param = param || {}; param.StartTime = logbegin; param.EndTime = logend; - param.categoryId = categoryId; - param.F_Category = '合同类'; + param.F_IsFinished = 1; $('#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; - } + var processId = $('#gridtable').jfGridValue('LC_ID') || ''; + var title = $('#gridtable').jfGridValue('LC_htmc'); if (learun.checkrow(processId)) { learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看-' + title, F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFilingMonitor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFilingMonitor.cshtml new file mode 100644 index 000000000..62ebf7269 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFilingMonitor.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "流程监控"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
    +
  • 未完成
  • +
  • 已完成
  • +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+  查询 +
+
+
+
+ +
+
+  查看 +
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFilingMonitor.js") + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFilingMonitor.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFilingMonitor.js new file mode 100644 index 000000000..f5075048a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/ContractFilingMonitor.js @@ -0,0 +1,124 @@ +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:力软-前端开发组 + * 日 期:2018.12.19 + * 描 述:流程监控 + */ +var bootstrap = function ($, learun) { + "use strict"; + var categoryId = '0'; + 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').jfGrid({ + url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetContractList', + headData: [ + { label: '合同编号', name: 'LC_htbh', width: 150, align: "left" }, + { label: '合同名称', name: 'LC_htmc', width: 200, align: "left" }, + { label: '合同额(万元)', name: 'LC_htzje', width: 200, align: "left" }, + { label: '申报人', name: 'F_ModifyUserName', width: 100, align: "left" }, + { label: '对方单位名称', name: 'LC_dfdw', width: 200, align: "left" }, + { label: '联系人', name: 'LC_dflxr', width: 100, align: "left" }, + { label: '联系方式', name: 'LC_dfdh', width: 120, align: "left" }, + { + label: '合同开始时间', name: 'LC_htkssj', width: 100, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: '合同结束时间', name: 'LC_htjssj', width: 100, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { label: '文本盖章份数', name: 'LC_gzfs', width: 80, align: "left" }, + { label: '申报日期', name: 'F_ModifyDate', width: 200, align: "left" } + ], + mainId: 'F_Id', + isPage: true, + sidx: 'F_ModifyDate DESC', + dblclick: function () { + page.eye(); + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = logbegin; + param.EndTime = logend; + param.F_IsFinished = categoryId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + eye: function () { + var processId = $('#gridtable').jfGridValue('LC_ID') || ''; + var title = $('#gridtable').jfGridValue('LC_htmc'); + + 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.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_hetong/LC_hetongService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_hetong/LC_hetongService.cs new file mode 100644 index 000000000..7b6696f72 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LC_hetong/LC_hetongService.cs @@ -0,0 +1,230 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.LR_LGManager +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-21 17:48 + /// 描 述:LC_hetong + /// + public class LC_hetongService : RepositoryFactory + { + #region 构造函数和属性 + + private string fieldSql; + /// + /// 构造方法 + /// + public LC_hetongService() + { + fieldSql = @" + t.LC_ID, + t.F_EnabledMark, + t.F_ModifyUserName, + t.F_SortCode, + t.F_ModifyDate, + t.F_CreateUserName, + t.F_CreateDate, + t.F_Description, + t.LC_htkssj, + t.LC_htjssj, + t.LC_qdrq, + t.LC_htlx, + t.LC_htmc, + t.LC_htbd, + t.LC_htbh, + t.LC_htzje, + t.LC_wenben, + t.LC_gzfs, + t.LC_dfdw, + t.LC_dflxr, + t.LC_dfdh, + t.LC_csyj, + t.LC_csyjqt, + t.LC_sfty, + t.LC_fujian, + t.LC_beizhu, + t.LC_hqcyj, + t.LC_zgldyj, + t.LC_cwcyj, + t.LC_bgsyj, + t.OperationTime, + t.LC_CheckMark, + t.LC_sqwtr + "; + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM LC_hetong t "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM LC_hetong t left join adms7ultimate2.dbo.LR_NWF_Process b on t.lc_id=b.f_id where b.F_EnabledMark!=2 and F_IsChild=0 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["F_IsFinished"].IsEmpty()) + { + dp.Add("F_IsFinished", queryParam["F_IsFinished"].ToString(), DbType.String); + strSql.Append(" and b.F_IsFinished=@F_IsFinished "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.F_ModifyDate >= @startTime AND t.F_ModifyDate <= @endTime ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp,pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public LC_hetongEntity GetEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.LC_ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, LC_hetongEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +}