@@ -0,0 +1,145 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-10 14:48 | |||
/// 描 述:团员评优申请管理 | |||
/// </summary> | |||
public class LeagueMemberAppraiseController : MvcControllerBase | |||
{ | |||
private LeagueMemberAppraiseIBLL leagueMemberAppraiseIBLL = new LeagueMemberAppraiseBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
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 = leagueMemberAppraiseIBLL.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 LeagueMemberAppraiseData = leagueMemberAppraiseIBLL.GetLeagueMemberAppraiseEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
LeagueMemberAppraise = LeagueMemberAppraiseData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
leagueMemberAppraiseIBLL.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) | |||
{ | |||
LeagueMemberAppraiseEntity entity = strEntity.ToObject<LeagueMemberAppraiseEntity>(); | |||
leagueMemberAppraiseIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交申请 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoSubmit(string keyValue) | |||
{ | |||
leagueMemberAppraiseIBLL.DoSubmit(keyValue); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoCheck(string keyValue, string status) | |||
{ | |||
leagueMemberAppraiseIBLL.DoCheck(keyValue, status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,27 @@ | |||
@{ | |||
ViewBag.Title = "团员评优申请管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="LeagueMemberAppraise" > | |||
<div class="lr-form-item-title">团员<font face="宋体">*</font></div> | |||
<input id="LeagueMember" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LeagueMemberAppraise" > | |||
<div class="lr-form-item-title">理由<font face="宋体">*</font></div> | |||
<input id="Reason" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LeagueMemberAppraise" > | |||
<div class="lr-form-item-title">证明</div> | |||
<input id="Prove" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LeagueMemberAppraise" > | |||
<div class="lr-form-item-title">文件材料</div> | |||
<div id="Files" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LeagueMemberAppraise" > | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Form.js") |
@@ -0,0 +1,51 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-03-10 14:48 | |||
* 描 述:团员评优申请管理 | |||
*/ | |||
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 () { | |||
$('#Files').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/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/LeagueMemberAppraise/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,41 @@ | |||
@{ | |||
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-12 lr-form-item"> | |||
<div class="lr-form-item-title">团员</div> | |||
<input id="LeagueMember" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_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> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_apply" 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> | |||
<a id="lr_checkno" 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/LeagueMemberAppraise/Index.js") |
@@ -0,0 +1,201 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-03-10 14:48 | |||
* 描 述:团员评优申请管理 | |||
*/ | |||
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); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); | |||
if (ApplyStatus == "1") { | |||
learun.alert.warning("当前项申请中!"); | |||
return false; | |||
} else if (ApplyStatus == "2") { | |||
learun.alert.warning("当前项已审核!"); | |||
return false; | |||
} else if (ApplyStatus == "3") { | |||
learun.alert.warning("当前项未通过审核!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); | |||
if (ApplyStatus == "1") { | |||
learun.alert.warning("当前项申请中!"); | |||
return false; | |||
} else if (ApplyStatus == "2") { | |||
learun.alert.warning("当前项已审核!"); | |||
return false; | |||
} else if (ApplyStatus == "3") { | |||
learun.alert.warning("当前项未通过审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交申请 | |||
$('#lr_apply').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); | |||
if (ApplyStatus == "1") { | |||
learun.alert.warning("当前项申请中!"); | |||
return false; | |||
} else if (ApplyStatus == "2") { | |||
learun.alert.warning("当前项已审核!"); | |||
return false; | |||
} else if (ApplyStatus == "3") { | |||
learun.alert.warning("当前项未通过审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认申请该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/DoSubmit', { keyValue: keyValue }, function (res) { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 审核通过 | |||
$('#lr_check').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); | |||
if (ApplyStatus != "1") { | |||
learun.alert.warning("当前项不在申请中!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认审核通过该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/DoCheck', { keyValue: keyValue, status: '2' }, function (res) { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 审核不通过 | |||
$('#lr_checkno').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); | |||
if (ApplyStatus != "1") { | |||
learun.alert.warning("当前项不在申请中!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认审核不通过该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/DoCheck', { keyValue: keyValue, status: '3' }, function (res) { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/GetPageList', | |||
headData: [ | |||
{ label: "团员", name: "LeagueMember", width: 100, align: "left" }, | |||
{ label: "理由", name: "Reason", width: 100, align: "left" }, | |||
{ label: "证明", name: "Prove", width: 100, align: "left" }, | |||
{ label: "申请时间", name: "ApplyTime", width: 130, align: "left" }, | |||
{ | |||
label: "申请状态", name: "ApplyStatus", width: 100, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "申请中" : cellvalue == "2" ? "申请已通过" : cellvalue == "3" ? "申请未通过" : "草稿"; | |||
} | |||
}, | |||
{ | |||
label: "申请人", name: "CreateUserId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('user', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ | |||
label: "审核人", name: "CheckUserId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('user', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: 'CreateTime' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -876,6 +876,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\RecruitStuPlanController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuNoticeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuCommentController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\LeagueMemberAppraiseController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6464,6 +6465,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuComment\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuComment\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuComment\Form.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\LeagueMemberAppraise\Index.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\LeagueMemberAppraise\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\LeagueMemberAppraise\Form.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\LeagueMemberAppraise\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -1,16 +1,16 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<connectionStrings> | |||
<!--本机--> | |||
<!--<add name="BaseDb" connectionString="Server=.;Initial Catalog=adms7ultimate2;User ID=sa;Password=1" providerName="System.Data.SqlClient" /> | |||
<!--本机--> | |||
<!--<add name="BaseDb" connectionString="Server=.;Initial Catalog=adms7ultimate2;User ID=sa;Password=1" providerName="System.Data.SqlClient" /> | |||
<add name="CollegeMIS" connectionString="Server=.;Initial Catalog=CollegeMIS;User ID=sa;Password=1" providerName="System.Data.SqlClient" /> | |||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />--> | |||
<!--娄底--> | |||
<!--娄底--> | |||
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_娄底;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_娄底;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
<add name="paikeDbString" connectionString="Data Source=8.141.155.183;Port=23306;Database=paikeloudi;User ID=root;Password=QJKJ@bjqj@123;" providerName="MySql.Data.MySqlClient" /> | |||
<!--塔里木中间库一卡通--> | |||
<!--<add name="TLMYKTDBString" connectionString="Data Source=orcl;Persist Security Info=True;User ID=bjqj;Password=bjqj;" providerName="System.Data.OracleClient" />--> | |||
<add name="TLMZYMIDDLEString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=39.98.73.155)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=TLMZYMIDDLE)));Persist Security Info=True;User ID=digitalschool;Password=digitalschool;" providerName="Oracle.ManagedDataAccess.Client" /> | |||
<add name="CollegeMISFor30" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_娄底;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
</connectionStrings> |
@@ -609,6 +609,7 @@ | |||
<Compile Include="EducationalAdministration\StuNoticeMap.cs" /> | |||
<Compile Include="EducationalAdministration\SmsCodeMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuCommentMap.cs" /> | |||
<Compile Include="PersonnelManagement\LeagueMemberAppraiseMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-10 14:48 | |||
/// 描 述:团员评优申请管理 | |||
/// </summary> | |||
public class LeagueMemberAppraiseMap : EntityTypeConfiguration<LeagueMemberAppraiseEntity> | |||
{ | |||
public LeagueMemberAppraiseMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("LEAGUEMEMBERAPPRAISE"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -1868,6 +1868,10 @@ | |||
<Compile Include="EducationalAdministration\StuComment\StuCommentService.cs" /> | |||
<Compile Include="EducationalAdministration\StuComment\StuCommentBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuComment\StuCommentIBLL.cs" /> | |||
<Compile Include="PersonnelManagement\LeagueMemberAppraise\LeagueMemberAppraiseEntity.cs" /> | |||
<Compile Include="PersonnelManagement\LeagueMemberAppraise\LeagueMemberAppraiseService.cs" /> | |||
<Compile Include="PersonnelManagement\LeagueMemberAppraise\LeagueMemberAppraiseBLL.cs" /> | |||
<Compile Include="PersonnelManagement\LeagueMemberAppraise\LeagueMemberAppraiseIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,171 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-10 14:48 | |||
/// 描 述:团员评优申请管理 | |||
/// </summary> | |||
public class LeagueMemberAppraiseBLL : LeagueMemberAppraiseIBLL | |||
{ | |||
private LeagueMemberAppraiseService leagueMemberAppraiseService = new LeagueMemberAppraiseService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<LeagueMemberAppraiseEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return leagueMemberAppraiseService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取LeagueMemberAppraise表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public LeagueMemberAppraiseEntity GetLeagueMemberAppraiseEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return leagueMemberAppraiseService.GetLeagueMemberAppraiseEntity(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 | |||
{ | |||
leagueMemberAppraiseService.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, LeagueMemberAppraiseEntity entity) | |||
{ | |||
try | |||
{ | |||
leagueMemberAppraiseService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 提交申请 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoSubmit(string keyValue) | |||
{ | |||
try | |||
{ | |||
leagueMemberAppraiseService.DoSubmit(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoCheck(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
leagueMemberAppraiseService.DoCheck(keyValue, status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,114 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-10 14:48 | |||
/// 描 述:团员评优申请管理 | |||
/// </summary> | |||
public class LeagueMemberAppraiseEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 团员 | |||
/// </summary> | |||
[Column("LEAGUEMEMBER")] | |||
public string LeagueMember { get; set; } | |||
/// <summary> | |||
/// 理由 | |||
/// </summary> | |||
[Column("REASON")] | |||
public string Reason { get; set; } | |||
/// <summary> | |||
/// 证明 | |||
/// </summary> | |||
[Column("PROVE")] | |||
public string Prove { get; set; } | |||
/// <summary> | |||
/// 文件材料 | |||
/// </summary> | |||
[Column("FILES")] | |||
public string Files { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
[Column("APPLYTIME")] | |||
public DateTime? ApplyTime { get; set; } | |||
/// <summary> | |||
/// 申请状态(0草稿,1申请中,2已通过,3未通过,) | |||
/// </summary> | |||
[Column("APPLYSTATUS")] | |||
public string ApplyStatus { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CHECKTIME")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// CreateUserId | |||
/// </summary> | |||
[Column("CREATEUSERID")] | |||
public string CreateUserId { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// ModifyUserId | |||
/// </summary> | |||
[Column("MODIFYUSERID")] | |||
public string ModifyUserId { get; set; } | |||
/// <summary> | |||
/// ModifyTime | |||
/// </summary> | |||
[Column("MODIFYTIME")] | |||
public DateTime? ModifyTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.CreateUserId = LoginUserInfo.Get().userId; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
this.ModifyTime = DateTime.Now; | |||
this.ModifyUserId = LoginUserInfo.Get().userId; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,61 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-10 14:48 | |||
/// 描 述:团员评优申请管理 | |||
/// </summary> | |||
public interface LeagueMemberAppraiseIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<LeagueMemberAppraiseEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取LeagueMemberAppraise表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
LeagueMemberAppraiseEntity GetLeagueMemberAppraiseEntity(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, LeagueMemberAppraiseEntity entity); | |||
/// <summary> | |||
/// 提交申请 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DoSubmit(string keyValue); | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DoCheck(string keyValue, string status); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,193 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-10 14:48 | |||
/// 描 述:团员评优申请管理 | |||
/// </summary> | |||
public class LeagueMemberAppraiseService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<LeagueMemberAppraiseEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.*"); | |||
strSql.Append(" FROM LeagueMemberAppraise t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["LeagueMember"].IsEmpty()) | |||
{ | |||
dp.Add("LeagueMember", "%" + queryParam["LeagueMember"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LeagueMember Like @LeagueMember "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<LeagueMemberAppraiseEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取LeagueMemberAppraise表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public LeagueMemberAppraiseEntity GetLeagueMemberAppraiseEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<LeagueMemberAppraiseEntity>(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) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<LeagueMemberAppraiseEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
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, LeagueMemberAppraiseEntity 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 DoSubmit(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update LeagueMemberAppraise set ApplyStatus='1',ApplyTime='{DateTime.Now}' where Id='{keyValue}' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoCheck(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update LeagueMemberAppraise set ApplyStatus='{status}',CheckTime='{DateTime.Now}',CheckUserId='{loginUserInfo.userId}' where Id='{keyValue}' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |