Kaynağa Gözat

【修改】个人签章管理;增加签章相关接口;

新疆警官学校中职
dyy 2 yıl önce
ebeveyn
işleme
059d623909
30 değiştirilmiş dosya ile 251 ekleme ve 929 silme
  1. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs
  2. +27
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs
  3. +0
    -212
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampPersonalController.cs
  4. +15
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml
  5. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js
  7. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js
  8. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js
  9. +0
    -11
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.cshtml
  10. +0
    -35
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.js
  11. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js
  12. +8
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js
  13. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js
  14. +0
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  15. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  16. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  17. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs
  18. +108
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StampPersonalApi.cs
  19. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
  20. +0
    -27
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_OA/StampPersonalMap.cs
  21. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  22. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs
  23. +20
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs
  24. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs
  25. +20
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs
  26. +0
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj
  27. +0
    -217
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalBLL.cs
  28. +0
    -94
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalEntity.cs
  29. +0
    -75
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalIBLL.cs
  30. +0
    -214
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalService.cs

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs Dosyayı Görüntüle

@@ -249,6 +249,13 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
/// <returns></returns>
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();
}



+ 27
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampInfoController.cs Dosyayı Görüntüle

@@ -47,6 +47,31 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
{
return View();
}

/// <summary>
/// 管理页面【个人印章】
/// </summary>
/// <returns></returns>
public ActionResult IndexInPersonal()
{
return View("~/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.cshtml");
}
/// <summary>
/// 表单页面【个人印章】
/// </summary>
/// <returns></returns>
public ActionResult FormInPersonal()
{
return View("~/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.cshtml");
}
/// <summary>
/// 流程审批-个人印章【个人印章】
/// </summary>
/// <returns></returns>
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
/// <returns></returns>
[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);
}



+ 0
- 212
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/StampPersonalController.cs Dosyayı Görüntüle

@@ -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
{
/// <summary>
/// 版 本 Learun-ADMS V6.1.6.0 力软敏捷开发框架
/// Copyright (c) 2013-2017 上海力软信息技术有限公司
/// 创建人:力软-框架开发组(王飞)
/// 日 期:2022.12.05
/// 描 述:个人印章管理
/// </summary>
public class StampPersonalController : MvcControllerBase
{
private StampPersonalIBLL stampPersonalIBLL = new StampPersonalBLL();
private ImgIBLL imgIBLL = new ImgBLL();

#region 视图功能
/// <summary>
/// 管理页面
/// </summary>
/// <returns></returns>
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页面
/// </summary>
/// <returns></returns>
public ActionResult Form()
{
return View();
}

public ActionResult StampDetailIndex()
{
return View();
}

public ActionResult EqualForm()
{
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 = stampPersonalIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}

/// <summary>
/// 获取所有的印章信息
/// </summary>
/// <param name="keyword"></param>
/// <param name="category"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string keyword, string userId)
{
var data = stampPersonalIBLL.GetList(keyword, userId);
return Success(data);
}

/// <summary>
/// 获取图片
/// </summary>
/// <param name="parentId"></param>
/// <returns></returns>
[HttpGet]
public ActionResult GetImg(string keyValue)
{
stampPersonalIBLL.GetImg(keyValue);
return Success("获取成功!");
}

#endregion

#region 提交数据
/// <summary>
/// 保存印章
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, StampPersonalEntity entity)
{
stampPersonalIBLL.SaveEntity(keyValue, entity);
return Success("保存成功。");

}
/// <summary>
/// 删除印章
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
stampPersonalIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
#endregion

#region 扩展方法
/// <summary>
/// 图片上传
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">印章实体</param>
/// <returns></returns>
[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("保存成功。");
}

/// <summary>
/// 启用/停用
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="state">状态 1启用 0禁用</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpDateSate(string keyValue, int state)
{
stampPersonalIBLL.UpdateState(keyValue, state);
return Success((state == 1 ? "启用" : "禁用") + "成功!");
}
/// <summary>
/// 密码验证
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="Password">密码</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult EqualForm(string keyValue, string Password)
{
var result = stampPersonalIBLL.EqualPassword(keyValue, Password);
if (result)
{
return Success("密码验证成功!");
}
else
{
return Fail("密码不正确!");
}

}
#endregion
}
}

+ 15
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.cshtml Dosyayı Görüntüle

@@ -4,18 +4,30 @@
}
<script src="~/Content/jquery/plugin/jSignature.min.js"></script>
<div class="lr-rblock" style="padding-bottom:40px;">
<div class="lr-rblock" style="padding:20px;">
<div class="lr-rblock" style="padding:20px;">
<div id="signature" style="border: 2px dotted black;background-color: lightgrey;"></div>
</div>
<div style="position:absolute;top:30px;right:30px;width:120px;height:120px;display:none;" id="stamp" >
<div style="position:absolute;top:30px;right:30px;width:120px;height:120px;display:none;" id="stamp">
<img style="width:120px;height:120px;" src="" />
</div>

<div class="lr-form-bottom-button" id="wizard-actions">
<a id="btn_stamp" class="btn btn-default">盖章</a>
<a id="btn_stampPersonal" class="btn btn-default">个人签章</a>
<a id="btn_stamp" class="btn btn-default">学校签章</a>
<a id="btn_reset" class="btn btn-danger">重置</a>
<a id="btn_finish" class="btn btn-success">确认</a>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js")

<script>
var IsHaveStampRight = "@ViewBag.IsHaveStampRight";
//console.log(IsHaveStampRight);
if (IsHaveStampRight.toLowerCase() == "true") {
$("#btn_stamp").attr("style", "display:inline-block;");
} else {
$("#btn_stamp").attr("style","display:none;");
}

</script>


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js Dosyayı Görüntüle

@@ -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");


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Form.js Dosyayı Görüntüle

@@ -54,6 +54,8 @@ var bootstrap = function ($, learun) {
return false;
}

postData.F_Category = 1;

var f = document.getElementById('uploadFile').files[0];
//是否上传图片
if (!!f) {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/Index.js Dosyayı Görüntüle

@@ -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) });
}
}


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampInfo/StampDetailIndex.js Dosyayı Görüntüle

@@ -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);



+ 0
- 11
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.cshtml Dosyayı Görüntüle

@@ -1,11 +0,0 @@
@{
ViewBag.Title = "印章密码";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">密码<font face="宋体">*</font></div>
<input id="F_Password" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
</div>
@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.js")

+ 0
- 35
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/EqualForm.js Dosyayı Görüntüle

@@ -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();
}

+ 5
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Form.js Dosyayı Görüntüle

@@ -27,7 +27,7 @@ var bootstrap = function ($, learun) {
$('#F_StampType').lrDataItemSelect({ code: 'StampType' });
//图片显示
$('#uploadFile').on('change', uploadImg);
$('.fileEx').prepend('<img id="uploadPreview" src="' + top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/GetImg?keyValue=' + keyValue + '" >');
$('.fileEx').prepend('<img id="uploadPreview" src="' + top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetImg?keyValue=' + keyValue + '" >');
},
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();


+ 8
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/Index.js Dosyayı Görüntüle

@@ -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 '<img src="' + top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/GetImg?keyValue=' + row.F_StampId + '" style="position: absolute;height:100px;width:100px;top:5px;left:5px;" >';
return '<img src="' + top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetImg?keyValue=' + row.F_StampId + '" style="position: absolute;height:100px;width:100px;top:5px;left:5px;" >';
}
},
{
@@ -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) });
}


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/StampPersonal/StampDetailIndex.js Dosyayı Görüntüle

@@ -24,7 +24,7 @@ var bootstrap = function ($, learun) {
{
label: '印章', name: 'F_ImgFile', width: 110, align: "left",
formatter: function (value, row, op, $cell) {
return '<img src="' + top.$.rootUrl + '/LR_NewWorkFlow/StampPersonal/GetImg?keyValue=' + row.F_StampId + '" style="position: absolute;height:100px;width:100px;top:5px;left:5px;" >';
return '<img src="' + top.$.rootUrl + '/LR_NewWorkFlow/StampInfo/GetImg?keyValue=' + row.F_StampId + '" style="position: absolute;height:100px;width:100px;top:5px;left:5px;" >';
}
}
],
@@ -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);
});
};


