| | |
| | | import org.springframework.jdbc.core.ResultSetExtractor; |
| | | import org.springframework.jdbc.core.RowMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.ResultSet; |
| | |
| | | */ |
| | | static final int BATCH_SIZE = 4;//5000; |
| | | |
| | | @Transactional |
| | | public void syncData(){ |
| | | /* |
| | | Map mmdData = mdmJdbcTemplate.queryForMap("select count(*) n from mdm_machine"); |
| | |
| | | log.info("qingzhe:{}",qinzheData); |
| | | */ |
| | | cleanLocalTable(); |
| | | |
| | | cleanQinzheDataInDivision(); |
| | | |
| | | |
| | | //cleanQinzheDataInDivision(); |
| | | saveQinzheFgb(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | insertToLocalTable(fgbList); |
| | | |
| | | updateProduceDivision(fgbList); |
| | | //updateProduceDivision(fgbList); |
| | | } |
| | | /** |
| | | * //qingzhe - mdm |
| | |
| | | } |
| | | |
| | | Long zuzhangId = getUserIdByName(fgb.getZggy()); |
| | | /* |
| | | ProduceDivision pd = new ProduceDivision(); |
| | | pd.setDrawingNo(fgb.getLjh()); |
| | | pd.setTeamLeaderId(zuzhangId); |
| | | pd.setUpdateUser(-1L); |
| | | pd.setCreateUser(-1L); |
| | | */ |
| | | //Long id = ; |
| | | |
| | | mdmJdbcTemplate.update(sql, new Object[]{idGen.nextId(),fgb.getLjh(),zuzhangId}); |
| | | //produceDivisionService.save(pd); |
| | | |
| | | } |
| | | |
| | | } |