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
d8d47201
Commit
d8d47201
authored
Jun 25, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1282a3e3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
8 deletions
+72
-8
OfficePerformanceService.php
application/api_broker/service/OfficePerformanceService.php
+5
-2
OfficePerformanceInfo.php
application/index/controller/OfficePerformanceInfo.php
+3
-2
OfficeOBargainModel.php
application/model/OfficeOBargainModel.php
+10
-4
OfficeOReportModel.php
application/model/OfficeOReportModel.php
+54
-0
No files found.
application/api_broker/service/OfficePerformanceService.php
View file @
d8d47201
...
@@ -10,6 +10,7 @@ use app\model\GHousesImgs;
...
@@ -10,6 +10,7 @@ use app\model\GHousesImgs;
use
app\model\GHousesToAgents
;
use
app\model\GHousesToAgents
;
use
app\model\OBargainModel
;
use
app\model\OBargainModel
;
use
app\model\OfficeGRoomToAgent
;
use
app\model\OfficeGRoomToAgent
;
use
app\model\OfficeOBargainModel
;
use
app\model\OfficeOMarchInModel
;
use
app\model\OfficeOMarchInModel
;
use
app\model\OfficeOPayLogModel
;
use
app\model\OfficeOPayLogModel
;
use
app\model\OfficeORefundModel
;
use
app\model\OfficeORefundModel
;
...
@@ -49,8 +50,9 @@ class OfficePerformanceService
...
@@ -49,8 +50,9 @@ class OfficePerformanceService
$this
->
agentModel
=
new
AAgents
();
$this
->
agentModel
=
new
AAgents
();
$this
->
houseModel
=
new
GHouses
();
$this
->
houseModel
=
new
GHouses
();
$this
->
userModel
=
new
Users
();
$this
->
userModel
=
new
Users
();
$this
->
bargainModel
=
new
OBargainModel
();
$this
->
bargainModel
=
new
O
fficeO
BargainModel
();
$this
->
reportModel
=
new
OfficeOReportModel
();
$this
->
reportModel
=
new
OfficeOReportModel
();
// $this->reportModel = new OReportModel();
$this
->
marchInModel
=
new
OfficeOMarchInModel
();
$this
->
marchInModel
=
new
OfficeOMarchInModel
();
$this
->
payLogModel
=
new
OfficeOPayLogModel
();
$this
->
payLogModel
=
new
OfficeOPayLogModel
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
...
@@ -894,7 +896,8 @@ class OfficePerformanceService
...
@@ -894,7 +896,8 @@ class OfficePerformanceService
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.father_id,a.create_time,a.trade_type,a.scale_fee,a.agent_id,c.internal_address,d.user_phone,d.user_name,b.id as order_id"
;
$field
=
"a.id,a.father_id,a.create_time,a.trade_type,a.scale_fee,a.agent_id,e.address as internal_address,
d.user_phone,d.user_name,b.id as order_id"
;
$list
=
$this
->
bargainModel
->
getBargainSumList
(
$field
,
$params
,
$page_size
,
$page_no
,
$request_source_type
);
$list
=
$this
->
bargainModel
->
getBargainSumList
(
$field
,
$params
,
$page_size
,
$page_no
,
$request_source_type
);
foreach
(
$list
as
$key
=>
$val
)
{
foreach
(
$list
as
$key
=>
$val
)
{
$list
[
$key
][
'bargain_id'
]
=
$val
[
"father_id"
]
==
0
?
$val
[
"id"
]
:
$val
[
"father_id"
];
//成交报告ID
$list
[
$key
][
'bargain_id'
]
=
$val
[
"father_id"
]
==
0
?
$val
[
"id"
]
:
$val
[
"father_id"
];
//成交报告ID
...
...
application/index/controller/OfficePerformanceInfo.php
View file @
d8d47201
...
@@ -14,6 +14,7 @@ use app\api_broker\service\VipService;
...
@@ -14,6 +14,7 @@ use app\api_broker\service\VipService;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\index\untils\ExportExcelUntil
;
use
app\index\untils\ExportExcelUntil
;
use
app\model\OBargainModel
;
use
app\model\OBargainModel
;
use
app\model\OfficeOBargainModel
;
use
app\model\OPartialCommission
;
use
app\model\OPartialCommission
;
use
think\Session
;
use
think\Session
;
...
@@ -26,7 +27,7 @@ class OfficePerformanceInfo extends Basic
...
@@ -26,7 +27,7 @@ class OfficePerformanceInfo extends Basic
public
function
__construct
(
$request
=
null
)
public
function
__construct
(
$request
=
null
)
{
{
parent
::
__construct
(
$request
);
parent
::
__construct
(
$request
);
$this
->
oBargainModel
=
new
OBargainModel
();
$this
->
oBargainModel
=
new
O
fficeO
BargainModel
();
$this
->
status
=
array
(
'in'
,
'10,11,13'
);
$this
->
status
=
array
(
'in'
,
'10,11,13'
);
$this
->
redis_service
=
new
RedisCacheService
();
$this
->
redis_service
=
new
RedisCacheService
();
}
}
...
@@ -107,7 +108,7 @@ class OfficePerformanceInfo extends Basic
...
@@ -107,7 +108,7 @@ class OfficePerformanceInfo extends Basic
$field
.=
'Agent.phone,'
;
$field
.=
'Agent.phone,'
;
// $field .= 'Store.store_name,';
// $field .= 'Store.store_name,';
// $field .= 'District.district_name,';
// $field .= 'District.district_name,';
$field
.=
'Houses.internal_address,'
;
$field
.=
'Houses.
address as
internal_address,'
;
$field
.=
'PartialCommission.practical_fee,'
;
$field
.=
'PartialCommission.practical_fee,'
;
$field
.=
'Oorder.house_id'
;
$field
.=
'Oorder.house_id'
;
$return
=
$this
->
oBargainModel
->
performancelInfo
(
$where
,
$field
,
$pageSize
,
$pageNo
);
$return
=
$this
->
oBargainModel
->
performancelInfo
(
$where
,
$field
,
$pageSize
,
$pageNo
);
...
...
application/model/OfficeOBargainModel.php
View file @
d8d47201
...
@@ -1400,10 +1400,13 @@ class OfficeOBargainModel extends Model
...
@@ -1400,10 +1400,13 @@ class OfficeOBargainModel extends Model
->
alias
(
"Obargain"
)
->
alias
(
"Obargain"
)
->
join
(
"o_report Oreport"
,
"Obargain.report_id = Oreport.id"
,
"left"
)
->
join
(
"o_report Oreport"
,
"Obargain.report_id = Oreport.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"office_g_room Room"
,
"Oorder.house_id = Room.id"
,
"left"
)
->
join
(
"office_g_building Houses"
,
"Room.building_id = Houses.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
where
(
$where
)
->
where
(
$where
)
->
order
(
"Obargain.create_time desc"
)
->
order
(
"Obargain.create_time desc"
)
...
@@ -1421,7 +1424,8 @@ class OfficeOBargainModel extends Model
...
@@ -1421,7 +1424,8 @@ class OfficeOBargainModel extends Model
->
alias
(
"Obargain"
)
->
alias
(
"Obargain"
)
->
join
(
"o_report Oreport"
,
"Obargain.report_id = Oreport.id"
,
"left"
)
->
join
(
"o_report Oreport"
,
"Obargain.report_id = Oreport.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"office_g_room Room"
,
"Oorder.house_id = Room.id"
,
"left"
)
->
join
(
"office_g_building Houses"
,
"Room.building_id = Houses.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
...
@@ -1519,8 +1523,10 @@ class OfficeOBargainModel extends Model
...
@@ -1519,8 +1523,10 @@ class OfficeOBargainModel extends Model
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"
g_houses
c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
"
office_g_room
c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
join
(
"office_g_building e"
,
"e.id = c.building_id"
,
"left"
)
->
where
(
$where_
)
->
where
(
$where_
)
->
limit
(
$page_size
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
page
(
$page_no
)
...
...
application/model/OfficeOReportModel.php
View file @
d8d47201
...
@@ -796,6 +796,60 @@ class OfficeOReportModel extends Model
...
@@ -796,6 +796,60 @@ class OfficeOReportModel extends Model
return
$this
->
db
->
where
(
$where
)
->
value
(
$field
);
return
$this
->
db
->
where
(
$where
)
->
value
(
$field
);
}
}
public
function
getAddReportListPcInfo
(
$params
,
$field
,
$page_no
,
$page_size
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]
);
}
$where_
[
"a.status"
]
=
0
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
'a_store e'
,
'a.report_store_id = e.id'
,
'left'
)
->
where
(
$where_
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
select
();
//echo Db::table($this->table)->getLastSql();
return
$result
;
}
public
function
getAddReportListPcInfoTotal
(
$params
,
$field
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]
);
}
$where_
[
"a.status"
]
=
0
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
'a_store e'
,
'a.report_store_id = e.id'
,
'left'
)
->
where
(
$where_
)
->
count
();
//echo Db::table($this->table)->getLastSql();
return
$result
;
}
}
}
...
...
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