From 45066062082fe5b254127e81b12bd126d659ee5e Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 29 Jun 2021 16:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=B0=E6=8D=AE=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/QualityReportController.cs | 52 +++++++- .../Views/QualityReport/Index.cshtml | 5 +- .../LR_Desktop/Views/QualityReport/Index.js | 61 +++++++++- .../Views/QualityReport/IndexReport.cshtml | 49 +++++++- .../Views/QualityReport/IndexReport.js | 36 +++++- .../FillinFrom/FillinFromBLL.cs | 63 ++++++++++ .../FillinFrom/FillinFromIBLL.cs | 14 +++ .../FillinFrom/FillinFromService.cs | 112 +++++++++++++++++- .../QualityReportMain/QualityReportMainBLL.cs | 24 ++++ .../QualityReportMainIBLL.cs | 1 + .../QualityReportMainService.cs | 45 ++++++- 11 files changed, 445 insertions(+), 17 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs index 176e1cef1..a31215f40 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs @@ -3,6 +3,7 @@ using System.Data; using Learun.Application.TwoDevelopment.LR_Desktop; using System.Web.Mvc; using System.Collections.Generic; +using Learun.Application.TwoDevelopment.EducationalAdministration; namespace Learun.Application.Web.Areas.LR_Desktop.Controllers { @@ -17,6 +18,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers { private QualityReportMainIBLL fualityReportMainIBLL = new QualityReportMainBLL(); private QualityReportChildIBLL fualityReportChildIBLL = new QualityReportChildBLL(); + private FillinFromIBLL fillinFromIBLL = new FillinFromBLL(); #region 视图功能 @@ -60,8 +62,42 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers } #endregion - + #region 获取数据 + + /// + /// 获取树形结构数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetTree() + { + var data = fillinFromIBLL.GetTree(); + return Success(data); + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListForReport(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = fillinFromIBLL.GetPageListForReport(paginationobj, queryJson); + + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } /// /// 获取页面显示列表数据 /// @@ -84,6 +120,20 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = fualityReportMainIBLL.GetList(queryJson); + + return Success(data); + } /// /// 判断是否可以上报 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.cshtml index b78b81f03..1375450e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.cshtml @@ -2,7 +2,8 @@ ViewBag.Title = "数据上报"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js index 3a2d19a65..0e0bb107f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js @@ -1,7 +1,7 @@ /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 - * 日 期:2021-06-22 11:07 + * 日 期:2021-06-28 11:07 * 描 述:数据上报 */ var refreshGirdData; @@ -64,7 +64,7 @@ var bootstrap = function ($, learun) { // 初始化列表 initGird: function () { $('#gridtable').jfGrid({ - url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetPageList', + url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetPageListForReport', headData: [ { label: "核心工作模块", name: "WorderModule", width: 300, align: "left" }, { label: "项目名称", name: "ProjectName", width: 300, align: "left" }, @@ -135,14 +135,67 @@ var bootstrap = function ($, learun) { { label: "备注", name: "Demo", width: 300, align: "left" }, ], mainId: 'Id', - isPage: true + isPage: true, + sidx: 'FillingTime', + sord: 'DESC', + isSubGrid: true, // 是否有子表单 + subGridExpanded: function (subContentId, rowItem) { + $('#' + subContentId).jfGrid({ + url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetList', + headData: [ + //{ label: "核心工作模块", name: "WorderModule", width: 300, align: "left" }, + //{ label: "项目名称", name: "ProjectName", width: 300, align: "left" }, + { + label: "填报部门", name: "FillingDept", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "填报人", name: "CreateUserName", width: 150, align: "left" + }, + { + label: "公式计算结果", name: "Result", width: 150, align: "left" + }, + { + label: "填报时间", name: "ReportTime", width: 150, align: "left" + }, + { + label: "状态", name: "Status", width: 150, align: "left", + formatter: function (cellvalue) { + if (cellvalue === 0) { + return '草稿'; + } else if (cellvalue === 1) { + return '完成'; + } else if (cellvalue === 99) { + return '作废'; + } + } + }, + ], + mainId: 'Id', + isPage: false, + }); + var param; + param = param || {}; + param.FillInFromId = rowItem.Id; + $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } }); page.search(); }, search: function (param) { param = param || {}; - param.SqlParameter = ' AND (FillingPeople is not null and len(FillingPeople)>0) and (Formula is not null and len(Formula)>0)'; + param.SqlParameter = ' AND (FillingPeople is not null and len(FillingPeople)>0) and (Formula is not null and len(Formula)>0) and IsFlag=0 and [State]<>-1'; param.FillingPeople = learun.clientdata.get(['userinfo']).userId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml index 5025d0c9b..58f3248cb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml @@ -2,9 +2,18 @@ ViewBag.Title = "上报数据管理"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+
+
+
+
类型
+
+
+
-
+
+
+ 未选择类型 - 列表信息 +
@@ -35,4 +45,39 @@
+ +@*
+
+
+
+
+
+
+
+
+
名称
+ +
+
+
+
+
+ +
+
+
+
+
*@ @Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/IndexReport.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js index 8023e65b6..00a6ce7cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js @@ -5,10 +5,12 @@ * 描 述:上报数据管理 */ var refreshGirdData; +var FillInFromId; var bootstrap = function ($, learun) { "use strict"; var page = { init: function () { + page.inittree(); page.initGird(); page.bind(); }, @@ -69,7 +71,24 @@ var bootstrap = function ($, learun) { }); } }); - + + //撤回 + $('#lr_nosubmit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + //var Status = $('#gridtable').jfGridValue('Status'); + //if (Status == 0) { + // return learun.alert.warning('该项已提交!'); + //} + learun.layerConfirm('是否确认撤回该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/LR_Desktop/QualityReport/UpdateState', { keyValue: keyValue, Status: 0 }, function () { + refreshGirdData(); + }); + } + }); + } + }); //删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -93,6 +112,18 @@ var bootstrap = function ($, learun) { $('#gridtable').jqprintTable(); }); }, + inittree: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetTree', + nodeClick: page.treeNodeClick + }); + }, + treeNodeClick: function (item) { + FillInFromId = item.id; + $('#titleinfo').text(item.text); + page.search(); + }, // 初始化列表 initGird: function () { $('#gridtable').jfGrid({ @@ -129,6 +160,8 @@ var bootstrap = function ($, learun) { return '草稿'; } else if (cellvalue === 1) { return '完成'; + } else if (cellvalue === 99) { + return '作废'; } } }, @@ -140,6 +173,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.FillInFromId = FillInFromId; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs index 72da331d3..73e6d8710 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs @@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + /// + /// 获取页面显示列表数据--数据上报用 + /// + /// 查询参数 + /// + public IEnumerable GetPageListForReport(Pagination pagination, string queryJson) + { + try + { + return fillinFromService.GetPageListForReport(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取FillinFrom表实体数据 /// @@ -67,6 +92,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取树形数据 + /// + /// + public IEnumerable GetTree() + { + try + { + List treeList = new List(); + var list = fillinFromService.GetSqlTree(); + foreach (var item in list) + { + TreeModel node = new TreeModel + { + id = item.Id, + text = item.WorderModule + "--" + item.ProjectName, + value = item.Id, + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = "" + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs index 8b07f53db..d2e6f62b5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs @@ -21,6 +21,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 获取页面显示列表数据--数据上报用 + /// + /// 查询参数 + /// + IEnumerable GetPageListForReport(Pagination pagination, string queryJson); + /// /// 获取FillinFrom表实体数据 /// @@ -35,6 +43,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// FillinFromEntity GetFillInNo(string keyValue); + + /// + /// 获取树形数据 + /// + /// + IEnumerable GetTree(); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs index b5ab775ab..a788f41df 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs @@ -68,13 +68,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("FillingCycle", queryParam["FillingCycle"].ToString(), DbType.String); strSql.Append(" AND t.FillingCycle = @FillingCycle "); } - if (!queryParam["FillingPeople"].IsEmpty()) + if (!queryParam["FillingPeople"].IsEmpty() && queryParam["FillingPeople"].ToString() != "System") { - if (queryParam["FillingPeople"].ToString() != "System") - { - dp.Add("FillingPeople", queryParam["FillingPeople"].ToString(), DbType.String); - strSql.Append(" AND t.FillingPeople = @FillingPeople "); - } + dp.Add("FillingPeople", queryParam["FillingPeople"].ToString(), DbType.String); + strSql.Append(" AND t.FillingPeople = @FillingPeople "); } if (!queryParam["IsFlag"].IsEmpty()) { @@ -114,6 +111,85 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + /// + /// 获取页面显示列表数据--数据上报用 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageListForReport(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.WorderModule, + t.SerialNo, + t.ProjectName, + t.Formula, + t.LastResult, + t.FillingCycle, + t.FillingTime, + t.FillingDept, + t.FillingPeople, + t.Demo, + t.State, + t.lrPeople, + t.lrTime, + t.IsFlag + "); + strSql.Append(" FROM FillinFrom t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["WorderModule"].IsEmpty()) + { + dp.Add("WorderModule", "%" + queryParam["WorderModule"].ToString() + "%", DbType.String); + strSql.Append(" AND t.WorderModule Like @WorderModule "); + } + if (!queryParam["ProjectName"].IsEmpty()) + { + dp.Add("ProjectName", "%" + queryParam["ProjectName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.ProjectName Like @ProjectName "); + } + if (!queryParam["FillingCycle"].IsEmpty()) + { + dp.Add("FillingCycle", queryParam["FillingCycle"].ToString(), DbType.String); + strSql.Append(" AND t.FillingCycle = @FillingCycle "); + } + if (!queryParam["FillingPeople"].IsEmpty() && queryParam["FillingPeople"].ToString() != "System") + { + dp.Add("FillingPeople", queryParam["FillingPeople"].ToString(), DbType.String); + strSql.Append(" AND t.FillingPeople = @FillingPeople "); + } + if (!queryParam["IsFlag"].IsEmpty()) + { + dp.Add("IsFlag", queryParam["IsFlag"].ToString(), DbType.String); + strSql.Append(" AND t.IsFlag = @IsFlag "); + } + //sql条件 + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取FillinFrom表实体数据 /// @@ -138,6 +214,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// + /// + /// + public IEnumerable GetSqlTree() + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => x.IsFlag == 0 && x.State != -1); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs index 4258d6383..b35da9697 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs @@ -43,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop } } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return qualityReportMainService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取QualityReportMain表实体数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs index 8c5e0448a..efd462a48 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs @@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetList(string queryJson); /// /// 获取QualityReportMain表实体数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs index e8817cabe..dfab3369f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs @@ -37,6 +37,11 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["FillInFromId"].IsEmpty()) + { + strSql.Append($" AND a.FillInFromId='{queryParam["FillInFromId"].ToString()}' "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -52,6 +57,44 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop } } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select b.WorderModule,b.ProjectName,b.FillingDept,b.Id as fid,a.Id,a.ReportTime,a.Status,a.Result,a.CreateUserName from QualityReportMain a join FillinFrom b on a.FillinFromId=b.Id + "); + strSql.Append("  WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["FillInFromId"].IsEmpty()) + { + strSql.Append($" AND a.FillInFromId='{queryParam["FillInFromId"].ToString()}' "); + } + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取QualityReportMain表实体数据 /// @@ -186,7 +229,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop /// 修改上报记录为作废状态 /// /// 项目Id - private void UpdateStatusByFId(string FillinFromId,int Status) + private void UpdateStatusByFId(string FillinFromId, int Status) { try {