<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListView id="__EIac3rJ61dmou7Hpc3t">
  <name>确认成绩</name>
  <parentId>__xmA8P0JniFiisvoPiWM</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <description>确认成绩</description>
  <pagination>true</pagination>
  <pageLines>10</pageLines>
  <showTotalRow>true</showTotalRow>
  <refresh>false</refresh>
  <refreshAll>false</refreshAll>
  <newPage>false</newPage>
  <readonly>false</readonly>
  <relatedMap><![CDATA[                                                                                                                                                                        ]]></relatedMap>
  <displayType>relatedForm</displayType>
  <defaultShowMode>month</defaultShowMode>
  <collapsibleShowMode>normal</collapsibleShowMode>
  <showWaterMark>false</showWaterMark>
  <showActivityColumnType>0</showActivityColumnType>
  <searchFormId>__ZOgyrBgpfGKpR6WHwoP</searchFormId>
  <autoCompose>false</autoCompose>
  <relatedForm></relatedForm>
  <permissionType>public</permissionType>
  <filterScript><![CDATA[]]></filterScript>
  <sqlFilterScript><![CDATA[(function(){
  /*var loginNo=getWebUser().getLoginno();      
var userId = getUserIdByLoginno(loginNo);   
var examId=getSession(userId + "examId"); */
  var examId = new Packages.cn.myapps.common.util.cache.MemoryCacheUtil.getFromPrivateSpace("examId", getWebUser());//读缓存
  println("examId--->"+examId);
  var whereStr = "where ITEM_EXAMID = '"+examId+"' and ITEM_SCORESTATE = '0' and item_testState in ('0','1') and item_isDelete!='1'  ";       
  var name = getItemValueAsString("name");
  var idcardno = getItemValueAsString("idcardno");
  var learnname = getItemValueAsString("learnname");
  var teststate = getItemValueAsString("testState");
  var signin = getItemValueAsString("signIn");
  var ismarkup = getItemValueAsString("ismarkup");

  

  //var testStategetItemValueAsString("teststate"); = getItemValueAsString("testState");                  
  //var name = getItemValueAsString("name");       
  //var idCardNo = getItemValueAsString("idCardNo");           
  //var scoreMsgState = getItemValueAsString("scoreMsgState");  
  //var company = getItemValueAsString("company");  
  //  
  if(isNotNull(name)){            
    whereStr += "and ITEM_NAME like concat('%','"+name+"','%') ";            
  } 
  if(isNotNull(idcardno)){            
    whereStr += "and ITEM_idcardno like concat('%','"+idcardno+"','%') ";            
  } 
  if(isNotNull(ismarkup)){            
    whereStr += "and item_isMakeUp like concat('%','"+ismarkup+"','%') ";            
  } 
  if(isNotNull(teststate)){            
    whereStr += "and ITEM_TESTSTATE = '"+teststate+"'";            
  } 
  if(isNotNull(signin)){            
    whereStr += "and ITEM_signin = '"+signin+"'";            
  } 
  if(isNotNull(name)){            
    whereStr += "and ITEM_NAME like concat('%','"+name+"','%') ";            
  } 

  //if(isNotNull(idCardNo)){            
  //  whereStr += "and ITEM_IDCARDNO like concat('%','"+idCardNo+"','%') ";                  
  //}            
  if(isNotNull(learnname)){            
    whereStr += "and ITEM_COMPANY like concat('%','"+learnname+"','%') ";              
  }            
  //if(isNotNull(testState)){          
  //  whereStr += "and ITEM_TESTSTATE = '"+testState+"' ";           
  //}
  //if(isNotNull(scoreMsgState)){          
  //  whereStr += "and ITEM_SCOREMSGSTATE = '"+scoreMsgState+"' ";           
  //}


  var sql =  "select "+
      "'"+ getDomainid() +"' as domainid,"+  
      "(@rownum:=@rownum + 1) AS item_number," + //序号
      "ITEM_SECURITYID," + //保安员id
      "ITEM_IDCARDNO," + //身份证
      "created," +
      "ITEM_NAME," + //姓名
      "ITEM_COMPANY," + //所属公司
      "ITEM_MOBILE," + //手机号
      "ITEM_WRITTENSCORE," + //笔试成绩
      "ITEM_OPERATESCORE," + //实操成绩
      "ITEM_SUMSCORE," + //总成绩
      "case ITEM_TESTSTATE when '-' then '进行中' when '0' then '不合格' when '1' then '合格' when '2' then '理论合格,体能未考试' when '3' then '理论不合格,体能未考试' else '进行中' end as ITEM_TESTSTATE," + //是否签到
      "ITEM_NOTICESTATE," + //考试通知状态
      "ITEM_SCORESTATE," + //成绩确认状态
      "ITEM_CARDSTATE," + //制证状态
      "ITEM_APPLYID," + //报名id
      "ITEM_WRITTENSTATE," + //笔试状态
      "ITEM_WRITTENRECORD," + //笔试做题记录
      "case ITEM_ISMAKEUP when '0' then '否' when '2' then '是' else '' end as ITEM_ISMAKEUP ," + //是否补考
      "case ITEM_SIGNIN when '1' then '是' else '否' end as item_signin," + //是否签到
      "ITEM_CONFIRMDATE," + //确认成绩的时间
      "ITEM_EXAMID," + //考试id
      "ID AS ITEM_ID,"+
      "ID"+
      " from tlk_system_exam_person,(SELECT @rownum:=0) i  "+whereStr;
  sql += " order by item_number "
  println("aaaaaaaaad"+sql)
  return sql;
})()]]></sqlFilterScript>
  <procedureFilterScript><![CDATA[]]></procedureFilterScript>
  <filterCondition><![CDATA[[]]]></filterCondition>
  <commonFilterCondition><![CDATA[[{"field":"name","isCommonFilter":"true","paramKey":1656998386111}]]]></commonFilterCondition>
  <authorityCondition>[]</authorityCondition>
  <openType>1</openType>
  <editMode>02</editMode>
  <width>0</width>
  <height>0</height>
</ListView>