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
c6a1e283
Commit
c6a1e283
authored
Nov 27, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
89cee29d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
LgGlBalanceJob.java
...java/pwc/taxtech/atms/common/schedule/LgGlBalanceJob.java
+14
-12
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/schedule/LgGlBalanceJob.java
View file @
c6a1e283
package
pwc
.
taxtech
.
atms
.
common
.
schedule
;
package
pwc
.
taxtech
.
atms
.
common
.
schedule
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.quartz.JobDataMap
;
import
org.quartz.JobDataMap
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionException
;
import
org.quartz.JobExecutionException
;
import
org.quartz.SchedulerException
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.quartz.QuartzJobBean
;
import
org.springframework.scheduling.quartz.QuartzJobBean
;
import
org.springframework.scheduling.quartz.SchedulerFactoryBean
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.dao.EnterpriseAccountMapper
;
import
pwc.taxtech.atms.dao.EnterpriseAccountSetOrgMapper
;
import
pwc.taxtech.atms.dao.OrganizationMapper
;
import
pwc.taxtech.atms.dao.OrganizationMapper
;
import
pwc.taxtech.atms.
dao.UserMapper
;
import
pwc.taxtech.atms.
entity.Organization
;
import
pwc.taxtech.atms.
entity.*
;
import
pwc.taxtech.atms.
service.impl.LgGlBalanceService
;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.List
;
public
class
LgGlBalanceJob
extends
QuartzJobBean
{
public
class
LgGlBalanceJob
extends
QuartzJobBean
{
...
@@ -25,12 +24,10 @@ public class LgGlBalanceJob extends QuartzJobBean {
...
@@ -25,12 +24,10 @@ public class LgGlBalanceJob extends QuartzJobBean {
public
static
final
String
ORG_ID
=
"org_id"
;
public
static
final
String
ORG_ID
=
"org_id"
;
public
static
final
String
PERIOD
=
"period"
;
public
static
final
String
PERIOD
=
"period"
;
@Autowired
private
EnterpriseAccountMapper
accountMapper
;
@Autowired
@Autowired
private
OrganizationMapper
orgMapper
;
private
OrganizationMapper
orgMapper
;
@
Autowired
@
Resource
private
EnterpriseAccountSetOrgMapper
setOrgMapper
;
private
LgGlBalanceService
lgGlBalanceService
;
@Override
@Override
protected
void
executeInternal
(
JobExecutionContext
jobExecutionContext
)
throws
JobExecutionException
{
protected
void
executeInternal
(
JobExecutionContext
jobExecutionContext
)
throws
JobExecutionException
{
...
@@ -45,10 +42,15 @@ public class LgGlBalanceJob extends QuartzJobBean {
...
@@ -45,10 +42,15 @@ public class LgGlBalanceJob extends QuartzJobBean {
}
}
for
(
Organization
organization
:
orgList
)
{
for
(
Organization
organization
:
orgList
)
{
try
{
try
{
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
Constant
.
DateFormat
.
YEAR_MONTH
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
MONTH
,
-
1
);
period
=
StringUtils
.
isBlank
(
period
)
?
dateFormat
.
format
(
calendar
.
getTime
())
:
period
;
lgGlBalanceService
.
queryGlBalance
(
organization
,
period
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"LgGlBalanceJob error. Organization: "
+
organization
.
getId
(),
e
);
LOGGER
.
error
(
"LgGlBalanceJob error. Organization: "
+
organization
.
getId
(),
e
);
}
}
}
}
}
}
}
}
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