+ 0
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Dosyayı Görüntüle

@@ -453,7 +453,6 @@
<Compile Include="Areas\LR_NewWorkFlow\Controllers\NWFDelegateController.cs" />
<Compile Include="Areas\LR_NewWorkFlow\Controllers\NWFProcessController.cs" />
<Compile Include="Areas\LR_NewWorkFlow\Controllers\NWFSchemeController.cs" />
<Compile Include="Areas\LR_NewWorkFlow\Controllers\StampPersonalController.cs" />
<Compile Include="Areas\LR_NewWorkFlow\Controllers\StampInfoController.cs" />
<Compile Include="Areas\LR_NewWorkFlow\LR_NewWorkFlowAreaRegistration.cs" />
<Compile Include="Areas\LR_OAModule\Controllers\EmailController.cs" />
@@ -1723,7 +1722,6 @@
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\SelectUserForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\SignForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\StatisticTimeForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\EqualForm.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Form.css" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Form.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Index.js" />
@@ -8009,7 +8007,6 @@
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Index.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\IndexDorm.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\IndexAll.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\EqualForm.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Form.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Index.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\StampDetailIndex.cshtml" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config Dosyayı Görüntüle

@@ -178,6 +178,8 @@
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" />
<!--排课管理角色Id 有权限查看所有人的课-->
<add key="PKRoleId" value="2fe2fa03-9897-4639-9bf2-8e26c4e01b01"/>
<!--学校签章使用权角色Id 流程审批时是否有使用学校签章的权限;-->
<add key="StampRightRoleId" value="cf0dc3da-3706-41ec-9032-02d1f4650d3b"/>
<!-- 登录次数限制:登录连续错误要禁止登录 -->
<add key="ForbidLoginNum" value="5"/>
<!-- 禁止登录时间(分钟) -->


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Dosyayı Görüntüle

@@ -190,6 +190,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Bootstraper.cs" />
<Compile Include="Modules\StampPersonalApi.cs" />
<Compile Include="Modules\FundsApplyApi.cs" />
<Compile Include="Modules\AnnexesApiWx.cs" />
<Compile Include="Modules\BaseNoLoginApi.cs" />


+ 5
- 3
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewWorkFlowApi.cs Dosyayı Görüntüle

@@ -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
/// 签字图片信息
/// </summary>
public string signUrl { get; set; }

/// <summary>
/// 签章信息
/// </summary>
public string stamp { get; set; }
}



+ 108
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StampPersonalApi.cs Dosyayı Görüntüle

@@ -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();

/// <summary>
/// 个人签章
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetList(dynamic _)
{
SPParam param = this.GetReqData<SPParam>();
var data = lr_StampManageIBLL.GetList(param.keyword, userInfo.userId, "2");
return Success(data);
}
/// <summary>
/// 学校签章
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetSchoolList(dynamic _)
{
SPParam param = this.GetReqData<SPParam>();
var data = lr_StampManageIBLL.GetList(param.keyword, null, "1");
return Success(data);
}
/// <summary>
/// 获取签章图片
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetImg(dynamic _)
{
string param = this.GetReqData();
lr_StampManageIBLL.GetImg(param);
return Success("");
}
/// <summary>
/// 验证签章密码
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response EqualPassword(dynamic _)
{
var msg = "";
SPParam param = this.GetReqData<SPParam>();
var data = lr_StampManageIBLL.EqualPassword(param.F_StampId, param.F_Password);
if (data)
{
msg = "密码验证成功!";
}
else
{
msg = "密码不正确!";
}
return Success(new { result = data, msg = msg });
}
/// <summary>
/// 判断登录用户是否有“学校签章”的使用权限
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
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; }
}

}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config Dosyayı Görüntüle

@@ -107,5 +107,7 @@
<add key="QJUrl" value="www.qj.com"/>
<!-- 报名选修课的最大课程数 -->
<add key="ElectiveLessonApplyMax" value="2" />
<!--学校签章使用权角色Id 流程审批时是否有使用学校签章的权限;-->
<add key="StampRightRoleId" value="cf0dc3da-3706-41ec-9032-02d1f4650d3b"/>

</appSettings>

+ 0
- 27
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_OA/StampPersonalMap.cs Dosyayı Görüntüle

@@ -1,27 +0,0 @@
using Learun.Application.OA.StampPersonal;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{/// <summary>
/// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架
/// Copyright (c) 2013-2018 上海力软信息技术有限公司
/// 创 建:超级管理员
/// 日 期:2022-12-05 09:57
/// 描 述:个人印章管理
/// </summary>
public class StampPersonalMap : EntityTypeConfiguration<StampPersonalEntity>
{
public StampPersonalMap()
{
#region 表、主键
//表
this.ToTable("LR_BASE_STAMPPERSONAL");
//主键
this.HasKey(s =>s.F_StampId);
#endregion

#region 配置关系
#endregion
}
}
}

+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Dosyayı Görüntüle

@@ -196,7 +196,6 @@
<Compile Include="LR_OA\JQueryGanttMap.cs" />
<Compile Include="LR_OA\ScheduleMap.cs" />
<Compile Include="LR_OA\NewsMap.cs" />
<Compile Include="LR_OA\StampPersonalMap.cs" />
<Compile Include="LR_OA\StampMap.cs" />
<Compile Include="LR_Organization\CompanyMap.cs" />
<Compile Include="LR_Organization\DepartmentMap.cs" />


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageBLL.cs Dosyayı Görüntüle

@@ -26,11 +26,11 @@ namespace Learun.Application.OA.LR_StampManage
/// </summary>
/// <param name="keyWord">查询的关键字</param>
/// <returns></returns>
public IEnumerable<LR_StampManageEntity> GetList(string keyWord)
public IEnumerable<LR_StampManageEntity> GetList(string keyWord, string userId, string category)
{
try
{
return lr_StampManageService.GetList(keyWord);
return lr_StampManageService.GetList(keyWord,userId,category);

}
catch (Exception ex)


+ 20
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageEntity.cs Dosyayı Görüntüle

@@ -55,6 +55,21 @@ namespace Learun.Application.OA.LR_StampManage
/// </summary>
[Column("F_ENABLEDMARK")]
public int? F_EnabledMark { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("F_CREATEUSERID")]
public string F_CreateUserId { get; set; }
/// <summary>
/// 时间
/// </summary>
[Column("F_CREATETIME")]
public DateTime? F_CreateTime { get; set; }
/// <summary>
/// 印章分类:1学校公章2个人印章
/// </summary>
[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;

}
/// <summary>
/// 新增调用
@@ -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



+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageIBLL.cs Dosyayı Görüntüle

@@ -18,7 +18,7 @@ namespace Learun.Application.OA.LR_StampManage
/// </summary>
/// <param name="keyWord"></param>
/// <returns></returns>
IEnumerable<LR_StampManageEntity> GetList(string keyWord);
IEnumerable<LR_StampManageEntity> GetList(string keyWord, string userId, string category);
/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>


+ 20
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LR_StampManage/LR_StampManageService.cs Dosyayı Görüntüle

@@ -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
/// </summary>
/// <param name="keyWord">名称/状态</param>
/// <returns></returns>
public IEnumerable<LR_StampManageEntity> GetList(string keyWord)
public IEnumerable<LR_StampManageEntity> 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<LR_StampManageEntity>(strSql.ToString(), dp, pagination);
}


+ 0
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj Dosyayı Görüntüle

@@ -140,10 +140,6 @@
<Compile Include="LostArticleInfo\LostArticleInfoEntity.cs" />
<Compile Include="LostArticleInfo\LostArticleInfoIBLL.cs" />
<Compile Include="LostArticleInfo\LostArticleInfoService.cs" />
<Compile Include="StampPersonal\StampPersonalBLL.cs" />
<Compile Include="StampPersonal\StampPersonalEntity.cs" />
<Compile Include="StampPersonal\StampPersonalIBLL.cs" />
<Compile Include="StampPersonal\StampPersonalService.cs" />
<Compile Include="LR_StampManage\LR_StampManageBLL.cs" />
<Compile Include="LR_StampManage\LR_StampManageEntity.cs" />
<Compile Include="LR_StampManage\LR_StampManageIBLL.cs" />


+ 0
- 217
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalBLL.cs Dosyayı Görüntüle

@@ -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
{
/// <summary>
/// 版 本 Learun-ADMS V6.1.6.0 力软敏捷开发框架
/// Copyright (c) 2013-2017 上海力软信息技术有限公司
/// 创建人:力软-框架开发组(王飞)
/// 日 期:2022.12.05
/// 描 述:个人印章管理
/// </summary>
public class StampPersonalBLL : StampPersonalIBLL
{
private StampPersonalService stampPersonalService = new StampPersonalService();
private ImgIBLL imgIBLL = new ImgBLL();
#region 获取数据

/// <summary>
/// 获取所有的印章信息/模糊查询(根据名称/状态(启用或者停用))
/// </summary>
/// <param name="keyWord">查询的关键字</param>
/// <returns></returns>
public IEnumerable<StampPersonalEntity> GetList(string keyWord, string userId)
{
try
{
return stampPersonalService.GetList(keyWord, userId);

}
catch (Exception ex)
{

if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>
/// <summary>
/// <returns></returns>
public IEnumerable<StampPersonalEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{

return stampPersonalService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取实体
/// </summary>
/// <param name="parentId">主键</param>
/// <returns></returns>
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 提交数据
/// <summary>
/// 保存印章信息(新增/编辑)
/// </summary>
/// <param name="keyValue"></param>
/// <param name="stampEntity"></param>
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);
}
}
}

/// <summary>
/// 删除印章信息
/// </summary>
/// <param name="keyVlaue"></param>
public void DeleteEntity(string keyVlaue)
{
try
{
stampPersonalService.DeleteEntity(keyVlaue);
}
catch (Exception ex)
{

if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 扩展方法
/// <summary>
/// 获取图片
/// </summary>
/// <param name="keyValue">主键</param>
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);
}

/// <summary>
/// 更新数据状态
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="state">状态 1启用 0禁用</param>
public void UpdateState(string keyValue, int state)
{
StampPersonalEntity entity = new StampPersonalEntity();
entity.F_EnabledMark = state;
SaveEntity(keyValue, entity);
}

/// <summary>
/// 密码验证
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="password">密码</param>
/// <returns></returns>
public bool EqualPassword(string keyValue, string password)
{
StampPersonalEntity entity = GetEntity(keyValue);
if (entity.F_Password.Equals(password))//加密后进行对比
{
return true;
}
else
{
return false;
}
}
#endregion
}
}

+ 0
- 94
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalEntity.cs Dosyayı Görüntüle

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

namespace Learun.Application.OA.StampPersonal
{
public class StampPersonalEntity
{

/// <summary>
/// 印章编号
/// </summary>
[Column("F_STAMPID")]
public string F_StampId { get; set; }


/// <summary>
/// 印章名称
/// </summary>
[Column("F_STAMPNAME")]
public string F_StampName { get; set; }

/// <summary>
/// 印章备注
/// </summary>
[Column("F_DESCRIPTION")]
public string F_Description { get; set; }

/// <summary>
/// 印章分类
/// </summary>
[Column("F_STAMPTYPE")]
public string F_StampType { get; set; }

/// <summary>
/// 密码
/// </summary>
[Column("F_PASSWORD")]
public string F_Password { get; set; }

/// <summary>
/// 图片文件
/// </summary>
[Column("F_IMGFILE")]
public string F_ImgFile { get; set; }

/// <summary>
/// 排序
/// </summary>
[Column("F_SORT")]
public string F_Sort { get; set; }

/// <summary>
/// 印章状态
/// </summary>
[Column("F_ENABLEDMARK")]
public int? F_EnabledMark { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("F_CREATEUSERID")]
public string F_CreateUserId { get; set; }
/// <summary>
/// 时间
/// </summary>
[Column("F_CREATETIME")]
public DateTime? F_CreateTime { get; set; }

#region 扩展方法

/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue">主键</param>
public void Modify(string keyValue)
{
this.F_StampId = keyValue;
this.F_CreateUserId = LoginUserInfo.Get().userId; //创建人
this.F_CreateTime = DateTime.Now;
}
/// <summary>
/// 新增调用
/// </summary>
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

}
}

