|
@@ -40,15 +40,17 @@ public class DaoImpl implements Dao { |
|
@@ -40,15 +40,17 @@ public class DaoImpl implements Dao { |
40
|
this.jdbcTemplate = jdbcTemplate;
|
40
|
this.jdbcTemplate = jdbcTemplate;
|
41
|
}
|
41
|
}
|
42
|
|
42
|
|
43
|
- public int insertRecord(final String oper, final String sndr) {
|
43
|
+ public int insertRecord(final String oper, final String sndr,String type,String styp) {
|
44
|
KeyHolder keyHolder = new GeneratedKeyHolder();
|
44
|
KeyHolder keyHolder = new GeneratedKeyHolder();
|
45
|
this.jdbcTemplate.update(new PreparedStatementCreator() {
|
45
|
this.jdbcTemplate.update(new PreparedStatementCreator() {
|
46
|
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
|
46
|
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
|
47
|
- DaoImpl.logger.info("oper=" + oper + " sndr=" + sndr);
|
|
|
48
|
- String sql = "insert into T_ETL_MESSAGE(OPER,SNDR,SNTM,content) values(?,?,sysdate,empty_clob())";
|
47
|
+ DaoImpl.logger.info("oper=" + oper + " sndr=" + sndr+"type="+type+"styp="+styp);
|
|
|
48
|
+ String sql = "insert into T_ETL_MESSAGE(OPER,SNDR,SNTM,content,TYPE,STYP) values(?,?,sysdate,empty_clob(),?,?)";
|
49
|
PreparedStatement ps = connection.prepareStatement(sql, new String[]{"FID"});
|
49
|
PreparedStatement ps = connection.prepareStatement(sql, new String[]{"FID"});
|
50
|
ps.setString(1, oper);
|
50
|
ps.setString(1, oper);
|
51
|
ps.setString(2, sndr);
|
51
|
ps.setString(2, sndr);
|
|
|
52
|
+ ps.setString(3, type);
|
|
|
53
|
+ ps.setString(4, styp);
|
52
|
return ps;
|
54
|
return ps;
|
53
|
}
|
55
|
}
|
54
|
}, keyHolder);
|
56
|
}, keyHolder);
|
|
@@ -56,14 +58,14 @@ public class DaoImpl implements Dao { |
|
@@ -56,14 +58,14 @@ public class DaoImpl implements Dao { |
56
|
return generatedId;
|
58
|
return generatedId;
|
57
|
}
|
59
|
}
|
58
|
|
60
|
|
59
|
- public void saveRecord(String messaegType, String sndr, String xmlContent) throws Exception {
|
61
|
+ public void saveRecord(String messaegType, String sndr, String xmlContent,String type,String styp) throws Exception {
|
60
|
Connection conn = null;
|
62
|
Connection conn = null;
|
61
|
Statement stmt = null;
|
63
|
Statement stmt = null;
|
62
|
ResultSet rs = null;
|
64
|
ResultSet rs = null;
|
63
|
int fid = -100;
|
65
|
int fid = -100;
|
64
|
|
66
|
|
65
|
try {
|
67
|
try {
|
66
|
- fid = this.insertRecord(messaegType, sndr);
|
68
|
+ fid = this.insertRecord(messaegType, sndr,type,styp);
|
67
|
conn = this.jdbcTemplate.getDataSource().getConnection();
|
69
|
conn = this.jdbcTemplate.getDataSource().getConnection();
|
68
|
conn.setAutoCommit(false);
|
70
|
conn.setAutoCommit(false);
|
69
|
stmt = conn.createStatement();
|
71
|
stmt = conn.createStatement();
|