@@ -27,7 +27,7 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Index() | public ActionResult Index() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 表单页 | /// 表单页 | ||||
@@ -36,7 +36,7 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Form() | public ActionResult Form() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
#endregion | #endregion | ||||
@@ -72,8 +72,9 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetFormData(string keyValue) | 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, | FD_IncomeManage = FD_IncomeManageData, | ||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
@@ -110,7 +111,11 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
FD_IncomeManageEntity entity = strEntity.ToObject<FD_IncomeManageEntity>(); | 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)) | if (string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
} | } | ||||
@@ -112,7 +112,7 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||||
{ | { | ||||
list.Add(new | list.Add(new | ||||
{ | { | ||||
text = item.IName, | |||||
text = item.IName + "(剩余金额:" + item.ISurplusAmount + ")", | |||||
value = item.IId, | value = item.IId, | ||||
}); | }); | ||||
} | } | ||||
@@ -85,7 +85,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList', | url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "项目编号", name: "IEnCode", width: 100, align: "left" }, | { label: "项目编号", name: "IEnCode", width: 100, align: "left" }, | ||||
@@ -119,6 +119,8 @@ var bootstrap = function ($, learun) { | |||||
{ label: "年度预计收入", name: "IQuota", width: 150, align: "left" }, | { label: "年度预计收入", name: "IQuota", width: 150, align: "left" }, | ||||
{ label: "年度实际收入", name: "IActual", width: 100, align: "left" }, | { label: "年度实际收入", name: "IActual", width: 100, align: "left" }, | ||||
{ label: "金额/批复金额", name: "IAmount", width: 150, 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" }, | { label: "备注", name: "IRemarks", width: 100, align: "left" }, | ||||
], | ], | ||||
mainId: 'IId', | mainId: 'IId', | ||||
@@ -92,6 +92,7 @@ var bootstrap = function ($, learun) { | |||||
return; | return; | ||||
} | } | ||||
var pTopSource = $('#gridtable').jfGridValue('PTopSource'); | var pTopSource = $('#gridtable').jfGridValue('PTopSource'); | ||||
var type = ''; | var type = ''; | ||||
if (pTopSource == '1' || pTopSource == '2') { | if (pTopSource == '1' || pTopSource == '2') { | ||||
type = '1'; | type = '1'; | ||||
@@ -103,7 +104,7 @@ var bootstrap = function ($, learun) { | |||||
if (res) { | if (res) { | ||||
processId = learun.newGuid(); | processId = learun.newGuid(); | ||||
learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | 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'; | schemeCode = 'publicFunds'; | ||||
else | else | ||||
schemeCode = 'specialUseFunds'; | schemeCode = 'specialUseFunds'; | ||||
if (schemeCode) { | if (schemeCode) { | ||||
var postData = { | var postData = { | ||||
schemeCode: schemeCode,// 填写流程对应模板编号 | schemeCode: schemeCode,// 填写流程对应模板编号 | ||||
@@ -28,6 +28,7 @@ | |||||
<typeAlias alias="OA_NewsMethod" type="Learun.Application.WorkFlow.OA_NewsMethod,Learun.Application.WorkFlow" /> | <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="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,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" /> | <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="OA_NewsMethod" name="OA_NewsMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type> | <type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | <type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="FD_PayManageMethod" name="FD_PayManageMethod"></type> | |||||
</container> | </container> | ||||
@@ -41,7 +41,9 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
t.IQuota, | t.IQuota, | ||||
t.IAmount, | t.IAmount, | ||||
t.IActual, | 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(" FROM FD_IncomeManage t "); | ||||
strSql.Append(" WHERE 1=1 and IIsDelete<>1 "); | strSql.Append(" WHERE 1=1 and IIsDelete<>1 "); | ||||
@@ -101,7 +103,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
{ | { | ||||
try | 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)) | if (!string.IsNullOrEmpty(budgetType)) | ||||
sql += $" and ITopType='{budgetType}' "; | sql += $" and ITopType='{budgetType}' "; | ||||
if (!string.IsNullOrEmpty(financeBudgetType)) | if (!string.IsNullOrEmpty(financeBudgetType)) | ||||
@@ -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 | #endregion | ||||
} | } | ||||
@@ -52,6 +52,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
/// <param name="processId"></param> | /// <param name="processId"></param> | ||||
void ChangeStatusById(string keyValue, int status, string processId); | 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 | #endregion | ||||
} | } | ||||
@@ -50,7 +50,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
t.PStatus | t.PStatus | ||||
"); | "); | ||||
strSql.Append(" FROM FD_PayManage t "); | strSql.Append(" FROM FD_PayManage t "); | ||||
strSql.Append(" WHERE 1=1 "); | |||||
strSql.Append(" WHERE 1=1 and PIsDelete<>1"); | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | 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 | #endregion | ||||
} | } | ||||
@@ -96,6 +96,7 @@ | |||||
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" /> | <Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" /> | ||||
<Compile Include="NodeMethod\ADR_AddApplyMethod.cs" /> | <Compile Include="NodeMethod\ADR_AddApplyMethod.cs" /> | ||||
<Compile Include="NodeMethod\Ass_AcceptanceMethod.cs" /> | <Compile Include="NodeMethod\Ass_AcceptanceMethod.cs" /> | ||||
<Compile Include="NodeMethod\FD_PayManageMethod.cs" /> | |||||
<Compile Include="NodeMethod\Ass_ReceiveMethod.cs" /> | <Compile Include="NodeMethod\Ass_ReceiveMethod.cs" /> | ||||
<Compile Include="NodeMethod\MeetingManagementApplyMethod.cs" /> | <Compile Include="NodeMethod\MeetingManagementApplyMethod.cs" /> | ||||
<Compile Include="NodeMethod\SW_Ask_StudentMainMethod.cs" /> | <Compile Include="NodeMethod\SW_Ask_StudentMainMethod.cs" /> | ||||
@@ -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); | |||||
} | |||||
} | |||||
} | |||||
} |