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
22f66510
Commit
22f66510
authored
Nov 14, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] cannot stop timer when updateconfig is error
parent
bc10900c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
39 deletions
+46
-39
vat-caculate-data.ctrl.js
...vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
+46
-39
No files found.
atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
View file @
22f66510
...
@@ -549,48 +549,55 @@
...
@@ -549,48 +549,55 @@
vatOperationLogService
.
addOperationLog
(
logDto
);
vatOperationLogService
.
addOperationLog
(
logDto
);
};
};
var
updateTasksStatus
=
function
(
job
){
var
updateTasksStatus
=
function
(
job
){
if
(
job
.
currentStep
==
'UpdateConfig'
){
var
items
=
$scope
.
tasks
[
1
].
items
;
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'processing'
;
if
(
job
.
jobStatus
==
'End'
){
$scope
.
tasks
[
0
].
items
[
0
].
text
=
$translate
.
instant
(
'processing'
);
items
.
forEach
(
function
(
item
,
index
){
}
else
{
item
.
status
=
'completed'
;
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'completed'
;
item
.
task
=
$translate
.
instant
(
'completed'
);
$scope
.
tasks
[
0
].
items
[
0
].
text
=
$translate
.
instant
(
'completed'
);
});
var
items
=
$scope
.
tasks
[
1
].
items
;
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'completed'
;
if
(
job
.
jobStatus
==
'End'
){
$scope
.
tasks
[
0
].
items
[
0
].
text
=
$translate
.
instant
(
'completed'
);
items
.
forEach
(
function
(
item
,
index
){
item
.
status
=
'completed'
;
if
(
$scope
.
timer
){
});
$interval
.
cancel
(
$scope
.
timer
);
if
(
$scope
.
timer
){
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
Generated
$interval
.
cancel
(
$scope
.
timer
);
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
Generated
}
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
}
else
if
(
job
.
jobStatus
==
'Running'
||
job
.
jobStatus
==
'Error'
){
}
var
tasks
=
JSON
.
parse
(
job
.
status
)
}
else
if
(
job
.
jobStatus
==
'Running'
||
job
.
jobStatus
==
'Error'
){
var
tasks
=
JSON
.
parse
(
job
.
status
)
items
.
forEach
(
function
(
item
,
index
){
tasks
.
forEach
(
function
(
task
){
if
(
task
.
code
==
item
.
code
){
if
(
task
.
status
==
'Error'
){
item
.
status
=
'error'
;
}
else
if
(
task
.
status
==
'End'
){
item
.
status
=
'completed'
;
}
else
if
(
task
.
status
==
'Begin'
){
item
.
status
=
'processing'
;
}
item
.
text
=
$translate
.
instant
(
item
.
status
);
}
})
});
if
(
job
.
jobStatus
==
'Error'
){
var
updateConfig
=
tasks
[
0
];
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
if
(
updateConfig
.
status
==
'Error'
){
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'error'
;
}
else
if
(
updateConfig
.
status
==
'End'
){
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'completed'
;
}
else
if
(
updateConfig
.
status
==
'Begin'
){
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'processing'
;
}
$scope
.
tasks
[
0
].
items
[
0
].
text
=
$translate
.
instant
(
$scope
.
tasks
[
0
].
items
[
0
].
status
);
items
.
forEach
(
function
(
item
,
index
){
tasks
.
forEach
(
function
(
task
){
if
(
task
.
code
==
item
.
code
){
if
(
task
.
status
==
'Error'
){
item
.
status
=
'error'
;
}
else
if
(
task
.
status
==
'End'
){
item
.
status
=
'completed'
;
}
else
if
(
task
.
status
==
'Begin'
){
item
.
status
=
'processing'
;
}
item
.
text
=
$translate
.
instant
(
item
.
status
);
}
}
}
})
}
});
if
(
job
.
jobStatus
==
'Error'
){
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
}
}
}
var
getInitTaskStatus
=
function
(){
var
getInitTaskStatus
=
function
(){
...
...
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