Browse Source

【增加】开具发票、收款记账、费用登记:增加管理提醒对象功能;开具发票读取mysql数据;

yanshi
dyy 2 years ago
parent
commit
233fe9ed9e
14 changed files with 432 additions and 36 deletions
  1. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/Index.cshtml
  2. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/Index.js
  3. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtInvoiceController.cs
  4. +6
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtInvoice/Index.cshtml
  5. +53
    -29
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtInvoice/Index.js
  6. +6
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetFile/Index.cshtml
  7. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetFile/Index.js
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
  9. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/BudgetApply/BudgetApplyService.cs
  10. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceBLL.cs
  11. +37
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceEntity.cs
  12. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceIBLL.cs
  13. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceService.cs
  14. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetFile/FD_BudgetFileService.cs

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

@@ -38,6 +38,9 @@
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_messageRemindPerson" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;管理提醒对象</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>


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

@@ -105,6 +105,20 @@ var bootstrap = function ($, learun) {
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});

// 管理提醒对象
$('#lr_messageRemindPerson').on('click', function () {
learun.layerForm({
id: 'formInMessageRemindPerson',
title: '管理提醒对象',
url: top.$.rootUrl + '/LR_Desktop/MessageRemindPerson/Form?type=02',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick();
}
});
});
},
// 初始化列表
initGird: function () {


+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DtInvoiceController.cs View File

@@ -62,6 +62,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
return Success(jsonData);
}

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList2(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = dtInvoiceIBLL.GetPageList2(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>


+ 6
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtInvoice/Index.cshtml View File

@@ -26,10 +26,13 @@
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
@*<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>*@
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_messageRemindPerson" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;管理提醒对象</a>
</div>
</div>
</div>


+ 53
- 29
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtInvoice/Index.js View File

@@ -64,39 +64,63 @@ var bootstrap = function ($, learun) {
});
}
});

