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
a24631ba
Commit
a24631ba
authored
Mar 23, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监督执行
parent
e5ceb9ad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
143 additions
and
1 deletion
+143
-1
OrderLog.php
application/api_broker/controller/OrderLog.php
+48
-0
Supervise.php
application/api_broker/controller/Supervise.php
+75
-0
SSupervision.php
application/model/SSupervision.php
+17
-0
route.php
application/route.php
+3
-1
No files found.
application/api_broker/controller/OrderLog.php
View file @
a24631ba
...
@@ -382,5 +382,52 @@ class OrderLog extends Basic
...
@@ -382,5 +382,52 @@ class OrderLog extends Basic
}
}
/**
* 新增分佣提成
*
* @return \think\Response
* @throws \think\exception\DbException
*/
public
function
addBargain
()
{
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$data
[
'data'
]
=
[];
if
(
empty
(
$this
->
params
[
'id'
]))
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Id is null.'
;
}
else
{
$bargain
=
new
OBargainModel
();
$bargain_data
=
$bargain
->
get
(
$this
->
params
[
'id'
]);
if
(
empty
(
$bargain_data
))
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Don\'t have info.'
;
}
else
{
$insert_data
[
'report_id'
]
=
$bargain_data
[
'report_id'
];
$insert_data
[
'order_id'
]
=
$bargain_data
[
'order_id'
];
$insert_data
[
'order_no'
]
=
$bargain_data
[
'order_no'
];
$insert_data
[
'trade_type'
]
=
$bargain_data
[
'trade_type'
];
$insert_data
[
'submit_agent_id'
]
=
$bargain_data
[
'submit_agent_id'
];
$insert_data
[
'price'
]
=
$bargain_data
[
'price'
];
$insert_data
[
'commission'
]
=
$bargain_data
[
'commission'
];
$insert_data
[
'check_status'
]
=
$bargain_data
[
'check_status'
];
$insert_data
[
'status'
]
=
$bargain_data
[
'status'
];
$insert_data
[
'source'
]
=
1
;
$insert_data
[
'role'
]
=
empty
(
$this
->
params
[
'role'
])
?
0
:
$this
->
params
[
'role'
];
$insert_data
[
'scale_fee'
]
=
empty
(
$this
->
params
[
'scale_fee'
])
?
0
:
$this
->
params
[
'scale_fee'
];
$insert_data
[
'practical_fee'
]
=
empty
(
$this
->
params
[
'practical_fee'
])
?
0
:
$this
->
params
[
'practical_fee'
];
$insert_data
[
'father_id'
]
=
empty
(
$this
->
params
[
'id'
])
?
0
:
$this
->
params
[
'id'
];
$insert_data
[
'scale'
]
=
empty
(
$this
->
params
[
'scale'
])
?
0
:
$this
->
params
[
'scale'
];
$data
[
'data'
][
'id'
]
=
$bargain
->
insertBargain
(
$insert_data
);
if
(
$data
[
'data'
]
==
0
)
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Add the failure.'
;
}
}
}
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
}
\ No newline at end of file
application/api_broker/controller/Supervise.php
0 → 100644
View file @
a24631ba
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/3/23
* Time: 18:06
*/
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\model\SSupervision
;
class
Supervise
extends
Basic
{
/**
* 监督执行
*
* @return \think\Response
*/
public
function
add
()
{
$supervision
=
new
SSupervision
();
if
(
empty
(
$this
->
params
[
'id'
]))
{
return
$this
->
response
(
101
,
'Id is null'
);
}
$data
[
'id'
]
=
''
;
$data
[
'content'
]
=
$this
->
params
[
'content'
];
$data
[
'longitude'
]
=
$this
->
params
[
'longitude'
];
$data
[
'latitude'
]
=
$this
->
params
[
'latitude'
];
$data
[
'address'
]
=
$this
->
params
[
'address'
];
$data
[
'agent_id'
]
=
$this
->
params
[
'agent_id'
];
$data
[
'district_id'
]
=
$this
->
params
[
'district_id'
];
$data
[
'store_id'
]
=
$this
->
params
[
'store_id'
];
$supervision
->
editData
(
$data
,
$this
->
params
[
'id'
]);
return
$this
->
response
(
200
,
''
,
[
'id'
=>
$this
->
params
[
'id'
]]);
}
/**
* 上传监督执行图片
*
* @return \think\Response
*/
public
function
uploadSuperviseFile
()
{
$data
[
'status'
]
=
101
;
$data
[
'msg'
]
=
''
;
$data
[
'data'
]
=
''
;
$file
=
request
()
->
file
(
'file'
);
if
(
$file
){
$path
=
ROOT_PATH
.
'public'
.
DS
.
'resource'
.
DS
.
'lib'
.
DS
.
'Attachments'
.
DS
.
'images'
.
DS
.
'supervise'
;
$info
=
$file
->
validate
([
'size'
=>
1024000
,
'ext'
=>
'jpg,png'
])
->
move
(
$path
);
if
(
$info
){
$img_path
=
$info
->
getSaveName
();
//生成的图片路径
$data
[
'img_url'
]
=
$img_path
;
$supervision
=
new
SSupervision
();
$supervision
->
editData
(
$data
);
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
'上传成功'
;
$data
[
'data'
]
=
[
'file_name'
=>
CK_IMG_URL
.
'images/supervise/'
.
$img_path
,
'id'
=>
$supervision
->
id
];
}
else
{
// 上传失败获取错误信息
$data
[
'msg'
]
=
$file
->
getError
();
}
}
else
{
$data
[
'msg'
]
=
'没有该文件'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
\ No newline at end of file
application/model/SSupervision.php
0 → 100644
View file @
a24631ba
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/3/23
* Time: 17:28
*/
namespace
app\model
;
class
SSupervision
extends
BaseModel
{
protected
$table
=
's_supervision'
;
}
\ No newline at end of file
application/route.php
View file @
a24631ba
...
@@ -366,7 +366,9 @@ Route::group('broker', [
...
@@ -366,7 +366,9 @@ Route::group('broker', [
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'setReportContent'
=>
[
'api_broker/Statement/setReportContent'
,
[
'method'
=>
'get|post'
]],
//保存日报周报四个字段
'setReportContent'
=>
[
'api_broker/Statement/setReportContent'
,
[
'method'
=>
'get|post'
]],
//保存日报周报四个字段
'getWeekOrDay'
=>
[
'api_broker/Statement/getWeekOrDay'
,
[
'method'
=>
'get'
]],
//获取日报或者周报
'getWeekOrDay'
=>
[
'api_broker/Statement/getWeekOrDay'
,
[
'method'
=>
'get'
]],
//获取日报或者周报
'uploadSuperviseFile'
=>
[
'api_broker/Supervise/uploadSuperviseFile'
,
[
'method'
=>
'post'
]],
//监督执行上传图片
'add_supervise'
=>
[
'api_broker/Supervise/add'
,
[
'method'
=>
'post'
]],
//监督执行
'addBargain'
=>
[
'api_broker/OrderLog/addBargain'
,
[
'method'
=>
'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