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
da5ec7cb
Commit
da5ec7cb
authored
Jan 23, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some update
parent
7d83939f
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
58 additions
and
26 deletions
+58
-26
FixtureToolsAssemblyController.cs
...iger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
+3
-0
FixtureToolsController.cs
...r/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
+17
-22
DownloadController.cs
Server/Apis/Siger.ApiConfig/Controller/DownloadController.cs
+13
-0
CommonEnum.cs
Server/Common/Siger.Middlelayer.Share/Enum/CommonEnum.cs
+5
-1
FixtureTools.cs
.../Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
+6
-0
siger_automation_fixture_tools_assembly.cs
...itory/Entities/siger_automation_fixture_tools_assembly.cs
+2
-0
AutomationFixtureToolsAssemblyRepository.cs
.../Repositories/AutomationFixtureToolsAssemblyRepository.cs
+4
-2
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+2
-1
RequestFixtureToolsCategory.cs
...ayer.AccRepository/Request/RequestFixtureToolsCategory.cs
+2
-0
FixtureToolsCategory.cs
...iddlelayer.AccRepository/Response/FixtureToolsCategory.cs
+2
-0
ResponseAutomationLocation.cs
...ayer.AccRepository/Response/ResponseAutomationLocation.cs
+2
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsAssemblyController.cs
View file @
da5ec7cb
...
...
@@ -136,6 +136,7 @@ namespace Siger.ApiACC.Controllers
updatetime
=
DateTime
.
Now
,
updator
=
UserId
,
status
=
req
.
status
.
ToInt
()
==
(
int
)
RowState
.
Valid
?
(
int
)
RowState
.
Valid
:
(
int
)
RowState
.
Invalid
,
remark
=
req
.
remark
};
_toolsAssemblyRepository
.
Insert
(
parentEntity
);
}
...
...
@@ -219,6 +220,7 @@ namespace Siger.ApiACC.Controllers
projectId
=
ProjectId
,
updatetime
=
DateTime
.
Now
,
updator
=
UserId
,
remark
=
req
.
remark
,
status
=
req
.
status
.
ToInt
()
==
(
int
)
RowState
.
Valid
?
(
int
)
RowState
.
Valid
:
(
int
)
RowState
.
Invalid
,
};
_toolsAssemblyRepository
.
Insert
(
parentEntity
);
...
...
@@ -231,6 +233,7 @@ namespace Siger.ApiACC.Controllers
entity
.
updatetime
=
DateTime
.
Now
;
entity
.
updator
=
UserId
;
entity
.
status
=
req
.
status
.
ToInt
()
==
(
int
)
RowState
.
Valid
?
(
int
)
RowState
.
Valid
:
(
int
)
RowState
.
Invalid
;
entity
.
remark
=
req
.
remark
;
_toolsAssemblyRepository
.
Update
(
entity
);
if
(
_unitOfWork
.
Commit
()
>
0
)
{
...
...
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
View file @
da5ec7cb
...
...
@@ -27,13 +27,15 @@ namespace Siger.ApiACC.Controllers
private
readonly
IUnitOfWork
_unitOfWork
;
private
readonly
IAutomationFixtureToolsCategoryRepository
_toolsCategoryRepository
;
private
readonly
IAutomationFixtureToolsRepository
_toolsRepository
;
private
readonly
IAutomationLocationRepository
_automationLocationRepository
;
public
FixtureToolsController
(
IUnitOfWork
unitOfWork
,
IAutomationFixtureToolsCategoryRepository
toolsCategoryRepository
,
IAutomationFixtureToolsRepository
toolsRepository
)
IAutomationFixtureToolsRepository
toolsRepository
,
IAutomationLocationRepository
automationLocationRepository
)
{
_unitOfWork
=
unitOfWork
;
_toolsCategoryRepository
=
toolsCategoryRepository
;
_toolsRepository
=
toolsRepository
;
_automationLocationRepository
=
automationLocationRepository
;
}
public
IActionResult
GetPageList
(
string
category
,
string
code
,
string
name
,
string
state
,
int
page
,
int
pagesize
,
string
toexcel
)
...
...
@@ -387,12 +389,22 @@ namespace Siger.ApiACC.Controllers
[
HttpGet
]
public
IActionResult
DeleteCategory
(
int
id
)
{
var
entity
=
_toolsCategoryRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
id
==
id
);
var
categorys
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
var
entity
=
categorys
.
FirstOrDefault
(
q
=>
q
.
id
==
id
);
if
(
entity
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
details
=
GetSonCategoryList
(
entity
.
guid
,
categorys
);
var
detailIds
=
details
.
Select
(
q
=>
q
.
id
).
Distinct
().
ToList
();
var
delDetails
=
_toolsCategoryRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
detailIds
.
Contains
(
q
.
id
)).
ToList
();
foreach
(
var
detail
in
delDetails
)
{
detail
.
status
=
(
int
)
RowState
.
Invalid
;
_toolsCategoryRepository
.
Update
(
detail
);
}
entity
.
status
=
(
int
)
RowState
.
Invalid
;
_toolsCategoryRepository
.
Update
(
entity
);
if
(
_unitOfWork
.
Commit
()
>
0
)
...
...
@@ -405,28 +417,11 @@ namespace Siger.ApiACC.Controllers
}
}
[
HttpPost
]
public
IActionResult
DeleteCategorys
([
FromBody
]
RequestDeleteRange
req
)
{
if
(
req
.
ids
==
null
||
!
req
.
ids
.
Any
())
{
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
}
var
entities
=
_toolsCategoryRepository
.
GetList
(
t
=>
req
.
ids
.
Contains
(
t
.
id
)
&&
t
.
projectId
==
ProjectId
&&
t
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
if
(!
entities
.
Any
())
private
IEnumerable
<
siger_automation_fixture_tools_category
>
GetSonCategoryList
(
string
parentId
,
List
<
siger_automation_fixture_tools_category
>
sections
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
foreach
(
var
entity
in
entities
)
{
entity
.
status
=
(
int
)
RowState
.
Invalid
;
_toolsCategoryRepository
.
Update
(
entity
);
}
var
query
=
from
c
in
sections
where
c
.
parent
==
parentId
select
c
;
if
(
_unitOfWork
.
Commit
()
>
0
)
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
return
query
.
ToList
().
Concat
(
query
.
ToList
().
SelectMany
(
t
=>
GetSonCategoryList
(
t
.
parent
,
sections
)));
}
[
HttpGet
]
...
...
Server/Apis/Siger.ApiConfig/Controller/DownloadController.cs
View file @
da5ec7cb
...
...
@@ -287,6 +287,19 @@ namespace Siger.ApiConfig.Controller
case
TemplateNameEnums
.
TechMouldList
:
type
=
typeof
(
TechMouldList
);
break
;
//自动化加工
case
TemplateNameEnums
.
FixtureToolsCategoryTemplate
:
type
=
typeof
(
FixtureToolsCategoryTemplate
);
break
;
case
TemplateNameEnums
.
FixtureToolsTemplate
:
type
=
typeof
(
FixtureToolsTemplate
);
break
;
case
TemplateNameEnums
.
FixtureToolsProductTemplate
:
type
=
typeof
(
FixtureToolsProductTemplate
);
break
;
case
TemplateNameEnums
.
FixtureToolsAssmeblyTemplate
:
type
=
typeof
(
FixtureToolsAssmeblyTemplate
);
break
;
}
return
type
;
...
...
Server/Common/Siger.Middlelayer.Share/Enum/CommonEnum.cs
View file @
da5ec7cb
...
...
@@ -231,7 +231,11 @@ namespace Siger.Middlelayer.Common
MouldDetection
,
//模具测试项导入
MouldCoreDetection
,
//模芯测试项导入
TechMouldList
,
//模具清单
//自动化加工
FixtureToolsCategoryTemplate
,
FixtureToolsTemplate
,
FixtureToolsProductTemplate
,
FixtureToolsAssmeblyTemplate
,
}
public
enum
LogLevel
...
...
Server/Common/Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
View file @
da5ec7cb
...
...
@@ -39,6 +39,12 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[
ExcelColumn
(
"备注"
)]
public
string
Remark
{
get
;
set
;
}
[
ExcelColumn
(
"维护人"
)]
public
string
Updator
{
get
;
set
;
}
[
ExcelColumn
(
"维护时间"
)]
public
string
UpdateTime
{
get
;
set
;
}
}
public
class
FixtureToolsProductTemplate
:
ImportBase
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_fixture_tools_assembly.cs
View file @
da5ec7cb
...
...
@@ -26,6 +26,8 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// 附件名称
/// </summary>
public
string
filename
{
get
;
set
;
}
public
string
remark
{
get
;
set
;
}
public
int
creator
{
get
;
set
;
}
public
DateTime
createtime
{
get
;
set
;
}
public
int
updator
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsAssemblyRepository.cs
View file @
da5ec7cb
...
...
@@ -53,7 +53,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
cate_guid
=
t2
.
guid
,
parentcate_guid
=
t1
.
guid
,
parentguid
=
q
.
parent
,
fixtureguid
=
q
.
son
fixtureguid
=
q
.
son
,
remark
=
q
.
remark
};
Expression
<
Func
<
ResponseAumationFixtureToolsAssembly
,
bool
>>
categoryExpression
=
f
=>
true
;
if
(
category
>
0
)
...
...
@@ -107,7 +108,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
cate_guid
=
t2
.
guid
,
parentcate_guid
=
t1
.
guid
,
parentguid
=
q
.
parent
,
fixtureguid
=
q
.
son
fixtureguid
=
q
.
son
,
remark
=
q
.
remark
};
var
entities
=
query
.
OrderByDescending
(
q
=>
q
.
id
).
AsNoTracking
().
ToList
();
return
entities
;
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
da5ec7cb
...
...
@@ -108,7 +108,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
fixturetoolid
=
t
.
id
,
code
=
t
.
code
,
name
=
t
.
name
,
materialsn
=
m
.
sn
??
""
materialsn
=
m
.
sn
??
""
,
categoryid
=
c
==
null
?
0
:
c
.
id
};
var
entities
=
query
.
AsNoTracking
().
ToList
();
return
entities
;
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/RequestFixtureToolsCategory.cs
View file @
da5ec7cb
...
...
@@ -132,6 +132,8 @@ namespace Siger.Middlelayer.AccRepository.Request
public
string
filename
{
get
;
set
;
}
public
string
status
{
get
;
set
;
}
public
string
remark
{
get
;
set
;
}
}
public
class
RequestUpdateFixtureToolAssembly
:
RequestAddFixtureToolAssembly
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/FixtureToolsCategory.cs
View file @
da5ec7cb
...
...
@@ -145,5 +145,7 @@ namespace Siger.Middlelayer.AccRepository.Response
public
string
fixtureguid
{
get
;
set
;
}
public
List
<
ResponseAumationFixtureToolsAssembly
>
children
{
get
;
set
;
}
public
string
remark
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationLocation.cs
View file @
da5ec7cb
...
...
@@ -80,5 +80,7 @@ namespace Siger.Middlelayer.AccRepository.Response
public
string
code
{
get
;
set
;
}
public
string
name
{
get
;
set
;
}
public
string
materialsn
{
get
;
set
;
}
public
int
categoryid
{
get
;
set
;
}
}
}
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