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 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 { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } public MessageModel Delete(string GUID) { if (IService.Delete(GUID)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } public TableModel GetOfDispatch(string GUID) { return IService.GetOfDispatch(GUID); } public TableModel Get(string GUID) { return IService.Get(GUID); } public TableModel 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 Update(T_Service_FirstAid_Call model) { if (IService.Update(model)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } /// /// 获取最大的事件编号 /// /// public string GetMaxDispatchNo() { return IService.GetMaxDispatchNo(); } /// /// 查询是否存在该患者 /// /// /// public T_Service_FirstAid_Call GetPatientInfo(string patientGUID) { return IService.GetPatientInfo(patientGUID); } /// /// 更新派车任务状态时间 /// /// /// /// public string UpdateTime(string guid, int type) { return IService.UpdateTime(guid, type); } /// /// 更新异常原因 /// /// public string UpadateAbnormalScheduling(AbnormalSchedulingModel model) { return IService.UpadateAbnormalScheduling(model); } /// /// 出车统计详情 /// /// /// /// public TableModel GetCensusDetailList(string hospitalGuid, string startTime, string endTime,int pageIndex, int pageSize) { return IService.GetCensusDetailList(hospitalGuid, startTime, endTime,pageIndex, pageSize); } /// /// 更新送往地址 /// /// public void UpdateToAddress(UpdateToAddressModel model) { IService.UpdateToAddress(model); } /// /// 获取此派车单的急救车信息 /// /// /// public string GetAmbulanceList(string guid) { return IService.GetAmbulanceList(guid); } /// /// 获取此派车单的出车人员信息 /// /// /// public string GetPerList(string guid) { return IService.GetPerList(guid); } } }