Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
Laisi_AutoMES2
Overview
Overview
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
jiawei.su
Laisi_AutoMES2
Commits
6de01783
Commit
6de01783
authored
Jan 25, 2021
by
yiyu.li
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
5c5b29fc
b1a569e2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
8 deletions
+43
-8
accountInfo.vue
Html/src/view/fms/config/accountInfo.vue
+3
-3
AutomationFixtureToolsAssemblyRepository.cs
.../Repositories/AutomationFixtureToolsAssemblyRepository.cs
+6
-5
AutomationFixtureToolsCategoryRepository.cs
.../Repositories/AutomationFixtureToolsCategoryRepository.cs
+34
-0
No files found.
Html/src/view/fms/config/accountInfo.vue
View file @
6de01783
...
...
@@ -23,7 +23,7 @@
<div
class=
"searchBtn"
>
<Button
type=
"primary"
class=
"twoWord"
icon=
"ios-search"
@
click=
"tosearch()"
>
{{
$t
(
1001
)
}}
</Button>
<Button
type=
"success"
class=
"twoWord"
icon=
"md-add-circle"
@
click=
"add()"
>
{{
$t
(
'1002'
)
}}
</Button>
<Button
type=
"warning"
class=
"twoWord"
icon=
"ios-create-outline"
@
click=
"edit()"
>
{{
$t
(
'1003'
)
}}
</Button>
<Button
type=
"warning"
class=
"twoWord
intervalRight
"
icon=
"ios-create-outline"
@
click=
"edit()"
>
{{
$t
(
'1003'
)
}}
</Button>
<Button
type=
"primary"
class=
"fourWord"
icon=
"md-download"
@
click=
"loadexcel()"
>
{{
$t
(
'1005'
)
}}
</Button>
<Upload
style=
"display:inline-block"
...
...
@@ -127,9 +127,9 @@
<Upload
ref=
"upload"
:show-upload-list=
"false"
:on-success=
"handleSuccess"
:on-success=
"handleSuccess
1
"
:before-upload=
"handleBeforeUpload"
:on-error=
"handleError"
:on-error=
"handleError
1
"
type=
"drag"
:headers=
"headers"
:action=
"UploadAction"
>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsAssemblyRepository.cs
View file @
6de01783
...
...
@@ -50,8 +50,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
categoryid
=
c2
.
id
,
category
=
c2
.
name
,
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
,
cate_guid
=
t2
.
guid
,
parentcate_guid
=
t1
.
guid
,
cate_guid
=
c2
.
guid
??
""
,
parentcate_guid
=
c1
.
guid
??
""
,
parentguid
=
q
.
parent
,
fixtureguid
=
q
.
son
,
remark
=
q
.
remark
,
...
...
@@ -106,11 +106,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories
categoryid
=
c2
.
id
,
category
=
c2
.
name
,
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
,
cate_guid
=
t2
.
guid
,
parentcate_guid
=
t1
.
guid
,
cate_guid
=
c2
.
guid
??
""
,
parentcate_guid
=
c1
.
guid
??
""
,
parentguid
=
q
.
parent
,
fixtureguid
=
q
.
son
,
remark
=
q
.
remark
remark
=
q
.
remark
,
parentcategoryid
=
c1
==
null
?
0
:
c1
.
id
};
var
entities
=
query
.
OrderByDescending
(
q
=>
q
.
id
).
AsNoTracking
().
ToList
();
return
entities
;
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsCategoryRepository.cs
View file @
6de01783
...
...
@@ -8,8 +8,10 @@ using Siger.Middlelayer.AccRepository.Repositories.Interface;
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.Middlelayer.Common
;
using
Siger.Middlelayer.Common.Extensions
;
using
Siger.Middlelayer.Log
;
using
Siger.Middlelayer.Repository.Data.Acc
;
using
Siger.Middlelayer.Repository.Paged
;
using
Siger.Middlelayer.Utility.ImportEntities
;
namespace
Siger.Middlelayer.AccRepository.Repositories
{
...
...
@@ -55,5 +57,37 @@ namespace Siger.Middlelayer.AccRepository.Repositories
return
new
PagedCollectionResult
<
ResponseFixtureToolsCategory
>(
entities
,
totalCount
);
}
}
public
CommonImportResult
ImportData
(
IEnumerable
<
FixtureToolsCategoryTemplate
>
list
,
int
projectid
)
{
var
entities
=
new
List
<
siger_automation_fixture_tools_category
>();
var
errors
=
new
List
<
string
>();
var
rowIndex
=
1
;
foreach
(
var
item
in
list
)
{
rowIndex
++;
//errors.Add($"{rowIndex},{(int)RequestEnum.ManageCatOnlyBySuperAdministrator}");
}
if
(
errors
.
Any
())
{
return
new
CommonImportResult
(
0
,
string
.
Join
(
";"
,
errors
));
}
try
{
_context
.
siger_automation_fixture_tools_category
.
AddRange
(
entities
);
_context
.
SaveChanges
();
return
new
CommonImportResult
(
1
,
"1"
);
}
catch
(
Exception
e
)
{
Logger
.
WriteLineError
(
e
.
Message
);
throw
;
}
}
}
}
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