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
13c9ee23
Commit
13c9ee23
authored
Dec 14, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款详情
parent
f24a2ad6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
10 deletions
+62
-10
Finance.php
application/index/controller/Finance.php
+62
-10
No files found.
application/index/controller/Finance.php
View file @
13c9ee23
...
@@ -21,6 +21,7 @@ use app\model\OBargainModel;
...
@@ -21,6 +21,7 @@ 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\OPayLogAdjustment
;
use
app\model\OrderModel
;
use
app\model\ORealIncome
;
use
app\model\ORealIncome
;
use
app\model\OTaxes
;
use
app\model\OTaxes
;
use
app\model\OFinancialAudit
;
use
app\model\OFinancialAudit
;
...
@@ -2705,25 +2706,58 @@ class Finance extends Basic
...
@@ -2705,25 +2706,58 @@ class Finance extends Basic
try
{
try
{
$m_pay
=
new
OPayLogModel
();
$m_pay
=
new
OPayLogModel
();
$pay_fields
=
'id,order_id,agent_name,create_time,income_time,house_number,type,real_money,income_time,transfer_name,'
;
$pay_fields
=
'id,order_id,agent_name,create_time,income_time,house_number,type,real_money,income_time,transfer_name,'
;
$pay_fields
.=
'transaction_fee,is_dividend,receipt_number,source'
;
$pay_fields
.=
'transaction_fee,is_dividend,receipt_number,source
,pay_type
'
;
$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
[
0
][
'transfer_name'
]
=
empty
(
$pay_data
[
0
][
'transfer_name'
])
?
""
:
$pay_data
[
0
][
'transfer_name'
]
;
$pay_data
=
$this
->
numberTransitionString
(
$pay_data
)
;
$pay_data
=
$pay_data
[
0
];
//成交报告id
//成交报告id
if
(
empty
(
$pay_data
[
0
][
'order_id'
]))
{
if
(
empty
(
$pay_data
[
'order_id'
]))
{
$pay_data
[
0
][
'bargain_id'
]
=
0
;
$pay_data
[
'bargain_id'
]
=
""
;
$pay_data
[
'is_open'
]
=
0
;
$pay_data
[
'price'
]
=
""
;
}
else
{
}
else
{
$bargain_id
=
$this
->
m_bargain
->
getDetail
(
'id,price,is_open'
,
[
'order_id'
=>
$pay_data
[
0
][
'order_id'
]]);
$bargain_data
=
$this
->
m_bargain
->
getDetail
(
'id,price,is_open'
,
[
'order_id'
=>
$pay_data
[
'order_id'
]]);
$pay_data
[
0
][
'bargain_id'
]
=
empty
(
$bargain_id
)
?
""
:
$bargain_id
;
$pay_data
[
'bargain_id'
]
=
empty
(
$bargain_data
)
?
""
:
$bargain_data
[
'id'
];
$pay_data
[
'is_open'
]
=
$bargain_data
[
'is_open'
];
$pay_data
[
'price'
]
=
$bargain_data
[
'price'
];
$m_order
=
new
OrderModel
();
$house_data
=
$m_order
->
selectOrderByOrderId
(
'b.id,b.internal_address'
,
[
'order_id'
=>
$pay_data
[
'order_id'
]]);
$pay_data
[
'house_id'
]
=
$house_data
[
0
][
'id'
];
$pay_data
[
'address'
]
=
$house_data
[
0
][
'internal_address'
];
}
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$source_id
=
$m_pay_adjustment
->
getFieldValue
(
'id'
,
[
'paylog_id'
=>
$pay_data
[
0
][
'id'
]]);
$source_id
=
$m_pay_adjustment
->
getFieldValue
(
'id'
,
[
'paylog_id'
=>
$pay_data
[
'id'
]]);
$pay_data
[
0
][
'source_id'
]
=
empty
(
$source_id
)
?
0
:
$source_id
;
$pay_data
[
'source_id'
]
=
empty
(
$source_id
)
?
0
:
$source_id
;
$m_agent
=
new
AAgents
();
$m_agent_house
=
new
GHousesToAgents
();
$m_store
=
new
AStore
();
$m_march
=
new
OMarchInModel
();
$pay_data
[
'current_agent_name'
]
=
$pay_data
[
'store_name'
]
=
""
;
if
(
$pay_data
[
'type'
]
==
92
)
{
//案场费 对应业务员:盘方
$current_agent_name
=
$m_agent_house
->
getHousesAgents
(
$pay_data
[
'house_id'
],
'b.name,b.store_id'
,
[
'a.type'
=>
2
]);
$pay_data
[
'current_agent_name'
]
=
$current_agent_name
[
'name'
];
$pay_data
[
'store_name'
]
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$current_agent_name
[
'store_id'
]]);
}
if
(
$pay_data
[
'type'
]
==
10
||
$pay_data
[
'type'
]
==
30
||
$pay_data
[
'type'
]
==
91
)
{
//意向金/保管金 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'
]))
{
$pay_data
[
'store_name'
]
=
$m_agent
->
getAgentByIdV2
(
'b.store_name'
,
[
'a.id'
=>
$current_agent_name
[
'reception_id'
]]);
}
$pay_data
[
'current_agent_name'
]
=
empty
(
$current_agent_name
[
'reception_name'
])
?
""
:
$current_agent_name
[
'reception_name'
];
}
$pay_data
=
$this
->
nullToStr
(
$pay_data
);
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$msg
=
'内部错误:'
.
$e
->
getMessage
();
$msg
=
'内部错误:'
.
$e
->
getMessage
();
}
}
return
$this
->
response
(
101
,
$msg
,
$pay_data
[
0
]
);
return
$this
->
response
(
101
,
$msg
,
$pay_data
);
}
}
/**
/**
...
@@ -2750,4 +2784,22 @@ class Finance extends Basic
...
@@ -2750,4 +2784,22 @@ class Finance extends Basic
public
function
dailyDetails
()
{
public
function
dailyDetails
()
{
return
view
(
'daily_details'
);
return
view
(
'daily_details'
);
}
}
/**
* @param $array
* @return mixed
*/
public
function
nullToStr
(
array
$array
)
{
foreach
(
$array
as
$k
=>
$v
){
if
(
is_null
(
$v
))
{
$array
[
$k
]
=
''
;
}
if
(
is_array
(
$v
))
{
$array
[
$k
]
=
nulltostr
(
$v
);
}
}
return
$array
;
}
}
}
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