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
623770f1
Commit
623770f1
authored
Jan 26, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
86980cb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
66 deletions
+36
-66
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+32
-62
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+4
-4
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
623770f1
...
@@ -321,52 +321,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -321,52 +321,7 @@ namespace Siger.ApiACC.Controllers
_automationFixtureMonitor
.
Update
(
monitor
);
_automationFixtureMonitor
.
Update
(
monitor
);
}
}
}
}
else
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_CJT
||
taskObj
.
action
==
TaskAction
.
Step_LK_JGZX
||
taskObj
.
action
==
TaskAction
.
Step_LK_SXLW
)
{
//出库
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
fixturetools
==
taskObj
.
fixtureguid
);
if
(
location
!=
null
)
{
location
.
ordernumber
=
""
;
location
.
productcode
=
""
;
location
.
productid
=
0
;
location
.
sn
=
""
;
}
}
else
{
//更新 CNC 状态
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
taskObj
.
sectionid
);
if
(
monitor
==
null
)
{
_automationFixtureMonitor
.
Insert
(
new
siger_automation_fixture_tools_monitor
{
ordernumber
=
taskObj
.
ordercode
,
productCode
=
taskObj
.
productcode
,
//productNam
section
=
taskObj
.
sectionid
,
status
=
status
,
sn
=
taskObj
.
sn
,
fixtureguid
=
taskObj
.
fixtureguid
,
//fixturename=,
locationId
=
taskObj
.
locationid
,
createtime
=
DateTime
.
Now
,
projectId
=
PID
,
route
=
0
,
updatetime
=
DateTime
.
Now
,
});
}
else
{
monitor
.
ordernumber
=
taskObj
.
ordercode
;
monitor
.
productCode
=
taskObj
.
productcode
;
monitor
.
status
=
taskObj
.
status
;
monitor
.
sn
=
taskObj
.
sn
;
monitor
.
locationId
=
taskObj
.
locationid
;
monitor
.
updatetime
=
DateTime
.
Now
;
_automationFixtureMonitor
.
Update
(
monitor
);
}
}
}
}
}
}
...
@@ -427,9 +382,6 @@ namespace Siger.ApiACC.Controllers
...
@@ -427,9 +382,6 @@ namespace Siger.ApiACC.Controllers
if
(
cleanMachine
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
if
(
cleanMachine
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
{
{
Logger
.
WriteLineInfo
(
$"AutoProcess 有清洗机完成,创建清洗机Task"
);
Logger
.
WriteLineInfo
(
$"AutoProcess 有清洗机完成,创建清洗机Task"
);
// var fixtureToolsObj = _automationFixtureTools.GetProductFixtureLocation(PID,);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
cleanMachine
.
section
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
cleanMachine
.
section
);
if
(
monitor
!=
null
)
if
(
monitor
!=
null
)
{
{
...
@@ -448,20 +400,38 @@ namespace Siger.ApiACC.Controllers
...
@@ -448,20 +400,38 @@ namespace Siger.ApiACC.Controllers
var
location
=
SelectLocation
(
freeMachine
.
machineid
);
var
location
=
SelectLocation
(
freeMachine
.
machineid
);
if
(
location
!=
null
)
if
(
location
!=
null
)
{
{
_automationFixtureMonitor
.
Insert
(
new
siger_automation_fixture_tools_monitor
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
freeMachine
.
section
);
if
(
monitor
==
null
)
{
_automationFixtureMonitor
.
Insert
(
new
siger_automation_fixture_tools_monitor
{
projectId
=
PID
,
productId
=
location
.
productId
,
productCode
=
location
.
productCode
,
productName
=
location
.
productName
,
fixtureguid
=
location
.
fixture
,
fixturename
=
location
.
fixturename
,
ordernumber
=
location
.
ordernumber
,
locationId
=
location
.
location
,
section
=
freeMachine
.
section
,
sn
=
location
.
sn
,
createtime
=
DateTime
.
Now
,
updatetime
=
DateTime
.
Now
});
}
else
{
{
productId
=
PID
,
monitor
.
productId
=
location
.
productId
;
productCode
=
location
.
productCode
,
monitor
.
productCode
=
location
.
productCode
;
//productName=location.productCode
monitor
.
productName
=
location
.
productName
;
fixtureguid
=
location
.
fixture
,
monitor
.
fixtureguid
=
location
.
fixture
;
fixturename
=
location
.
fixturename
,
monitor
.
fixturename
=
location
.
fixturename
;
ordernumber
=
location
.
ordernumber
,
monitor
.
ordernumber
=
location
.
ordernumber
;
locationId
=
location
.
location
,
monitor
.
locationId
=
location
.
location
;
section
=
freeMachine
.
section
,
monitor
.
sn
=
location
.
sn
;
sn
=
location
.
sn
,
monitor
.
updatetime
=
DateTime
.
Now
;
createtime
=
DateTime
.
Now
,
_automationFixtureMonitor
.
Update
(
monitor
);
updatetime
=
DateTime
.
Now
}
});
CreateTask
(
freeMachine
,
TaskActionType
.
Load
,
TaskAction
.
Step_LK_JGZX
,
location
.
fixture
,
location
.
ordernumber
,
location
.
sn
,
location
.
pn
,
location
.
productId
,
location
.
productCode
,
location
.
location
);
CreateTask
(
freeMachine
,
TaskActionType
.
Load
,
TaskAction
.
Step_LK_JGZX
,
location
.
fixture
,
location
.
ordernumber
,
location
.
sn
,
location
.
pn
,
location
.
productId
,
location
.
productCode
,
location
.
location
);
return
;
//完成当前任务 退出
return
;
//完成当前任务 退出
}
}
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
623770f1
...
@@ -336,10 +336,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -336,10 +336,10 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
AccEnum
.
MachineDisable
);
throw
new
BadRequestException
(
AccEnum
.
MachineDisable
);
}
}
if
(
machineStatus
.
status
==
(
int
)
Automation
.
MachineStatus
.
Waiting
)
//
if (machineStatus.status == (int)Automation.MachineStatus.Waiting)
{
//
{
throw
new
BadRequestException
(
AccEnum
.
MachineOnFree
);
//
throw new BadRequestException(AccEnum.MachineOnFree);
}
//
}
//if (machineStatus.status == (int)Automation.MachineStatus.Complated)
//if (machineStatus.status == (int)Automation.MachineStatus.Complated)
//{
//{
// throw new BadRequestException(AccEnum.MachineProCompalate);
// throw new BadRequestException(AccEnum.MachineProCompalate);
...
...
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