Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aic_duty_strategy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
yinxiaoling
aic_duty_strategy
Commits
f4895371
Commit
f4895371
authored
May 18, 2020
by
yinxiaoling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
为空处理
parent
3103a120
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
5 deletions
+49
-5
CreatedTaskCommand.php
app/Console/Commands/CreatedTaskCommand.php
+42
-0
Kernel.php
app/Console/Kernel.php
+2
-1
StrategyTaskController.php
app/Http/Controllers/strategy/StrategyTaskController.php
+5
-4
No files found.
app/Console/Commands/CreatedTaskCommand.php
0 → 100644
View file @
f4895371
<?php
namespace
App\Console\Commands
;
use
Illuminate\Console\Command
;
class
CreatedTaskCommand
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'command:CreatedTaskCommand'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'每月1号创建任务'
;
/**
* Create a new command instance.
*
* @return void
*/
public
function
__construct
()
{
parent
::
__construct
();
}
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
//
}
}
app/Console/Kernel.php
View file @
f4895371
...
...
@@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected
$commands
=
[
//
Commands\CreatedTaskCommand
::
class
,
//流程录音上传ftp服务器
];
/**
...
...
@@ -26,6 +26,7 @@ class Kernel extends ConsoleKernel
{
// $schedule->command('inspire')
// ->hourly();
$schedule
->
command
(
"command:CreatedTaskCommand"
)
->
cron
(
'1 6 * * *'
);
}
/**
...
...
app/Http/Controllers/strategy/StrategyTaskController.php
View file @
f4895371
...
...
@@ -48,11 +48,12 @@ class StrategyTaskController extends Controller
}
else
{
$strategyInfo
=
$strategyInfo
->
orderBy
(
'call_date'
,
'desc'
)
->
paginate
(
$pageSize
)
->
toArray
();
}
$listInfo
=
[];
foreach
(
$strategyInfo
[
'data'
]
as
$k
=>
$v
){
$strategyInfo
[
'data'
][
$k
][
'project_name'
]
=
isset
(
$projectArr
[
$v
[
'project_sn'
]])
?
$projectArr
[
$v
[
'project_sn'
]]
:
''
;
$strategyInfo
[
'data'
][
$k
][
'is_created_name'
]
=
$v
[
'is_created'
]
==
0
?
'未建'
:
'已建'
;
if
(
!
empty
(
$strategyInfo
)){
foreach
(
$strategyInfo
[
'data'
]
as
$k
=>
$v
){
$strategyInfo
[
'data'
][
$k
][
'project_name'
]
=
isset
(
$projectArr
[
$v
[
'project_sn'
]])
?
$projectArr
[
$v
[
'project_sn'
]]
:
''
;
$strategyInfo
[
'data'
][
$k
][
'is_created_name'
]
=
$v
[
'is_created'
]
==
0
?
'未建'
:
'已建'
;
}
}
return
$this
->
successWithInfo
(
$strategyInfo
);
}
...
...
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