<?xml version="1.0" encoding="utf-8" ?>
<!--后台管理模块
作者：Alcedo
最后修改日期：2020年6月20日
-->
<Report>
  <!--##########################系统管理员管理#########################-->
  <TAB Id="insertManager" Name="新增管理员">
    <SqlAll>
       INSERT INTO AExam_Admin (ManageName, ManagePwd, ManageLevel, LastTime, LastIP) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}')
    </SqlAll>
  </TAB>
  <TAB Id="deleteManager" Name="删除管理员">
    <SqlAll>
      delete from AExam_Admin  where ManageID={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteManager" Name="批量删除管理员">
    <SqlAll>
      delete from AExam_Admin  where ManageID in ({0})
    </SqlAll>
  </TAB>
  <TAB Id="updataManager" Name="修改管理员">
    <SqlAll>
      UPDATE AExam_Admin SET ManageName ='{1}', ManagePwd ='{2}' WHERE ManageID={0}
    </SqlAll>
  </TAB>
  
  <TAB Id="selectManager" Name="查询管理员列表">
    <SqlAll>
　　　　select * from   %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectLoginManager" Name="管理员登录">
    <SqlAll>
      select * from AExam_Admin
      %Where%
    </SqlAll>
  </TAB> 
  <!--##########################系统菜单信息管理#########################-->
  <TAB Id="selectMenuList" Name="查询系统菜单信息列表">
    <SqlAll>
      　　　　select * from  %Where%
    </SqlAll>
  </TAB>
  <!--##########################系统登录日志管理#########################-->
  <TAB Id="insertManagerLog" Name="新增管理员登录日志">
    <SqlAll>
      INSERT INTO AExam_Admin_loginlog (
      UserId,
      UserName,
      RoleId,
      RoleName,
      ClientIp,
      IsSucceed,
      LoginTime,
      AddTime
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}', '{6}', '{7}')
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteManagerLog" Name="批量删除管理员登录日志">
    <SqlAll>
      delete from AExam_Admin_loginlog  where ManageID in ({0})
    </SqlAll>
  </TAB>
  <TAB Id="selectManagerLog" Name="查询管理员登录日志列表">
    <SqlAll>
      　　　　select * from   %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectcountManagerLog" Name="查询管理员登录日志总行数">
    <SqlAll>
      　　　　select count(*) as total from  %Where%
    </SqlAll>
  </TAB>
  
  <!--##########################会员登录日志管理#########################-->
  <TAB Id="insertMemberUserLog" Name="新增会员登录日志">
    <SqlAll>
      INSERT INTO AExam_MemberUser_loginlog (
      UserId,
      UserName,
      KeMuId,
      KeMuName,
      ClientIp,
      IsSucceed,
      LoginTime,
      AddTime
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}', '{6}', '{7}')
    </SqlAll>
  </TAB>
  <TAB Id="deleteMemberUserLog_one" Name="删除会员登录信息">
    <SqlAll>
      delete from AExam_MemberUser_loginlog  where ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteMemberUserLog" Name="批量删除会员登录日志">
    <SqlAll>
      delete from AExam_MemberUser_loginlog  where ManageID in ({0})
    </SqlAll>
  </TAB>
  <TAB Id="selectMemberUserLog" Name="查询会员登录日志列表">
    <SqlAll>
      　　　　select * from   %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectcountMemberUserLog" Name="查询会员登录日志总行数">
    <SqlAll>
      　　　　select count(*) as total from  %Where%
    </SqlAll>
  </TAB>
  
  <!--##########################会员信息管理#########################-->
  <TAB Id="insertMemberUser" Name="新增会员信息">
    <SqlAll>
      INSERT INTO AExam_MemberUser (
      UserName,
      PassWord,
      TrueName,
      Sex,
      Birthday,
      Email,
      UserFace,
      IdCard,
      Subject,
      CarModel,
      province,
      AddTime,
      UpdateTime,
      LastIP,
      LastTime,
      Expiration,
      Remarks
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}')
    </SqlAll>
  </TAB>
  <TAB Id="deleteMemberUser" Name="删除会员">
    <SqlAll>
      delete from AExam_MemberUser  where ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteMemberUser" Name="批量删除会员">
    <SqlAll>
      delete from AExam_MemberUser  where ID in ({0})
    </SqlAll>
  </TAB>
  <TAB Id="updataMemberUser" Name="修改会员">
    <SqlAll>
      UPDATE AExam_MemberUser SET
      PassWord = '{1}',
      TrueName= '{2}',
      Sex= '{3}',
      Birthday= '{4}',
      Email= '{5}',
      IdCard= '{6}',
      Subject= '{7}',
      CarModel= '{8}',
      UpdateTime= '{9}',
      Expiration= '{10}',
      Remarks= '{11}'
      WHERE ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="selectMemberUser" Name="查询会员列表">
    <SqlAll>
      　　　　select * from   %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectMemberUsertotalCount" Name="查询会员总行数">
    <SqlAll>
      　　   select count(*) as total from  %Where%
    </SqlAll>
  </TAB>

  <!--##########################新增会员题库查看权限管理#########################-->
  <TAB Id="insertMemberRole" Name="新增会员题库查看权限">
    <SqlAll>
      INSERT INTO AExam_MemberRole (
      Userid,
      TikuClassid,
      TikuType,
      AddUser,
      AddTime
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}')
    </SqlAll>
  </TAB>

  <TAB Id="batchdeleteMemberRole" Name="批量删除题库查看权限">
    <SqlAll>
      delete from AExam_MemberRole  where Userid={0}
    </SqlAll>
  </TAB>

  <TAB Id="getUserSelected" Name="后去当前用户权限编号">
    <SqlAll>
      select TikuClassid from dbo.AExam_MemberRole a  %Where%
    </SqlAll>
  </TAB>
  
  
  
  <!--##########################科一题库分类#########################-->
  <TAB Id="insertTikuClass" Name="新增科一分类信息">
    <SqlAll>
      INSERT INTO AExam_TikuClass (
      SortName,
      ViewFlag,
      ParentID,
      SortPath,
      Sequence,
      show
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}')
    </SqlAll>
  </TAB>
  <TAB Id="deleteTikuClass" Name="删除科一分类">
    <SqlAll>
      delete from AExam_TikuClass  where ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteTikuClass" Name="批量删除科一分类">
    <SqlAll>
      delete from AExam_TikuClass  where ID in ({0})
    </SqlAll>
  </TAB>
  <TAB Id="updataTikuClass" Name="修改科一分类">
    <SqlAll>
      UPDATE AExam_TikuClass SET
      SortName= '{1}',
      ViewFlag= '{2}',
      ParentID= '{3}',
      Sequence= '{4}',
      show= '{5}'
      WHERE ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="selectTikuClass" Name="查询科一分类列表">
    <SqlAll>
      　　　　select * from   %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectcountTikuClass" Name="查询科一总行数">
    <SqlAll>
      　　　　select count(*) as total from  %Where%
    </SqlAll>
  </TAB>
  <!--##########################科一题库信息#########################-->
  <TAB Id="insertTiku_one" Name="新增科一题库信息">
    <SqlAll>
      INSERT INTO AExam_Tiku (
      TRY_SUBJECT,
      TRY_KEY,
      a,
      b,
      c,
      d,
      CLASS,
      img,
      voice,
      video,
      SortID,
      SortPath,
      AddTime,
      display,
      qustType,
      Sequence
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}');select @@IDENTITY
    </SqlAll>
  </TAB>
  <TAB Id="deleteTiku_one" Name="删除科一题库信息">
    <SqlAll>
      delete from AExam_Tiku  where ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteTiku_one" Name="批量删除科一题库">
    <SqlAll>
      delete from AExam_Tiku  where ID in ({0})
    </SqlAll>
  </TAB>
  <TAB Id="updataTiku_one" Name="修改科一题库">
    <SqlAll>
      UPDATE AExam_Tiku SET
      TRY_SUBJECT= '{1}',
      TRY_KEY= '{2}',
      a= '{3}',
      b= '{4}',
      c= '{5}',
      d= '{6}',
      CLASS='{7}',
      img= '{8}',
      voice= '{9}',
      video= '{10}',
      SortID= '{11}',
      display= '{12}',
      qustType= '{13}',
      Sequence= '{14}'
      WHERE ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="selectTiku_one" Name="查询科一题库列表">
    <SqlAll>
      　　　　select * from   %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectcountTiku_one" Name="查询科一题库总行数">
    <SqlAll>
      　　　　select count(*) as total from  %Where%
    </SqlAll>
  </TAB>
  
  <!--##########################科四题库分类#########################-->
  <TAB Id="insertTikuFourClass" Name="新增科四分类信息">
    <SqlAll>
      INSERT INTO AExam_TikuksClass (
      SortName,
      ViewFlag,
      ParentID,
      SortPath,
      Sequence,
      show
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}')
    </SqlAll>
  </TAB>
  <TAB Id="deleteTikuFourClass" Name="删除科四分类">
    <SqlAll>
      delete from AExam_TikuksClass  where ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteTikuFourClass" Name="批量删除科四分类">
    <SqlAll>
      delete from AExam_TikuksClass  where ID in ({0})
    </SqlAll>
  </TAB>
  <TAB Id="updataTikuFourClass" Name="修改科四分类">
    <SqlAll>
      UPDATE AExam_TikuksClass SET
      SortName= '{1}',
      ViewFlag= '{2}',
      ParentID= '{3}',
      Sequence= '{4}',
      show= '{5}'
      WHERE ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="selectTikuFourClass" Name="查询科四分类列表">
    <SqlAll>
      　　　　select * from   %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectcountTikuFourClass" Name="查询科四总行数">
    <SqlAll>
      　　　　select count(*) as total from  %Where%
    </SqlAll>
  </TAB>
  
  <!--##########################科四题库信息#########################-->
  <TAB Id="insertTikuFour" Name="新增科四题库信息">
    <SqlAll>
      INSERT INTO AExam_Tikuks (
      TRY_SUBJECT,
      TRY_KEY,
      a,
      b,
      c,
      d,
      CLASS,
      img,
      voice,
      video,
      SortID,
      SortPath,
      AddTime,
      display,
      qustType,
      Sequence
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}');select @@IDENTITY
    </SqlAll>
  </TAB>
  <TAB Id="deleteTikuFour" Name="删除科四题库信息">
    <SqlAll>
      delete from AExam_Tikuks  where ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteTikuFour" Name="批量删除科四题库">
    <SqlAll>
      delete from AExam_Tikuks  where ID in ({0})
    </SqlAll>
  </TAB>
  <TAB Id="updataTikuFour" Name="修改科四题库">
    <SqlAll>
      UPDATE AExam_Tikuks SET
      TRY_SUBJECT= '{1}',
      TRY_KEY= '{2}',
      a= '{3}',
      b= '{4}',
      c= '{5}',
      d= '{6}',
      img= '{7}',
      voice= '{8}',
      video= '{9}',
      SortID= '{10}',
      display= '{11}',
      qustType= '{12}',
      Sequence= '{13}'
      WHERE ID={0}
    </SqlAll>
  </TAB>
  <TAB Id="selectTikuFour" Name="查询科四题库列表">
    <SqlAll>
      　　　　select * from   %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectcountTikuFour" Name="查询科四题库总行数">
    <SqlAll>
      　　　　select count(*) as total from  %Where%
    </SqlAll>
  </TAB>
  
  <!--##########################题库关联多分类逻辑#########################-->
  <TAB Id="deleteTikuClassOrTiku" Name="删除分类关联题库">
    <SqlAll>
      delete from AExam_TikuClass_Tiku  where TikuId={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteTikuClassOrTiku" Name="批量删除分类关联题库">
    <SqlAll>
      delete from AExam_TikuClass_Tiku  where  TikuId in({0})
    </SqlAll>
  </TAB>
  <TAB Id="insertTikuClassOrTiku" Name="新增题库分类中间表信息">
    <SqlAll>
      INSERT INTO AExam_TikuClass_Tiku (
      ClassId,
      TikuId
      ) {0}
    </SqlAll>
  </TAB>
  
  <TAB Id="deleteTikuClassOrTikuks" Name="删除分类关联题库科四">
    <SqlAll>
      delete from AExam_TikuClass_Tikuks  where TikuId={0}
    </SqlAll>
  </TAB>
  <TAB Id="batchdeleteTikuClassOrTikuks" Name="批量删除分类关联题库科四">
    <SqlAll>
      delete from AExam_TikuClass_Tikuks  where  TikuId in({0})
    </SqlAll>
  </TAB>
  <TAB Id="insertTikuClassOrTikuks" Name="新增题库分类中间表信息科四">
    <SqlAll>
      INSERT INTO AExam_TikuClass_Tikuks (
      ClassId,
      TikuId
      ) {0}
    </SqlAll>
  </TAB>
  
  <!--##########################用于科一编辑仿真题设置列表#########################-->
  <TAB Id="selectTikuClassOrFzlist" Name="新增仿真题库中间筛选数量表信息">
    <SqlAll>
      select a.*,b.Fzks_percentage FROM  %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectTikuClassOrFzlistCount" Name="仿真题库中间筛选数量表信息总行数">
    <SqlAll>
      select count(1) as total FROM %Where%
    </SqlAll>
  </TAB>
  
  <TAB Id="isselectTikuClassOrFzInfo" Name="仿真题库抽数是否已添加">
    <SqlAll>
      select SortId,Fzks_percentage from AExam_FzksInfo %Where%
    </SqlAll>
  </TAB>
  
  <TAB Id="selectTikuClassOrFzlistSumNumber" Name="仿真题库抽取总数">
    <SqlAll>
      select SUM(Fzks_percentage) as total from AExam_FzksInfo
    </SqlAll>
  </TAB> 
  <TAB Id="insertTikuClassOrFzlist" Name="新增仿真题库数量科一">
    <SqlAll>
      INSERT INTO AExam_FzksInfo (
      uid,
      SortId,
      Fzks_percentage,
      Fzks_Ramake,
      Fzks_AddTime
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}')
    </SqlAll>
  </TAB>
  <TAB Id="updateTikuClassOrFzlist" Name="更新仿真题库数量科一">
    <SqlAll>
      UPDATE AExam_FzksInfo SET
      Fzks_percentage= '{1}'
      WHERE SortId={0}
    </SqlAll>
  </TAB>

  <!--##########################用于科四编辑仿真题设置列表#########################-->
  <TAB Id="selectTikuksClassOrFzlist" Name="新增仿真题库中间筛选数量表信息">
    <SqlAll>
      select a.*,b.Fzks_percentage FROM  %Where%
    </SqlAll>
  </TAB>
  <TAB Id="selectTikuksClassOrFzlistCount" Name="仿真题库中间筛选数量表信息总行数">
    <SqlAll>
      select count(1) as total FROM %Where%
    </SqlAll>
  </TAB>

  <TAB Id="isselectTikuksClassOrFzInfo" Name="仿真题库抽数是否已添加">
    <SqlAll>
      select SortId,Fzks_percentage from AExam_FzksInfoks %Where%
    </SqlAll>
  </TAB>

  <TAB Id="selectTikuksClassOrFzlistSumNumber" Name="仿真题库抽取总数">
    <SqlAll>
      select SUM(Fzks_percentage) as total from AExam_FzksInfoks
    </SqlAll>
  </TAB>
  <TAB Id="insertTikuksClassOrFzlist" Name="新增仿真题库数量科一">
    <SqlAll>
      INSERT INTO AExam_FzksInfoks (
      uid,
      SortId,
      Fzks_percentage,
      Fzks_Ramake,
      Fzks_AddTime
      ) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}')
    </SqlAll>
  </TAB>
  <TAB Id="updateTikuksClassOrFzlist" Name="更新仿真题库数量科一">
    <SqlAll>
      UPDATE AExam_FzksInfoks SET
      Fzks_percentage= '{1}'
      WHERE SortId={0}
    </SqlAll>
  </TAB>
  
</Report>