<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<repositoryVO id="__NYlb7WVnJvHrMi0miRc">
  <name>applyUpdateField</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <content><![CDATA[function applyUpdateField(viewId,name,applyId,newValue,oldValue){ 
  var newValue=newValue+"";
  var oldValue=oldValue+"";
if(!newValue.equals(oldValue)){
println("我有用库");
  println("newValue===》"+newValue);
  println("oldValue===》"+oldValue);
  var sql = "select "+
    "'"+getDomainid()+"' as DOMAINID,"+
    "ID,"+ //用户ID
    "ID as item_ID,"+
	"NAME as item_name," + //保安员姓名
	"FIELD11 as item_ID_TYPE," + //证件类型
	"FIELD12 as item_ID_NUMBER," + //证件号码
	"LOGINNO as item_telephone," + //手机号
	"FIELD13 as item_CERTIFICATIONSTATUS" + //实名状态
    " from obpm2.t_user"+
    " where ID='"+getWebUser().getId()+"'";
  var datart = findBySQL(sql);
//println("datart-=----------"+datart);
  var process = getDocumentProcess();            
  var formProcess = getFormProcess();            
  var subform = formProcess.doView(viewId);            
  var doc = process.doNew(subform,getWebUser(),createParamsTable());  
  doc.findItem("applyId").setValue(applyId);
  doc.findItem("modifyName").setValue(datart.getItemValueAsString("name"));
  doc.findItem("modifyIdCardNo").setValue(datart.getItemValueAsString("ID_NUMBER"));
  doc.findItem("content").setValue("修改" + name);
  doc.findItem("newValue").setValue(newValue);
  doc.findItem("oldValue").setValue(oldValue);
  process.doCreate(doc); 
}
}]]></content>
  <version>5</version>
</repositoryVO>