比如说由detail页面回填至main页面,在save 的jobunit后面,加上两个jobunit。第一个是url为formatstring的jobunit getsql,然后是url为executsql的jobunit slipupdate。在getsql jobunit里需要把下面的sql语句作为value传进去。
update expenseslip set totalamount = (select sum (a.amount) AS totalamount from employeegroup d, expenseslipdetail a WHERE 1=1 AND a.relatedtransactionid=d.employeegroupid and a.expenseslipid=%a1 ), numofattachments = (select sum (a.numofattachments) AS totalamount FROM employeegroup d, expenseslipdetail a WHERE 1=1 AND a.relatedtransactionid=d.employeegroupid and a.expenseslipid=%a1 ) where expenseslipid=%a1
可以在数据库里预先测试效果如何。
博客介绍了由detail页面回填至main页面后,在save的jobunit后添加两个jobunit,分别是url为formatstring的getsql和url为executsql的slipupdate。getsql中需传入特定SQL语句更新数据库,还提到可预先在数据库测试效果。
1163

被折叠的 条评论
为什么被折叠?



