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
0407dd27
Commit
0407dd27
authored
Oct 17, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交报告计算总数
parent
ed868571
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
0 deletions
+59
-0
Finance.php
application/index/controller/Finance.php
+0
-0
OBargainModel.php
application/model/OBargainModel.php
+32
-0
ORealIncome.php
application/model/ORealIncome.php
+27
-0
No files found.
application/index/controller/Finance.php
View file @
0407dd27
This diff is collapsed.
Click to expand it.
application/model/OBargainModel.php
View file @
0407dd27
...
@@ -371,6 +371,22 @@ class OBargainModel extends Model
...
@@ -371,6 +371,22 @@ class OBargainModel extends Model
->
select
();
->
select
();
}
}
/**
* @param string $field
* @param string $params
* @return float|int
*/
public
function
getBargainListSum
(
$field
=
''
,
$params
=
''
)
{
return
$this
->
alias
(
'a'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
sum
(
$field
);
}
/**
/**
* 成交报告总数
* 成交报告总数
*
*
...
@@ -1514,4 +1530,19 @@ class OBargainModel extends Model
...
@@ -1514,4 +1530,19 @@ class OBargainModel extends Model
echo '--------------';*/
echo '--------------';*/
return
$return
;
return
$return
;
}
}
/**
* @param $field
* @param $where
* @return float|int
*/
public
function
sumField
(
$field
,
$where
)
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
where
(
$where
)
->
group
(
'a.id'
)
->
sum
(
$field
);
}
}
}
\ No newline at end of file
application/model/ORealIncome.php
View file @
0407dd27
...
@@ -57,4 +57,30 @@ class ORealIncome extends BaseModel
...
@@ -57,4 +57,30 @@ class ORealIncome extends BaseModel
return
$result
;
return
$result
;
}
}
/**
* @param $field
* @param $where
* @return float|int
*/
public
function
sumField
(
$field
,
$where
)
{
return
$this
->
where
(
$where
)
->
sum
(
$field
);
}
/**
* @param string $field
* @param string $params
* @return float|int
*/
public
function
getIncomeListSum
(
$field
=
''
,
$params
=
''
)
{
return
$this
->
alias
(
'e'
)
->
join
(
'o_bargain a'
,
'e.bargain_id = a.id'
,
'left'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
sum
(
$field
);
}
}
}
\ No newline at end of file
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