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
fec99e86
Commit
fec99e86
authored
Jan 22, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
5a4f5a6c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
59 deletions
+19
-59
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+13
-34
FixtureToolsProductController.cs
...Siger.ApiACC/Controllers/FixtureToolsProductController.cs
+1
-1
siger_automation_location.cs
...layer.AccRepository/Entities/siger_automation_location.cs
+1
-1
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+0
-6
RequestFixtureToolsCategory.cs
...ayer.AccRepository/Request/RequestFixtureToolsCategory.cs
+0
-8
ResponseAutomationLocation.cs
...ayer.AccRepository/Response/ResponseAutomationLocation.cs
+4
-9
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
fec99e86
...
@@ -26,31 +26,24 @@ namespace Siger.ApiACC.Controllers
...
@@ -26,31 +26,24 @@ namespace Siger.ApiACC.Controllers
private
readonly
ISigerTrMaterialsRepository
_materialsRepository
;
private
readonly
ISigerTrMaterialsRepository
_materialsRepository
;
public
AutomationLocationController
(
IUnitOfWork
unitOfWork
,
IAutomationFixtureToolsCategoryRepository
toolsCategoryRepository
,
public
AutomationLocationController
(
IUnitOfWork
unitOfWork
,
IAutomationFixtureToolsCategoryRepository
toolsCategoryRepository
,
IAutomationFixtureToolsRepository
toolsRepository
,
IAutomationLocationRepository
autoLocationRepository
,
IAutomationFixtureToolsRepository
toolsRepository
,
IAutomationLocationRepository
autoLocationRepository
)
ISigerTrMaterialsRepository
materialsRepository
)
{
{
_unitOfWork
=
unitOfWork
;
_unitOfWork
=
unitOfWork
;
_toolsCategoryRepository
=
toolsCategoryRepository
;
_toolsCategoryRepository
=
toolsCategoryRepository
;
_toolsRepository
=
toolsRepository
;
_toolsRepository
=
toolsRepository
;
_autoLocationRepository
=
autoLocationRepository
;
_autoLocationRepository
=
autoLocationRepository
;
_materialsRepository
=
materialsRepository
;
}
}
public
IActionResult
GetPageList
(
string
wavehouseid
,
string
locationid
,
int
page
,
int
pagesize
)
public
IActionResult
GetPageList
(
string
wavehouseid
,
string
locationid
,
int
page
,
int
pagesize
)
{
{
var
data
=
_autoLocationRepository
.
GetPagedList
(
wavehouseid
.
ToInt
(),
locationid
.
ToInt
(),
ProjectId
,
page
,
pagesize
);
var
data
=
_autoLocationRepository
.
GetPagedList
(
wavehouseid
.
ToInt
(),
locationid
.
ToInt
(),
ProjectId
,
page
,
pagesize
);
var
list
=
new
List
<
ResponseAutomationLocation
>();
foreach
(
var
item
in
data
.
Data
)
{
}
return
new
PagedObjectResult
(
data
.
Data
,
data
.
Total
,
page
,
pagesize
);
return
new
PagedObjectResult
(
data
.
Data
,
data
.
Total
,
page
,
pagesize
);
}
}
[
HttpPost
]
[
HttpPost
]
public
IActionResult
Add
([
FromBody
]
RequestAddAutomationLocation
req
)
public
IActionResult
Add
([
FromBody
]
RequestAddAutomationLocation
req
)
{
{
if
(
string
.
IsNullOrEmpty
(
req
.
locationid
)
||
string
.
IsNullOrEmpty
(
req
.
fixturetoolid
)
||
string
.
IsNullOrEmpty
(
req
.
materialid
)
)
if
(
string
.
IsNullOrEmpty
(
req
.
locationid
)
||
string
.
IsNullOrEmpty
(
req
.
fixturetoolid
))
{
{
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
}
}
...
@@ -64,31 +57,13 @@ namespace Siger.ApiACC.Controllers
...
@@ -64,31 +57,13 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
RequestEnum
.
LocationNull
);
throw
new
BadRequestException
(
RequestEnum
.
LocationNull
);
}
}
var
material
=
_materialsRepository
.
Get
(
q
=>
q
.
id
==
req
.
materialid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
var
exsit
=
_autoLocationRepository
.
Get
(
q
=>
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
.
fixturetools
==
req
.
fixturetoolid
||
q
.
locationid
==
req
.
locationid
.
ToInt
()));
q
.
locationid
==
req
.
locationid
.
ToInt
());
if
(
exsit
!=
null
)
if
(
data
!=
null
)
{
{
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
}
}
var
state
=
1
;
if
(
fixturetool
!=
null
&&
material
==
null
)
{
state
=
1
;
//有工装 无工件
}
else
if
(
fixturetool
!=
null
&&
material
!=
null
)
{
state
=
2
;
//有工装 有工件
}
else
if
(
fixturetool
==
null
&&
material
==
null
)
{
state
=
3
;
//无工装 无工件
}
else
if
(
fixturetool
==
null
&&
material
!=
null
)
{
state
=
4
;
//无工装 有工件
}
var
entity
=
new
siger_automation_location
var
entity
=
new
siger_automation_location
{
{
guid
=
Guid
.
NewGuid
().
ToString
(),
guid
=
Guid
.
NewGuid
().
ToString
(),
...
@@ -120,6 +95,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -120,6 +95,10 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
}
}
var
entity
=
_autoLocationRepository
.
Get
(
q
=>
q
.
id
==
req
.
id
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
var
entity
=
_autoLocationRepository
.
Get
(
q
=>
q
.
id
==
req
.
id
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
if
(
entity
==
null
)
{
throw
new
BadRequestException
(
CommonEnum
.
RecordNotFound
);
}
var
fixturetool
=
_toolsRepository
.
Get
(
q
=>
q
.
id
==
req
.
fixturetoolid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
);
var
fixturetool
=
_toolsRepository
.
Get
(
q
=>
q
.
id
==
req
.
fixturetoolid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
);
if
(
fixturetool
==
null
)
if
(
fixturetool
==
null
)
{
{
...
@@ -130,13 +109,13 @@ namespace Siger.ApiACC.Controllers
...
@@ -130,13 +109,13 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
RequestEnum
.
LocationNull
);
throw
new
BadRequestException
(
RequestEnum
.
LocationNull
);
}
}
var
material
=
_materialsRepository
.
Get
(
q
=>
q
.
id
==
req
.
materialid
.
ToInt
()
&&
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
var
exsit
=
_autoLocationRepository
.
Get
(
q
=>
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
.
fixturetools
==
req
.
fixturetoolid
||
q
.
locationid
==
req
.
locationid
.
ToInt
())
&&
q
.
id
!=
req
.
id
);
q
.
locationid
==
req
.
locationid
.
ToInt
()
&&
q
.
id
!=
req
.
id
);
if
(
exsit
!=
null
)
if
(
data
!=
null
)
{
{
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
}
}
entity
.
locationid
=
req
.
locationid
.
ToInt
();
entity
.
locationid
=
req
.
locationid
.
ToInt
();
entity
.
fixturetools
=
fixturetool
.
guid
;
entity
.
fixturetools
=
fixturetool
.
guid
;
entity
.
attachment
=
req
.
fileurl
;
entity
.
attachment
=
req
.
fileurl
;
...
...
Server/Apis/Siger.ApiACC/Controllers/FixtureToolsProductController.cs
View file @
fec99e86
...
@@ -127,7 +127,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -127,7 +127,7 @@ namespace Siger.ApiACC.Controllers
entity
.
updator
=
UserId
;
entity
.
updator
=
UserId
;
entity
.
filename
=
req
.
filename
;
entity
.
filename
=
req
.
filename
;
entity
.
attachment
=
req
.
fileurl
;
entity
.
attachment
=
req
.
fileurl
;
_toolsProductRepository
.
Insert
(
entity
);
_toolsProductRepository
.
Update
(
entity
);
if
(
_unitOfWork
.
Commit
()
>
0
)
if
(
_unitOfWork
.
Commit
()
>
0
)
{
{
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_location.cs
View file @
fec99e86
...
@@ -5,7 +5,7 @@ using System.Text;
...
@@ -5,7 +5,7 @@ using System.Text;
namespace
Siger.Middlelayer.AccRepository.Entities
namespace
Siger.Middlelayer.AccRepository.Entities
{
{
/// <summary>
/// <summary>
/// 储位信息
/// 储位
工装
信息
/// </summary>
/// </summary>
public
class
siger_automation_location
:
AccEntityBase
public
class
siger_automation_location
:
AccEntityBase
{
{
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
fec99e86
...
@@ -43,12 +43,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -43,12 +43,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories
category
=
c
.
name
,
category
=
c
.
name
,
code
=
t
.
code
,
code
=
t
.
code
,
specfication
=
t
.
specification
,
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,
fileurl
=
q
.
attachment
??
""
,
fileurl
=
q
.
attachment
??
""
,
filename
=
q
.
filename
??
""
,
filename
=
q
.
filename
??
""
,
remark
=
q
.
remark
,
remark
=
q
.
remark
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/RequestFixtureToolsCategory.cs
View file @
fec99e86
...
@@ -109,14 +109,6 @@ namespace Siger.Middlelayer.AccRepository.Request
...
@@ -109,14 +109,6 @@ namespace Siger.Middlelayer.AccRepository.Request
/// </summary>
/// </summary>
public
string
fixturetoolid
{
get
;
set
;
}
public
string
fixturetoolid
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 物料ID
/// </summary>
public
string
materialid
{
get
;
set
;
}
/// <summary>
/// 工序ID
/// </summary>
public
string
processid
{
get
;
set
;
}
/// <summary>
/// 附件
/// 附件
/// </summary>
/// </summary>
public
string
fileurl
{
get
;
set
;
}
public
string
fileurl
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationLocation.cs
View file @
fec99e86
...
@@ -23,16 +23,11 @@ namespace Siger.Middlelayer.AccRepository.Response
...
@@ -23,16 +23,11 @@ namespace Siger.Middlelayer.AccRepository.Response
public
string
code
{
get
;
set
;
}
public
string
code
{
get
;
set
;
}
public
string
specfication
{
get
;
set
;
}
public
string
specfication
{
get
;
set
;
}
/// <summary>
/// <summary>
///
物料ID
///
工件
/// </summary>
/// </summary>
public
int
materialid
{
get
;
set
;
}
public
string
sn
{
get
;
set
;
}
public
string
materialcode
{
get
;
set
;
}
public
string
routenumber
{
get
;
set
;
}
/// <summary>
public
string
route
{
get
;
set
;
}
/// 工序ID
/// </summary>
public
int
processid
{
get
;
set
;
}
public
int
processnumber
{
get
;
set
;
}
public
string
processname
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 物料状态
/// 物料状态
/// </summary>
/// </summary>
...
...
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