Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-rpc
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
without authentication
meibuyu-rpc
Commits
0e8a12b6
Commit
0e8a12b6
authored
Jun 03, 2020
by
王源
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改excel导入空判断和数值判断逻辑
parent
9caba02c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
ExcelImporter.php
src/Tools/ExcelImporter.php
+6
-4
No files found.
src/Tools/ExcelImporter.php
View file @
0e8a12b6
...
...
@@ -121,14 +121,15 @@ class ExcelImporter
* @param $errorCount
* @throws \PhpOffice\PhpSpreadsheet\Exception
*/
public
function
checkRequire
(
$requires
,
$errorCount
)
public
function
checkRequire
(
$requires
,
&
$errorCount
)
{
foreach
(
$requires
as
$k
=>
$v
)
{
if
(
$v
===
''
)
{
if
(
!
$v
||
$v
===
''
)
{
$this
->
setErrorMessage
(
$k
.
"不能为空"
,
$errorCount
);
continu
e
;
return
fals
e
;
}
}
return
true
;
}
/**
...
...
@@ -142,9 +143,10 @@ class ExcelImporter
foreach
(
$data
as
$k
=>
$v
)
{
if
(
!
is_numeric
(
$v
))
{
$this
->
setErrorMessage
(
"
{
$k
}
只能是数字"
,
$errorCount
);
continu
e
;
return
fals
e
;
}
}
return
true
;
}
/**
...
...
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