/// <summary> /// 保存手术间字典数据信息 /// </summary> private void SaveOperatingRoom(ref TransactionParamsters tp, bool isDelete) { if (isDelete) { foreach (MED_OPERATING_ROOM room in this.MedOperatingRoomDict) { // 将患者信息写入到新的手术间 if (room.ROOM_NO.Equals(this.OperRoomNo)) { room.PATIENT_ID = ""; room.VISIT_ID = 0; room.OPER_ID = 0; room.ModelStatus = ModelStatus.Modeified; tp.Append(room); break; } } } else { foreach (MED_OPERATING_ROOM room in this.MedOperatingRoomDict) { // 将患者信息写入到新的手术间 if (room.ROOM_NO.Equals(this.OperRoomNo)) { room.PATIENT_ID = this.CurPatientModel.PatientID; room.VISIT_ID = this.CurPatientModel.VisitID; room.OPER_ID = this.CurPatientModel.OperID; room.ModelStatus = ModelStatus.Modeified; tp.Append(room); break; } } } }
/// <summary> /// 保存数据 /// </summary> protected override SaveResult SaveData() { SaveResult saveResult = SaveResult.Fail; TransactionParamsters tp = TransactionParamsters.Create(); //tp.Append(tmpAnesEvent).Append(ApplicationModel.Instance.AllDictList.EventSortList); // 仅获取ModelStatus发什么变化的数据 tp.Append(this.GetTureModifiedData(tmpAnesEvent.ToList())).Append(this.GetTureModifiedData(ApplicationModel.Instance.AllDictList.EventSortList)); bool result = CommonService.ClientInstance.UpdateByTransaction(tp.ToString()); if (result) { //saveResult = SaveResult.Success; saveResult = SaveResult.CancelMessageBox; // 大事件数据保存成功后无需弹出确认对话框 } foreach (var item in tmpAnesEvent) { item.ModelStatus = ModelStatus.Default; } // 刷新排序集合的ModelStatus,默认更新成功 ApplicationModel.Instance.AllDictList.EventSortList.ForEach(sortEle => { sortEle.ModelStatus = ModelStatus.Default; }); return(saveResult); }
/// <summary> /// 保存主表数据信息 /// </summary> private void SaveOperationMaster(ref TransactionParamsters tp) { MED_OPERATION_MASTER master = AnesInfoService.ClientInstance.GetOperationMaster(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID, this.CurPatientModel.OperID); OperationStatus status = OperationStatusHelper.OperationStatusFromString(OperStatus); if (status == OperationStatus.AnesthesiaEnd && this.CurPatientModel.OperStatusCode == OperationStatus.AnesthesiaStart) { master.ANES_END_TIME = this.AnesEndTime; master.OPER_STATUS_CODE = (int)OperationStatus.AnesthesiaEnd; } else { master = ResetOperationMaster(master, status); master.OPER_STATUS_CODE = (int)status; } if (this.CurPatientModel.OperStatusCode >= OperationStatus.OutOperationRoom) { master.OPER_ROOM_NO = this.OperRoomNo; } master.ModelStatus = ModelStatus.Modeified; tp.Append(master); }
/// <summary> /// 保存手术间字典数据信息 /// </summary> private void SaveOperatingRoom(MED_OPERATION_MASTER master, ref TransactionParamsters tp) { if (master.OPER_STATUS_CODE >= 5 && master.OPER_STATUS_CODE <= 30) { List <MED_OPERATING_ROOM> tempList = new List <MED_OPERATING_ROOM>(); foreach (MED_OPERATING_ROOM room in this.MedOperatingRoomDict) { // 将现患者的手术间信息清空同时将对应数据写入到新的手术间 if (null != room.PATIENT_ID && room.PATIENT_ID.Equals(this.CurPatientModel.PatientID) && null != room.VISIT_ID && room.VISIT_ID == this.CurPatientModel.VisitID && null != room.OPER_ID && room.OPER_ID == this.CurPatientModel.OperID) { room.PATIENT_ID = null; room.VISIT_ID = null; room.OPER_ID = null; room.ModelStatus = ModelStatus.Modeified; tempList.Add(room); continue; } else if (room.ROOM_NO.Equals(this.OperRoomNo)) { room.PATIENT_ID = this.CurPatientModel.PatientID; room.VISIT_ID = this.CurPatientModel.VisitID; room.OPER_ID = this.CurPatientModel.OperID; room.ModelStatus = ModelStatus.Modeified; tempList.Add(room); continue; } } tp.Append(tempList); } }
/// <summary> /// 保存主表数据信息 /// </summary> private void SaveOperationMaster(ref TransactionParamsters tp) { MED_OPERATION_MASTER master = AnesInfoService.ClientInstance.GetOperationMaster(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID, this.CurPatientModel.OperID); master.OPER_STATUS_CODE = (int)OperationStatus.CancelOperation; master.ModelStatus = ModelStatus.Modeified; tp.Append(master); }
/// <summary> /// 保存手术间字典数据信息 /// </summary> private void SaveOperatingRoom(ref TransactionParamsters tp) { foreach (MED_OPERATING_ROOM room in this.MedOperatingRoomDict) { // 将患者信息写入到新的手术间 if (room.ROOM_NO.Equals(this.OperRoomNo)) { room.PATIENT_ID = string.Empty; room.VISIT_ID = null; room.OPER_ID = null; room.ModelStatus = ModelStatus.Modeified; tp.Append(room); break; } } }
/// <summary> /// 保存手术跳转记录数据 /// </summary> private void SaveOperationJump(string strReason, OperationStatus status, ref TransactionParamsters tp) { List <MED_OPERATION_JUMP> list = CommonService.ClientInstance.GetOperationJump(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID, this.CurPatientModel.OperID); MED_OPERATION_JUMP newRow = new MED_OPERATION_JUMP(); newRow.PATIENT_ID = this.CurPatientModel.PatientID; newRow.VISIT_ID = this.CurPatientModel.VisitID; newRow.OPER_ID = this.CurPatientModel.OperID; newRow.JUMP_DATE = DateTime.Now; newRow.OPER_STATUS_OLD = (int)this.CurPatientModel.OperStatusCode; newRow.OPER_STATUS_NEW = (int)status; newRow.JUMP_REASON = strReason; newRow.ENTERED_BY = ExtendAppContext.Current.LoginUser.USER_JOB_ID; list.Add(newRow); tp.Append(list); }
/// <summary> /// 保存监护仪字典信息 /// </summary> private void SaveMonitorDict(ref TransactionParamsters tp) { List <MED_MONITOR_DICT> tempMonitorDict = ApplicationModel.Instance.AllDictList.MonitorDictList. Where(x => x.WARD_TYPE.ToString() == ExtendAppContext.Current.EventNo && x.BED_NO == ExtendAppContext.Current.OperRoomNo).ToList(); if (tempMonitorDict != null && tempMonitorDict.Count > 0) { foreach (MED_MONITOR_DICT row in tempMonitorDict) { row.PATIENT_ID = string.Empty; row.VISIT_ID = null; row.OPER_ID = null; row.ModelStatus = ModelStatus.Modeified; } tp.Append(tempMonitorDict); } }
/// <summary> /// 保存更换手术间记录数据 /// </summary> private void SaveChangeRoomNo(string strReason, ref TransactionParamsters tp) { List <MED_CHANGE_ROOM_NO> list = CommonService.ClientInstance.GetChangeRoomNo(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID, this.CurPatientModel.OperID); MED_CHANGE_ROOM_NO newRow = new MED_CHANGE_ROOM_NO(); newRow.CHANGE_NO = list.Count > 0 ? list[0].CHANGE_NO + 1 : 1; newRow.PATIENT_ID = this.CurPatientModel.PatientID; newRow.VISIT_ID = this.CurPatientModel.VisitID; newRow.OPER_ID = this.CurPatientModel.OperID; newRow.OLD_ROOM_NO = this.CurPatientModel.OperRoomNo; newRow.NEW_ROOM_NO = this.OperRoomNo; newRow.CHANGE_DATE = DateTime.Now; newRow.CHANGE_ATOR = ExtendAppContext.Current.LoginUser.USER_JOB_ID; newRow.CHANGE_REASON = strReason; list.Add(newRow); tp.Append(list); }
/// <summary> /// 保存取消手术明细 /// </summary> /// <returns></returns> private void SaveOperationCanceledDetail(int cancelID, ref TransactionParamsters tp) { List <MED_OPERATION_CANCELED_DETAIL> list = CommonService.ClientInstance.GetOperationCanceledDetail(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID, cancelID); foreach (OperationCanceledTypeModel item in this.allOperCanceledTypeList) { if (item.IsChecked) { MED_OPERATION_CANCELED_DETAIL newRow = new MED_OPERATION_CANCELED_DETAIL(); newRow.PATIENT_ID = this.CurPatientModel.PatientID; newRow.VISIT_ID = this.CurPatientModel.VisitID; newRow.CANCEL_ID = cancelID; newRow.CANCEL_CLASS = item.ItemClass; newRow.CANCEL_TYPE = item.ItemName; newRow.ModelStatus = ModelStatus.Add; list.Add(newRow); } } tp.Append(list); }
/// <summary> /// 保存手术取消记录数据 /// </summary> private void SaveOperationCanceled(ref TransactionParamsters tp) { MED_OPERATION_SCHEDULE scheduled = AnesInfoService.ClientInstance.GetOperSchedule(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID, this.CurPatientModel.OperID); List <MED_OPERATION_CANCELED> list = CommonService.ClientInstance.GetOperationCanceled(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID); MED_OPERATION_CANCELED newRow = new MED_OPERATION_CANCELED(); newRow.PATIENT_ID = this.CurPatientModel.PatientID; newRow.VISIT_ID = this.CurPatientModel.VisitID; newRow.CANCEL_ID = list.Count + 1; newRow.SCHEDULE_ID = null != scheduled ? scheduled.SCHEDULE_ID : 1; newRow.OPER_ID = this.CurPatientModel.OperID; newRow.OPER_STATUS_CODE = (int)this.CurPatientModel.OperStatusCode; newRow.CANCEL_REASON = this.strReason; newRow.CANCEL_DATE = DateTime.Now; newRow.CANCEL_BY = string.Empty; newRow.ENTERED_BY = ExtendAppContext.Current.LoginUser.USER_JOB_ID; newRow.ModelStatus = ModelStatus.Add; list.Add(newRow); tp.Append(list); this.SaveOperationCanceledDetail(newRow.CANCEL_ID, ref tp); }
/// <summary> /// 保存监护仪字典信息 /// </summary> private void SaveMonitorDict(MED_OPERATION_MASTER master, ref TransactionParamsters tp) { if (master.OPER_STATUS_CODE >= 5 && master.OPER_STATUS_CODE <= 30) { List <MED_MONITOR_DICT> monitorDict = ApplicationModel.Instance.AllDictList.MonitorDictList.Where(x => x.WARD_TYPE.ToString() == ExtendAppContext.Current.EventNo).ToList(); foreach (MED_MONITOR_DICT monitor in monitorDict) { if (null != monitor.PATIENT_ID && monitor.PATIENT_ID.Equals(this.CurPatientModel.PatientID) && null != monitor.VISIT_ID && monitor.VISIT_ID == this.CurPatientModel.VisitID && null != monitor.OPER_ID && monitor.OPER_ID == this.CurPatientModel.OperID) { monitor.PATIENT_ID = null; monitor.VISIT_ID = null; monitor.OPER_ID = null; monitor.ModelStatus = ModelStatus.Modeified; continue; } } tp.Append(monitorDict); } }
/// <summary> /// 注册命令信息 /// </summary> private void RegisterCommand() { // 切换血气分析明细信息 this.ShowDetailCommand = new RelayCommand <object>(par => { // 在新增血气状态下不能切换 if (this.AddButtonIsEnabled) { MED_BLOOD_GAS_MASTER tempMaster = par as MED_BLOOD_GAS_MASTER; if (null != tempMaster) { this.RefreshDetailData(tempMaster.DETAIL_ID); } } }); // 新增血气分析项 this.AddMasterCommand = new RelayCommand <object>(par => { var message = new ShowContentWindowMessage("AddBloodGasMaster", "新增血气分析记录"); message.Height = 250; message.Width = 300; Messenger.Default.Send <ShowContentWindowMessage>(message); }); // 增加血气成功后刷新左侧列表信息 Messenger.Default.Register <object>(this, EnumMessageKey.RefreshBloodGasMaster, msg => { if (null != msg && msg is MED_BLOOD_GAS_MASTER) { // 添加按钮不可用 this.AddButtonIsEnabled = false; this.DelButtonIsEnabled = false; this.EditButtonIsEnabled = true; // 将新添加的血气主信息添加到数据源 this.insertBloodGasMaster = msg as MED_BLOOD_GAS_MASTER; List <MED_BLOOD_GAS_MASTER> tempMasterList = new List <MED_BLOOD_GAS_MASTER>(this.MedBloodGasMaster); MED_BLOOD_GAS_MASTER tmpItem = tempMasterList.Find(x => x.DETAIL_ID == insertBloodGasMaster.DETAIL_ID); if (tmpItem != null) { tempMasterList.Remove(tmpItem); } tempMasterList.Add(this.insertBloodGasMaster); this.MedBloodGasMaster = tempMasterList; // 新增明细项 this.InsertBloodGasDetail(this.insertBloodGasMaster); // 刷新界面 Messenger.Default.Send <object>(this.insertBloodGasMaster, EnumMessageKey.RefreshBloodGasMasterSelection); } }); // 保存血气分析明细 this.SaveDetailCommand = new RelayCommand <object>(par => { this.PublicKeyBoardMessage(KeyCode.AppCode.Save); }); // 删除血气主表数据 this.DelMasterCommand = new RelayCommand <object>(par => { if (par != null && par is MED_BLOOD_GAS_MASTER) { this.ShowMessageBox("确认删除选中项?", MessageBoxButton.YesNo, MessageBoxImage.Question, new Action <MessageBoxResult>((mbr) => { if (mbr == MessageBoxResult.OK) { TransactionParamsters tp = TransactionParamsters.Create(); MED_BLOOD_GAS_MASTER tempMaster = par as MED_BLOOD_GAS_MASTER; tempMaster.ModelStatus = ModelStatus.Deleted; tp.Append(tempMaster); // 不修改EXT表的内容 //List<MED_BLOOD_GAS_DETAIL_EXT> detailList = AnesInfoService.ClientInstance.GetBloodGasDetailExtList(tempMaster.DETAIL_ID); //foreach (MED_BLOOD_GAS_DETAIL_EXT item in detailList) //{ // item.ModelStatus = ModelStatus.Deleted; //} // //tp.Append(detailList); CommonService.ClientInstance.UpdateByTransaction(tp.ToString()); // 刷新主表数据 this.RefreshMasterData(); this.ShowMessageBox("删除成功!", MessageBoxButton.OK, MessageBoxImage.Information); } })); } else { this.ShowMessageBox("请选中数据行再执行删除!", MessageBoxButton.OK, MessageBoxImage.Information); } }); // 编辑血气主表数据 this.EditMasterCommand = new RelayCommand <object>(par => { if (par != null && par is MED_BLOOD_GAS_MASTER) { var message = new ShowContentWindowMessage("AddBloodGasMaster", "新增血气分析记录"); message.Height = 250; message.Width = 300; message.Args = new object[] { par }; Messenger.Default.Send <ShowContentWindowMessage>(message); } }); }
/// <summary> /// 保存患者信息 /// </summary> protected override SaveResult SaveData() { bool result = true; if (_masterRow != null && _anesthesiaPlanRow != null) { _masterRow.OPER_ROOM_NO = OPER_ROOM_NO; _masterRow.SEQUENCE = SEQUENCE; _masterRow.BED_NO = BED_NO; _masterRow.DEPT_CODE = DEPT_CODE; _masterRow.DIAG_BEFORE_OPERATION = DIAG_BEFORE_OPERATION; // 手术名称(新分隔符) string operName = string.Empty; if (OPERATION_NAME != null) { foreach (string operDict in OPERATION_NAME) { operName += operDict + CommonSplit; } } if (operName.Length > 0) { operName = operName.Substring(0, operName.Length - CommonSplit.Length); } _masterRow.OPERATION_NAME = operName; _masterRow.OPER_SCALE = OPER_SCALE; _masterRow.OPER_POSITION = OPER_POSITION; _masterRow.EMERGENCY_IND = EMERGENCY_IND; _masterRow.ISOLATION_IND = ISOLATION_IND; _masterRow.RADIATE_IND = RADIATE_IND; _masterRow.PATIENT_CONDITION = PATIENT_CONDITION; // 麻醉方法多选处理 //string anesMethod = string.Empty; //if (ANES_METHOD != null) //{ // foreach (string item in ANES_METHOD) // { // anesMethod += item + CommonSplit; // } //} //if (anesMethod.Length > 0) //{ // anesMethod = anesMethod.Substring(0, anesMethod.Length - CommonSplit.Length); //} //_masterRow.ANES_METHOD = anesMethod; _masterRow.ANES_METHOD = ANES_METHOD_NAME; _masterRow.ANAESTHESIA_TYPE = ANAESTHESIA_TYPE; #region 人员保存特殊处理 if (SURGEON == null && SURGEON_NAME != null) { SURGEON = SURGEON_NAME; } _masterRow.SURGEON = SURGEON; if (FIRST_OPER_ASSISTANT == null && FIRST_OPER_ASSISTANT_NAME != null) { FIRST_OPER_ASSISTANT = FIRST_OPER_ASSISTANT_NAME; } _masterRow.FIRST_OPER_ASSISTANT = FIRST_OPER_ASSISTANT; if (SECOND_OPER_ASSISTANT == null && SECOND_OPER_ASSISTANT_NAME != null) { SECOND_OPER_ASSISTANT = SECOND_OPER_ASSISTANT_NAME; } _masterRow.SECOND_OPER_ASSISTANT = SECOND_OPER_ASSISTANT; if (CPB_DOCTOR == null && CPB_DOCTOR_NAME != null) { CPB_DOCTOR = CPB_DOCTOR_NAME; } _masterRow.CPB_DOCTOR = CPB_DOCTOR; if (FIRST_CPB_ASSISTANT == null && FIRST_CPB_ASSISTANT_NAME != null) { FIRST_CPB_ASSISTANT = FIRST_CPB_ASSISTANT_NAME; } _masterRow.FIRST_CPB_ASSISTANT = FIRST_CPB_ASSISTANT; if (FIRST_OPER_NURSE == null && FIRST_OPER_NURSE_NAME != null) { FIRST_OPER_NURSE = FIRST_OPER_NURSE_NAME; } _masterRow.FIRST_OPER_NURSE = FIRST_OPER_NURSE; if (SECOND_OPER_NURSE == null && SECOND_OPER_NURSE_NAME != null) { SECOND_OPER_NURSE = SECOND_OPER_NURSE_NAME; } _masterRow.SECOND_OPER_NURSE = SECOND_OPER_NURSE; if (FIRST_SUPPLY_NURSE == null && FIRST_SUPPLY_NURSE_NAME != null) { FIRST_SUPPLY_NURSE = FIRST_SUPPLY_NURSE_NAME; } _masterRow.FIRST_SUPPLY_NURSE = FIRST_SUPPLY_NURSE; if (SECOND_SUPPLY_NURSE == null && SECOND_SUPPLY_NURSE_NAME != null) { SECOND_SUPPLY_NURSE = SECOND_SUPPLY_NURSE_NAME; } _masterRow.SECOND_SUPPLY_NURSE = SECOND_SUPPLY_NURSE; if (ANES_DOCTOR == null && ANES_DOCTOR_NAME != null) { ANES_DOCTOR = ANES_DOCTOR_NAME; } _masterRow.ANES_DOCTOR = ANES_DOCTOR; if (FIRST_ANES_ASSISTANT == null && FIRST_ANES_ASSISTANT_NAME != null) { FIRST_ANES_ASSISTANT = FIRST_ANES_ASSISTANT_NAME; } _masterRow.FIRST_ANES_ASSISTANT = FIRST_ANES_ASSISTANT; if (SECOND_ANES_ASSISTANT == null && SECOND_ANES_ASSISTANT_NAME != null) { SECOND_ANES_ASSISTANT = SECOND_ANES_ASSISTANT_NAME; } _masterRow.SECOND_ANES_ASSISTANT = SECOND_ANES_ASSISTANT; if (THIRD_ANES_ASSISTANT == null && THIRD_ANES_ASSISTANT_NAME != null) { THIRD_ANES_ASSISTANT = THIRD_ANES_ASSISTANT_NAME; } _masterRow.THIRD_ANES_ASSISTANT = THIRD_ANES_ASSISTANT; #endregion _masterRow.ASA_GRADE = ASA_GRADE; _masterRow.WOUND_TYPE = WOUND_TYPE; _masterRow.MINIMAL_INVASIVE = this.MINIMAL_INVASIVE; _masterRow.LOCAL_ANESTHESIA = this.LOCAL_ANESTHESIA; // 局麻手术 if (this.isAfterOperInfo) { if (1 == this.LOCAL_ANESTHESIA) { _masterRow.IN_DATE_TIME = this.IN_DATE_TIME; _masterRow.START_DATE_TIME = this.START_DATE_TIME; _masterRow.END_DATE_TIME = this.END_DATE_TIME; _masterRow.OUT_DATE_TIME = this.OUT_DATE_TIME; _masterRow.OPER_STATUS_CODE = 35; } else { _masterRow.IN_DATE_TIME = null; _masterRow.START_DATE_TIME = null; _masterRow.END_DATE_TIME = null; _masterRow.OUT_DATE_TIME = null; _masterRow.OPER_STATUS_CODE = 0; } } TransactionParamsters tp = TransactionParamsters.Create(); tp.Append(_masterRow); List <MED_OPERATION_NAME> listOperationName = new List <MED_OPERATION_NAME>(); int operNo = 1; foreach (var item in OPERATION_NAME) { MED_OPERATION_NAME operationName = new MED_OPERATION_NAME(); operationName.PATIENT_ID = _masterRow.PATIENT_ID; operationName.VISIT_ID = _masterRow.VISIT_ID; operationName.OPER_ID = _masterRow.OPER_ID; operationName.OPER_NO = operNo++; operationName.OPER_NAME = item; listOperationName.Add(operationName); } tp.Append(listOperationName); _anesthesiaPlanRow.OPER_ID = _anesthesiaPlanRow.OPER_ID; _anesthesiaPlanRow.RETURN_TO_SURGERY = RETURN_TO_SURGERY; _anesthesiaPlanRow.PLAN_WHEREABORTS = PLAN_WHEREABORTS; tp.Append(_anesthesiaPlanRow); result = CommonService.ClientInstance.UpdateByTransaction(tp.ToString()); } if (result) { saveResult = SaveResult.Success; } return(saveResult); }
/// <summary> /// 保存监护仪字典信息 /// </summary> private void SaveMonitorDict(ref TransactionParamsters tp, bool isDelete) { List <MED_MONITOR_DICT> tempMonitorDict = ApplicationModel.Instance.AllDictList.MonitorDictList.Where(x => x.WARD_TYPE.ToString() == ExtendAppContext.Current.EventNo && x.BED_NO == this.OperRoomNo).ToList(); if (isDelete) { if (tempMonitorDict != null && tempMonitorDict.Count > 0) { foreach (MED_MONITOR_DICT row in tempMonitorDict) { row.PATIENT_ID = ""; row.VISIT_ID = 0; row.OPER_ID = 0; row.ModelStatus = ModelStatus.Modeified; } } } else { if (tempMonitorDict != null && tempMonitorDict.Count > 0) { foreach (MED_MONITOR_DICT row in tempMonitorDict) { row.PATIENT_ID = this.CurPatientModel.PatientID; row.VISIT_ID = this.CurPatientModel.VisitID; row.OPER_ID = this.CurPatientModel.OperID; row.ModelStatus = ModelStatus.Modeified; // 如果选中的手术间是当前手术间,则自动启动监护仪 if (this.OperRoomNo.Equals(ExtendAppContext.Current.OperRoomNo)) { // 自动启动监护仪 if (!string.IsNullOrEmpty(row.DRIVER_PROG)) { string strPath = ExtendAppContext.Current.AppPath + row.DRIVER_PROG; bool hasStart = false; // 获取当前启动的所有进程 string strProcessName = row.DRIVER_PROG.Substring(0, row.DRIVER_PROG.ToLower().IndexOf(".exe")); Process[] myProgress = Process.GetProcessesByName(strProcessName); // 查看采集EXE是否启动 foreach (Process p in myProgress) { if (p.ProcessName.Equals(strProcessName)) { hasStart = true; break; } } // 进程没有启动同时采集EXE必须存在 if (!hasStart && File.Exists(strPath)) { System.Diagnostics.Process.Start(strPath); } } } } } } tp.Append(tempMonitorDict); }