Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
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
黄奎
mall.oytour.com
Commits
43bb3899
Commit
43bb3899
authored
Dec 12, 2024
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
4dc1d1db
a397d3b4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
412 additions
and
271 deletions
+412
-271
ImportExcelNPOIHelper.cs
Mall.Common/Plugin/ImportExcelNPOIHelper.cs
+403
-0
NPOIHelper.cs
Mall.Common/Plugin/NPOIHelper.cs
+3
-267
BrandHelper.cs
Mall.DataHelper/Import/BrandHelper.cs
+5
-3
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+1
-1
No files found.
Mall.Common/Plugin/ImportExcelNPOIHelper.cs
0 → 100644
View file @
43bb3899
This diff is collapsed.
Click to expand it.
Mall.Common/Plugin/NPOIHelper.cs
View file @
43bb3899
This diff is collapsed.
Click to expand it.
Mall.DataHelper/Import/BrandHelper.cs
View file @
43bb3899
...
...
@@ -23,14 +23,16 @@ namespace Mall.DataHelper.Import
{
//图片所在的列
List
<
int
>
imgColList
=
new
List
<
int
>();
imgColList
.
Add
(
1
);
imgColList
.
Add
(
2
);
imgColList
.
Add
(
3
);
List
<
RB_Brand_Enterprise_Extend
>
list
=
new
List
<
RB_Brand_Enterprise_Extend
>();
DataTable
dt
=
Mall
.
Common
.
Plugin
.
NPOIHelper
.
ImportYBExceltoDt
(
fileName
,
0
,
1
,
true
,
imgColList
:
imgColList
,
tempFilePath
:
tempFilePath
);
Mall
.
Common
.
Plugin
.
ImportExcelNPOIHelper
importExcelNPOIHelper
=
new
Common
.
Plugin
.
ImportExcelNPOIHelper
(
tempFilePath
);
DataTable
dt
=
importExcelNPOIHelper
.
ExcelToDataTable
(
fileName
,
0
,
0
,
true
,
imgColList
:
imgColList
);
if
(
dt
!=
null
&&
dt
.
Rows
.
Count
>
0
)
{
foreach
(
DataRow
dr
in
dt
.
Rows
)
{
list
.
Add
(
DataRowToModel
(
dr
));
list
.
Add
(
DataRowToModel
(
dr
));
}
}
return
list
;
...
...
Mall.WebApi/Controllers/User/TenantController.cs
View file @
43bb3899
...
...
@@ -2230,7 +2230,7 @@ namespace Mall.WebApi.Controllers.User
{
string
rootPath
=
Path
.
Combine
(
Directory
.
GetCurrentDirectory
(),
"upfile"
);
string
filePath
=
rootPath
+
@"\消费品牌.xlsx"
;
string
tempPath
=
rootPath
+
@"\TempIm
g
"
;
string
tempPath
=
rootPath
+
@"\TempIm
port\TempFile
"
;
var
list
=
BrandHelper
.
ImportYBBrandData
(
filePath
,
tempPath
);
return
ApiResult
.
Success
(
data
:
Common
.
Plugin
.
JsonHelper
.
Serialize
(
list
));
}
...
...
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