{"hidden":false,"children":[{"configs":{"serverScript":"//获取唯一的13位ID字符串\nvar id = SysUtil.getId();\n//把id值设置到request的EMPLOYEE_ID属性中\napp.set({\n  EMPLOYEE_ID: id\n});\n//检查员工编号是否存在，如果存在抛出指定提示信息的异常。\napp.run('select 1 from WB_EMPLOYEE where EMPLOYEE_CODE={?EMPLOYEE_CODE?}', {\n  errorText: '员工编号 \u201c' + app.get('EMPLOYEE_CODE') + '\u201d 已经存在。'\n});\n//使用直通式SQL语句添加数据到数据库：\n//app.run('insert into WB_EMPLOYEE values ({?EMPLOYEE_ID?},{?EMPLOYEE_CODE?},{?REAL_NAME?},{?timestamp.BIRTH_DATE?},{?SEX?},{?DEPT_ID?},{?NATION?},{?EMAIL?},{?numeric.VACATION_HOURS?},{?COMPANY_ID?},{?clob.REMARK?})');\n//上面的代码建议使用以下方法，添加数据到指定表：\napp.update({\n  tableName: 'WB_EMPLOYEE',\n  mode: 'insert'\n});\n//返回刚才添加的记录到客户端，供客户端插入更新到表格中\napp.output('select * from WB_EMPLOYEE where EMPLOYEE_ID={?EMPLOYEE_ID?}', {\n  type: 'object'\n});","itemId":"module"},"expanded":true,"children":[],"type":"module"}],"roles":{},"title":"插入","iconCls":"","inframe":false,"pageLink":""}