Commit af4c858f by Samir Sadykhov

форматирование кода

parent 3660d6d3
......@@ -29,12 +29,12 @@ public class DocumentDAO {
// Получаем docID и formula
try (PreparedStatement ps = con.prepareStatement(
"SELECT rg.docID, nt.formula " +
"FROM register_docs rg " +
"LEFT JOIN object_folders of ON rg.docID = of.objectID " +
"LEFT JOIN registers r ON r.registerID = rg.registerID " +
"LEFT JOIN number_templates nt ON nt.templateID = r.templateID " +
"WHERE of.folderid = ? AND of.object_type = '1024'"
"SELECT rg.docID, nt.formula " +
"FROM register_docs rg " +
"LEFT JOIN object_folders of ON rg.docID = of.objectID " +
"LEFT JOIN registers r ON r.registerID = rg.registerID " +
"LEFT JOIN number_templates nt ON nt.templateID = r.templateID " +
"WHERE of.folderid = ? AND of.object_type = '1024'"
)) {
ps.setString(1, documentID);
......@@ -60,7 +60,7 @@ public class DocumentDAO {
// update user_mask
try (PreparedStatement ps = con.prepareStatement(
"UPDATE register_docs SET user_mask = ? WHERE docID = ?"
"UPDATE register_docs SET user_mask = ? WHERE docID = ?"
)) {
ps.setString(1, numberTemplate);
......@@ -70,7 +70,7 @@ public class DocumentDAO {
// delete old inputs
try (PreparedStatement ps = con.prepareStatement(
"DELETE FROM doc_number_input WHERE docID = ?"
"DELETE FROM doc_number_input WHERE docID = ?"
)) {
ps.setString(1, docID);
......@@ -79,7 +79,7 @@ public class DocumentDAO {
// парсим formula
StringBuilder sql = new StringBuilder(
"INSERT INTO doc_number_input(number, docID, value) VALUES "
"INSERT INTO doc_number_input(number, docID, value) VALUES "
);
List<String> values = new ArrayList<>();
......@@ -143,18 +143,18 @@ public class DocumentDAO {
try {
con.rollback();
} catch (Exception ignored) {}
}
}
throw e;
throw e;
} finally {
} finally {
if (con != null) {
try {
con.setAutoCommit(true);
} catch (Exception ignored) {}
ConnectionPool.close(con);
}
}
if (con != null) {
try {
con.setAutoCommit(true);
} catch (Exception ignored) {}
ConnectionPool.close(con);
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment