Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
documentServices
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Samir Sadykhov
documentServices
Commits
af4c858f
Commit
af4c858f
authored
Mar 16, 2026
by
Samir Sadykhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
форматирование кода
parent
3660d6d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
DocumentDAO.java
src/main/java/kz/arta/documentServices/dao/DocumentDAO.java
+19
-19
No files found.
src/main/java/kz/arta/documentServices/dao/DocumentDAO.java
View file @
af4c858f
...
...
@@ -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
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment