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
cb42ed6e
Commit
cb42ed6e
authored
Dec 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款列表字段同步
parent
d1fff1b9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
14 deletions
+37
-14
Finance.php
application/index/controller/Finance.php
+20
-8
OPayLogAdjustment.php
application/model/OPayLogAdjustment.php
+11
-0
OPayLogModel.php
application/model/OPayLogModel.php
+6
-6
No files found.
application/index/controller/Finance.php
View file @
cb42ed6e
...
@@ -14,10 +14,13 @@ use app\api_broker\service\VipService;
...
@@ -14,10 +14,13 @@ 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\AAgents
;
use
app\model\AAgents
;
use
app\model\ADistrict
;
use
app\model\AStore
;
use
app\model\OBargainLogModel
;
use
app\model\OBargainLogModel
;
use
app\model\OBargainModel
;
use
app\model\OBargainModel
;
use
app\model\OImg
;
use
app\model\OImg
;
use
app\model\OMarchInModel
;
use
app\model\OMarchInModel
;
use
app\model\OPayLogAdjustment
;
use
app\model\ORealIncome
;
use
app\model\ORealIncome
;
use
app\model\OTaxes
;
use
app\model\OTaxes
;
use
app\model\OFinancialAudit
;
use
app\model\OFinancialAudit
;
...
@@ -2280,7 +2283,7 @@ class Finance extends Basic
...
@@ -2280,7 +2283,7 @@ class Finance extends Basic
*/
*/
public
function
getCollection
()
{
public
function
getCollection
()
{
if
(
!
$this
->
request
->
isAjax
()
&&
$this
->
params
[
'excel'
]
!=
1
)
{
if
(
!
$this
->
request
->
isAjax
()
&&
$this
->
params
[
'excel'
]
!=
1
)
{
return
view
(
'getCollection'
);
//
return view('getCollection');
}
}
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
...
@@ -2388,12 +2391,21 @@ class Finance extends Basic
...
@@ -2388,12 +2391,21 @@ class Finance extends Basic
}
}
if
(
empty
(
$this
->
params
[
'excel'
]))
{
if
(
empty
(
$this
->
params
[
'excel'
]))
{
$field
=
'a.id,a.father_id,a.order_id,a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,
$field
=
'a.id,a.create_time,a.order_id,a.father_id,a.money,a.real_money,a.pay_type,a.type,a.source,a.transaction_fee,c.report_agent_phone,
a.house_number,a.type,d.internal_title,d.internal_address,a.source,a.transaction_fee,c.report_agent_phone,
c.report_agent_name,a.income_time,e.store_id'
;
c.report_agent_name,f.store_name,g.district_name,a.income_time'
;
$list
=
$order
->
getAddPayLogOrderListLimit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$where
);
$data
[
'list'
]
=
$order
->
getAddPayLogOrderListLmit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$where
);
$data
[
'total'
]
=
$order
->
getAddPayLogOrderListLimitTotal
(
$where
);
$data
[
'total'
]
=
$order
->
getAddPayLogOrderListLmitTotal
(
$where
);
$m_store
=
new
AStore
();
$m_pay_adjustment
=
new
OPayLogAdjustment
();
foreach
(
$list
as
$k
=>
$v
)
{
$list
[
$k
][
'store_name'
]
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$v
[
'store_id'
]]);
$source_id
=
$m_pay_adjustment
->
getFieldValue
(
'id'
,
[
'paylog_id'
=>
$v
[
'id'
]]);
$list
[
$k
][
'source_id'
]
=
empty
(
$source_id
)
?
0
:
$source_id
;
$bargain_id
=
$this
->
m_bargain
->
selectBargainByOrderNo
(
'id'
,
[
'order_id'
,
$v
[
'order_id'
]]);
$list
[
$k
][
'bargain_id'
]
=
$bargain_id
[
0
][
'id'
];
}
$data
[
'list'
]
=
$list
;
//加时间条件
//加时间条件
if
(
$is_show
)
{
if
(
$is_show
)
{
$data
[
'money_total'
]
=
$order
->
getMoneyTotal
(
$where
,
'a.money'
);
//总额
$data
[
'money_total'
]
=
$order
->
getMoneyTotal
(
$where
,
'a.money'
);
//总额
...
@@ -2414,7 +2426,7 @@ class Finance extends Basic
...
@@ -2414,7 +2426,7 @@ class Finance extends Basic
$pageNo
=
1
;
$pageNo
=
1
;
$pageSize
=
50000
;
//最多5万条数据
$pageSize
=
50000
;
//最多5万条数据
$field
=
'a.create_time,c.user_name,c.user_phone,c.report_agent_name,c.report_agent_phone,f.store_name,g.district_name,a.money,a.real_money,a.transaction_fee,a.type,a.pay_type,d.internal_address,a.house_number,a.source'
;
$field
=
'a.create_time,c.user_name,c.user_phone,c.report_agent_name,c.report_agent_phone,f.store_name,g.district_name,a.money,a.real_money,a.transaction_fee,a.type,a.pay_type,d.internal_address,a.house_number,a.source'
;
$data
=
$order
->
getAddPayLogOrderListLmit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$where
);
$data
=
$order
->
getAddPayLogOrderListL
i
mit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$where
);
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
if
(
!
empty
(
$v
[
'user_phone'
]))
{
if
(
!
empty
(
$v
[
'user_phone'
]))
{
...
...
application/model/OPayLogAdjustment.php
View file @
cb42ed6e
...
@@ -35,4 +35,14 @@ class OPayLogAdjustment extends Model{
...
@@ -35,4 +35,14 @@ class OPayLogAdjustment extends Model{
->
select
();
->
select
();
}
}
/**
* @param $field
* @param $params
* @return int|mixed
*/
public
function
getFieldValue
(
$field
,
$params
)
{
return
$this
->
db_
->
where
(
$params
)
->
value
(
$field
);
}
}
}
\ No newline at end of file
application/model/OPayLogModel.php
View file @
cb42ed6e
...
@@ -329,7 +329,7 @@ class OPayLogModel extends Model
...
@@ -329,7 +329,7 @@ class OPayLogModel extends Model
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getAddPayLogOrderListLmit
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
public
function
getAddPayLogOrderListL
i
mit
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
{
$params
[
"a.is_del"
]
=
0
;
$params
[
"a.is_del"
]
=
0
;
if
(
isset
(
$params
[
'e.name'
])
||
isset
(
$params
[
'f.store_name'
])
||
isset
(
$params
[
'e.phone'
]))
{
if
(
isset
(
$params
[
'e.name'
])
||
isset
(
$params
[
'f.store_name'
])
||
isset
(
$params
[
'e.phone'
]))
{
...
@@ -341,8 +341,8 @@ class OPayLogModel extends Model
...
@@ -341,8 +341,8 @@ class OPayLogModel extends Model
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'c.report_agent_id=e.id'
,
'left'
)
->
join
(
'a_agents e'
,
'c.report_agent_id=e.id'
,
'left'
)
->
join
(
'a_store f'
,
'e.store_id=f.id'
,
'left'
)
//
->join('a_store f', 'e.store_id=f.id', 'left')
->
join
(
'a_district g'
,
'f.district_id=g.id'
,
'left'
)
//
->join('a_district g', 'f.district_id=g.id', 'left')
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
order
(
$order_
)
->
order
(
$order_
)
...
@@ -356,8 +356,8 @@ class OPayLogModel extends Model
...
@@ -356,8 +356,8 @@ class OPayLogModel extends Model
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'c.report_agent_id=e.id'
,
'left'
)
->
join
(
'a_agents e'
,
'c.report_agent_id=e.id'
,
'left'
)
->
join
(
'a_store f'
,
'e.store_id=f.id'
,
'left'
)
//
->join('a_store f', 'e.store_id=f.id', 'left')
->
join
(
'a_district g'
,
'f.district_id=g.id'
,
'left'
)
//
->join('a_district g', 'f.district_id=g.id', 'left')
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
order
(
$order_
)
->
order
(
$order_
)
...
@@ -374,7 +374,7 @@ class OPayLogModel extends Model
...
@@ -374,7 +374,7 @@ class OPayLogModel extends Model
* @param string $params
* @param string $params
* @return int|string
* @return int|string
*/
*/
public
function
getAddPayLogOrderListLmitTotal
(
$params
=
''
)
public
function
getAddPayLogOrderListL
i
mitTotal
(
$params
=
''
)
{
{
$params
[
"a.is_del"
]
=
0
;
$params
[
"a.is_del"
]
=
0
;
if
(
isset
(
$params
[
'e.name'
])
||
isset
(
$params
[
'f.store_name'
])
||
isset
(
$params
[
'e.phone'
]))
{
if
(
isset
(
$params
[
'e.name'
])
||
isset
(
$params
[
'f.store_name'
])
||
isset
(
$params
[
'e.phone'
]))
{
...
...
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