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
0f495107
Commit
0f495107
authored
Mar 23, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存日报周报四个字段
parent
949ac0fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
0 deletions
+53
-0
Statement.php
application/api_broker/controller/Statement.php
+36
-0
RAgentNote.php
application/model/RAgentNote.php
+16
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Statement.php
View file @
0f495107
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\StatementService
;
use
app\api_broker\service\StatementService
;
use
app\model\RAgentNote
;
use
app\model\RAgentReport
;
use
app\model\RAgentReport
;
use
think\Exception
;
use
think\Exception
;
use
think\Request
;
use
think\Request
;
...
@@ -106,4 +107,38 @@ class Statement extends Basic
...
@@ -106,4 +107,38 @@ class Statement extends Basic
return
$this
->
response
(
$code
,
$msg
);
return
$this
->
response
(
$code
,
$msg
);
}
}
/**
* 保存周报日报四个字段
*
* @return \think\Response
* @throws \think\exception\DbException
*/
public
function
setReportContent
()
{
$code
=
200
;
$msg
=
''
;
$data
=
[];
$note
=
new
RAgentNote
();
if
(
$this
->
request
->
isGet
())
{
$data
=
$note
->
get
(
$this
->
agentId
);
}
else
{
$save_data
[
'agent_id'
]
=
$this
->
agentId
;
$save_data
[
'performance'
]
=
$this
->
params
[
'performance'
];
$save_data
[
'person'
]
=
$this
->
params
[
'person'
];
$save_data
[
'work'
]
=
$this
->
params
[
'work'
];
$save_data
[
'make_money'
]
=
$this
->
params
[
'make_money'
];
if
(
empty
(
$this
->
params
[
'id'
]))
{
$result
=
$note
->
editData
(
$save_data
);
}
else
{
$result
=
$note
->
editData
(
$save_data
,
$this
->
params
[
'id'
]);
}
if
(
!
$result
)
{
$code
=
101
;
$msg
=
'添加失败'
;
}
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
}
\ No newline at end of file
application/model/RAgentNote.php
0 → 100644
View file @
0f495107
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/3/23
* Time: 15:34
*/
namespace
app\model
;
class
RAgentNote
extends
BaseModel
{
}
\ No newline at end of file
application/route.php
View file @
0f495107
...
@@ -357,6 +357,7 @@ Route::group('broker', [
...
@@ -357,6 +357,7 @@ Route::group('broker', [
'selectPerformanceByTime'
=>
[
'api_broker/Performance/selectPerformanceByTime'
,
[
'method'
=>
'get'
]],
'selectPerformanceByTime'
=>
[
'api_broker/Performance/selectPerformanceByTime'
,
[
'method'
=>
'get'
]],
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'setReportContent'
=>
[
'api_broker/Statement/setReportContent'
,
[
'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