/**
* 将该院在 hy_schedule_everday里的所有排班插入 hy_schedule_everday
* @param strList
*/
public void insertDoctorScheduleHisBatch(List<HashMap<String,Object>> strList) {
final List<HashMap<String,Object>> tempList = strList;
String strSql = "INSERT INTO hy_schedule_everday_his (schedule_id,hy_dept_id,hy_hos_id,hy_doc_id,doctor_name,time_interval,registratione_fee,clinc_fee,schedule_flag,week,date,state) VALUES(?,?,?,?,?,?,?,?,?,?,?,?) ";
this.getMainMysqlDB().batchUpdate(strSql, new BatchPreparedStatementSetter() {
public int getBatchSize() {
return tempList.size();
}
public void setValues(PreparedStatement ps, int i)throws SQLException {
ps.setString(1, tempList.get(i).get("scheduleId").toString());
ps.setString(2, tempList.get(i).get("hyDeptId").toString());
ps.setString(3, tempList.get(i).get("hyHosId")
jdbcTemplate 批量操作
最新推荐文章于 2024-06-14 17:38:32 发布