@@ -28,6 +28,8 @@ namespace Learun.Application.WebApi | |||||
Get["/form"] = GetForm; | Get["/form"] = GetForm; | ||||
Post["/delete"] = DeleteForm; | Post["/delete"] = DeleteForm; | ||||
Post["/save"] = SaveForm; | Post["/save"] = SaveForm; | ||||
Post["/read"] = NewsRead; | |||||
} | } | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -112,6 +114,17 @@ namespace Learun.Application.WebApi | |||||
sys_ReceiveFileIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | sys_ReceiveFileIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 查阅公文 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response NewsRead(dynamic _) | |||||
{ | |||||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||||
sys_ReceiveFileIBLL.ReadEntity(parameter.keyValue); | |||||
return Success("查阅成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
#region 私有类 | #region 私有类 | ||||
@@ -110,6 +110,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string FilePath { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -166,6 +166,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
var result = this.BaseRepository().FindEntity<SYS_ReceiveMessageEntity>(keyValue); | var result = this.BaseRepository().FindEntity<SYS_ReceiveMessageEntity>(keyValue); | ||||
result.FilePath = result.URL; | |||||
result.URL = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_FolderId == result.URL)?.F_FilePath; | result.URL = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_FolderId == result.URL)?.F_FilePath; | ||||
if (!string.IsNullOrEmpty(result.URL)) | if (!string.IsNullOrEmpty(result.URL)) | ||||
{ | { | ||||