+ 0
- 75
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalIBLL.cs Dosyayı Görüntüle

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

namespace Learun.Application.OA.StampPersonal
{
/// <summary>
/// 版 本 Learun-ADMS V6.1.6.0 力软敏捷开发框架
/// Copyright (c) 2013-2017 上海力软信息技术有限公司
/// 创建人:力软-框架开发组(王飞)
/// 日 期:2022.12.05
/// 描 述:个人印章管理
/// </summary>
public interface StampPersonalIBLL
{
#region 获取数据
/// <summary>
/// 模糊查询(根据名称/状态(启用或者停用))
/// </summary>
/// <param name="keyWord"></param>
/// <returns></returns>
IEnumerable<StampPersonalEntity> GetList(string keyWord, string userId);
/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>
/// <summary>
/// <returns></returns>
IEnumerable<StampPersonalEntity> GetPageList(Pagination pagination, string queryJson);

/// <summary>
/// 获取印章树形数据
/// </summary>
/// <param name="parentId">父级节点</param>
/// <returns></returns>
StampPersonalEntity GetEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 保存印章信息(新增/编辑)
/// </summary>
/// <param name="keyValue"></param>
/// <param name="stampEntity"></param>
void SaveEntity(string keyValue, StampPersonalEntity stampEntity);

/// <summary>
/// 删除印章信息
/// </summary>
/// <param name="keyVlaue"></param>
void DeleteEntity(string keyVlaue);

/// <summary>
/// 更新数据状态
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="state">状态 1启用 0禁用</param>
void UpdateState(string keyValue, int state);
#endregion

#region 扩展方法
/// <summary>
/// 获取图片
/// </summary>
/// <param name="keyValue">主键</param>
void GetImg(string keyValue);
/// <summary>
/// 密码匹配
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="password">密码</param>
/// <returns></returns>
bool EqualPassword(string keyValue, string Password);
#endregion
}
}

+ 0
- 214
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/StampPersonal/StampPersonalService.cs Dosyayı Görüntüle

@@ -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
{
/// <summary>
/// 版 本 Learun-ADMS V6.1.6.0 力软敏捷开发框架
/// Copyright (c) 2013-2017 上海力软信息技术有限公司
/// 创建人:力软-框架开发组(王飞)
/// 日 期:2022.12.05
/// 描 述:个人印章管理
/// </summary>
public class StampPersonalService : RepositoryFactory
{
#region 构造函数和属性
private string fieldSql;
public StampPersonalService()
{
//sql字段
fieldSql = @"
*
";
}
#endregion

#region 获取数据
/// <summary>
/// 获取印章信息(根据名称/状态:启用或停用模糊查询)
/// </summary>
/// <param name="keyWord">名称/状态</param>
/// <returns></returns>
public IEnumerable<StampPersonalEntity> 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<StampPersonalEntity>(Sql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>
/// <summary>
/// <returns></returns>
public IEnumerable<StampPersonalEntity> 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<StampPersonalEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取印章实体
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public StampPersonalEntity GetEntity(string keyValue)
{

try
{
return this.BaseRepository().FindEntity<StampPersonalEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 保存印章信息(新增/编辑)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="stampEntity">实体</param>
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);
}

}
}

/// <summary>
/// 删除印章信息
/// </summary>
/// <param name="keyVlaue">主键</param>
public void DeleteEntity(string keyVlaue)
{
try
{
this.BaseRepository().Delete<StampPersonalEntity>(s => s.F_StampId == keyVlaue);//删除操作
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}

}
}
#endregion
}

}

Yükleniyor…
İptal
Kaydet