Browse Source

公章管理

yanshi
zhangli 3 years ago
parent
commit
a8a662c5e5
26 changed files with 1024 additions and 36 deletions
  1. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/OfficialSealController.cs
  2. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/OfficialSealRecordController.cs
  3. +19
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/OfficialSealUseController.cs
  4. +11
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSeal/Index.cshtml
  5. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSeal/Index.js
  6. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Form.cshtml
  7. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Form.js
  8. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Index.cshtml
  9. +115
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Index.js
  10. +15
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealUse/Form.js
  11. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealUse/Index.cshtml
  12. +24
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealUse/Index.js
  13. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  14. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/OfficialSealRecordMap.cs
  15. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  16. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealBLL.cs
  17. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealIBLL.cs
  18. +27
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealService.cs
  19. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordBLL.cs
  20. +75
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordEntity.cs
  21. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordIBLL.cs
  22. +151
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordService.cs
  23. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseBLL.cs
  24. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseIBLL.cs
  25. +46
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseService.cs
  26. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/OfficialSealController.cs View File

@@ -93,6 +93,33 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
officialSealIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

/// <summary>
/// 启用/禁用
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult IsEnable(string keyValue,string Enable)
{
var entity = officialSealIBLL.GetOfficialSealEntity(keyValue);
entity.Enable = Enable;
officialSealIBLL.SaveEntity(keyValue, entity);
return Success("删除成功!");
}
/// <summary>
///
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateStatus(string keyValue, string Status)
{
officialSealIBLL.UpdateStatus(keyValue, Status);
return Success("操作成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/OfficialSealRecordController.cs View File

@@ -0,0 +1,117 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.CustomFunction;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.CustomFunction.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-10 11:54
/// 描 述:系统日志
/// </summary>
public class OfficialSealRecordController : MvcControllerBase
{
private OfficialSealRecordIBLL officialSealRecordIBLL = new OfficialSealRecordBLL();

#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 = officialSealRecordIBLL.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 OfficialSealRecordData = officialSealRecordIBLL.GetOfficialSealRecordEntity( keyValue );
var jsonData = new {
OfficialSealRecord = OfficialSealRecordData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

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

}
}

+ 19
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/OfficialSealUseController.cs View File

@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
#endregion

@@ -71,8 +71,9 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var OfficialSealUseData = officialSealUseIBLL.GetOfficialSealUseEntity( keyValue );
var jsonData = new {
var OfficialSealUseData = officialSealUseIBLL.GetOfficialSealUseEntity(keyValue);
var jsonData = new
{
OfficialSealUse = OfficialSealUseData,
};
return Success(jsonData);
@@ -93,6 +94,19 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
officialSealUseIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

/// <summary>
/// 提交 审核
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateStatus(string keyValue, int Status)
{
officialSealUseIBLL.UpdateStatus(keyValue, Status);
return Success("操作成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
@@ -105,7 +119,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
OfficialSealUseEntity entity = strEntity.ToObject<OfficialSealUseEntity>();
officialSealUseIBLL.SaveEntity(keyValue,entity);
officialSealUseIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}


+ 11
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSeal/Index.cshtml View File

@@ -33,10 +33,17 @@
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_enable" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;启用</a>
<a id="lr_disable" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;禁用</a>
<a id="lr_loss" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;挂失</a>
<a id="lr_noloss" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;取消挂失</a>
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-reorder"></i>&nbsp;<span class="lrlt">更多</span><span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<li id="lr_enable"><a><i></i>&nbsp;<span class="lrlt">启用</span></a></li>
<li id="lr_disable"><a><i></i>&nbsp;<span class="lrlt">禁用</span></a></li>
<li id="lr_loss"><a><i></i>&nbsp;<span class="lrlt">挂失</span></a></li>
<li id="lr_noloss"><a><i></i>&nbsp;<span class="lrlt">取消挂失</span></a></li>
<li id="lr_xh"><a><i></i>&nbsp;<span class="lrlt">销毁</span></a></li>
</ul>

</div>
</div>
</div>


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSeal/Index.js View File

@@ -92,7 +92,12 @@ var bootstrap = function ($, learun) {
// 挂失
$('#lr_loss').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');

if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
return learun.alert.warning('正常状态才可挂失!');
}
learun.layerConfirm('是否确认挂失该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/OfficialSeal/UpdateStatus', { keyValue: keyValue, Status: 2 }, function () {
@@ -105,7 +110,12 @@ var bootstrap = function ($, learun) {
// 取消挂失
$('#lr_noloss').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');

if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 2) {
return learun.alert.warning('挂失状态才可取消挂失!');
}
learun.layerConfirm('是否确认取消挂失该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/OfficialSeal/UpdateStatus', { keyValue: keyValue, Status: 0 }, function () {
@@ -115,6 +125,19 @@ var bootstrap = function ($, learun) {
});
}
});
// 销毁
$('#lr_xh').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认销毁该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/OfficialSeal/UpdateStatus', { keyValue: keyValue, Status: 99 }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
@@ -183,6 +206,8 @@ var bootstrap = function ($, learun) {
return '<span class=\"label label-warning\">借出</span>';
} else if (cellvalue == '2') {
return '<span class=\"label label-danger\">挂失</span>';
} else if (cellvalue == '99') {
return '<span class=\"label label-danger\">销毁</span>';
}

}


+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Form.cshtml View File

@@ -0,0 +1,15 @@
@{
ViewBag.Title = "系统日志";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="OfficialSealRecord" >
<div class="lr-form-item-title">公章类型<font face="宋体">*</font></div>
<div id="SealType" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="OfficialSealRecord" >
<div class="lr-form-item-title">公章名称</div>
<div id="SealId" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/CustomFunction/Views/OfficialSealRecord/Form.js")

+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Form.js View File

@@ -0,0 +1,52 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-10 11:54
* 描 述:系统日志
*/
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 () {
$('#SealType').lrDataItemSelect({ code: 'SealType' });
$('#SealId').lrDataSourceSelect({ code: 'OfficialSealData',value: 'id',text: 'name' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/CustomFunction/OfficialSealRecord/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 + '/CustomFunction/OfficialSealRecord/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Index.cshtml View File

@@ -0,0 +1,36 @@
@{
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>
<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/CustomFunction/Views/OfficialSealRecord/Index.js")

+ 115
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Index.js View File

@@ -0,0 +1,115 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-10 11:54
* 描 述:系统日志
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetTree?code=OfficialSealData&parentId=type&Id=id&showId=name',
nodeClick: function (item) {
page.search({ SealId: item.value });
}
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/CustomFunction/OfficialSealRecord/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 + '/CustomFunction/OfficialSealRecord/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 + '/CustomFunction/OfficialSealRecord/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/CustomFunction/OfficialSealRecord/GetPageList',
headData: [
{ label: "公章类型", name: "SealType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'SealType',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "公章名称", name: "SealId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'OfficialSealData',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}},
],
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();
}

+ 15
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealUse/Form.js View File

@@ -15,10 +15,21 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
$('#Type').lrDataItemSelect({ code: 'SealType', select: function() {

} });
$('#SealId').lrDataSourceSelect({ code: 'OfficialSealData',value: 'id',text: 'name' });
$('#Type').lrDataItemSelect({
code: 'SealType', select: function (item) {
if (item) {
$('#SealId').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=OfficialSealData',
param: { strWhere: "1=1 and type='" + item.id + "'" },
value: "id",
text: "name"
});
}
}
});
$('#SealId').lrDataSourceSelect({ code: 'OfficialSealData', value: 'id', text: 'name' });
$('#ApplyUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#ApplyUserId').val(learun.clientdata.get(['userinfo']).realName);
$('#ApplyTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
@@ -28,7 +39,7 @@ var bootstrap = function ($, learun) {
$.lrSetForm(top.$.rootUrl + '/CustomFunction/OfficialSealUse/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealUse/Index.cshtml View File

@@ -36,7 +36,7 @@
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
<a id="lr_examine" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;审核通过</a>
<a id="lr_noexamine" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;审核未通过</a>
@*<a id="lr_noexamine" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;审核未通过</a>*@
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>


+ 24
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealUse/Index.js View File

@@ -72,14 +72,25 @@ var bootstrap = function ($, learun) {
// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
//if (keyValue.indexOf(',')) {
// return learun.alert.warning('');
//}

if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/OfficialSealUse/UpdateStatus', { keyValue: keyValue, Status: 0 }, function () {
learun.postForm(top.$.rootUrl + '/CustomFunction/OfficialSealUse/UpdateStatus', { keyValue: keyValue, Status: 1 }, function () {
refreshGirdData();
});
}
});
}
});
// 审核
$('#lr_examine').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');

if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/CustomFunction/OfficialSealUse/UpdateStatus', { keyValue: keyValue, Status: 2 }, function () {
refreshGirdData();
});
}
@@ -93,7 +104,7 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/OfficialSealUse/GetPageList',
headData: [
{ label: "申请理由", name: "ApplyReason", width: 200, align: "left" },
@@ -110,14 +121,14 @@ var bootstrap = function ($, learun) {
}
},
{
label: "公章", name: "SealId", width: 100, align: "left",
label: "公章名称", name: "SealId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'OfficialSealData',
key: value,
keyId: 'stuid',
keyId: 'id',
callback: function (_data) {
callback(_data['stucode']);
callback(_data['name']);
}
});
}
@@ -133,7 +144,7 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "申请时间", name: "ApplyTime", width: 100, align: "left" },
{ label: "申请时间", name: "ApplyTime", width: 150, align: "left" },
{
label: "状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue, row) {
@@ -142,9 +153,9 @@ var bootstrap = function ($, learun) {
} else if (cellvalue == 1) {
return "<span class=\"label label-success\">审批中</span>";
} else if (cellvalue == 2) {
return "<span class=\"label label-danger\">已完成</span>";
return "<span class=\"label label-warning\">已通过</span>";
} else if (cellvalue == 99) {
return "<span class=\"label label-warning\">已拒绝</span>";
return "<span class=\"label label-danger\">已拒绝</span>";
}
}
},


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

