Пример #1
0
        /// <summary>
        /// 更新执行安排
        /// </summary>
        /// <param name="executeId"></param>
        /// <param name="exeInfo"></param>
        public void UpdateExecutePlan(JStudyExecute exeInfo)
        {
            SQL sql = CreateSQL("更新执行安排", "Update 影像检查执行 set 房间ID=:房间ID, 设备ID=:设备ID, 执行信息=:执行信息, 执行状态=:执行状态 where 执行ID=:执行ID");

            sql.AddParameter("房间ID", exeInfo.房间ID);
            sql.AddParameter("设备ID", exeInfo.设备ID);
            sql.AddParameter("执行信息", JsonHelper.SerializeObject(exeInfo));
            sql.AddInt32Par("执行状态", (int)exeInfo.执行状态);
            sql.AddParameter("执行ID", exeInfo.执行ID);

            sql.ExecuteSql();
        }
Пример #2
0
        /// <summary>
        /// 更新执行信息
        /// </summary>
        /// <param name="doDoctor"></param>
        public bool UpdateExecuteState(string applyid, string roomId, string deviceid,
                                       string doDoctor, string assistDoctor, StudyExecuteState exeState)
        {
            //有可能一开始报到时,就指定了设备,也可能没有指定设备
            SQL sql = CreateSQL("查询执行信息",
                                "select 执行ID,执行信息 from 影像检查执行 " +
                                " where 申请ID=:申请ID and (房间Id is null or 房间ID=:房间ID) and  (设备ID is null or 设备ID=:设备ID)");

            sql.AddParameter("申请ID", applyid);
            sql.AddParameter("房间ID", roomId);
            sql.AddParameter("设备ID", deviceid);

            DataTable dtExecuteInfo = sql.ExecuteSql();

            if (dtExecuteInfo == null || dtExecuteInfo.Rows.Count <= 0)
            {
                return(false);
            }

            JStudyExecute studyExecuteInfo = JsonHelper.DeserializeObject <JStudyExecute>(dtExecuteInfo.Rows[0]["执行信息"].ToString());

            if (studyExecuteInfo == null)
            {
                return(false);
            }

            studyExecuteInfo.执行人    = doDoctor;
            studyExecuteInfo.执行状态   = exeState;
            studyExecuteInfo.辅助技师   = assistDoctor;
            studyExecuteInfo.首次执行时间 = GetServerDate();

            SQL update = CreateSQL("更新执行信息", "update 影像检查执行 set 执行信息=:执行信息, 执行状态=:执行状态 where 执行ID=:执行ID");

            update.AddParameter("执行信息", JsonHelper.SerializeObject(studyExecuteInfo));
            update.AddInt32Par("执行状态", (int)exeState);
            update.AddParameter("执行ID", dtExecuteInfo.Rows[0]["执行ID"].ToString());

            update.ExecuteSql();

            return(true);
        }
Пример #3
0
 protected override void InitJsonInstance()
 {
     执行信息 = new JStudyExecute();
 }