@@ -3,6 +3,7 @@ using System.Data; | |||||
using Learun.Application.TwoDevelopment.LR_Desktop; | using Learun.Application.TwoDevelopment.LR_Desktop; | ||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | 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 QualityReportMainIBLL fualityReportMainIBLL = new QualityReportMainBLL(); | ||||
private QualityReportChildIBLL fualityReportChildIBLL = new QualityReportChildBLL(); | private QualityReportChildIBLL fualityReportChildIBLL = new QualityReportChildBLL(); | ||||
private FillinFromIBLL fillinFromIBLL = new FillinFromBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -60,8 +62,42 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | |||||
/// 获取树形结构数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetTree() | |||||
{ | |||||
var data = fillinFromIBLL.GetTree(); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageListForReport(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = fillinFromIBLL.GetPageListForReport(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -84,6 +120,20 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetList(string queryJson) | |||||
{ | |||||
var data = fualityReportMainIBLL.GetList(queryJson); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 判断是否可以上报 | /// 判断是否可以上报 | ||||
/// </summary> | /// </summary> | ||||
@@ -2,7 +2,8 @@ | |||||
ViewBag.Title = "数据上报"; | ViewBag.Title = "数据上报"; | ||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<div class="lr-layout " > | |||||
<div class="lr-layout "> | |||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
@@ -29,7 +30,7 @@ | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 填报</a> | <a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 填报</a> | ||||
@*<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看上报信息</a> | @*<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看上报信息</a> | ||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-trash-o"></i> 提交</a>*@ | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-trash-o"></i> 提交</a>*@ | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | <a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -1,7 +1,7 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | ||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | ||||
* 创建人:超级管理员 | * 创建人:超级管理员 | ||||
* 日 期:2021-06-22 11:07 | |||||
* 日 期:2021-06-28 11:07 | |||||
* 描 述:数据上报 | * 描 述:数据上报 | ||||
*/ | */ | ||||
var refreshGirdData; | var refreshGirdData; | ||||
@@ -64,7 +64,7 @@ var bootstrap = function ($, learun) { | |||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').jfGrid({ | $('#gridtable').jfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetPageList', | |||||
url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetPageListForReport', | |||||
headData: [ | headData: [ | ||||
{ label: "核心工作模块", name: "WorderModule", width: 300, align: "left" }, | { label: "核心工作模块", name: "WorderModule", width: 300, align: "left" }, | ||||
{ label: "项目名称", name: "ProjectName", 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" }, | { label: "备注", name: "Demo", width: 300, align: "left" }, | ||||
], | ], | ||||
mainId: 'Id', | 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 '<span class=\"label label-warning\">草稿</span>'; | |||||
} else if (cellvalue === 1) { | |||||
return '<span class=\"label label-success\">完成</span>'; | |||||
} else if (cellvalue === 99) { | |||||
return '<span class=\"label label-default\">作废</span>'; | |||||
} | |||||
} | |||||
}, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: false, | |||||
}); | |||||
var param; | |||||
param = param || {}; | |||||
param.FillInFromId = rowItem.Id; | |||||
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = 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; | param.FillingPeople = learun.clientdata.get(['userinfo']).userId; | ||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -2,9 +2,18 @@ | |||||
ViewBag.Title = "上报数据管理"; | ViewBag.Title = "上报数据管理"; | ||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<div class="lr-layout " > | |||||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title lrlt ">类型</div> | |||||
<div id="dataTree" class="lr-layout-body"></div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-wrap "> | |||||
<div class="lr-layout-title"> | |||||
<span id="titleinfo" class="lrlt">未选择类型</span> - <span class="lrlt">列表信息</span> | |||||
</div> | |||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
@@ -26,6 +35,7 @@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | <a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | ||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | <a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | ||||
<a id="lr_nosubmit" class="btn btn-default"><i class="fa fa-plus"></i> 撤回</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | <a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | ||||
</div> | </div> | ||||
@@ -35,4 +45,39 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@*<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">名称</div> | |||||
<input id="Name" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
<a id="lr_nosubmit" class="btn btn-default"><i class="fa fa-plus"></i> 撤回</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div>*@ | |||||
@Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/IndexReport.js") | @Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/IndexReport.js") |
@@ -5,10 +5,12 @@ | |||||
* 描 述:上报数据管理 | * 描 述:上报数据管理 | ||||
*/ | */ | ||||
var refreshGirdData; | var refreshGirdData; | ||||
var FillInFromId; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.inittree(); | |||||
page.initGird(); | page.initGird(); | ||||
page.bind(); | 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 () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
@@ -93,6 +112,18 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').jqprintTable(); | $('#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 () { | initGird: function () { | ||||
$('#gridtable').jfGrid({ | $('#gridtable').jfGrid({ | ||||
@@ -129,6 +160,8 @@ var bootstrap = function ($, learun) { | |||||
return '<span class=\"label label-warning\">草稿</span>'; | return '<span class=\"label label-warning\">草稿</span>'; | ||||
} else if (cellvalue === 1) { | } else if (cellvalue === 1) { | ||||
return '<span class=\"label label-success\">完成</span>'; | return '<span class=\"label label-success\">完成</span>'; | ||||
} else if (cellvalue === 99) { | |||||
return '<span class=\"label label-default\">作废</span>'; | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
@@ -140,6 +173,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.FillInFromId = FillInFromId; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据--数据上报用 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<FillinFromEntity> GetPageListForReport(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return fillinFromService.GetPageListForReport(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取FillinFrom表实体数据 | /// 获取FillinFrom表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -67,6 +92,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取树形数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<TreeModel> GetTree() | |||||
{ | |||||
try | |||||
{ | |||||
List<TreeModel> treeList = new List<TreeModel>(); | |||||
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 | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -21,6 +21,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson); | ||||
/// <summary> | |||||
/// 获取页面显示列表数据--数据上报用 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<FillinFromEntity> GetPageListForReport(Pagination pagination, string queryJson); | |||||
/// <summary> | /// <summary> | ||||
/// 获取FillinFrom表实体数据 | /// 获取FillinFrom表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -35,6 +43,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
FillinFromEntity GetFillInNo(string keyValue); | FillinFromEntity GetFillInNo(string keyValue); | ||||
/// <summary> | |||||
/// 获取树形数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
IEnumerable<TreeModel> GetTree(); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -68,13 +68,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("FillingCycle", queryParam["FillingCycle"].ToString(), DbType.String); | dp.Add("FillingCycle", queryParam["FillingCycle"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.FillingCycle = @FillingCycle "); | 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()) | if (!queryParam["IsFlag"].IsEmpty()) | ||||
{ | { | ||||
@@ -114,6 +111,85 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据--数据上报用 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<FillinFromEntity> 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<FillinFromEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取FillinFrom表实体数据 | /// 获取FillinFrom表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -138,6 +214,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<FillinFromEntity> GetSqlTree() | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindList<FillinFromEntity>(x => x.IsFlag == 0 && x.State != -1); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -43,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<QualityReportMainEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return qualityReportMainService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取QualityReportMain表实体数据 | /// 获取QualityReportMain表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<QualityReportMainEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<QualityReportMainEntity> GetPageList(Pagination pagination, string queryJson); | ||||
IEnumerable<QualityReportMainEntity> GetList(string queryJson); | |||||
/// <summary> | /// <summary> | ||||
/// 获取QualityReportMain表实体数据 | /// 获取QualityReportMain表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -37,6 +37,11 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["FillInFromId"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND a.FillInFromId='{queryParam["FillInFromId"].ToString()}' "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<QualityReportMainEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<QualityReportMainEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -52,6 +57,44 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<QualityReportMainEntity> 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<QualityReportMainEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取QualityReportMain表实体数据 | /// 获取QualityReportMain表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -186,7 +229,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||||
/// 修改上报记录为作废状态 | /// 修改上报记录为作废状态 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="FillinFromId">项目Id</param> | /// <param name="FillinFromId">项目Id</param> | ||||
private void UpdateStatusByFId(string FillinFromId,int Status) | |||||
private void UpdateStatusByFId(string FillinFromId, int Status) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||