Browse Source

Merge branch 'master' of 123.57.209.16:bjquanjiang/DigitalScholl

大厂分支
liangkun 4 years ago
parent
commit
a5107e334b
14 changed files with 990 additions and 1 deletions
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js
  2. +134
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_AddApplyController.cs
  3. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Form.cshtml
  4. +111
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Form.js
  5. +43
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Index.cshtml
  6. +172
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Index.js
  7. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  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/ADR_AddApplyMap.cs
  10. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  11. +148
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyBLL.cs
  12. +75
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyEntity.cs
  13. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyIBLL.cs
  14. +189
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js View File

@@ -161,7 +161,7 @@ var bootstrap = function ($, learun) {
],
mainId: 'ID',
isPage: true,
sidx: "UserNo,ADYear,ADMonth,ADDay,ADTime",
sidx: "UserNo,ADYear,ADMonth,ADDay,ClockTime",
});
},
search: function (param) {


+ 134
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_AddApplyController.cs View File

@@ -0,0 +1,134 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Web.Mvc;
using Learun.Application.TwoDevelopment.LR_CodeDemo;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyController : MvcControllerBase
{
private ADR_AddApplyIBLL aDR_AddApplyIBLL = new ADR_AddApplyBLL();
private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL();

#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 = aDR_AddApplyIBLL.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 ADR_AddApplyData = aDR_AddApplyIBLL.GetADR_AddApplyEntity( keyValue );
var jsonData = new {
ADR_AddApply = ADR_AddApplyData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var ADR_AddApplyData = aDR_AddApplyIBLL.GetEntityByProcessId( processId );
var jsonData = new {
ADR_AddApply = ADR_AddApplyData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

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

}
}

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Form.cshtml View File

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "补卡申请";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ADR_AddApply" >
<div class="lr-form-item-title">申请人</div>
<div id="UserNo" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ADR_AddApply" >
<div class="lr-form-item-title">考勤类型</div>
<div id="ADType" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ADR_AddApply" >
<div class="lr-form-item-title">补卡时间</div>
<input id="AddTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AddTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ADR_AddApply" >
<div class="lr-form-item-title">原因</div>
<input id="Remark" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ADR_AddApply/Form.js")

+ 111
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Form.js View File

@@ -0,0 +1,111 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-09-09 16:23
* 描 述:补卡申请
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
if(!!data)
{
for (var field in data) {
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
$('#' + data[field].fieldId).parent().remove();
}
else {
if (data[field].isEdit != 1) {
$('#' + data[field].fieldId).attr('disabled', 'disabled');
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
$('#' + data[field].fieldId).css({ 'padding-right': '58px' });
$('#' + data[field].fieldId).find('.btn-success').remove();
}
}
}
}
}
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#UserNo').lrformselect({
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm',
layerUrlW: 400,
layerUrlH: 300,
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds'
});
$('#ADType').lrDataItemSelect({ code: 'ADType' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/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]);
}
}
});
}
}
};
// 设置表单数据
setFormData = function (processId,param,callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
if(id == 'ADR_AddApply' && data[id] ){
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback(); }
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if(!!processId){
formData.ProcessId =processId;
}
var postData = {
strEntity: JSON.stringify(formData)
};
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Index.cshtml View File

@@ -0,0 +1,43 @@
@{
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="datesearch"></div>
</div>
<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>
<div id="UserNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">考勤类型</div>
<div id="ADType"></div>
</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/ADR_AddApply/Index.js")

+ 172
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Index.js View File

@@ -0,0 +1,172 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-09-09 16:23
* 描 述:补卡申请
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#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();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#UserNo').lrUserSelect(0);
$('#ADType').lrDataItemSelect({ code: 'ADType' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/Form',
width: 600,
height: 400,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
processId = learun.newGuid();
res = top[id].save(processId, refreshGirdData);
}
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
// 删除
$('#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/ADR_AddApply/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/GetPageList',
headData: [
{ label: "申请人", name: "UserNo", 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: "ADType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ADType',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "补卡时间", name: "AddTime", width: 100, align: "left"},
{ label: "原因", name: "Remark", 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 (res, postData) {
if (!!res)
{
if (res.code == 200)
{
// 发起流程
var postData = {
schemeCode:'',// 填写流程对应模板编号
processId:processId,
level:'1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) {
learun.loading(false);
});
}
page.search();
}
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -802,6 +802,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\ADR_DeviceController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ADR_DeviceLogController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_RestrictionController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_AddApplyController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\RegistrateForm.js" />
@@ -6063,6 +6064,10 @@
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -537,6 +537,7 @@
<Compile Include="EducationalAdministration\ADR_DeviceMap.cs" />
<Compile Include="EducationalAdministration\ADR_DeviceLogMap.cs" />
<Compile Include="PersonnelManagement\ADR_RestrictionMap.cs" />
<Compile Include="PersonnelManagement\ADR_AddApplyMap.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/ADR_AddApplyMap.cs View File

@@ -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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyMap : EntityTypeConfiguration<ADR_AddApplyEntity>
{
public ADR_AddApplyMap()
{
#region 表、主键
//表
this.ToTable("ADR_ADDAPPLY");
//主键
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 View File

@@ -1568,6 +1568,10 @@
<Compile Include="PersonnelManagement\ADR_Restriction\ADR_RestrictionService.cs" />
<Compile Include="PersonnelManagement\ADR_Restriction\ADR_RestrictionBLL.cs" />
<Compile Include="PersonnelManagement\ADR_Restriction\ADR_RestrictionIBLL.cs" />
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyEntity.cs" />
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyService.cs" />
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyBLL.cs" />
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 148
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyBLL.cs View File

@@ -0,0 +1,148 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyBLL : ADR_AddApplyIBLL
{
private ADR_AddApplyService aDR_AddApplyService = new ADR_AddApplyService();

#region 获取数据

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

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

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public ADR_AddApplyEntity GetEntityByProcessId(string processId)
{
try
{
return aDR_AddApplyService.GetEntityByProcessId(processId);
}
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
{
aDR_AddApplyService.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>
public void SaveEntity(string keyValue, ADR_AddApplyEntity entity)
{
try
{
aDR_AddApplyService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 75
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyEntity.cs View File

@@ -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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyEntity
{
#region 实体成员
/// <summary>
/// 编号
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 补卡时间
/// </summary>
[Column("ADDTIME")]
public DateTime? AddTime { get; set; }
/// <summary>
/// 申请人
/// </summary>
[Column("USERNO")]
public string UserNo { get; set; }
/// <summary>
/// 流程id
/// </summary>
[Column("PROCESSID")]
public string ProcessId { get; set; }
/// <summary>
/// 流程状态
/// </summary>
[Column("PSTATUS")]
public int? PStatus { get; set; }
/// <summary>
/// 理由
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 考勤类型
/// </summary>
[Column("ADTYPE")]
public string ADType { 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
}
}


+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyIBLL.cs View File

@@ -0,0 +1,55 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public interface ADR_AddApplyIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ADR_AddApplyEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取ADR_AddApply表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
ADR_AddApplyEntity GetADR_AddApplyEntity(string keyValue);
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
ADR_AddApplyEntity GetEntityByProcessId(string processId);
#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, ADR_AddApplyEntity entity);
#endregion

}
}

+ 189
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyService.cs View File

@@ -0,0 +1,189 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ADR_AddApplyEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.UserNo,
t.ADType,
t.AddTime,
t.Remark
");
strSql.Append(" FROM ADR_AddApply t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.AddTime >= @startTime AND t.AddTime <= @endTime ) ");
}
if (!queryParam["UserNo"].IsEmpty())
{
dp.Add("UserNo",queryParam["UserNo"].ToString(), DbType.String);
strSql.Append(" AND t.UserNo = @UserNo ");
}
if (!queryParam["ADType"].IsEmpty())
{
dp.Add("ADType",queryParam["ADType"].ToString(), DbType.String);
strSql.Append(" AND t.ADType = @ADType ");
}
return this.BaseRepository("CollegeMIS").FindList<ADR_AddApplyEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public ADR_AddApplyEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ADR_AddApplyEntity>(t=>t.ProcessId == processId);
}
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<ADR_AddApplyEntity>(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>
/// <returns></returns>
public void SaveEntity(string keyValue, ADR_AddApplyEntity 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);
}
}
}

#endregion

}
}

Loading…
Cancel
Save