diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs index a574ac806..647d310a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs @@ -11,7 +11,7 @@ namespace Learun.Application.WebApi.Modules /// 日 期:2018.01.03 /// 描 述:自定义表单处理接口 /// - public class FormApi: BaseApi + public class FormApi : BaseApi { /// /// 注册接口 @@ -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 req = this.GetReqData>();// 获取模板请求数据 - Dictionary schemeList = new Dictionary(); - foreach (var item in req) { + Dictionary schemeList = new Dictionary(); + 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); } - + /// + /// 上传文件夹ID + /// + /// + /// + private Response GetFolderkey(dynamic _) + { + List req = this.GetReqData>();// 获取模板请求数据 + Dictionary dic = new Dictionary(); + 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); + } /// /// 保存表单数据 @@ -104,7 +126,36 @@ namespace Learun.Application.WebApi.Modules } #region 请求参数 - private class SchemeReq { + + private class FolderKeyReq + { + /// + /// 表单请求Id + /// + public string id { get; set; } + /// + /// 当前自定义表单版本号 + /// + public string ver { get; set; } + /// + /// 流程模板id + /// + public string schemeInfoId { get; set; } + /// + /// 关联字段名称 + /// + public string processIdName { get; set; } + /// + /// 数据主键值 + /// + public string keyValue { get; set; } + /// + /// 表单数据 + /// + public string formData { get; set; } + } + private class SchemeReq + { /// /// 表单请求Id /// @@ -141,8 +192,8 @@ namespace Learun.Application.WebApi.Modules #endregion } - - + + } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs index 571d48c9d..72444597a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs @@ -137,5 +137,7 @@ namespace Learun.Application.Form /// 数据主键值 void DeleteInstanceForm(string schemeInfoId, string keyValue); #endregion + + Dictionary GetFolderKey(string itemSchemeInfoId, string itemProcessIdName, string itemKeyValue); } }