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
78ddd270
Commit
78ddd270
authored
Jul 31, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
393c1a55
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
256 additions
and
112 deletions
+256
-112
PayLog.php
application/api_broker/controller/PayLog.php
+84
-29
Basic.php
application/api_broker/extend/Basic.php
+1
-1
PayLogService.php
application/api_broker/service/PayLogService.php
+133
-62
OPayLogModel.php
application/model/OPayLogModel.php
+17
-0
route.php
application/route.php
+21
-20
No files found.
application/api_broker/controller/PayLog.php
View file @
78ddd270
...
...
@@ -3,6 +3,7 @@
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\PayLogService
;
use
app\model\GHouses
;
use
app\model\OfficeOImg
;
...
...
@@ -116,31 +117,31 @@ class PayLog extends Basic
);*/
$refund_id
=
isset
(
$params
[
"refund_id"
])
?
$params
[
"refund_id"
]
:
0
;
if
(
$refund_id
==
0
&&
!
isset
(
$params
[
"remark_img"
]))
{
if
(
$refund_id
==
0
&&
!
isset
(
$params
[
"remark_img"
]))
{
return
$this
->
response
(
"101"
,
"请上传图片"
);
}
$agent_id
=
$params
[
"agent_id"
];
$agent_name
=
$params
[
"agent_name"
];
$report_id
=
$params
[
"report_id"
];
$order_id
=
$params
[
"order_id"
];
$order_no
=
$params
[
"order_no"
];
$refund_money
=
$params
[
"refund_money"
];
$name
=
$params
[
"name"
];
$phone
=
$params
[
"phone"
];
$bank
=
$params
[
"bank"
];
$card_no
=
$params
[
"card_no"
];
$agent_id
=
$params
[
"agent_id"
];
$agent_name
=
$params
[
"agent_name"
];
$report_id
=
$params
[
"report_id"
];
$order_id
=
$params
[
"order_id"
];
$order_no
=
$params
[
"order_no"
];
$refund_money
=
$params
[
"refund_money"
];
$name
=
$params
[
"name"
];
$phone
=
$params
[
"phone"
];
$bank
=
$params
[
"bank"
];
$card_no
=
$params
[
"card_no"
];
$receipt_number
=
$params
[
"receipt_number"
];
$type
=
$params
[
"type"
];
$refund_cause
=
$params
[
"refund_cause"
];
$pay_log_id
=
$params
[
"pay_log_id"
];
$refund_way
=
$params
[
"refund_way"
];
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$remark_img
=
isset
(
$params
[
"remark_img"
])
?
json_decode
(
$params
[
"remark_img"
],
true
)
:
""
;
$del_img
=
isset
(
$params
[
"del_img"
])
?
$params
[
"del_img"
]
:
""
;
$type
=
$params
[
"type"
];
$refund_cause
=
$params
[
"refund_cause"
];
$pay_log_id
=
$params
[
"pay_log_id"
];
$refund_way
=
$params
[
"refund_way"
];
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$remark_img
=
isset
(
$params
[
"remark_img"
])
?
json_decode
(
$params
[
"remark_img"
],
true
)
:
""
;
$del_img
=
isset
(
$params
[
"del_img"
])
?
$params
[
"del_img"
]
:
""
;
//todo 判断此单是否有付款
$is_ok
=
$this
->
service_
->
addRefund
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$refund_money
,
$name
,
$phone
,
$bank
,
$card_no
,
$receipt_number
,
$type
,
$refund_cause
,
$pay_log_id
,
$refund_way
,
$remark
,
$remark_img
,
$refund_id
,
$del_img
);
,
$refund_id
,
$del_img
);
if
(
$is_ok
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[]);
}
elseif
(
$is_ok
==
-
2
)
{
...
...
@@ -158,21 +159,22 @@ class PayLog extends Basic
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getRefund
(){
public
function
getRefund
()
{
$params
=
$this
->
params
;
/* $params = array(
"refund_id" =>1
);*/
if
(
!
isset
(
$params
[
"refund_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
/* $params = array(
"refund_id" =>1
);*/
if
(
!
isset
(
$params
[
"refund_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$result
=
$this
->
service_
->
getRefundDetail
(
$params
[
"refund_id"
]);
if
(
$result
[
"code"
]
==
200
)
{
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"data"
]);
}
elseif
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
if
(
$result
[
"code"
]
==
200
)
{
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"data"
]);
}
elseif
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
}
...
...
@@ -227,4 +229,56 @@ class PayLog extends Basic
}
return
$this
->
response
(
"101"
,
$refund_data
);
}
/**我的收款记录列表
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getPayLogList
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 1,
"search_type" => 1,//1商铺编号,2商铺地址 3收款id,4带看id
"keyword" => "121",
"submit_time_start" => '123123123123',//时间戳
"submit_time_end" => '123123',
"type" => 10,//入账类型, 10.意向金 30.保管金 91.中介费 92.案场费
"source" => 0,//来源0app 1智能pos机 2调整
"is_open" => 0, //是否开业:0未开业 1开业
"is_all" => 0, //是否查看全部:0自己 1全部
"page_no" => 1,
"page_size" => 15
);*/
if
(
!
isset
(
$params
[
"agent_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$agentModel
=
new
AAgents
();
$agents_data
=
$agentModel
->
getAgentInfo
(
'id,level'
,
$this
->
agentId
);
$result
=
[];
$check_type
=
0
;
if
(
isset
(
$params
[
"is_all"
])
&&
$params
[
"is_all"
]
==
1
)
{
$check_type
=
1
;
if
(
$agents_data
[
"level"
]
<
30
)
{
$orderLogService
=
new
ReportService
();
$check_type
=
$orderLogService
->
getCheckType
(
$this
->
agentId
);
if
(
$check_type
==
0
)
{
return
$this
->
response
(
101
,
"暂无权限"
);
}
}
}
$field
=
"a.type,a.id,a.create_time,a.income_time,a.money,a.type_ext,a.bargain_id,a.is_open,a.source,a.agent_id,a.agent_name"
;
$result
=
$this
->
service_
->
getPayLogList
(
$field
,
$params
,
$pageNo
,
$pageSize
,
$check_type
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
\ No newline at end of file
application/api_broker/extend/Basic.php
View file @
78ddd270
...
...
@@ -113,7 +113,7 @@ class Basic extends Controller
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
//过滤掉不需要验证token的接口
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
$this
->
tokenVerify
();
//
$this->tokenVerify();
//$this->userAuth(trim($requestPath));
}
unset
(
$this
->
params
[
"AuthToken"
]);
...
...
application/api_broker/service/PayLogService.php
View file @
78ddd270
...
...
@@ -22,9 +22,9 @@ class PayLogService
public
function
__construct
()
{
$this
->
payLogModel
=
new
OPayLogModel
();
$this
->
payLogModel
=
new
OPayLogModel
();
$this
->
payLogAdjustmentModel
=
new
OPayLogAdjustment
();
$this
->
oRefundModel
=
new
ORefundModel
();
$this
->
oRefundModel
=
new
ORefundModel
();
}
public
function
getBeForNum
(
$order_id
)
...
...
@@ -39,10 +39,10 @@ class PayLogService
* @param $type
* @return int
*/
public
function
adjustment
(
$pay_id
,
$type
=
1
)
public
function
adjustment
(
$pay_id
,
$type
=
1
)
{
//todo 1.计算剩余金额 查询调整表 2.减去退款 3.减去转账
$filed
=
"id,money"
;
$filed
=
"id,money"
;
$pay_log_arr
=
$this
->
payLogModel
->
getBeforeBillInfo
(
$filed
,
[
"id"
=>
$pay_id
]);
if
(
count
(
$pay_log_arr
)
<
0
)
{
return
-
1
;
...
...
@@ -50,12 +50,12 @@ class PayLogService
$pay_log_arr
=
$pay_log_arr
[
0
];
$where_
[
"paylog_id"
]
=
$pay_id
;
$where_
[
"is_del"
]
=
0
;
$where_
[
"is_del"
]
=
0
;
//调整
$adjustment_sum
=
$this
->
payLogAdjustmentModel
->
getAdjustmentSum
(
"money"
,
$where_
);
//减去退款
$refund_params
[
"pay_log_id"
]
=
$pay_id
;
if
(
$type
==
2
)
{
if
(
$type
==
2
)
{
//驳回退款 不会改变入账的状态,驳回退款是为了让店长重新编辑上传的东西。
$refund_params
[
"status"
]
=
array
(
"neq"
,
4
);
}
...
...
@@ -77,13 +77,13 @@ class PayLogService
*/
public
function
addAdjustment
(
$new_pay_id
,
$pay_id
,
$money
,
$type
,
$agent_id
)
{
$filed
=
"id,type"
;
$filed
=
"id,type"
;
$pay_log_arr
=
$this
->
payLogModel
->
getBeforeBillInfo
(
$filed
,
[
"id"
=>
$pay_id
]);
if
(
count
(
$pay_log_arr
)
<
0
)
{
return
-
1
;
}
$oPayLogAdjustment
=
new
OPayLogAdjustment
();
$where_
=
$this
->
adjustmentBin
(
$new_pay_id
,
$pay_id
,
$money
,
$type
,
$agent_id
,
$pay_log_arr
[
0
][
"type"
]);
$where_
=
$this
->
adjustmentBin
(
$new_pay_id
,
$pay_id
,
$money
,
$type
,
$agent_id
,
$pay_log_arr
[
0
][
"type"
]);
$oPayLogAdjustment
->
addAdjustment
(
$where_
);
}
...
...
@@ -99,10 +99,10 @@ class PayLogService
private
function
adjustmentBin
(
$new_pay_id
,
$pay_id
,
$money
,
$type
,
$agent_id
,
$old_type
)
{
$arr
[
"paylog_id"
]
=
$pay_id
;
$arr
[
"paylog_id"
]
=
$pay_id
;
$arr
[
"new_paylog_id"
]
=
$new_pay_id
;
$arr
[
"money"
]
=
$money
;
$val
=
0
;
$arr
[
"money"
]
=
$money
;
$val
=
0
;
if
(
$old_type
==
10
)
{
//意向金
switch
(
$type
)
{
...
...
@@ -135,10 +135,10 @@ class PayLogService
}
}
$arr
[
"type"
]
=
$val
;
$arr
[
"type"
]
=
$val
;
$arr
[
"operation_id"
]
=
$agent_id
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_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
());
return
$arr
;
}
...
...
@@ -172,9 +172,9 @@ class PayLogService
if
(
empty
(
$refund_id
))
{
$where
[
'pay_log_id'
]
=
$pay_log_id
;
$where
[
'status'
]
=
4
;
$where
[
'is_del'
]
=
0
;
$id
=
$this
->
oRefundModel
->
getFind
(
'id'
,
$where
);
$where
[
'status'
]
=
4
;
$where
[
'is_del'
]
=
0
;
$id
=
$this
->
oRefundModel
->
getFind
(
'id'
,
$where
);
if
(
$id
[
'id'
]
>
0
)
{
return
-
3
;
//在驳回上修改
}
...
...
@@ -182,14 +182,14 @@ class PayLogService
//验证金额是否合法
$payLogService
=
new
PayLogService
();
$residue_money
=
$payLogService
->
adjustment
(
$pay_log_id
,
2
);
$residue_money
=
$payLogService
->
adjustment
(
$pay_log_id
,
2
);
if
(
$residue_money
<
$refund_money
)
{
return
-
2
;
}
$insert_id
=
0
;
$arr
=
$this
->
refundBin
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$refund_money
,
$name
,
$phone
,
$bank
,
$card_no
,
$receipt_number
,
$type
,
$refund_cause
,
$pay_log_id
,
$refund_way
,
$remark
,
$refund_id
);
$phone
,
$bank
,
$card_no
,
$receipt_number
,
$type
,
$refund_cause
,
$pay_log_id
,
$refund_way
,
$remark
,
$refund_id
);
if
(
$refund_id
<=
0
)
{
$insert_id
=
$this
->
oRefundModel
->
addRefund
(
$arr
);
}
else
{
...
...
@@ -200,8 +200,8 @@ class PayLogService
if
(
$insert_id
>
0
&&
$remark_img
)
{
$this
->
addOImg
(
$insert_id
,
3
,
$remark_img
);
}
if
(
$del_img
)
{
$this
->
delOImg
(
3
,
$del_img
);
if
(
$del_img
)
{
$this
->
delOImg
(
3
,
$del_img
);
}
$service_push
=
new
PushMessageService
();
...
...
@@ -230,31 +230,31 @@ class PayLogService
*/
private
function
refundBin
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$refund_money
,
$name
,
$phone
,
$bank
,
$card_no
,
$receipt_number
,
$type
,
$refund_cause
,
$pay_log_id
,
$refund_way
,
$remark
,
$refund_id
)
$refund_way
,
$remark
,
$refund_id
)
{
if
(
$refund_id
>
0
)
{
//修改
if
(
$refund_id
>
0
)
{
//修改
$arr
[
"id"
]
=
$refund_id
;
}
else
{
}
else
{
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
}
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"refund_money"
]
=
$refund_money
;
$arr
[
"name"
]
=
$name
;
$arr
[
"phone"
]
=
$phone
;
$arr
[
"status"
]
=
0
;
$arr
[
"bank"
]
=
$bank
;
$arr
[
"card_no"
]
=
$card_no
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"refund_money"
]
=
$refund_money
;
$arr
[
"name"
]
=
$name
;
$arr
[
"phone"
]
=
$phone
;
$arr
[
"status"
]
=
0
;
$arr
[
"bank"
]
=
$bank
;
$arr
[
"card_no"
]
=
$card_no
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"receipt_number"
]
=
$receipt_number
;
$arr
[
"type"
]
=
$type
;
$arr
[
"refund_cause"
]
=
$refund_cause
;
$arr
[
"pay_log_id"
]
=
$pay_log_id
;
$arr
[
"refund_way"
]
=
$refund_way
;
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"type"
]
=
$type
;
$arr
[
"refund_cause"
]
=
$refund_cause
;
$arr
[
"pay_log_id"
]
=
$pay_log_id
;
$arr
[
"refund_way"
]
=
$refund_way
;
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$arr
;
}
...
...
@@ -280,10 +280,10 @@ class PayLogService
private
function
getOImg
(
$id
,
$img_type
)
{
//查询图片
$oImgModel
=
new
OImg
();
$params
[
"img_id"
]
=
$id
;
$oImgModel
=
new
OImg
();
$params
[
"img_id"
]
=
$id
;
$params
[
"img_type"
]
=
$img_type
;
$img_arr
=
$oImgModel
->
getImgList
(
$params
);
$img_arr
=
$oImgModel
->
getImgList
(
$params
);
return
$img_arr
;
}
...
...
@@ -291,11 +291,12 @@ class PayLogService
* @param $type
* @param $del_img
*/
private
function
delOImg
(
$type
,
$del_img
){
$oImgModel
=
new
OImg
();
$ids
=
rtrim
(
$del_img
,
","
);
$where_
[
"id"
]
=
array
(
"in"
,
$ids
);
$where_
[
"img_type"
]
=
$type
;
private
function
delOImg
(
$type
,
$del_img
)
{
$oImgModel
=
new
OImg
();
$ids
=
rtrim
(
$del_img
,
","
);
$where_
[
"id"
]
=
array
(
"in"
,
$ids
);
$where_
[
"img_type"
]
=
$type
;
$params
[
"img_status"
]
=
1
;
$oImgModel
->
updateImgs
(
$where_
,
$params
);
...
...
@@ -311,16 +312,16 @@ class PayLogService
*/
public
function
getRefundDetail
(
$refund_id
)
{
$field
=
"a.id,a.report_id,a.agent_id,a.agent_name,a.order_no,a.order_id,a.refund_money,a.status,a.name
$field
=
"a.id,a.report_id,a.agent_id,a.agent_name,a.order_no,a.order_id,a.refund_money,a.status,a.name
,a.phone,a.bank,a.card_no, a.remark,a.receipt_number,a.type,a.refund_cause,a.pay_log_id,a.refund_way,
a.create_time,b.income_time"
;
$params
[
"id"
]
=
$refund_id
;
$params
[
"id"
]
=
$refund_id
;
$params
[
"is_del"
]
=
0
;
$result
=
$this
->
oRefundModel
->
selectRefundDetailByOrderNo
(
$field
,
$params
);
$result
=
$this
->
oRefundModel
->
selectRefundDetailByOrderNo
(
$field
,
$params
);
if
(
count
(
$result
)
>
0
)
{
$item
=
$result
[
0
];
$item
=
$result
[
0
];
$item
[
"img_path"
]
=
CHAT_IMG_URL
;
$item
[
"img_arr"
]
=
$this
->
getOImg
(
$item
[
"id"
],
3
);
$item
[
"img_arr"
]
=
$this
->
getOImg
(
$item
[
"id"
],
3
);
return
[
"code"
=>
200
,
"data"
=>
$item
];
}
else
{
return
[
"code"
=>
101
,
"msg"
=>
"没有找到此条退款数据"
];
...
...
@@ -333,20 +334,21 @@ class PayLogService
* @param $bargain_id
* @return bool|float|int
*/
public
function
getPayLogRefundSurplusMoney
(
$bargain_id
)
{
public
function
getPayLogRefundSurplusMoney
(
$bargain_id
)
{
if
(
empty
(
$bargain_id
))
{
return
false
;
}
$pay_id
=
$this
->
payLogModel
->
getFieldColumn
(
'id'
,
[
'bargain_id'
=>
$bargain_id
]);
$pay_id
=
$this
->
payLogModel
->
getFieldColumn
(
'id'
,
[
'bargain_id'
=>
$bargain_id
]);
if
(
empty
(
$pay_id
))
{
return
false
;
}
$money
=
$this
->
payLogModel
->
getSum
(
'money'
,
[
'id'
=>
[
'in'
,
$pay_id
]]);
$money
=
$this
->
payLogModel
->
getSum
(
'money'
,
[
'id'
=>
[
'in'
,
$pay_id
]]);
if
(
$money
>
0
)
{
$refund_money
=
$this
->
oRefundModel
->
getRefundSum
(
'refund_money'
,
[
'pay_log_id'
=>
[
'in'
,
$pay_id
]]);
$result
=
$money
-
$refund_money
;
$refund_money
=
$this
->
oRefundModel
->
getRefundSum
(
'refund_money'
,
[
'pay_log_id'
=>
[
'in'
,
$pay_id
]]);
$result
=
$money
-
$refund_money
;
}
else
{
$result
=
0
;
}
...
...
@@ -357,17 +359,85 @@ class PayLogService
* @param $bargain_id
* @return bool
*/
public
function
checkPayLogAdjustment
(
$bargain_id
)
{
public
function
checkPayLogAdjustment
(
$bargain_id
)
{
if
(
empty
(
$bargain_id
))
{
return
false
;
}
$result
=
false
;
$pay_id
=
$this
->
payLogModel
->
getFieldColumn
(
'id'
,
[
'bargain_id'
=>
$bargain_id
]);
$id
=
$this
->
payLogAdjustmentModel
->
getFieldValue
(
'id'
,
[
'paylog_id'
=>
[
'in'
,
$pay_id
]]);
$pay_id
=
$this
->
payLogModel
->
getFieldColumn
(
'id'
,
[
'bargain_id'
=>
$bargain_id
]);
$id
=
$this
->
payLogAdjustmentModel
->
getFieldValue
(
'id'
,
[
'paylog_id'
=>
[
'in'
,
$pay_id
]]);
if
(
$id
>
0
)
{
$result
=
true
;
}
return
$result
;
}
/**
* 查询所有收款记录
* @param $field
* @param $params
* @param $pageNo
* @param $pageSize
* @param $check_type
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getPayLogList
(
$field
,
$params
,
$pageNo
,
$pageSize
,
$check_type
)
{
$conditions
=
[];
switch
(
$params
[
"search_type"
])
{
case
1
:
$conditions
[
"b.house_id"
]
=
trim
(
$params
[
"keyword"
]);
break
;
case
2
:
$conditions
[
"h.internal_title"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'keyword'
])
.
"%"
);
break
;
case
3
:
$conditions
[
"a.id"
]
=
trim
(
$params
[
"keyword"
]);
break
;
case
4
:
$conditions
[
"a.report_id"
]
=
trim
(
$params
[
"keyword"
]);
break
;
default
:
break
;
}
if
(
isset
(
$params
[
'submit_time_start'
])
&&
isset
(
$params
[
'submit_time_end'
]))
{
$start_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'submit_time_start'
]);
$end_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'submit_time_end'
]);
$conditions
[
'a.create_time'
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
));
}
if
(
isset
(
$params
[
'type'
]))
{
$conditions
[
"a.type"
]
=
$params
[
"type"
];
}
if
(
isset
(
$params
[
'source'
]))
{
$conditions
[
"a.source"
]
=
$params
[
"source"
];
}
if
(
isset
(
$params
[
'is_open'
]))
{
$conditions
[
"a.is_open"
]
=
$params
[
"is_open"
];
}
switch
(
$check_type
)
{
case
0
://
自己的
$conditions
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
break
;
case
1
://
公司
case
2
://
部门
和公司都可以看全部
break
;
case
3
://
门店
$vModel
=
new
VerifyService
();
$agentArr
=
$vModel
->
getAgentsByAgentIdAndType
(
$params
[
"agent_id"
],
$check_type
);
$conditions
[
"a.agent_id"
]
=
array
(
"in"
,
$agentArr
);
break
;
default
:
return
""
;
}
$result
=
$this
->
payLogModel
->
getPayLogList
(
$conditions
,
$field
,
$pageNo
,
$pageSize
);
foreach
(
$result
as
$item
){
}
}
}
\ No newline at end of file
application/model/OPayLogModel.php
View file @
78ddd270
...
...
@@ -631,5 +631,21 @@ class OPayLogModel extends Model
->
find
();
}
public
function
getPayLogList
(
$params
,
$field
,
$page_no
,
$page_size
)
{
$params
[
"a.is_del"
]
=
0
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"g_houses h"
,
"b.house_id = h.id"
,
"left"
)
->
where
(
$params
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
select
();
//echo $this->getLastSql();
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
78ddd270
...
...
@@ -540,28 +540,28 @@ Route::group('index', [
'checkCostFour/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
3
]],
//费用报销审核二审
'checkCostFive/:check_status'
=>
[
'index/Cost/checkCost'
,
[
'method'
=>
'POST'
],
[
'check_status'
=>
4
]],
//费用报销审核三审
'getDetailCost'
=>
[
'index/Cost/getDetailCost'
,
[
'method'
=>
'GET'
]],
//费用报销详情
'delStoreFeeImage'
=>
[
'index/StoreFee/delStoreFeeImage'
,
[
'method'
=>
'POST'
]],
//删除图片
'getCostDetailList'
=>
[
'index/CostDetail/getCostDetailList'
,
[
'method'
=>
'POST|GET'
]],
'getCostDetailListExcel'
=>
[
'index/CostDetail/getCostDetailListExcel'
,
[
'method'
=>
'POST|GET'
]],
'delStoreFeeImage'
=>
[
'index/StoreFee/delStoreFeeImage'
,
[
'method'
=>
'POST'
]],
//删除图片
'getCostDetailList'
=>
[
'index/CostDetail/getCostDetailList'
,
[
'method'
=>
'POST|GET'
]],
'getCostDetailListExcel'
=>
[
'index/CostDetail/getCostDetailListExcel'
,
[
'method'
=>
'POST|GET'
]],
'getAllStoreCost'
=>
[
'index/CostDetail/getAllStoreCost'
,
[
'method'
=>
'POST|GET'
]],
'getCostInfo'
=>
[
'index/CostDetail/getCostInfo'
,
[
'method'
=>
'POST|GET'
]],
'addApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//新增报销申请
'editApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//修改报销申请
'getApplyForFeeStore'
=>
[
'index/StoreFee/getApplyForFeeStore'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'addFeeImage'
=>
[
'index/StoreFee/addFeeImage'
,
[
'method'
=>
'POST'
]],
//新增报销申请图片
'getStoreOffice'
=>
[
'index/Store/getStoreOffice'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'creationStoreFee'
=>
[
'index/StoreFee/creationStoreFee'
,
[
'method'
=>
'POST|GET'
]
],
'getStoreFeeDetail'
=>
[
'index/StoreFee/getStoreFeeDetail'
,
[
'method'
=>
'POST|GET'
]
],
'getStoreCostParameterList'
=>
[
'index/CostParameter/getStoreCostParameterList'
,
[
'method'
=>
'POST|GET'
]
],
'editCostParameter'
=>
[
'index/CostParameter/editCostParameter'
,
[
'method'
=>
'POST|GET'
]
],
'checkCostParameter'
=>
[
'index/CostParameter/checkCostParameter'
,
[
'method'
=>
'POST'
]
],
//核对参数
'getCostParameter'
=>
[
'index/CostParameter/getCostParameter'
,
[
'method'
=>
'GET'
]
],
//核对记录
'getCompanyCostParameterList'
=>
[
'index/CostParameter/getCompanyCostParameterList'
,
[
'method'
=>
'POST|GET'
]
],
'editCompanyData'
=>
[
'index/CostParameter/editCompanyData'
,
[
'method'
=>
'POST|GET'
]
],
'editDiscounts'
=>
[
'index/CostParameter/editDiscounts'
,
[
'method'
=>
'POST|GET'
]
],
'getCostInfo'
=>
[
'index/CostDetail/getCostInfo'
,
[
'method'
=>
'POST|GET'
]],
'addApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//新增报销申请
'editApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//修改报销申请
'getApplyForFeeStore'
=>
[
'index/StoreFee/getApplyForFeeStore'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'addFeeImage'
=>
[
'index/StoreFee/addFeeImage'
,
[
'method'
=>
'POST'
]],
//新增报销申请图片
'getStoreOffice'
=>
[
'index/Store/getStoreOffice'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'creationStoreFee'
=>
[
'index/StoreFee/creationStoreFee'
,
[
'method'
=>
'POST|GET'
]
],
'getStoreFeeDetail'
=>
[
'index/StoreFee/getStoreFeeDetail'
,
[
'method'
=>
'POST|GET'
]
],
'getStoreCostParameterList'
=>
[
'index/CostParameter/getStoreCostParameterList'
,
[
'method'
=>
'POST|GET'
]
],
'editCostParameter'
=>
[
'index/CostParameter/editCostParameter'
,
[
'method'
=>
'POST|GET'
]
],
'checkCostParameter'
=>
[
'index/CostParameter/checkCostParameter'
,
[
'method'
=>
'POST'
]
],
//核对参数
'getCostParameter'
=>
[
'index/CostParameter/getCostParameter'
,
[
'method'
=>
'GET'
]
],
//核对记录
'getCompanyCostParameterList'
=>
[
'index/CostParameter/getCompanyCostParameterList'
,
[
'method'
=>
'POST|GET'
]
],
'editCompanyData'
=>
[
'index/CostParameter/editCompanyData'
,
[
'method'
=>
'POST|GET'
]
],
'editDiscounts'
=>
[
'index/CostParameter/editDiscounts'
,
[
'method'
=>
'POST|GET'
]
],
]);
...
...
@@ -860,7 +860,7 @@ Route::group('broker', [
'center'
=>
[
'api_broker/MyCenter/center'
,
[
'method'
=>
'get|post'
]],
'centerV2'
=>
[
'api_broker/MyCenter/centerV2'
,
[
'method'
=>
'get|post'
]],
'centerV2'
=>
[
'api_broker/MyCenter/centerV2'
,
[
'method'
=>
'get|post'
]],
// 'houseEdit' => [ 'api_broker/shop/edit', [ 'method' => 'get|post' ] ], //编辑商铺
// 'houseEditV2' => [ 'api_broker/shop/editV2', [ 'method' => 'get|post' ] ], //编辑商铺
'houseEditV2'
=>
[
'api_broker/shop/edit'
,
[
'method'
=>
'get|post'
]],
//编辑商铺
...
...
@@ -977,6 +977,7 @@ Route::group('broker', [
'getBeForNum'
=>
[
'api_broker/PayLog/getBeForNum'
,
[
'method'
=>
'get|post'
]],
'adjustment'
=>
[
'api_broker/PayLog/adjustment'
,
[
'method'
=>
'get|post'
]],
'getPayLogList'
=>
[
'api_broker/PayLog/getPayLogList'
,
[
'method'
=>
'get|post'
]],
//原生客户详情
'getUserLabels'
=>
[
'api_broker/User/getUserLabels'
,
[
'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