- public int[] updateKscj(final String[] bmglids,final double[] llbzs,final double[] llzys, final double[] scs){
- int[] updateCounts = super.getJdbcTemplate().batchUpdate(
- "update xj_bmgl set bmgl_llbz = ?, bmgl_llzy = ?,bmgl_llzf=?,bmgl_sc=? where bmgl_id = ?",
- new BatchPreparedStatementSetter() {
- public void setValues(PreparedStatement ps, int i) throws SQLException {
- ps.setDouble(1,llbzs[i] );
- ps.setDouble(2,llzys[i] );
- ps.setDouble(3,llbzs[i]+llzys[i] );
- ps.setDouble(4,scs[i] );
- ps.setString(5,bmglids[i]);
- }
- public int getBatchSize() {
- return bmglids.length;
- }
- } );
- return updateCounts;
- }