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
43c745cb
Commit
43c745cb
authored
Jan 20, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some update
parent
361f2e73
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
522 additions
and
10 deletions
+522
-10
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+204
-0
FixtureToolsController.cs
...r/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
+3
-3
FixtureToolsProductController.cs
...Siger.ApiACC/Controllers/FixtureToolsProductController.cs
+1
-1
ApiAccDbContext.cs
...tories/Siger.Middlelayer.AccRepository/ApiAccDbContext.cs
+4
-0
siger_automation_fixture_tools.cs
....AccRepository/Entities/siger_automation_fixture_tools.cs
+1
-1
siger_automation_location.cs
...layer.AccRepository/Entities/siger_automation_location.cs
+1
-1
siger_wms_storage.cs
...r.Middlelayer.AccRepository/Entities/siger_wms_storage.cs
+73
-0
siger_wms_storage_location.cs
...ayer.AccRepository/Entities/siger_wms_storage_location.cs
+76
-0
AutomationFixtureToolsRepository.cs
...pository/Repositories/AutomationFixtureToolsRepository.cs
+1
-1
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+61
-0
IAutomationLocationRepository.cs
...y/Repositories/Interface/IAutomationLocationRepository.cs
+5
-1
RequestFixtureToolsCategory.cs
...ayer.AccRepository/Request/RequestFixtureToolsCategory.cs
+35
-0
FixtureToolsCategory.cs
...iddlelayer.AccRepository/Response/FixtureToolsCategory.cs
+1
-1
ResponseAutomationLocation.cs
...ayer.AccRepository/Response/ResponseAutomationLocation.cs
+55
-0
DB.script
Server/Infrastructure/Script/DB.script
+1
-1
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
0 → 100644
View file @
43c745cb
using
System
;
using
System.Collections.Generic
;
using
System.Linq.Expressions
;
using
Microsoft.AspNetCore.Mvc
;
using
Siger.ApiCommon.Result
;
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.AccRepository.Repositories.Interface
;
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.Middlelayer.AccRepository.Request
;
using
Siger.Middlelayer.Common
;
using
Siger.Middlelayer.Common.Extensions
;
using
Siger.Middlelayer.Repository.Repositories.Interface
;
using
Siger.Middlelayer.Repository
;
using
Siger.Middlelayer.Repository.Extensions
;
using
System.Linq
;
using
Siger.Middlelayer.Repository.Entities
;
namespace
Siger.ApiACC.Controllers
{
public
class
AutomationLocationController
:
BaseController
{
private
readonly
IUnitOfWork
_unitOfWork
;
private
readonly
IAutomationFixtureToolsCategoryRepository
_toolsCategoryRepository
;
private
readonly
IAutomationFixtureToolsRepository
_toolsRepository
;
private
readonly
IAutomationLocationRepository
_autoLocationRepository
;
private
readonly
ISigerTrMaterialsRepository
_materialsRepository
;
public
AutomationLocationController
(
IUnitOfWork
unitOfWork
,
IAutomationFixtureToolsCategoryRepository
toolsCategoryRepository
,
IAutomationFixtureToolsRepository
toolsRepository
,
IAutomationLocationRepository
autoLocationRepository
,
ISigerTrMaterialsRepository
materialsRepository
)
{
_unitOfWork
=
unitOfWork
;
_toolsCategoryRepository
=
toolsCategoryRepository
;
_toolsRepository
=
toolsRepository
;
_autoLocationRepository
=
autoLocationRepository
;
_materialsRepository
=
materialsRepository
;
}
public
IActionResult
GetPageList
(
string
category
,
string
code
,
string
name
,
string
state
,
int
page
,
int
pagesize
)
{
var
data
=
_toolsRepository
.
GetPagedList
(
category
.
ToInt
(),
code
,
name
,
string
.
IsNullOrEmpty
(
state
)
?
-
1
:
state
.
ToInt
(),
ProjectId
,
page
,
pagesize
);
return
new
PagedObjectResult
(
data
.
Data
,
data
.
Total
,
page
,
pagesize
);
}
[
HttpPost
]
public
IActionResult
Add
([
FromBody
]
RequestAddAutomationLocation
req
)
{
if
(
string
.
IsNullOrEmpty
(
req
.
locationid
)
||
string
.
IsNullOrEmpty
(
req
.
fixturetoolid
)
||
string
.
IsNullOrEmpty
(
req
.
materialid
))
{
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
}
var
fixturetool
=
_toolsRepository
.
Get
(
q
=>
q
.
id
==
req
.
fixturetoolid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
if
(
fixturetool
==
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
FixtureToolNotFound
);
}
var
location
=
_autoLocationRepository
.
GetLocation
(
req
.
locationid
.
ToInt
(),
ProjectId
);
if
(
location
==
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
LocationNull
);
}
var
material
=
_materialsRepository
.
Get
(
q
=>
q
.
id
==
req
.
materialid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
var
data
=
_autoLocationRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
fixturetools
==
fixturetool
.
guid
&&
q
.
locationid
==
req
.
locationid
.
ToInt
());
if
(
data
!=
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
}
var
state
=
1
;
if
(
fixturetool
!=
null
&&
material
==
null
)
{
state
=
1
;
//有工装 无工件
}
else
if
(
fixturetool
!=
null
&&
material
!=
null
)
{
state
=
2
;
//有工装 有工件
}
var
entity
=
new
siger_automation_location
{
guid
=
Guid
.
NewGuid
().
ToString
(),
locationid
=
req
.
locationid
.
ToInt
(),
fixturetools
=
fixturetool
.
guid
,
materialid
=
req
.
materialid
.
ToInt
(),
processid
=
req
.
processid
.
ToInt
(),
materialstate
=
state
,
attachment
=
req
.
attachment
,
remark
=
req
.
remark
,
projectId
=
ProjectId
,
updatetime
=
DateTime
.
Now
,
updator
=
UserId
,
};
_autoLocationRepository
.
Insert
(
entity
);
if
(
_unitOfWork
.
Commit
()
>
0
)
{
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
else
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
[
HttpPost
]
public
IActionResult
Update
([
FromBody
]
RequestUpdateAutomationLocation
req
)
{
if
(
string
.
IsNullOrEmpty
(
req
.
locationid
)
||
string
.
IsNullOrEmpty
(
req
.
fixturetoolid
)
||
string
.
IsNullOrEmpty
(
req
.
materialid
))
{
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
}
var
entity
=
_autoLocationRepository
.
Get
(
q
=>
q
.
id
==
req
.
id
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
var
fixturetool
=
_toolsRepository
.
Get
(
q
=>
q
.
id
==
req
.
fixturetoolid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
if
(
fixturetool
==
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
FixtureToolNotFound
);
}
var
location
=
_autoLocationRepository
.
GetLocation
(
req
.
locationid
.
ToInt
(),
ProjectId
);
if
(
location
==
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
LocationNull
);
}
var
material
=
_materialsRepository
.
Get
(
q
=>
q
.
id
==
req
.
materialid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
var
data
=
_autoLocationRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
fixturetools
==
fixturetool
.
guid
&&
q
.
locationid
==
req
.
locationid
.
ToInt
()
&&
q
.
id
!=
req
.
id
);
if
(
data
!=
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
}
var
state
=
1
;
if
(
fixturetool
!=
null
&&
material
==
null
)
{
state
=
1
;
//有工装 无工件
}
else
if
(
fixturetool
!=
null
&&
material
!=
null
)
{
state
=
2
;
//有工装 有工件
}
entity
.
locationid
=
req
.
locationid
.
ToInt
();
entity
.
fixturetools
=
fixturetool
.
guid
;
entity
.
materialid
=
req
.
materialid
.
ToInt
();
entity
.
processid
=
req
.
processid
.
ToInt
();
entity
.
materialstate
=
state
;
entity
.
attachment
=
req
.
attachment
;
entity
.
remark
=
req
.
remark
;
entity
.
updatetime
=
DateTime
.
Now
;
entity
.
updator
=
UserId
;
_autoLocationRepository
.
Update
(
entity
);
if
(
_unitOfWork
.
Commit
()
>
0
)
{
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
else
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
[
HttpGet
]
public
IActionResult
Delete
(
int
id
)
{
var
entity
=
_autoLocationRepository
.
Get
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
id
==
id
);
if
(
entity
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
entity
.
status
=
(
int
)
RowState
.
Invalid
;
_autoLocationRepository
.
Update
(
entity
);
if
(
_unitOfWork
.
Commit
()
>
0
)
{
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
else
{
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
[
HttpPost
]
public
IActionResult
Deletes
([
FromBody
]
RequestDeleteRange
req
)
{
if
(
req
.
ids
==
null
||
!
req
.
ids
.
Any
())
{
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
}
var
entities
=
_autoLocationRepository
.
GetList
(
t
=>
req
.
ids
.
Contains
(
t
.
id
)
&&
t
.
projectId
==
ProjectId
&&
t
.
status
==
(
int
)
RowState
.
Valid
).
ToList
();
if
(!
entities
.
Any
())
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
foreach
(
var
entity
in
entities
)
{
entity
.
status
=
(
int
)
RowState
.
Invalid
;
_autoLocationRepository
.
Update
(
entity
);
}
if
(
_unitOfWork
.
Commit
()
>
0
)
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
throw
new
BadRequestException
(
CommonEnum
.
Fail
);
}
}
}
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsController.cs
View file @
43c745cb
...
...
@@ -65,7 +65,7 @@ namespace Siger.ApiACC.Controllers
managetype
=
req
.
managetype
.
ToInt
(),
partnumber
=
req
.
partnumber
,
name
=
req
.
name
,
specifition
=
req
.
specifition
,
specifi
ca
tion
=
req
.
specifition
,
number
=
req
.
number
.
ToInt
(),
remark
=
req
.
remark
,
attachment
=
req
.
attachment
,
...
...
@@ -113,7 +113,7 @@ namespace Siger.ApiACC.Controllers
entity
.
managetype
=
req
.
managetype
.
ToInt
();
entity
.
partnumber
=
req
.
partnumber
;
entity
.
name
=
req
.
name
;
entity
.
specifition
=
req
.
specifition
;
entity
.
specifi
ca
tion
=
req
.
specifition
;
entity
.
number
=
req
.
number
.
ToInt
();
entity
.
remark
=
req
.
remark
;
entity
.
attachment
=
req
.
attachment
;
...
...
@@ -153,7 +153,7 @@ namespace Siger.ApiACC.Controllers
}
[
HttpPost
]
public
IActionResult
Delete
([
FromBody
]
RequestDeleteRange
req
)
public
IActionResult
Delete
s
([
FromBody
]
RequestDeleteRange
req
)
{
if
(
req
.
ids
==
null
||
!
req
.
ids
.
Any
())
{
...
...
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsProductController.cs
View file @
43c745cb
...
...
@@ -156,7 +156,7 @@ namespace Siger.ApiACC.Controllers
}
[
HttpPost
]
public
IActionResult
Delete
([
FromBody
]
RequestDeleteRange
req
)
public
IActionResult
Delete
s
([
FromBody
]
RequestDeleteRange
req
)
{
if
(
req
.
ids
==
null
||
!
req
.
ids
.
Any
())
{
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/ApiAccDbContext.cs
View file @
43c745cb
...
...
@@ -156,5 +156,9 @@ namespace Siger.Middlelayer.AccRepository
public
DbSet
<
siger_automation_section_property
>
siger_automation_section_property
{
get
;
set
;
}
public
DbSet
<
siger_automation_section_route
>
siger_automation_section_route
{
get
;
set
;
}
public
DbSet
<
siger_automation_task_list
>
siger_automation_task_list
{
get
;
set
;
}
public
DbSet
<
siger_wms_storage
>
siger_wms_storage
{
get
;
set
;
}
public
DbSet
<
siger_wms_storage_location
>
siger_wms_storage_location
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_fixture_tools.cs
View file @
43c745cb
...
...
@@ -29,7 +29,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// <summary>
/// 规格型号
/// </summary>
public
string
specifition
{
get
;
set
;
}
public
string
specifi
ca
tion
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_
tray
.cs
→
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_
location
.cs
View file @
43c745cb
...
...
@@ -33,7 +33,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// <summary>
/// 附件
/// </summary>
public
int
attachment
{
get
;
set
;
}
public
string
attachment
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_wms_storage.cs
0 → 100644
View file @
43c745cb
//-----------------------------------------------------------------------
// <copyright file=" siger_wms_storage.cs" company="xxxx Enterprises">
// * Copyright (C) 2019 xxxx Enterprises All Rights Reserved
// * version : 4.0.30319.42000
// * author : auto generated by T4
// * FileName: siger_wms_storage.cs
// * history : Created by T4 04/01/2019 09:14:26
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
namespace
Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// siger_wms_storage Entity Model
/// </summary>
public
class
siger_wms_storage
:
AccEntityBase
{
/// <summary>
/// 分类
/// </summary>
public
int
typeid
{
get
;
set
;
}
/// <summary>
/// 仓库名称
/// </summary>
public
string
name
{
get
;
set
;
}
/// <summary>
/// 编号
/// </summary>
public
string
serial_number
{
get
;
set
;
}
/// <summary>
/// 仓库详细地址
/// </summary>
public
string
address
{
get
;
set
;
}
/// <summary>
/// 联系人
/// </summary>
public
string
manager
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
creator
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
DateTime
create_time
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
updator
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
DateTime
update_time
{
get
;
set
;
}
public
string
description
{
get
;
set
;
}
public
string
phone
{
get
;
set
;
}
public
string
mobile
{
get
;
set
;
}
public
string
option
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_wms_storage_location.cs
0 → 100644
View file @
43c745cb
//-----------------------------------------------------------------------
// <copyright file=" siger_wms_storage_location.cs" company="xxxx Enterprises">
// * Copyright (C) 2019 xxxx Enterprises All Rights Reserved
// * version : 4.0.30319.42000
// * author : auto generated by T4
// * FileName: siger_wms_storage_location.cs
// * history : Created by T4 04/01/2019 09:14:26
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
namespace
Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// siger_wms_storage_location Entity Model
/// </summary>
public
class
siger_wms_storage_location
:
AccEntityBase
{
/// <summary>
/// 仓库id
/// </summary>
public
int
storageid
{
get
;
set
;
}
/// <summary>
/// 父类
/// </summary>
public
int
parentid
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
name
{
get
;
set
;
}
/// <summary>
/// 区分层级 区域1,货架2,层号3,位置4
/// </summary>
public
int
level
{
get
;
set
;
}
/// <summary>
/// 分类
/// </summary>
public
int
typeid
{
get
;
set
;
}
/// <summary>
/// 储位编号-只有level=4才有
/// </summary>
public
string
serial_number
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
creator
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
DateTime
create_time
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
updator
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
DateTime
update_time
{
get
;
set
;
}
public
string
option
{
get
;
set
;
}
public
string
realname
{
get
;
set
;
}
public
int
locationid
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationFixtureToolsRepository.cs
View file @
43c745cb
...
...
@@ -37,7 +37,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
category
=
p
.
name
,
managetype
=
q
.
managetype
,
partnumber
=
q
.
partnumber
,
specifi
tion
=
q
.
specifi
tion
,
specifi
cation
=
q
.
specifica
tion
,
number
=
q
.
number
,
remark
=
q
.
remark
,
attachment
=
q
.
attachment
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
43c745cb
...
...
@@ -4,7 +4,10 @@ using System.Linq.Expressions;
using
Microsoft.EntityFrameworkCore
;
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.AccRepository.Repositories.Interface
;
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.Middlelayer.Common
;
using
Siger.Middlelayer.Repository.Data.Acc
;
using
Siger.Middlelayer.Repository.Extensions
;
using
Siger.Middlelayer.Repository.Paged
;
namespace
Siger.Middlelayer.AccRepository.Repositories
...
...
@@ -16,5 +19,63 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
_context
=
context
;
}
public
IPagedCollectionResult
<
ResponseAutomationLocation
>
GetPagedList
(
int
wavehouseid
,
int
locationid
,
int
projectid
,
int
page
,
int
pagesize
)
{
var
query
=
from
q
in
_context
.
siger_automation_location
join
t
in
_context
.
siger_automation_fixture_tools
on
q
.
fixturetools
equals
t
.
guid
join
c
in
_context
.
siger_automation_fixture_tools_category
on
t
.
category
equals
c
.
guid
join
l
in
_context
.
siger_wms_storage_location
on
q
.
locationid
equals
l
.
locationid
join
w
in
_context
.
siger_wms_storage
on
l
.
storageid
equals
w
.
id
join
m
in
_context
.
siger_tr_assist_materials
on
q
.
materialid
equals
m
.
id
join
p
in
_context
.
siger_project_process
on
q
.
processid
equals
p
.
id
into
pp
from
p
in
pp
.
DefaultIfEmpty
()
join
u
in
_context
.
siger_project_user
on
q
.
updator
equals
u
.
mid
into
uu
from
u
in
uu
.
DefaultIfEmpty
()
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseAutomationLocation
{
id
=
q
.
id
,
locationid
=
l
.
id
,
location
=
l
.
name
,
wavehouseid
=
w
.
id
,
wavehouse
=
w
.
name
,
fixturetoolid
=
t
.
id
,
fixturetool
=
t
.
name
,
category
=
c
.
name
,
code
=
t
.
code
,
specfication
=
t
.
specification
,
materialid
=
q
.
materialid
,
materialcode
=
m
.
pn
,
processid
=
q
.
processid
,
processnumber
=
p
==
null
?
0
:
p
.
Process_Seq
,
processname
=
p
.
Process_name
??
""
,
materialstate
=
q
.
materialstate
,
attachment
=
q
.
attachment
,
remark
=
q
.
remark
,
updator
=
u
.
name
??
""
,
status
=
q
.
status
,
updatetime
=
q
.
updatetime
.
HasValue
&&
q
.
updatetime
>
DateTime
.
MinValue
?
q
.
updatetime
.
Value
.
ToString
(
ParameterConstant
.
DateTimeFormat
)
:
""
};
Expression
<
Func
<
ResponseAutomationLocation
,
bool
>>
wavehouseidExpression
=
f
=>
true
;
if
(
wavehouseid
>
0
)
{
wavehouseidExpression
=
q
=>
q
.
wavehouseid
==
wavehouseid
;
}
Expression
<
Func
<
ResponseAutomationLocation
,
bool
>>
locationidExpression
=
f
=>
true
;
if
(
locationid
>
0
)
{
locationidExpression
=
q
=>
q
.
locationid
==
locationid
;
}
var
expression
=
wavehouseidExpression
.
And
(
locationidExpression
);
var
entities
=
query
.
Where
(
expression
).
OrderByDescending
(
q
=>
q
.
id
).
Skip
((
page
-
1
)
*
pagesize
).
Take
(
pagesize
).
AsNoTracking
().
ToList
();
var
totalCount
=
query
.
Where
(
expression
).
Count
();
return
new
PagedCollectionResult
<
ResponseAutomationLocation
>(
entities
,
totalCount
);
}
public
siger_wms_storage_location
GetLocation
(
int
id
,
int
projectid
)
{
return
_context
.
siger_wms_storage_location
.
FirstOrDefault
(
q
=>
q
.
locationid
==
id
&&
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IAutomationLocationRepository.cs
View file @
43c745cb
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.AccRepository.Response
;
using
Siger.Middlelayer.Repository.Data.Acc
;
using
Siger.Middlelayer.Repository.Paged
;
...
...
@@ -6,6 +7,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public
interface
IAutomationLocationRepository
:
IAccRepositoryBase
<
siger_automation_location
>
{
IPagedCollectionResult
<
ResponseAutomationLocation
>
GetPagedList
(
int
wavehouseid
,
int
locationid
,
int
projectid
,
int
page
,
int
pagesize
);
siger_wms_storage_location
GetLocation
(
int
id
,
int
projectid
);
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/RequestFixtureToolsCategory.cs
View file @
43c745cb
...
...
@@ -90,4 +90,39 @@ namespace Siger.Middlelayer.AccRepository.Request
{
public
int
id
{
get
;
set
;
}
}
public
class
RequestAddAutomationLocation
{
/// <summary>
/// 储位位置
/// </summary>
public
string
locationid
{
get
;
set
;
}
/// <summary>
/// 工装ID
/// </summary>
public
string
fixturetoolid
{
get
;
set
;
}
/// <summary>
/// 物料ID
/// </summary>
public
string
materialid
{
get
;
set
;
}
/// <summary>
/// 工序ID
/// </summary>
public
string
processid
{
get
;
set
;
}
/// <summary>
/// 附件
/// </summary>
public
string
attachment
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
remark
{
get
;
set
;
}
}
public
class
RequestUpdateAutomationLocation
:
RequestAddAutomationLocation
{
public
int
id
{
get
;
set
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/FixtureToolsCategory.cs
View file @
43c745cb
...
...
@@ -53,7 +53,7 @@ namespace Siger.Middlelayer.AccRepository.Response
/// <summary>
/// 规格型号
/// </summary>
public
string
specifition
{
get
;
set
;
}
public
string
specifi
ca
tion
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationLocation.cs
0 → 100644
View file @
43c745cb
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Siger.Middlelayer.AccRepository.Response
{
public
class
ResponseAutomationLocation
{
public
int
id
{
get
;
set
;
}
/// <summary>
/// 储位位置
/// </summary>
public
int
locationid
{
get
;
set
;
}
public
string
location
{
get
;
set
;
}
public
int
wavehouseid
{
get
;
set
;
}
public
string
wavehouse
{
get
;
set
;
}
/// <summary>
/// 工装ID
/// </summary>
public
int
fixturetoolid
{
get
;
set
;
}
public
string
fixturetool
{
get
;
set
;
}
public
string
category
{
get
;
set
;
}
public
string
code
{
get
;
set
;
}
public
string
specfication
{
get
;
set
;
}
/// <summary>
/// 物料ID
/// </summary>
public
int
materialid
{
get
;
set
;
}
public
string
materialcode
{
get
;
set
;
}
/// <summary>
/// 工序ID
/// </summary>
public
int
processid
{
get
;
set
;
}
public
int
processnumber
{
get
;
set
;
}
public
string
processname
{
get
;
set
;
}
/// <summary>
/// 物料状态
/// </summary>
public
int
materialstate
{
get
;
set
;
}
/// <summary>
/// 附件
/// </summary>
public
string
attachment
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
remark
{
get
;
set
;
}
public
string
updator
{
get
;
set
;
}
public
string
updatetime
{
get
;
set
;
}
public
int
status
{
get
;
set
;
}
}
}
Server/Infrastructure/Script/DB.script
View file @
43c745cb
...
...
@@ -201,7 +201,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_fixture_tools` (
`managetype` int(11) NOT NULL DEFAULT 0 COMMENT '管理类型',
`partnumber` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装料号',
`name` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装名称',
`specifition` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规格型号',
`specifi
ca
tion` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规格型号',
`number` int(11) NOT NULL DEFAULT 0 COMMENT '数量',
`remark` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`attachment` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件',
...
...
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