@@ -821,6 +821,7 @@
<Compile Include="Areas\LogisticsManagement\Controllers\pxzhusuguanliController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\OfficialSealController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\OfficialSealUseController.cs" />
<Compile Include="Areas\CustomFunction\Controllers\OfficialSealRecordController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6436,6 +6437,10 @@
<Content Include="Areas\CustomFunction\Views\OfficialSealUse\Index.js" />
<Content Include="Areas\CustomFunction\Views\OfficialSealUse\Form.cshtml" />
<Content Include="Areas\CustomFunction\Views\OfficialSealUse\Form.js" />
<Content Include="Areas\CustomFunction\Views\OfficialSealRecord\Index.cshtml" />
<Content Include="Areas\CustomFunction\Views\OfficialSealRecord\Index.js" />
<Content Include="Areas\CustomFunction\Views\OfficialSealRecord\Form.cshtml" />
<Content Include="Areas\CustomFunction\Views\OfficialSealRecord\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/OfficialSealRecordMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.CustomFunction;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-10 11:54
/// 描 述:系统日志
/// </summary>
public class OfficialSealRecordMap : EntityTypeConfiguration<OfficialSealRecordEntity>
{
public OfficialSealRecordMap()
{
#region 表、主键
//表
this.ToTable("OFFICIALSEALRECORD");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


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

@@ -570,6 +570,7 @@
<Compile Include="LogisticsManagement\pxzhusuguanliMap.cs" />
<Compile Include="CustomFunction\OfficialSealMap.cs" />
<Compile Include="CustomFunction\OfficialSealUseMap.cs" />
<Compile Include="CustomFunction\OfficialSealRecordMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealBLL.cs View File

@@ -94,6 +94,28 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}

/// <summary>
///
/// </summary>
/// <param name="keyValue">主键</param>
public void UpdateStatus(string keyValue, string Status)
{
try
{
officialSealService.UpdateStatus(keyValue, Status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealIBLL.cs View File

@@ -42,6 +42,12 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, OfficialSealEntity entity);
/// <summary>
///
/// </summary>
/// <param name="keyValue"></param>
/// <param name="Status"></param>
void UpdateStatus(string keyValue, string Status);
#endregion

}


+ 27
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealService.cs View File

@@ -46,7 +46,7 @@ t.Status
var dp = new DynamicParameters(new { });
if (!queryParam["Type"].IsEmpty())
{
dp.Add("Type",queryParam["Type"].ToString(), DbType.String);
dp.Add("Type", queryParam["Type"].ToString(), DbType.String);
strSql.Append(" AND t.Type = @Type ");
}
if (!queryParam["Name"].IsEmpty())
@@ -54,7 +54,7 @@ t.Status
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
return this.BaseRepository("CollegeMIS").FindList<OfficialSealEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<OfficialSealEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -105,7 +105,7 @@ t.Status
{
try
{
this.BaseRepository("CollegeMIS").Delete<OfficialSealEntity>(t=>t.Id == keyValue);
this.BaseRepository("CollegeMIS").Delete<OfficialSealEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
@@ -120,6 +120,30 @@ t.Status
}
}


/// <summary>
///
/// </summary>
/// <param name="keyValue">主键</param>
public void UpdateStatus(string keyValue, string Status)
{
try
{
string sql = $"update OfficialSeal set [status]='{Status}' where Id='{keyValue}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordBLL.cs View File

@@ -0,0 +1,125 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-10 11:54
/// 描 述:系统日志
/// </summary>
public class OfficialSealRecordBLL : OfficialSealRecordIBLL
{
private OfficialSealRecordService officialSealRecordService = new OfficialSealRecordService();

#region 获取数据

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

/// <summary>
/// 获取OfficialSealRecord表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public OfficialSealRecordEntity GetOfficialSealRecordEntity(string keyValue)
{
try
{
return officialSealRecordService.GetOfficialSealRecordEntity(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
{
officialSealRecordService.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, OfficialSealRecordEntity entity)
{
try
{
officialSealRecordService.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/CustomFunction/OfficialSealRecord/OfficialSealRecordEntity.cs View File

@@ -0,0 +1,75 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-10 11:54
/// 描 述:系统日志
/// </summary>
public class OfficialSealRecordEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 公章Id
/// </summary>
[Column("SEALID")]
public string SealId { get; set; }
/// <summary>
/// SealType
/// </summary>
[Column("SEALTYPE")]
public string SealType { get; set; }
/// <summary>
/// 状态
/// </summary>
[Column("STATUS")]
public int Status { get; set; }
/// <summary>
/// ApplyUserId
/// </summary>
[Column("APPLYUSERID")]
public string ApplyUserId { get; set; }
/// <summary>
/// ApplyUserName
/// </summary>
[Column("APPLYUSERNAME")]
public string ApplyUserName { get; set; }
/// <summary>
/// ApplyTime
/// </summary>
[Column("APPLYTIME")]
public DateTime? ApplyTime { 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
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordIBLL.cs View File

@@ -0,0 +1,48 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-10 11:54
/// 描 述:系统日志
/// </summary>
public interface OfficialSealRecordIBLL
{
#region 获取数据

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

}
}

+ 151
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordService.cs View File

@@ -0,0 +1,151 @@
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.CustomFunction
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-10 11:54
/// 描 述:系统日志
/// </summary>
public class OfficialSealRecordService : RepositoryFactory
{
#region 获取数据

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

/// <summary>
/// 获取OfficialSealRecord表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public OfficialSealRecordEntity GetOfficialSealRecordEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<OfficialSealRecordEntity>(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<OfficialSealRecordEntity>(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, OfficialSealRecordEntity 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

}
}

+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseBLL.cs View File

@@ -94,6 +94,28 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}

/// <summary>
///
/// </summary>
/// <param name="keyValue">主键</param>
public void UpdateStatus(string keyValue, int Status)
{
try
{
officialSealUseService.UpdateStatus(keyValue, Status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseIBLL.cs View File

@@ -37,6 +37,12 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
///
/// </summary>
/// <param name="keyValue"></param>
/// <param name="Status"></param>
void UpdateStatus(string keyValue, int Status);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>


+ 46
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseService.cs View File

@@ -37,7 +37,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
t.Type,
t.SealId,
t.ApplyUserId,
t.ApplyTime
t.ApplyTime,t.Status
");
strSql.Append(" FROM OfficialSealUse t ");
strSql.Append(" WHERE 1=1 ");
@@ -46,20 +46,20 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
var dp = new DynamicParameters(new { });
if (!queryParam["Type"].IsEmpty())
{
dp.Add("Type",queryParam["Type"].ToString(), DbType.String);
dp.Add("Type", queryParam["Type"].ToString(), DbType.String);
strSql.Append(" AND t.Type = @Type ");
}
if (!queryParam["SealId"].IsEmpty())
{
dp.Add("SealId",queryParam["SealId"].ToString(), DbType.String);
dp.Add("SealId", queryParam["SealId"].ToString(), DbType.String);
strSql.Append(" AND t.SealId = @SealId ");
}
if (!queryParam["ApplyUserId"].IsEmpty())
{
dp.Add("ApplyUserId",queryParam["ApplyUserId"].ToString(), DbType.String);
dp.Add("ApplyUserId", queryParam["ApplyUserId"].ToString(), DbType.String);
strSql.Append(" AND t.ApplyUserId = @ApplyUserId ");
}
return this.BaseRepository("CollegeMIS").FindList<OfficialSealUseEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<OfficialSealUseEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -110,7 +110,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
{
try
{
this.BaseRepository("CollegeMIS").Delete<OfficialSealUseEntity>(t=>t.Id == keyValue);
this.BaseRepository("CollegeMIS").Delete<OfficialSealUseEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
@@ -125,6 +125,46 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}


/// <summary>
///
/// </summary>
/// <param name="keyValue">主键</param>
public void UpdateStatus(string keyValue, int Status)
{
try
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
OfficialSealUseEntity entity = GetOfficialSealUseEntity(keyValue);
entity.Status = Status;
db.Update(entity);
if (Status == 2)
{
OfficialSealRecordEntity RecordEntity = new OfficialSealRecordEntity();
RecordEntity.Create();
RecordEntity.SealId = entity.SealId;
RecordEntity.SealType = entity.Type;
RecordEntity.Status = 1;
RecordEntity.ApplyUserId = entity.ApplyUserId;
RecordEntity.ApplyUserName = entity.ApplyUserName;
RecordEntity.ApplyTime = DateTime.Now;
db.Insert(RecordEntity);
}

db.Commit();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj View File

@@ -1698,6 +1698,10 @@
<Compile Include="CustomFunction\OfficialSealUse\OfficialSealUseService.cs" />
<Compile Include="CustomFunction\OfficialSealUse\OfficialSealUseBLL.cs" />
<Compile Include="CustomFunction\OfficialSealUse\OfficialSealUseIBLL.cs" />
<Compile Include="CustomFunction\OfficialSealRecord\OfficialSealRecordEntity.cs" />
<Compile Include="CustomFunction\OfficialSealRecord\OfficialSealRecordService.cs" />
<Compile Include="CustomFunction\OfficialSealRecord\OfficialSealRecordBLL.cs" />
<Compile Include="CustomFunction\OfficialSealRecord\OfficialSealRecordIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Loading…
Cancel
Save