|
|
|
|
@ -260,6 +260,22 @@ public class CpController extends AbstractController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strSQL = new StringBuffer();
|
|
|
|
|
strSQL.append("SELECT MAX(MC_CODE) FROM CP_MATCH ");
|
|
|
|
|
ps = conn.prepareStatement(strSQL.toString());
|
|
|
|
|
rs = ps.executeQuery();
|
|
|
|
|
String nextMatchKey = "";
|
|
|
|
|
if(rs.next()) {
|
|
|
|
|
String maxMatchKey = rs.getString(1);
|
|
|
|
|
if(maxMatchKey == null || maxMatchKey.equals("")) {
|
|
|
|
|
nextMatchKey = "1";
|
|
|
|
|
} else {
|
|
|
|
|
nextMatchKey = Integer.toString(Integer.parseInt(maxMatchKey)+1);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
nextMatchKey = "1";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strSQL = new StringBuffer();
|
|
|
|
|
strSQL.append("INSERT INTO CP_OWNER ");
|
|
|
|
|
@ -345,6 +361,18 @@ public class CpController extends AbstractController {
|
|
|
|
|
//ps.setString
|
|
|
|
|
ps.executeUpdate();
|
|
|
|
|
|
|
|
|
|
strSQL = new StringBuffer();
|
|
|
|
|
strSQL.append("INSERT INTO CP_MATCH (MC_CODE, MC_MMCODE, MC_LVY_KEY)"
|
|
|
|
|
+" VALUES ("
|
|
|
|
|
+"'"+nextMatchKey+"',"
|
|
|
|
|
+"'"+nextMainKey+"',"
|
|
|
|
|
+"'"+nextMainKey.substring(5)+"'"
|
|
|
|
|
+")"
|
|
|
|
|
);
|
|
|
|
|
ps = conn.prepareStatement(strSQL.toString());
|
|
|
|
|
//ps.setString
|
|
|
|
|
ps.executeUpdate();
|
|
|
|
|
|
|
|
|
|
conn.commit();
|
|
|
|
|
|
|
|
|
|
ps.close();
|
|
|
|
|
|