Browse Source

财务预算

金隅分支
zhangli 3 years ago
parent
commit
9e1862408a
11 changed files with 120 additions and 11 deletions
  1. +10
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_IncomeManageController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_PayManageController.cs
  3. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.js
  4. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.js
  5. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  6. +4
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageService.cs
  7. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageBLL.cs
  8. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageIBLL.cs
  9. +43
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageService.cs
  10. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  11. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/FD_PayManageMethod.cs

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

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

@@ -72,8 +72,9 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var FD_IncomeManageData = fD_IncomeManageIBLL.GetFD_IncomeManageEntity( keyValue );
var jsonData = new {
var FD_IncomeManageData = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue);
var jsonData = new
{
FD_IncomeManage = FD_IncomeManageData,
};
return Success(jsonData);
@@ -110,7 +111,11 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
FD_IncomeManageEntity entity = strEntity.ToObject<FD_IncomeManageEntity>();
fD_IncomeManageIBLL.SaveEntity(keyValue,entity);
if (entity.IAmount <= 0)
return Fail("金额必须大于0!");
entity.IUseAmount = 0;
entity.ISurplusAmount = entity.IAmount;
fD_IncomeManageIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}


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

@@ -112,7 +112,7 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
{
list.Add(new
{
text = item.IName,
text = item.IName + "(剩余金额:" + item.ISurplusAmount + ")",
value = item.IId,
});
}


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.js View File

@@ -85,7 +85,7 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList',
headData: [
{ label: "项目编号", name: "IEnCode", width: 100, align: "left" },
@@ -119,6 +119,8 @@ var bootstrap = function ($, learun) {
{ label: "年度预计收入", name: "IQuota", width: 150, align: "left" },
{ label: "年度实际收入", name: "IActual", width: 100, align: "left" },
{ label: "金额/批复金额", name: "IAmount", width: 150, align: "left" },
{ label: "使用金额", name: "IUseAmount", width: 150, align: "left" },
{ label: "剩余金额", name: "ISurplusAmount", width: 150, align: "left" },
{ label: "备注", name: "IRemarks", width: 100, align: "left" },
],
mainId: 'IId',


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.js View File

@@ -92,6 +92,7 @@ var bootstrap = function ($, learun) {
return;
}
var pTopSource = $('#gridtable').jfGridValue('PTopSource');
var type = '';
if (pTopSource == '1' || pTopSource == '2') {
type = '1';
@@ -103,7 +104,7 @@ var bootstrap = function ($, learun) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) {
refreshGirdData(res, {});
refreshGirdData(res, {}, type);
});
}
});
@@ -223,6 +224,7 @@ var bootstrap = function ($, learun) {
schemeCode = 'publicFunds';
else
schemeCode = 'specialUseFunds';

if (schemeCode) {
var postData = {
schemeCode: schemeCode,// 填写流程对应模板编号


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config View File

@@ -28,6 +28,7 @@
<typeAlias alias="OA_NewsMethod" type="Learun.Application.WorkFlow.OA_NewsMethod,Learun.Application.WorkFlow" />
<typeAlias alias="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" />
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" />
<typeAlias alias="FD_PayManageMethod" type="Learun.Application.WorkFlow.FD_PayManageMethod,Learun.Application.WorkFlow" />

<!--任务调度器-->
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" />
@@ -66,6 +67,7 @@
<type type="IWorkFlowMethod" mapTo="OA_NewsMethod" name="OA_NewsMethod"></type>
<type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type>
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type>
<type type="IWorkFlowMethod" mapTo="FD_PayManageMethod" name="FD_PayManageMethod"></type>

</container>



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

@@ -41,7 +41,9 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
t.IQuota,
t.IAmount,
t.IActual,
t.IRemarks
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 ");
@@ -101,7 +103,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
try
{
var sql = "select IId,ITopType,ISecondType,IName,IEnCode from [dbo].[FD_IncomeManage] WHERE IIsDelete=0 ";
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))


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

@@ -167,6 +167,26 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
}
}
}


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

}


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

@@ -52,6 +52,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <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

}


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

@@ -50,7 +50,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
t.PStatus
");
strSql.Append(" FROM FD_PayManage t ");
strSql.Append(" WHERE 1=1 ");
strSql.Append(" WHERE 1=1 and PIsDelete<>1");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
@@ -232,6 +232,48 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
}
}


/// <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;
}
}
}

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

}


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

@@ -96,6 +96,7 @@
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" />
<Compile Include="NodeMethod\ADR_AddApplyMethod.cs" />
<Compile Include="NodeMethod\Ass_AcceptanceMethod.cs" />
<Compile Include="NodeMethod\FD_PayManageMethod.cs" />
<Compile Include="NodeMethod\Ass_ReceiveMethod.cs" />
<Compile Include="NodeMethod\MeetingManagementApplyMethod.cs" />
<Compile Include="NodeMethod\SW_Ask_StudentMainMethod.cs" />


+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/FD_PayManageMethod.cs View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement;

namespace Learun.Application.WorkFlow
{
public class FD_PayManageMethod : IWorkFlowMethod
{
FD_PayManageIBLL fD_PayManage = new FD_PayManageBLL();


public void Execute(WfMethodParameter parameter)
{
if (parameter.code == "agree")
{
fD_PayManage.ChangeStatusByProcessId(parameter.processId, 2);
}
else
{
fD_PayManage.ChangeStatusByProcessId(parameter.processId, 0);
}
}
}
}

Loading…
Cancel
Save