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
dae21763
Commit
dae21763
authored
Sep 29, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日报或者周报列表
parent
12cbc19e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
21 deletions
+43
-21
PerformanceReport.php
application/index/controller/PerformanceReport.php
+29
-21
RAgentReport.php
application/model/RAgentReport.php
+14
-0
No files found.
application/index/controller/PerformanceReport.php
View file @
dae21763
...
@@ -34,40 +34,48 @@ class PerformanceReport extends Basic
...
@@ -34,40 +34,48 @@ class PerformanceReport extends Basic
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*$params = array(
"type" => 0,
);*/
// if (!isset($params["type"])) {
// return $this->response("101", "请求参数错误");
// }
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$type
=
!
empty
(
$params
[
"type"
])
?
$params
[
"type"
]
:
0
;
$type
=
!
empty
(
$params
[
"type"
])
?
$params
[
"type"
]
:
0
;
// 时间筛选
if
(
!
empty
(
$params
[
'start_date'
])
&&
!
empty
(
$params
[
'end_date'
]))
{
$where
[
'RAgentReport.create_time'
]
=
[
'between'
,
[
$params
[
'start_date'
]
.
' 00:00:00'
,
$params
[
'end_date'
]
.
' 23:59:59'
]];
}
// 部门筛选
if
(
!
empty
(
$params
[
'district_id'
]))
{
$where
[
'Agent.district_id'
]
=
$params
[
'district_id'
];
}
// 门店筛选
if
(
!
empty
(
$params
[
'store_id'
]))
{
$where
[
'Agent.store_id'
]
=
$params
[
'store_id'
];
}
// 经纪人筛选
if
(
!
empty
(
$params
[
'agent_id'
]))
{
$where
[
'Agent.id'
]
=
$params
[
'agent_id'
];
}
$get_params
[
'RAgentReport.type'
]
=
$type
;
//类型 0周报 1日报
$get_params
[
'RAgentReport.is_del'
]
=
0
;
$field
=
'RAgentReport.id,'
;
$field
=
'RAgentReport.id,'
;
$field
.=
'RAgentReport.img_url,'
;
$field
.=
'RAgentReport.img_url,'
;
$field
.=
'Agent.name'
;
$field
.=
'Agent.name'
;
$get_params
[
'RAgentReport.type'
]
=
$type
;
//类型 0周报 1日报
$get_params
[
'RAgentReport.is_del'
]
=
0
;
$order
=
"RAgentReport.create_time desc"
;
$order
=
"RAgentReport.create_time desc"
;
$res
=
$this
->
rAgentReport
->
getPerformanceReportList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
,
$order
);
$res
=
$this
->
rAgentReport
->
getPerformanceReportList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
,
$order
);
// $res_total = $this->aCollectHouse->getCollectListTotal($field,$get_params);
$res_total
=
$this
->
rAgentReport
->
getPerformanceReportListTotal
(
$field
,
$params
,
$order
);
// $look_shop_service = new LookShopService();
foreach
(
$res
as
$key
=>
$val
)
{
// foreach ($res as $key => $val) {
$url
=
'static/week_work_img/'
.
$val
[
'img_url'
];
// $isLook = $look_shop_service->isLooked($params["agents_id"], $val["id"]);
$res
[
$key
][
"img_file_path"
]
=
CURRENT_URL
.
$url
;
// $res[$key]["is_look"] = $isLook;
}
// $res[$key]["rent_price"] = $val["rent_price"] * 0.01;
// $res[$key]["rent_price"] = $val["rent_price"] * 0.01;
// }
//
return
$this
->
response
(
"200"
,
"成功"
,
$res
);
$data
[
'list'
]
=
$res
;
$data
[
'total'
]
=
$res_total
;
return
$this
->
response
(
"200"
,
"成功"
,
$data
);
}
}
...
...
application/model/RAgentReport.php
View file @
dae21763
...
@@ -31,4 +31,17 @@ class RAgentReport extends BaseModel
...
@@ -31,4 +31,17 @@ class RAgentReport extends BaseModel
//dump($this->getLastSql());
//dump($this->getLastSql());
return
$result
;
return
$result
;
}
}
public
function
getPerformanceReportListTotal
(
$field
,
$params
,
$order
)
{
$result
=
$this
->
field
(
$field
)
->
alias
(
'RAgentReport'
)
->
join
(
'a_agents Agent'
,
'RAgentReport.agent_id=Agent.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order
)
->
count
();
//dump($this->getLastSql());
return
$result
;
}
}
}
\ 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