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
7e7680a0
Commit
7e7680a0
authored
Jul 31, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日报带看数修改-改进场数
parent
6eb797fe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
172 additions
and
10 deletions
+172
-10
Statement.php
application/api_broker/controller/Statement.php
+1
-1
StatementService.php
application/api_broker/service/StatementService.php
+8
-2
Performance.php
application/index/controller/Performance.php
+150
-0
PerformanceService.php
application/index/service/PerformanceService.php
+0
-0
OMarchInModel.php
application/model/OMarchInModel.php
+3
-1
TAgentTotalModel.php
application/model/TAgentTotalModel.php
+2
-4
route.php
application/route.php
+8
-2
No files found.
application/api_broker/controller/Statement.php
View file @
7e7680a0
...
...
@@ -36,7 +36,7 @@ class Statement extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*$params = array(
"agent_id" =>
5739
,//5739 总监 5740店长
"agent_id" =>
3742
,//5739 总监 5740店长
"time_start" => date("Y-m-d", time()),
"time_end" => date("Y-m-d", time()),
);*/
...
...
application/api_broker/service/StatementService.php
View file @
7e7680a0
...
...
@@ -6,6 +6,7 @@ use app\model\AAgents;
use
app\model\FollowUpLogModel
;
use
app\model\GHouses
;
use
app\model\OBargainModel
;
use
app\model\OMarchInModel
;
use
app\model\OReportModel
;
use
app\model\Users
;
...
...
@@ -24,6 +25,7 @@ class StatementService
private
$userModel
;
private
$followUpModel
;
private
$reportModel
;
private
$marchInModel
;
const
USER_LEVEL_FIST
=
0
;
//经纪人
const
USER_LEVEL_SECOND
=
1
;
//店长
...
...
@@ -36,6 +38,7 @@ class StatementService
$this
->
userModel
=
new
Users
();
$this
->
followUpModel
=
new
FollowUpLogModel
();
$this
->
reportModel
=
new
OReportModel
();
$this
->
marchInModel
=
new
OMarchInModel
();
}
/**
...
...
@@ -224,9 +227,12 @@ class StatementService
$where_
[
"agent_id"
]
=
$agent_id
;
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
//dump($where_);
$reportNum
=
$this
->
reportModel
->
getAddReportNum
(
$where_
);
$result
[
"look_at_num_day_store"
]
=
isset
(
$reportNum
[
0
][
"num"
])
?
$reportNum
[
0
][
"num"
]
:
0
;
//
$reportNum = $this->reportModel->getAddReportNum($where_);
//
$result["look_at_num_day_store"] = isset($reportNum[0]["num"]) ? $reportNum[0]["num"] : 0;
$addMarchInNum
=
$this
->
marchInModel
->
getAddMarchInNum
(
$where_
);
$result
[
"look_at_num_day_store"
]
=
isset
(
$addMarchInNum
[
0
][
"num"
])
?
$addMarchInNum
[
0
][
"num"
]
:
0
;
//dump($addMarchInNum);
//todo
$result
[
"store_list"
]
=
$store_list
;
$result
[
"district_list"
]
=
$district_list
;
...
...
application/index/controller/Performance.php
0 → 100644
View file @
7e7680a0
<?php
namespace
app\index\controller
;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/7/31
* Time: 上午10:18
*/
use
app\index\extend\Basic
;
use
app\index\service\PerformanceService
;
use
think\Request
;
class
Performance
extends
Basic
{
private
$service_
;
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service_
=
new
PerformanceService
();
}
//TODO 区域业绩排行 District
/**
* 区域业绩排行
*/
public
function
selectDistrictPerformance
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
// $params = array(
// "type" => 3, //1表示个人业绩排行 2门店 3区域
//// "end_day" => "",
//// "start_day" =>"",
// );
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
//默认排序一周 2018-07-18改为本月
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
[
'list'
];
$result
[
"total"
]
=
$list
[
'total'
];
$result
[
"start_time"
]
=
$start_day
;
$result
[
"end_time"
]
=
$end_day
;
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
return
$this
->
response
(
"200"
,
"request null"
);
}
//TODO 门店排行 Store
/**
* 门店排行
*/
public
function
selectStorePerformance
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
// $params = array(
// "type" => 2, //1表示个人业绩排行 2门店 3区域
// "father_id" => 4,
// // "start_day" =>"",
// );
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
//默认排序一周 2018-07-18改为本月
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$father_id
=
!
empty
(
$params
[
"father_id"
])
?
$params
[
"father_id"
]
:
''
;
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
[
'list'
];
$result
[
"total"
]
=
$list
[
'total'
];
$result
[
"start_time"
]
=
$start_day
;
$result
[
"end_time"
]
=
$end_day
;
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
return
$this
->
response
(
"200"
,
"request null"
);
}
//TODO 个人业绩排行 Individual
/**
* 个人业绩排行
*/
public
function
selectIndividualPerformance
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
// $params = array(
// "type" => 1, //1表示个人业绩排行 2门店 3区域
// // "end_day" => "",
// // "start_day" =>"",
// );
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
//默认排序一周 2018-07-18改为本月
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$father_id
=
!
empty
(
$params
[
"father_id"
])
?
$params
[
"father_id"
]
:
''
;
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
[
'list'
];
$result
[
"total"
]
=
$list
[
'total'
];
$result
[
"start_time"
]
=
$start_day
;
$result
[
"end_time"
]
=
$end_day
;
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
return
$this
->
response
(
"200"
,
"request null"
);
}
}
\ No newline at end of file
application/index/service/PerformanceService.php
0 → 100644
View file @
7e7680a0
This diff is collapsed.
Click to expand it.
application/model/OMarchInModel.php
View file @
7e7680a0
...
...
@@ -133,12 +133,14 @@ class OMarchInModel extends Model
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]
);
}
return
Db
::
table
(
$this
->
table
)
$return
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
dump
(
$this
->
getLastSql
(
$return
));
return
$return
;
}
/**
...
...
application/model/TAgentTotalModel.php
View file @
7e7680a0
...
...
@@ -93,7 +93,7 @@ class TAgentTotalModel extends Model
}
public
function
getTotalByAgentIdPage
(
$pageNo
,
$pageSize
,
$field
,
$params
,
$type
,
$order
=
""
,
$having
)
public
function
getTotalByAgentIdPage
(
$pageNo
,
$pageSize
,
$field
,
$params
,
$type
,
$order
=
""
)
{
$group_
=
""
;
switch
(
$type
)
{
...
...
@@ -113,14 +113,13 @@ class TAgentTotalModel extends Model
->
where
(
$params
)
->
group
(
$group_
)
->
order
(
$order
)
->
having
(
$having
)
->
select
();
// echo $this->db_->getLastSql();
return
$result
;
}
public
function
getTotalByAgentIdCount
(
$field
,
$params
,
$type
,
$order
=
""
,
$having
)
public
function
getTotalByAgentIdCount
(
$field
,
$params
,
$type
,
$order
=
""
)
{
$group_
=
""
;
switch
(
$type
)
{
...
...
@@ -140,7 +139,6 @@ class TAgentTotalModel extends Model
->
where
(
$params
)
->
group
(
$group_
)
->
order
(
$order
)
->
having
(
$having
)
->
count
();
// echo $this->db_->getLastSql();
return
$result
;
...
...
application/route.php
View file @
7e7680a0
...
...
@@ -264,10 +264,16 @@ Route::group('index', [
'followUpList'
=>
[
'index/HouseFollowUp/followUpList'
,
[
'method'
=>
'GET'
]
],
//商铺跟进liu
'inspectionRecordList'
=>
[
'index/InspectionRecord/inspectionRecordList'
,
[
'method'
=>
'GET'
]
],
//约带看记录liu
'realtimePerformance'
=>
[
'index/RealTimePerformance/realtimePerformanceList'
,
[
'method'
=>
'GET'
]
],
//实时业绩liu
'shopinspectionLog'
=>
[
'index/ShopInspectionLog/shopinspectionLogList'
,
[
'method'
=>
'GET'
]
],
//商铺查看日志liu
'shopinspectionLog'
=>
[
'index/ShopInspectionLog/shopinspectionLogList'
,
[
'method'
=>
'
POST|
GET'
]
],
//商铺查看日志liu
'lookShopIndex'
=>
[
'index/LookShop/lookShopIndex'
,
[
'method'
=>
'GET'
]
],
//商铺查看日志
'lookShopIndex'
=>
[
'index/LookShop/lookShopIndex'
,
[
'method'
=>
'GET'
]
],
//商铺查看日志
'selectDistrictPerformance'
=>
[
'index/Performance/selectDistrictPerformance'
,
[
'method'
=>
'POST|GET'
]
],
//区域业绩排行 朱伟 2018-07-31
'selectStorePerformance'
=>
[
'index/Performance/selectStorePerformance'
,
[
'method'
=>
'POST|GET'
]
],
//门店业绩排行 朱伟 2018-07-31
'selectIndividualPerformance'
=>
[
'index/Performance/selectIndividualPerformance'
,
[
'method'
=>
'POST|GET'
]
],
//个人业绩排行 朱伟 2018-07-31
]);
...
...
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