From 88e03f6038c55396de32de5e5fa45ed12e69442e Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 19 Apr 2022 18:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E8=BD=A6=E7=94=B3=E8=AF=B7=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/NWFProcessController.cs | 21 +++- .../Views/NWFProcess/UseCar.cshtml | 69 ++++++++++ .../LR_NewWorkFlow/Views/NWFProcess/UseCar.js | 118 ++++++++++++++++++ .../Learun.Application.Web.csproj | 2 + .../Process/NWFProcessBLL.cs | 5 + .../Process/NWFProcessEntity.cs | 21 ++++ .../Process/NWFProcessIBLL.cs | 1 + .../Process/NWFProcessSerivce.cs | 76 ++++++++++- 8 files changed, 310 insertions(+), 3 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.js 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 9becdb2ed..9359d9ae4 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 @@ -248,6 +248,11 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers #region 统计页面 [HttpGet] + public ActionResult UseCar() + { + return View(); + } + [HttpGet] public ActionResult MonitorIndexRenShi() { return View(); @@ -300,7 +305,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); + } public ActionResult GetFirstTaskByProcessId(string processId) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.cshtml new file mode 100644 index 000000000..0b4c39a7b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.cshtml @@ -0,0 +1,69 @@ +@{ + ViewBag.Title = "用车申请统计"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
    +
  • 未完成
  • +
  • 已完成
  • +
+
+
+
+
+
+
+
+
+
+
+
+
用车部门
+ +
+
+
用车人
+ +
+
+
车牌号
+ +
+
+
用车时间
+ +
+
+
司机姓名
+ +
+
+
+
+
+
+
+ +
+ +
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.js") + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.js new file mode 100644 index 000000000..11e6245c1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/UseCar.js @@ -0,0 +1,118 @@ +/* + * 版 本 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 () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + // 刷新 + $('#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/GetUseCar', + headData: [ + { label: "用车部门", name: "LC_ycbm", width: 100, align: "center" }, + { label: "用车人", name: "LC_ycr", width: 100, align: "center" }, + { label: "车牌号", name: "LC_cph", width: 100, align: "center" }, + { label: "用车事由", name: "LC_sy", width: 100, align: "center" }, + { label: "用车路线", name: "LC_lx", width: 100, align: "center" }, + { label: "用车时间", name: "LC_ycsj", width: 100, align: "center" }, + { label: "行驶里程", name: "LC_xslc", width: 100, align: "center" }, + { label: "司机姓名", name: "LC_sjxm", width: 100, align: "center" }, + { label: "用车评价", name: "LC_pj", width: 100, 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_gcsq'; + param.F_SchemeCode = 'LC_gcsq'; + $('#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 d0890b265..106e7c3c3 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 @@ -1383,6 +1383,7 @@ + @@ -7721,6 +7722,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 070ac41b9..e5fcde25f 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 @@ -66,6 +66,11 @@ namespace Learun.Application.WorkFlow { return nWFProcessSerive.GetPageList(pagination, queryJson); } + + public IEnumerable GetUseCar(Pagination pagination, string queryJson) + { + return nWFProcessSerive.GetUseCar(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/NWFProcessEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs index 7074c7918..79bde2637 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs @@ -180,6 +180,27 @@ namespace Learun.Application.WorkFlow /// [NotMapped] public bool? LeaderIsAgree { get; set; } + + [NotMapped] + public string LC_ID { get; set; } + [NotMapped] + public string LC_ycbm { get; set; } + [NotMapped] + public string LC_ycr { get; set; } + [NotMapped] + public string LC_cph { get; set; } + [NotMapped] + public string LC_sy { get; set; } + [NotMapped] + public string LC_lx { get; set; } + [NotMapped] + public string LC_ycsj { get; set; } + [NotMapped] + public string LC_xslc { get; set; } + [NotMapped] + public string LC_sjxm { get; set; } + [NotMapped] + public string LC_pj { get; set; } #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 6685aa55b..5ed83eeba 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 @@ -28,6 +28,7 @@ namespace Learun.Application.WorkFlow /// 查询条件 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetUseCar(Pagination pagination, string queryJson); string GetFirstTaskByProcessId(string processId); IEnumerable GetAllList(); LC_hetongEntity GetHTInfo(string keyValue); 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 7a3d5be18..eab4358f9 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 @@ -159,6 +159,78 @@ namespace Learun.Application.WorkFlow } } } + + /// + /// 获取流程信息列表 + /// + /// 分页参数 + /// 查询条件 + /// + public IEnumerable GetUseCar(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.*,cl.* from " + dbName + ".[dbo].LR_NWF_PROCESS zb "); + strSql.Append(" left join " + dbMISName + ".[dbo].LC_gcsq cl on cl.LC_ID=zb.F_id "); + strSql.Append(" where 1=1 "); + if (queryParam["categoryId"].ToString() == "1") + { + strSql.Append(" and zb.F_IsFinished= '0' "); + } + else + { + 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 != '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() + "%' "); + } + if (!queryParam["LC_ycr"].IsEmpty()) + { + strSql.Append(" and cl.LC_ycr like '%" + queryParam["LC_ycr"].ToString() + "%' "); + } + if (!queryParam["LC_ycsj"].IsEmpty()) + { + strSql.Append(" and cl.LC_ycsj like '%" + queryParam["LC_ycsj"].ToString() + "%' "); + } + if (!queryParam["LC_sjxm"].IsEmpty()) + { + strSql.Append(" and cl.LC_sjxm like '%" + queryParam["LC_sjxm"].ToString() + "%' "); + } + if (!queryParam["LC_cph"].IsEmpty()) + { + strSql.Append(" and cl.LC_cph like '%" + queryParam["LC_cph"].ToString() + "%' "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 根据processid 获取taskid /// @@ -792,7 +864,7 @@ namespace Learun.Application.WorkFlow var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - + // 分类 if (!queryParam["categoryId"].IsEmpty()) // 1:未完成 2:已完成 { @@ -837,7 +909,7 @@ namespace Learun.Application.WorkFlow strSql.Append(" and (y.LC_yysj >= @StartTime and y.LC_yysj <= @EndTime)"); } - var result = this.BaseRepository().FindList(strSql.ToString(),dp); + var result = this.BaseRepository().FindList(strSql.ToString(), dp); return result; }