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
226cc8ac
Commit
226cc8ac
authored
Jan 26, 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
586b378c
07ecb922
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
15 deletions
+43
-15
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+0
-0
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+5
-3
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+0
-3
LocationController.cs
Server/Apis/Siger.ApiWMS/Controllers/LocationController.cs
+2
-2
FixtureTools.cs
.../Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
+2
-0
siger_automation_location.cs
...layer.AccRepository/Entities/siger_automation_location.cs
+7
-1
siger_automation_task_list.cs
...ayer.AccRepository/Entities/siger_automation_task_list.cs
+5
-0
AutomationLocationRepository.cs
...ccRepository/Repositories/AutomationLocationRepository.cs
+10
-5
ResponseAutomationInfo.cs
...dlelayer.AccRepository/Response/ResponseAutomationInfo.cs
+3
-0
ResponseAutomationLocation.cs
...ayer.AccRepository/Response/ResponseAutomationLocation.cs
+4
-1
DB.script
Server/Infrastructure/Script/DB.script
+5
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
226cc8ac
This diff is collapsed.
Click to expand it.
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
226cc8ac
...
...
@@ -71,7 +71,7 @@ namespace Siger.ApiACC.Controllers
item
.
materialstate
=
4
;
//无工装有工件
}
var
loca
=
locations
.
FirstOrDefault
(
q
=>
q
.
locationid
==
item
.
loca
id
);
var
loca
=
locations
.
FirstOrDefault
(
q
=>
q
.
id
==
item
.
location
id
);
if
(
loca
!=
null
)
{
var
locas
=
GetParentLocations
(
loca
.
id
,
locations
);
...
...
@@ -211,7 +211,8 @@ namespace Siger.ApiACC.Controllers
var
entity
=
new
siger_automation_location
{
guid
=
Guid
.
NewGuid
().
ToString
(),
locationid
=
location
.
id
,
locationid
=
location
.
locationid
,
location_cid
=
location
.
id
,
fixturetools
=
fixturetool
.
guid
,
productid
=
fixturetoolProduct
!=
null
?
fixturetoolProduct
.
productid
:
0
,
productcode
=
fixturetoolProduct
!=
null
?
fixturetoolProduct
.
productcode
:
""
,
...
...
@@ -263,7 +264,8 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
RequestEnum
.
DataExist
);
}
entity
.
locationid
=
location
.
id
;
entity
.
locationid
=
location
.
locationid
;
entity
.
location_cid
=
location
.
id
;
entity
.
fixturetools
=
fixturetool
.
guid
;
entity
.
attachment
=
req
.
fileurl
;
entity
.
filename
=
req
.
filename
;
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
226cc8ac
...
...
@@ -357,9 +357,6 @@ namespace Siger.ApiACC.Controllers
}
//移出 上料位
monitor
.
status
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Manual
);
_automationTaskList
.
Insert
(
new
siger_automation_task_list
{
...
...
Server/Apis/Siger.ApiWMS/Controllers/LocationController.cs
View file @
226cc8ac
...
...
@@ -940,7 +940,7 @@ namespace Siger.ApiWMS.Controllers
if
(
Location
.
id
==
locationTypeId
)
{
var
locationIdExist
=
location
.
Get
(
q
=>
q
.
projectid
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
typeid
==
locationTypeId
&&
q
.
locationid
==
req
.
storeID
.
ToInt
());
q
.
locationid
==
req
.
storeID
.
ToInt
()
&&
q
.
storageid
==
req
.
warehouseid
);
if
(
locationIdExist
!=
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
IDExist
);
...
...
@@ -1074,7 +1074,7 @@ namespace Siger.ApiWMS.Controllers
if
(
Location
.
id
==
locationTypeId
)
{
var
locationIdExist
=
location
.
Get
(
q
=>
q
.
projectid
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
typeid
==
locationTypeId
&&
q
.
locationid
==
req
.
storeID
.
ToInt
()
&&
q
.
id
!=
Location
.
locationid
.
ToInt
());
q
.
locationid
==
req
.
storeID
.
ToInt
()
&&
q
.
id
!=
Location
.
locationid
.
ToInt
()
&&
q
.
storageid
==
req
.
warehouseid
);
if
(
locationIdExist
!=
null
)
{
throw
new
BadRequestException
(
RequestEnum
.
IDExist
);
...
...
Server/Common/Siger.Middlelayer.Utility/ImportEntities/FixtureTools.cs
View file @
226cc8ac
...
...
@@ -190,6 +190,8 @@ namespace Siger.Middlelayer.Utility.ImportEntities
public
class
AutomationLocationTemplate
:
ImportBase
{
[
ExcelColumn
(
"*仓库名称"
)]
public
string
Warehouse
{
get
;
set
;
}
[
ExcelColumn
(
"*储位ID"
)]
public
string
LocationId
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_location.cs
View file @
226cc8ac
...
...
@@ -11,6 +11,10 @@ namespace Siger.Middlelayer.AccRepository.Entities
{
public
string
guid
{
get
;
set
;
}
/// <summary>
/// 储位自增ID
/// </summary>
public
int
location_cid
{
get
;
set
;
}
/// <summary>
/// 储位位置
/// </summary>
public
int
locationid
{
get
;
set
;
}
...
...
@@ -18,9 +22,11 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// 工装GUID
/// </summary>
public
string
fixturetools
{
get
;
set
;
}
public
string
fixturename
{
get
;
set
;
}
public
int
productid
{
get
;
set
;
}
public
string
productcode
{
get
;
set
;
}
public
string
productname
{
get
;
set
;
}
/// <summary>
/// 工件对应的工单号
/// </summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_task_list.cs
View file @
226cc8ac
...
...
@@ -20,6 +20,10 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// </summary>
public
string
fixtureguid
{
get
;
set
;
}
/// <summary>
/// 工装Name
/// </summary>
public
string
fixturename
{
get
;
set
;
}
/// <summary>
/// 工位ID
/// </summary>
public
int
sectionid
{
get
;
set
;
}
...
...
@@ -47,6 +51,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// 产品code
/// </summary>
public
string
productcode
{
get
;
set
;
}
public
string
productname
{
get
;
set
;
}
/// <summary>
/// 工序ID
/// </summary>
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationLocationRepository.cs
View file @
226cc8ac
...
...
@@ -29,7 +29,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
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
.
id
join
l
in
_context
.
siger_wms_storage_location
on
q
.
location
_c
id
equals
l
.
id
join
w
in
_context
.
siger_wms_storage
on
l
.
storageid
equals
w
.
id
join
u
in
_context
.
siger_project_user
on
q
.
updator
equals
u
.
mid
into
uu
from
u
in
uu
.
DefaultIfEmpty
()
...
...
@@ -100,14 +100,14 @@ namespace Siger.Middlelayer.AccRepository.Repositories
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
.
id
join
l
in
_context
.
siger_wms_storage_location
on
q
.
location
_c
id
equals
l
.
id
join
w
in
_context
.
siger_wms_storage
on
l
.
storageid
equals
w
.
id
where
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
select
new
ResponseAutomationLocationList
{
id
=
q
.
id
,
fixtureguid
=
t
.
guid
,
locationid
=
l
.
id
,
locationid
=
l
.
location
id
,
location
=
l
.
realname
,
locationcode
=
l
.
serial_number
,
wavehouseid
=
w
.
id
,
...
...
@@ -142,7 +142,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
FixtureToolNotFound
}
"
);
}
var
location
=
_context
.
siger_wms_storage_location
.
FirstOrDefault
(
q
=>
q
.
locationid
==
item
.
LocationId
.
ToInt
()
&&
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
var
warehouse
=
_context
.
siger_wms_storage
.
FirstOrDefault
(
q
=>
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
projectId
==
projectid
&&
q
.
name
==
item
.
Warehouse
);
if
(
warehouse
==
null
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
WaveHouseIDNotExist
}
"
);
}
var
location
=
_context
.
siger_wms_storage_location
.
FirstOrDefault
(
q
=>
q
.
locationid
==
item
.
LocationId
.
ToInt
()
&&
q
.
storageid
==
warehouse
.
id
&&
q
.
projectId
==
projectid
&&
q
.
status
==
(
int
)
RowState
.
Valid
);
if
(
location
==
null
||
item
.
LocationId
.
ToInt
()
<=
0
)
{
errors
.
Add
(
$"
{
rowIndex
}
,
{(
int
)
RequestEnum
.
LocationNull
}
"
);
...
...
@@ -166,7 +171,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
var
entity
=
new
siger_automation_location
{
guid
=
Guid
.
NewGuid
().
ToString
(),
locationid
=
item
.
LocationId
.
ToInt
()
,
locationid
=
location
.
id
,
fixturetools
=
fixturetool
.
guid
,
attachment
=
""
,
filename
=
""
,
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationInfo.cs
View file @
226cc8ac
...
...
@@ -32,10 +32,13 @@ namespace Siger.Middlelayer.AccRepository.Response
public
class
ResponseAutomationLocationRouteInfo
{
public
string
fixture
{
get
;
set
;
}
public
string
fixturename
{
get
;
set
;
}
public
string
ordernumber
{
get
;
set
;
}
public
string
sn
{
get
;
set
;
}
public
int
location
{
get
;
set
;
}
public
int
productId
{
get
;
set
;
}
public
string
productCode
{
get
;
set
;
}
public
string
productName
{
get
;
set
;
}
public
string
route
{
get
;
set
;
}
public
string
pn
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationLocation.cs
View file @
226cc8ac
...
...
@@ -8,9 +8,12 @@ namespace Siger.Middlelayer.AccRepository.Response
{
public
int
id
{
get
;
set
;
}
/// <summary>
/// 储位
位置
/// 储位
自增ID
/// </summary>
public
int
locationid
{
get
;
set
;
}
/// <summary>
/// 储位填写ID
/// </summary>
public
int
locaid
{
get
;
set
;
}
public
string
location
{
get
;
set
;
}
public
int
wavehouseid
{
get
;
set
;
}
...
...
Server/Infrastructure/Script/DB.script
View file @
226cc8ac
...
...
@@ -270,8 +270,11 @@ CREATE TABLE IF NOT EXISTS `siger_automation_location` (
`guid` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置',
`fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`fixturename` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
`productcode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品CODE',
`productname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品name',
`ordernumber` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工件对应工单号',
`sn` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工件',
`routeid` int(11) NULL DEFAULT 0,
...
...
@@ -333,6 +336,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_task_list` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`no` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`fixtureguid` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`fixturename` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装name',
`sectionid` int(11) NOT NULL DEFAULT 0 COMMENT '工位ID',
`trigger` int(1) NOT NULL DEFAULT 0 COMMENT '触发方',
`tasktype` int(1) NOT NULL DEFAULT 0 COMMENT '任务类型',
...
...
@@ -340,6 +344,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_task_list` (
`ordercode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工单号',
`productid` int(11) NOT NULL DEFAULT 0 COMMENT '产品ID',
`productcode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产品CODE',
`productname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产品NAME',
`processid` int(11) NOT NULL DEFAULT 0 COMMENT '工序ID',
`programnumber` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '程序号',
`locationid` int(11) NOT 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