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
ee779f73
Commit
ee779f73
authored
Oct 16, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
4d9e5ebc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
17 deletions
+10
-17
Member.php
application/index/controller/Member.php
+2
-2
PerformanceInfo.php
application/index/controller/PerformanceInfo.php
+6
-15
OBargainModel.php
application/model/OBargainModel.php
+2
-0
No files found.
application/index/controller/Member.php
View file @
ee779f73
...
...
@@ -105,8 +105,8 @@ class Member extends Basic{
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$params
[
'start_date'
]
.
' 00:00:00'
,
$params
[
'end_date'
]
.
' 23:59:59'
]];
}
else
{
if
(
empty
(
$params
[
'id'
])
&&
empty
(
$params
[
'phone'
]))
{
//$time_ = date('Y-m-d H:i:s', strtotime("-1 day"));
//$where['a.create_time'] = array( 'lt', $time_ );
//$time_ = date('Y-m-d H:i:s', strtotime("-1 day"));
//根据create_time排除保护期客户-废弃
//$where['a.create_time'] = array( 'lt', $time_ );
//根据create_time排除保护期客户-废弃
//排除排除保护期内的客户
$time_now
=
date
(
'Y-m-d H:i:s'
);
//当前时间
//protect_time 将截止日期大于当前时间的数据排除掉
...
...
application/index/controller/PerformanceInfo.php
View file @
ee779f73
...
...
@@ -105,15 +105,10 @@ class PerformanceInfo extends Basic
$field
.=
'Oorder.house_id'
;
$return
=
$this
->
oBargainModel
->
performancelInfo
(
$where
,
$field
,
$pageSize
,
$pageNo
);
/*o_partial_commission表查询实收数据 2018-10-10 10:35:42 朱伟*/
//$m_commission = new OPartialCommission();
foreach
(
$return
as
$key
=>
$val
)
{
//$return_ = $m_commission->getPracticalFee($val["id"]);
//$return[$key]['practical_fee'] = $return_[0]['practical_fee'] ? $return_[0]['practical_fee'] : 0;
//截取字符串前3位
//商铺地址只显示前3位,后面*替代
$return
[
$key
][
'landmark'
]
=
$val
[
"internal_address"
]
?
mb_substr
(
$val
[
"internal_address"
],
0
,
3
,
'utf-8'
)
.
'****'
:
''
;
}
//end
}
$return_total
=
$this
->
oBargainModel
->
performancelInfoTotal
(
$where
,
$field
);
$field
=
'sum(Obargain.scale_fee) as scale_fee_sum'
;
...
...
@@ -184,7 +179,7 @@ class PerformanceInfo extends Basic
$field
.=
'District.district_name,'
;
$field
.=
'Obargain.scale,'
;
$field
.=
'Obargain.scale_fee,'
;
$field
.=
'
Obargai
n.practical_fee'
;
$field
.=
'
PartialCommissio
n.practical_fee'
;
$return
=
$this
->
oBargainModel
->
performancelInfoExcel
(
$where
,
$field
);
if
(
!
$return
){
...
...
@@ -192,7 +187,7 @@ class PerformanceInfo extends Basic
}
$export
=
new
ExportExcelUntil
();
$e_data_new
=
[];
foreach
(
$return
as
$key
=>
$v
)
{
$e_data_old
[
'create_time'
]
=
$v
[
'create_time'
];
//提交时间
...
...
@@ -206,10 +201,6 @@ class PerformanceInfo extends Basic
$e_data_old
[
'trade_type'
]
=
"好处费"
;
}
/*o_partial_commission表查询实收数据 2018-10-10 10:35:42 朱伟*/
$m_commission
=
new
OPartialCommission
();
$return_
=
$m_commission
->
getPracticalFee
(
$v
[
"id"
]);
$practical_fee
=
$return_
[
0
][
'practical_fee'
]
?
$return_
[
0
][
'practical_fee'
]
:
0
;
//end
//商铺地址截取字符串前3位,后面做隐藏 --暂时不用,后期可直接解除注释
//$landmark = $v["landmark"] ? mb_substr($v["landmark"],0,3,'utf-8').'****' : '';
...
...
@@ -222,12 +213,12 @@ class PerformanceInfo extends Basic
$e_data_old
[
'district_name'
]
=
$v
[
'store_name'
];
//所属部门
$e_data_old
[
'scale'
]
=
$v
[
'scale'
];
//分佣比例
$e_data_old
[
'scale_fee'
]
=
$v
[
'scale_fee'
];
//应收佣金
$e_data_old
[
'practical_fee'
]
=
$
practical_fee
;
//实收佣金
$e_data_old
[
'practical_fee'
]
=
$
v
[
'practical_fee'
]
;
//实收佣金
$e_data_new
[]
=
$e_data_old
;
}
$title
=
[
'提交时间'
,
'成交类型'
,
'商铺地址'
,
'商铺编号'
,
'分佣提成方'
,
'所属部门门店'
,
'分佣比例'
,
'应收佣金'
,
'实收佣金'
];
$export
->
exportTable
(
'业绩明细'
,
$e_data_new
,
10
,
'业绩明细表'
,
$title
);
$export
->
exportTable
(
'业绩明细'
,
$e_data_new
,
count
(
$e_data_new
[
0
])
,
'业绩明细表'
,
$title
);
return
''
;
}
...
...
application/model/OBargainModel.php
View file @
ee779f73
...
...
@@ -1405,6 +1405,8 @@ class OBargainModel extends Model
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
->
join
(
'a_store Store'
,
'Agent.store_id = Store.id'
,
'left'
)
->
join
(
'a_district District'
,
'Agent.district_id = District.id'
,
'left'
)
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
where
(
$where
)
->
order
(
"Obargain.create_time desc"
)
->
select
();
...
...
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