ソースを参照

【增加】OA办公:增加”个人事务配置“;

娄底高职分支
dyy 1年前
コミット
0606b85dcb
14個のファイルの変更781行の追加0行の削除
  1. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WP_OfficeConfigController.cs
  2. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WP_OfficeConfig/Form.cshtml
  3. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WP_OfficeConfig/Form.js
  4. +40
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WP_OfficeConfig/Index.cshtml
  5. +98
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WP_OfficeConfig/Index.js
  6. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  9. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/WP_OfficeConfigMap.cs
  10. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  11. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WP_OfficeConfig/WP_OfficeConfigBLL.cs
  12. +84
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WP_OfficeConfig/WP_OfficeConfigEntity.cs
  13. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WP_OfficeConfig/WP_OfficeConfigIBLL.cs
  14. +156
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WP_OfficeConfig/WP_OfficeConfigService.cs

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WP_OfficeConfigController.cs ファイルの表示

@@ -0,0 +1,117 @@
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-13 15:02
/// 描 述:个人事务配置
/// </summary>
public class WP_OfficeConfigController : MvcControllerBase
{
private WP_OfficeConfigIBLL wP_OfficeConfigIBLL = new WP_OfficeConfigBLL();

#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 = wP_OfficeConfigIBLL.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 WP_OfficeConfigData = wP_OfficeConfigIBLL.GetWP_OfficeConfigEntity( keyValue );
var jsonData = new {
WP_OfficeConfig = WP_OfficeConfigData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

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

}
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WP_OfficeConfig/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="WP_OfficeConfig" >
<div class="lr-form-item-title">名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="WP_OfficeConfig" >
<div class="lr-form-item-title">内容<font face="宋体">*</font></div>
<input id="Contents" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="WP_OfficeConfig" >
<div class="lr-form-item-title">是否启用</div>
<div id="IsEnabled"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WP_OfficeConfig/Form.js")

+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WP_OfficeConfig/Form.js ファイルの表示

@@ -0,0 +1,54 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-03-13 15:02
* 描 述:个人事务配置
*/
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 () {
$('#IsEnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/WP_OfficeConfig/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/WP_OfficeConfig/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 40
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WP_OfficeConfig/Index.cshtml ファイルの表示

@@ -0,0 +1,40 @@
@{
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="Contents" 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>&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>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WP_OfficeConfig/Index.js")

+ 98
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WP_OfficeConfig/Index.js ファイルの表示

@@ -0,0 +1,98 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-03-13 15:02
* 描 述:个人事务配置
*/
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);
$('#IsEnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/WP_OfficeConfig/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/WP_OfficeConfig/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/WP_OfficeConfig/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/WP_OfficeConfig/GetPageList',
headData: [
{ label: "名称", name: "Name", width: 150, align: "left" },
{ label: "内容", name: "Contents", width: 200, align: "left" },
{
label: "是否启用", name: "IsEnabled", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
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();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj ファイルの表示

@@ -877,6 +877,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StuNoticeController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuCommentController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\LeagueMemberAppraiseController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\WP_OfficeConfigController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6469,6 +6470,10 @@
<Content Include="Areas\PersonnelManagement\Views\LeagueMemberAppraise\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\LeagueMemberAppraise\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\LeagueMemberAppraise\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\WP_OfficeConfig\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\WP_OfficeConfig\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\WP_OfficeConfig\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\WP_OfficeConfig\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" />


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config ファイルの表示

@@ -12,4 +12,5 @@
<!--塔里木中间库一卡通-->
<!--<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>

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj ファイルの表示

@@ -610,6 +610,7 @@
<Compile Include="EducationalAdministration\SmsCodeMap.cs" />
<Compile Include="EducationalAdministration\StuCommentMap.cs" />
<Compile Include="PersonnelManagement\LeagueMemberAppraiseMap.cs" />
<Compile Include="PersonnelManagement\WP_OfficeConfigMap.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/WP_OfficeConfigMap.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-03-13 15:02
/// 描 述:个人事务配置
/// </summary>
public class WP_OfficeConfigMap : EntityTypeConfiguration<WP_OfficeConfigEntity>
{
public WP_OfficeConfigMap()
{
#region 表、主键
//表
this.ToTable("WP_OFFICECONFIG");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj ファイルの表示

@@ -1872,6 +1872,10 @@
<Compile Include="PersonnelManagement\LeagueMemberAppraise\LeagueMemberAppraiseService.cs" />
<Compile Include="PersonnelManagement\LeagueMemberAppraise\LeagueMemberAppraiseBLL.cs" />
<Compile Include="PersonnelManagement\LeagueMemberAppraise\LeagueMemberAppraiseIBLL.cs" />
<Compile Include="PersonnelManagement\WP_OfficeConfig\WP_OfficeConfigEntity.cs" />
<Compile Include="PersonnelManagement\WP_OfficeConfig\WP_OfficeConfigService.cs" />
<Compile Include="PersonnelManagement\WP_OfficeConfig\WP_OfficeConfigBLL.cs" />
<Compile Include="PersonnelManagement\WP_OfficeConfig\WP_OfficeConfigIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WP_OfficeConfig/WP_OfficeConfigBLL.cs ファイルの表示

@@ -0,0 +1,125 @@
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-13 15:02
/// 描 述:个人事务配置
/// </summary>
public class WP_OfficeConfigBLL : WP_OfficeConfigIBLL
{
private WP_OfficeConfigService wP_OfficeConfigService = new WP_OfficeConfigService();

#region 获取数据

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

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

#endregion

}
}

+ 84
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WP_OfficeConfig/WP_OfficeConfigEntity.cs ファイルの表示

@@ -0,0 +1,84 @@
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-13 15:02
/// 描 述:个人事务配置
/// </summary>
public class WP_OfficeConfigEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 内容
/// </summary>
[Column("CONTENTS")]
public string Contents { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Column("ISENABLED")]
public bool? IsEnabled { 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.CreateUserId = LoginUserInfo.Get().userId;
this.CreateTime = DateTime.Now;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
this.ModifyUserId = LoginUserInfo.Get().userId;
this.ModifyTime = DateTime.Now;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WP_OfficeConfig/WP_OfficeConfigIBLL.cs ファイルの表示

@@ -0,0 +1,48 @@
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-13 15:02
/// 描 述:个人事务配置
/// </summary>
public interface WP_OfficeConfigIBLL
{
#region 获取数据

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

}
}

+ 156
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WP_OfficeConfig/WP_OfficeConfigService.cs ファイルの表示

@@ -0,0 +1,156 @@
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-13 15:02
/// 描 述:个人事务配置
/// </summary>
public class WP_OfficeConfigService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<WP_OfficeConfigEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM WP_OfficeConfig 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["Contents"].IsEmpty())
{
dp.Add("Contents", "%" + queryParam["Contents"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Contents Like @Contents ");
}
if (!queryParam["IsEnabled"].IsEmpty())
{
dp.Add("IsEnabled",queryParam["IsEnabled"].ToString(), DbType.String);
strSql.Append(" AND t.IsEnabled = @IsEnabled ");
}
return this.BaseRepository("CollegeMISFor30").FindList<WP_OfficeConfigEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取WP_OfficeConfig表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public WP_OfficeConfigEntity GetWP_OfficeConfigEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMISFor30").FindEntity<WP_OfficeConfigEntity>(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("CollegeMISFor30").Delete<WP_OfficeConfigEntity>(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, WP_OfficeConfigEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMISFor30").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMISFor30").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

読み込み中…
キャンセル
保存