标签:form 字符串截取 日期格式 字符串 fse tco str port return
import java.util.Date;
import java.text.SimpleDateFormat;
Date now = new Date();
def portcodes = new StringBuffer(‘‘)
for(portcode in params.fsetcode)
{
portcodes << ‘‘
portcodes << portcode
portcodes << ‘,‘
}
params[‘portcodes‘]=portcodes1.substring(0, portcodes.length() - 1)
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");//可以方便地修改日期格式
def hehe = dateFormat.format( now );
params[‘dqsj‘] = hehe
if (params.fsetcode.size() == 1) { params[‘portcodeIfSingle‘] = ‘-‘ << params.fsetcode.getAt(0) }
else { params[‘portcodeIfSingle‘] = ‘‘ }
return true
标签:form 字符串截取 日期格式 字符串 fse tco str port return
原文地址:http://www.cnblogs.com/wglwgl/p/6257065.html