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
401e435a
Commit
401e435a
authored
Feb 26, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交报告详情增加收款信息
parent
bc295790
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
22 deletions
+61
-22
Performance.php
application/api_broker/controller/Performance.php
+39
-22
PerformanceService.php
application/api_broker/service/PerformanceService.php
+13
-0
PerformanceValidate.php
application/api_broker/validate/PerformanceValidate.php
+5
-0
OPayLogModel.php
application/model/OPayLogModel.php
+3
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Performance.php
View file @
401e435a
...
@@ -52,7 +52,7 @@ class Performance extends Basic
...
@@ -52,7 +52,7 @@ class Performance extends Basic
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$params
[
"site_id"
]);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$params
[
"site_id"
]);
if
(
count
(
$list
)
>
0
)
{
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
;
$result
[
"list"
]
=
$list
;
$result
[
"start_time"
]
=
$start_day
;
$result
[
"start_time"
]
=
$start_day
;
...
@@ -86,7 +86,7 @@ class Performance extends Basic
...
@@ -86,7 +86,7 @@ class Performance extends Basic
$house_id
=
$params
[
"house_id"
];
$house_id
=
$params
[
"house_id"
];
}
}
try
{
try
{
$result
=
$this
->
service_
->
personagePerformance
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$result
=
$this
->
service_
->
personagePerformance
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$params
[
"is_case"
],
$house_id
);
$params
[
"is_case"
],
$house_id
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
catch
(
Exception
$exception
)
{
}
catch
(
Exception
$exception
)
{
...
@@ -112,7 +112,7 @@ class Performance extends Basic
...
@@ -112,7 +112,7 @@ class Performance extends Basic
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
try
{
try
{
$result
=
$this
->
service_
->
storePerformance
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$params
[
"site_id"
]);
$result
=
$this
->
service_
->
storePerformance
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$params
[
"site_id"
]);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
catch
(
Exception
$exception
)
{
}
catch
(
Exception
$exception
)
{
return
$this
->
response
(
"101"
,
"request error,msg:"
.
$exception
);
return
$this
->
response
(
"101"
,
"request error,msg:"
.
$exception
);
...
@@ -168,14 +168,14 @@ class Performance extends Basic
...
@@ -168,14 +168,14 @@ class Performance extends Basic
"end_time" => "2018-04-12",
"end_time" => "2018-04-12",
);*/
);*/
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"start_time"
])
||
!
isset
(
$params
[
"end_time"
]
)
||
!
isset
(
$params
[
"site_id"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"start_time"
])
||
!
isset
(
$params
[
"end_time"
]
)
||
!
isset
(
$params
[
"site_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
Log
::
write
(
$params
,
'storeOrAgentSort'
);
//记录日志
Log
::
write
(
$params
,
'storeOrAgentSort'
);
//记录日志
//城市选择
//城市选择
$site_id
=
$params
[
"site_id"
]
?
$params
[
"site_id"
]
:
''
;
$site_id
=
$params
[
"site_id"
]
?
$params
[
"site_id"
]
:
''
;
try
{
try
{
$result
=
$this
->
service_
->
storeSortByDistrictId
(
$params
[
"agent_id"
],
$params
[
"is_store"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$site_id
);
$result
=
$this
->
service_
->
storeSortByDistrictId
(
$params
[
"agent_id"
],
$params
[
"is_store"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$site_id
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
catch
(
Exception
$exception
)
{
}
catch
(
Exception
$exception
)
{
...
@@ -468,12 +468,6 @@ class Performance extends Basic
...
@@ -468,12 +468,6 @@ class Performance extends Basic
}
}
}
}
/**
/**
* 获取时间段实收数据
* 获取时间段实收数据
* @return \think\Response
* @return \think\Response
...
@@ -490,7 +484,7 @@ class Performance extends Basic
...
@@ -490,7 +484,7 @@ class Performance extends Basic
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$result
=
$this
->
service_
->
paylogListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
$result
=
$this
->
service_
->
paylogListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
if
(
$result
[
"code"
]
==
101
)
{
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
...
@@ -514,12 +508,12 @@ class Performance extends Basic
...
@@ -514,12 +508,12 @@ class Performance extends Basic
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$result
=
$this
->
service_
->
marchInListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
$result
=
$this
->
service_
->
marchInListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
if
(
$result
[
"code"
]
==
101
)
{
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
}
else
{
// return $this->response("200", "success", $result["date"]);
// return $this->response("200", "success", $result["date"]);
return
$this
->
response
(
"200"
,
"success"
,
[
"date"
=>
$result
[
"date"
]
,
"total"
=>
$result
[
"total"
]
]);
return
$this
->
response
(
"200"
,
"success"
,
[
"date"
=>
$result
[
"date"
],
"total"
=>
$result
[
"total"
]
]);
}
}
}
}
...
@@ -549,12 +543,12 @@ class Performance extends Basic
...
@@ -549,12 +543,12 @@ class Performance extends Basic
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$result
=
$this
->
service_
->
getFollowListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
$result
=
$this
->
service_
->
getFollowListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
if
(
$result
[
"code"
]
==
101
)
{
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
}
else
{
//return $this->response("200", "success", $result["date"]);
//return $this->response("200", "success", $result["date"]);
return
$this
->
response
(
"200"
,
"success"
,
[
"date"
=>
$result
[
"date"
]
,
"total"
=>
$result
[
"total"
]
]);
return
$this
->
response
(
"200"
,
"success"
,
[
"date"
=>
$result
[
"date"
],
"total"
=>
$result
[
"total"
]
]);
}
}
}
}
...
@@ -577,7 +571,7 @@ class Performance extends Basic
...
@@ -577,7 +571,7 @@ class Performance extends Basic
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
//todo 最后跟进时间
//todo 最后跟进时间
$result
=
$this
->
service_
->
getHousingResourceListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
$result
=
$this
->
service_
->
getHousingResourceListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
if
(
$result
[
"code"
]
==
101
)
{
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
}
else
{
...
@@ -602,8 +596,8 @@ class Performance extends Basic
...
@@ -602,8 +596,8 @@ class Performance extends Basic
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$result
=
$this
->
service_
->
getUserResourceListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$result
=
$this
->
service_
->
getUserResourceListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
,
$this
->
siteId
);
$page_no
,
$page_size
,
$this
->
siteId
);
if
(
$result
[
"code"
]
==
101
)
{
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
}
else
{
...
@@ -628,7 +622,7 @@ class Performance extends Basic
...
@@ -628,7 +622,7 @@ class Performance extends Basic
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
// dump($params);
// dump($params);
$result
=
$this
->
service_
->
getTeamNumPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$page_no
,
$page_size
,
$this
->
siteId
);
$result
=
$this
->
service_
->
getTeamNumPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$page_no
,
$page_size
,
$this
->
siteId
);
if
(
$result
[
"code"
]
==
101
)
{
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
}
else
{
...
@@ -656,7 +650,7 @@ class Performance extends Basic
...
@@ -656,7 +650,7 @@ class Performance extends Basic
$request_source_type
=
!
empty
(
$params
[
"request_source_type"
])
?
$params
[
"request_source_type"
]
:
0
;
$request_source_type
=
!
empty
(
$params
[
"request_source_type"
])
?
$params
[
"request_source_type"
]
:
0
;
$result
=
$this
->
service_
->
getBargainSumPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
,
$request_source_type
);
$result
=
$this
->
service_
->
getBargainSumPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
,
$request_source_type
);
if
(
$result
[
"code"
]
==
101
)
{
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
}
else
{
...
@@ -664,4 +658,27 @@ class Performance extends Basic
...
@@ -664,4 +658,27 @@ class Performance extends Basic
}
}
}
}
/**
* 收款信息
* @return \think\Response
*/
public
function
collectionListByBargainId
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/* $params = array(
"bargain_id" => 1,
"agent_id" => 80,
);*/
$checkResult
=
$this
->
validate
(
$params
,
"PerformanceValidate.verifyCollectionList"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
$result
=
$this
->
service_
->
collectionList
(
$params
[
"bargain_id"
]);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
}
}
application/api_broker/service/PerformanceService.php
View file @
401e435a
...
@@ -894,5 +894,17 @@ class PerformanceService
...
@@ -894,5 +894,17 @@ class PerformanceService
return
[
"code"
=>
200
,
"date"
=>
$list
];
return
[
"code"
=>
200
,
"date"
=>
$list
];
}
}
/**
* @param $bargain_id
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
collectionList
(
$bargain_id
){
$paylogModel
=
new
OPayLogModel
();
$orderParams
[
"bargain_id"
]
=
$bargain_id
;
$field_pay_log
=
"a.id,a.create_time,a.bargain_id,a.money,a.type,a.income_time,a.source,c.id as agent_id,c.name,d.store_name"
;
return
$paylogModel
->
getPayLogByOrderId
(
$field_pay_log
,
$orderParams
);
}
}
}
\ No newline at end of file
application/api_broker/validate/PerformanceValidate.php
View file @
401e435a
...
@@ -22,6 +22,7 @@ class PerformanceValidate extends Validate
...
@@ -22,6 +22,7 @@ class PerformanceValidate extends Validate
'push_id'
=>
'require'
,
'push_id'
=>
'require'
,
'is_forbidden'
=>
'require|in:0,1'
,
'is_forbidden'
=>
'require|in:0,1'
,
'operator_id'
=>
'require|number'
,
'operator_id'
=>
'require|number'
,
'bargain_id'
=>
'require|number'
,
];
];
protected
$message
=
[
protected
$message
=
[
...
@@ -39,6 +40,8 @@ class PerformanceValidate extends Validate
...
@@ -39,6 +40,8 @@ class PerformanceValidate extends Validate
'is_forbidden.in'
=>
'是否绑定字段值只能为0或1'
,
'is_forbidden.in'
=>
'是否绑定字段值只能为0或1'
,
'operator_id.require'
=>
'操作人为必填字段'
,
'operator_id.require'
=>
'操作人为必填字段'
,
'operator_id.number'
=>
'操作人编号只能为数字'
,
'operator_id.number'
=>
'操作人编号只能为数字'
,
'bargain_id.require'
=>
'成交报告编号为必填字段'
,
'bargain_id.number'
=>
'成交报告编号只能为数字'
,
];
];
protected
$scene
=
[
protected
$scene
=
[
...
@@ -47,5 +50,6 @@ class PerformanceValidate extends Validate
...
@@ -47,5 +50,6 @@ class PerformanceValidate extends Validate
'login'
=>
[
'phone'
,
'pwd'
,
'device_id'
,
"push_id"
],
'login'
=>
[
'phone'
,
'pwd'
,
'device_id'
,
"push_id"
],
'verifyStatus'
=>
[
'agent_id'
,
'device_id'
],
'verifyStatus'
=>
[
'agent_id'
,
'device_id'
],
'verifyIsForbidden'
=>
[
'phone'
,
'device_id'
,
'is_forbidden'
,
'operator_id'
],
'verifyIsForbidden'
=>
[
'phone'
,
'device_id'
,
'is_forbidden'
,
'operator_id'
],
'verifyCollectionList'
=>
[
'agent_id'
,
'bargain_id'
],
];
];
}
}
\ No newline at end of file
application/model/OPayLogModel.php
View file @
401e435a
...
@@ -138,6 +138,9 @@ class OPayLogModel extends Model
...
@@ -138,6 +138,9 @@ class OPayLogModel extends Model
if
(
isset
(
$params
[
"house_title"
]))
{
if
(
isset
(
$params
[
"house_title"
]))
{
$where_
[
"b.house_title"
]
=
$params
[
"house_title"
];
$where_
[
"b.house_title"
]
=
$params
[
"house_title"
];
}
}
if
(
isset
(
$params
[
"bargain_id"
]))
{
$where_
[
"a.bargain_id"
]
=
$params
[
"bargain_id"
];
}
$where_
[
"a.is_del"
]
=
0
;
$where_
[
"a.is_del"
]
=
0
;
return
Db
::
table
(
$this
->
table
)
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
field
(
$field
)
...
...
application/route.php
View file @
401e435a
...
@@ -718,6 +718,7 @@ Route::group('broker', [
...
@@ -718,6 +718,7 @@ Route::group('broker', [
'performanceList'
=>
[
'api_broker/Performance/performanceList'
,
[
'method'
=>
'POST|GET'
]],
//业绩list
'performanceList'
=>
[
'api_broker/Performance/performanceList'
,
[
'method'
=>
'POST|GET'
]],
//业绩list
'superviseList'
=>
[
'api_broker/Performance/superviseList'
,
[
'method'
=>
'POST|GET'
]],
//监督执行list
'superviseList'
=>
[
'api_broker/Performance/superviseList'
,
[
'method'
=>
'POST|GET'
]],
//监督执行list
'officialReceiptsList'
=>
[
'api_broker/Performance/officialReceiptsList'
,
[
'method'
=>
'POST|GET'
]],
//实收list
'officialReceiptsList'
=>
[
'api_broker/Performance/officialReceiptsList'
,
[
'method'
=>
'POST|GET'
]],
//实收list
'collectionListByBargainId'
=>
[
'api_broker/Performance/collectionListByBargainId'
,
[
'method'
=>
'POST|GET'
]],
//实收list
'paylogListPcInfo'
=>
[
'api_broker/Performance/paylogListPcInfo'
,
[
'method'
=>
'POST|GET'
]],
//
'paylogListPcInfo'
=>
[
'api_broker/Performance/paylogListPcInfo'
,
[
'method'
=>
'POST|GET'
]],
//
'marchInListPcInfo'
=>
[
'api_broker/Performance/marchInListPcInfo'
,
[
'method'
=>
'POST|GET'
]],
//
'marchInListPcInfo'
=>
[
'api_broker/Performance/marchInListPcInfo'
,
[
'method'
=>
'POST|GET'
]],
//
...
...
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