// 管理提醒对象
$('#lr_messageRemindPerson').on('click', function () {
learun.layerForm({
id: 'formInMessageRemindPerson',
title: '管理提醒对象',
url: top.$.rootUrl + '/LR_Desktop/MessageRemindPerson/Form?type=01',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick();
}
});
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/DtInvoice/GetPageList',
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/DtInvoice/GetPageList2',
headData: [
{ label: "项目名称", name: "InvoiceName", width: 200, align: "left"},
{ label: "公司名称", name: "UnitName", width: 200, align: "left"},
{ label: "开票时间", name: "InvoiceDate", width: 200, align: "left"},
{ label: "发票号", name: "InvoiceNo", width: 200, align: "left"},
{ label: "发票类型", name: "InvoiceType", width: 200, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'InvoiceType',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "税率", name: "TaxRate", width: 200, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TaxRate',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "开票项", name: "InvoiceItems", width: 100, align: "left"},
{ label: "金额", name: "Amount", width: 100, align: "left"},
{ label: "备注", name: "Remark", width: 300, align: "left"},
{ label: "项目名称", name: "InvoiceName", width: 100, align: "left"},
{ label: "发票号", name: "InvoiceNo", width: 100, align: "left"},
{ label: "开票日期", name: "InvoiceDate", width: 100, align: "left" },
{ label: "金额", name: "Amount", width: 100, align: "left" },
{ label: "税率", name: "TaxRate", width: 100, align: "left" },
{ label: "不含税价格", name: "unitPrice", width: 100, align: "left" },
{ label: "发票类型", name: "InvoiceType", width: 100, align: "left" },
{ label: "对方单位", name: "UnitName", width: 100, align: "left"},
{ label: "备注", name: "Remark", width: 100, align: "left"},
{ label: "是否开票", name: "zftype", width: 100, align: "left"},
{ label: "合同ID", name: "innvoicesettingsid", width: 100, align: "left"},
{ label: "附件", name: "files", width: 100, align: "left"},
{ label: "税费", name: "shuifei", width: 100, align: "left"},
{ label: "到账日期", name: "date", width: 100, align: "left"},
{ label: "回款金额", name: "dzmoney", width: 100, align: "left"},

//{ label: "发票类型", name: "InvoiceType", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op,$cell) {
// learun.clientdata.getAsync('dataItem', {
// key: value,
// code: 'InvoiceType',
// callback: function (_data) {
// callback(_data.text);
// }
// });
// }},
//{ label: "税率", name: "TaxRate", width:100, align: "left",
// formatterAsync: function (callback, value, row, op,$cell) {
// learun.clientdata.getAsync('dataItem', {
// key: value,
// code: 'TaxRate',
// callback: function (_data) {
// callback(_data.text);
// }
// });
// }},
//{ label: "开票项", name: "InvoiceItems", width: 100, align: "left"},
//{ label: "用户", name: "CreateUser", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op,$cell) {
// learun.clientdata.getAsync('user', {


+ 6
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetFile/Index.cshtml View File

@@ -31,10 +31,13 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_messageRemindPerson" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;管理提醒对象</a>
</div>
</div>
</div>


+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetFile/Index.js View File

@@ -81,6 +81,21 @@ var bootstrap = function ($, learun) {
// var id = $(this).id;
// top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: id, __RequestVerificationToken: top.$.lrToken }, method: 'POST' });
//});


// 管理提醒对象
$('#lr_messageRemindPerson').on('click', function () {
learun.layerForm({
id: 'formInMessageRemindPerson',
title: '管理提醒对象',
url: top.$.rootUrl + '/LR_Desktop/MessageRemindPerson/Form?type=05',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick();
}
});
});
},
// 初始化列表
initGird: function () {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config View File

@@ -19,6 +19,7 @@
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_演示;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_演示;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="waydbString" connectionString="Data Source=8.141.155.183;Port=23306;Database=waydb;User ID=root;Password=QJKJ@bjqj@123" providerName="MySql.Data.MySqlClient" />

<!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />


+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/BudgetApply/BudgetApplyService.cs View File

@@ -1,9 +1,13 @@
using Dapper;
using Learun.Application.Base.AuthorizeModule;
using Learun.Application.Organization;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.CustomFunction
@@ -152,6 +156,64 @@ t.AdjustTime,
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}

//提醒对象发消息提醒
var messageRemindPerson = this.BaseRepository().FindEntity<MessageRemindPersonEntity>(x => x.Type == "02");
if (messageRemindPerson != null)
{
//提醒对象包含的人员列表
var personList = new List<string>();
//角色
if (!string.IsNullOrEmpty(messageRemindPerson.RoleIds))
{
var pp = this.BaseRepository().FindList<UserRelationEntity>(x => messageRemindPerson.RoleIds.Contains(x.F_ObjectId));
if (pp.Any())
{
personList.AddRange(pp.Select(x => x.F_UserId));
}
}
//部门
if (!string.IsNullOrEmpty(messageRemindPerson.DeptIds))
{
var dd = messageRemindPerson.DeptIds.Split(',');
foreach (var item in dd)
{
var pp = this.BaseRepository().FindList<UserEntity>(x => x.F_DepartmentId.Contains(item));
if (pp.Any())
{
personList.AddRange(pp.Select(x => x.F_UserId));
}
}
}
//人员
if (!string.IsNullOrEmpty(messageRemindPerson.UserIds))
{
personList.AddRange(messageRemindPerson.UserIds.Split(','));
}
personList = personList.Distinct().ToList();
//消息提醒表增加数据
var mrList = new List<MessageRemindEntity>();
foreach (var item in personList)
{
MessageRemindEntity messageRemindEntity = new MessageRemindEntity()
{
ReceiptId = item,
ReceiptName = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item)?.F_RealName,
SenderId = LoginUserInfo.Get().userId,
SenderName = LoginUserInfo.Get().realName,
TheTitle = "收款记账",
TheContent = "收款状态:" + (entity.Status.HasValue ? entity.Status.Value == 1 ? "进行中" : entity.Status.Value == 2 ? "审批通过" : entity.Status.Value==4? "正在调整" : entity.Status.Value==5? "已调整" : "草稿" : "草稿"),
ConnectionUrl = "/CustomFunction/BudgetApply/Index?keyValue=",
InstanceId = entity.Id,
SendTime = DateTime.Now,
ReadSigns = false
};
messageRemindEntity.Create();
mrList.Add(messageRemindEntity);
}
this.BaseRepository().Insert(mrList);
}

}
catch (Exception ex)
{


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceBLL.cs View File

@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

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

/// <summary>
/// 获取DtInvoice表实体数据
/// </summary>


+ 37
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceEntity.cs View File

@@ -33,7 +33,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 开票时间
/// </summary>
[Column("INVOICEDATE")]
public DateTime? InvoiceDate { get; set; }
public string InvoiceDate { get; set; }
/// <summary>
/// 发票号
/// </summary>
@@ -94,6 +94,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段

/// <summary>
/// 不含税价格
/// </summary>
[NotMapped]
public string unitPrice { get; set; }
/// <summary>
/// 是否开票
/// </summary>
[NotMapped]
public string zftype { get; set; }
/// <summary>
/// 合同ID
/// </summary>
[NotMapped]
public string innvoicesettingsid { get; set; }
/// <summary>
/// 附件
/// </summary>
[NotMapped]
public string files { get; set; }
/// <summary>
/// 税费
/// </summary>
[NotMapped]
public string shuifei { get; set; }
/// <summary>
/// 到账日期
/// </summary>
[NotMapped]
public string date { get; set; }
/// <summary>
/// 回款金额
/// </summary>
[NotMapped]
public string dzmoney { get; set; }
#endregion
}
}


