Browse Source

收入预算,支出预算,基础信息上报

yanshi
edy 3 years ago
parent
commit
fec0131d1c
21 changed files with 2679 additions and 25 deletions
  1. +159
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_BudgetBasicsController.cs
  2. +180
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_IncomeManageController.cs
  3. +265
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_PayManageController.cs
  4. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +8
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  6. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_BudgetBasicsMap.cs
  7. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_IncomeManageMap.cs
  8. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_PayManageMap.cs
  9. +32
    -20
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  10. +165
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsBLL.cs
  11. +101
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsEntity.cs
  12. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsIBLL.cs
  13. +195
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsService.cs
  14. +205
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageBLL.cs
  15. +136
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageEntity.cs
  16. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageIBLL.cs
  17. +237
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageService.cs
  18. +231
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageBLL.cs
  19. +188
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageEntity.cs
  20. +68
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageIBLL.cs
  21. +308
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageService.cs

+ 159
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_BudgetBasicsController.cs View File

@@ -0,0 +1,159 @@
using System;
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using Learun.Application.Organization;

namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-27 17:42
/// 描 述:基础信息上报
/// </summary>
public class FD_BudgetBasicsController : MvcControllerBase
{
private FD_BudgetBasicsIBLL fD_BudgetBasicsIBLL = new FD_BudgetBasicsBLL();
private DepartmentIBLL departmentIBLL = new DepartmentBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
var userInfo = LoginUserInfo.Get();
ViewBag.Name = userInfo.realName;
var dept = departmentIBLL.GetEntity(userInfo.departmentId);
ViewBag.Dept = dept == null ? "" : dept.F_FullName;
ViewBag.Date = DateTime.Now;
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 = fD_BudgetBasicsIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var FD_BudgetBasicsData = fD_BudgetBasicsIBLL.GetFD_BudgetBasicsEntity(keyValue);
var jsonData = new
{
FD_BudgetBasics = FD_BudgetBasicsData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var FD_BudgetBasicsData = fD_BudgetBasicsIBLL.GetFormDataByProcessId(processId);
var jsonData = new
{
FD_BudgetBasics = FD_BudgetBasicsData,
};
return Success(jsonData);
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
var entity = fD_BudgetBasicsIBLL.GetFD_BudgetBasicsEntity(keyValue);
entity.BIsDelete = true;
entity.BDeleteTime = DateTime.Now;
entity.BDeleteUser = LoginUserInfo.Get().userId;
fD_BudgetBasicsIBLL.SaveEntity(keyValue, entity);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
FD_BudgetBasicsEntity entity = strEntity.ToObject<FD_BudgetBasicsEntity>();
fD_BudgetBasicsIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
/// <summary>
/// 提交资助变更
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult ChangeStatusById(string keyValue, string processId)
{
fD_BudgetBasicsIBLL.ChangeStatusById(keyValue, 1, processId);
return Success("操作成功!");
}
#endregion

}
}

+ 180
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_IncomeManageController.cs View File

