Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
f6b69ed1
Commit
f6b69ed1
authored
Jul 25, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d5336ea0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
CostDetail.php
application/index/controller/CostDetail.php
+3
-2
FStoreCost.php
application/model/FStoreCost.php
+1
-10
FStoreData.php
application/model/FStoreData.php
+11
-0
No files found.
application/index/controller/CostDetail.php
View file @
f6b69ed1
...
...
@@ -11,6 +11,7 @@ use app\model\CActivity;
use
app\model\FApplyForFeeCheck
;
use
app\model\FStoreCost
;
use
app\model\FStoreCostExt
;
use
app\model\FStoreData
;
use
think\Request
;
/**
...
...
@@ -446,8 +447,8 @@ class CostDetail extends Basic
$conditions
[
"b.district_id"
]
=
$params
[
"district_id"
];
}
$field
=
'a.store_id,b.district_id,c.district_name,b.store_name'
;
$m_store_
cost
=
new
FStoreCost
();
$list
=
$m_store_
cost
->
getAllStoreCost
(
$field
,
$conditions
);
$m_store_
data
=
new
FStoreData
();
$list
=
$m_store_
data
->
getAllStoreCost
(
$field
,
$conditions
);
$result
[
"list"
]
=
$list
;
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
...
...
application/model/FStoreCost.php
View file @
f6b69ed1
...
...
@@ -106,14 +106,5 @@ class FStoreCost extends BaseModel
->
sum
(
$field
);
}
public
function
getAllStoreCost
(
$field
,
$where
)
{
$where
[
'a.status'
]
=
0
;
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_store b'
,
'a.store_id=b.id'
,
'left'
)
->
join
(
'a_district c'
,
'b.district_id=c.id'
,
'left'
)
->
where
(
$where
)
->
select
();
}
}
application/model/FStoreData.php
View file @
f6b69ed1
...
...
@@ -126,4 +126,15 @@ class FStoreData extends BaseModel
{
return
$this
->
where
(
$where
)
->
sum
(
$field
);
}
public
function
getAllStoreCost
(
$field
,
$where
)
{
$where
[
'a.status'
]
=
0
;
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_store b'
,
'a.store_id=b.id'
,
'left'
)
->
join
(
'a_district c'
,
'b.district_id=c.id'
,
'left'
)
->
where
(
$where
)
->
select
();
}
}
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