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
5528d384
Commit
5528d384
authored
Aug 21, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
694d1116
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
StoreFeeService.php
application/api_broker/service/StoreFeeService.php
+12
-12
No files found.
application/api_broker/service/StoreFeeService.php
View file @
5528d384
...
...
@@ -717,12 +717,12 @@ class StoreFeeService
try
{
$spreadsheet
=
$reader
->
load
(
"static/excel/"
.
$file_path
);
}
catch
(
\Exception
$exception
)
{
return
[
"code"
=>
101
,
"msg"
=>
"找不到文件路径"
];
return
[
"code"
=>
101
,
"msg"
=>
"找不到文件路径"
];
}
$sheet
=
$spreadsheet
->
getActiveSheet
();
$highestRow
=
$sheet
->
getHighestRow
();
// 最大行数
$sheet
=
$spreadsheet
->
getActiveSheet
();
$highestRow
=
$sheet
->
getHighestRow
();
// 最大行数
if
(
$highestRow
<=
2
)
{
return
[
"code"
=>
101
,
"msg"
=>
"Excel没有任何数据"
];
return
[
"code"
=>
101
,
"msg"
=>
"Excel没有任何数据"
];
}
$data
=
array
();
$storeModel
=
new
AStore
();
...
...
@@ -735,15 +735,15 @@ class StoreFeeService
$fee_item
=
$sheet
->
getCellByColumnAndRow
(
4
,
$row
)
->
getValue
();
$purpose
=
$sheet
->
getCellByColumnAndRow
(
5
,
$row
)
->
getValue
();
$store_id
=
$sheet
->
getCellByColumnAndRow
(
6
,
$row
)
->
getValue
();
$if_verify
=
$this
->
verifyType
((
int
)
$type
,
(
int
)
$fee_item
);
$if_verify
=
$this
->
verifyType
((
int
)
$type
,
(
int
)
$fee_item
);
if
(
!
$if_verify
)
{
return
[
"code"
=>
101
,
"msg"
=>
"类型选择错误
"
];
return
[
"code"
=>
101
,
"msg"
=>
"类型选择错误,第"
.
$row
.
"行
"
];
}
$storeInfo
=
$storeModel
->
getStoreById
(
$store_id
);
if
(
!
$storeInfo
||
!
$storeInfo
[
"agents_id"
]
||
!
$storeInfo
[
"site_id"
])
{
return
[
"code"
=>
101
,
"msg"
=>
"门店信息错误"
];
return
[
"code"
=>
101
,
"msg"
=>
"门店信息错误"
];
}
$agent_id
=
$storeInfo
[
"agents_id"
];
$site_id
=
$storeInfo
[
"site_id"
];
...
...
@@ -751,12 +751,12 @@ class StoreFeeService
array_push
(
$data
,
$this
->
applyForFeeBin
(
0
,
$type
,
$fee_item
,
$total_fee
,
$agent_id
,
$store_id
,
$purpose
,
$site_id
,
""
,
""
,
""
,
$date
,
$office_id
,
0
,
1
));
}
if
(
$data
)
{
if
(
$data
)
{
$applyForModel
=
new
FApplyForFee
();
$is_ok
=
$applyForModel
->
addData
(
$data
);
return
[
"code"
=>
200
,
"msg"
=>
"
$is_ok
"
];
$is_ok
=
$applyForModel
->
addData
(
$data
);
return
[
"code"
=>
200
,
"msg"
=>
"
$is_ok
"
];
}
return
[
"code"
=>
101
,
"msg"
=>
"未知异常"
];
return
[
"code"
=>
101
,
"msg"
=>
"未知异常"
];
}
...
...
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