@@ -0,0 +1,117 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-09-09 11:42 | |||
/// 描 述:公开选调工作人员报名表 | |||
/// </summary> | |||
public class WorkStaffController : MvcControllerBase | |||
{ | |||
private WorkStaffIBLL workStaffIBLL = new WorkStaffBLL(); | |||
#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 = workStaffIBLL.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 WorkStaffData = workStaffIBLL.GetWorkStaffEntity( keyValue ); | |||
var jsonData = new { | |||
WorkStaff = WorkStaffData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
workStaffIBLL.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) | |||
{ | |||
WorkStaffEntity entity = strEntity.ToObject<WorkStaffEntity>(); | |||
workStaffIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,83 @@ | |||
@{ | |||
ViewBag.Title = "公开选调工作人员报名表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-4 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">性别</div> | |||
<input id="Gender" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">民族</div> | |||
<input id="Nationality" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">出生年月日</div> | |||
<input id="Birthday" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Birthday').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">参加工作时间<font face="宋体">*</font></div> | |||
<input id="jobTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#jobTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">入党时间</div> | |||
<input id="PartyTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#PartyTime').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">籍贯</div> | |||
<input id="Origin" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">健康状况</div> | |||
<input id="HealthStatus" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">有何专长</div> | |||
<input id="Speciality" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">现单位及职务</div> | |||
<textarea id="NowComPany" class="form-control" style="height:80px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">报名岗位</div> | |||
<textarea id="ApplyPost" class="form-control" style="height:80px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">全日制教育</div> | |||
<input id="TimeEducation" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">毕业院校及专业</div> | |||
<input id="T_SchoolMajor" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">在职教育</div> | |||
<input id="ServiceEducation" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">通讯地址</div> | |||
<input id="Address" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">手机号码</div> | |||
<input id="Mobile" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">个人简历</div> | |||
<textarea id="Resume" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">奖惩情况</div> | |||
<textarea id="RandP" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="WorkStaff" > | |||
<div class="lr-form-item-title">近三年年度考核情况</div> | |||
<textarea id="Triennium" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/WorkStaff/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-09-09 11:42 | |||
* 描 述:公开选调工作人员报名表 | |||
*/ | |||
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 () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/WorkStaff/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 + '/EducationalAdministration/WorkStaff/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,45 @@ | |||
@{ | |||
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="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<input id="Gender" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">民族</div> | |||
<input id="Nationality" 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> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/WorkStaff/Index.js") |
@@ -0,0 +1,109 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-09-09 11:42 | |||
* 描 述:公开选调工作人员报名表 | |||
*/ | |||
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 + '/EducationalAdministration/WorkStaff/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)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/WorkStaff/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)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/WorkStaff/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/WorkStaff/GetPageList', | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 100, align: "left"}, | |||
{ label: "性别", name: "Gender", width: 100, align: "left"}, | |||
{ label: "民族", name: "Nationality", width: 100, align: "left"}, | |||
{ label: "出生年月日", name: "Birthday", width: 100, align: "left"}, | |||
{ label: "参加工作时间", name: "jobTime", width: 100, align: "left"}, | |||
{ label: "入党时间", name: "PartyTime", width: 100, align: "left"}, | |||
{ label: "籍贯", name: "Origin", width: 100, align: "left"}, | |||
{ label: "健康状况", name: "HealthStatus", width: 100, align: "left"}, | |||
{ label: "有何专长", name: "Speciality", width: 100, align: "left"}, | |||
{ label: "现单位及职务", name: "NowComPany", width: 100, align: "left"}, | |||
{ label: "报名岗位", name: "ApplyPost", width: 100, align: "left"}, | |||
{ label: "全日制教育", name: "TimeEducation", width: 100, align: "left"}, | |||
{ label: "毕业院校及专业", name: "T_SchoolMajor", width: 100, align: "left"}, | |||
{ label: "在职教育", name: "ServiceEducation", width: 100, align: "left"}, | |||
{ label: "通讯地址", name: "Address", width: 100, align: "left"}, | |||
{ label: "手机号码", name: "Mobile", width: 100, align: "left"}, | |||
{ label: "个人简历", name: "Resume", width: 100, align: "left"}, | |||
{ label: "奖惩情况", name: "RandP", width: 100, align: "left"}, | |||
{ label: "近三年年度考核情况", name: "Triennium", width: 100, align: "left"}, | |||
], | |||
mainId:'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -827,6 +827,7 @@ | |||
<Compile Include="Areas\LR_Desktop\Controllers\EnrollTemplateController.cs" /> | |||
<Compile Include="Areas\LR_Desktop\Controllers\EnrollDataController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\HiringRegistrationController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\WorkStaffController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6307,6 +6308,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\HiringRegistration\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\HiringRegistration\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\HiringRegistration\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WorkStaff\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WorkStaff\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WorkStaff\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\WorkStaff\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -6,6 +6,7 @@ using System; | |||
using Learun.Application.Base.SystemModule; | |||
using System.IO; | |||
using System.Web.Mvc; | |||
using Learun.Application.WebApi.Modules; | |||
namespace Learun.Application.WebApi | |||
{ | |||
@@ -19,6 +20,7 @@ namespace Learun.Application.WebApi | |||
public class RecruiterPeopleApi : BaseNoLoginApi | |||
{ | |||
private HiringRegistrationIBLL hiringRegistrationIBLL = new HiringRegistrationBLL(); | |||
private WorkStaffIBLL workStaffIBLL = new WorkStaffBLL(); | |||
private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | |||
/// <summary> | |||
@@ -34,6 +36,7 @@ namespace Learun.Application.WebApi | |||
Get["/down"] = DownAnnexesFile; | |||
Post["/upload"] = Upload; | |||
Post["/save"] = SaveForm; | |||
Post["/saveStaff"] = SaveStaffForm; | |||
} | |||
#region 获取数据 | |||
@@ -108,6 +111,19 @@ namespace Learun.Application.WebApi | |||
hiringRegistrationIBLL.SaveEntity(parameter.keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 公开选调工作人员报名表 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response SaveStaffForm(dynamic _) | |||
{ | |||
var model = this.GetReqData<ReqFormEntity>(); | |||
var entity = workStaffIBLL.GetWorkStaffEntity(model.keyValue); | |||
workStaffIBLL.SaveEntity(model.keyValue, entity, model.WorkStaffSonEntities); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 上传附件图片文件 | |||
@@ -204,6 +220,7 @@ namespace Learun.Application.WebApi | |||
{ | |||
public string keyValue { get; set; } | |||
public string strEntity { get; set; } | |||
public List<WorkStaffSonEntity> WorkStaffSonEntities { get; set; } | |||
} | |||
#endregion | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-09-09 11:42 | |||
/// 描 述:公开选调工作人员报名表 | |||
/// </summary> | |||
public class WorkStaffMap : EntityTypeConfiguration<WorkStaffEntity> | |||
{ | |||
public WorkStaffMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("WORKSTAFF"); | |||
//主键 | |||
this.HasKey(t => t.ID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -600,6 +600,7 @@ | |||
<Compile Include="LR_Desktop\EnrollDataMap.cs" /> | |||
<Compile Include="EducationalAdministration\HiringRegistrationMap.cs" /> | |||
<Compile Include="EducationalAdministration\WorkStaffSonMap.cs" /> | |||
<Compile Include="EducationalAdministration\WorkStaffMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,149 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-09-09 11:42 | |||
/// 描 述:公开选调工作人员报名表 | |||
/// </summary> | |||
public class WorkStaffBLL : WorkStaffIBLL | |||
{ | |||
private WorkStaffService workStaffService = new WorkStaffService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<WorkStaffEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return workStaffService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取WorkStaff表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public WorkStaffEntity GetWorkStaffEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return workStaffService.GetWorkStaffEntity(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 | |||
{ | |||
workStaffService.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, WorkStaffEntity entity) | |||
{ | |||
try | |||
{ | |||
workStaffService.SaveEntity(keyValue, entity); | |||
} | |||
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, WorkStaffEntity entity,List<WorkStaffSonEntity> entitys) | |||
{ | |||
try | |||
{ | |||
workStaffService.SaveEntity(keyValue, entity, entitys); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,155 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-09-09 11:42 | |||
/// 描 述:公开选调工作人员报名表 | |||
/// </summary> | |||
public class WorkStaffEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// ID | |||
/// </summary> | |||
[Column("ID")] | |||
public string ID { get; set; } | |||
/// <summary> | |||
/// Name | |||
/// </summary> | |||
[Column("NAME")] | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// Gender | |||
/// </summary> | |||
[Column("GENDER")] | |||
public string Gender { get; set; } | |||
/// <summary> | |||
/// Head | |||
/// </summary> | |||
[Column("HEAD")] | |||
public string Head { get; set; } | |||
/// <summary> | |||
/// 民族 | |||
/// </summary> | |||
[Column("NATIONALITY")] | |||
public string Nationality { get; set; } | |||
/// <summary> | |||
/// Birthday | |||
/// </summary> | |||
[Column("BIRTHDAY")] | |||
public DateTime? Birthday { get; set; } | |||
/// <summary> | |||
/// jobTime | |||
/// </summary> | |||
[Column("JOBTIME")] | |||
public DateTime? jobTime { get; set; } | |||
/// <summary> | |||
/// 入党时间 | |||
/// </summary> | |||
[Column("PARTYTIME")] | |||
public DateTime? PartyTime { get; set; } | |||
/// <summary> | |||
/// 籍贯 | |||
/// </summary> | |||
[Column("ORIGIN")] | |||
public string Origin { get; set; } | |||
/// <summary> | |||
/// 健康状况 | |||
/// </summary> | |||
[Column("HEALTHSTATUS")] | |||
public string HealthStatus { get; set; } | |||
/// <summary> | |||
/// 有何专长 | |||
/// </summary> | |||
[Column("SPECIALITY")] | |||
public string Speciality { get; set; } | |||
/// <summary> | |||
/// 现工作单位及职务 | |||
/// </summary> | |||
[Column("NOWCOMPANY")] | |||
public string NowComPany { get; set; } | |||
/// <summary> | |||
/// 报名岗位 | |||
/// </summary> | |||
[Column("APPLYPOST")] | |||
public string ApplyPost { get; set; } | |||
/// <summary> | |||
/// 全日制教育 | |||
/// </summary> | |||
[Column("TIMEEDUCATION")] | |||
public string TimeEducation { get; set; } | |||
/// <summary> | |||
/// 毕业院校系及专业 | |||
/// </summary> | |||
[Column("T_SCHOOLMAJOR")] | |||
public string T_SchoolMajor { get; set; } | |||
/// <summary> | |||
/// 在职教育 | |||
/// </summary> | |||
[Column("SERVICEEDUCATION")] | |||
public string ServiceEducation { get; set; } | |||
/// <summary> | |||
/// 毕业院校系及专业 | |||
/// </summary> | |||
[Column("S_SCHOOLMAJOR")] | |||
public string S_SchoolMajor { get; set; } | |||
/// <summary> | |||
/// 通讯地址 | |||
/// </summary> | |||
[Column("ADDRESS")] | |||
public string Address { get; set; } | |||
/// <summary> | |||
/// 手机账号 | |||
/// </summary> | |||
[Column("MOBILE")] | |||
public string Mobile { get; set; } | |||
/// <summary> | |||
/// 个人简历 | |||
/// </summary> | |||
[Column("RESUME")] | |||
public string Resume { get; set; } | |||
/// <summary> | |||
/// 奖惩情况 | |||
/// </summary> | |||
[Column("RANDP")] | |||
public string RandP { get; set; } | |||
/// <summary> | |||
/// 近三年年度考核情况 | |||
/// </summary> | |||
[Column("TRIENNIUM")] | |||
public string Triennium { get; set; } | |||
/// <summary> | |||
/// Remark | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.ID = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.ID = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,50 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-09-09 11:42 | |||
/// 描 述:公开选调工作人员报名表 | |||
/// </summary> | |||
public interface WorkStaffIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<WorkStaffEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取WorkStaff表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
WorkStaffEntity GetWorkStaffEntity(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, WorkStaffEntity entity); | |||
void SaveEntity(string keyValue, WorkStaffEntity entity,List<WorkStaffSonEntity> entitysEntities); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,236 @@ | |||
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.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-09-09 11:42 | |||
/// 描 述:公开选调工作人员报名表 | |||
/// </summary> | |||
public class WorkStaffService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<WorkStaffEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.ID, | |||
t.Name, | |||
t.Gender, | |||
t.Nationality, | |||
t.Birthday, | |||
t.jobTime, | |||
t.PartyTime, | |||
t.Origin, | |||
t.HealthStatus, | |||
t.Speciality, | |||
t.NowComPany, | |||
t.ApplyPost, | |||
t.TimeEducation, | |||
t.T_SchoolMajor, | |||
t.ServiceEducation, | |||
t.Address, | |||
t.Mobile, | |||
t.Resume, | |||
t.RandP, | |||
t.Triennium | |||
"); | |||
strSql.Append(" FROM WorkStaff t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["Name"].IsEmpty()) | |||
{ | |||
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Name Like @Name "); | |||
} | |||
if (!queryParam["Gender"].IsEmpty()) | |||
{ | |||
dp.Add("Gender", "%" + queryParam["Gender"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Gender Like @Gender "); | |||
} | |||
if (!queryParam["Nationality"].IsEmpty()) | |||
{ | |||
dp.Add("Nationality", "%" + queryParam["Nationality"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Nationality Like @Nationality "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<WorkStaffEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取WorkStaff表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public WorkStaffEntity GetWorkStaffEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<WorkStaffEntity>(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<WorkStaffEntity>(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, WorkStaffEntity 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> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, WorkStaffEntity entity, List<WorkStaffSonEntity> entities) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var workStaff = GetWorkStaffEntity(keyValue); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
if (null != entities) | |||
{ | |||
db.Delete<WorkStaffSonEntity>(t => t.StaffId == entity.ID); | |||
foreach (WorkStaffSonEntity item in entities) | |||
{ | |||
item.Create(); | |||
item.StaffId = entity.ID; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
db.Insert(entity); | |||
if (null != entities) | |||
{ | |||
foreach (WorkStaffSonEntity item in entities) | |||
{ | |||
item.Create(); | |||
item.StaffId = entity.ID; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -75,9 +75,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify( keyValue) | |||
public void Modify() | |||
{ | |||
this. = keyValue; | |||
this.ID = Guid.NewGuid().ToString(); | |||
} | |||
#endregion | |||
} | |||
@@ -1824,6 +1824,10 @@ | |||
<Compile Include="EducationalAdministration\HiringRegistration\HiringRegistrationBLL.cs" /> | |||
<Compile Include="EducationalAdministration\HiringRegistration\HiringRegistrationIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\WorkStaffSon\WorkStaffSonEntity.cs" /> | |||
<Compile Include="EducationalAdministration\WorkStaff\WorkStaffEntity.cs" /> | |||
<Compile Include="EducationalAdministration\WorkStaff\WorkStaffService.cs" /> | |||
<Compile Include="EducationalAdministration\WorkStaff\WorkStaffBLL.cs" /> | |||
<Compile Include="EducationalAdministration\WorkStaff\WorkStaffIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||