@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Index() | public ActionResult Index() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 表单页 | /// 表单页 | ||||
@@ -35,7 +35,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Form() | public ActionResult Form() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | |||||
public ActionResult CheckForm() | |||||
{ | |||||
return View(); | |||||
} | } | ||||
#endregion | #endregion | ||||
@@ -69,8 +74,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetFormData(string keyValue) | public ActionResult GetFormData(string keyValue) | ||||
{ | { | ||||
var SRWorkData = sRWorkIBLL.GetSRWorkEntity( keyValue ); | |||||
var jsonData = new { | |||||
var SRWorkData = sRWorkIBLL.GetSRWorkEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
SRWork = SRWorkData, | SRWork = SRWorkData, | ||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
@@ -102,7 +108,16 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
SRWorkEntity entity = strEntity.ToObject<SRWorkEntity>(); | SRWorkEntity entity = strEntity.ToObject<SRWorkEntity>(); | ||||
sRWorkIBLL.SaveEntity(keyValue,entity); | |||||
sRWorkIBLL.SaveEntity(keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult CheckForm(string keyValue, string strEntity) | |||||
{ | |||||
SRWorkEntity entity = strEntity.ToObject<SRWorkEntity>(); | |||||
sRWorkIBLL.CheckEntity(keyValue, entity); | |||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
#endregion | #endregion | ||||
@@ -0,0 +1,19 @@ | |||||
@{ | |||||
ViewBag.Title = "SRWork"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">等次<font face="宋体">*</font></div> | |||||
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">评价教师<font face="宋体">*</font></div> | |||||
<input id="AuditUser" type="text" class="form-control currentInfo lr-currentInfo-user" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="AuditRemark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRWork/CheckForm.js") |
@@ -0,0 +1,53 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-06-12 11:42 | |||||
* 描 述:TeachingCompetition | |||||
*/ | |||||
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 () { | |||||
$('#AuditUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||||
$('#AuditUser').val(learun.clientdata.get(['userinfo']).realName); | |||||
$('#Grade').lrDataItemSelect({ code: 'EncouragementDegree' }); | |||||
}, | |||||
//initData: function () { | |||||
//if (!!keyValue) { | |||||
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/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/SRWork/CheckForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -3,21 +3,41 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="SRWork" > | |||||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||||
<div id="DepartmentId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">名称</div> | <div class="lr-form-item-title">名称</div> | ||||
<input id="Name" type="text" class="form-control" /> | |||||
<div id="Name" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SRWork" > | |||||
<div class="lr-form-item-title">内容</div> | |||||
<textarea id="Content" class="form-control" style="height:100px;" ></textarea> | |||||
<div class="col-xs-12 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">论文论著题目</div> | |||||
<input id="Topic" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SRWork" > | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
<div class="col-xs-12 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">发表刊物</div> | |||||
<input id="Press" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">发表时间<font face="宋体">*</font></div> | |||||
<input id="PostedTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#PostedTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">级别</div> | |||||
<div id="Rank" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="SRWork" > | |||||
<div class="lr-form-item-title">参与人</div> | |||||
<input id="Participant" type="text" class="form-control" /> | |||||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">著作职称</div> | |||||
<div id="TitleWorks" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">奖励金额</div> | |||||
<input id="Money" type="number" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="SRWork"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRWork/Form.js") | @Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRWork/Form.js") |
@@ -15,6 +15,10 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||||
$('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); | |||||
$('#TitleWorks').lrDataItemSelect({ code: 'TitleWorks' }); | |||||
$('#Rank').lrDataItemSelect({ code: 'Level' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -2,7 +2,7 @@ | |||||
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"> | ||||
@@ -11,8 +11,16 @@ | |||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <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="Topic" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">部门</div> | |||||
<div id="DepartmentId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">等次</div> | |||||
<div id="Grade"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -23,9 +31,10 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-trash-o"></i> 评价</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -16,18 +16,20 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||||
$('#Grade').lrDataItemSelect({ code: 'EncouragementDegree' }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
learun.layerForm({ | |||||
learun.layerForm({ | |||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/PersonnelManagement/SRWork/Form', | url: top.$.rootUrl + '/PersonnelManagement/SRWork/Form', | ||||
width: 600, | width: 600, | ||||
height: 400, | |||||
height: 450, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
return top[id].acceptClick(refreshGirdData); | return top[id].acceptClick(refreshGirdData); | ||||
} | } | ||||
@@ -37,12 +39,16 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ID'); | var keyValue = $('#gridtable').jfGridValue('ID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/PersonnelManagement/SRWork/Form?keyValue=' + keyValue, | url: top.$.rootUrl + '/PersonnelManagement/SRWork/Form?keyValue=' + keyValue, | ||||
width: 600, | width: 600, | ||||
height: 400, | |||||
height: 450, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
return top[id].acceptClick(refreshGirdData); | return top[id].acceptClick(refreshGirdData); | ||||
} | } | ||||
@@ -53,34 +59,140 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ID'); | var keyValue = $('#gridtable').jfGridValue('ID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRWork/DeleteForm', { keyValue: keyValue}, function () { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRWork/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | refreshGirdData(); | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 评价 | |||||
$('#lr_check').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '评价', | |||||
url: top.$.rootUrl + '/PersonnelManagement/SRWork/CheckForm?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 300, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/PersonnelManagement/SRWork/GetPageList', | url: top.$.rootUrl + '/PersonnelManagement/SRWork/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "名称", name: "Name", width: 100, align: "left"}, | |||||
{ label: "内容", name: "Content", width: 100, align: "left"}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||||
{ label: "参与人", name: "Participant", width: 100, align: "left"}, | |||||
{ | |||||
label: "部门", name: "DepartmentId", 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: "Name", 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_account', | |||||
callback: function (_data) { | |||||
callback(_data['f_realname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "论文论著题目", name: "Topic", width: 100, align: "left" }, | |||||
{ label: "出版社", name: "Press", width: 100, align: "left" }, | |||||
{ | |||||
label: "发表时间", name: "PostedTime", width: 100, align: "left" | |||||
, formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ | |||||
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: "TitleWorks", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'TitleWorks', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "奖励金额", name: "Money", width: 100, align: "left" }, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
{ | |||||
label: "等次", name: "Grade", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'EncouragementDegree', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "审批用户", name: "AuditUser", 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: "AuditTime", width: 100, align: "left" | |||||
, formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh-mm-ss'); | |||||
} | |||||
}, | |||||
{ label: "审批备注", name: "AuditRemark", width: 100, align: "left" }, | |||||
], | ], | ||||
mainId:'ID', | |||||
isPage: true | |||||
mainId: 'ID', | |||||
isPage: true, | |||||
isMultiselect: true, | |||||
sidx: "CreateTime desc" | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -1861,6 +1861,7 @@ | |||||
<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\SRProject\CheckForm.js" /> | <Content Include="Areas\PersonnelManagement\Views\SRProject\CheckForm.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\SRWork\CheckForm.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | <Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | <Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.js" /> | <Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.js" /> | ||||
@@ -8125,6 +8126,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScoreIndex.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScoreIndex.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\CheckForm.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\CheckForm.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\SRProject\CheckForm.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\SRProject\CheckForm.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\SRWork\CheckForm.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" /> | ||||
@@ -117,8 +117,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void CheckEntity(string keyValue, SRWorkEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
sRWorkService.CheckEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// 日 期:2019-12-31 10:52 | /// 日 期:2019-12-31 10:52 | ||||
/// 描 述:科技著作 | /// 描 述:科技著作 | ||||
/// </summary> | /// </summary> | ||||
public class SRWorkEntity | |||||
public class SRWorkEntity | |||||
{ | { | ||||
#region 实体成员 | #region 实体成员 | ||||
/// <summary> | /// <summary> | ||||
@@ -19,26 +19,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// </summary> | /// </summary> | ||||
[Column("ID")] | [Column("ID")] | ||||
public string ID { get; set; } | public string ID { get; set; } | ||||
/// <summary> | |||||
/// 名称 | |||||
/// </summary> | |||||
[Column("DEPARTMENTID")] | |||||
public string DepartmentId { get; set; } | |||||
[Column("NAME")] | [Column("NAME")] | ||||
public string Name { get; set; } | public string Name { get; set; } | ||||
/// <summary> | |||||
/// 内容 | |||||
/// </summary> | |||||
[Column("CONTENT")] | |||||
public string Content { get; set; } | |||||
/// <summary> | |||||
/// 备注 | |||||
/// </summary> | |||||
[Column("TOPIC")] | |||||
public string Topic { get; set; } | |||||
[Column("PRESS")] | |||||
public string Press { get; set; } | |||||
[Column("RANK")] | |||||
public string Rank { get; set; } | |||||
[Column("GRADE")] | |||||
public string Grade { get; set; } | |||||
[Column("TITLEWORKS")] | |||||
public string TitleWorks { get; set; } | |||||
[Column("MONEY ")] | |||||
public decimal? Money { get; set; } | |||||
[Column("REMARK")] | [Column("REMARK")] | ||||
public string Remark { get; set; } | public string Remark { get; set; } | ||||
/// <summary> | |||||
/// 参与人员信息 | |||||
/// </summary> | |||||
[Column("PARTICIPANT")] | |||||
public string Participant { get; set; } | |||||
[Column("CREATEUSER")] | |||||
public string CreateUser { get; set; } | |||||
[Column("AUDITUSER")] | |||||
public string AuditUser { get; set; } | |||||
[Column("AUDITREMARK")] | |||||
public string AuditRemark { get; set; } | |||||
[Column("AUDITTIME")] | |||||
public DateTime? AuditTime { get; set; } | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
[Column("POSTEDTIME")] | |||||
public DateTime? PostedTime { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -48,6 +58,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
public void Create() | public void Create() | ||||
{ | { | ||||
this.ID = Guid.NewGuid().ToString(); | this.ID = Guid.NewGuid().ToString(); | ||||
this.CreateUser = LoginUserInfo.Get().userId; | |||||
this.CreateTime = DateTime.Now; | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 编辑调用 | /// 编辑调用 | ||||
@@ -43,6 +43,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void SaveEntity(string keyValue, SRWorkEntity entity); | void SaveEntity(string keyValue, SRWorkEntity entity); | ||||
void CheckEntity(string keyValue, SRWorkEntity entity); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -30,24 +30,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" | |||||
t.ID, | |||||
t.Name, | |||||
t.Content, | |||||
t.Remark, | |||||
t.Participant | |||||
"); | |||||
strSql.Append(@"t.* "); | |||||
strSql.Append(" FROM SRWork t "); | strSql.Append(" FROM SRWork t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["Name"].IsEmpty()) | |||||
if (!queryParam["Topic"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Name Like @Name "); | |||||
dp.Add("Topic", "%" + queryParam["Topic"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Topic Like @Topic "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<SRWorkEntity>(strSql.ToString(),dp, pagination); | |||||
if (!queryParam["DepartmentId"].IsEmpty()) | |||||
{ | |||||
dp.Add("DepartmentId", queryParam["DepartmentId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DepartmentId = @DepartmentId "); | |||||
} | |||||
if (!queryParam["Grade"].IsEmpty()) | |||||
{ | |||||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Grade = @Grade "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<SRWorkEntity>(strSql.ToString(), dp, pagination); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -99,7 +103,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<SRWorkEntity>(t=>t.ID == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<SRWorkEntity>(t => t.ID == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -147,6 +151,37 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
public void CheckEntity(string keyValue, SRWorkEntity entity) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var Id = keyValue.Split(','); | |||||
foreach (var item in Id) | |||||
{ | |||||
SRWorkEntity model = db.FindEntity<SRWorkEntity>(x => x.ID == item); | |||||
model.Grade = entity.Grade; | |||||
model.AuditUser = entity.AuditUser; | |||||
model.AuditTime = DateTime.Now; | |||||
model.AuditRemark = entity.AuditRemark; | |||||
db.Update(model); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||