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 317bb331d..78927c642 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 @@ -354,21 +354,21 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers }; return Success(jsonData); } - //[HttpGet] - //[AjaxOnly] - //public ActionResult GetUseCar(string pagination, string queryJson) - //{ - // Pagination paginationobj = pagination.ToObject(); - // var list = nWFProcessIBLL.GetUseCar(paginationobj, queryJson); - // var jsonData = new - // { - // rows = list, - // total = paginationobj.total, - // page = paginationobj.page, - // records = paginationobj.records, - // }; - // return Success(jsonData); - //} + [HttpGet] + [AjaxOnly] + public ActionResult GetTransceiver(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var list = nWFProcessIBLL.GetTransceiver(paginationobj, queryJson); + var jsonData = new + { + rows = list, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records, + }; + return Success(jsonData); + } public ActionResult GetFirstTaskByProcessId(string processId) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Transceiver.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Transceiver.cshtml new file mode 100644 index 000000000..b4a251d6f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Transceiver.cshtml @@ -0,0 +1,60 @@ +@{ + ViewBag.Title = "用车申请统计"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
    +
  • 未完成
  • +
  • 已完成
  • +
+
+
+
+
+
+
+
+
+
+
+
+
来文单位
+ +
+
+
文件名称
+ +
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/Transceiver.js") + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Transceiver.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Transceiver.js new file mode 100644 index 000000000..39d203c1d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Transceiver.js @@ -0,0 +1,144 @@ +/* + * 版 本 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/GetTransceiver', + headData: [ + { label: "来文单位", name: "LC_party", width: 100, align: "center" }, + { label: "日期", name: "LC_accept", width: 150, align: "center" }, + { label: "页数", name: "LC_amount", width: 100, align: "center" }, + { label: "收文编号", name: "LC_num", width: 100, align: "center" }, + { label: "文号", name: "LC_numdoc", width: 100, align: "center" }, + { label: "文件名称", name: "LC_name", width: 100, align: "center" }, + { label: "急缓程度", name: "LC_important", width: 100, align: "center" }, + { label: "秘密级别", name: "LC_secret", width: 150, align: "center" }, + { label: "备注", name: "LC_other", width: 150, 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 "催办加急"; + } + return "运行中"; + } else if (cellvalue == 2) { + 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; + 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(); +} + + 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 dbda368dd..b73496469 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 @@ -1376,7 +1376,6 @@ - @@ -1386,6 +1385,7 @@ + @@ -7727,8 +7727,8 @@ - + 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 0e1cee292..110d3a63f 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 @@ -75,6 +75,10 @@ namespace Learun.Application.WorkFlow { return nWFProcessSerive.GetLeaveStatistics(pagination, queryJson); } + public IEnumerable GetTransceiver(Pagination pagination, string queryJson) + { + return nWFProcessSerive.GetTransceiver(pagination, queryJson); + } public string GetFirstTaskByProcessId(string processId) { return nWFProcessSerive.GetFirstTaskByProcessId(processId); 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 d8ddb973f..550b03b3d 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 @@ -30,6 +30,7 @@ namespace Learun.Application.WorkFlow IEnumerable GetPageList(Pagination pagination, string queryJson); IEnumerable GetUseCar(Pagination pagination, string queryJson); IEnumerable GetLeaveStatistics(Pagination pagination, string queryJson); + IEnumerable GetTransceiver(Pagination pagination, string queryJson); string GetFirstTaskByProcessId(string processId); IEnumerable GetAllList(); 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 eee235ca6..462d94aab 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 @@ -187,14 +187,13 @@ 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 != '2' and F_IsChild='0' "); + strSql.Append(" and zb.F_EnabledMark != '3' and F_EnabledMark != '4' and F_IsChild='0' "); //if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) //{ // DateTime startTime = queryParam["StartTime"].ToDate(); // DateTime endTime = queryParam["EndTime"].ToDate(); // strSql.Append(" and ( zb.F_CreateDate>= " + startTime + " && F_CreateDate <= " + endTime + " )"); //} - strSql.Append(" and F_IsStart=1 "); if (!queryParam["LC_ycbm"].IsEmpty()) { strSql.Append(" and cl.LC_ycbm like '%" + queryParam["LC_ycbm"].ToString() + "%' "); @@ -246,7 +245,7 @@ namespace Learun.Application.WorkFlow 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(" 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") @@ -258,8 +257,7 @@ namespace Learun.Application.WorkFlow 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 "); + strSql.Append(" and lnp.F_EnabledMark != '3' and lnp.F_EnabledMark != '4' and lnp.F_IsChild='0' "); if (!queryParam["qj_name"].IsEmpty()) { strSql.Append(" and zb.qj_name = '" + queryParam["qj_name"].ToString() + "' "); @@ -294,6 +292,63 @@ namespace Learun.Application.WorkFlow } } /// + /// 获取流程信息列表 + /// + /// 分页参数 + /// 查询条件 + /// + public IEnumerable GetTransceiver(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].LC_docx2 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_docx' "); + strSql.Append(" and lnp.F_EnabledMark != '3' and lnp.F_EnabledMark != '4' and lnp.F_IsChild='0' "); + if (!queryParam["LC_party"].IsEmpty()) + { + strSql.Append(" and zb.LC_party like '%" + queryParam["LC_party"].ToString() + "%' "); + } + if (!queryParam["LC_name"].IsEmpty()) + { + strSql.Append(" and zb.LC_name like '%" + queryParam["LC_name"].ToString() + "%' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + DateTime startTime = queryParam["StartTime"].ToDate(); + DateTime endTime = queryParam["EndTime"].ToDate(); + strSql.Append(" and ( zb.LC_accept>= '" + startTime + "' and zb.LC_accept <= '" + endTime + "' )"); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 根据processid 获取taskid /// /// 流程id