Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
financial-system
Project
Project
Details
Activity
Releases
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
xianyang
financial-system
Commits
f038c72d
Commit
f038c72d
authored
Apr 18, 2023
by
xianyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化业务类型出入账分组详情
parent
51dbf322
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
crud.py
app/api/export/crud.py
+3
-3
No files found.
app/api/export/crud.py
View file @
f038c72d
...
...
@@ -249,7 +249,7 @@ class ReferenceTypeClassification():
def
classification_summary
(
self
):
data_sql
=
f
"select uuid,type,sum(amount)
/1000
as amount,create_time from {self.date} where reference_type='{self.reference_type}' GROUP BY uuid,type"
data_sql
=
f
"select uuid,type,sum(amount) as amount,create_time from {self.date} where reference_type='{self.reference_type}' GROUP BY uuid,type"
guild_sql
=
f
"select uuid from guild"
account_sql
=
f
"select uuid,name from fi_account"
anchor_sql
=
f
"select uuid from v2_user where is_achor in(1,2)"
...
...
@@ -291,12 +291,12 @@ class ReferenceTypeClassification():
outcome
=
pd
.
DataFrame
(
self
.
outcome
)
ogs
=
outcome
.
groupby
(
"nickname"
)
.
sum
()
for
k
,
v
in
ogs
.
to_dict
()
.
get
(
'money'
)
.
items
():
res_list
.
append
({
"type"
:
"出账"
,
"name"
:
k
,
"money"
:
round
(
float
(
v
),
3
)})
res_list
.
append
({
"type"
:
"出账"
,
"name"
:
k
,
"money"
:
round
(
float
(
v
/
1000
),
3
)})
if
self
.
income
:
income
=
pd
.
DataFrame
(
self
.
income
)
igs
=
income
.
groupby
(
"nickname"
)
.
sum
()
for
k
,
v
in
igs
.
to_dict
()
.
get
(
'money'
)
.
items
():
res_list
.
append
({
"type"
:
"入账"
,
"name"
:
k
,
"money"
:
round
(
float
(
v
),
3
)})
res_list
.
append
({
"type"
:
"入账"
,
"name"
:
k
,
"money"
:
round
(
float
(
v
/
1000
),
3
)})
return
res_list
...
...
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