Преглед изворни кода

质量目标管理加批量操作

金隅分支
zhangli пре 3 година
родитељ
комит
e580c3312b
10 измењених фајлова са 183 додато и 60 уклоњено
  1. +21
    -21
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js
  3. +5
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml
  4. +51
    -35
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js
  5. +18
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml
  6. +16
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js
  7. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs
  8. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs
  9. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs
  10. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs

+ 21
- 21
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs Прегледај датотеку

@@ -138,13 +138,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
var Models = fillinFromIBLL.GetListByIds(keyValue);
foreach (var Model in Models)
{
Model.State = -1;
qualityReportMainIBLL.DelProjectByFId(keyValue);
qualityReportMainIBLL.DelProjectByFId(Model.Id);
fillinFromIBLL.SaveEntity(Model.Id, Model);
}
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("作废成功!");
}

@@ -203,13 +203,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult Submit(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
var Models = fillinFromIBLL.GetListByIds(keyValue);
foreach (var Model in Models)
{
//重新填写
Model.State = 1;
fillinFromIBLL.SaveEntity(Model.Id, Model);
}
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("保存成功!");
}

@@ -222,8 +221,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult HideList(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
var Models = fillinFromIBLL.GetListByIds(keyValue);
foreach (var Model in Models)
{
if (Model.IsFlag == 0)
{
@@ -233,8 +232,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
Model.IsFlag = 0;
}
fillinFromIBLL.SaveEntity(Model.Id, Model);
}
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("保存成功!");
}

@@ -247,15 +246,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult DoCanCel(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
var Models = fillinFromIBLL.GetListByIds(keyValue);
foreach (var Model in Models)
{
//重新填写
Model.State = 0;
Model.FillingPeople = "";
qualityReportMainIBLL.EditProjectByFId(Model.Id);
fillinFromIBLL.SaveEntity(Model.Id, Model);
}
qualityReportMainIBLL.EditProjectByFId(keyValue);
fillinFromIBLL.SaveEntity(keyValue, Model);

return Success("保存成功!");
}

@@ -266,10 +266,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns>
public ActionResult IsFile(string keyValue)
{
var Model = fillinFromIBLL.GetFillInNo(keyValue);
if (Model != null)
var Models = fillinFromIBLL.GetListByIds(keyValue);
foreach (var Model in Models)
{
var ModeList = qualityReportMainIBLL.IsFinish(keyValue);
var ModeList = qualityReportMainIBLL.IsFinish(Model.Id);
if (ModeList != null)
{
if (ModeList.Status == 1)
@@ -278,15 +278,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
else
{
return Success("归档失败!");
return Success("选中项未上报,归档失败!");
}
}
else
{
return Success("归档失败!");
return Success("选中项未上报,归档失败!");
}
fillinFromIBLL.SaveEntity(Model.Id, Model);
}
fillinFromIBLL.SaveEntity(keyValue, Model);
return Success("归档成功!");
}
#endregion


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js Прегледај датотеку

@@ -218,6 +218,7 @@ var bootstrap = function ($, learun) {
param.IsFlag = 0;
param.isSystem = isSystem;
param.departmentId = departmentId;
param.SqlParameter = ' and t.State=1';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 5
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml Прегледај датотеку

@@ -21,6 +21,10 @@
<div class="lr-form-item-title">项目名称</div>
<input id="ProjectName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填报部门</div>
<div id="FillingDept"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填报周期</div>
<div id="FillingCycle"></div>
@@ -44,7 +48,7 @@
</a>
<ul class="dropdown-menu pull-right">
<li id="lr_cancel"><a><i></i>&nbsp;<span class="lrlt">撤回</span></a></li>
<li id="lr_people"><a><i></i>&nbsp;<span class="lrlt">设置填报人</span></a></li>
@*<li id="lr_people"><a><i></i>&nbsp;<span class="lrlt">设置填报人</span></a></li>*@
<li id="lr_hide"><a><i></i>&nbsp;<span class="lrlt">隐藏/显示</span></a></li>
</ul>
</div>


+ 51
- 35
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js Прегледај датотеку

@@ -17,7 +17,7 @@ var bootstrap = function ($, learun) {
page.search(queryJson);
}, 220, 400);
$('#FillingCycle').lrDataItemSelect({ code: 'ThisCycle' });
//$('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
$('#FillingDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name', maxHeight: '150px' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -35,39 +35,17 @@ var bootstrap = function ($, learun) {
}
});
});
// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
var IsFlag = $('#gridtable').jfGridValue('IsFlag');
if (State >= 1) {
learun.alert.warning("当前项已提交,请勿重复提交!");
return false;
} else if (State == -1) {
learun.alert.warning("当前项已作废,不能提交!");
return false;
}
if (IsFlag == 1) {
learun.alert.warning("当前项已隐藏,不能提交!");
return false;
}
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/Submit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(",") != -1) {
learun.alert.warning("只能选择一条记录进行操作!");
return false;
}
var State = $('#gridtable').jfGridValue('State');
if (State !== 0) {
learun.alert.warning("当前项不能修改!");
learun.alert.warning("只有草稿状态可以修改!");
return;
}
learun.layerConfirm('是否确认修改该项,修改成后会影响数据!', function (res) {
@@ -90,13 +68,42 @@ var bootstrap = function ($, learun) {
})
}
});

// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var States = $('#gridtable').jfGridValue('State');
var IsFlags = $('#gridtable').jfGridValue('IsFlag');

if (States.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已提交项目,不可重复提交!");
return false;
} else if (States.indexOf('-1') != -1) {
learun.alert.warning("选中记录中包含已作废项目,不能提交!");
return false;
}
if (IsFlags.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已隐藏项目,不能提交!");
return false;
}

learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/Submit', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//作废
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State == -1) {
learun.alert.warning("当前项已作废,请勿重复操作 !");
var States = $('#gridtable').jfGridValue('State');
if (States.indexOf('-1') != -1) {
learun.alert.warning("选中记录包含已作废项目,请勿重复操作 !");
return false;
}
learun.layerConfirm('是否确认作废该项,此操作将改变数据!', function (res) {
@@ -112,8 +119,8 @@ var bootstrap = function ($, learun) {
$('#lr_cancel').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var State = $('#gridtable').jfGridValue('State');
if (State <= 0) {
var States = $('#gridtable').jfGridValue('State');
if (States.indexOf('-1') != -1) {
learun.alert.warning("当前项已撤回或作废,请勿重复操作!");
return;
}
@@ -152,6 +159,10 @@ var bootstrap = function ($, learun) {
$('#lr_hide').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(",") != -1) {
learun.alert.warning("只能选择一条记录进行操作!");
return false;
}
learun.layerConfirm('是否确认隐藏/显示该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/HideList', { keyValue: keyValue }, function () {
@@ -165,8 +176,12 @@ var bootstrap = function ($, learun) {
$('#lr_file').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(",") != -1) {
learun.alert.warning("只能选择一条记录进行操作!");
return false;
}
var Status = $('#gridtable').jfGridValue('State');
if (Status !== 2) {
if (Status != 2) {
learun.alert.warning("当前项未执行到此处,暂不能归档!");
return false;
}
@@ -299,7 +314,8 @@ var bootstrap = function ($, learun) {
},
],
mainId: 'Id',
isPage: true
isPage: true,
isMultiselect: true
});
page.search();
},


+ 18
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml Прегледај датотеку

@@ -28,8 +28,24 @@
<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 class="lr-form-item-title">工作模块</div>
<input id="WorderModule" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">项目名称</div>
<input id="ProjectName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填报部门</div>
<div id="FillingDept"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填报年份</div>
<div id="ReportYear"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填报月份</div>
<div id="ReportMouth"></div>
</div>
</div>
</div>


+ 16
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js Прегледај датотеку

@@ -17,7 +17,22 @@ var bootstrap = function ($, learun) {
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
}, 250, 400);

//年份
$('#ReportYear').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear',
value: 'value',
text: 'text'
});
//月份
$('#ReportMouth').lrDataItemSelect({
code: 'CycleTime'
});

$('#FillingDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name', maxHeight: '150px' });

// 刷新
$('#lr_refresh').on('click', function () {
location.reload();


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromBLL.cs Прегледај датотеку

@@ -43,6 +43,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public IEnumerable<FillinFromEntity> GetListByIds(string keyValue)
{
try
{
return fillinFromService.GetListByIds(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据--数据上报用


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromIBLL.cs Прегледај датотеку

@@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<FillinFromEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<FillinFromEntity> GetListByIds(string keyValue);

/// <summary>
/// 获取页面显示列表数据--数据上报用


+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs Прегледај датотеку

@@ -73,6 +73,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("FillingPeople", queryParam["FillingPeople"].ToString(), DbType.String);
strSql.Append(" AND t.FillingPeople = @FillingPeople ");
}
if (!queryParam["FillingDept"].IsEmpty())
{
dp.Add("FillingDept", queryParam["FillingDept"].ToString(), DbType.String);
strSql.Append(" AND t.FillingDept = @FillingDept ");
}
if (!queryParam["IsFlag"].IsEmpty())
{
dp.Add("IsFlag", queryParam["IsFlag"].ToString(), DbType.String);
@@ -103,6 +109,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 根据Id获取数据
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
public IEnumerable<FillinFromEntity> GetListByIds(string keyValue)
{
try
{
if (keyValue.Contains(","))
{
keyValue = string.Join("','",keyValue.Split(','));
}

string sql = $" select * from FillinFrom where Id in ('{keyValue}')";
return this.BaseRepository("CollegeMIS").FindList<FillinFromEntity>(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据--数据上报用


+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs Прегледај датотеку

@@ -50,6 +50,22 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
{
strSql.Append($" AND b.FillingDept='{queryParam["FillingDept"].ToString()}' ");
}
if (!queryParam["WorderModule"].IsEmpty())
{
strSql.Append($" AND b.WorderModule like '%{queryParam["WorderModule"].ToString()}%' ");
}
if (!queryParam["ProjectName"].IsEmpty())
{
strSql.Append($" AND b.ProjectName like '%{queryParam["ProjectName"].ToString()}%' ");
}
if (!queryParam["ReportYear"].IsEmpty())
{
strSql.Append($" AND Year(a.ReportTime)='{queryParam["ReportYear"].ToString()}' ");
}
if (!queryParam["ReportMouth"].IsEmpty())
{
strSql.Append($" AND month(a.ReportTime)='{queryParam["ReportMouth"].ToString()}' ");
}

return this.BaseRepository("CollegeMIS").FindList<QualityReportMainEntity>(strSql.ToString(), dp, pagination);
}


Loading…
Откажи
Сачувај