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
ec42324c
Commit
ec42324c
authored
Feb 09, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
someupdate
parent
6a16043d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+22
-1
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+7
-5
No files found.
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
ec42324c
...
...
@@ -42,10 +42,11 @@ namespace Siger.ApiACC.Controllers
private
readonly
IAutomationFixtureToolsRepository
_automationFixtureTools
;
private
readonly
IProductRouteRepository
_productRoute
;
private
readonly
IAutomationSectionPropertyRepository
_automationSectionProperty
;
private
readonly
IAutomationProduceHistoryRepository
_automationProduceHistory
;
public
AutomationController
(
IUnitOfWork
unitOfWork
,
ISigerProjectLevelSectionRepository
sigerProjectLevelSection
,
IAutomationLineMode
automationLineMode
,
IAutomationMachineStatus
automationMachineStatus
,
ISigerDict
sigerDict
,
IAutomationTaskListRepository
automationTaskList
,
ISigerProjectMachineAttributionRepository
sigerProjectMachineAttribution
,
IAutomationFixtureMonitor
automationFixtureMonitor
,
IAutomationLocationRepository
automationLocation
,
IProductionBeatSetRepository
productionBeatSet
,
IAutomationFixtureToolsProductRepository
automationFixtureToolsProduct
,
IAutomationFixtureToolsRepository
automationFixtureTools
,
IProductRouteRepository
productRoute
,
IAutomationSectionPropertyRepository
automationSectionProperty
)
IAutomationFixtureToolsRepository
automationFixtureTools
,
IProductRouteRepository
productRoute
,
IAutomationSectionPropertyRepository
automationSectionProperty
,
IAutomationProduceHistoryRepository
automationProduceHistory
)
{
_unitOfWork
=
unitOfWork
;
_sigerProjectLevelSection
=
sigerProjectLevelSection
;
...
...
@@ -61,6 +62,7 @@ namespace Siger.ApiACC.Controllers
_automationFixtureTools
=
automationFixtureTools
;
_productRoute
=
productRoute
;
_automationSectionProperty
=
automationSectionProperty
;
_automationProduceHistory
=
automationProduceHistory
;
}
/// <summary>
...
...
@@ -445,6 +447,25 @@ namespace Siger.ApiACC.Controllers
}
_automationTaskList
.
Update
(
taskObj
);
//添加SN记录
_automationProduceHistory
.
Insert
(
new
siger_automation_produce_history
{
section
=
taskObj
.
sectionid
,
sn
=
taskObj
.
sn
,
locationid
=
taskObj
.
locationid
,
productcode
=
taskObj
.
productcode
,
productname
=
taskObj
.
productname
,
productid
=
taskObj
.
productid
,
projectId
=
taskObj
.
projectId
,
route
=
taskObj
.
route
.
ToString
(),
status
=
1
,
locationname
=
location
.
location_cid
.
ToString
(),
updatetime
=
DateTime
.
Now
,
});
}
}
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
ec42324c
...
...
@@ -628,7 +628,12 @@ namespace Siger.ApiACC.Controllers
{
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
var
sectionProperty
=
_sectionPropertyRepository
.
Get
(
f
=>
f
.
propertytype
==
5
);
if
(
sectionProperty
==
null
)
{
throw
new
BadRequestException
(
AccEnum
.
SectionPropertyNull
);
}
var
unloadSection
=
sectionProperty
.
sectionid
;
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Manual
);
_automationTaskList
.
Insert
(
new
siger_automation_task_list
{
...
...
@@ -639,7 +644,7 @@ namespace Siger.ApiACC.Controllers
tasktype
=
Automation
.
TaskActionType
.
Load
,
operater
=
UserId
,
operatetime
=
DateTime
.
Now
,
sectionid
=
disassemble
.
s
ection
,
sectionid
=
unloadS
ection
,
send
=
0
,
status
=
1
,
completetime
=
DateTime
.
MinValue
,
...
...
@@ -658,9 +663,6 @@ namespace Siger.ApiACC.Controllers
//移出 上料位
monitor
.
taskno
=
taskNo
;
_automationFixtureMonitor
.
Update
(
monitor
);
if
(
_unitOfWork
.
Commit
()
>
0
)
{
Logger
.
WriteLineError
(
$"拆卸完成任务
{
taskNo
}
创建成功-
{
EnumHelper
.
GetEnumDesc
(
Automation
.
TaskAction
.
Step_SXLW_LK
)}
"
);
...
...
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