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
8d0e45bb
Commit
8d0e45bb
authored
May 31, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业态成交报告
parent
4f17df1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
OrderLog.php
application/api_broker/controller/OrderLog.php
+14
-12
OrderLogService.php
application/api_broker/service/OrderLogService.php
+6
-4
No files found.
application/api_broker/controller/OrderLog.php
View file @
8d0e45bb
...
...
@@ -210,7 +210,7 @@ class OrderLog extends Basic
if
(
!
isset
(
$params
[
"submit_agent_id"
])
||
!
isset
(
$params
[
"submit_agent_name"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
||
!
isset
(
$params
[
"trade_type"
])
||
//!isset($params["house_number"]) || !isset($params["is_open"]) ||
//!isset($params["house_number"]) || !isset($params["is_open"]) ||
!isset($params["industry_type"]) ||
!
isset
(
$params
[
"price"
])
||
!
isset
(
$params
[
"commission"
])
||
!
isset
(
$params
[
"commission_arr"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
...
...
@@ -235,14 +235,15 @@ class OrderLog extends Basic
{ "role": 11, "agent_id" : 12, "scale": 13, "scale_fee" : 1112 }]',
);*/
$house_number
=
!
isset
(
$params
[
"house_number"
])
?
null
:
$params
[
"house_number"
];
$is_open
=
!
isset
(
$params
[
"is_open"
])
?
0
:
$params
[
"is_open"
];
$house_number
=
!
isset
(
$params
[
"house_number"
])
?
null
:
$params
[
"house_number"
];
$is_open
=
!
isset
(
$params
[
"is_open"
])
?
0
:
$params
[
"is_open"
];
$industry_type
=
!
isset
(
$params
[
"industry_type"
])
?
null
:
$params
[
"industry_type"
];
$params
[
"commission_arr"
]
=
json_decode
(
$params
[
"commission_arr"
],
true
);
$is_ok
=
$this
->
service_
->
addBargain
(
$params
[
"submit_agent_id"
],
$params
[
"submit_agent_name"
],
$params
[
"report_id"
],
$params
[
"order_id"
],
$params
[
"order_no"
],
$params
[
"trade_type"
],
$params
[
"price"
],
$params
[
"commission"
],
$params
[
"commission_arr"
],
$house_number
,
$is_open
);
$params
[
"trade_type"
],
$params
[
"price"
],
$params
[
"commission"
],
$params
[
"commission_arr"
],
$house_number
,
$is_open
,
$industry_type
);
if
(
$is_ok
>
0
)
{
//todo 更改用户信息 求租->已租
...
...
@@ -523,20 +524,20 @@ class OrderLog extends Basic
$data
[
'msg'
]
=
""
;
$data
[
'data'
]
=
[];
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'agent_id'
])
)
{
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'agent_id'
]))
{
return
$this
->
response
(
101
,
'Id or agent_id or source is null.'
);
}
$source
=
empty
(
$this
->
params
[
'source'
])
?
0
:
$this
->
params
[
'source'
];
$source
=
empty
(
$this
->
params
[
'source'
])
?
0
:
$this
->
params
[
'source'
];
$bargain
=
new
OBargainModel
();
$data
[
'data'
]
=
$bargain
->
addBargainCommission
(
$this
->
params
[
'id'
],
$this
->
userId
,
$this
->
params
[
'agent_id'
],
$this
->
params
[
'role'
],
$this
->
params
[
'scale_fee'
],
$this
->
params
[
'scale'
],
$source
);
$this
->
params
[
'role'
],
$this
->
params
[
'scale_fee'
],
$this
->
params
[
'scale'
],
$source
);
if
(
$data
[
'data'
]
==
0
)
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Add the failure.'
;
}
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
[
"id"
=>
$data
[
'data'
]
]);
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
[
"id"
=>
$data
[
'data'
]
]);
}
/**
...
...
@@ -621,10 +622,11 @@ class OrderLog extends Basic
$oBargainModel
=
new
OBargainModel
();
$data
=
$oBargainModel
->
selectBargainByOrderNo
(
$field
,
$where_
,
"id desc"
);
if
(
count
(
$data
)
>
0
)
{
$list
[
"bargain_id"
]
=
$data
[
0
][
"id"
];
$list
[
"house_number"
]
=
$data
[
0
][
"house_number"
];
$list
[
"commission"
]
=
$data
[
0
][
"commission"
];
$list
[
"is_open"
]
=
$data
[
0
][
"is_open"
];
$list
[
"bargain_id"
]
=
$data
[
0
][
"id"
];
$list
[
"house_number"
]
=
$data
[
0
][
"house_number"
];
$list
[
"commission"
]
=
$data
[
0
][
"commission"
];
$list
[
"is_open"
]
=
$data
[
0
][
"is_open"
];
$list
[
"industry_type"
]
=
$data
[
0
][
"industry_type"
];
return
$this
->
response
(
"200"
,
"request success"
,
$list
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
...
...
application/api_broker/service/OrderLogService.php
View file @
8d0e45bb
...
...
@@ -123,13 +123,14 @@ class OrderLogService
* @param $commission_arr
* @param $house_number
* @param $is_open
* @param $industry_type
* @return int|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
addBargain
(
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$commission_arr
,
$house_number
,
$is_open
)
$commission
,
$commission_arr
,
$house_number
,
$is_open
,
$industry_type
)
{
$bargain_arr
=
[];
$father_id
=
0
;
...
...
@@ -139,11 +140,11 @@ class OrderLogService
&&
isset
(
$commission_val
[
"scale_fee"
]))
{
if
(
$father_id
==
0
)
{
$params
=
$this
->
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
);
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
,
$industry_type
);
$father_id
=
$this
->
bargainModel
->
insertBargain
(
$params
);
}
else
{
array_push
(
$bargain_arr
,
$this
->
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
));
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
,
$industry_type
));
}
}
array_push
(
$agent_arr
,
[
$commission_val
[
"agent_id"
]
]);
...
...
@@ -165,7 +166,7 @@ class OrderLogService
}
private
function
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
)
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
,
$industry_type
)
{
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"father_id"
]
=
$father_id
;
...
...
@@ -184,6 +185,7 @@ class OrderLogService
$arr
[
"is_open"
]
=
$is_open
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"industry_type"
]
=
$industry_type
;
return
$arr
;
}
...
...
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