public bool updateSysExecQity_CmdFinish(string mcs_cmd_id, E_CMD_STATUS commandStatus, CompleteStatus cmpStatus, out ASYSEXCUTEQUALITY quality)
        {
            bool isSuccess = true;

            //DBConnection_EF con = DBConnection_EF.GetContext();
            //using (DBConnection_EF con = new DBConnection_EF())
            quality = sysExeQualityDAO.getByID(scApp.getRedisCacheManager(), mcs_cmd_id);
            if (quality != null)
            {
                //quality.CMD_FINISH_STATUS = E_CMD_STATUS.NormalEnd;
                quality.CMD_FINISH_STATUS       = commandStatus;
                quality.CompleteStatus          = cmpStatus;
                quality.CMD_FINISH_TIME         = DateTime.Now;
                quality.CMD_TOTAL_EXCUTION_TIME = getWithNowDifferenceSeconds(quality.CMD_START_TIME);
                //sysExeQualityDAO.update(scApp.getRedisCacheManager(), quality);
                sysExeQualityDAO.delete(scApp.getRedisCacheManager(), quality.CMD_ID_MCS);
                using (DBConnection_EF con = DBConnection_EF.GetUContext())
                {
                    ASYSEXCUTEQUALITY qualityTemp = sysExeQualityDAO.getByID(con, mcs_cmd_id);
                    if (qualityTemp == null)
                    {
                        sysExeQualityDAO.add(con, quality);
                    }
                }
            }
            else
            {
            }

            return(isSuccess);
        }
 public void doCommandFinish(string mcs_cmd_id, CompleteStatus completeStatus, E_CMD_STATUS ohtc_cmd_status)
 {
     try
     {
         ASYSEXCUTEQUALITY quality = null;
         updateSysExecQity_CmdFinish(mcs_cmd_id, ohtc_cmd_status, completeStatus, out quality);
         if (quality != null)
         {
             SCUtility.TrimAllParameter(quality);
             LogManager.GetLogger("SysExcuteQuality").Info(quality.ToString());
         }
     }
     catch (Exception ex)
     {
         logger.Error(ex, $"Exception ,mcs cmd id:{SCUtility.Trim(mcs_cmd_id, true)} ,complete status:{completeStatus}, cmd status:{ohtc_cmd_status}");
     }
 }