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
1a1dd6b1
Commit
1a1dd6b1
authored
Aug 15, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的-学习工作
parent
e150708e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
68 deletions
+41
-68
UploadWorkLearning.php
application/api_broker/controller/UploadWorkLearning.php
+40
-0
WorkLearningMy.php
application/api_broker/controller/WorkLearningMy.php
+0
-67
route.php
application/route.php
+1
-1
No files found.
application/api_broker/controller/UploadWorkLearning.php
View file @
1a1dd6b1
...
...
@@ -63,4 +63,43 @@ class UploadWorkLearning extends Basic
}
return
$this
->
response
(
$code
,
$msg
,
$img_name
);
}
/**
* 我的-0素质测评 1方法分析 2价值观考核
*
* @param $params
* @param $type
* @return mixed
*/
public
function
getWorkLearningList
()
{
$page_no
=
empty
(
$this
->
params
[
'page_no'
])
?
1
:
$this
->
params
[
'page_no'
];
$page_size
=
empty
(
$this
->
params
[
'page_size'
])
?
10
:
$this
->
params
[
'page_size'
];
// 经纪人筛选
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'agent_id'
]
=
$this
->
params
[
'agent_id'
];
}
$where
[
'agent_id'
]
=
1
;
$where
[
'type'
]
=
$this
->
params
[
'type'
];
//0素质测评 1方法分析 2价值观考核
$where
[
'is_del'
]
=
0
;
try
{
$work
=
new
RWorkLearningModel
();
$list
=
$work
->
getList
(
$page_no
,
$page_size
,
'id desc'
,
'create_time,img_url'
,
$where
);
foreach
(
$list
as
$k
=>
$v
)
{
$list
[
$k
][
'img_url'
]
=
'static/week_work_img/'
.
$v
[
'img_url'
];
$list
[
$k
][
'create_time'
]
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'create_time'
]));
}
$result
[
'data'
]
=
$list
;
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
''
;
}
catch
(
\Exception
$e
)
{
$result
[
'code'
]
=
101
;
$result
[
'msg'
]
=
'内部错误:'
.
$e
->
getMessage
();
}
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
}
\ No newline at end of file
application/api_broker/controller/WorkLearningMy.php
deleted
100644 → 0
View file @
e150708e
<?php
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\model\RWorkLearningModel
;
class
WorkLearningMy
extends
Basic
{
/**
* 我的-0素质测评 1方法分析 2价值观考核
*
* @param $params
* @param $type
* @return mixed
*/
public
function
getWorkLearningList
(
$params
,
$type
)
{
$page_no
=
empty
(
$this
->
params
[
'page_no'
])
?
1
:
$this
->
params
[
'page_no'
];
$page_size
=
empty
(
$this
->
params
[
'page_size'
])
?
10
:
$this
->
params
[
'page_size'
];
// 时间筛选
if
(
!
empty
(
$params
[
'start_date'
])
&&
!
empty
(
$params
[
'end_date'
]))
{
$where
[
'a.create_time'
]
=
[
'between'
,
[
$params
[
'start_date'
]
.
' 00:00:00'
,
$params
[
'end_date'
]
.
' 23:59:59'
]];
}
// 部门筛选
if
(
!
empty
(
$params
[
'district_id'
]))
{
$where
[
'b.district_id'
]
=
$params
[
'district_id'
];
}
// 门店筛选
if
(
!
empty
(
$params
[
'store_id'
]))
{
$where
[
'b.store_id'
]
=
$params
[
'store_id'
];
}
// 经纪人筛选
if
(
!
empty
(
$params
[
'agent_id'
]))
{
$where
[
'b.id'
]
=
$params
[
'agent_id'
];
}
// 日报周报筛选 10业务员 20店长 30总监
if
(
!
empty
(
$params
[
'site_id'
]))
{
$where
[
'b.site_id'
]
=
$params
[
'site_id'
];
}
$where
[
'a.type'
]
=
$type
;
//0素质测评 1方法分析 2价值观考核
$where
[
'a.is_del'
]
=
0
;
try
{
$work
=
new
RWorkLearningModel
();
$field
=
'a.create_time,a.img_url,b.agent_name'
;
$list
=
$work
->
getWordAgentList
(
$page_no
,
$page_size
,
'id desc'
,
$field
,
$where
);
$result
[
'data'
][
'list'
]
=
$list
;
$result
[
'data'
][
'total'
]
=
$work
->
getWorkAgentListTotal
(
$where
);
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
''
;
}
catch
(
\Exception
$e
)
{
$result
[
'code'
]
=
101
;
$result
[
'msg'
]
=
'内部错误:'
.
$e
->
getMessage
();
}
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
1a1dd6b1
...
...
@@ -1048,7 +1048,7 @@ Route::group('broker', [
'getApplyForFeeStore'
=>
[
'api_broker/StoreFee/getApplyForFeeStore'
,
[
'method'
=>
'GET'
]],
//获取门店地址
'deviceList'
=>
[
'api_broker/Broker/deviceList'
,
[
'method'
=>
'GET'
]],
//设备列表
'uploadWorkLearning'
=>
[
'api_broker/UploadWorkLearning/workLearningImage'
,
[
'method'
=>
'POST'
]],
//保存0素质测评 1方法分析 2价值观考核图片
'getWorkLearningList'
=>
[
'api_broker/
WorkLearningMy
/getWorkLearningList'
,
[
'method'
=>
'GET'
]],
//保存0素质测评 1方法分析 2价值观考核图片
'getWorkLearningList'
=>
[
'api_broker/
UploadWorkLearning
/getWorkLearningList'
,
[
'method'
=>
'GET'
]],
//保存0素质测评 1方法分析 2价值观考核图片
'subletList'
=>
[
'api_broker/Sublet/subletList'
,
[
'method'
=>
'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