using HL_FristAidPlatform_DataBase; using HL_FristAidPlatform_Help; using HL_FristAidPlatform_IDataBase; using HL_FristAidPlatform_Models; namespace HL_FristAidPlatform_Bussiness { /// ///患者转归 V2.1版 /// public class T_Service_ChestPain_OutComeInfoBLL { private IT_Service_ChestPain_OutComeInfo IService = new T_Service_ChestPain_OutComeInfoDB(); #region 增 /// /// 增加一条数据 /// /// 实体 /// public MessageModel Add(T_Service_ChestPain_OutComeInfo model) { if (IService.Add(model)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } /// /// 新增 仅更新赋值的字段 /// /// /// public MessageModel AddNotNullColumns(T_Service_ChestPain_OutComeInfo model) { if (IService.AddNotNullColumns(model)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } /// /// 新增 仅更新赋值的字段 /// 用于移动端 /// /// 实体类 /// public MessageModel AddForApp(T_Service_ChestPain_OutComeInfo model) { if (IService.AddForApp(model)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } #endregion #region 删 /// /// 删除一条数据 /// /// 主键 /// public MessageModel Delete(long ID) { if (IService.Delete(ID)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } #endregion #region 改 /// /// 更新一条数据 /// /// 实体 /// public MessageModel Update(T_Service_ChestPain_OutComeInfo model) { if (IService.Update(model)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } private void updateTime(T_Service_ChestPain_OutComeInfo model) { T_Service_ChestPain_OutComeInfo t_Service_ChestPain_OutComeInfo = new T_Service_ChestPain_OutComeInfo(); t_Service_ChestPain_OutComeInfo = IService.GetModel(model.PatientGuid); if (t_Service_ChestPain_OutComeInfo != null) { if (model.Diagnosis_Time == null) { t_Service_ChestPain_OutComeInfo.Diagnosis_Time = null; } if (model.Leave_Time == null) { t_Service_ChestPain_OutComeInfo.Leave_Time = null; } if (model.Hand_Time == null) { t_Service_ChestPain_OutComeInfo.Hand_Time = null; } if (model.Start_Radiography_Time == null) { t_Service_ChestPain_OutComeInfo.Start_Radiography_Time = null; } if (model.Decision_Operation_Time == null) { t_Service_ChestPain_OutComeInfo.Decision_Operation_Time = null; } if (model.Trans_ECG_Time == null) { t_Service_ChestPain_OutComeInfo.Trans_ECG_Time = null; } if (model.Transfer_Date == null) { t_Service_ChestPain_OutComeInfo.Transfer_Date = null; } if (model.Death_Time == null) { t_Service_ChestPain_OutComeInfo.Death_Time = null; } if (model.BALLOON_EXPANSION_TIME == null) { t_Service_ChestPain_OutComeInfo.BALLOON_EXPANSION_TIME = null; } IService.updateTime(t_Service_ChestPain_OutComeInfo); } } /// /// 仅更新赋值的字段 /// /// 实体类 /// public MessageModel UpdateNotNullColumns(T_Service_ChestPain_OutComeInfo model) { if (IService.UpdateNotNullColumns(model)) { // updateTime(model); return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } /// /// 修改--仅更新赋值的字段 /// 用于移动端 /// /// 实体类 /// public MessageModel UpdateForApp(T_Service_ChestPain_OutComeInfo model) { if (IService.UpdateForApp(model)) { // updateTime(model); return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } #endregion #region 查 /// /// 得到一个对象实体 /// /// 主键 /// public T_Service_ChestPain_OutComeInfo GetModel(string GUID) { return IService.GetModel(GUID); } /// /// 根据分页获得数据列表 /// /// 起始页 /// 每页条数 /// public TableModel GetPageList(int pageIndex, int pageSize) { return IService.GetPageList(pageIndex, pageSize); } /// /// 根据患者编号(GUID) 获取数据信息 /// /// 病人编号(GUID) /// public TableModel GetByPatientGuid(string patientGuid) { return IService.GetByPatientGuid(patientGuid); } /// /// 查--根据患者编号(GUID) 获取数据信息 /// 用于移动端 /// /// 病人编号(GUID) /// public TableModel GetByPatientGuidForApp(string patientGuid) { return IService.GetByPatientGuidForApp(patientGuid); } #endregion /// /// 获取STEMI初步诊断时间 /// /// /// public string GetSTEMIDiagnosisTime(string patientGuid) { return IService.GetSTEMIDiagnosisTime(patientGuid); } } }