批量插入
#set($list = $form.detailTable)
#if(!$vs.util.isList($detailTable) || $detailTable.size() == 0)
$vs.exception.throwException($strMsg)
#end
#foreach ($row in $list)
$row.remove('MID')
#set($row.CODE = $form.CODE)
#set($row.TIMEMD5 = $vs.util.GUID())
#end
#set($i = $vs.dbTools.batchInsert($strTableName, $datas))
#if ($i != $datas.size())
$vs.exception.throwException('操作失败!')
#end
insert
#function insert($strTableName, $data, $strMsg)
#set($i = $vs.dbTools.insert($strTableName, $data))
#if ($i != 1)
#if ($vs.util.isNull($strMsg))
#set($strMsg = '操作失败!')
#end
$vs.exception.throwException($strMsg)
#end
#end
#set($i = $vs.dbTools.insert($strTableName, $data))
#if ($i != 1)
$vs.exception.throwException('操作失败!')
#end
batchInsert
#function batchInsert($strTableName, $datas, $strMsg)
#set($i = $vs.dbTools.batchInsert($strTableName, $datas))
#if ($i != $datas.size())
#if ($vs.util.isNull($strMsg))
#set($strMsg = '操作失败!')
#end
$vs.exception.throwException($strMsg)
#end
return $i
#end
#set($i = $vs.dbTools.batchInsert($strTableName, $datas))
#if ($i != $datas.size())
$vs.exception.throwException('操作失败!')
#end
simpleInsert
#function simpleInsert($strTableName, $datas, $strMsg)
#if ($vs.util.isNull($strMsg))
#set($strMsg = '操作失败!')
#end
#if ($vs.util.isList($datas))
#set($i = $vs.dbTools.batchInsert($strTableName, $datas))
#if ($i != $datas.size())
$vs.exception.throwException($strMsg)
#end
#else
#set($i = $vs.dbTools.insert($strTableName, $datas))
#if ($i != 1)
$vs.exception.throwException($strMsg)
#end
#end
#end