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
fefd72d6
Commit
fefd72d6
authored
May 18, 2020
by
yinxiaoling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
呼叫设置验证修改#号分割,不能为空
parent
971f806f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
StrategySetController.php
app/Http/Controllers/strategy/StrategySetController.php
+4
-2
StrategyService.php
app/Service/StrategyService.php
+6
-6
No files found.
app/Http/Controllers/strategy/StrategySetController.php
View file @
fefd72d6
...
...
@@ -55,8 +55,10 @@ class StrategySetController extends Controller
return
$this
->
errorWithInfo
(
'表单验证失败'
,
401
);
}
$params
=
$request
->
all
();
if
(
$params
[
'frequency_type'
]
==
2
){
//一天两次时间、项目格式验证,#号分割
if
(
substr_count
(
$params
[
'call_time_set'
],
'#'
)
!=
1
||
substr_count
(
$params
[
'project_sn'
],
'#'
)
!=
1
){
if
(
$params
[
'day_type'
]
==
1
||
$params
[
'frequency_type'
]
==
2
){
//日期前一天和当天,一天两次时间、项目格式验证,#号分割
$checkCallTimeSet
=
explode
(
"#"
,
$params
[
'call_time_set'
]);
$checkProjectSn
=
explode
(
"#"
,
$params
[
'project_sn'
]);
if
(
!
isset
(
$checkCallTimeSet
[
1
])
||
empty
(
$checkCallTimeSet
[
1
])
||
!
isset
(
$checkProjectSn
[
1
])
||
empty
(
$checkProjectSn
[
1
])){
return
$this
->
errorWithInfo
(
'呼叫设置验证失败'
,
401
);
}
}
...
...
app/Service/StrategyService.php
View file @
fefd72d6
...
...
@@ -243,9 +243,9 @@ class StrategyService
'import_date'
=>
$v
->
created_at
,
'parent_sn'
=>
$strategyInfo
[
'parent_sn'
],
'call_number'
=>
$strategyInfo
[
'call_number'
],
'project_sn'
=>
$project_sn
[
0
]
,
//$strategyInfo['project_sn'],
'project_sn'
=>
isset
(
$project_sn
[
0
])
?
$project_sn
[
0
]
:
''
,
//$strategyInfo['project_sn'],
'call_date'
=>
$i
,
'call_time'
=>
$call_time
[
0
]
,
//$strategyInfo['call_time'],
'call_time'
=>
isset
(
$call_time
[
0
])
?
$call_time
[
0
]
:
''
,
//$strategyInfo['call_time'],
'created_at'
=>
$now
];
...
...
@@ -271,9 +271,9 @@ class StrategyService
'import_date'
=>
$v
->
created_at
,
'parent_sn'
=>
$strategyInfo
[
'parent_sn'
],
'call_number'
=>
$strategyInfo
[
'call_number'
],
'project_sn'
=>
$project_sn
[
0
]
,
'project_sn'
=>
isset
(
$project_sn
[
0
])
?
$project_sn
[
0
]
:
''
,
'call_date'
=>
$yesterday
,
'call_time'
=>
$call_time
[
0
]
,
'call_time'
=>
isset
(
$call_time
[
0
])
?
$call_time
[
0
]
:
''
,
'created_at'
=>
$now
];
...
...
@@ -285,9 +285,9 @@ class StrategyService
'import_date'
=>
$v
->
created_at
,
'parent_sn'
=>
$strategyInfo
[
'parent_sn'
],
'call_number'
=>
$strategyInfo
[
'call_number'
],
'project_sn'
=>
$project_sn
[
1
]
,
'project_sn'
=>
isset
(
$project_sn
[
1
])
?
$project_sn
[
1
]
:
''
,
'call_date'
=>
$v
[
'duty_date'
],
'call_time'
=>
$call_time
[
1
]
,
'call_time'
=>
isset
(
$call_time
[
1
])
?
$call_time
[
1
]
:
''
,
'created_at'
=>
$now
];
...
...
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