@@ -0,0 +1,157 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
/// Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-12-04 11:37 | |||||
/// 描 述:教科研成果 | |||||
/// </summary> | |||||
public class ResearchResultController : MvcControllerBase | |||||
{ | |||||
private ResearchResultIBLL researchResultIBLL = new ResearchResultBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormCheck() | |||||
{ | |||||
return View(); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = researchResultIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var ResearchResultData = researchResultIBLL.GetResearchResultEntity( keyValue ); | |||||
var jsonData = new { | |||||
ResearchResult = ResearchResultData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
researchResultIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
ResearchResultEntity entity = strEntity.ToObject<ResearchResultEntity>(); | |||||
researchResultIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult CheckForm(string keyValue,int StatusMark) | |||||
{ | |||||
researchResultIBLL.CheckEntity(keyValue, StatusMark); | |||||
return Success("审核成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult SubmitForm(string keyValue) | |||||
{ | |||||
researchResultIBLL.SubmitEntity(keyValue); | |||||
return Success("提交成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,71 @@ | |||||
@{ | |||||
ViewBag.Title = "教科研成果"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">类别<font face="宋体">*</font></div> | |||||
<div id="ResearchType" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">成果人<font face="宋体">*</font></div> | |||||
<div id="ProductPerson" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">刊物名称</div> | |||||
<input id="PublicationName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">刊号</div> | |||||
<input id="ISSN" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">排位</div> | |||||
<input id="Ranked" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">活动项目<font face="宋体">*</font></div> | |||||
<input id="ActivityItem" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">成果名称</div> | |||||
<textarea id="OutcomeName" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">级别</div> | |||||
<div id="Rank" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">等级</div> | |||||
<input id="LV" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title" style="width: 30%;">领证单位(主管单位)<font face="宋体">*</font></div> | |||||
<input id="CompetentUnit" type="text"style="width: 85%; float: right;" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">年度<font face="宋体">*</font></div> | |||||
<div id="Year" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">月份<font face="宋体">*</font></div> | |||||
<div id="Month" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">成果编号</div> | |||||
<input id="ResultNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">积分</div> | |||||
<input id="Points" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult" > | |||||
<div class="lr-form-item-title">附件</div> | |||||
<div id="Url" ></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ResearchResult/Form.js") |
@@ -0,0 +1,61 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
* Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-12-04 11:37 | |||||
* 描 述:教科研成果 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#ResearchType').lrDataItemSelect({ code: 'SRAchievementType' }); | |||||
$('#ProductPerson').lrDataSourceSelect({ code: 'TeacherInfo',value: 'f_userid',text: 'f_realname' }); | |||||
$('#Rank').lrDataItemSelect({ code: 'Level' }); | |||||
$('#Year').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#Month').lrDataItemSelect({ code: 'MPMonth' }); | |||||
$('#Url').lrUploader(); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,75 @@ | |||||
@{ | |||||
ViewBag.Title = "教科研成果"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">类别</div> | |||||
<div id="ResearchType" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">成果人</div> | |||||
<div id="ProductPerson" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">刊物名称</div> | |||||
<input id="PublicationName" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">刊号</div> | |||||
<input id="ISSN" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">排位</div> | |||||
<input id="Ranked" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">活动项目</div> | |||||
<input id="ActivityItem" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">成果名称</div> | |||||
<textarea id="OutcomeName" class="form-control" style="height:100px;" readonly></textarea> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">级别</div> | |||||
<div id="Rank" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">等级</div> | |||||
<input id="LV" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title" style="width: 30%;">领证单位(主管单位)</div> | |||||
<input id="CompetentUnit" type="text" style="width: 85%; float: right;" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">年度</div> | |||||
<div id="Year" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">月份</div> | |||||
<div id="Month" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">成果编号</div> | |||||
<input id="ResultNo" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">积分</div> | |||||
<input id="Points" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" readonly></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">附件</div> | |||||
<div id="Url"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">同意/驳回<font face="宋体">*</font></div> | |||||
<div id="StatusMark" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ResearchResult/FormCheck.js") |
@@ -0,0 +1,68 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
* Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-12-04 11:37 | |||||
* 描 述:教科研成果 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#ResearchType').lrDataItemSelect({ code: 'SRAchievementType' }); | |||||
$('#ProductPerson').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_userid', text: 'f_realname' }); | |||||
$('#Rank').lrDataItemSelect({ code: 'Level' }); | |||||
$('#Year').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#Month').lrDataItemSelect({ code: 'MPMonth' }); | |||||
$('#Url').lrUploader({ isUpload: false }); | |||||
$('#StatusMark').lrselect({ | |||||
data: [{ text: "同意", value: "2" }, { text: "驳回", value: "0" }], | |||||
text: "text", | |||||
value: "value" | |||||
}) | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var strEntity = $('body').lrGetFormData(); | |||||
strEntity.Name = strEntity.No; | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/CheckForm', { keyValue: keyValue, StatusMark: strEntity.StatusMark}, function () { | |||||
callBack(); | |||||
}); | |||||
//$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/CheckForm?keyValue=' + keyValue, StatusMark, function (res) { | |||||
// // 保存成功后才回调 | |||||
// if (!!callBack) { | |||||
// callBack(); | |||||
// } | |||||
//}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,71 @@ | |||||
@{ | |||||
ViewBag.Title = "教科研成果"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">类别<font face="宋体">*</font></div> | |||||
<div id="ResearchType" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">成果人<font face="宋体">*</font></div> | |||||
<div id="ProductPerson" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">刊物名称</div> | |||||
<input id="PublicationName" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">刊号</div> | |||||
<input id="ISSN" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">排位</div> | |||||
<input id="Ranked" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">活动项目<font face="宋体">*</font></div> | |||||
<input id="ActivityItem" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">成果名称</div> | |||||
<textarea id="OutcomeName" class="form-control" style="height:100px;" readonly></textarea> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">级别</div> | |||||
<div id="Rank" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">等级</div> | |||||
<input id="LV" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title" style="width: 30%;">领证单位(主管单位)<font face="宋体">*</font></div> | |||||
<input id="CompetentUnit" type="text" style="width: 85%; float: right;" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">年度<font face="宋体">*</font></div> | |||||
<div id="Year" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">月份<font face="宋体">*</font></div> | |||||
<div id="Month" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">成果编号</div> | |||||
<input id="ResultNo" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">积分</div> | |||||
<input id="Points" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" readonly></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ResearchResult"> | |||||
<div class="lr-form-item-title">附件</div> | |||||
<div id="Url"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ResearchResult/FormView.js") |
@@ -0,0 +1,61 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
* Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-12-04 11:37 | |||||
* 描 述:教科研成果 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#ResearchType').lrDataItemSelect({ code: 'SRAchievementType' }); | |||||
$('#ProductPerson').lrDataSourceSelect({ code: 'TeacherInfo',value: 'f_userid',text: 'f_realname' }); | |||||
$('#Rank').lrDataItemSelect({ code: 'Level' }); | |||||
$('#Year').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#Month').lrDataItemSelect({ code: 'MPMonth' }); | |||||
$('#Url').lrUploader({ isUpload: false}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,61 @@ | |||||
@{ | |||||
ViewBag.Title = "教科研成果"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<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-6 lr-form-item"> | |||||
<div class="lr-form-item-title">类别</div> | |||||
<div id="ResearchType"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">成果人</div> | |||||
<div id="ProductPerson"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">活动项目</div> | |||||
<input id="ActivityItem" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">级别</div> | |||||
<div id="Rank"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">等级</div> | |||||
<input id="LV" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">年度</div> | |||||
<div id="Year"></div> | |||||
</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_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-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> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-plus"></i> 审核</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ResearchResult/Index.js") |
@@ -0,0 +1,233 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
* Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-12-04 11:37 | |||||
* 描 述:教科研成果 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#ResearchType').lrDataItemSelect({ code: 'SRAchievementType' }); | |||||
$('#ProductPerson').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_userid', text: 'f_realname' }); | |||||
$('#Rank').lrDataItemSelect({ code: 'Level' }); | |||||
$('#Year').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/PersonnelManagement/ResearchResult/Form', | |||||
width: 600, | |||||
height: 620, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
var Status = $('#gridtable').jfGridValue('StatusMark'); | |||||
if (Status != 0) { | |||||
learun.alert.warning("当前项目已提交,不可编辑!"); | |||||
return; | |||||
} | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/PersonnelManagement/ResearchResult/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 620, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
var Status = $('#gridtable').jfGridValue('StatusMark'); | |||||
if (Status != 0) { | |||||
learun.alert.warning("当前项目已提交,不可删除!"); | |||||
return; | |||||
} | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'FormView', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/PersonnelManagement/ResearchResult/FormView?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 620, | |||||
btn: '', | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//// 打印 | |||||
//$('#lr_print').on('click', function () { | |||||
// $('#gridtable').jqprintTable(); | |||||
//}); | |||||
// 提交 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('StatusMark'); | |||||
if (Status != 0) { | |||||
learun.alert.warning("当前项目已提交请勿进行重复提交!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/ResearchResult/SubmitForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 审核 | |||||
$('#lr_check').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
var Status = $('#gridtable').jfGridValue('StatusMark'); | |||||
if (Status != 1) { | |||||
learun.alert.warning("当前项目已通过审核!"); | |||||
return; | |||||
} | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'FormCheck', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/PersonnelManagement/ResearchResult/FormCheck?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 660, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/PersonnelManagement/ResearchResult/GetPageList', | |||||
headData: [ | |||||
{ | |||||
label: "状态", name: "StatusMark", width: 80, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == "1") { | |||||
return '<span class=\"label label-warning\">审批中</span>'; | |||||
} else if (cellvalue == "2") { | |||||
return '<span class=\"label label-success\">通过</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >草稿</span>'; | |||||
} | |||||
} | |||||
}, | |||||
{ | |||||
label: "类别", name: "ResearchType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'SRAchievementType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "成果人", name: "ProductPerson", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||||
key: value, | |||||
keyId: 'f_userid', | |||||
callback: function (_data) { | |||||
callback(_data['f_realname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "刊物名称", name: "PublicationName", width: 100, align: "left" }, | |||||
{ label: "刊号", name: "ISSN", width: 100, align: "left" }, | |||||
{ label: "排位", name: "Ranked", width: 100, align: "left" }, | |||||
{ label: "活动项目", name: "ActivityItem", width: 100, align: "left" }, | |||||
{ label: "成果名称", name: "OutcomeName", width: 100, align: "left" }, | |||||
{ | |||||
label: "级别", name: "Rank", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'Level', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "等级", name: "LV", width: 100, align: "left" }, | |||||
{ label: "领证单位(主管单位)", name: "CompetentUnit", width: 100, align: "left" }, | |||||
{ | |||||
label: "年度", name: "Year", width: 50, align: "left", | |||||
}, | |||||
{ | |||||
label: "月份", name: "Month", width: 50, align: "left", | |||||
}, | |||||
{ label: "成果编号", name: "ResultNo", width: 100, align: "left" }, | |||||
{ label: "积分", name: "Points", width: 50, align: "left" }, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
//{ label: "附件", name: "Url", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'ID', | |||||
isPage: true, | |||||
sidx: " Createdate ,StatusMark", | |||||
sord: 'desc' | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -921,6 +921,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\CompetitionManagerController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\CompetitionManagerController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\CompetitionGroupManagerController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\CompetitionGroupManagerController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\CompetitionInfoManagerController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\CompetitionInfoManagerController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\Controllers\ResearchResultController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -1925,6 +1926,8 @@ | |||||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyApply.js" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyApply.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\MeetingNotice\Form.js" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingNotice\Form.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\MeetingNotice\Index.js" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingNotice\Index.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\FormCheck.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\FormView.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.css" /> | <Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.css" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | <Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | <Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | ||||
@@ -7235,6 +7238,10 @@ | |||||
<Content Include="Areas\PersonnelManagement\Views\TeacherDevelop\Index.js" /> | <Content Include="Areas\PersonnelManagement\Views\TeacherDevelop\Index.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TeacherDevelop\Form.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\TeacherDevelop\Form.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TeacherDevelop\Form.js" /> | <Content Include="Areas\PersonnelManagement\Views\TeacherDevelop\Form.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\Index.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\Index.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\Form.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | <Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | ||||
@@ -8250,6 +8257,8 @@ | |||||
<Content Include="Content\excel\JobPerformanceImport.xls" /> | <Content Include="Content\excel\JobPerformanceImport.xls" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TeacherTrain\FormView.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\TeacherTrain\FormView.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TeacherDevelop\FormView.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\TeacherDevelop\FormView.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\FormView.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\FormCheck.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -682,6 +682,7 @@ | |||||
<Compile Include="EducationalAdministration\CompetitionGroupManagerMap.cs" /> | <Compile Include="EducationalAdministration\CompetitionGroupManagerMap.cs" /> | ||||
<Compile Include="EducationalAdministration\CompetitionInfoMap.cs" /> | <Compile Include="EducationalAdministration\CompetitionInfoMap.cs" /> | ||||
<Compile Include="PersonnelManagement\TeacherDevelopMap.cs" /> | <Compile Include="PersonnelManagement\TeacherDevelopMap.cs" /> | ||||
<Compile Include="PersonnelManagement\ResearchResultMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
/// Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-12-04 11:37 | |||||
/// 描 述:教科研成果 | |||||
/// </summary> | |||||
public class ResearchResultMap : EntityTypeConfiguration<ResearchResultEntity> | |||||
{ | |||||
public ResearchResultMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("RESEARCHRESULT"); | |||||
//主键 | |||||
this.HasKey(t => t.ID); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -2148,6 +2148,10 @@ | |||||
<Compile Include="PersonnelManagement\TeacherDevelop\TeacherDevelopService.cs" /> | <Compile Include="PersonnelManagement\TeacherDevelop\TeacherDevelopService.cs" /> | ||||
<Compile Include="PersonnelManagement\TeacherDevelop\TeacherDevelopBLL.cs" /> | <Compile Include="PersonnelManagement\TeacherDevelop\TeacherDevelopBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\TeacherDevelop\TeacherDevelopIBLL.cs" /> | <Compile Include="PersonnelManagement\TeacherDevelop\TeacherDevelopIBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\ResearchResult\ResearchResultEntity.cs" /> | |||||
<Compile Include="PersonnelManagement\ResearchResult\ResearchResultService.cs" /> | |||||
<Compile Include="PersonnelManagement\ResearchResult\ResearchResultBLL.cs" /> | |||||
<Compile Include="PersonnelManagement\ResearchResult\ResearchResultIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,168 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
/// Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-12-04 11:37 | |||||
/// 描 述:教科研成果 | |||||
/// </summary> | |||||
public class ResearchResultBLL : ResearchResultIBLL | |||||
{ | |||||
private ResearchResultService researchResultService = new ResearchResultService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ResearchResultEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return researchResultService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ResearchResult表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public ResearchResultEntity GetResearchResultEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return researchResultService.GetResearchResultEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
researchResultService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, ResearchResultEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
researchResultService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void SubmitEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
researchResultService.SubmitEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void CheckEntity(string keyValue,int? StatusMark) | |||||
{ | |||||
try | |||||
{ | |||||
researchResultService.CheckEntity(keyValue, StatusMark); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,160 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
/// Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-12-04 11:37 | |||||
/// 描 述:教科研成果 | |||||
/// </summary> | |||||
public class ResearchResultEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// ID | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string ID { get; set; } | |||||
/// <summary> | |||||
/// 类型 | |||||
/// </summary> | |||||
[Column("RESEARCHTYPE")] | |||||
public string ResearchType { get; set; } | |||||
/// <summary> | |||||
/// 成果人 | |||||
/// </summary> | |||||
[Column("PRODUCTPERSON")] | |||||
public string ProductPerson { get; set; } | |||||
/// <summary> | |||||
/// 排位 | |||||
/// </summary> | |||||
[Column("RANKED")] | |||||
public string Ranked { get; set; } | |||||
/// <summary> | |||||
/// PublicationName | |||||
/// </summary> | |||||
[Column("PUBLICATIONNAME")] | |||||
public string PublicationName { get; set; } | |||||
/// <summary> | |||||
/// 刊号 | |||||
/// </summary> | |||||
[Column("ISSN")] | |||||
public string ISSN { get; set; } | |||||
/// <summary> | |||||
/// 活动项目 | |||||
/// </summary> | |||||
[Column("ACTIVITYITEM")] | |||||
public string ActivityItem { get; set; } | |||||
/// <summary> | |||||
/// 成果名称 | |||||
/// </summary> | |||||
[Column("OUTCOMENAME")] | |||||
public string OutcomeName { get; set; } | |||||
/// <summary> | |||||
/// 级别 | |||||
/// </summary> | |||||
[Column("RANK")] | |||||
public string Rank { get; set; } | |||||
/// <summary> | |||||
/// 等级 | |||||
/// </summary> | |||||
[Column("LV")] | |||||
public string LV { get; set; } | |||||
/// <summary> | |||||
/// 颁证单位(主管单位) | |||||
/// </summary> | |||||
[Column("COMPETENTUNIT")] | |||||
public string CompetentUnit { get; set; } | |||||
/// <summary> | |||||
/// 年度 | |||||
/// </summary> | |||||
[Column("YEAR")] | |||||
public string Year { get; set; } | |||||
/// <summary> | |||||
/// Month | |||||
/// </summary> | |||||
[Column("MONTH")] | |||||
public string Month { get; set; } | |||||
/// <summary> | |||||
/// 成果编号 | |||||
/// </summary> | |||||
[Column("RESULTNO")] | |||||
public string ResultNo { get; set; } | |||||
/// <summary> | |||||
/// 积分 | |||||
/// </summary> | |||||
[Column("POINTS")] | |||||
public string Points { get; set; } | |||||
/// <summary> | |||||
/// Remark | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// 状态 | |||||
/// </summary> | |||||
[Column("STATUSMARK")] | |||||
public int? StatusMark { get; set; } | |||||
/// <summary> | |||||
/// 附件 | |||||
/// </summary> | |||||
[Column("URL")] | |||||
public string Url { get; set; } | |||||
/// <summary> | |||||
/// AwardDate | |||||
/// </summary> | |||||
[Column("AWARDDATE")] | |||||
public DateTime? AwardDate { get; set; } | |||||
/// <summary> | |||||
/// CreateDate | |||||
/// </summary> | |||||
[Column("CREATEDATE")] | |||||
public DateTime? CreateDate { get; set; } | |||||
/// <summary> | |||||
/// CreateUser | |||||
/// </summary> | |||||
[Column("CREATEUSER")] | |||||
public string CreateUser { get; set; } | |||||
/// <summary> | |||||
/// ModifyDate | |||||
/// </summary> | |||||
[Column("MODIFYDATE")] | |||||
public DateTime? ModifyDate { get; set; } | |||||
/// <summary> | |||||
/// ModifyUser | |||||
/// </summary> | |||||
[Column("MODIFYUSER")] | |||||
public string ModifyUser { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.ID = Guid.NewGuid().ToString(); | |||||
this.StatusMark = 0; | |||||
this.CreateDate = DateTime.Now; | |||||
this.CreateUser = LoginUserInfo.Get().userId; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.ID = keyValue; | |||||
this.ModifyDate = DateTime.Now; | |||||
this.ModifyUser = LoginUserInfo.Get().userId; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,52 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
/// Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-12-04 11:37 | |||||
/// 描 述:教科研成果 | |||||
/// </summary> | |||||
public interface ResearchResultIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<ResearchResultEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取ResearchResult表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
ResearchResultEntity GetResearchResultEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, ResearchResultEntity entity); | |||||
void SubmitEntity(string keyValue); | |||||
void CheckEntity(string keyValue,int? StatusMark); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,245 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园 | |||||
/// Copyright (c) 2013-2020 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-12-04 11:37 | |||||
/// 描 述:教科研成果 | |||||
/// </summary> | |||||
public class ResearchResultService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ResearchResultEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" t.* "); | |||||
strSql.Append(" FROM ResearchResult t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["ResearchType"].IsEmpty()) | |||||
{ | |||||
dp.Add("ResearchType", queryParam["ResearchType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ResearchType = @ResearchType "); | |||||
} | |||||
if (!queryParam["ProductPerson"].IsEmpty()) | |||||
{ | |||||
dp.Add("ProductPerson", queryParam["ProductPerson"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ProductPerson = @ProductPerson "); | |||||
} | |||||
if (!queryParam["ActivityItem"].IsEmpty()) | |||||
{ | |||||
dp.Add("ActivityItem", "%" + queryParam["ActivityItem"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.ActivityItem Like @ActivityItem "); | |||||
} | |||||
if (!queryParam["Rank"].IsEmpty()) | |||||
{ | |||||
dp.Add("Rank", queryParam["Rank"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Rank = @Rank "); | |||||
} | |||||
if (!queryParam["LV"].IsEmpty()) | |||||
{ | |||||
dp.Add("LV", "%" + queryParam["LV"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.LV Like @LV "); | |||||
} | |||||
if (!queryParam["Year"].IsEmpty()) | |||||
{ | |||||
dp.Add("Year", queryParam["Year"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Year = @Year "); | |||||
} | |||||
var log = LoginUserInfo.Get(); | |||||
if (!log.isSystem) | |||||
{ | |||||
if (!log.roleIds.Contains("c2d757fd-b489-4053-913b-0250dfdf683a")) | |||||
{ | |||||
strSql.Append(" AND CreateUser ='" + log.userId + "'"); | |||||
} | |||||
else | |||||
{ | |||||
strSql.Append(" AND StatusMark ='1' or StatusMark='2'"); | |||||
} | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<ResearchResultEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ResearchResult表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public ResearchResultEntity GetResearchResultEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<ResearchResultEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var id = keyValue.Split(','); | |||||
foreach (var item in id) | |||||
{ | |||||
db.Delete<ResearchResultEntity>(t => t.ID == item); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, ResearchResultEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void SubmitEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
var sql = $"update ResearchResult set StatusMark ='1' where id = '{keyValue}'"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 审核 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void CheckEntity(string keyValue, int? StatusMark) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var id = keyValue.Split(','); | |||||
foreach (var item in id) | |||||
{ | |||||
var sql = $"update ResearchResult set StatusMark ='{StatusMark}' where id = '{item}';"; | |||||
db.ExecuteBySql(sql); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |