Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-datacenter
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
bailuntec-datacenter
Commits
cb98921f
Commit
cb98921f
authored
Jul 27, 2021
by
liyanlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复预付账款和应收账款数据丢失的问题
parent
7cf9e9dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
BalanceSheetJob.java
...heet/src/main/java/com/bailuntec/job/BalanceSheetJob.java
+19
-8
BalanceSheetService.java
...n/java/com/bailuntec/job/service/BalanceSheetService.java
+2
-7
No files found.
datacenter-job/datacenter-finance/finance-balance-sheet/src/main/java/com/bailuntec/job/BalanceSheetJob.java
View file @
cb98921f
...
...
@@ -139,14 +139,25 @@ public class BalanceSheetJob {
* </p>
* 数据来源
*/
@Scheduled
(
cron
=
"0 0
8
* * ?"
)
@Scheduled
(
cron
=
"0 0
3
* * ?"
)
public
void
generateBalanceSheet
()
{
try
{
log
.
info
(
"每天
8
点 生成资产负债表 开始"
);
log
.
info
(
"每天
3
点 生成资产负债表 开始"
);
balanceSheetService
.
generateBalanceSheet
();
log
.
info
(
"每天
8
点 生成资产负债表 结束"
);
log
.
info
(
"每天
3
点 生成资产负债表 结束"
);
}
catch
(
Exception
ex
)
{
log
.
error
(
"每天8点 生成资产负债表 异常:"
,
ex
);
log
.
error
(
"每天3点 生成资产负债表 异常:"
,
ex
);
}
}
@Scheduled
(
cron
=
"0 0 4 * * ?"
)
public
void
getSupplierTransaction
()
{
try
{
log
.
info
(
"每天4点 取供应商往来数据:应付账款和预付账款 开始"
);
//
balanceSheetService
.
getSupplierTransaction
();
log
.
info
(
"每天4点 取供应商往来数据:应付账款和预付账款 结束"
);
}
catch
(
Exception
ex
)
{
log
.
error
(
"每天4点 取供应商往来数据:应付账款和预付账款 异常:"
,
ex
);
}
}
...
...
@@ -159,14 +170,14 @@ public class BalanceSheetJob {
* </p>
* 数据来源
*/
@Scheduled
(
cron
=
"0 0
9
* * ?"
)
@Scheduled
(
cron
=
"0 0
7
* * ?"
)
public
void
generateBalanceSheetNewResult
()
{
try
{
log
.
info
(
"每天
9
点 生成新资产负债结果表 开始"
);
log
.
info
(
"每天
7
点 生成新资产负债结果表 开始"
);
balanceSheetService
.
generateBalanceSheetNewResult
();
log
.
info
(
"每天
9
点 生成新资产负债结果表 结束"
);
log
.
info
(
"每天
7
点 生成新资产负债结果表 结束"
);
}
catch
(
Exception
ex
)
{
log
.
error
(
"每天
9
点 生成新资产负债结果表 异常:"
,
ex
);
log
.
error
(
"每天
7
点 生成新资产负债结果表 异常:"
,
ex
);
}
}
...
...
datacenter-job/datacenter-finance/finance-balance-sheet/src/main/java/com/bailuntec/job/service/BalanceSheetService.java
View file @
cb98921f
...
...
@@ -500,9 +500,6 @@ public class BalanceSheetService {
LocalDate
date
=
LocalDate
.
now
().
minusDays
(
1
);
//取供应商往来数据:应付账款和预付账款
getSupplierTransaction
(
date
);
//获取半成品在途
getSemiTransferAmount
(
date
);
...
...
@@ -697,12 +694,10 @@ public class BalanceSheetService {
/**
*取供应商往来数据:应付账款和预付账款
*/
public
void
getSupplierTransaction
(
LocalDate
date
){
public
void
getSupplierTransaction
(){
LocalDate
date
=
LocalDate
.
now
().
minusDays
(
1
);
try
{
PurchaseResult
<
List
<
SupplierTransactionDTO
>>
result
=
purchaseApi
.
GetSupplierTransactionStatictis
(
date
,
null
,
null
,
"{}"
);
log
.
info
(
"取供应商往来数据:应付账款和预付账款"
);
log
.
info
(
date
.
toString
());
log
.
info
(
JSON
.
toJSONString
(
result
));
if
(
result
.
getIsSuccessed
()
&&
result
.
getData
().
size
()
>
0
)
{
dcSupplierTransactionMapper
.
insertOrUpdateSupplierTransaction
(
result
.
getData
());
updateSuppliserTransactionOfBalanceSheet
(
date
);
...
...
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