+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceIBLL.cs View File

@@ -21,6 +21,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<DtInvoiceEntity> GetPageList(Pagination pagination, string queryJson);

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<DtInvoiceEntity> GetPageList2(Pagination pagination, string queryJson);

/// <summary>
/// 获取DtInvoice表实体数据
/// </summary>


+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtInvoice/DtInvoiceService.cs View File

@@ -1,9 +1,13 @@
using Dapper;
using Learun.Application.Base.AuthorizeModule;
using Learun.Application.Organization;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
@@ -75,6 +79,61 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取页面显示列表数据【MySQL】
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<DtInvoiceEntity> GetPageList2(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.id as 'Id',
t.name as 'InvoiceName',
t.number as 'InvoiceNo',
t.time as 'InvoiceDate',
t.money as 'Amount',
t.people as 'TaxRate',
t.unitPrice,
t.fptype as 'InvoiceType',
t.information as 'UnitName',
t.bz as 'Remark',
t.zftype,t.innvoicesettingsid,t.files,t.shuifei,t.date,t.dzmoney
");
strSql.Append(" FROM sw_invoice t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["InvoiceType"].IsEmpty())
{
dp.Add("InvoiceType", queryParam["InvoiceType"].ToString(), DbType.String);
strSql.Append(" AND t.fptype = @InvoiceType ");
}
if (!queryParam["TaxRate"].IsEmpty())
{
dp.Add("TaxRate", queryParam["TaxRate"].ToString(), DbType.String);
strSql.Append(" AND t.people = @TaxRate ");
}
return this.BaseRepository("waydbString").FindList<DtInvoiceEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取DtInvoice表实体数据
/// </summary>
@@ -168,6 +227,64 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}

//提醒对象发消息提醒
var messageRemindPerson = this.BaseRepository().FindEntity<MessageRemindPersonEntity>(x => x.Type == "01");
if (messageRemindPerson != null)
{
//提醒对象包含的人员列表
var personList = new List<string>();
//角色
if (!string.IsNullOrEmpty(messageRemindPerson.RoleIds))
{
var pp = this.BaseRepository().FindList<UserRelationEntity>(x => messageRemindPerson.RoleIds.Contains(x.F_ObjectId));
if (pp.Any())
{
personList.AddRange(pp.Select(x => x.F_UserId));
}
}
//部门
if (!string.IsNullOrEmpty(messageRemindPerson.DeptIds))
{
var dd = messageRemindPerson.DeptIds.Split(',');
foreach (var item in dd)
{
var pp = this.BaseRepository().FindList<UserEntity>(x => x.F_DepartmentId.Contains(item));
if (pp.Any())
{
personList.AddRange(pp.Select(x => x.F_UserId));
}
}
}
//人员
if (!string.IsNullOrEmpty(messageRemindPerson.UserIds))
{
personList.AddRange(messageRemindPerson.UserIds.Split(','));
}
personList = personList.Distinct().ToList();
//消息提醒表增加数据
var mrList = new List<MessageRemindEntity>();
foreach (var item in personList)
{
MessageRemindEntity messageRemindEntity = new MessageRemindEntity()
{
ReceiptId = item,
ReceiptName = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item)?.F_RealName,
SenderId = LoginUserInfo.Get().userId,
SenderName = LoginUserInfo.Get().realName,
TheTitle = "开具发票",
TheContent = "有新发票开具,发票号"+entity.InvoiceNo,
ConnectionUrl = "/EducationalAdministration/DtInvoice/Index?keyValue=",
InstanceId = entity.Id,
SendTime = DateTime.Now,
ReadSigns = false
};
messageRemindEntity.Create();
mrList.Add(messageRemindEntity);
}
this.BaseRepository().Insert(mrList);
}

}
catch (Exception ex)
{


+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetFile/FD_BudgetFileService.cs View File

@@ -1,10 +1,14 @@
using Dapper;
using Learun.Application.Base.AuthorizeModule;
using Learun.Application.Organization;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
@@ -146,6 +150,64 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}