@@ -0,0 +1,180 @@
using System;
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 10:40
/// 描 述:收入预算管理
/// </summary>
public class FD_IncomeManageController : MvcControllerBase
{
private FD_IncomeManageIBLL fD_IncomeManageIBLL = new FD_IncomeManageBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form2()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form3()
{
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 = fD_IncomeManageIBLL.GetPageList(paginationobj, queryJson);
FD_IncomeManageEntity entity = new FD_IncomeManageEntity();// data.Sum(x=>x.IAmount)
entity.IName = "总计:";
entity.IActual = data.Sum(x => x.IActual);
entity.IQuota = data.Sum(x => x.IQuota);
entity.IAmount = data.Sum(x => x.IAmount);
entity.IUseAmount = data.Sum(x => x.IUseAmount);
entity.ISurplusAmount = data.Sum(x => x.ISurplusAmount);
var list = data.ToList();
list.Add(entity);
var jsonData = new
{
rows = list,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var FD_IncomeManageData = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue);
var jsonData = new
{
FD_IncomeManage = FD_IncomeManageData,
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree()
{
var data = fD_IncomeManageIBLL.GetTree();

return Success(data);
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
var entity = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue);
entity.IIsDelete = true;
entity.IDeleteTime = DateTime.Now;
entity.IDeleteUser = LoginUserInfo.Get().userId;
fD_IncomeManageIBLL.SaveEntity(keyValue, entity);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
FD_IncomeManageEntity entity = strEntity.ToObject<FD_IncomeManageEntity>();
if (entity.IAmount <= 0)
return Fail("金额必须大于0!");
if (string.IsNullOrEmpty(keyValue))
{
entity.IUseAmount = 0;
entity.ISurplusAmount = entity.IAmount;
}
else
{
var FD_IncomeManageData = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue);
entity.IUseAmount = FD_IncomeManageData.IUseAmount;
entity.ISurplusAmount = entity.IAmount - FD_IncomeManageData.IUseAmount;
}

fD_IncomeManageIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 265
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_PayManageController.cs View File

@@ -0,0 +1,265 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;
using Learun.Application.WorkFlow;

namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 14:18
/// 描 述:支出预算管理
/// </summary>
public class FD_PayManageController : MvcControllerBase
{
private FD_PayManageIBLL fD_PayManageIBLL = new FD_PayManageBLL();
private FD_IncomeManageIBLL fD_IncomeManageIBLL = new FD_IncomeManageBLL();
private NWFTaskIBLL nWFTaskIBLL = new NWFTaskBLL();
#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 打印
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult PrintSpecial()
{
return View();
}
/// <summary>
/// 打印
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult PrintPublic()
{
return View();
}

/// <summary>
/// 表单(基本承包经费支出)
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormPublic()
{
return View();
}
#endregion

#region 获取数据
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPTypeTree(string keyValue)
{
var data = fD_PayManageIBLL.GetTree();

return Success(data);
}

/// <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 = fD_PayManageIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var FD_PayManageData = fD_PayManageIBLL.GetFD_PayManageEntity(keyValue);
var jsonData = new
{
FD_PayManage = FD_PayManageData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPrintData(string keyValue, string processId)
{
var FD_PayManageData = fD_PayManageIBLL.GetFD_PayManageEntity(keyValue);
var TaskLogList = (List<NWFTaskLogEntity>)nWFTaskIBLL.GetLogList(processId);
var jsonData = new
{
FD_PayManage = FD_PayManageData,
TaskLogList = TaskLogList
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程Id</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var FD_PayManageData = fD_PayManageIBLL.GetFormDataByProcessId(processId);
var jsonData = new
{
FD_PayManage = FD_PayManageData,
};
return Success(jsonData);
}

/// <summary>
/// 获取收入预算下拉框列表
/// </summary>
/// <param name=""></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetIncomeList(string budgetType, string financeBudgetType)
{
var fD_IncomeManageData = fD_IncomeManageIBLL.GetIncomeList(budgetType, financeBudgetType);
var list = new List<object>();
foreach (var item in fD_IncomeManageData)
{
list.Add(new
{
text = item.IName + "(剩余金额:" + item.ISurplusAmount + ")",
value = item.IId,
});
}
return Success(list);
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
fD_PayManageIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
FD_PayManageEntity entity = strEntity.ToObject<FD_PayManageEntity>();
//判断资金支出来源对应的收入预算是否存在
var ITopType = "";
var ISecondType = "";
if ((entity.PTopSource == "1" || entity.PTopSource == "2") || entity.PType == "2")
{
//学校经费 部门专项经费对应公用经费
ITopType = "0";
ISecondType = "1";
}
else if (entity.PTopSource == "3")
{
//财政专项经费
ITopType = "0";
ISecondType = "2";
}
else if (entity.PTopSource == "4")
{
//培训收入
ITopType = "2";
}

var incomlist = fD_IncomeManageIBLL.GetIncomeList(ITopType, ISecondType);
if (incomlist.Count() <= 0)
return Fail("请先添加对应的收入预算!");

if (entity.PTopSource == "3" && string.IsNullOrEmpty(entity.PIncomeId))
{
//财政专项经费
return Fail("请选择财政专项名称!");
}
else
{
entity.PIncomeId = incomlist.Select(x => x.IId).FirstOrDefault();
}
fD_PayManageIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult ChangeStatusById(string keyValue, string processId)
{
fD_PayManageIBLL.ChangeStatusById(keyValue, 1, processId);
return Success("操作成功!");
}
#endregion

}
}

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

@@ -487,6 +487,9 @@
<Compile Include="Areas\PersonnelManagement\Controllers\TeacherReimbursementManagementController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\TimeTableController.cs" />
<Compile Include="Areas\PersonnelManagement\PersonnelManagementAreaRegistration.cs" />
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\FD_BudgetBasicsController.cs" />
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\FD_IncomeManageController.cs" />
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\FD_PayManageController.cs" />
<Compile Include="Areas\ReceiveSendFeeManagement\ReceiveSendFeeManagementAreaRegistration.cs" />
<Compile Include="Areas\Statistics\Controllers\ChargingReportController.cs" />
<Compile Include="Areas\Statistics\Controllers\StudentAttendanceReportController.cs" />


+ 8
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -305,11 +305,6 @@
<Compile Include="EducationalAdministration\ArrangeExamTermMap.cs" />
<Compile Include="EducationalAdministration\StuAttendanceLeaveMap.cs" />
<Compile Include="EducationalAdministration\ArrangeExamStructureMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBankMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItemMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandardMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceModeMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItemMap.cs" />
<Compile Include="EducationalAdministration\StuScoreMap.cs" />
<Compile Include="EducationalAdministration\StuPunishmentMap.cs" />
<Compile Include="EducationalAdministration\StuEncourgementMap.cs" />
@@ -493,6 +488,14 @@
<Compile Include="EducationalAdministration\SignUpAboutTrainMap.cs" />
<Compile Include="PersonnelManagement\StuSaveRecordMap.cs" />
<Compile Include="EducationalAdministration\StuInfoBasicTwoMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasicsMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManageMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_PayManageMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBankMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItemMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandardMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItemMap.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceModeMap.cs" />
<Compile Include="StudentWork\SW_Ask_MainMap.cs" />
<Compile Include="StudentWork\SW_Ask_Main_QuestionMap.cs" />
<Compile Include="StudentWork\SW_Ask_BatchMap.cs" />


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

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-27 17:42
/// 描 述:基础信息上报
/// </summary>
public class FD_BudgetBasicsMap : EntityTypeConfiguration<FD_BudgetBasicsEntity>
{
public FD_BudgetBasicsMap()
{
#region 表、主键
//表
this.ToTable("FD_BUDGETBASICS");
//主键
this.HasKey(t => t.BId);
#endregion

#region 配置关系
#endregion
}
}
}


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

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 10:40
/// 描 述:收入预算管理
/// </summary>
public class FD_IncomeManageMap : EntityTypeConfiguration<FD_IncomeManageEntity>
{
public FD_IncomeManageMap()
{
#region 表、主键
//表
this.ToTable("FD_INCOMEMANAGE");
//主键
this.HasKey(t => t.IId);
#endregion

#region 配置关系
#endregion
}
}
}


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

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 14:18
/// 描 述:支出预算管理
/// </summary>
public class FD_PayManageMap : EntityTypeConfiguration<FD_PayManageEntity>
{
public FD_PayManageMap()
{
#region 表、主键
//表
this.ToTable("FD_PAYMANAGE");
//主键
this.HasKey(t => t.PId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 32
- 20
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj View File

@@ -367,6 +367,38 @@
<Compile Include="PersonnelManagement\TeacherReimbursementManagement\TeacherReimbursementManagementIBLL.cs" />
<Compile Include="PersonnelManagement\TeacherReimbursementManagement\TeacherReimbursementManagementService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasics\FD_BudgetBasicsBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasics\FD_BudgetBasicsEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasics\FD_BudgetBasicsIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasics\FD_BudgetBasicsService.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManage\FD_IncomeManageBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManage\FD_IncomeManageEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManage\FD_IncomeManageIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManage\FD_IncomeManageService.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_PayManage\FD_PayManageBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_PayManage\FD_PayManageEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_PayManage\FD_PayManageIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FD_PayManage\FD_PayManageService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBank\FinaChargeBankBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBank\FinaChargeBankEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBank\FinaChargeBankIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBank\FinaChargeBankService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItem\FinaChargeItemBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItem\FinaChargeItemEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItem\FinaChargeItemIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItem\FinaChargeItemService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandard\FinaChargesStandardBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandard\FinaChargesStandardEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandard\FinaChargesStandardIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandard\FinaChargesStandardService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItem\FinaRefundItemBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItem\FinaRefundItemEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItem\FinaRefundItemIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItem\FinaRefundItemService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceMode\FinaReplaceModeBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceMode\FinaReplaceModeEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceMode\FinaReplaceModeIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceMode\FinaReplaceModeService.cs" />
<Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainBLL.cs" />
<Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainEntity.cs" />
<Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainIBLL.cs" />
@@ -699,26 +731,6 @@
<Compile Include="EducationalAdministration\ArrangeExamStructure\ArrangeExamStructureService.cs" />
<Compile Include="EducationalAdministration\ArrangeExamStructure\ArrangeExamStructureIBLL.cs" />
<Compile Include="EducationalAdministration\ArrangeExamStructure\ArrangeExamStructureBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBank\FinaChargeBankEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBank\FinaChargeBankService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBank\FinaChargeBankBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeBank\FinaChargeBankIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItem\FinaChargeItemEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItem\FinaChargeItemService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItem\FinaChargeItemBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargeItem\FinaChargeItemIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandard\FinaChargesStandardEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandard\FinaChargesStandardService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandard\FinaChargesStandardBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandard\FinaChargesStandardIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceMode\FinaReplaceModeEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceMode\FinaReplaceModeService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceMode\FinaReplaceModeBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaReplaceMode\FinaReplaceModeIBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItem\FinaRefundItemEntity.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItem\FinaRefundItemService.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItem\FinaRefundItemBLL.cs" />
<Compile Include="ReceiveSendFeeManagement\FinaRefundItem\FinaRefundItemIBLL.cs" />
<Compile Include="EducationalAdministration\StuScore\StuScoreEntity.cs" />
<Compile Include="EducationalAdministration\StuScore\StuScoreService.cs" />
<Compile Include="EducationalAdministration\StuScore\StuScoreIBLL.cs" />


+ 165
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-27 17:42
/// 描 述:基础信息上报
/// </summary>
public class FD_BudgetBasicsBLL : FD_BudgetBasicsIBLL
{
private FD_BudgetBasicsService fD_BudgetBasicsService = new FD_BudgetBasicsService();

#region 获取数据

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

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

/// <summary>
/// 获取FD_BudgetBasics表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public FD_BudgetBasicsEntity GetFormDataByProcessId(string processId)
{
try
{
return fD_BudgetBasicsService.GetFormDataByProcessId(processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
fD_BudgetBasicsService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, FD_BudgetBasicsEntity entity)
{
try
{
fD_BudgetBasicsService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void ChangeStatusById(string keyValue, int status, string processId)
{
try
{
fD_BudgetBasicsService.ChangeStatusById(keyValue, status, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 101
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsEntity.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-27 17:42
/// 描 述:基础信息上报
/// </summary>
public class FD_BudgetBasicsEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("BID")]
public string BId { get; set; }
/// <summary>
/// 姓名
/// </summary>
[Column("BNAME")]
public string BName { get; set; }
/// <summary>
/// 部门
/// </summary>
[Column("BDEPT")]
public string BDept { get; set; }
/// <summary>
/// 当前时间
/// </summary>
[Column("BCREATETIME")]
public DateTime? BCreateTime { get; set; }
/// <summary>
/// 附件
/// </summary>
[Column("BFILE")]
public string BFile { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("BREMARKS")]
public string BRemarks { get; set; }
/// <summary>
/// 状态 0草稿,1审批中,2已审批,3已拒绝
/// </summary>
[Column("BSTATUS")]
public int? BStatus { get; set; }
/// <summary>
/// 流程Id
/// </summary>
[Column("BPROCESSID")]
public string BProcessId { get; set; }
/// <summary>
/// 是否删除
/// </summary>
[Column("BISDELETE")]
public bool? BIsDelete { get; set; }
/// <summary>
/// 删除时间
/// </summary>
[Column("BDELETETIME")]
public DateTime? BDeleteTime { get; set; }
/// <summary>
/// 删除用户
/// </summary>
[Column("BDELETEUSER")]
public string BDeleteUser { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.BId = Guid.NewGuid().ToString();
var userinfo = LoginUserInfo.Get();
this.BName = userinfo.realName;
this.BDept = userinfo.departmentId;
this.BCreateTime = DateTime.Now;
this.BIsDelete = false;
this.BStatus = 0;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.BId = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsIBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-27 17:42
/// 描 述:基础信息上报
/// </summary>
public interface FD_BudgetBasicsIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<FD_BudgetBasicsEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取FD_BudgetBasics表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
FD_BudgetBasicsEntity GetFD_BudgetBasicsEntity(string keyValue);
/// <summary>
/// 获取FD_BudgetBasics表实体数据
/// </summary>
/// <param name="processId"></param>
/// <returns></returns>
FD_BudgetBasicsEntity GetFormDataByProcessId(string processId);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, FD_BudgetBasicsEntity entity);

void ChangeStatusById(string keyValue, int status, string processId);
#endregion

}
}

+ 195
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsService.cs View File

@@ -0,0 +1,195 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-27 17:42
/// 描 述:基础信息上报
/// </summary>
public class FD_BudgetBasicsService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FD_BudgetBasicsEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.BId,
t.BName,
t.BDept,
t.BCreateTime,
t.BRemarks,t.BStatus,t.BProcessId
");
strSql.Append(" FROM FD_BudgetBasics t ");
strSql.Append(" WHERE 1=1 and BIsDelete=0 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.BCreateTime >= @startTime AND t.BCreateTime <= @endTime ) ");
}
return this.BaseRepository("CollegeMIS").FindList<FD_BudgetBasicsEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

/// <summary>
/// 获取FD_BudgetBasics表实体数据
/// </summary>
/// <param name="processId">流程</param>
/// <returns></returns>
public FD_BudgetBasicsEntity GetFormDataByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<FD_BudgetBasicsEntity>(x => x.BProcessId == processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<FD_BudgetBasicsEntity>(t => t.BId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, FD_BudgetBasicsEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


/// <summary>
/// 修改审批状态
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
public void ChangeStatusById(string keyValue, int status, string processId)
{
try
{
BaseRepository("CollegeMis").ExecuteBySql("update FD_BudgetBasics set BStatus=" + status + ",BProcessId='" + processId + "' where BId='" + keyValue + "'", null);
}
catch (Exception ex)
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
#endregion

}
}

+ 205
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 10:40
/// 描 述:收入预算管理
/// </summary>
public class FD_IncomeManageBLL : FD_IncomeManageIBLL
{
private FD_IncomeManageService fD_IncomeManageService = new FD_IncomeManageService();

#region 获取数据

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


/// <summary>
/// 获取FD_IncomeManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<FD_IncomeManageEntity> GetIncomeList(string budgetType, string financeBudgetType)
{
try
{
return fD_IncomeManageService.GetIncomeList(budgetType, financeBudgetType);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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


/// <summary>
/// 获取左侧树形数据
/// <summary>
/// <returns></returns>
public List<TreeModel> GetTree()
{
try
{
DataTable list = fD_IncomeManageService.GetSqlTree("BudgetType");
DataTable childlist = fD_IncomeManageService.GetSqlTree("financeBudgetType");
List<TreeModel> treeList = new List<TreeModel>();
foreach (DataRow item in list.Rows)
{
TreeModel node = new TreeModel
{
id = item["f_itemdetailid"].ToString(),
text = item["f_itemname"].ToString(),
value = item["f_itemvalue"].ToString(),
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = ""
};
treeList.Add(node);
}
foreach (DataRow item in childlist.Rows)
{
TreeModel node = new TreeModel
{
id = item["f_itemdetailid"].ToString(),
text = item["f_itemname"].ToString(),
value = item["f_itemvalue"].ToString(),
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = "6f52162a-1886-457a-a080-6f8d1156c5df"
};
treeList.Add(node);
}
return treeList.ToTree();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
fD_IncomeManageService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

#endregion

}
}

+ 136
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageEntity.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 10:40
/// 描 述:收入预算管理
/// </summary>
public class FD_IncomeManageEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("IID")]
public string IId { get; set; }
/// <summary>
/// 一级分类
/// </summary>
[Column("ITOPTYPE")]
public string ITopType { get; set; }
/// <summary>
/// 二级分类
/// </summary>
[Column("ISECONDTYPE")]
public string ISecondType { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[Column("INAME")]
public string IName { get; set; }
/// <summary>
/// 项目编号
/// </summary>
[Column("IENCODE")]
public string IEnCode { get; set; }
/// <summary>
/// 人数
/// </summary>
[Column("IPEOPLENUM")]
public int? IPeopleNum { get; set; }
/// <summary>
/// 定额/申报金额/年度预计收入
/// </summary>
[Column("IQUOTA")]
public decimal? IQuota { get; set; }
/// <summary>
/// 年度实际收入
/// </summary>
[Column("IACTUAL")]
public decimal? IActual { get; set; }
/// <summary>
/// 金额/批复金额
/// </summary>
[Column("IAMOUNT")]
public decimal? IAmount { get; set; }
/// <summary>
/// 使用金额
/// </summary>
[Column("IUSEAMOUNT")]
public decimal? IUseAmount { get; set; }
/// <summary>
/// 剩余金额
/// </summary>
[Column("ISURPLUSAMOUNT")]
public decimal? ISurplusAmount { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("IREMARKS")]
public string IRemarks { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("ICREATETIME")]
public DateTime? ICreateTime { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Column("ICREATEUSERNAME")]
public string ICreateUserName { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Column("ICREATEUSERID")]
public string ICreateUserId { get; set; }
/// <summary>
/// 是否删除
/// </summary>
[Column("IISDELETE")]
public bool? IIsDelete { get; set; }
/// <summary>
/// 删除时间
/// </summary>
[Column("IDELETETIME")]
public DateTime? IDeleteTime { get; set; }
/// <summary>
/// 删除用户
/// </summary>
[Column("IDELETEUSER")]
public string IDeleteUser { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.IId = Guid.NewGuid().ToString();
this.IIsDelete = false;
this.ICreateTime=DateTime.Now;
var userinfo = LoginUserInfo.Get();
this.ICreateUserId = userinfo.userId;
this.ICreateUserName = userinfo.realName;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.IId = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageIBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 10:40
/// 描 述:收入预算管理
/// </summary>
public interface FD_IncomeManageIBLL
{
#region 获取数据

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

IEnumerable<FD_IncomeManageEntity> GetIncomeList(string budgetType, string financeBudgetType);
/// <summary>
/// 获取FD_IncomeManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
FD_IncomeManageEntity GetFD_IncomeManageEntity(string keyValue);
/// <summary>
/// 左侧树结构
/// </summary>
/// <returns></returns>
List<TreeModel> GetTree();
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, FD_IncomeManageEntity entity);
#endregion

}
}

+ 237
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageService.cs View File

@@ -0,0 +1,237 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 10:40
/// 描 述:收入预算管理
/// </summary>
public class FD_IncomeManageService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FD_IncomeManageEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.IId,
t.IEnCode,
t.IName,
t.ITopType,
t.ISecondType,
t.IPeopleNum,
t.IQuota,
t.IAmount,
t.IActual,
t.IRemarks,
isnull(t.IUseAmount,0) as IUseAmount,
isnull(t.ISurplusAmount,0) as ISurplusAmount
");
strSql.Append(" FROM FD_IncomeManage t ");
strSql.Append(" WHERE 1=1 and IIsDelete<>1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["IEnCode"].IsEmpty())
{
dp.Add("IEnCode", "%" + queryParam["IEnCode"].ToString() + "%", DbType.String);
strSql.Append(" AND t.IEnCode Like @IEnCode ");
}
if (!queryParam["IName"].IsEmpty())
{
dp.Add("IName", "%" + queryParam["IName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.IName Like @IName ");
}
if (!queryParam["ITopType"].IsEmpty())
{
dp.Add("ITopType", queryParam["ITopType"].ToString(), DbType.String);
strSql.Append(" AND t.ITopType = @ITopType ");
}
if (!queryParam["ISecondType"].IsEmpty())
{
dp.Add("ISecondType", queryParam["ISecondType"].ToString(), DbType.String);
strSql.Append(" AND t.ISecondType = @ISecondType ");
}
if (!queryParam["IQuota"].IsEmpty())
{
dp.Add("IQuota", "%" + queryParam["IQuota"].ToString() + "%", DbType.String);
strSql.Append(" AND t.IQuota Like @IQuota ");
}
if (!queryParam["IAmount"].IsEmpty())
{
dp.Add("IAmount", "%" + queryParam["IAmount"].ToString() + "%", DbType.String);
strSql.Append(" AND t.IAmount Like @IAmount ");
}
return this.BaseRepository("CollegeMIS").FindList<FD_IncomeManageEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取FD_IncomeManage列表
/// </summary>
/// <param name=""></param>
/// <returns></returns>
public IEnumerable<FD_IncomeManageEntity> GetIncomeList(string budgetType, string financeBudgetType)
{
try
{
var sql = "select IId,ITopType,ISurplusAmount,ISecondType,IName,IEnCode from [dbo].[FD_IncomeManage] WHERE IIsDelete=0 ";
if (!string.IsNullOrEmpty(budgetType))
sql += $" and ITopType='{budgetType}' ";
if (!string.IsNullOrEmpty(financeBudgetType))
sql += $" and ISecondType='{financeBudgetType}'";

return this.BaseRepository("CollegeMIS").FindList<FD_IncomeManageEntity>(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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


/// <summary>
/// 获取树形数据
/// </summary>
/// <returns></returns>
public DataTable GetSqlTree(string ItemCode)
{
try
{
return this.BaseRepository().FindTable($" SELECT * FROM dbo.LR_Base_DataItemDetail WHERE F_ItemId= (SELECT F_ItemId FROM dbo.LR_Base_DataItem WHERE F_ItemCode ='{ItemCode}') ");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<FD_IncomeManageEntity>(t => t.IId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, FD_IncomeManageEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 231
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 14:18
/// 描 述:支出预算管理
/// </summary>
public class FD_PayManageBLL : FD_PayManageIBLL
{
private FD_PayManageService fD_PayManageService = new FD_PayManageService();

#region 获取数据

/// <summary>
/// 获取左侧树形数据
/// <summary>
/// <returns></returns>
public List<TreeModel> GetTree()
{
try
{
DataTable list = fD_PayManageService.GetSqlTree();
List<TreeModel> treeList = new List<TreeModel>();
foreach (DataRow item in list.Rows)
{
TreeModel node = new TreeModel
{
id = item["f_itemvalue"].ToString(),
text = item["f_itemname"].ToString(),
value = item["f_itemvalue"].ToString(),
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = ""
};
treeList.Add(node);
}
return treeList.ToTree();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FD_PayManageEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return fD_PayManageService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

/// <summary>
/// 获取FD_PayManage表实体数据
/// </summary>
/// <returns></returns>
public FD_PayManageEntity GetFormDataByProcessId(string processId)
{
try
{
return fD_PayManageService.GetFormDataByProcessId(processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
fD_PayManageService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
/// <param name="processId"></param>
public void ChangeStatusById(string keyValue, int status, string processId)
{
try
{
fD_PayManageService.ChangeStatusById(keyValue, status, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


public void ChangeStatusByProcessId(string processId, int status)
{
try
{
fD_PayManageService.ChangeStatusByProcessId(processId, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 188
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageEntity.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 14:18
/// 描 述:支出预算管理
/// </summary>
public class FD_PayManageEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("PID")]
public string PId { get; set; }
/// <summary>
/// 支出报销类型
/// </summary>
[Column("PTYPE")]
public string PType { get; set; }
/// <summary>
/// 报销部门
/// </summary>
[Column("PDEPT")]
public string PDept { get; set; }
/// <summary>
/// 报销时间
/// </summary>
[Column("PTIME")]
public DateTime? PTime { get; set; }
/// <summary>
/// 报销用户
/// </summary>
[Column("PUSERNAME")]
public string PUserName { get; set; }
/// <summary>
/// 报销用户
/// </summary>
[Column("PUSERID")]
public string PUserId { get; set; }
/// <summary>
/// 付款方式
/// </summary>
[Column("PPAYTYPE")]
public string PPayType { get; set; }
/// <summary>
/// 付款类型,收款单位/个人账户
/// </summary>
[Column("PPAYMOLD")]
public int? PPayMold { get; set; }
/// <summary>
/// 收款单位名称
/// </summary>
[Column("PPAYEE")]
public string PPayee { get; set; }
/// <summary>
/// 收款单位银行
/// </summary>
[Column("PPAYEEBANK")]
public string PPayeeBank { get; set; }
/// <summary>
/// 收款单位账户
/// </summary>
[Column("PPAYEEBANKACCOUNT")]
public string PPayeeBankAccount { get; set; }
/// <summary>
/// 收款人
/// </summary>
[Column("PCOLLECTIONUSER")]
public string PCollectionUser { get; set; }
/// <summary>
/// 收款人银行1
/// </summary>
[Column("PCOLLECTIONBANK1")]
public string PCollectionBank1 { get; set; }
/// <summary>
/// 收款人银行账号1
/// </summary>
[Column("PCOLLECTIONBANKACCOUNT1")]
public string PCollectionBankAccount1 { get; set; }
/// <summary>
/// 收款人银行2
/// </summary>
[Column("PCOLLECTIONBANK2")]
public string PCollectionBank2 { get; set; }
/// <summary>
/// 收款人银行账号2
/// </summary>
[Column("PCOLLECTIONBANKACCOUNT2")]
public string PCollectionBankAccount2 { get; set; }
/// <summary>
/// 资金支出用途
/// </summary>
[Column("PPURPOSE")]
public string PPurpose { get; set; }
/// <summary>
/// 资金支出来源类型
/// </summary>
[Column("PTOPSOURCE")]
public string PTopSource { get; set; }
/// <summary>
/// 资金支出来源类型2
/// </summary>
[Column("PSECONDSOURCE")]
public string PSecondSource { get; set; }
/// <summary>
/// 资金支出来源
/// </summary>
[Column("PINCOMEID")]
public string PIncomeId { get; set; }
/// <summary>
/// 支出金额
/// </summary>
[Column("PAMOUNT")]
public decimal? PAmount { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("PREMARKS")]
public string PRemarks { get; set; }
/// <summary>
/// 附件
/// </summary>
[Column("PFILE")]
public string PFile { get; set; }
/// <summary>
/// 状态 0草稿,1审批中,2已通过,3已拒绝
/// </summary>
[Column("PSTATUS")]
public int? PStatus { get; set; }
/// <summary>
/// 流程Id
/// </summary>
[Column("PPROCESSID")]
public string PProcessId { get; set; }

/// <summary>
/// 是否删除
/// </summary>
[Column("PISDELETE")]
public bool? PIsDelete { get; set; }
/// <summary>
/// 删除时间
/// </summary>
[Column("PDELETETIME")]
public DateTime? PDeleteTime { get; set; }
/// <summary>
/// 删除用户
/// </summary>
[Column("PDELETEUSER")]
public string PDeleteUser { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.PId = Guid.NewGuid().ToString();
this.PIsDelete = false;
this.PStatus = 0;
this.PTime = DateTime.Now;
var userinfo = LoginUserInfo.Get();
this.PDept = userinfo.departmentId;
this.PUserName = userinfo.realName;
this.PUserId = userinfo.userId;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.PId = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 68
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageIBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 14:18
/// 描 述:支出预算管理
/// </summary>
public interface FD_PayManageIBLL
{
#region 获取数据
/// <summary>
/// 获取左侧树结构
/// </summary>
/// <returns></returns>
List<TreeModel> GetTree();
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<FD_PayManageEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取FD_PayManage表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
FD_PayManageEntity GetFD_PayManageEntity(string keyValue);
FD_PayManageEntity GetFormDataByProcessId(string processId);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, FD_PayManageEntity entity);

/// <summary>
/// 提交 修改状态
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
/// <param name="processId"></param>
void ChangeStatusById(string keyValue, int status, string processId);

/// <summary>
/// 流程--审核
/// </summary>
/// <param name="processId"></param>
/// <param name="status"></param>
void ChangeStatusByProcessId(string processId, int status);
#endregion

}
}

+ 308
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageService.cs View File

@@ -0,0 +1,308 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-28 14:18
/// 描 述:支出预算管理
/// </summary>
public class FD_PayManageService : RepositoryFactory
{
#region 获取数据
/// <summary>
/// 获取树形数据
/// </summary>
/// <returns></returns>
public DataTable GetSqlTree()
{
try
{
return this.BaseRepository().FindTable(" SELECT * FROM dbo.LR_Base_DataItemDetail WHERE F_ItemId= (SELECT F_ItemId FROM dbo.LR_Base_DataItem WHERE F_ItemCode ='payReimburseType') ");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<FD_PayManageEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.PId,
t.PType,
t.PPayType,
t.PPayee,
t.PPayeeBank,
t.PPayeeBankAccount,
t.PCollectionUser,
t.PCollectionBank1,
t.PCollectionBankAccount1,
t.PCollectionBank2,
t.PCollectionBankAccount2,
t.PPurpose,
t.PTopSource,
t.PIncomeId,
t.PAmount,
t.PStatus,
t.PProcessId,
t.PDept,
t.PTime,t.PUserName
");
strSql.Append(" FROM FD_PayManage t ");
strSql.Append(" WHERE 1=1 and PIsDelete<>1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["PType"].IsEmpty())
{
dp.Add("PType", queryParam["PType"].ToString(), DbType.String);
strSql.Append(" AND t.PType = @PType ");
}
if (!queryParam["PPayType"].IsEmpty())
{
dp.Add("PPayType", queryParam["PPayType"].ToString(), DbType.String);
strSql.Append(" AND t.PPayType = @PPayType ");
}
if (!queryParam["PPayee"].IsEmpty())
{
dp.Add("PPayee", "%" + queryParam["PPayee"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PPayee Like @PPayee ");
}
if (!queryParam["PCollectionUser"].IsEmpty())
{
dp.Add("PCollectionUser", "%" + queryParam["PCollectionUser"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PCollectionUser Like @PCollectionUser ");
}
if (!queryParam["PPurpose"].IsEmpty())
{
dp.Add("PPurpose", "%" + queryParam["PPurpose"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PPurpose Like @PPurpose ");
}
if (!queryParam["PTopSource"].IsEmpty())
{
dp.Add("PTopSource", queryParam["PTopSource"].ToString(), DbType.String);
strSql.Append(" AND t.PTopSource = @PTopSource ");
}
if (!queryParam["PAmount"].IsEmpty())
{
dp.Add("PAmount", "%" + queryParam["PAmount"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PAmount Like @PAmount ");
}
return this.BaseRepository("CollegeMIS").FindList<FD_PayManageEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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


/// <summary>
/// 获取FD_PayManage表实体数据
/// </summary>
/// <returns></returns>
public FD_PayManageEntity GetFormDataByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<FD_PayManageEntity>(x => x.PProcessId == processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<FD_PayManageEntity>(t => t.PId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, FD_PayManageEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 修改状态
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
/// <param name="processId"></param>
public void ChangeStatusById(string keyValue, int status, string processId)
{
try
{
string sql = "update FD_PayManage set PStatus=" + status + ",PProcessId='" + processId +
"' where PId='" + keyValue + "'";
BaseRepository("CollegeMis").ExecuteBySql(sql);
}
catch (Exception ex)
{
throw ExceptionEx.ThrowServiceException(ex);
}
}


/// <summary>
/// 修改审批状态
/// </summary>
/// <param name="processId"></param>
/// <param name="status"></param>
public void ChangeStatusByProcessId(string processId, int status)
{
var db = BaseRepository("CollegeMIS").BeginTrans();
try
{
var entity = db.FindEntity<FD_PayManageEntity>(x => x.PProcessId == processId);
//审批通过操作
if (status == 2)
{
var incomeEntity = db.FindEntity<FD_IncomeManageEntity>(x => x.IId == entity.PIncomeId);
if (incomeEntity != null)
{
//使用金额
if ((incomeEntity.IUseAmount + entity.PAmount) <= incomeEntity.IAmount)
{
incomeEntity.IUseAmount += entity.PAmount;
incomeEntity.ISurplusAmount = incomeEntity.IAmount - incomeEntity.IUseAmount;
db.Update(incomeEntity);
}
else
{
status = 0;
}
}
else
{
status = 0;
}
}

entity.PStatus = status;
db.Update(entity);
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
throw ExceptionEx.ThrowServiceException(ex);
}
}
#endregion

}
}

Loading…
Cancel
Save