Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
02569828
Commit
02569828
authored
Jan 18, 2025
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(wealth): 财务报表
parent
58c0ebfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
BoxReportCacheLoader.java
...ule/wealth/controller/admin/job/BoxReportCacheLoader.java
+10
-6
ReceiptItemMapper.xml
...c/main/resources/mapper/ReceiptItem/ReceiptItemMapper.xml
+2
-1
No files found.
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheLoader.java
View file @
02569828
...
...
@@ -26,13 +26,17 @@ public class BoxReportCacheLoader implements ApplicationRunner {
@Override
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
log
.
info
(
"初始化应收报表缓存"
);
List
<
Long
>
boxIds
=
receivableMapper
.
getAllBoxId
();
Set
<
String
>
keys
=
redisHelper
.
keys
(
BOX_AMOUNT_CACHE
+
"*"
);
if
(
CollectionUtil
.
isNotEmpty
(
keys
))
{
List
<
Long
>
cacheBoxIds
=
keys
.
stream
().
map
(
key
->
Long
.
parseLong
(
key
.
replace
(
BOX_AMOUNT_CACHE
,
""
))).
collect
(
Collectors
.
toList
());
boxIds
=
boxIds
.
stream
().
filter
(
boxId
->
!
cacheBoxIds
.
contains
(
boxId
)).
collect
(
Collectors
.
toList
());
try
{
List
<
Long
>
boxIds
=
receivableMapper
.
getAllBoxId
();
Set
<
String
>
keys
=
redisHelper
.
keys
(
BOX_AMOUNT_CACHE
+
"*"
);
if
(
CollectionUtil
.
isNotEmpty
(
keys
))
{
List
<
Long
>
cacheBoxIds
=
keys
.
stream
().
map
(
key
->
Long
.
parseLong
(
key
.
replace
(
BOX_AMOUNT_CACHE
,
""
))).
collect
(
Collectors
.
toList
());
boxIds
=
boxIds
.
stream
().
filter
(
boxId
->
!
cacheBoxIds
.
contains
(
boxId
)).
collect
(
Collectors
.
toList
());
}
receivableService
.
updateBoxAmountCache
(
boxIds
,
false
);
}
catch
(
Exception
e
)
{
log
.
error
(
"初始化应收报表缓存失败"
,
e
);
}
receivableService
.
updateBoxAmountCache
(
boxIds
,
false
);
log
.
info
(
"初始化应收报表缓存完成"
);
}
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/ReceiptItemMapper.xml
View file @
02569828
...
...
@@ -112,7 +112,8 @@
FROM ecw_receivable_write_off_record erwor
LEFT JOIN ecw_receipt_item eri ON erwor.receipt_item_id = eri.id
WHERE
erwor.order_id IN
erwor.income_belong IS NOT NULL
AND erwor.order_id IN
<foreach
collection=
"orderIds"
item=
"orderId"
open=
"("
separator=
","
close=
")"
>
#{orderId}
</foreach>
...
...
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