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
ba1c7d76
Commit
ba1c7d76
authored
Feb 05, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
94d845c2
9575be19
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
25 deletions
+51
-25
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+44
-23
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+2
-1
AutoMES.cs
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
+2
-1
RequestPLC.cs
...ies/Siger.Middlelayer.AccRepository/Request/RequestPLC.cs
+2
-0
ResponseAutomationInfo.cs
...dlelayer.AccRepository/Response/ResponseAutomationInfo.cs
+1
-0
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
ba1c7d76
...
...
@@ -562,36 +562,57 @@ namespace Siger.ApiACC.Controllers
var
TempList
=
new
List
<
ResponseAutoRouteInfo
>();
foreach
(
var
b
in
beats
)
{
var
autoLocation
=
_automationLocation
.
Get
(
f
=>
f
.
projectId
==
b
.
projectID
&&
!
string
.
IsNullOrEmpty
(
f
.
sn
)
&&
f
.
routeid
==
b
.
route_number
.
ToInt
()
&&
f
.
productid
==
b
.
product_name
.
ToInt
());
if
(
autoLocation
==
null
)
continue
;
if
(
autoLocation
.
status
==
2
)
Logger
.
WriteLineError
(
$"SelectLocation 设备
{
b
.
machineID
}
标准节拍
{
b
.
route_number
}{
b
.
route_name
}
"
);
var
autoLocationIds
=
_automationLocation
.
GetList
(
f
=>
f
.
projectId
==
b
.
projectID
&&
f
.
routeid
==
b
.
route_number
.
ToInt
()
&&
f
.
productid
==
b
.
product_name
.
ToInt
());
if
(!
autoLocationIds
.
Any
())
{
//SN不在立库内
Logger
.
WriteLineError
(
$"SelectLocation 当前储位工件不在储位上"
);
Logger
.
WriteLineError
(
$"SelectLocation 设备
{
b
.
machineID
}
routeid:
{
b
.
route_number
}
-
{
b
.
route_name
}
productId:
{
b
.
product_name
}
没有匹配到当前储位"
);
continue
;
}
TempList
.
Add
(
new
ResponseAutoRouteInfo
foreach
(
var
autoLocation
in
autoLocationIds
)
{
FixtureGuid
=
autoLocation
.
fixturetools
,
FixtureName
=
autoLocation
.
fixturename
,
Section
=
b
.
section_id
,
Machine
=
b
.
machineID
,
Pn
=
b
.
process_number
,
ProductId
=
b
.
product_name
.
ToInt
(),
ProductName
=
b
.
product_name_text
,
Location
=
autoLocation
.
locationid
,
Route
=
b
.
route_number
.
ToInt
(),
RouteName
=
b
.
route_name
,
OrderNo
=
autoLocation
.
ordernumber
,
Sn
=
autoLocation
.
sn
,
LId
=
autoLocation
.
id
});
if
(
string
.
IsNullOrEmpty
(
autoLocation
.
sn
))
{
Logger
.
WriteLineError
(
$"SelectLocation 设备
{
b
.
machineID
}
routeid:
{
b
.
route_number
}
-
{
b
.
route_name
}
productId:
{
b
.
product_name
}
储位
{
autoLocation
.
locationid
}
没有SN工件"
);
continue
;
}
if
(
autoLocation
.
status
==
2
)
{
//SN不在立库内
Logger
.
WriteLineError
(
$"SelectLocation 设备
{
b
.
machineID
}
routeid:
{
b
.
route_number
}
-
{
b
.
route_name
}
productId:
{
b
.
product_name
}
储位
{
autoLocation
.
locationid
}
工件Sn:
{
autoLocation
.
sn
}
不在储位上"
);
continue
;
}
Logger
.
WriteLineError
(
$"SelectLocation beasetId:
{
b
.
id
}
标准节拍
{
b
.
route_number
}{
b
.
route_name
}
有效订单"
);
TempList
.
Add
(
new
ResponseAutoRouteInfo
{
FixtureGuid
=
autoLocation
.
fixturetools
,
FixtureName
=
autoLocation
.
fixturename
,
Section
=
b
.
section_id
,
Machine
=
b
.
machineID
,
Pn
=
b
.
process_number
,
ProductId
=
b
.
product_name
.
ToInt
(),
ProductCode
=
autoLocation
.
productcode
,
ProductName
=
b
.
product_name_text
,
Location
=
autoLocation
.
locationid
,
Route
=
b
.
route_number
.
ToInt
(),
RouteName
=
b
.
route_name
,
OrderNo
=
autoLocation
.
ordernumber
,
Sn
=
autoLocation
.
sn
,
LId
=
autoLocation
.
id
});
Logger
.
WriteLineError
(
$"SelectLocation 有效订单号
{
autoLocation
.
ordernumber
}
"
);
}
}
if
(!
TempList
.
Any
())
{
Logger
.
WriteLineError
(
$"SelectLocation 没有匹配到有效订单号"
);
return
null
;
}
var
ordernos
=
TempList
.
Select
(
f
=>
f
.
OrderNo
).
ToList
();
// 取产品交期最近的订单
var
planOrder
=
_automationFixtureToolsProduct
.
GetDeliveryOrder
(
ordernos
,
PID
);
...
...
@@ -612,7 +633,7 @@ namespace Siger.ApiACC.Controllers
ordernumber
=
result
.
OrderNo
,
location
=
result
.
Location
,
productId
=
result
.
ProductId
,
//productCode=result.productc
ode,
productCode
=
result
.
ProductC
ode
,
productName
=
result
.
ProductName
,
sn
=
result
.
Sn
,
pn
=
result
.
Pn
,
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
ba1c7d76
...
...
@@ -227,7 +227,8 @@ namespace Siger.ApiACC.Controllers
RobotStep
=
(
int
)
taskobj
.
action
,
StorageNo
=
taskobj
.
locationid
,
SN
=
taskobj
.
sn
,
Program
=
taskobj
.
programnumber
Program
=
taskobj
.
programnumber
,
TaskType
=(
int
)
taskobj
.
tasktype
};
var
result
=
PushTask
(
host
,
sendToPLC
,
out
string
message
);
...
...
Server/Apis/Siger.ApiACC/Tasks/AutoMES.cs
View file @
ba1c7d76
...
...
@@ -66,7 +66,8 @@ namespace Siger.ApiACC.Tasks
RobotStep
=
(
int
)
task
.
action
,
StorageNo
=
task
.
locationid
,
SN
=
task
.
sn
,
Program
=
task
.
programnumber
Program
=
task
.
programnumber
,
TaskType
=
(
int
)
task
.
tasktype
};
Logger
.
WriteLineError
(
$"TASK 开始下发 :
{
EnumHelper
.
GetEnumDesc
(
task
.
action
)}
"
);
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/RequestPLC.cs
View file @
ba1c7d76
...
...
@@ -37,6 +37,8 @@ namespace Siger.Middlelayer.AccRepository.Request
public
string
Program
{
get
;
set
;
}
public
int
LineID
{
get
;
set
;
}
public
int
TaskType
{
get
;
set
;
}
}
public
class
ResponsePlC
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseAutomationInfo.cs
View file @
ba1c7d76
...
...
@@ -56,6 +56,7 @@ namespace Siger.Middlelayer.AccRepository.Response
public
int
Machine
{
get
;
set
;
}
public
string
Pn
{
get
;
set
;
}
public
int
ProductId
{
get
;
set
;
}
public
string
ProductCode
{
get
;
set
;
}
public
string
ProductName
{
get
;
set
;
}
public
int
Route
{
get
;
set
;
}
public
string
RouteName
{
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