104 lines
3.4 KiB
C#
104 lines
3.4 KiB
C#
using HL_FristAidPlatform_DataBase;
|
|
using HL_FristAidPlatform_Help;
|
|
using HL_FristAidPlatform_IDataBase;
|
|
using HL_FristAidPlatform_Models;
|
|
|
|
namespace HL_FristAidPlatform_Bussiness
|
|
{
|
|
public class T_SYS_UserHospitalBLL
|
|
{
|
|
private IT_SYS_UserHospital IService = new T_SYS_UserHospitalDB();
|
|
|
|
public MessageModel<T_SYS_UserHospital> Add(T_SYS_UserHospital userRole)
|
|
{
|
|
if (IService.Add(userRole))
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
public MessageModel<T_SYS_UserHospital> Update(T_SYS_UserHospital userRole)
|
|
{
|
|
if (IService.Update(userRole))
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
public MessageModel<T_SYS_UserHospital> Dels(dynamic[] guids)
|
|
{
|
|
if (IService.Dels(guids))
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 逻辑删除
|
|
/// </summary>
|
|
/// <param name="guid">GUID</param>
|
|
/// <param name="deleteFlag">标记:0取消删除 1删除</param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_UserHospital> LogicalDelete(string guid, int deleteFlag)
|
|
{
|
|
if (IService.LogicalDelete(guid, deleteFlag) > 0)
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据院区编号(GUID)物理删除
|
|
/// 用于删除院区时同时删除所有用户的关联信息
|
|
/// </summary>
|
|
/// <param name="hospitalGuid">院区编号(GUID)</param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_UserHospital> DeleteByHospitalGuid(string hospitalGuid)
|
|
{
|
|
if (IService.DeleteByHospitalGuid(hospitalGuid) > 0)
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserHospital> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
public T_SYS_UserHospital Get(string guid)
|
|
{
|
|
return IService.Get(guid);
|
|
}
|
|
|
|
public TableModel<T_SYS_UserHospital> GetList()
|
|
{
|
|
return IService.GetList();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据用户ID获取所拥有的角色列表
|
|
/// </summary>
|
|
/// <param name="userID">用户ID</param>
|
|
/// <returns></returns>
|
|
public TableModel<T_SYS_UserHospitalModel> GetListByUserID(long userID)
|
|
{
|
|
return IService.GetListByUserID(userID);
|
|
}
|
|
}
|
|
}
|