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
b41893cc
Commit
b41893cc
authored
Dec 19, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款详情
parent
734dfb9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
Finance.php
application/index/controller/Finance.php
+23
-13
No files found.
application/index/controller/Finance.php
View file @
b41893cc
...
@@ -26,6 +26,7 @@ use app\model\OMarchInModel;
...
@@ -26,6 +26,7 @@ use app\model\OMarchInModel;
use
app\model\OPayLogAdjustment
;
use
app\model\OPayLogAdjustment
;
use
app\model\OrderModel
;
use
app\model\OrderModel
;
use
app\model\ORealIncome
;
use
app\model\ORealIncome
;
use
app\model\OReportModel
;
use
app\model\OTaxes
;
use
app\model\OTaxes
;
use
app\model\OFinancialAudit
;
use
app\model\OFinancialAudit
;
use
app\model\OPartialCommission
;
use
app\model\OPartialCommission
;
...
@@ -2416,14 +2417,14 @@ class Finance extends Basic
...
@@ -2416,14 +2417,14 @@ class Finance extends Basic
}
}
if
(
empty
(
$this
->
params
[
'excel'
]))
{
if
(
empty
(
$this
->
params
[
'excel'
]))
{
$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,a.source,'
;
$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,a.source,
b.f_id,
'
;
$field
.=
'e.name,a.income_time,e.store_id,b.house_id,b.order_no,a.report_id,a.house_number,a.is_dividend,a.last_transfer_time,a.industry_type,a.agent_id'
;
$field
.=
'e.name,a.income_time,e.store_id,b.house_id,b.order_no,a.report_id,a.house_number,a.is_dividend,a.last_transfer_time,a.industry_type,a.agent_id'
;
$list
=
$order
->
getAddPayLogOrderListLimit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$where
);
$list
=
$order
->
getAddPayLogOrderListLimit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$where
);
$data
[
'total'
]
=
$order
->
getAddPayLogOrderListLimitTotal
(
$where
);
$data
[
'total'
]
=
$order
->
getAddPayLogOrderListLimitTotal
(
$where
);
$m_store
=
new
AStore
();
$m_store
=
new
AStore
();
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$m_
march
=
new
OMarchIn
Model
();
$m_
report
=
new
OReport
Model
();
$m_agent_house
=
new
GHousesToAgents
();
$m_agent_house
=
new
GHousesToAgents
();
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
foreach
(
$list
as
$k
=>
$v
)
{
foreach
(
$list
as
$k
=>
$v
)
{
...
@@ -2444,12 +2445,12 @@ class Finance extends Basic
...
@@ -2444,12 +2445,12 @@ class Finance extends Basic
if
(
$v
[
'type'
]
==
10
||
$v
[
'type'
]
==
30
||
$v
[
'type'
]
==
91
)
{
if
(
$v
[
'type'
]
==
10
||
$v
[
'type'
]
==
30
||
$v
[
'type'
]
==
91
)
{
//意向金/保管金 10/30 对应业务员:约带看的人 即 反签方
//意向金/保管金 10/30 对应业务员:约带看的人 即 反签方
//中介费 对应业务员:约带看的人 即 反签方
//中介费 对应业务员:约带看的人 即 反签方
$current_agent_name
=
$m_
march
->
getInfo
(
'reception_name,reception_id'
,
[
'order_id'
=>
$v
[
'order
_id'
]]);
$current_agent_name
=
$m_
report
->
selectReportById
(
'report_agent_name,report_store_id'
,
[
'id'
=>
$v
[
'f
_id'
]]);
if
(
!
empty
(
$current_agent_name
[
'reception
_id'
]))
{
if
(
!
empty
(
$current_agent_name
[
0
][
'report_store
_id'
]))
{
$store_name
=
$m_
agent
->
getAgentByIdV2
(
'b.store_name'
,
[
'a.id'
=>
$current_agent_name
[
'reception
_id'
]]);
$store_name
=
$m_
store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$current_agent_name
[
0
][
'report_store
_id'
]]);
$list
[
$k
][
'store_name'
]
=
empty
(
$store_name
)
?
''
:
$store_name
;
$list
[
$k
][
'store_name'
]
=
empty
(
$store_name
)
?
''
:
$store_name
;
}
}
$list
[
$k
][
'current_agent_name'
]
=
empty
(
$current_agent_name
[
'reception_name'
])
?
''
:
$current_agent_name
[
'reception
_name'
];
$list
[
$k
][
'current_agent_name'
]
=
empty
(
$current_agent_name
[
0
][
'report_agent_name'
])
?
''
:
$current_agent_name
[
0
][
'report_agent
_name'
];
}
}
if
(
!
empty
(
$v
[
'income_time'
]))
{
if
(
!
empty
(
$v
[
'income_time'
]))
{
...
@@ -2734,6 +2735,7 @@ class Finance extends Basic
...
@@ -2734,6 +2735,7 @@ class Finance extends Basic
$pay_data
=
$m_pay
->
selectReceiptImgList
(
$pay_fields
,
[
'id'
=>
$this
->
params
[
'pay_id'
]]);
$pay_data
=
$m_pay
->
selectReceiptImgList
(
$pay_fields
,
[
'id'
=>
$this
->
params
[
'pay_id'
]]);
$pay_data
=
$pay_data
[
0
];
$pay_data
=
$pay_data
[
0
];
//成交报告id
//成交报告id
if
(
empty
(
$pay_data
[
'order_id'
]))
{
if
(
empty
(
$pay_data
[
'order_id'
]))
{
$pay_data
[
'bargain_id'
]
=
""
;
$pay_data
[
'bargain_id'
]
=
""
;
$pay_data
[
'is_open'
]
=
0
;
$pay_data
[
'is_open'
]
=
0
;
...
@@ -2745,7 +2747,8 @@ class Finance extends Basic
...
@@ -2745,7 +2747,8 @@ class Finance extends Basic
$pay_data
[
'price'
]
=
empty
(
$bargain_data
[
'price'
])
?
0
:
$bargain_data
[
'price'
];
$pay_data
[
'price'
]
=
empty
(
$bargain_data
[
'price'
])
?
0
:
$bargain_data
[
'price'
];
$m_order
=
new
OrderModel
();
$m_order
=
new
OrderModel
();
$house_data
=
$m_order
->
selectOrderByOrderId
(
'b.id,b.internal_address'
,
[
'order_id'
=>
$pay_data
[
'order_id'
]]);
$house_data
=
$m_order
->
selectOrderByOrderId
(
'b.id,b.internal_address,a.f_id'
,
[
'order_id'
=>
$pay_data
[
'order_id'
]]);
$pay_data
[
'house_id'
]
=
empty
(
$house_data
[
0
][
'id'
])
?
''
:
$house_data
[
0
][
'id'
];
$pay_data
[
'house_id'
]
=
empty
(
$house_data
[
0
][
'id'
])
?
''
:
$house_data
[
0
][
'id'
];
$pay_data
[
'address'
]
=
empty
(
$house_data
[
0
][
'internal_address'
])
?
''
:
$house_data
[
0
][
'internal_address'
];
$pay_data
[
'address'
]
=
empty
(
$house_data
[
0
][
'internal_address'
])
?
''
:
$house_data
[
0
][
'internal_address'
];
}
}
...
@@ -2757,7 +2760,7 @@ class Finance extends Basic
...
@@ -2757,7 +2760,7 @@ class Finance extends Basic
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$m_agent_house
=
new
GHousesToAgents
();
$m_agent_house
=
new
GHousesToAgents
();
$m_store
=
new
AStore
();
$m_store
=
new
AStore
();
$m_
march
=
new
OMarchIn
Model
();
$m_
report
=
new
OReport
Model
();
$pay_data
[
'current_agent_name'
]
=
$pay_data
[
'store_name'
]
=
""
;
$pay_data
[
'current_agent_name'
]
=
$pay_data
[
'store_name'
]
=
""
;
if
(
$pay_data
[
'type'
]
==
92
)
{
if
(
$pay_data
[
'type'
]
==
92
)
{
//案场费 对应业务员:盘方
//案场费 对应业务员:盘方
...
@@ -2769,16 +2772,23 @@ class Finance extends Basic
...
@@ -2769,16 +2772,23 @@ class Finance extends Basic
if
(
$pay_data
[
'type'
]
==
10
||
$pay_data
[
'type'
]
==
30
||
$pay_data
[
'type'
]
==
91
)
{
if
(
$pay_data
[
'type'
]
==
10
||
$pay_data
[
'type'
]
==
30
||
$pay_data
[
'type'
]
==
91
)
{
//意向金/保管金 10/30 对应业务员:约带看的人 即 反签方
//意向金/保管金 10/30 对应业务员:约带看的人 即 反签方
//中介费 对应业务员:约带看的人 即 反签方
//中介费 对应业务员:约带看的人 即 反签方
$current_agent_name
=
$m_march
->
getInfo
(
'reception_name,reception_id'
,
[
'order_id'
=>
$pay_data
[
'order_id'
]]);
if
(
!
empty
(
$current_agent_name
[
'reception_id'
]))
{
if
(
isset
(
$house_data
[
0
][
'f_id'
]))
{
$pay_data
[
'store_name'
]
=
$m_agent
->
getAgentByIdV2
(
'b.store_name'
,
[
'a.id'
=>
$current_agent_name
[
'reception_id'
]]);
$current_agent_name
=
$m_report
->
selectReportById
(
'report_agent_name,report_store_id'
,
[
'id'
=>
$house_data
[
0
][
'f_id'
]]);
if
(
!
empty
(
$current_agent_name
[
0
][
'report_store_id'
]))
{
$pay_data
[
'store_name'
]
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$current_agent_name
[
0
][
'report_store_id'
]]);
}
$pay_data
[
'current_agent_name'
]
=
empty
(
$current_agent_name
[
0
][
'report_agent_name'
])
?
""
:
$current_agent_name
[
0
][
'report_agent_name'
];
}
else
{
$pay_data
[
'store_name'
]
=
''
;
$pay_data
[
'current_agent_name'
]
=
''
;
}
}
$pay_data
[
'current_agent_name'
]
=
empty
(
$current_agent_name
[
'reception_name'
])
?
""
:
$current_agent_name
[
'reception_name'
];
}
}
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$msg
=
'内部错误:'
.
$e
->
getMessage
();
$msg
=
'内部错误:'
.
$e
->
getMessage
();
}
}
return
$this
->
response
(
101
,
$msg
,
$pay_data
);
return
$this
->
response
(
200
,
$msg
,
$pay_data
);
}
}
/**
/**
...
...
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