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
bda91135
Commit
bda91135
authored
Aug 30, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d011bc95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
48 deletions
+52
-48
OrderLogService.php
application/api_broker/service/OrderLogService.php
+52
-48
No files found.
application/api_broker/service/OrderLogService.php
View file @
bda91135
...
...
@@ -87,7 +87,7 @@ class OrderLogService
$redis_service
=
new
RedisCacheService
();
$agent_data
=
$redis_service
->
getRedisCache
(
2
,
$agent_id
);
$store_id
=
$agent_data
[
'store_id'
];
if
(
$store_id
<=
0
)
{
if
(
$store_id
<=
0
)
{
return
-
3
;
}
foreach
(
$collecting_bill
as
$collecting
)
{
...
...
@@ -127,7 +127,7 @@ class OrderLogService
if
(
$pay_id
>
0
)
{
$payLogService
=
new
PayLogService
();
$payLogService
->
addAdjustment
(
$father_id
,
$pay_id
,
$money
,
$type
,
$agent_id
,
$store_id
);
$payLogService
->
addAdjustment
(
$father_id
,
$pay_id
,
$money
,
$type
,
$agent_id
,
$store_id
);
}
$pushMarchIn
=
new
PushMessageService
();
...
...
@@ -291,30 +291,30 @@ class OrderLogService
$received_money
,
$type_ext
,
$bargain_id
,
$is_open
,
$store_id
)
{
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"father_id"
]
=
$father_id
;
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"source"
]
=
$source
;
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"reckon_in_store"
]
=
$store_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"type"
]
=
$collecting_arr
[
"type"
];
$arr
[
"pay_type"
]
=
$collecting_arr
[
"pay_type"
];
$arr
[
"money"
]
=
$collecting_arr
[
"money"
];
$arr
[
"house_number"
]
=
$house_number
;
$arr
[
"industry_type"
]
=
$industry_type
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"receipt_number"
]
=
$receipt_number
;
$arr
[
"transfer_name"
]
=
$transfer_name
;
$arr
[
"transfer_img"
]
=
$transfer_img
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"is_dividend"
]
=
$is_dividend
;
$arr
[
"received_money"
]
=
$received_money
;
$arr
[
"type_ext"
]
=
$type_ext
;
$arr
[
"bargain_id"
]
=
$bargain_id
;
$arr
[
"is_open"
]
=
$is_open
;
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"father_id"
]
=
$father_id
;
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"source"
]
=
$source
;
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"reckon_in_store"
]
=
$store_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"type"
]
=
$collecting_arr
[
"type"
];
$arr
[
"pay_type"
]
=
$collecting_arr
[
"pay_type"
];
$arr
[
"money"
]
=
$collecting_arr
[
"money"
];
$arr
[
"house_number"
]
=
$house_number
;
$arr
[
"industry_type"
]
=
$industry_type
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"receipt_number"
]
=
$receipt_number
;
$arr
[
"transfer_name"
]
=
$transfer_name
;
$arr
[
"transfer_img"
]
=
$transfer_img
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"is_dividend"
]
=
$is_dividend
;
$arr
[
"received_money"
]
=
$received_money
;
$arr
[
"type_ext"
]
=
$type_ext
;
$arr
[
"bargain_id"
]
=
$bargain_id
;
$arr
[
"is_open"
]
=
$is_open
;
if
(
$income_time
)
{
$arr
[
"income_time"
]
=
date
(
"Y-m-d H:i:s"
,
$income_time
);
}
...
...
@@ -1094,17 +1094,17 @@ class OrderLogService
$sort
=
0
;
//todo 1.验证订单是否存在
$oReportModel
=
new
OReportModel
();
$oMarchInModel
=
new
OMarchInModel
();
$oPayLogModel
=
new
OPayLogModel
();
$oRefundModel
=
new
ORefundModel
();
$oBargainModel
=
new
OBargainModel
();
$oReportModel
=
new
OReportModel
();
$oMarchInModel
=
new
OMarchInModel
();
$oPayLogModel
=
new
OPayLogModel
();
$oRefundModel
=
new
ORefundModel
();
$oBargainModel
=
new
OBargainModel
();
$field_report
=
"a.id,a.user_id,a.create_time,a.predict_see_time,a.intro,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$reportData
=
$oReportModel
->
selectReportByUserId
(
$field_report
,
[
"house_id"
=>
$house_id
]);
$order_ids
=
$report_ids
=
""
;
$order_ids
=
$report_ids
=
""
;
//报备
foreach
(
$reportData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"report"
;
...
...
@@ -1118,9 +1118,9 @@ class OrderLogService
$report_ids
.=
$v
[
"id"
]
.
","
;
}
$order_ids
=
rtrim
(
$order_ids
,
","
);
$report_ids
=
rtrim
(
$report_ids
,
","
);
$orderParams
[
"order_id"
]
=
array
(
"in"
,
$order_ids
);
$order_ids
=
rtrim
(
$order_ids
,
","
);
$report_ids
=
rtrim
(
$report_ids
,
","
);
$orderParams
[
"order_id"
]
=
array
(
"in"
,
$order_ids
);
$reportParams
[
"report_id"
]
=
array
(
"in"
,
$report_ids
);
...
...
@@ -1135,8 +1135,9 @@ class OrderLogService
$marchInData
=
$oMarchInModel
->
getMarchInListByOrderId
(
$field_march_in
,
$orderParams
);
if
(
count
(
$marchInData
)
>
0
)
{
foreach
(
$marchInData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"march_in"
;
$v
[
"step"
]
=
"进场【客户ID:"
.
$tree
[
$v
[
"report_id"
]][
"user_id"
]
.
"】"
;
$v
[
"step_name"
]
=
"march_in"
;
$v
[
"user_id"
]
=
$tree
[
$v
[
"report_id"
]][
"user_id"
];
$v
[
"step"
]
=
"进场【客户ID:"
.
$tree
[
$v
[
"report_id"
]][
"user_id"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -1147,8 +1148,9 @@ class OrderLogService
$payLogData
=
$oPayLogModel
->
getPayLogByOrderId
(
$field_pay_log
,
$orderParams
);
if
(
count
(
$payLogData
)
>
0
)
{
foreach
(
$payLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"step"
]
=
"收款【客户ID:"
.
$tree
[
$v
[
"report_id"
]][
"user_id"
]
.
"】"
;
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"user_id"
]
=
$tree
[
$v
[
"report_id"
]][
"user_id"
];
$v
[
"step"
]
=
"收款【客户ID:"
.
$tree
[
$v
[
"report_id"
]][
"user_id"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -1160,8 +1162,9 @@ class OrderLogService
$refundData
=
$oRefundModel
->
getRefundByOrderId
(
$field_refund
,
$orderParams
);
if
(
count
(
$refundData
)
>
0
)
{
foreach
(
$refundData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"refund"
;
$v
[
"step"
]
=
"退款【客户ID:"
.
$tree
[
$v
[
"report_id"
]][
"user_id"
]
.
"】"
;
$v
[
"step_name"
]
=
"refund"
;
$v
[
"user_id"
]
=
$tree
[
$v
[
"report_id"
]][
"user_id"
];
$v
[
"step"
]
=
"退款【客户ID:"
.
$tree
[
$v
[
"report_id"
]][
"user_id"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -1171,8 +1174,9 @@ class OrderLogService
$bargainData
=
$oBargainModel
->
getBargainByOrderId
(
$field_bargain
,
$orderParams
);
if
(
count
(
$bargainData
)
>
0
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"bargain"
;
$v
[
"step"
]
=
"成交报告【客户ID:"
.
$tree
[
$v
[
"report_id"
]][
"user_id"
]
.
"】"
;
$v
[
"step_name"
]
=
"bargain"
;
$v
[
"user_id"
]
=
$tree
[
$v
[
"report_id"
]][
"user_id"
];
$v
[
"step"
]
=
"成交报告【客户ID:"
.
$tree
[
$v
[
"report_id"
]][
"user_id"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -1468,12 +1472,12 @@ class OrderLogService
// $params["ids"] = $ids;
// }
$vip
=
new
VipService
();
//0:有权限 1:无权限
$vip
=
new
VipService
();
//0:有权限 1:无权限
$vip_house
=
$vip
->
checkRule
(
$agent_id
,
'index/inspectionRecordAll/3'
);
if
(
$vip_house
==
1
)
{
$aService
=
new
VerifyService
();
$ids
=
$aService
->
getAgentsByAgentId
(
$agent_id
);
$params
[
"ids"
]
=
$ids
;
if
(
$vip_house
==
1
)
{
$aService
=
new
VerifyService
();
$ids
=
$aService
->
getAgentsByAgentId
(
$agent_id
);
$params
[
"ids"
]
=
$ids
;
}
$bargainModel
=
new
OBargainModel
();
...
...
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