1 找到

2 点开动作设置,找到对应的save***Action

3 点执行前事件后边的编辑,输入如下代码
public class GoodProcess {
public static void goodProcessBeforeSaveGO_goodAction() {
//获得table参数
Table table = (Table)ContextHelper.getActionContext().getParameter("table");
//获得所有新增的行
Iterator<Row> rows = table.iterator(com.justep.system.data.ModifyState.NEW );
SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy");
String date = sDateFormat.format(new java.util.Date());
while (rows.hasNext()){
Row row = rows.next();
String a=BizUtils.createNextSequenceString("CDRS"+date,"0000");
row.setValue("fDX",a); //给列赋值
}
}
本文由WeX5君整理,WeX5一款开源免费的html5开发工具,H5 App开发就用WeX5!
阅读其他app 开发相关文章:http://doc.wex5.com/?p=3443
评一波