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
d5542c2f
Commit
d5542c2f
authored
Dec 17, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
财务日报
parent
5f6a35fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
9 deletions
+45
-9
DailyPaper.php
application/api_broker/controller/DailyPaper.php
+2
-2
DailyPaperService.php
application/api_broker/service/DailyPaperService.php
+14
-6
OPayLogModel.php
application/model/OPayLogModel.php
+29
-1
No files found.
application/api_broker/controller/DailyPaper.php
View file @
d5542c2f
...
@@ -32,11 +32,11 @@ class DailyPaper extends Basic
...
@@ -32,11 +32,11 @@ class DailyPaper extends Basic
public
function
dailyDetail
(){
public
function
dailyDetail
(){
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
$params
=
array
(
"store_id"
=>
1
,
//门店id
"store_id"
=>
73
,
//门店id
"is_store"
=>
0
,
//身份是否是店长,财务显示不一样 0店长 1财务
"is_store"
=>
0
,
//身份是否是店长,财务显示不一样 0店长 1财务
"daily_data"
=>
"2018-12-01"
"daily_data"
=>
"2018-12-01"
);
);
$this
->
agentId
=
1
;
$this
->
agentId
=
74
;
if
(
!
isset
(
$params
[
"store_id"
])
||
!
isset
(
$params
[
"is_store"
])
||
!
isset
(
$params
[
"daily_data"
])){
if
(
!
isset
(
$params
[
"store_id"
])
||
!
isset
(
$params
[
"is_store"
])
||
!
isset
(
$params
[
"daily_data"
])){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
...
...
application/api_broker/service/DailyPaperService.php
View file @
d5542c2f
...
@@ -6,6 +6,7 @@ use app\api_broker\service\VerifyService;
...
@@ -6,6 +6,7 @@ use app\api_broker\service\VerifyService;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\ODaily
;
use
app\model\ODaily
;
use
app\model\ODailyLog
;
use
app\model\ODailyLog
;
use
app\model\OPayLogAdjustment
;
use
app\model\OPayLogModel
;
use
app\model\OPayLogModel
;
/**
/**
...
@@ -108,23 +109,30 @@ class DailyPaperService
...
@@ -108,23 +109,30 @@ class DailyPaperService
}
}
$payLogModel
=
new
OPayLogModel
();
$payLogModel
=
new
OPayLogModel
();
//中介费入账
//中介费入账
$field
=
"a.id,c.id as bargain_id,b.house_id,c.price,
c.commission,
a.money,a.pay_type,a.transfer_name,
$field
=
"a.id,c.id as bargain_id,b.house_id,c.price,a.money,a.pay_type,a.transfer_name,
d.report_agent_id,c.is_open,a.is_dividend,a.create_time"
;
d.report_agent_id,c.is_open,a.is_dividend,a.
receipt_number,a.
create_time"
;
$params
[
"a.agent_id"
]
=
array
(
"in"
,(
$ids
));
$params
[
"a.agent_id"
]
=
array
(
"in"
,(
$ids
));
$params
[
"a.is_del"
]
=
0
;
$params
[
"a.is_del"
]
=
0
;
$params
[
"a.type"
]
=
91
;
$params
[
"a.type"
]
=
91
;
$params
[
"c.father_id"
]
=
0
;
$params
[
"c.father_id"
]
=
0
;
$info
[
"agency_fee"
]
=
$payLogModel
->
selectPayLogList
(
$field
,
$params
);
$info
[
"agency_fee"
]
=
$payLogModel
->
selectPayLogList
ByBargain
(
$field
,
$params
);
//案场费入账 盘方
//案场费入账 盘方
$params
[
"a.type"
]
=
92
;
$params
[
"a.type"
]
=
92
;
$info
[
"case_fee"
]
=
$payLogModel
->
selectPayLogList
(
$field
,
$params
);
$info
[
"case_fee"
]
=
$payLogModel
->
selectPayLogListByBargain
(
$field
,
$params
);
$field_money
=
"a.id,b.house_id,a.pay_type,a.transfer_name, d.report_agent_id,a.is_dividend,a.receipt_number,a.create_time"
;
//意向金
//意向金
$params
[
"a.type"
]
=
10
;
$params
[
"a.type"
]
=
10
;
$info
[
"earnest_money"
]
=
$payLogModel
->
selectPayLogList
(
$field
,
$params
);
unset
(
$params
[
"c.father_id"
]);
$info
[
"earnest_money"
]
=
$payLogModel
->
selectPayLogListByBargainReport
(
$field_money
,
$params
);
//保管金
//保管金
$params
[
"a.type"
]
=
30
;
$params
[
"a.type"
]
=
30
;
$info
[
"custody_money"
]
=
$payLogModel
->
selectPayLogList
(
$field
,
$params
);
$info
[
"custody_money"
]
=
$payLogModel
->
selectPayLogList
ByBargainReport
(
$field_money
,
$params
);
//调整出账
//调整出账
$field_adjustment
=
"b.id,c.house_id,a.income_time,b.type,a.receipt_number,a.create_time"
;
$params_adjustment
[
"a.agent_id"
]
=
array
(
"in"
,(
$ids
));
$params_adjustment
[
"a.is_del"
]
=
0
;
$info
[
"adjustment"
]
=
$payLogModel
->
selectAdjustmentList
(
$field_adjustment
,
$params_adjustment
);
return
$info
;
return
$info
;
}
}
...
...
application/model/OPayLogModel.php
View file @
d5542c2f
...
@@ -465,7 +465,7 @@ class OPayLogModel extends Model
...
@@ -465,7 +465,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
selectPayLogList
(
$filed
,
$params
)
public
function
selectPayLogList
ByBargain
(
$filed
,
$params
)
{
{
return
$this
->
db_
->
field
(
$filed
)
return
$this
->
db_
->
field
(
$filed
)
->
alias
(
"a"
)
->
alias
(
"a"
)
...
@@ -475,6 +475,34 @@ class OPayLogModel extends Model
...
@@ -475,6 +475,34 @@ class OPayLogModel extends Model
->
where
(
$params
)
->
where
(
$params
)
->
select
();
->
select
();
}
}
/**
* @param $filed
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectPayLogListByBargainReport
(
$filed
,
$params
)
{
return
$this
->
db_
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
where
(
$params
)
->
select
();
}
public
function
selectAdjustmentList
(
$filed
,
$params
)
{
return
$this
->
db_
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_paylog_adjustment b"
,
"a.order_id = b.id"
,
"right"
)
->
join
(
"o_order c"
,
"a.order_id = c.id"
,
"left"
)
->
where
(
$params
)
->
select
();
}
/**
/**
* @param $field
* @param $field
...
...
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