瀏覽代碼

app2.0手机端 上传文件获取文件夹id

娄底高职分支
ndbs 2 年之前
父節點
當前提交
cabb9b45a5
共有 2 個文件被更改,包括 62 次插入9 次删除
  1. +60
    -9
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs
  2. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs

+ 60
- 9
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs 查看文件

@@ -11,7 +11,7 @@ namespace Learun.Application.WebApi.Modules
/// 日 期:2018.01.03
/// 描 述:自定义表单处理接口
/// </summary>
public class FormApi: BaseApi
public class FormApi : BaseApi
{
/// <summary>
/// 注册接口
@@ -21,6 +21,7 @@ namespace Learun.Application.WebApi.Modules
{
Get["/scheme"] = GetScheme;
Get["/data"] = GetData;
Get["/folderkey"] = GetFolderkey;

Post["/save"] = Save;
Post["/delete"] = DeleteForm;
@@ -35,12 +36,15 @@ namespace Learun.Application.WebApi.Modules
private Response GetScheme(dynamic _)
{
List<SchemeReq> req = this.GetReqData<List<SchemeReq>>();// 获取模板请求数据
Dictionary<string,FormSchemeEntity> schemeList = new Dictionary<string,FormSchemeEntity>();
foreach (var item in req) {
Dictionary<string, FormSchemeEntity> schemeList = new Dictionary<string, FormSchemeEntity>();
foreach (var item in req)
{
FormSchemeInfoEntity schemeInfoEntity = formSchemeIBLL.GetSchemeInfoEntity(item.id);
if (schemeInfoEntity != null) {
if (schemeInfoEntity != null)
{
FormSchemeEntity schemeEntity = formSchemeIBLL.GetSchemeEntity(schemeInfoEntity.F_SchemeId);
if (schemeEntity != null) {
if (schemeEntity != null)
{
if (schemeInfoEntity.F_SchemeId != item.ver)
{
schemeList.Add(item.id, schemeEntity);
@@ -75,7 +79,25 @@ namespace Learun.Application.WebApi.Modules
return Success(dic);

}

/// <summary>
/// 上传文件夹ID
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
private Response GetFolderkey(dynamic _)
{
List<FolderKeyReq> req = this.GetReqData<List<FolderKeyReq>>();// 获取模板请求数据
Dictionary<string, string> dic = new Dictionary<string, string>();
foreach (var item in req)
{
if (!string.IsNullOrEmpty(item.processIdName))
{
var data = formSchemeIBLL.GetFolderKey(item.schemeInfoId, item.processIdName, item.keyValue);//
dic = data;
}
}
return Success(dic);
}

/// <summary>
/// 保存表单数据
@@ -104,7 +126,36 @@ namespace Learun.Application.WebApi.Modules
}

#region 请求参数
private class SchemeReq {

private class FolderKeyReq
{
/// <summary>
/// 表单请求Id
/// </summary>
public string id { get; set; }
/// <summary>
/// 当前自定义表单版本号
/// </summary>
public string ver { get; set; }
/// <summary>
/// 流程模板id
/// </summary>
public string schemeInfoId { get; set; }
/// <summary>
/// 关联字段名称
/// </summary>
public string processIdName { get; set; }
/// <summary>
/// 数据主键值
/// </summary>
public string keyValue { get; set; }
/// <summary>
/// 表单数据
/// </summary>
public string formData { get; set; }
}
private class SchemeReq
{
/// <summary>
/// 表单请求Id
/// </summary>
@@ -141,8 +192,8 @@ namespace Learun.Application.WebApi.Modules
#endregion
}





}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs 查看文件

@@ -137,5 +137,7 @@ namespace Learun.Application.Form
/// <param name="keyValue">数据主键值</param>
void DeleteInstanceForm(string schemeInfoId, string keyValue);
#endregion

Dictionary<string, string> GetFolderKey(string itemSchemeInfoId, string itemProcessIdName, string itemKeyValue);
}
}

Loading…
取消
儲存