63 lines
3.1 KiB
C#
63 lines
3.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web.Http;
|
|
using System.Web.Http.Description;
|
|
using Newtonsoft.Json;
|
|
using HZQR.Common;
|
|
|
|
namespace CommercialApi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 业务审批相关接口
|
|
/// </summary>
|
|
public class BusinessProcessController : BaseController
|
|
{
|
|
#region 方法 -> 获取业务审批列表
|
|
/// <summary>
|
|
/// 获取业务审批列表
|
|
/// </summary>
|
|
/// <param name="MembershipId">会员内码</param>
|
|
/// <param name="OperationType">业务类型</param>
|
|
/// <param name="BusinessProcessState">流程状态</param>
|
|
/// <param name="StartDate">查询开始时间</param>
|
|
/// <param name="EndDate">查询结束时间</param>
|
|
/// <param name="ModuleGuid">模块权限</param>
|
|
/// <param name="PageIndex">查询页码数</param>
|
|
/// <param name="PageSize">每页显示行数</param>
|
|
/// <param name="SortStr">排序字段</param>
|
|
/// <returns></returns>
|
|
[Route("BusinessProcess/GetBusinessProcessList")]
|
|
[AcceptVerbs("GET")]
|
|
[ResponseType(typeof(Models.JsonMsg<Models.JsonList<Model.BusinessProcessModel>>))]
|
|
public IHttpActionResult GetBusinessProcessList(int MembershipId, string OperationType = null, string BusinessProcessState = "",
|
|
string StartDate = "", string EndDate = "", string ModuleGuid = "", int PageIndex = 1, int PageSize = 10, string SortStr = "")
|
|
{
|
|
string Parameter = "入参信息:会员内码【" + MembershipId + "】,业务类型【" + OperationType + "】," +
|
|
"流程状态【" + BusinessProcessState + "】,查询开始时间【" + StartDate + "】,查询结束时间【" + EndDate + "】," +
|
|
"模块权限【"+ ModuleGuid + "】,查询页码数【" + PageIndex + "】,每页显示行数【" + PageSize + "】,排序字段【" + SortStr + "】";
|
|
try
|
|
{
|
|
int TotalCount = 0;
|
|
//获取项目实例表列表
|
|
List<Model.BusinessProcessModel> BusinessProcessList = GeneralMethod.BusinessProcessHelper.GetBusinessProcessList(
|
|
transaction, ref TotalCount, MembershipId, OperationType, BusinessProcessState,
|
|
StartDate, EndDate, ModuleGuid, PageIndex, PageSize, SortStr);
|
|
|
|
//转化json形式
|
|
Models.JsonList<Model.BusinessProcessModel> jsonList = Models.JsonList<Model.BusinessProcessModel>.Success(
|
|
BusinessProcessList, TotalCount, PageIndex, PageSize);
|
|
|
|
return Ok(Models.JsonMsg<Models.JsonList<Model.BusinessProcessModel>>.Success(jsonList, 100, "查询成功"));
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
//事务回滚
|
|
transaction.Rollback();
|
|
LogUtil.WriteLog(null, "查询失败!失败原因:" + ex.Message + "\r\n" + Parameter,
|
|
DateTime.Now.ToString("yyyyMMdd") + "_GetBusinessProcessList");
|
|
return Ok(GeneralMethod.Common.ReturnJson(999, "查询失败" + ex.Message));
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
} |