diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs index eadb7a07e..44857d1db 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs @@ -249,6 +249,13 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers /// public ActionResult SignForm() { + ViewBag.IsHaveStampRight = false; + var loginUserInfo = LoginUserInfo.Get(); + if (loginUserInfo.Description.Contains("管理员") || loginUserInfo.roleIds.Split(',').Contains(Config.GetValue("StampRightRoleId"))) + { + ViewBag.IsHaveStampRight = true; + } + return View(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs index 6adad10d0..e89691a1e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs @@ -47,6 +47,31 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers { return View(); } + + /// + /// 管理页面【个人印章】 + /// + /// + public ActionResult IndexInPersonal() + { + return View("~/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.cshtml"); + } + /// + /// 表单页面【个人印章】 + /// + /// + public ActionResult FormInPersonal() + { + return View("~/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.cshtml"); + } + /// + /// 流程审批-个人印章【个人印章】 + /// + /// + public ActionResult StampDetailIndexInPersonal() + { + return View("~/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.cshtml"); + } #endregion #region 获取数据 @@ -80,9 +105,9 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers /// [HttpGet] [AjaxOnly] - public ActionResult GetList(string keyword) + public ActionResult GetList(string keyword, string userId, string category) { - var data = lr_StampManageIBLL.GetList(keyword); + var data = lr_StampManageIBLL.GetList(keyword,userId,category); return Success(data); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampPersonalController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampPersonalController.cs deleted file mode 100644 index de94a7a10..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampPersonalController.cs +++ /dev/null @@ -1,212 +0,0 @@ -using Learun.Application.Base.SystemModule; -using Learun.Application.OA.StampPersonal; -using Learun.Util; -using System; -using System.IO; -using System.Web; -using System.Web.Mvc; - -namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers -{ - /// - /// 版 本 Learun-ADMS V6.1.6.0 力软敏捷开发框架 - /// Copyright (c) 2013-2017 上海力软信息技术有限公司 - /// 创建人:力软-框架开发组(王飞) - /// 日 期:2022.12.05 - /// 描 述:个人印章管理 - /// - public class StampPersonalController : MvcControllerBase - { - private StampPersonalIBLL stampPersonalIBLL = new StampPersonalBLL(); - private ImgIBLL imgIBLL = new ImgBLL(); - - #region 视图功能 - /// - /// 管理页面 - /// - /// - public ActionResult Index() - { - return View(); - } - /// - /// 表单页面 - /// - /// - public ActionResult Form() - { - return View(); - } - - public ActionResult StampDetailIndex() - { - return View(); - } - - public ActionResult EqualForm() - { - return View(); - } - #endregion - - #region 获取数据 - /// - /// 分页 - /// - /// 分页参数 - /// - /// - [HttpGet] - [AjaxOnly] - public ActionResult GetPageList(string pagination, string queryJson) - { - Pagination paginationobj = pagination.ToObject(); - var data = stampPersonalIBLL.GetPageList(paginationobj, queryJson); - var jsonData = new - { - rows = data, - total = paginationobj.total, - page = paginationobj.page, - records = paginationobj.records - }; - return Success(jsonData); - } - - /// - /// 获取所有的印章信息 - /// - /// - /// - /// - [HttpGet] - [AjaxOnly] - public ActionResult GetList(string keyword, string userId) - { - var data = stampPersonalIBLL.GetList(keyword, userId); - return Success(data); - } - - /// - /// 获取图片 - /// - /// - /// - [HttpGet] - public ActionResult GetImg(string keyValue) - { - stampPersonalIBLL.GetImg(keyValue); - return Success("获取成功!"); - } - - #endregion - - #region 提交数据 - /// - /// 保存印章 - /// - /// 主键 - /// 实体 - /// - [HttpPost] - [ValidateAntiForgeryToken] - [AjaxOnly] - public ActionResult SaveForm(string keyValue, StampPersonalEntity entity) - { - stampPersonalIBLL.SaveEntity(keyValue, entity); - return Success("保存成功。"); - - } - /// - /// 删除印章 - /// - /// 主键 - /// - [HttpPost] - [AjaxOnly] - public ActionResult DeleteForm(string keyValue) - { - stampPersonalIBLL.DeleteEntity(keyValue); - return Success("删除成功!"); - } - #endregion - - #region 扩展方法 - /// - /// 图片上传 - /// - /// 主键 - /// 印章实体 - /// - [HttpPost] - public ActionResult UploadFile(string keyValue, StampPersonalEntity entity) - { - HttpFileCollection files = System.Web.HttpContext.Current.Request.Files; - - if (files[0].ContentLength == 0 || string.IsNullOrEmpty(files[0].FileName)) - { - stampPersonalIBLL.SaveEntity(keyValue, entity); - } - else - { - string FileEextension = Path.GetExtension(files[0].FileName); - ImgEntity imgEntity = null; - if (string.IsNullOrEmpty(entity.F_ImgFile)) - { - imgEntity = new ImgEntity(); - } - else - { - imgEntity = imgIBLL.GetEntity(entity.F_ImgFile); - } - - imgEntity.F_Name = files[0].FileName; - imgEntity.F_ExName = FileEextension; - byte[] bytes = new byte[files[0].InputStream.Length]; - files[0].InputStream.Read(bytes, 0, bytes.Length); - - imgEntity.F_Content = Convert.ToBase64String(bytes); - imgIBLL.SaveEntity(entity.F_ImgFile, imgEntity); - - entity.F_ImgFile = imgEntity.F_Id; - stampPersonalIBLL.SaveEntity(keyValue, entity); - } - return Success("保存成功。"); - } - - /// - /// 启用/停用 - /// - /// 主键 - /// 状态 1启用 0禁用 - /// - [HttpPost] - [AjaxOnly] - public ActionResult UpDateSate(string keyValue, int state) - { - stampPersonalIBLL.UpdateState(keyValue, state); - return Success((state == 1 ? "启用" : "禁用") + "成功!"); - } - /// - /// 密码验证 - /// - /// 主键 - /// 密码 - /// - [HttpPost] - [AjaxOnly] - public ActionResult EqualForm(string keyValue, string Password) - { - var result = stampPersonalIBLL.EqualPassword(keyValue, Password); - if (result) - { - return Success("密码验证成功!"); - } - else - { - return Fail("密码不正确!"); - } - - } - #endregion - } -} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml index 3aeb76732..cd5570622 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml @@ -4,18 +4,30 @@ }
-
+
- @Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js") + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js index 2744f40dd..037cdc685 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js @@ -22,6 +22,7 @@ var bootstrap = function ($, learun) { $('#stamp').hide(); stampUrl = ''; }); + //学校公章 $('#btn_stamp').on('click', function () { learun.layerForm({ id: 'StampDetailIndex', @@ -39,6 +40,24 @@ var bootstrap = function ($, learun) { } }); }); + //个人印章 + $('#btn_stampPersonal').on('click', function () { + learun.layerForm({ + id: 'StampDetailIndexInPersonal', + title: '印章列表', + url: top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/StampDetailIndexInPersonal', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(function (imgutl) { + $('#stamp').find('img').attr('src', top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetImg?keyValue=' + imgutl); + $('#stamp').show(); + stampUrl = imgutl; + console.log(stampUrl); + }); + } + }); + }); $('#btn_finish').on('click', function () { var datapair = $sigdiv.jSignature("getData"); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js index 4521e022a..cd75f1022 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js @@ -54,6 +54,8 @@ var bootstrap = function ($, learun) { return false; } + postData.F_Category = 1; + var f = document.getElementById('uploadFile').files[0]; //是否上传图片 if (!!f) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js index 4b278fec3..9dc067685 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js @@ -198,6 +198,7 @@ var bootstrap = function ($, learun) { param = param || {}; param.F_StampType = F_StampType; param.F_EnabledMark = F_EnabledMark; + param.F_Category = 1; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js index c4bac52f0..f450c9d91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js @@ -38,14 +38,14 @@ var bootstrap = function ($, learun) { }); }, initData: function () { - $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + '', function (data) { + $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + '' +'&category=1', function (data) { $('.lr-layout-wrap').lrSetFormData(data.data); $('#datagird').jfGridSet('refreshdata', data); }); }, search: function (param) { param = param || {}; - $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + keyword, function (data) { + $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + keyword+'&category=1', function (data) { $('.lr-layout-wrap').lrSetFormData(data.data); $('#datagird').jfGridSet('refreshdata', data); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.cshtml deleted file mode 100644 index 1bc27f66b..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.cshtml +++ /dev/null @@ -1,11 +0,0 @@ -@{ - ViewBag.Title = "印章密码"; - Layout = "~/Views/Shared/_Form.cshtml"; -} -
-
-
密码*
- -
-
-@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.js deleted file mode 100644 index b2ef39635..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.js +++ /dev/null @@ -1,35 +0,0 @@ -/* * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) - * Copyright (c) 2013-2018 上海力软信息技术有限公司 - * 创建人:超级管理员 - * 日 期:2022-12-05 - * 描 述:密码验证 - */ -var acceptClick; -var keyValue = request('keyValue'); -var bootstrap = function ($, learun) { - "use strict"; - var selectedRow = learun.frameTab.currentIframe().selectedRow; - var page = { - init: function () { - page.bind(); - }, - bind: function () { - - } - }; - // 保存数据 - acceptClick = function (callBack) { - if (!$('#form').lrValidform()) { - return false; - } - var postData = $('#form').lrGetFormData(); - var F_Password = $.md5(postData.F_Password); - learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/EqualForm', { keyValue: keyValue, Password: F_Password }, function (res) { - // 正确之后才回调 - if (!!callBack) { - callBack(); - } - }); - }; - page.init(); -} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js index 1a990d61d..79e01085c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js @@ -27,7 +27,7 @@ var bootstrap = function ($, learun) { $('#F_StampType').lrDataItemSelect({ code: 'StampType' }); //图片显示 $('#uploadFile').on('change', uploadImg); - $('.fileEx').prepend(''); + $('.fileEx').prepend(''); }, initData: function () { if (!!selectedRow) { @@ -54,13 +54,15 @@ var bootstrap = function ($, learun) { return false; } + postData.F_Category = 2; + var f = document.getElementById('uploadFile').files[0]; //是否上传图片 if (!!f) { learun.loading(true, '正在保存...'); $.ajaxFileUpload({ data: postData, - url: top.$.rootUrl + "/LR_NewWorkFlow/StampPersonal/UploadFile?keyValue=" + keyValue, + url: top.$.rootUrl + "/LR_NewWorkFlow/StampInfo/UploadFile?keyValue=" + keyValue, secureuri: false, fileElementId: 'uploadFile', dataType: 'json', @@ -74,7 +76,7 @@ var bootstrap = function ($, learun) { }); } else { - $.lrSaveForm(top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/SaveForm?keyValue=' + keyValue, postData, function (res) { + $.lrSaveForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 if (!!callBack) { callBack(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js index 7691a7388..cc22a7e98 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js @@ -59,7 +59,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'form', title: '添加印章', - url: top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/Form', + url: top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/FormInPersonal', width: 700, height: 500, callBack: function (id) { @@ -75,7 +75,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'Form', title: '编辑印章', - url: top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/Form?keyValue=' + keyValue, + url: top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/FormInPersonal?keyValue=' + keyValue, width: 750, height: 500, callBack: function (id) { @@ -90,7 +90,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/DeleteForm', { keyValue: keyValue }, function () { + learun.deleteForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } @@ -105,7 +105,7 @@ var bootstrap = function ($, learun) { if (enabledMark != 1) { learun.layerConfirm('是否确认启用该项!', function (res) { if (res) { - learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/UpDateSate', { keyValue: keyValue, state: 1 }, function () { + learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/UpDateSate', { keyValue: keyValue, state: 1 }, function () { refreshGirdData(); }); } @@ -125,7 +125,7 @@ var bootstrap = function ($, learun) { if (enabledMark == 1) { learun.layerConfirm('是否确认禁用该项!', function (res) { if (res) { - learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/UpDateSate', { keyValue: keyValue, state: 0 }, function () { + learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/UpDateSate', { keyValue: keyValue, state: 0 }, function () { refreshGirdData(); }); } @@ -155,7 +155,7 @@ var bootstrap = function ($, learun) { }, initGrid: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/GetPageList', + url: top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetPageList', headData: [ { label: '印章名称', name: 'F_StampName', width: 150, align: "center" }, { @@ -173,7 +173,7 @@ var bootstrap = function ($, learun) { { label: '图片', name: 'F_ImgFile', width: 110, align: "center", formatter: function (value, row, op, $cell) { - return ''; + return ''; } }, { @@ -198,6 +198,7 @@ var bootstrap = function ($, learun) { param = param || {}; param.F_StampType = F_StampType; param.F_EnabledMark = F_EnabledMark; + param.F_Category = 2; param.F_CreateUserId = learun.clientdata.get(['userinfo']).userId; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js index b1ecde79f..4097f4849 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js @@ -24,7 +24,7 @@ var bootstrap = function ($, learun) { { label: '印章', name: 'F_ImgFile', width: 110, align: "left", formatter: function (value, row, op, $cell) { - return ''; + return ''; } } ], @@ -38,14 +38,14 @@ var bootstrap = function ($, learun) { }); }, initData: function () { - $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/GetList?keyword=' + '' + '&userId=' + learun.clientdata.get(['userinfo']).userId, function (data) { + $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + '' + '&category=2&userId=' + learun.clientdata.get(['userinfo']).userId, function (data) { $('.lr-layout-wrap').lrSetFormData(data.data); $('#datagird').jfGridSet('refreshdata', data); }); }, search: function (param) { param = param || {}; - $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/GetList?keyword=' + keyword + '&userId=' + learun.clientdata.get(['userinfo']).userId, function (data) { + $.lrSetForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetList?keyword=' + keyword + '&category=2&userId=' + learun.clientdata.get(['userinfo']).userId, function (data) { $('.lr-layout-wrap').lrSetFormData(data.data); $('#datagird').jfGridSet('refreshdata', data); @@ -63,7 +63,7 @@ var bootstrap = function ($, learun) { learun.alert.error("请选择印章!"); return false; } - learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/EqualForm', { keyValue: keyValue, Password: F_Password }, function (res) { + learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/EqualForm', { keyValue: keyValue, Password: F_Password }, function (res) { callBack(keyValue); }); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index adeac834e..f4e9eabdd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -453,7 +453,6 @@ - @@ -1723,7 +1722,6 @@ - @@ -8009,7 +8007,6 @@ - diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index 7044f579f..954157655 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -178,6 +178,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index d1a2ad1e5..fc948d8cb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -190,6 +190,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs index 94509397a..0ac882b97 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs @@ -299,8 +299,8 @@ namespace Learun.Application.WebApi.Modules { formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); } - //TODO:移动端传参signUrl??? - nWFProcessIBLL.AuditFlow(parameter.operationCode, parameter.operationName, parameter.processId, parameter.taskId, parameter.des, parameter.auditors, "", parameter.signUrl, userInfo); + //移动端传参signUrl,stamp, + nWFProcessIBLL.AuditFlow(parameter.operationCode, parameter.operationName, parameter.processId, parameter.taskId, parameter.des, parameter.auditors, parameter.stamp, parameter.signUrl, userInfo); return Success("审批成功"); } @@ -481,7 +481,9 @@ namespace Learun.Application.WebApi.Modules /// 签字图片信息 /// public string signUrl { get; set; } - + /// + /// 签章信息 + /// public string stamp { get; set; } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StampPersonalApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StampPersonalApi.cs new file mode 100644 index 000000000..b4077e3a2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StampPersonalApi.cs @@ -0,0 +1,108 @@ +using Learun.Application.AppMagager; +using Learun.Util; +using Nancy; +using System.Collections.Generic; +using System.Linq; +using Learun.Application.Base.SystemModule; +using Learun.Application.TwoDevelopment.LR_Desktop; +using System.Text; +using System.Data; +using Learun.Application.WorkFlow; +using Learun.Application.OA.LR_StampManage; + +namespace Learun.Application.WebApi.Modules +{ + + public class StampPersonalApi : BaseApi + { + + public StampPersonalApi() + : base("/learun/adms/StampPersonal") + { + Get["/list"] = GetList; + Get["/schoollist"] = GetSchoolList; + Get["/img"] = GetImg; + Post["/equalPassword"] = EqualPassword; + Get["/ishaveright"] = IsHaveStampRight; + } + private LR_StampManageIBLL lr_StampManageIBLL = new LR_StampManageBLL(); + + /// + /// 个人签章 + /// + /// + /// + public Response GetList(dynamic _) + { + SPParam param = this.GetReqData(); + var data = lr_StampManageIBLL.GetList(param.keyword, userInfo.userId, "2"); + return Success(data); + } + /// + /// 学校签章 + /// + /// + /// + public Response GetSchoolList(dynamic _) + { + SPParam param = this.GetReqData(); + var data = lr_StampManageIBLL.GetList(param.keyword, null, "1"); + return Success(data); + } + /// + /// 获取签章图片 + /// + /// + /// + public Response GetImg(dynamic _) + { + string param = this.GetReqData(); + lr_StampManageIBLL.GetImg(param); + return Success(""); + } + /// + /// 验证签章密码 + /// + /// + /// + public Response EqualPassword(dynamic _) + { + var msg = ""; + SPParam param = this.GetReqData(); + var data = lr_StampManageIBLL.EqualPassword(param.F_StampId, param.F_Password); + if (data) + { + msg = "密码验证成功!"; + } + else + { + msg = "密码不正确!"; + } + return Success(new { result = data, msg = msg }); + } + /// + /// 判断登录用户是否有“学校签章”的使用权限 + /// + /// + /// + public Response IsHaveStampRight(dynamic _) + { + var result = false; + if (userInfo.Description.Contains("管理员") || userInfo.roleIds.Split(',').Contains(Config.GetValue("StampRightRoleId"))) + { + result = true; + } + + return Success(new { result = result }); + } + + } + + public class SPParam + { + public string keyword { get; set; } + public string F_StampId { get; set; } + public string F_Password { get; set; } + } + +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config index 6958bd859..170d37aac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config @@ -107,5 +107,7 @@ + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_OA/StampPersonalMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_OA/StampPersonalMap.cs deleted file mode 100644 index 281142ca3..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_OA/StampPersonalMap.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Learun.Application.OA.StampPersonal; -using System.Data.Entity.ModelConfiguration; - -namespace Learun.Application.Mapping -{/// - /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架 - /// Copyright (c) 2013-2018 上海力软信息技术有限公司 - /// 创 建:超级管理员 - /// 日 期:2022-12-05 09:57 - /// 描 述:个人印章管理 - /// - public class StampPersonalMap : EntityTypeConfiguration - { - public StampPersonalMap() - { - #region 表、主键 - //表 - this.ToTable("LR_BASE_STAMPPERSONAL"); - //主键 - this.HasKey(s =>s.F_StampId); - #endregion - - #region 配置关系 - #endregion - } - } -} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index c9ea30f28..6bc5afd74 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -196,7 +196,6 @@ - diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs index 9ff55ad46..1639e2311 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs @@ -26,11 +26,11 @@ namespace Learun.Application.OA.LR_StampManage /// /// 查询的关键字 /// - public IEnumerable GetList(string keyWord) + public IEnumerable GetList(string keyWord, string userId, string category) { try { - return lr_StampManageService.GetList(keyWord); + return lr_StampManageService.GetList(keyWord,userId,category); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs index f9a1d9a48..386adc137 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs @@ -55,6 +55,21 @@ namespace Learun.Application.OA.LR_StampManage /// [Column("F_ENABLEDMARK")] public int? F_EnabledMark { get; set; } + /// + /// 创建人 + /// + [Column("F_CREATEUSERID")] + public string F_CreateUserId { get; set; } + /// + /// 时间 + /// + [Column("F_CREATETIME")] + public DateTime? F_CreateTime { get; set; } + /// + /// 印章分类:1学校公章2个人印章 + /// + [Column("F_CATEGORY")] + public int? F_Category { get; set; } #region 扩展方法 @@ -65,7 +80,9 @@ namespace Learun.Application.OA.LR_StampManage public void Modify(string keyValue) { this.F_StampId = keyValue; - + this.F_CreateUserId = LoginUserInfo.Get().userId; //创建人 + this.F_CreateTime = DateTime.Now; + } /// /// 新增调用 @@ -74,6 +91,8 @@ namespace Learun.Application.OA.LR_StampManage { this.F_StampId = Guid.NewGuid().ToString(); //产生印章编号 this.F_EnabledMark = 1;//默认状态为启用 + this.F_CreateUserId = LoginUserInfo.Get().userId; //创建人 + this.F_CreateTime = DateTime.Now; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs index 289b67b4c..d5a7b6286 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs @@ -18,7 +18,7 @@ namespace Learun.Application.OA.LR_StampManage /// /// /// - IEnumerable GetList(string keyWord); + IEnumerable GetList(string keyWord, string userId, string category); /// /// 获取列表分页数据 /// 分页参数 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs index 1a5e3ab06..5d72271d3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs @@ -23,13 +23,7 @@ namespace Learun.Application.OA.LR_StampManage { //sql字段 fieldSql = @" - F_StampId, - F_StampName, - F_Description, - F_StampType, - F_ImgFile, - F_Sort, - F_EnabledMark + * "; } #endregion @@ -40,7 +34,7 @@ namespace Learun.Application.OA.LR_StampManage /// /// 名称/状态 /// - public IEnumerable GetList(string keyWord) + public IEnumerable GetList(string keyWord, string userId,string category) { try { @@ -52,6 +46,14 @@ namespace Learun.Application.OA.LR_StampManage if (!string.IsNullOrEmpty(keyWord)) {// cbb 如果没有查询条件则不需要输入 Sql.AppendFormat(" and s.F_StampName LIKE '%{0}%'", keyWord); } + if (!string.IsNullOrEmpty(userId)) + { + Sql.AppendFormat(" and s.F_CreateUserId = '{0}'", userId); + } + if (!string.IsNullOrEmpty(category)) + { + Sql.AppendFormat(" and s.F_Category = {0}", Convert.ToInt32(category)); + } Sql.Append(" Order by F_Sort"); @@ -102,6 +104,16 @@ namespace Learun.Application.OA.LR_StampManage dp.Add("F_StampType", queryParam["F_StampType"].ToString(), DbType.String); strSql.Append(" AND s.F_StampType = @F_StampType"); } + if (!queryParam["F_CreateUserId"].IsEmpty()) + { + dp.Add("F_CreateUserId", queryParam["F_CreateUserId"].ToString(), DbType.String); + strSql.Append(" AND s.F_CreateUserId = @F_CreateUserId"); + } + if (!queryParam["F_Category"].IsEmpty()) + { + dp.Add("F_Category", queryParam["F_Category"].ToString(), DbType.String); + strSql.Append(" AND s.F_Category = @F_Category"); + } } return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj index 23fe4ebd6..728c69d8d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj @@ -140,10 +140,6 @@ - - - - diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalBLL.cs deleted file mode 100644 index 4ea176c66..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalBLL.cs +++ /dev/null @@ -1,217 +0,0 @@ -using Learun.Application.Base.SystemModule; -using Learun.Util; -using System; -using System.Collections.Generic; -using System.Linq; - - - -namespace Learun.Application.OA.StampPersonal -{ - /// - /// 版 本 Learun-ADMS V6.1.6.0 力软敏捷开发框架 - /// Copyright (c) 2013-2017 上海力软信息技术有限公司 - /// 创建人:力软-框架开发组(王飞) - /// 日 期:2022.12.05 - /// 描 述:个人印章管理 - /// - public class StampPersonalBLL : StampPersonalIBLL - { - private StampPersonalService stampPersonalService = new StampPersonalService(); - private ImgIBLL imgIBLL = new ImgBLL(); - #region 获取数据 - - /// - /// 获取所有的印章信息/模糊查询(根据名称/状态(启用或者停用)) - /// - /// 查询的关键字 - /// - public IEnumerable GetList(string keyWord, string userId) - { - try - { - return stampPersonalService.GetList(keyWord, userId); - - } - catch (Exception ex) - { - - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - } - - /// - /// 获取列表分页数据 - /// 分页参数 - /// - /// - public IEnumerable GetPageList(Pagination pagination, string queryJson) - { - try - { - - return stampPersonalService.GetPageList(pagination, queryJson); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - } - - /// - /// 获取实体 - /// - /// 主键 - /// - public StampPersonalEntity GetEntity(string keyValue) - { - try - { - return stampPersonalService.GetEntity(keyValue); - } - catch (Exception ex) - { - - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - - } - #endregion - - #region 提交数据 - /// - /// 保存印章信息(新增/编辑) - /// - /// - /// - public void SaveEntity(string keyValue, StampPersonalEntity entity) - { - try - { - stampPersonalService.SaveEntity(keyValue, entity); - } - catch (Exception ex) - { - - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - } - - /// - /// 删除印章信息 - /// - /// - public void DeleteEntity(string keyVlaue) - { - try - { - stampPersonalService.DeleteEntity(keyVlaue); - } - catch (Exception ex) - { - - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - } - #endregion - - #region 扩展方法 - /// - /// 获取图片 - /// - /// 主键 - public void GetImg(string keyValue) - { - //首先获取实体 - StampPersonalEntity entity = GetEntity(keyValue); - string img = ""; - //实体是否存在 - if (entity != null && !string.IsNullOrEmpty(entity.F_ImgFile)) - { - ImgEntity imgEntity = imgIBLL.GetEntity(entity.F_ImgFile); - - if (imgEntity != null && !string.IsNullOrEmpty(imgEntity.F_Content)) - { - FileDownHelper.DownLoadBase64(imgEntity.F_Content, imgEntity.F_Name); - return; - } - } - else - { - img = "/Content/images/add.jpg"; - } - if (string.IsNullOrEmpty(img)) - { - img = "/Content/images/add.jpg"; - } - FileDownHelper.DownLoad(img); - } - - /// - /// 更新数据状态 - /// - /// 主键 - /// 状态 1启用 0禁用 - public void UpdateState(string keyValue, int state) - { - StampPersonalEntity entity = new StampPersonalEntity(); - entity.F_EnabledMark = state; - SaveEntity(keyValue, entity); - } - - /// - /// 密码验证 - /// - /// 主键 - /// 密码 - /// - public bool EqualPassword(string keyValue, string password) - { - StampPersonalEntity entity = GetEntity(keyValue); - if (entity.F_Password.Equals(password))//加密后进行对比 - { - return true; - } - else - { - return false; - } - } - #endregion - } -} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalEntity.cs deleted file mode 100644 index b3c58a49d..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalEntity.cs +++ /dev/null @@ -1,94 +0,0 @@ -using Learun.Util; -using System; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Learun.Application.OA.StampPersonal -{ - public class StampPersonalEntity - { - - /// - /// 印章编号 - /// - [Column("F_STAMPID")] - public string F_StampId { get; set; } - - - /// - /// 印章名称 - /// - [Column("F_STAMPNAME")] - public string F_StampName { get; set; } - - /// - /// 印章备注 - /// - [Column("F_DESCRIPTION")] - public string F_Description { get; set; } - - /// - /// 印章分类 - /// - [Column("F_STAMPTYPE")] - public string F_StampType { get; set; } - - /// - /// 密码 - /// - [Column("F_PASSWORD")] - public string F_Password { get; set; } - - /// - /// 图片文件 - /// - [Column("F_IMGFILE")] - public string F_ImgFile { get; set; } - - /// - /// 排序 - /// - [Column("F_SORT")] - public string F_Sort { get; set; } - - /// - /// 印章状态 - /// - [Column("F_ENABLEDMARK")] - public int? F_EnabledMark { get; set; } - /// - /// 创建人 - /// - [Column("F_CREATEUSERID")] - public string F_CreateUserId { get; set; } - /// - /// 时间 - /// - [Column("F_CREATETIME")] - public DateTime? F_CreateTime { get; set; } - - #region 扩展方法 - - /// - /// 编辑调用 - /// - /// 主键 - public void Modify(string keyValue) - { - this.F_StampId = keyValue; - this.F_CreateUserId = LoginUserInfo.Get().userId; //创建人 - this.F_CreateTime = DateTime.Now; - } - /// - /// 新增调用 - /// - public void Create() - { - this.F_StampId = Guid.NewGuid().ToString(); //产生印章编号 - this.F_EnabledMark = 1;//默认状态为启用 - this.F_CreateUserId = LoginUserInfo.Get().userId; //创建人 - this.F_CreateTime = DateTime.Now; - } - #endregion - - } -} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalIBLL.cs deleted file mode 100644 index ac1aa31b0..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalIBLL.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Learun.Util; -using System.Collections.Generic; - -namespace Learun.Application.OA.StampPersonal -{ - /// - /// 版 本 Learun-ADMS V6.1.6.0 力软敏捷开发框架 - /// Copyright (c) 2013-2017 上海力软信息技术有限公司 - /// 创建人:力软-框架开发组(王飞) - /// 日 期:2022.12.05 - /// 描 述:个人印章管理 - /// - public interface StampPersonalIBLL - { - #region 获取数据 - /// - /// 模糊查询(根据名称/状态(启用或者停用)) - /// - /// - /// - IEnumerable GetList(string keyWord, string userId); - /// - /// 获取列表分页数据 - /// 分页参数 - /// - /// - IEnumerable GetPageList(Pagination pagination, string queryJson); - - /// - /// 获取印章树形数据 - /// - /// 父级节点 - /// - StampPersonalEntity GetEntity(string keyValue); - #endregion - - #region 提交数据 - - /// - /// 保存印章信息(新增/编辑) - /// - /// - /// - void SaveEntity(string keyValue, StampPersonalEntity stampEntity); - - /// - /// 删除印章信息 - /// - /// - void DeleteEntity(string keyVlaue); - - /// - /// 更新数据状态 - /// - /// 主键 - /// 状态 1启用 0禁用 - void UpdateState(string keyValue, int state); - #endregion - - #region 扩展方法 - /// - /// 获取图片 - /// - /// 主键 - void GetImg(string keyValue); - /// - /// 密码匹配 - /// - /// 主键 - /// 密码 - /// - bool EqualPassword(string keyValue, string Password); - #endregion - } -} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalService.cs deleted file mode 100644 index 93c8d75b7..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalService.cs +++ /dev/null @@ -1,214 +0,0 @@ -using Dapper; -using Learun.DataBase.Repository; -using Learun.Util; -using System; -using System.Collections.Generic; -using System.Data; -using System.Text; - -namespace Learun.Application.OA.StampPersonal -{ - /// - /// 版 本 Learun-ADMS V6.1.6.0 力软敏捷开发框架 - /// Copyright (c) 2013-2017 上海力软信息技术有限公司 - /// 创建人:力软-框架开发组(王飞) - /// 日 期:2022.12.05 - /// 描 述:个人印章管理 - /// - public class StampPersonalService : RepositoryFactory - { - #region 构造函数和属性 - private string fieldSql; - public StampPersonalService() - { - //sql字段 - fieldSql = @" - * - "; - } - #endregion - - #region 获取数据 - /// - /// 获取印章信息(根据名称/状态:启用或停用模糊查询) - /// - /// 名称/状态 - /// - public IEnumerable GetList(string keyWord, string userId) - { - try - { - StringBuilder Sql = new StringBuilder(); - Sql.Append("SELECT"); - Sql.Append(this.fieldSql); - Sql.Append("FROM LR_Base_StampPersonal s where 1=1 "); - Sql.Append("and s.F_EnabledMark =1 "); - if (!string.IsNullOrEmpty(keyWord)) - {// cbb 如果没有查询条件则不需要输入 - Sql.AppendFormat(" and s.F_StampName LIKE '%{0}%'", keyWord); - } - if (!string.IsNullOrEmpty(userId)) - { - Sql.AppendFormat(" and s.F_CreateUserId = '{0}'", userId); - } - - Sql.Append(" Order by F_Sort"); - - return this.BaseRepository().FindList(Sql.ToString()); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - } - } - - /// - /// 获取列表分页数据 - /// 分页参数 - /// - /// - public IEnumerable GetPageList(Pagination pagination, string queryJson) - { - try - { - var queryParam = queryJson.ToJObject(); - var dp = new DynamicParameters(new { }); - var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(fieldSql); - strSql.Append(" FROM LR_Base_StampPersonal s Where 1=1 "); - if (queryParam.HasValues) - { - if (!queryParam["F_StampName"].IsEmpty()) - { - dp.Add("F_StampName", "%" + queryParam["F_StampName"].ToString() + "%", DbType.String); - strSql.Append(" AND s.F_StampName like @F_StampName "); - } - if (!queryParam["F_EnabledMark"].IsEmpty()) - { - dp.Add("F_EnabledMark", queryParam["F_EnabledMark"].ToString(), DbType.String); - strSql.Append(" AND s.F_EnabledMark=@F_EnabledMark"); - } - if (!queryParam["F_StampType"].IsEmpty()) - { - dp.Add("F_StampType", queryParam["F_StampType"].ToString(), DbType.String); - strSql.Append(" AND s.F_StampType = @F_StampType"); - } - if (!queryParam["F_CreateUserId"].IsEmpty()) - { - dp.Add("F_CreateUserId", queryParam["F_CreateUserId"].ToString(), DbType.String); - strSql.Append(" AND s.F_CreateUserId = @F_CreateUserId"); - } - } - return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - } - } - - /// - /// 获取印章实体 - /// - /// 主键 - /// - public StampPersonalEntity GetEntity(string keyValue) - { - - try - { - return this.BaseRepository().FindEntity(keyValue); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - } - } - #endregion - - #region 提交数据 - - /// - /// 保存印章信息(新增/编辑) - /// - /// 主键 - /// 实体 - public void SaveEntity(string keyValue, StampPersonalEntity entity) - { - try - { - //如果keyValue值为空或者null,表示,当前的操作是添加,否则是修改 - if (string.IsNullOrEmpty(keyValue)) - { - entity.Create(); - this.BaseRepository().Insert(entity); - } - else - { - entity.Modify(keyValue); - this.BaseRepository().Update(entity); - } - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - - } - } - - /// - /// 删除印章信息 - /// - /// 主键 - public void DeleteEntity(string keyVlaue) - { - try - { - this.BaseRepository().Delete(s => s.F_StampId == keyVlaue);//删除操作 - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - - } - } - #endregion - } - -}