Exemple #1
0
        /// <summary>
        /// 班级单题分析数据同步
        /// </summary>
        public void SendErAllStudentQuestionRecordMsg()
        {
            var records = APP.IDatas.ErAllStudentQuestionRecord.ListByStatus();

            if (records != null && records.Count > 0)
            {
                records.ForEach(e =>
                {
                    bool status = RabbitMQSendHelper.PushMsgToMq <ErAllStudentQuestionRecord>(e, "ALL_STUDENT_QUESTION_RECORD_QUEUE", "direct_exchange", "direct");
                    if (status)
                    {
                        e.synchronous_status = 1;
                        APP.IDatas.ErAllStudentKnowledgeRecord.Update <ErAllStudentQuestionRecord>(e);
                    }
                });
            }
        }
Exemple #2
0
        /// <summary>
        /// 试卷练习记录数据同步
        /// </summary>
        public void SendErPracticeRecordMsg()
        {
            var practiceRecords = APP.IDatas.ErPracticeRecord.ListByStatus();

            if (practiceRecords != null && practiceRecords.Count > 0)
            {
                practiceRecords.ForEach(e =>
                {
                    bool status = RabbitMQSendHelper.PushMsgToMq <ErPaperPracticeRecord>(e, "PRACTICE_RECORD_QUEUE", "direct_exchange", "direct");
                    if (status)
                    {
                        e.synchronous_status = 1;
                        APP.IDatas.ErPracticeRecord.Update <ErPaperPracticeRecord>(e);
                    }
                });
            }
        }
Exemple #3
0
        /// <summary>
        /// 笔迹数据同步
        /// </summary>
        public void SendErStudentHandwriteAnswerOriginalRecordMsg()
        {
            var records = APP.IDatas.ErStudentHandwriteAnswerOriginalRecord.ListByStatus();

            if (records != null && records.Count > 0)
            {
                records.ForEach(e =>
                {
                    bool status = RabbitMQSendHelper.PushMsgToMq <ErStudentHandwriteAnswerOriginalRecord>(e, "STUDENT_HANDWRITE_ANSWER_ORIGINAL_RECORD_QUEUE", "direct_exchange", "direct");
                    if (status)
                    {
                        e.synchronous_status = 1;
                        APP.IDatas.ErAllStudentKnowledgeRecord.Update <ErStudentHandwriteAnswerOriginalRecord>(e);
                    }
                });
            }
        }
Exemple #4
0
        /// <summary>
        /// 学生封存数据同步
        /// </summary>
        public void SendErPaperPracticeRecordStudentSealUpMsg()
        {
            var records = APP.IDatas.ErPaperPracticeRecordStudentSealUp.ListByStatus();

            if (records != null && records.Count > 0)
            {
                records.ForEach(e =>
                {
                    bool status = RabbitMQSendHelper.PushMsgToMq <ErPaperPracticeRecordStudentSealUp>(e, "PAPER_PRACTICE_RECORD_STUDENT_SEALUP_QUEUE", "direct_exchange", "direct");
                    if (status)
                    {
                        e.synchronous_status = 1;
                        APP.IDatas.ErAllStudentKnowledgeRecord.Update <ErPaperPracticeRecordStudentSealUp>(e);
                    }
                });
            }
        }