//提醒对象发消息提醒
var messageRemindPerson = this.BaseRepository().FindEntity<MessageRemindPersonEntity>(x => x.Type == "05");
if (messageRemindPerson != null)
{
//提醒对象包含的人员列表
var personList = new List<string>();
//角色
if (!string.IsNullOrEmpty(messageRemindPerson.RoleIds))
{
var pp = this.BaseRepository().FindList<UserRelationEntity>(x => messageRemindPerson.RoleIds.Contains(x.F_ObjectId));
if (pp.Any())
{
personList.AddRange(pp.Select(x => x.F_UserId));
}
}
//部门
if (!string.IsNullOrEmpty(messageRemindPerson.DeptIds))
{
var dd = messageRemindPerson.DeptIds.Split(',');
foreach (var item in dd)
{
var pp = this.BaseRepository().FindList<UserEntity>(x => x.F_DepartmentId.Contains(item));
if (pp.Any())
{
personList.AddRange(pp.Select(x => x.F_UserId));
}
}
}
//人员
if (!string.IsNullOrEmpty(messageRemindPerson.UserIds))
{
personList.AddRange(messageRemindPerson.UserIds.Split(','));
}
personList = personList.Distinct().ToList();
//消息提醒表增加数据
var mrList = new List<MessageRemindEntity>();
foreach (var item in personList)
{
MessageRemindEntity messageRemindEntity = new MessageRemindEntity()
{
ReceiptId = item,
ReceiptName = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item)?.F_RealName,
SenderId = LoginUserInfo.Get().userId,
SenderName = LoginUserInfo.Get().realName,
TheTitle = "费用登记",
TheContent = "费用审批状态、报销情况",
ConnectionUrl = "/ReceiveSendFeeManagement/FD_BudgetFile/Index?keyValue=",
InstanceId = entity.Id,
SendTime = DateTime.Now,
ReadSigns = false
};
messageRemindEntity.Create();
mrList.Add(messageRemindEntity);
}
this.BaseRepository().Insert(mrList);
}

}
catch (Exception ex)
{


Loading…
Cancel
Save