瀏覽代碼

经费开支申报API

新疆警官学校中职
zhangli 2 年之前
父節點
當前提交
631a777bfe
共有 3 個文件被更改,包括 149 次插入1 次删除
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  3. +147
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FundsApplyApi.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js 查看文件

@@ -119,7 +119,7 @@ var bootstrap = function ($, learun) {
},
],
height: 400,
mainId: 'AAIId',
mainId: 'Id',
reloadSelected: false,
});
},


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj 查看文件

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


+ 147
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FundsApplyApi.cs 查看文件

@@ -0,0 +1,147 @@
using System;
using Nancy;
using Learun.Util;
using System.Collections.Generic;
using Learun.Application.TwoDevelopment.LogisticsManagement;
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using Learun.Application.WorkFlow;

namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-11-21 10:09
/// 描 述:考勤记录
/// </summary>
public class FundsApplyApi : BaseApi
{
private FundsApplyIBLL fundsApplyIBLL = new FundsApplyBLL();
private FundsApplyDetailIBLL fundsApplyDetailIBLL = new FundsApplyDetailBLL();
private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL();

/// <summary>
/// 注册接口
/// <summary>
public FundsApplyApi()
: base("/learun/adms/FundsApply")
{
Get["/pagelist"] = GetPageList;
Get["/form"] = GetForm;
Get["/getEnCode"] = GetEnCode;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
Post["/submit"] = Submit;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = fundsApplyIBLL.GetPageList(parameter.pagination, parameter.queryJson);
var jsonData = new
{
rows = data,
total = parameter.pagination.total,
page = parameter.pagination.page,
records = parameter.pagination.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var FundsApplyData = fundsApplyIBLL.GetFundsApplyEntity(keyValue);
var FundsApplyDetailData = fundsApplyDetailIBLL.GetListByApplyId(keyValue);
var jsonData = new
{
FundsApply = FundsApplyData,
FundsApplyDetail = FundsApplyDetailData,
};
return Success(jsonData);
}
/// <summary>
/// 获取申请单号
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetEnCode(dynamic _)
{
var jsonData = new
{
EnCode = "JFKZ_" + CommonHelper.CreateNo()
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
fundsApplyIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
FundsApplyEntity entity = parameter.strEntity.ToObject<FundsApplyEntity>();
List<FundsApplyDetailEntity> detailList = parameter.fundsApplyDetailList.ToObject<List<FundsApplyDetailEntity>>();

fundsApplyIBLL.SaveEntity(parameter.keyValue, entity, detailList);
return Success("保存成功!");
}
/// <summary>
/// 提交
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response Submit(dynamic _)
{
string keyValue = this.GetReqData();
var processId = Guid.NewGuid().ToString();
fundsApplyIBLL.ChangeStatusById(keyValue, 1, processId);
UserInfo userInfo = LoginUserInfo.Get();
nWFProcessIBLL.CreateFlow("LC_FundsApply", processId, "", 1, "", userInfo);
return Success("提交成功!");
}
#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity { get; set; }
public string fundsApplyDetailList { get; set; }
}
#endregion

}
}

Loading…
取消
儲存