<?xml version="1.0" encoding="utf-8" ?>
<!--系统管理模块
作者：Alcedo
最后修改日期：2020年7月20日
-->
<Report>
  <!--##########################科一分类(科一)#########################-->
  <TAB Id="selectTikuClass_user" Name="查询科一分类列表一级">
    <SqlAll>
      　　　　select a.* from   %Where%
    </SqlAll>
  </TAB>

  <!--##########################科一题库(题库)#########################-->
  <TAB Id="selectTiku_user" Name="查询科一题库">
    <SqlAll>
     select * from %Where%
    </SqlAll>
  </TAB>

  <TAB Id="selectTikuOrder_user" Name="查询科一题库-按顺序">
    <SqlAll>
      select row_number() over(order by ID) as rowid, * from  %Where%
    </SqlAll>
  </TAB>

  <TAB Id="insertTikuOrder_user" Name="新增会员做题记录">
    <SqlAll>
      INSERT INTO AExam_Memberbank (
      ntype,
      Userid,
      Tiku_id,
      Tiku_isok,
      result,
      doAnswer,
      answer,
      Time,
      AddTime
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}', '{6}', '{7}','{8}')
    </SqlAll>
  </TAB>
  <TAB Id="updateTikuOrder_user" Name="修改会员做题记录">
    <SqlAll>
      UPDATE AExam_Memberbank SET
      Tiku_isok={1},
      result={2},
      doAnswer={3},
      answer={4}
      WHERE ID={0}
    </SqlAll>
  </TAB>


  <TAB Id="insertTikuOrder_users" Name="新增科四会员做题记录">
    <SqlAll>
      INSERT INTO AExam_Memberbanks (
      ntype,
      Userid,
      Tiku_id,
      Tiku_isok,
      result,
      doAnswer,
      answer,
      Time,
      AddTime
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}', '{6}', '{7}','{8}')
    </SqlAll>
  </TAB>
  <TAB Id="updateTikuOrder_users" Name="修改科四会员做题记录">
    <SqlAll>
      UPDATE AExam_Memberbanks SET
      Tiku_isok={1},
      result={2},
      doAnswer={3},
      answer={4}
      WHERE ID={0}
    </SqlAll>
  </TAB>
 
  <TAB Id="selectTikuAnswercount_user" Name="查询会员做题记录">
    <SqlAll>
      select count(ID) as mycount from %Where%               
    </SqlAll>
  </TAB>
  
  <TAB Id="selectTikuLearningTest_user" Name="查询科一学习题库">
    <SqlAll>
      select * from %Where%
    </SqlAll>
  </TAB>

  <!--##########################会员登录#########################-->
  <TAB Id="selectLoginMember" Name="查询会员信息">
    <SqlAll>
      　　　　select * from %Where%
    </SqlAll>
  </TAB>


  <!--##########################会员做题记录#########################-->
  <TAB Id="selectTiKuUserInfo" Name="查询会员做题记录">
    <SqlAll>
      　　　　select * from %Where%
    </SqlAll>
  </TAB>

  <!--##########################清除会员错误记录#########################-->
  <TAB Id="deleteTiKuUserInfo" Name="删除会员错题记录">
    <SqlAll>
      delete from AExam_Memberbank where Userid={0}
    </SqlAll>
  </TAB>
  
  <!--##########################清除会员科四错误记录#########################-->
  <TAB Id="deleteTiKuUserInfos" Name="删除会员科四错题记录">
    <SqlAll>
      delete from AExam_Memberbanks where Userid={0}
    </SqlAll>
  </TAB>

  <!--##########################科一模拟考试查询#########################-->
  <TAB Id="selectTikuUserMockexam" Name="查询科一模拟试题">
    <SqlAll>
      select * from
      (select top 40 * from AExam_Tiku where (c='无' or c=null) and (d='无' or d=null) order by newid()) as a1
      union
      select * from
      (select top 60 * from AExam_Tiku where (c &lt;&gt; '无' or c &lt;&gt; null) and (d &lt;&gt; '无' or d &lt;&gt; null) order by newid()) as a2
    </SqlAll>
  </TAB>

  <!--##########################科四模拟考试查询#########################-->
  <TAB Id="selectTikuUserMockexams" Name="查询科四模拟试题">
    <SqlAll>
      select * from
      (select top 20 * from AExam_Tikuks where (c='无' or c=null) and (d='无' or d=null) order by newid()) as a1
      union
      select * from
      (select top 30 * from AExam_Tikuks where (c &lt;&gt; '无' or c &lt;&gt; null) and (d &lt;&gt; '无' or d &lt;&gt; null) order by newid()) as a2
    </SqlAll>
  </TAB>
  
  <!--##########################科一考试模拟中间分类占比数量#########################-->
  <TAB Id="QueryAExamFzksInfo" Name="科一获取模拟中间占比数量记录">
    <SqlAll>
      select SortId,Fzks_percentage from dbo.AExam_FzksInfo 
    </SqlAll>
  </TAB>
  
  <!--##########################科四考试模拟中间分类占比数量#########################-->
  <TAB Id="QueryAExamFzksInfos" Name="科四获取模拟中间占比数量记录">
    <SqlAll>
      select SortId,Fzks_percentage from dbo.AExam_FzksInfoks
    </SqlAll>
  </TAB>

  


</Report>