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
104ede14
Commit
104ede14
authored
Jun 19, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
办公楼成功报告
parent
023d25f0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
209 additions
and
1 deletion
+209
-1
OfficeBargain.php
application/index/controller/OfficeBargain.php
+0
-0
OfficeOBargainModel.php
application/model/OfficeOBargainModel.php
+66
-0
OfficeOMarchInModel.php
application/model/OfficeOMarchInModel.php
+1
-1
OfficeOPartialCommission.php
application/model/OfficeOPartialCommission.php
+0
-0
OfficeORealIncome.php
application/model/OfficeORealIncome.php
+137
-0
route.php
application/route.php
+5
-0
No files found.
application/index/controller/OfficeBargain.php
0 → 100644
View file @
104ede14
This diff is collapsed.
Click to expand it.
application/model/OfficeOBargainModel.php
View file @
104ede14
...
...
@@ -1630,4 +1630,69 @@ class OfficeOBargainModel extends Model
->
where
(
$where
)
->
find
();
}
/**
* 成交报告列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargainList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'office_o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'office_o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'office_g_room d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'office_o_partial_commission e'
,
'a.id = e.bargain_id'
,
'left'
)
->
join
(
'office_g_building f'
,
'd.building_id=f.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
group
(
'a.id'
)
->
select
();
}
/**
* 成交报告总数
*
* @param array $params
* @return int
*/
public
function
getBargainTotal
(
array
$params
=
[])
{
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
'office_o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'office_o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'office_g_room d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'office_o_partial_commission e'
,
'a.id = e.bargain_id'
,
'left'
)
->
join
(
'office_g_building f'
,
'd.building_id=f.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
count
();
}
/**
* @param string $field
* @param string $params
* @return float|int
*/
public
function
getBargainListSum
(
$field
=
''
,
$params
=
''
)
{
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
'office_o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'office_o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'office_g_room d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'office_o_partial_commission e'
,
'a.id = e.bargain_id'
,
'left'
)
->
join
(
'office_g_building f'
,
'd.building_id=f.id'
,
'left'
)
->
where
(
$params
)
->
sum
(
$field
);
}
}
\ No newline at end of file
application/model/OfficeOMarchInModel.php
View file @
104ede14
...
...
@@ -460,7 +460,7 @@ class OfficeOMarchInModel extends Model
$data
[
'data'
]
=
$this
->
db_model
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.reception_id = b.id'
,
'left'
)
->
join
(
'o_bargain c'
,
'a.order_id = c.order_id'
,
'left'
)
->
join
(
'o
ffice_o
_bargain c'
,
'a.order_id = c.order_id'
,
'left'
)
->
where
(
$where
)
->
select
();
$data
[
'status'
]
=
'successful'
;
...
...
application/model/OfficeOPartialCommission.php
0 → 100644
View file @
104ede14
This diff is collapsed.
Click to expand it.
application/model/OfficeORealIncome.php
0 → 100644
View file @
104ede14
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/5/23
* Time: 17:46
*/
namespace
app\model
;
class
OfficeORealIncome
extends
BaseModel
{
/**
* 增加实收佣金
*
* @param $insert_data
* @return array|false
* @throws \Exception
*/
public
function
addRealIncome
(
$insert_data
)
{
return
$this
->
saveAll
(
$insert_data
);
}
/**
* @param int $bargain_id
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargainTaxes
(
int
$bargain_id
,
$field
=
'id as fee_id,money,income_time'
)
{
return
$this
->
field
(
$field
)
->
where
(
'bargain_id'
,
$bargain_id
)
->
where
(
'is_del'
,
0
)
->
select
();
}
/**
* @param int $bargain_id
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargainIncome
(
int
$bargain_id
,
$field
=
'id as fee_id,money,income_time'
)
{
return
$this
->
field
(
$field
)
->
where
(
'bargain_id'
,
$bargain_id
)
->
where
(
'is_del'
,
0
)
->
find
();
}
/**
* @param int $bargain_id
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getIncome
(
$where
,
$field
=
'id as fee_id,money,income_time'
)
{
$where
[
'is_del'
]
=
0
;
return
$this
->
field
(
$field
)
->
where
(
$where
)
->
find
();
}
/**
* @param int $field
* @param array $where
* @return array
*/
public
function
getBargainTaxesColumn
(
$field
,
array
$where
)
{
return
$this
->
field
(
$field
)
->
where
(
$where
)
->
column
(
$field
);
}
/**
* @param string $field
* @param $where
* @return mixed
*/
public
function
getRealIncomeBargain
(
$field
=
'id as fee_id,money,income_time'
,
$where
)
{
try
{
$where
[
'is_del'
]
=
0
;
$result
[
'data'
]
=
$this
->
field
(
$field
)
->
where
(
$where
)
->
select
();
$result
[
'status'
]
=
'successful'
;
}
catch
(
\Exception
$e
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
$e
->
getMessage
();
}
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
(
'office_o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'office_o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'office_g_room d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'office_o_partial_commission e'
,
'a.id = e.bargain_id'
,
'left'
)
->
join
(
'office_g_building f'
,
'd.building_id=f.id'
,
'left'
)
->
where
(
$params
)
->
sum
(
$field
);
}
/**
* @param $field
* @param $where
* @return mixed
*/
public
function
getFieldValue
(
$field
,
$where
)
{
return
$this
->
where
(
$where
)
->
value
(
$field
);
}
}
\ No newline at end of file
application/route.php
View file @
104ede14
...
...
@@ -1071,6 +1071,11 @@ Route::group('office_index', [
'getDistance'
=>
[
'index/OfficeManage/getDistance'
,
[
'method'
=>
'GET'
]],
//获取两个经纬度距离
'getHouseAddress'
=>
[
'index/OfficeRoom/checkRepetition'
,
[
'method'
=>
'get'
]],
//搜索楼号/栋/座+楼层+房号
'marchInList'
=>
[
'index/officeMarchIn/marchInList'
,
[
'method'
=>
'POST|GET'
]],
//进场记录列表 朱伟 2018-06-13
'reportListOne/:check_status'
=>
[
'index/OfficeBargain/reportList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
1
]],
//财务 成交报告-未结单-第一级审核
'reportListTwo/:check_status'
=>
[
'index/OfficeBargain/reportList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
2
]],
//财务 成交报告-未结单-第二级审核
'reportListThree/:check_status'
=>
[
'index/OfficeBargain/reportList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
3
]],
//财务 成交报告-未结单-第三级审核
'reportListStatement/:check_status'
=>
[
'index/OfficeBargain/reportList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
4
]],
//财务 成交报告-已结单
'reportListAll/:check_status'
=>
[
'index/OfficeBargain/reportList'
,
[
'method'
=>
'get'
],
[
'check_status'
=>
10
]],
//财务 成交报告-全部
]);
Route
::
group
(
'office_api'
,
[
...
...
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