102 lines
3.2 KiB
C#
102 lines
3.2 KiB
C#
using HL_FristAidPlatform_DataBase;
|
|
using HL_FristAidPlatform_Help;
|
|
using HL_FristAidPlatform_IDataBase;
|
|
using HL_FristAidPlatform_Models;
|
|
using System.Collections.Generic;
|
|
|
|
namespace HL_FristAidPlatform_Bussiness
|
|
{
|
|
public class T_SYS_DepartmentsBLL
|
|
{
|
|
private IT_SYS_Departments IService = new T_SYS_DepartmentsDB();
|
|
|
|
public MessageModel<T_SYS_Departments> Add(T_SYS_Departments entity)
|
|
{
|
|
if (IService.Add(entity))
|
|
{
|
|
return new MessageModel<T_SYS_Departments> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_Departments> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
public MessageModel<T_SYS_Departments> Dels(dynamic[] ids)
|
|
{
|
|
if (IService.Dels(ids))
|
|
{
|
|
return new MessageModel<T_SYS_Departments> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_Departments> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
public T_SYS_Departments Get(long id)
|
|
{
|
|
return IService.Get(id);
|
|
}
|
|
|
|
public TableModel<T_SYS_DepartmentsModel> GetPageList(int pageIndex, int pageSize, string keyWord)
|
|
{
|
|
return IService.GetPageList(pageIndex, pageSize, keyWord);
|
|
}
|
|
|
|
public TableModel<T_SYS_Departments> GetList()
|
|
{
|
|
return IService.GetList();
|
|
}
|
|
|
|
public MessageModel<T_SYS_Departments> Update(T_SYS_Departments entity)
|
|
{
|
|
if (IService.Update(entity))
|
|
{
|
|
return new MessageModel<T_SYS_Departments> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_Departments> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 逻辑删除
|
|
/// </summary>
|
|
/// <param name="id">编号</param>
|
|
/// <param name="deleteFlag">标记:0取消删除 1删除</param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_Departments> LogicalDelete(long id, int deleteFlag)
|
|
{
|
|
if (IService.LogicalDelete(id, deleteFlag) > 0)
|
|
{
|
|
return new MessageModel<T_SYS_Departments> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_Departments> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取指定院区拥有的所有科室
|
|
/// </summary>
|
|
/// <param name="hospitalGuid">医院编号(GUID)</param>
|
|
/// <returns></returns>
|
|
public TableModel<T_SYS_Departments> GetListByHospitalGuid(string hospitalGuid)
|
|
{
|
|
return IService.GetListByHospitalGuid(hospitalGuid);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取所有随访科室
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public List<string> GetListForFollowUp()
|
|
{
|
|
return IService.GetListForFollowUp();
|
|
}
|
|
}
|
|
}
|