StableVersion4.3/HL_FristAidPlatform_Bussiness/Service/T_Service_FirstAid_CallBLL.cs

156 lines
5.0 KiB
C#
Raw Permalink Normal View History

2024-03-11 09:47:34 +08:00
using HL_FristAidPlatform_DataBase;
using HL_FristAidPlatform_Help;
using HL_FristAidPlatform_IDataBase;
using HL_FristAidPlatform_Models;
using System;
namespace HL_FristAidPlatform_Bussiness
{
public class T_Service_FirstAid_CallBLL
{
private IT_Service_FirstAid_Call IService = new T_Service_FirstAid_CallDB();
private IT_Base_Hospital IHospital = new T_Base_HospitalDB();
public MessageModel<T_Service_FirstAid_Call> Add(T_Service_FirstAid_Call model)
{
if (GetMaxDispatchNo() != "")//存在事件编号
{
model.DispatchNo = GetMaxDispatchNo() + 1;
}
else
{
model.DispatchNo = DateTime.Now.ToString("yyyy-MM-dd").Replace("-", "") + "001";
}
var res = IHospital.GethospitalGUID(model.HospitalGuid);
if (IService.Add(model))
{
return new MessageModel<T_Service_FirstAid_Call> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_FirstAid_Call> { Success = false, Msg = "操作失败" };
}
}
public MessageModel<T_Service_FirstAid_Call> Delete(string GUID)
{
if (IService.Delete(GUID))
{
return new MessageModel<T_Service_FirstAid_Call> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_FirstAid_Call> { Success = false, Msg = "操作失败" };
}
}
public TableModel<DispatchModel> GetOfDispatch(string GUID)
{
return IService.GetOfDispatch(GUID);
}
public TableModel<T_Service_FirstAid_Call> Get(string GUID)
{
return IService.Get(GUID);
}
public TableModel<DispatchTaskModel> GetPageList(string hospitalGuid, string startTime, string endTime, int systmeModelId, int accidentType, string name, int gender, int pageIndex, int pageSize)
{
return IService.GetPageList(hospitalGuid,startTime,endTime,systmeModelId,accidentType,name,gender, pageIndex, pageSize);
}
public MessageModel<T_Service_FirstAid_Call> Update(T_Service_FirstAid_Call model)
{
if (IService.Update(model))
{
return new MessageModel<T_Service_FirstAid_Call> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_FirstAid_Call> { Success = false, Msg = "操作失败" };
}
}
/// <summary>
/// 获取最大的事件编号
/// </summary>
/// <returns></returns>
public string GetMaxDispatchNo()
{
return IService.GetMaxDispatchNo();
}
/// <summary>
/// 查询是否存在该患者
/// </summary>
/// <param name="patientGUID"></param>
/// <returns></returns>
public T_Service_FirstAid_Call GetPatientInfo(string patientGUID)
{
return IService.GetPatientInfo(patientGUID);
}
/// <summary>
/// 更新派车任务状态时间
/// </summary>
/// <param name="guid"></param>
/// <param name="type"></param>
/// <returns></returns>
public string UpdateTime(string guid, int type)
{
return IService.UpdateTime(guid, type);
}
/// <summary>
/// 更新异常原因
/// </summary>
/// <param name="model"></param>
public string UpadateAbnormalScheduling(AbnormalSchedulingModel model)
{
return IService.UpadateAbnormalScheduling(model);
}
/// <summary>
/// 出车统计详情
/// </summary>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <returns></returns>
public TableModel<T_Service_FirstAid_Call> GetCensusDetailList(string hospitalGuid, string startTime, string endTime,int pageIndex, int pageSize)
{
return IService.GetCensusDetailList(hospitalGuid, startTime, endTime,pageIndex, pageSize);
}
/// <summary>
/// 更新送往地址
/// </summary>
/// <param name="model"></param>
public void UpdateToAddress(UpdateToAddressModel model)
{
IService.UpdateToAddress(model);
}
/// <summary>
/// 获取此派车单的急救车信息
/// </summary>
/// <param name="guid"></param>
/// <returns></returns>
public string GetAmbulanceList(string guid)
{
return IService.GetAmbulanceList(guid);
}
/// <summary>
/// 获取此派车单的出车人员信息
/// </summary>
/// <param name="guid"></param>
/// <returns></returns>
public string GetPerList(string guid)
{
return IService.GetPerList(guid);
}
}
}