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
527ed7a0
Commit
527ed7a0
authored
Dec 17, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取收款图片
parent
797efb45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
44 deletions
+83
-44
DailyPaperService.php
application/api_broker/service/DailyPaperService.php
+58
-44
DailyPaper.php
application/index/controller/DailyPaper.php
+24
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/service/DailyPaperService.php
View file @
527ed7a0
...
@@ -8,6 +8,7 @@ use app\model\AAgents;
...
@@ -8,6 +8,7 @@ use app\model\AAgents;
use
app\model\GHouses
;
use
app\model\GHouses
;
use
app\model\ODaily
;
use
app\model\ODaily
;
use
app\model\ODailyLog
;
use
app\model\ODailyLog
;
use
app\model\OImg
;
use
app\model\OPayLogAdjustment
;
use
app\model\OPayLogAdjustment
;
use
app\model\OPayLogModel
;
use
app\model\OPayLogModel
;
...
@@ -123,15 +124,15 @@ class DailyPaperService
...
@@ -123,15 +124,15 @@ class DailyPaperService
$params
[
"is_del"
]
=
0
;
$params
[
"is_del"
]
=
0
;
$params
[
"create_time"
]
=
array
(
"between"
,
array
(
$daily_data
,
$daily_data
.
" 23:59:59"
));
$params
[
"create_time"
]
=
array
(
"between"
,
array
(
$daily_data
,
$daily_data
.
" 23:59:59"
));
$payLogModel
=
new
OPayLogModel
();
$payLogModel
=
new
OPayLogModel
();
$total_arr
=
$payLogModel
->
getTotal
(
$field
,
$params
,
"pay_type"
);
$total_arr
=
$payLogModel
->
getTotal
(
$field
,
$params
,
"pay_type"
);
$total
[
"alipay"
]
=
0
;
$total
[
"alipay"
]
=
0
;
$total
[
"tenpay"
]
=
0
;
$total
[
"tenpay"
]
=
0
;
$total
[
"pos"
]
=
0
;
$total
[
"pos"
]
=
0
;
$total
[
"realty_pay"
]
=
0
;
$total
[
"realty_pay"
]
=
0
;
$total
[
"family_pay"
]
=
0
;
$total
[
"family_pay"
]
=
0
;
$total
[
"private_bank"
]
=
0
;
$total
[
"private_bank"
]
=
0
;
$total
[
"cash"
]
=
0
;
$total
[
"cash"
]
=
0
;
$total
[
"other_bank"
]
=
0
;
$total
[
"other_bank"
]
=
0
;
if
(
count
(
$total_arr
)
<=
0
)
{
if
(
count
(
$total_arr
)
<=
0
)
{
return
$total
;
return
$total
;
}
}
...
@@ -225,8 +226,8 @@ class DailyPaperService
...
@@ -225,8 +226,8 @@ class DailyPaperService
);
);
//调整出账
//调整出账
$field_adjustment
=
"b.id,c.house_id,a.agent_id,a.income_time,b.type,a.receipt_number,a.create_time"
;
$field_adjustment
=
"b.id,c.house_id,a.agent_id,a.income_time,b.type,a.receipt_number,a.create_time"
;
$params_adjustment
[
"a.agent_id"
]
=
array
(
"in"
,
(
$ids
));
$params_adjustment
[
"a.agent_id"
]
=
array
(
"in"
,
(
$ids
));
$params_adjustment
[
"a.is_del"
]
=
0
;
$params_adjustment
[
"a.is_del"
]
=
0
;
$params_adjustment
[
"b.create_time"
]
=
array
(
"between"
,
array
(
$daily_data
,
$daily_data
.
" 23:59:59"
));
$params_adjustment
[
"b.create_time"
]
=
array
(
"between"
,
array
(
$daily_data
,
$daily_data
.
" 23:59:59"
));
$info
[
"adjustment"
]
=
$this
->
getHouseAndAgentInfo
(
$info
[
"adjustment"
]
=
$this
->
getHouseAndAgentInfo
(
$payLogModel
->
selectAdjustmentList
(
$field_adjustment
,
$params_adjustment
)
$payLogModel
->
selectAdjustmentList
(
$field_adjustment
,
$params_adjustment
)
...
@@ -259,8 +260,8 @@ class DailyPaperService
...
@@ -259,8 +260,8 @@ class DailyPaperService
$house_arr
=
$this
->
houseInfo
(
$house_id_str
);
$house_arr
=
$this
->
houseInfo
(
$house_id_str
);
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
$data
[
$k
][
"agent_name"
]
=
""
;
$data
[
$k
][
"agent_name"
]
=
""
;
$data
[
$k
][
"store_name"
]
=
""
;
$data
[
$k
][
"store_name"
]
=
""
;
$data
[
$k
][
"house_address"
]
=
""
;
$data
[
$k
][
"house_address"
]
=
""
;
foreach
(
$agent_arr
as
$value
)
{
foreach
(
$agent_arr
as
$value
)
{
if
(
$v
[
"agent_id"
]
==
$value
[
"id"
])
{
if
(
$v
[
"agent_id"
]
==
$value
[
"id"
])
{
...
@@ -372,7 +373,7 @@ class DailyPaperService
...
@@ -372,7 +373,7 @@ class DailyPaperService
$agent_info_field
=
"id,name,store_id,district_id,level"
;
$agent_info_field
=
"id,name,store_id,district_id,level"
;
$agent_info
=
$this
->
aAgentsModel
->
getAgentById
(
$agent_info_field
,
$agent_info_arr
);
$agent_info
=
$this
->
aAgentsModel
->
getAgentById
(
$agent_info_field
,
$agent_info_arr
);
if
(
count
(
$agent_info
)
<=
0
||
(
$agent_info
[
0
][
"level"
]
!=
20
&&
$agent_info
[
0
][
"level"
]
!=
40
))
{
if
(
count
(
$agent_info
)
<=
0
||
(
$agent_info
[
0
][
"level"
]
!=
20
&&
$agent_info
[
0
][
"level"
]
!=
40
))
{
return
[
"code"
=>
101
,
"msg"
=>
"经纪人信息错误"
];
return
[
"code"
=>
101
,
"msg"
=>
"经纪人信息错误"
];
}
}
$params
=
$this
->
dailyBin
(
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$params
=
$this
->
dailyBin
(
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
...
@@ -381,23 +382,23 @@ class DailyPaperService
...
@@ -381,23 +382,23 @@ class DailyPaperService
}
}
public
function
dailyBin
(
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
public
function
dailyBin
(
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$store_id
,
$district_id
)
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$store_id
,
$district_id
)
{
{
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"store_id"
]
=
$store_id
;
$arr
[
"store_id"
]
=
$store_id
;
$arr
[
"district_id"
]
=
$district_id
;
$arr
[
"district_id"
]
=
$district_id
;
$arr
[
"daily_date"
]
=
$daily_date
;
$arr
[
"daily_date"
]
=
$daily_date
;
$arr
[
"alipay"
]
=
$alipay
;
$arr
[
"alipay"
]
=
$alipay
;
$arr
[
"tenpay"
]
=
$tenpay
;
$arr
[
"tenpay"
]
=
$tenpay
;
$arr
[
"realty_pay"
]
=
$realty_pay
;
$arr
[
"realty_pay"
]
=
$realty_pay
;
$arr
[
"family_pay"
]
=
$family_pay
;
$arr
[
"family_pay"
]
=
$family_pay
;
$arr
[
"private_bank"
]
=
$private_bank
;
$arr
[
"private_bank"
]
=
$private_bank
;
$arr
[
"cash"
]
=
$cash
;
$arr
[
"cash"
]
=
$cash
;
$arr
[
"pos"
]
=
$pos
;
$arr
[
"pos"
]
=
$pos
;
$arr
[
"other_bank"
]
=
$other_bank
;
$arr
[
"other_bank"
]
=
$other_bank
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$arr
;
return
$arr
;
}
}
...
@@ -455,29 +456,28 @@ class DailyPaperService
...
@@ -455,29 +456,28 @@ class DailyPaperService
* @param $remark
* @param $remark
* @return mixed
* @return mixed
*/
*/
public
function
dailyLogBin
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
public
function
dailyLogBin
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$store_id
,
$district_id
,
$remark
)
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$store_id
,
$district_id
,
$remark
)
{
{
$arr
[
"daily_id"
]
=
$daily_id
;
$arr
[
"daily_id"
]
=
$daily_id
;
$arr
[
"operation_id"
]
=
$agent_id
;
$arr
[
"operation_id"
]
=
$agent_id
;
$arr
[
"operation_name"
]
=
$agent_name
;
$arr
[
"operation_name"
]
=
$agent_name
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"daily_date"
]
=
$daily_date
;
$arr
[
"daily_date"
]
=
$daily_date
;
$arr
[
"alipay"
]
=
$alipay
;
$arr
[
"alipay"
]
=
$alipay
;
$arr
[
"tenpay"
]
=
$tenpay
;
$arr
[
"tenpay"
]
=
$tenpay
;
$arr
[
"realty_pay"
]
=
$realty_pay
;
$arr
[
"realty_pay"
]
=
$realty_pay
;
$arr
[
"family_pay"
]
=
$family_pay
;
$arr
[
"family_pay"
]
=
$family_pay
;
$arr
[
"private_bank"
]
=
$private_bank
;
$arr
[
"private_bank"
]
=
$private_bank
;
$arr
[
"cash"
]
=
$cash
;
$arr
[
"cash"
]
=
$cash
;
$arr
[
"pos"
]
=
$pos
;
$arr
[
"pos"
]
=
$pos
;
$arr
[
"other_bank"
]
=
$other_bank
;
$arr
[
"other_bank"
]
=
$other_bank
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$arr
;
return
$arr
;
}
}
/**
/**
* 获取提交的日报记录
* 获取提交的日报记录
* @param $agent_id
* @param $agent_id
...
@@ -499,4 +499,17 @@ class DailyPaperService
...
@@ -499,4 +499,17 @@ class DailyPaperService
}
}
/**
* @param $pay_log_id
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getImgs
(
$pay_log_id
)
{
$oImgModel
=
new
OImg
();
$params
[
"img_id"
]
=
$pay_log_id
;
$params
[
"img_type"
]
=
1
;
return
$oImgModel
->
getImgList
(
$params
);
}
}
}
\ No newline at end of file
application/index/controller/DailyPaper.php
View file @
527ed7a0
...
@@ -159,4 +159,27 @@ class DailyPaper extends Basic
...
@@ -159,4 +159,27 @@ class DailyPaper extends Basic
}
}
}
}
/**
* @return \think\Response
*/
public
function
getPayLogImg
(){
$params
=
$this
->
params
;
/* $params = array(
"pay_log_id" => 1
);*/
if
(
!
isset
(
$params
[
"pay_log_id"
])){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$img_list
=
$this
->
service_
->
getImgs
(
$params
[
"pay_log_id"
]);
if
(
count
(
$img_list
)
>
0
){
$result
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
"img_info"
]
=
$img_list
;
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
}
\ No newline at end of file
application/route.php
View file @
527ed7a0
...
@@ -396,6 +396,7 @@ Route::group('index', [
...
@@ -396,6 +396,7 @@ Route::group('index', [
'dailyDetail'
=>
[
'index/DailyPaper/dailyDetail'
,
[
'method'
=>
'get|post'
]],
'dailyDetail'
=>
[
'index/DailyPaper/dailyDetail'
,
[
'method'
=>
'get|post'
]],
'addDaily'
=>
[
'index/DailyPaper/addDaily'
,
[
'method'
=>
'get|post'
]],
'addDaily'
=>
[
'index/DailyPaper/addDaily'
,
[
'method'
=>
'get|post'
]],
'commitCheck'
=>
[
'index/DailyPaper/commitCheck'
,
[
'method'
=>
'get|post'
]],
'commitCheck'
=>
[
'index/DailyPaper/commitCheck'
,
[
'method'
=>
'get|post'
]],
'getPayLogImg'
=>
[
'index/DailyPaper/getPayLogImg'
,
[
'method'
=>
'get|post'
]],
]);
]);
...
...
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