Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
02949c4b
Commit
02949c4b
authored
Nov 08, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bugfix] fixed update jo status
parent
e28290f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+1
-2
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+8
-4
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
02949c4b
...
...
@@ -103,6 +103,7 @@ public class ReportGeneratorImpl {
for
(
int
i
=
0
;
i
<
workbook
.
getNumberOfSheets
();
i
++)
{
Sheet
sheet
=
workbook
.
getSheetAt
(
i
);
String
code
=
sheet
.
getSheetName
();
job
.
setCurrentStep
(
code
);
Optional
<
PeriodTemplate
>
periodTemplate
=
resources
.
getPeriodTemplates
().
stream
()
.
filter
(
a
->
a
.
getCode
().
equals
(
code
))
.
findFirst
();
...
...
@@ -353,9 +354,7 @@ public class ReportGeneratorImpl {
e
.
printStackTrace
();
job
.
setStatus
(
WrapPeriodJobDto
.
STATUS_ERROR
);
job
.
setErrorMsg
(
"cacals report for code "
+
code
+
" failed"
);
}
finally
{
job
.
setCurrentStep
(
code
);
periodJobMapper
.
updateByPrimaryKey
(
job
);
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
02949c4b
...
...
@@ -245,15 +245,19 @@ public class ReportServiceImpl {
@Transactional
private
void
updateConfig
(
String
projectId
,
Integer
period
,
Boolean
isMergeManualData
,
List
<
Template
>
templates
,
PeriodJob
job
)
{
try
{
job
.
setStatus
(
WrapPeriodJobDto
.
STATUS_BEGIN
);
List
<
Long
>
exceptTemplateIds
=
templateMapper
.
getIdsForExceptTemplate
();
clearPeriodData
(
projectId
,
period
,
exceptTemplateIds
,
isMergeManualData
);
copyTemplateAndConfigFromAdmin
(
projectId
,
templates
,
period
);
}
catch
(
Exception
ex
)
{
job
.
setStatus
(
WrapPeriodJobDto
.
STATUS_ERROR
);
job
.
setErrorMsg
(
"error update config with projectId "
+
projectId
+
" period"
+
period
);
periodJobMapper
.
updateByPrimaryKey
(
job
);
logger
.
error
(
ex
.
getMessage
(),
ex
);
}
finally
{
periodJobMapper
.
updateByPrimaryKey
(
job
);
}
}
...
...
@@ -484,13 +488,13 @@ public class ReportServiceImpl {
reportGenerator
.
updateWorkbookCaclsValueToDb
(
projectId
,
periodParam
,
workbook
,
resources
,
genJob
);
genJob
.
setStatus
(
WrapPeriodJobDto
.
STATUS_END
);
periodJobMapper
.
updateByPrimaryKey
(
genJob
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
genJob
.
setStatus
(
WrapPeriodJobDto
.
STATUS_ERROR
);
genJob
.
setErrorMsg
(
"Server error"
);
}
finally
{
genJob
.
setErrorMsg
(
"Sever error"
);
periodJobMapper
.
updateByPrimaryKey
(
genJob
);
e
.
printStackTrace
();
}
}
}).
start
();
...
...
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