Переглянути джерело

Merge branch '怀来职教中心中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 怀来职教中心中职

怀来职教中心中职
dyy 1 рік тому
джерело
коміт
c402fe608b
18 змінених файлів з 1012 додано та 1 видалено
  1. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js
  3. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyManageController.cs
  4. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Form.cshtml
  5. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Form.js
  6. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.cshtml
  7. +137
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.js
  8. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  10. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/PartyCateMap.cs
  11. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/PartyManageMap.cs
  12. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
  13. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  14. +75
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyCateEntity.cs
  15. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageBLL.cs
  16. +73
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.cs
  17. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageIBLL.cs
  18. +193
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.cs

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml Переглянути файл

@@ -46,6 +46,18 @@
<div class="lr-form-item-title">职称</div>
<input id="JobTitle" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">职务</div>
<input id="JobTitle" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">到校时间</div>
<input id="GroupDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#GroupDate').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">参加工作时间</div>
<input id="AddWorkDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AddWorkDate').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">政治面貌</div>
<div id="PartyFaceNo"></div>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js Переглянути файл

@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) {
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 330, 700);
}, 380, 700);
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#ProvinceNo').lrDataSourceSelect({
code: 'DIC_PROVINCE', value: 'pcode', text: 'pname',


+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyManageController.cs Переглянути файл

@@ -0,0 +1,120 @@
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-07-31 16:59
/// 描 述:党政办管理
/// </summary>
public class PartyManageController : MvcControllerBase
{
private PartyManageIBLL partyManageIBLL = new PartyManageBLL();

#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 = partyManageIBLL.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 PartyCateData = partyManageIBLL.GetPartyCateEntity( keyValue );
var PartyManageData = partyManageIBLL.GetPartyManageEntity( PartyCateData.ID );
var jsonData = new {
PartyManage = PartyManageData,
PartyCate = PartyCateData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
partyManageIBLL.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, string strpartyManageEntity)
{
PartyCateEntity entity = strEntity.ToObject<PartyCateEntity>();
PartyManageEntity partyManageEntity = strpartyManageEntity.ToObject<PartyManageEntity>();
partyManageIBLL.SaveEntity(keyValue,entity,partyManageEntity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Form.cshtml Переглянути файл

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "党政办管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="PartyManage" >
<div class="lr-form-item-title">所属分类<font face="宋体">*</font></div>
<div id="CateId" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="PartyManage" >
<div class="lr-form-item-title">标题<font face="宋体">*</font></div>
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="PartyManage" >
<div class="lr-form-item-title">附件上传</div>
<div id="Filepath" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/PartyManage/Form.js")

+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Form.js Переглянути файл

@@ -0,0 +1,52 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-07-31 16:59
* 描 述:党政办管理
*/
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 () {
$('#CateId').lrDataSourceSelect({ code: 'partycate',value: 'id',text: 'name' });
$('#Filepath').lrUploader();
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/PartyManage/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 = {};
postData.strpartyManageEntity = JSON.stringify($('[data-table="PartyManage"]').lrGetFormData());
postData.strEntity = JSON.stringify($('[data-table="PartyCate"]').lrGetFormData());
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/PartyManage/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.cshtml Переглянути файл

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "党政办管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout" >
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlg ">树形列表</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlg">列表信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></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>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/PartyManage/Index.js")

+ 137
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.js Переглянути файл

@@ -0,0 +1,137 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-07-31 16:59
* 描 述:党政办管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetTree?code=partycate&parentId=id&Id=id&showId=name',
nodeClick: function (item) {
page.search({ CateId: item.value });
}
});
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/PartyManage/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 + '/PersonnelManagement/PartyManage/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 + '/PersonnelManagement/PartyManage/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/PartyManage/GetPageList',
headData: [
{ label: "所属分类", name: "CateId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'partycate',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}},
{ label: "标题", name: "Title", width: 100, align: "left"},
{ label: "附件上传", name: "Filepath", width: 100, align: "left"},
],
mainId:'ID',
isPage: true
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Переглянути файл

@@ -912,6 +912,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSubscriptionController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TeacherPlanCheckController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TrainingRoomUseController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\PartyManageController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -7157,6 +7158,10 @@
<Content Include="Areas\EducationalAdministration\Views\TrainingRoomUse\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TrainingRoomUse\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TrainingRoomUse\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\PartyManage\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\PartyManage\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\PartyManage\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\PartyManage\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Переглянути файл

@@ -670,6 +670,8 @@
<Compile Include="EducationalAdministration\TextBookSubscriptionMap.cs" />
<Compile Include="EducationalAdministration\TeacherPlanCheckMap.cs" />
<Compile Include="EducationalAdministration\TrainingRoomUseMap.cs" />
<Compile Include="PersonnelManagement\PartyManageMap.cs" />
<Compile Include="PersonnelManagement\PartyCateMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/PartyCateMap.cs Переглянути файл

@@ -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-07-31 16:59
/// 描 述:党政办管理
/// </summary>
public class PartyCateMap : EntityTypeConfiguration<PartyCateEntity>
{
public PartyCateMap()
{
#region 表、主键
//表
this.ToTable("PARTYCATE");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/PartyManageMap.cs Переглянути файл

@@ -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-07-31 16:59
/// 描 述:党政办管理
/// </summary>
public class PartyManageMap : EntityTypeConfiguration<PartyManageEntity>
{
public PartyManageMap()
{
#region 表、主键
//表
this.ToTable("PARTYMANAGE");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs Переглянути файл

@@ -62,6 +62,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
// dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
// strSql.Append(" AND t.DeptNo = @DeptNo ");
//}

if (!queryParam["JobTitle"].IsEmpty())
{
dp.Add("JobTitle", queryParam["JobTitle"].ToString(), DbType.String);
strSql.Append(" AND t.JobTitle = @JobTitle ");
}
if (!queryParam["GroupDate"].IsEmpty())
{
dp.Add("GroupDate", queryParam["GroupDate"].ToString(), DbType.String);
strSql.Append(" AND t.GroupDate = @GroupDate ");
}
if (!queryParam["AddWorkDate"].IsEmpty())
{
dp.Add("AddWorkDate", queryParam["AddWorkDate"].ToString(), DbType.String);
strSql.Append(" AND t.AddWorkDate = @AddWorkDate ");
}


if (!queryParam["ProvinceNo"].IsEmpty())
{
dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String);


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Переглянути файл

@@ -2103,6 +2103,11 @@
<Compile Include="EducationalAdministration\TrainingRoomUse\TrainingRoomUseService.cs" />
<Compile Include="EducationalAdministration\TrainingRoomUse\TrainingRoomUseBLL.cs" />
<Compile Include="EducationalAdministration\TrainingRoomUse\TrainingRoomUseIBLL.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyManageEntity.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyCateEntity.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyManageService.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyManageBLL.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyManageIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 75
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyCateEntity.cs Переглянути файл

@@ -0,0 +1,75 @@
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-07-31 16:59
/// 描 述:党政办管理
/// </summary>
public class PartyCateEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// Name
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// Creator
/// </summary>
[Column("CREATOR")]
public string Creator { get; set; }
/// <summary>
/// Createtime
/// </summary>
[Column("CREATETIME")]
public DateTime? Createtime { 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 扩展字段
/// <summary>
/// 所属分类
/// </summary>
[NotMapped]
public string CateId { get; set; }
/// <summary>
/// 标题
/// </summary>
[NotMapped]
public string Title { get; set; }
/// <summary>
/// 附件上传
/// </summary>
[NotMapped]
public string Filepath { get; set; }
#endregion
}
}


+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageBLL.cs Переглянути файл

@@ -0,0 +1,149 @@
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-07-31 16:59
/// 描 述:党政办管理
/// </summary>
public class PartyManageBLL : PartyManageIBLL
{
private PartyManageService partyManageService = new PartyManageService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<PartyCateEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return partyManageService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取PartyManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public PartyManageEntity GetPartyManageEntity(string keyValue)
{
try
{
return partyManageService.GetPartyManageEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取PartyCate表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public PartyCateEntity GetPartyCateEntity(string keyValue)
{
try
{
return partyManageService.GetPartyCateEntity(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
{
partyManageService.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, PartyCateEntity entity,PartyManageEntity partyManageEntity)
{
try
{
partyManageService.SaveEntity(keyValue, entity,partyManageEntity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 73
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.cs Переглянути файл

@@ -0,0 +1,73 @@
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-07-31 16:59
/// 描 述:党政办管理
/// </summary>
public class PartyManageEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// CateId
/// </summary>
[Column("CATEID")]
public string CateId { get; set; }
/// <summary>
/// Title
/// </summary>
[Column("TITLE")]
public string Title { get; set; }
/// <summary>
/// Creator
/// </summary>
[Column("CREATOR")]
public string Creator { get; set; }
/// <summary>
/// Createtime
/// </summary>
[Column("CREATETIME")]
public DateTime? Createtime { get; set; }
/// <summary>
/// Updatetime
/// </summary>
[Column("UPDATETIME")]
public DateTime? Updatetime { get; set; }
/// <summary>
/// Filepath
/// </summary>
[Column("FILEPATH")]
public string Filepath { 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
}
}


+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageIBLL.cs Переглянути файл

@@ -0,0 +1,54 @@
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-07-31 16:59
/// 描 述:党政办管理
/// </summary>
public interface PartyManageIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<PartyCateEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取PartyManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
PartyManageEntity GetPartyManageEntity(string keyValue);
/// <summary>
/// 获取PartyCate表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
PartyCateEntity GetPartyCateEntity(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, PartyCateEntity entity,PartyManageEntity partyManageEntity);
#endregion

}
}

+ 193
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.cs Переглянути файл

@@ -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-07-31 16:59
/// 描 述:党政办管理
/// </summary>
public class PartyManageService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<PartyCateEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t1.CateId,
t1.Title,
t1.Filepath
");
strSql.Append(" FROM PartyCate t ");
strSql.Append(" LEFT JOIN PartyManage t1 ON t1.CateId = t.ID ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["CateId"].IsEmpty())
{
dp.Add("CateId",queryParam["CateId"].ToString(), DbType.String);
strSql.Append(" AND t.CateId = @CateId ");
}
return this.BaseRepository("CollegeMIS").FindList<PartyCateEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取PartyManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public PartyManageEntity GetPartyManageEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<PartyManageEntity>(t=>t.CateId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取PartyCate表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public PartyCateEntity GetPartyCateEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<PartyCateEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var partyCateEntity = GetPartyCateEntity(keyValue);
db.Delete<PartyManageEntity>(t=>t.CateId == partyCateEntity.ID);
db.Delete<PartyCateEntity>(t=>t.ID == keyValue);
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, PartyCateEntity entity,PartyManageEntity partyManageEntity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
if (!string.IsNullOrEmpty(keyValue))
{
var partyCateEntityTmp = GetPartyCateEntity(keyValue);
entity.Modify(keyValue);
db.Update(entity);
db.Delete<PartyManageEntity>(t=>t.CateId == partyCateEntityTmp.ID);
partyManageEntity.Create();
partyManageEntity.CateId = partyCateEntityTmp.ID;
db.Insert(partyManageEntity);
}
else
{
entity.Create();
db.Insert(entity);
partyManageEntity.Create();
partyManageEntity.CateId = entity.ID;
db.Insert(partyManageEntity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

Завантаження…
Відмінити
Зберегти